J
Hi there,
I'm trying to control a motor using PWM modulation.
I did something similar to:
dutyCycle[n] = dutyCycle[n-1] + Kp*error[n] + Kd*(error[n]-error[n-1])
Basically dutyCycle adjusts until there is no error. I tried this out and it seems to work correctly. It this correct? Or is it not a PD controller?
I did some research and it seems that there exists an incremental form of the PID. But it involves proportional, derivative and integral gains. What is the use of the integral when dutyCycle is acting as an integral sum?
Thank you
I'm trying to control a motor using PWM modulation.
I did something similar to:
dutyCycle[n] = dutyCycle[n-1] + Kp*error[n] + Kd*(error[n]-error[n-1])
Basically dutyCycle adjusts until there is no error. I tried this out and it seems to work correctly. It this correct? Or is it not a PD controller?
I did some research and it seems that there exists an incremental form of the PID. But it involves proportional, derivative and integral gains. What is the use of the integral when dutyCycle is acting as an integral sum?
Thank you
