How stable are PID loops really?

There's no inherent oscillation in the output. A perfect PID controller controlling an ideal 2nd order system has a closed-loop transfer function that either moves asymptotically to the setpoint (damping factor greater than 1) or oscillates about the setpoint with the oscillations decreasing to an arbitrarily low value over time (damping factor less than one). Typical tuning is such that the oscillations decrease by a factor of 4 or more every cycle so they would quickly fall below any realistic noise level (\$0.25^{20} \approx 10^{-12}\$).

Real PID controllers can have limit cycles (for example if there is some stiction in a valve actuator) or they can be time-proportioning types that have an output PWM that shows up in the output. Probably other stuff too. Anything you look at with a 24-bit or better ADC probably has some pattern you can find, even if it originates in the ADC itself (eg. idle tones).


For any given loop, it will have a frequency response. If the frequency response is 'peaky', then we'll often say the loop has marginal stability. This will amplify the input noise, and as the gain is high over a small range of frequencies, it will tend to filter it and make the output look oscillatory.

However, a properly designed loop will have minimal or no peaking, and will minimise this effect.

If the frequency response goes to infinity at some frequency, then we'd say it was unstable, and it would oscillate at that frequency, but with very large amplitude, so that wouldn't account for small oscillations.

If it's a digital implementation, then it will have a finite resolution in its internal representation of the parameters. As it's a feedback system, there is the opportunity for limit cycles to occur. If the word length is short enough, these limit cycles may be visible.


I'll keep this answer simple. PID works best when the delay is short and predicable. This means that the time between input reading and computation time to output is invariable..

The next thing to do is to shorten delays and the variances in delays to ADC through processing through DAC output. Then next important aspect is to keep that delay as consistant as possible.

What's important is short delay and consistent delay.