digital pid controller design
coolchip
Generate the motor speed term by either of the following methods:
~
. Take the reciprocal of the interval between pulses.
. This number is proportional to the motor speed. Measureing
. the number of pulses in a fixed time interval is more straighforward,
. but usually introduces too much lag for a real-time control application.
. This is your Speed variable ea. The Error (e) term is the difference
. The desired speed es and the speed variable ea. e = es - ea.
~
The "P" component is just a straightforward implementation of the 1st term of your equation.
~
The "Integral" I can be an up-down counter, the count rate being proportional to the speed error term.
~
The "Derivative" component is the difference between the current speed [ea(i)] and the previous speed [ea(i-1)]. de/dt = ea(i) - ea(i-1).
~
The scale factors of the variables e, I, de/dt can be absorbed into the scale
factors Kp, Ki, Kd.
Regards,
Kral
Added after 2 hours 23 minutes:
coolchip
Generate the motor speed term by either of the following methods:
~
. Take the reciprocal of the interval between pulses.
. This number is proportional to the motor speed. Measuring
. the number of pulses in a fixed time interval is more straighforward,
. but usually introduces too much lag for a real-time control application.
. This is your Speed variable ea. The Error (e) term is the difference
. The desired speed es and the speed variable ea. e = es - ea.
~
The "P" component is just a straightforward implementation of the 1st term of your equation.
~
The "Integral" I can be an up-down counter, the count rate being proportional to the speed error term.
~
The "Derivative" component is the difference between the current speed [ea(i)] and the previous speed [ea(i-1)]. de/dt = ea(i) - ea(i-1).
~
The scale factors of the variables e, I, de/dt can be absorbed into the scale
factors Kp, Ki, Kd.
Regards,
Kral