diff --git a/docs/06-Basic-Features/Boost-Control.md b/docs/06-Basic-Features/Boost-Control.md index c8a6bdd..02a6229 100644 --- a/docs/06-Basic-Features/Boost-Control.md +++ b/docs/06-Basic-Features/Boost-Control.md @@ -24,7 +24,7 @@ An electric wastegate actuator replaces a conventional spring based wastegate wi ## Open Loop Boost Control -Open loop boost control is the simplest form of electronic boost control where the boost control solenoid is assigned a specific duty cycle based on the engine RPM and throttle pedal position. With open loop control, you need to guess what duty cycle will correspond with your desired boost pressure and work from there. An example of on open loop boost control table is shown below. +Open loop boost control is the simplest form of electronic boost control where the boost control solenoid is assigned a specific duty cycle based on the engine RPM and throttle pedal position. With open loop control, you need to guess what duty cycle will correspond with your desired boost pressure and work from there. An example of an open loop boost control table is shown below. ![image](Boost-Control/olboost.png) @@ -50,10 +50,30 @@ Before you start tuning the boost, consider what you are looking for the boost c ## Closed Loop Boost Control -Closed loop boost control builds on the open loop boost controller and actively adjusts the solenoid duty cycle to reach the specified target pressure. The controller starts at the specified duty cycle in a given cell in the open loop table and adds or subtracts to that value until the target pressure is reached. The closed loop boost controller uses a PID controller to adjust the duty cycle. A PID controller works by measuring the error between the measured boost and the desired boost and calculating values for the P, I and D terms based off of the error. These terms are then added togethor to form the calculated duty cycle which the controller will measure the boost pressure response to and will continually adjust its calculated duty cycle until the target pressure is achieved. +Closed loop boost control builds on the open loop boost controller and actively adjusts the solenoid duty cycle to reach the specified target pressure. The controller starts at the specified duty cycle in a given cell in the open loop table and adds or subtracts to that value until the target pressure is reached. The closed loop boost controller uses a PID controller to adjust the duty cycle. A PID controller works by measuring the error between the measured boost and the desired boost and calculating values for the P, I and D terms based off of the error. These terms are then added together to form the calculated duty cycle which the controller will measure the boost pressure response to and will continually adjust its calculated duty cycle until the target pressure is achieved. -The P-term multiplies the duty cycle per kPa of error. For example, if P is set to 0.2 and there is a 20kPa error, it will add a value of `0.2 * 20 = 4%` to the duty cycle. +![image](Boost-Control/boostControlPidSettings.png) -The I-term multiplies the duty cycle by the kPa of error and the seconds that there is error. For example, if I is 0.1 and there is 10kPa of error for 2 seconds, it will add a value of `0.1 * 10 * 2 = 2%` to the duty cycle. +### P-Term -The D-term multiplies the duty cycle by the kPa of error per second (or rate of change of kPa). For example, if D is 0.2 and the boost is rising at 10kPa per second, a value of `0.2 * 10 = 5%` would be subtracted to the duty cycle to slow the rate of approach to the target. +The P-term is calculated by multiplying the error in kPa times the Proportional gain (_P Gain_) value to generate an instantaneous output. + +For example, if _P Gain_ is set to 0.2 and there is a 20kPa error, it will add a value of `0.2 * 20 = 4%` to the duty cycle. + +### I-Term + +The I-term is calculated by multiplying the error in kPa times the seconds that there is error times the Integral gain (_I Gain_) value, then adding the result to the existing I-term value for the final output. + +For example, if _I Gain_ is set to 0.1 and there is 10kPa of error for 2 seconds, it will add a value of `0.1 * 10 * 2 = 2%` to the duty cycle over that time period. As long as the error is present the I-term will continue to increase. Using the last example, after 4 seconds the I-term will be adding 4% to the duty cycle provided the error is still 10 kPa. + +### D-Term + +The D-term is calculated by multiplying the change in error in kPa per second (or rate of change in kPa per second) times the Derivative gain (_D Gain_) value to generate an instantaneous output. + +For example, if _D Gain_ is set to 0.2 and the boost is rising at 10kPa per second, a value of `0.2 * 10 = 5%` would be subtracted from the duty cycle to slow the rate of approach to the target. + +### Min adjustment, Max adjustment + +The _min adjustment_ and _max adjustment_ settings define the maximum duty cycle that can be subtracted from or added to the boost control open loop position. + +Once the P, I and D terms are added together, the PID controller output is limited by the _min adjustment_ and _max adjustment_ values and then added to the boost control open loop value for the final output. For example, if _max adjustment_ is set to 20, even with a very high gain or a very large error the maximum final duty cycle will be whatever is in the open loop table + 20%. diff --git a/docs/06-Basic-Features/Boost-Control/boostControlPidSettings.png b/docs/06-Basic-Features/Boost-Control/boostControlPidSettings.png new file mode 100644 index 0000000..b501a55 Binary files /dev/null and b/docs/06-Basic-Features/Boost-Control/boostControlPidSettings.png differ