J
Jiri Baum
johan.bengtsson:
> That is right (apart from some misstyping )
Yeah, sorry about that... see corrected version below.
> The Igain and Dgain should still be calculated as Igain=gain/Itime and
> Dgain=gain*Dtime
I'm not sure what you mean by gain here? Isn't gain just what I called masterGain? (I multiplied it into the formulae at a different place, but
the effect is the same...)
What is Itime and Dtime ? (Is that just a different way of saying that Igain should be in hertz and Dgain should be in seconds?)
> Do you want me to try to implement a more full-blown PID controller
> (including bumpless transfer and so on)
Probably best to put it into the one that's already in the CVS, if that's OK with you Mario.
The formulae again, hopefully without typos now...
error = (desired - actual) * masterGain
P = error * Pgain;
I += error * Igain * time
D = (error - last_error) * Dgain / time
output = P+I+D
Tuning:
masterGain (no units)
Pgain (no units)
Igain (in Hz)
Dgain (in s)
Other values:
time is the period of the PID in seconds
Jiri
--
Jiri Baum <[email protected]>
http://www.csse.monash.edu.au/~jiribvisit the MAT LinuxPLC project at http://mat.sourceforge.net
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
> That is right (apart from some misstyping )
Yeah, sorry about that... see corrected version below.
> The Igain and Dgain should still be calculated as Igain=gain/Itime and
> Dgain=gain*Dtime
I'm not sure what you mean by gain here? Isn't gain just what I called masterGain? (I multiplied it into the formulae at a different place, but
the effect is the same...)
What is Itime and Dtime ? (Is that just a different way of saying that Igain should be in hertz and Dgain should be in seconds?)
> Do you want me to try to implement a more full-blown PID controller
> (including bumpless transfer and so on)
Probably best to put it into the one that's already in the CVS, if that's OK with you Mario.
The formulae again, hopefully without typos now...
error = (desired - actual) * masterGain
P = error * Pgain;
I += error * Igain * time
D = (error - last_error) * Dgain / time
output = P+I+D
Tuning:
masterGain (no units)
Pgain (no units)
Igain (in Hz)
Dgain (in s)
Other values:
time is the period of the PID in seconds
Jiri
--
Jiri Baum <[email protected]>
http://www.csse.monash.edu.au/~jiribvisit the MAT LinuxPLC project at http://mat.sourceforge.net
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc