Our VIP Package gets you every single course at 80% off the individual price. For a limited time, save an additional $100 with coupon code 100VIP. Learn more

Boost Control: PID Control

Watch This Course

$79 USD

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

PID Control


00:00 - Before we get started with boost control, we're going to start with a module on PID control.
00:05 As this type of control system is essential to many of an ECUs advanced control strategies, such as boost control that rely on closed-loop feedback.
00:15 With any system that utilises closed-loop control, the ECU needs a control strategy to tell it how to respond to an error between a target and measured parameter.
00:27 This could be applied to idle speed control, boost control, cam control or electronic throttle, just to name a few.
00:35 I'll explain the individual terms shortly, however, PID stands for Proportional Integral and Derivative, and these are the parameters we adjust to affect the control of the system.
00:48 Tuning a PID control system can be challenging, as you can't hope to apply the same PID numbers to every situation.
00:57 The ability of the ECU to control a particular output will depend on what we're trying to control.
01:04 For example, if we consider a variable cam control system.
01:08 We have a system that can respond very rapidly to the ECU's commands.
01:14 We also want the cam position to track our target very accurately, so our accepted tolerance will be very small, perhaps only a half degree or less.
01:25 On the other hand, if we consider idle speed control we have a system that will respond much slower to changes.
01:33 We also probably aren't so worried about pinpoint accuracy and an error of 20 to 50 RPM might be completely acceptable in our overall strategy.
01:44 For these reasons, we need to tune the PID control to suit each specific application, but to do that we need to understand how the control algorithm works and we need and approach to follow, in order to tune the system and achieve fast, accurate and stable control.
02:04 One of the concepts I've just brought up warrants a little more explanation, before we move on.
02:09 A PID control system will often include a deadband, which is a narrow band above and below the set point that the system will consider to be on target.
02:20 When the measured value is within this deadband, the ECU will stop trying to drive the system towards the target.
02:27 This deadband will depend on the particular system we're controlling.
02:32 For example, a drive-by-wire throttle may require a deadband of 0.1% or less.
02:39 When it comes to idle speed, as I've mentioned already, a deadband of 20 to 50 RPM maybe just fine.
02:47 Before we get to far ahead of ourselves, though, let's move on and examine the individual components of the PID control system.
02:55 These components are the proportional gain or P, the integral gain or I, and the derivative gain or D.
03:05 I'm going to explain how each of these components affects the control of the system, but I also know that PID is a complex topic and many struggle to understand it, particularly since it involves maths.
03:19 To keep it simple and easy to understand, I'm going to use an analogy that I've borrowed from Mark McCoy at MoTeC Australia.
03:27 Of the descriptions I've read or heard of, relating to PID control, his explanation is the easiest to understand, so I credit him with this work.
03:37 Before we get to that though, let's look at each component individually.
03:42 Starting with the proportional gain or P component, this gain provides a correction proportional to the size of the error.
03:52 This component provides an immediate response to an error and is responsible for the response of the system.
04:00 Proportional gain on its own, will never be able to reduce the error in a system to zero, though, since as the error reduces, the proportional response is also reduced.
04:13 A small value for proportional gain will only result in a small reduction in the error and the system will never reach the target and will also respond slowly to changes.
04:25 If on the other hand, the proportional gain is large, the system will respond quickly to an error, but will tend to overshoot the target and become unstable, resulting in the measured value oscillating above and below the target.
04:41 The integral gain or I component is a slower moving component that works to reduce the error to zero over time.
04:49 The result of a control system using just proportional or proportional and derivative gains on their own, can never achieve an error of zero, because as the error is reduced the effect of the proportional and derivative components is also reduced.
05:07 The integral gain works to eliminate this remaining error, and can move the system towards the target.
05:14 Basically, any time the error is not zero the integral component will continue to increase.
05:21 One problem that can arise with integral gain is an aspect known as integral windup, which occurs when the system can't reach the target.
05:32 A common example of this would be trying to target a cam position that the system can't reach, due to reaching the mechanical limit of the cam's rotation.
05:42 In this case, there will always be an error and the integral component will continually increase, and this is integral windup.
05:50 When we next target an achievable cam position, the large integral component can cause the response to be slow or laggy, while the integral gain slowly reverses.
06:02 The derivative gain or D is the last component, and this changes in relation to the rate of change of the error.
06:11 This works as a dampening component and, when combined with the proportional gain, can improve the response of the system.
06:20 Since the derivative gain is dependent on the rate of change of error, it's effect is greatest when there is a sudden change.
06:29 So that covers the three components of a PID control algorithm.
06:33 However, there is one more parameter that is important for good control.
06:38 Depending on the system you're tuning, this may be called: base duty, base position, average position, feed-forward or linearization.
06:48 However, for simplicity we'll use the term base duty cycle from now on to cover these terms.
06:55 Basically, this is a parameter or table of parameters that provides a starting point for the particular output to get it close to the target before any close-loop control is used.
07:09 Going back to our boost control example.
07:11 To achieve a certain target boost level, the boost control solenoid will need to output a specific duty cycle, and this is the value that would be entered into the base duty cycle table.
07:24 Properly tuning the base duty cycle table is critical in getting good, stable control in any PID control system, as we'll see.
07:35 It's also worth discussing what the ECU does with the individual components in order to control the system.
07:43 With a PID control algorithm each component or gain is constantly being calculated inside the ECU.
07:51 The result or duty cycle that will be applied to the output at any time, is the sum of all these components.
08:00 Some ECUs will give you the ability to actually log the individual components, so you can see how the system is responding at any time, and this can be helpful in tuning the PID gains.
08:12 If this module has managed to confuse you, don't worry just yet.
08:17 We needed to discuss the components first and explain what they mean, before we could move on.
08:23 In the next module, I'll cover a practical analogy that will put the PID components into perspective and let you understand how they interact.