Video 1.7 - PID Control
Video
#Physics #Engineering #Control_Theory #RoboticsTable of Contents:
- C.3) PID Control (🎦 video 1.7)
- C.4) Fun Facts of the PID
- C.5) Tuning the PID gains for the Cruise-Controller (Trial and Error)
C.3) PID Control
Last time, we saw that the PI-Regulator (or its slightly more elaborated brother, the PID - Regulator) was enough to make the cruise controller achieve Stability, Tracking, and Robustness.
Now we will see what are the effects of the controller gains and why the PID - Regulator is such an important regulator in virtually every industry.
C.3.1) Proportional Gain
In Control Theory and stability theory, root locus analysis is a graphical method for examining how the Roots of a System change with variation of a certain system parameter, commonly a gain within a feedback system.
This is a technique used as a stability criterion in the field of classical control theory developed by Walter R. Evans which can determine stability of the system. The Root Locus plots the Poles of the Closed Loop Transfer Function in the complex S-Plane as a function of a gain parameter
C.3.2) Integral Gain
Integral windup, refers to the situation in a PID feedback controller where a large change in setpoint occurs (say a positive change) and the integral term accumulates a significant error during the rise (windup), thus Overshooting and continuing to increase as this accumulated error is unwound (offset by errors in the other direction). The specific problem is the excess overshooting.
This problem can be addressed by:
- Initializing the controller integral to a desired value, for instance to the value before the problem
- Increasing the setpoint in a suitable ramp
- Disabling the integral function until the to-be-controlled process variable (PV) has entered the controllable region
- Preventing the integral term from accumulating above or below pre-determined bounds
- Back-calculating the integral term to constrain the process output within feasible bounds.
- Zeroing the integral value every time the error is equal to, or crosses zero. This avoids having the controller attempt to drive the system to have the same error integral in the opposite direction as was caused by a perturbation.
Examples:
C.3.2) Derivative Gain
The problem of Derivative Kick happens since error=Setpoint - Input, any change in Setpoint causes an instantaneous change in error. The derivative of this change is infinity (in practice, since dt isn’t 0 it just winds up being a really big number.) This number gets fed into the pid equation, which results in an undesirable spike in the output.
Solution: It turns out that the derivative of the Error is equal to negative derivative of Input, EXCEPT when the Setpoint is changing. This winds up being a perfect solution. Instead of adding (Kd
C.4) Fun Facts of the PID
So… PID is by far the most used "low-level controller"
You may ask: What is the difference between a low level control and a high level control?
Controllers that directly drive the hardware are low-level controllers whereas those that implement logical decision-making are high-level controllers.
The terms "high" and "low" are relative. Nested controllers ensure abstraction and code modularity.
You may also ask: Why does PID work with many systems so well?
Because feedback has a remarkable ability to fight uncertainty in model parameters
With PID, stability is not guaranteed
C.5) Tuning the PID gains for the Cruise-Controller (Trial and Error)
C.5.1) Tuning Kp
We start by tuning the P-Regulator,
Say Kp= 1,
we see that the system is stable, but we have no tracking since we can't reach
Let's Tune now the integral gain.
C.5.2) Tuning Ki
Tuning the integral gain we get,
Say Ki = 1,
The system works great! We are done.
But what happens if me increase the integral gain? 🤔
Can we do it better? 🤔
Let's try with Ki= 10,
Now my system starts oscillating.
So this is an example of where the integral part may actually cause oscillations.
If we see oscillations it may be an indicator that Ki is to high.
Be careful !
C.5.3) Tuning Kd
Now let's tune the "D" part,
Let's try with Kd= 0.1,
In this case, it doesn't actually matter too much.
Notice Kd is small because we know it can make the system sensitive to noise
So, how is this different from the PI - Regulator?
Notice we are getting a faster initial response, but then it is slower towards the end. So maybe a PID is not the best for our particular application.
This is some of the thinking that goes into tweeking PID regulators, in fact there are many methods for tuning the gains of a PID.
So what we are going to do next time is, we are going to go now from this rather abstract math to something that we can actually implement. And we are going to use a PID to control the altitude of a hovering Quadrator.
C.5.4) Extra Content 🎦 - How to Tune a PID Controller by RealPars
Z) 🗃️ Glossary
File | Definition |
---|