×

Sale ends todayGet 30% off any course (excluding packages)

Ends in --- --- ---

Boost Control: PID - A Practical Analogy

Watch This Course

$79 USD

-OR-
Or 8 easy payments of only $9.88 Instant access. Easy checkout. No fees. Learn more
Course Access for Life
60 day money back guarantee

PID - A Practical Analogy

05.11

00:00 - Now that we've covered the specifics, I'm going to put it into a context that should make the concept a little easier to understand.
00:08 Let's assume you're sitting in a car on a straight piece of road.
00:12 There's a stop sign 100 metres ahead of you and you need to drive the car down the road, and stop at the stop sign.
00:21 In this case, let's start by only using a throttle, which you can think of as the proportional gain.
00:28 The more you use, the faster the car will accelerate towards the stop sign.
00:34 Since we're only using the throttle though, if we want to get to the stop sign quickly, the car is going to overshoot the stop sign.
00:42 We're then going to need to reverse up, and the same thing's likely to happen.
00:47 Now let's add in the brake which is our derivative gain.
00:52 Now by using a combination of the accelerator, or proportional gain, and the brake, or derivative gain, you can accelerate quickly up to the stop sign before using the brakes to prevent overshooting or undershooting.
01:07 This provides the system with faster response and more accurate control.
01:14 Let's consider what would happen if the stop sign was now on a slight incline.
01:20 Also, let's assume that the brake is only used for stopping the car and can't be used for holding it stationary.
01:28 In this case, once you stop at the stop sign the car would begin rolling back, so you'd need to apply a small amount of throttle to hold the car at the stop sign.
01:39 You can think of this as the integral component of the system.
01:45 Initially, I mentioned that every PID control system needs to be tuned to suit the specific system we're trying to control.
01:53 This can also be explained through this analogy.
01:56 For example, consider what would happen if we swapped to a much more powerful car.
02:02 The amount of throttle and brake that we'd need to apply would be different than in a less powerful car.
02:09 Now we'll look at how the different elements of a PID control system interact, and how they affect the accuracy and response of a system.
02:20 We'll look at an example using a DC Servo motor, such as a typical E-throttle motor.
02:27 In this case, the ECU has the ability to drive the motor, either forwards or backwards, to achieve its target.
02:35 We'll start with the PI and D components set to zero, and then add a small amount of proportional gain.
02:44 In this first graph, we've requested an aim position, and we can see that the system has responded, but the actual position hasn't reached our target.
02:55 The response of the system at this point is slow and unable to match the aim position.
03:02 Next we can add a little more proportional gain to the system, and see how this affects the results.
03:09 On our second graph, we can see that the response has improved, and the error is reduced, but still the system doesn't reach the aim position.
03:20 If we continue, and increase the proportional gain further, we'll get to a point where we find the system overshoots the aim position, and oscillates before settling down.
03:31 Once the system settles down, you can see that a small amount of error remains, as the proportional gain alone isn't enough for the system to reach the aim position.
03:43 At this point, we would reduce the proportional gain slightly, and add some derivative gain to help dampen the oscillation, while still retaining good response.
03:54 The final step will be to add a small amount of integral gain to remove the remaining error, and allow the system to accurately achieve the aim position.
04:05 We can see the PID control algorithm at work, if we look at the current being supplied to the DC Servo Motor.
04:15 If we look at the situation where we only have proportional gain, you can see the DC Servo Motor is driven aggressively to move towards the aim position.
04:24 As the error reduces, and the actual position moves closer to the aim, the current supplied to the motor is reduced.
04:32 With proportional gain alone, the current can't reverse until the error becomes negative.
04:39 So this is why we see overshooting and oscillation when we increase the proportional gain.
04:46 If we look at the current when we add some derivative gain though, you can see that, in this case, the current is reversed before the target is reached, as a kind of braking effect.
04:57 This is how the derivative gain works to reduce oscillation.
05:02 In the next module, we'll look at a practical approach to tuning a PID control system.

We usually reply within 12hrs (often sooner)

Need Help?

Need help choosing a course?

Experiencing website difficulties?

Or need to contact us for any other reason?