How to Increase the PID Response time?


I have example 1 from the link below setup to control the speed of a dc motor.

Error = Setpoint - input
output = PWM; // to control the speed.

when the error is positive = increase speed = PWM duty cycle go to 100%
when the error is negative = decrease speed = PWM duty cycle go to 0%

I've tried alot of values for P_Param and I_Param. keeping D_Param = 0.
the response time (for the duty cycle to go from 100% to 0%) is really slow. How can i increase the response time? specially when the error is negative.

Thank you,

Adjustment of the P-param will affect the gain of the system and so alter the speed of response. I am unsure whether the arduino software requires higher (>1) or lower value (<1) to increase gain but you'll soon find out.

P stands for Proportional action (gain) and is the amount of correction action applied based on the size of the error signal (a quantity relationship)
I stands for Integral action and applies correction based upon how long the error exists (a time relationship)
D stands for Derivative action and applies correction based upon how fast the error is changing (a speed relationship)

The proportional action is the main factor governing speed of response so this should be your first point of adjustment. If you set the value too high (increasing gain) then the system will speed up but may become unstable (excessive overshoot or even oscillate)
Generally if your system has a large response mass, such as a water heating system, then you require less I action and more D action
Conversely, if your system has a low mass response, such as a motor speed control system, then you may require more I action and less (or no) D action.


1 Like