StrikeEngine

Videos – Parts – Information – Directory – Insurance

PID Tuning Beginners Guide – Boost Control

This article is going to explain PID tuning in the most basic terms. What do the terms mean, what do they do and how do we use them. We are going to use boost control on a turbocharged engine as the example in this PID tuning guide. Motec have done an excellent video on PID tuning and it can be found here


PID Tuning – The short version

The “P” determines how fast we try to reach our target.

The “D” limits how fast that speed (rate of change) can be. The closer to the target the more the rate of change is limited.

The “I” increases the speed of change if it is taking too long to reach our target.


Open Loop Boost Boost Control

We set the boost control valve duty cycle against RPM. The duty cycle is what will give us our desired boost at each RPM.

Differing environmental conditions will not give us the same boost for the same duty cycle.

The closer we can get our duty cycle numbers to produce the boost we want the easier and faster it will be to set up our PID values.

Closed Loop Boost Control

To achieve the same boost at the same RPM regardless of environment factors we need a feedback mechanism so the duty cycle can be increased or decreased to achieve our desired boost pressure. And this is where PID tuning comes in.

PID tuning can give our electronic boost controller a feel for how to control the boost or to put it another way, it gives our electronic boost controller three methods used in order to achieve our desired boost.


PID Tuning

Proportional Gain

This is the number we use to multiply our difference by. For example, if our actual boost pressure is 7 PSI and we want to achieve 14 PSI, the difference between the target and actual boost is 7 PSI. If we choose 10 for our proportional gain, the duty cycle will be current difference (7psi) multiplied by 10. 7×10 = 70 = a 70% increase in our real time duty cycle.

If the difference is 2 PSI with 10 as our proportional gain 2×10 = 20 = 20% increase in our real time duty cycle.

As we get closer to our target (as the difference between the target and our actual decreases) the effect of the proportional gain will be decreasing. ie we will be adding a smaller and smaller number to our current duty cycle.

If we set our proportional gain too low we may never reach our target boost pressure, if we set out proportional gain too high we will be overshooting and undershooting our target.

Tuning Proportional Gain

Start with a small number and build up. The goal is to get a good response ie getting to our target quickly but not overshooting by too much. A couple of small hunts should be okay. When we have achieved that we can move on to the derivative.

Derivative Gain

If we were using too large a number for our proportional gain, we could end up in a position where we are overshooting and undershooting our boost target constantly.

The derivative gain can damp this motion so the overshoots and undershoots are smaller. If for example the rate of change of the duty cycle was 10% per second solely using the proportional gain, if our derivative gain was 0.5, the rate of change of the frequency our duty cycle would be 5% per second.

If the rate of change of the frequency was 50% per second using proportional gain only, with a 0.5 derivative the rate of change would be 25% per second.

If we set the derivative gain too high, for example as 1, it would make no difference to the rate of change ie it would do nothing. If we set the value too small we will be too slow to reach our target and maybe do not reach our target at all.

As the target gets closer the derivative gain has the effect of limiting the rate of change more and more.

Derivative Tuning

When we have set our proportional so we only get a few hunts before stability, we can starting adding in some derivative, starting low and gradually increasing. The derivative will have the effect of damping the hunting. This will get us to the target faster and reducing hunting.

Integral Gain

The longer it takes to reach the boost target our integral gain is added to our current duty cycle. For example if we still hadn’t reached out boost target after one second 2% could be added to our current duty cycle (and it would do that every second until the target is met). In this case the integral would be “2”. If the integral was “5”, 5% would be added.

Feed Forward

A term used by Motec. It’s basically our open loop settings detailed above. We set the duty cycle that we know will get us very close to out boost target. The more accurate the “Feed Forward”/Open Loop numbers are, the less work we have to do with PID tuning.

Integral Clamp/Integral Windup

If for any reason there was a long period before we reached our boost target, there is potential for the integral to become a huge number (integral windup). If/when the thing stopping us from achieving our boost target is removed we could get a massive addition to our duty cycle (spike in boost) which has nothing to do with the current operating conditions. To stop this from happening we can set a limit on how big the integral number can get.

Integral Tuning

If the derivative is set and the hunts have been limited but it is still taking a bit longer than we would like for the target to be finally reached, we can start adding some integral.

Deadband

We can set an acceptable range for our boost target. For example if we are within 1 PSI of our boost target, we stop altering the duty cycle with PID tuning.

Feedback/Max Min Duty Cycles

Limit the amount the PID can alter the numbers away from the numbers set in the open loop table. If something is wrong or if we have messed up our PID values, limiting the deviation from the open loop map will limit the damage.

Set the minimum & maximum duty cycle that is acceptable. The PID won’t increase the duty higher than 85% or less than 15% for example. If the duty cycle is outside the bounds we stop using the PID calculations.


A great video from Motec explaining the basics of PID tuning

Find performance parts on ebay




This page was last modified Mar 21, 2023 @ 7:20 pm

StrikeEngine TV Highlights

Comments:

Your email address will not be published. Required fields are marked *

seventeen + seven =

Get our news in your inbox - Subscribe

* indicates required