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

Ends in --- --- ---

Variable Cam Control Tuning: How to Tune a PID Control System

Watch This Course

$149 USD

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

How to Tune a PID Control System


00:00 - By now you should have a basic understanding of the theory behind PID control so let's take a look at how we can go about tuning a PID control system.
00:08 PID control is a well established strategy used in many forms of industry and as such there's actually a mathematical method for calculating the required gains called the Ziegler-Nichols method.
00:20 In my own experience, this isn't a method that's used for tuning PID control in the tuning industry and as such we won't be dealing with it further.
00:29 If you do want to research this method there are a number of resources available on the Ziegler-Nichols method on the internet.
00:37 In the tuning industry, the technique we use to calibrate PID control is the trial and error approach which I'll explain in this module.
00:45 Before we move on, I want to discuss some limitations of a closed loop control system.
00:49 It's important to understand that the result of any closed loop control system will only be as good as the physical system that we're trying to control.
00:57 If there are inherent problems then there's only so much the PID control system can do to fix this.
01:04 An example of this might be a variable cam control system where the oil pressure is insufficient or the oil viscosity is too thick to establish good control.
01:13 In these situations the result you'll get is going to be flawed and you can end up wasting a lot of time and energy trying to fix the mechanical systems problems with your PID control which often may prove impossible.
01:26 The PID control along can't perform miracles here and is only as good as the base mechanical system.
01:33 With this in mind, the first part of tuning a PID control system is to establish effective open loop control with the PID components all set to zero.
01:43 For example in a boost control system, this would entail tuning the base duty cycle tablet to achieve stable boost control that's close to your target boost.
01:52 This is going to do 2 things, firstly it'll prove that the system is mechanically sound and that it's possible to achieve stable control in the first place.
02:02 Secondly it'll give the closed loop system a place to start from meaning that it has less work to do.
02:09 In the case of cam control as we've already mentioned, there isn't a direct correlation between actuator duty cycle and a specific cam position and that base duty cycle value is selected in order to maintain a relatively steady cam position.
02:23 Interestingly this isn't a setting available in every ECU so you may not have the option to influence this.
02:31 Once we have the base duty set where applicable we can start adding our PID components.
02:36 As described in the last module we should start by adding a small amount of proportional gain and then test the results.
02:42 This begs the question, how much exactly is a small amount? This gets tricky since there are vast differences between the way various ECUs deal with the implementation of PID control.
02:54 To put this in perspective, one brand of ECU may require numbers in the region of 5-15 for effective control while another may be in the region of 500-1500.
03:06 The base maps from your ECU supplier should guide you on the expected range of values that will work for that system but what I recommend doing is testing the control system to find what sort of values lead to the system becoming unstable and oscillating.
03:21 Once you know this range you'll have a better understanding of where your gain needs to be set.
03:26 When adjusting any of the gains, I recommend initially making changes by doubling the value.
03:31 This should show a significant effect that will let you quickly assess the effect of that change.
03:37 Once you go too far and the system becomes unstable, you can then easily come back to a usable value by halving your gain again.
03:44 This is a coarse way of finding the sort of values that will work for your system and you can then fine tune and refine the values as you go.
03:53 Once we have the proportional gain close, we can add a small amount of derivative gain and then finally a small amount of integral gain.
04:00 At each stage you can compare your results to the graphs we looked at in the last module before deciding on your next change.
04:07 Once the system is stable and tracking your target position accurately, we can test the system's response by requesting a change in target and watching how well the system tracks.
04:18 For example we could hold the engine on the dyno in steady state and request a change of cam position.
04:23 It's all about requesting a change in target position and then watching how well the system responds to meet the new aim value.
04:30 Again we can compare the response to the diagrams shown in the last module to decide what change to make next.
04:37 Setting up any PID control system relies heavily on data logging to evaluate how well the system is tracking your target as well as validating the effect of changes you made to the P, I and D components.
04:49 To do this, you'll be constantly reviewing the performance of the system using the logging features of your ECU.