PID Control

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

PID Control

Post by mimiyum »

I have seen the PID example and I'm sorry it's too complicated for me. Is there a simple way of doing PID control?
I would like to set the PWM speed to slow down when approaching the target and slowly go back if it overshoots. Does it have to be THAT complicated? :cry:

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PID Control

Post by Benj »

Hello Mimiyum,

PID is a fairly simple equasion. However implementing PID on an 8-bit device can be a little tricky. Especially as you have to balance the equasion so it gives you usable numbers in the range of 0-255.

I will dig through my old work and try and find the equasions for PI and PID control. Hopefully this will help to get you started.

mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Re: PID Control

Post by mimiyum »

I understand it's better to use PID on a 10-bit device due to the difficulty in computing without going below or above 255.
Maybe if you could send the same PID program in your example with a few more "NOTES" and information so that we can edit it to suit our application. It would be easier to learn when there are notes embedded into your example programs.
Like for example, if we want the whole "PID" to go at a faster rate, which variable should we edit?
Thanks!

Post Reply