Author Topic: VEMS new boost control guide.  (Read 53553 times)

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
VEMS new boost control guide.
« on: June 23, 2013, 09:20:30 pm »
So this is a test write up so bare with me.
Specific solenoid operational information at the bottom.


The new system is based solely on targeting and reaching the target. There are a number of sensors that can alter the target. This allows boost changes based on throttle position, 0-5v input sensor position, exhaust gas temp, intake air temp and optionally gear. To begin with all these options should just be disabled so that the baseline can be set without fuss.

After the system has figured out a target to reach the appropriate duty cycle must be determined. In this case the baseline duty cycle comes from a table, so that with altering engine speed and boost target the baseline automatically changes to accomodate the altering requirements for the boost solenoid.

In this write-up I´ll be using these variables below and boost table, however the table is just an example and for clarity at the end I post a suggested starting point table.

To enable the new boost control you must enable the actual output and configure the main Boost control options in a specific way as below.



What you see above is
Output Channel :
The physical output pin selected.
Boost PID Channel refers to the channel group where the output is
Channel refers to the actual pin involved
This is best selected in the outputs menu (Outputs - Assign Output Channels) as it lists actual pin numbers.

Settings:
PWM Period : the frequency of your solenoid , 21Hz is a fine start

Reducing boost refDC when over MAT/EGT Limits : the output duty cycle would be lowered if you pass your set limits , 2%/°C for MAT, now sure on EGT. Leave disabled for now

Speed dependent : only available with the old boost control, boost duty cycle is controlled by road speed

Gear dependent : Only displays how many rows you have to use, 1 gear means no individual gears possible, only single rpm row for targeting, if Gear or Speed dependent is set to Gear this says 6 gears and is always greyed out.

Gear or Speed dependent : No dependent means that you will use a single curve for main boost targeting, Speed doesn´t work in this situation, Gear means that you will fill in a table with 6 rows , one for each gear possible. Leave it at No Dependent for now.

Boost valve OFF below this pressure : this means that the solenoid won´t be outputting any duty cycle below this value, I keep it just above 100kpa so that it´s not buzzing while the engine is off. Disregard my image saying 80kpa I was bench testing, set it to 105kpa.

PID Settings:
The new system doesn´t operate a simple PID loop on top of the baseline duty cycle table, it allows you to turn on and off individual aspects of the closed loop functions to better maintain smooth operations and remove all erratic behaviour.

Apply max DC until : You can force the output to Boost pwm maximum value when you are still this far away from the target, the close you get the more likely you are to overshoot your target. So start off with a long range and shorten and test. Start with 90kpa in this case.

PD control (far from target) : When MAP is within this value of Boost Target then the P value and D value become active in where the P value will increase the output duty cycle and the D will lower it if the rate of change of the MAP is high to avoid overshooting.

PI control (close to target) : When MAP is within this value of Boost target then P and I value are active and D is disabled. The P still maintains it´s function as before applying instant correction to the baseline duty cycle based on the amount of error. The I will accumulate dutycycle based on the amount of error at any given time. Simply put since the P doesn´t get you to the target the I will increase and increase continously, and since the error will lower each time the accumulation will also decrease.

PID overlap range: When MAP is within this value D is enabled again. So far I don´t know what the option "forever" means, I´ll update when I do.

These values will work nicely,


Before going further, here are some good PID links for reference.
http://en.wikipedia.org/wiki/Duty_cycle
http://www.csimn.com/CSI_pages/PIDforDummies.html



Boost P: This is the proportional addition of dutycycle to the baseline and is instantly added.
Boost I : This is the integral addition of duty cycle to the baseline and is constantly being updated based on the amount of error. Since understanding the I is very important here is an example.

If base dutycycle is 50% and P has added 5% and the total is 55% and the error is 20kpa. And I_DC% is currently 0% so the total is 55% still. The function will calculate a % value that will be added to I_DC% and then applied. Lets say it´s 1%. Now the total is 56% and lets imagine that the error changed to 15kpa (boost target 200kpa, MAP 185kpa). Now P will actually decrease as it is related to the amount of error (Since 20kpa resulted in 5%, 15kpa will result in 3.75%) so with old I_DC% and current baseline + P _DC% you get

old_I_DC% = 1%
P_DC% = 3.75%
Baseline = 50%
Total = 54.7%

Since the error is now 15kpa the I will calculate an additional 0.75% to be applied and you get

I_DC% = old_I_DC% + addition , 1+0.75= 1.75%
P_DC% = 3.75%
Baseline = 50%
Total = 55.5%

Now your error is 10kpa

P_DC% = 2.5%
I_old_DC% = 1.75%
Baseline = 50%
added I = 0.5%
Total = 54.75%

Now if we imagine that you stayed at 10kpa error, the I will simply add on another 0.5% every time for every 10kpa, and thus overtime the error WILL decrease until the I stops adding and the P becomes 0. This is why the I is so important for boost control. Same applies if you overboost. the I will decrease and decrease to lower your MAP until you reach the target

Boost D : The output of the D will be based on the rate of change of the error each time. The higher the value the more the D will work against fast spooling, however lower D will not be able to counter overshooting the target.

Boostcontrol PID integral limit : This controls how much adding or removing the I can do to reach the target, if you have to high of a value the I could wind on until you have 100% or 0%.

Boost target: Selects to either have the target as Gauge pressure or absolute pressure , gauge being pressure above atmospheric and absolute being total pressure above 0. I stick to MAP as I can more easily review MAP values against MAP targets in the log.

Reference lookup : To use the new boost setup set it to Boost Target based.

Boost pwm maximum value : This is the maximum allowed duty cycle for the solenoid. Normal is 100%
Boost pwm minimum value: This is the lowest allowed duty cycle for the solenoid. Normal is 0%

With these settings set you now need to set your actual target. I will assume that you want multiple targets , either via TPS or 0-5v input control.

Boost vs TPS curve: These values multiply against the main boost target curve Boost control - Boost vs RPM curve. So if you want less boost at less throttle angles you can simply put in less then 100% values at the appropriate point, make sure you understand you´ll never reach less then your base wastegate pressure.

Boost control - Boost vs RPM curve : This is your target to reach for each rpm point. In this case we will assume you want to reach 14.5psi boost or 100kpa boost or 200kpa MAP. So fill in the kpa value for MAP, i.e 200 in all cells. This for now completes your targeting setup.

Boost refDC vs Boost Target : This table and Boost control - Boost vs RPM curve will be your main adjustments from now on.



The table above is an example but if this was a perfect table you would need no PID closed loop to help you reach your target.
What that means is that to reach 200kpa at 4500rpm the solenoid would be set to 60% and hocus pocus you are riding along at 200kpa. Now as you get closer to 5000rpm and to maintain 200kpa MAP your solenoid will be reduced to 59% and so on.

Say you have your TPS at a point which demands 90% of the target from the main target curve. It being 200kpa will result in 180kpa target. So again hocus pocus the solenoid is set to 53% and your get 180kpa and 4500rpm, it will with increasing rpm lower the Dutycycle to maintain the 180kpa target.

Now to begin with we have no real idea of what values should be in there. So we must perform a serious of experiments, that means doing logs and pulls. There are two ways of doing the experiments.

1. Finding the resultant MAP at various engine speeds using a number of fixed DC% values. By changing the max and min pwm values to the same value you have FIXED the output, log runs at 20%,30%,40% and so on until you reach your maximum desired boost level. You might be reaching areas that have not been tuned yet so tune the AFR and Ignition as well (multitasking at it´s best). When you fix the DC% like this the closed loop or targeting is technically cancelled out so will have no effect on the output DC%.
When you have done enough logging you will need to review each pull and find the Boost DC for a given engine speed and MAP value. This is best done with Log Viewer (Shift + 8).

Lets say you reached 200kpa@3000rmp@50% DC% then simply put in 50% in that cell in the table. Rinse and repeat through the logging and populate the table, remember that higher boost target = higher DC so you can roughly populate it with only a handfull of known numbers. Remember to interpolate between known cells in the table.

This may sound like a long process but give it an hour and you should be done.


2. By allowing closed loop operation you simply go into your
Boost control - Boost vs RPM curve table and alter the target.
Start by setting it to the wastegate pressure and then do a pull, raise it by 20kpa and repeat until you reach your maximum boost level. By reviewing the logs you can see what DC% the ecu applied at any given boost and engine speed. Then simply take that number and put it in the Boost refDC vs Boost Target table. If you see that you didn´t reach your target apply slighly MORE DC% baseline then what VEMS was trying. The closed loop will the eventually find the required DC% and you can input that into the table.
Repeat until you reach all your targets.


From here re-enable your max/min pwm values back to 0 and 100% and then whatever target you have in your main target table should results in hitting the target well. You can now add a 0-5v input for more boost control or get a road speed sensor to enable boost by gear. The closed loop will take care of the rest.

For improved results you can review your closed loop operations and resultant DC% and update the DCref Table.

What you need to log and review is

MAP
RPM
Boost Target
Boost DC

Boost solenoid operations.

Boost solenoids adjust the effective air springs in wastegates.

Single port internal actuator wastegate :
The solenoid is connected so that it can bleed off pressure from the actuator. This results in higher boost. The solenoid does not bleed pressure from the feed line, but actually stops the feed line and releases from the wastegate line. When pulsed this seemlessly causes an alternate pressure in the wastegate line then the boost line.

External two port wastegate :
With a constant pressure line to the bottom of the wastegate you are now effectively controlling bleed of pressure to the top of the wastegate. More DC% means that the pressure in the top chamber becomes more. Resulting in a stiffer total spring applying pressure to the valve to remain closed. Higher backpressure counters this effect.



Everybody should start with this table


Then log and adjust asd required.
Note : If you are not seeing any change in boost pressure with altering , DC% , check that your solenoid is actually working (apply 50% max and min, and 0kpa in the solenoid OFF below this pressure) and check for ticking from the solenoid. Make sure the Boost DC is actually 50% before listening.

If that works then make sure you have put all the vacuum lines in the right places (I have seen people put boost lines ONLY to the TOP CHAMBER and where wierded out by the fact they would overboost NON STOP).

If it didn´t work , make sure the right output pin is selected and it´s functioning. ideally use a ignition or injection output. as a last option use a stepper motor output (S259). Remember the stepper output is the 12v+, so the other side of the solenoid must be the grounded side.

For ignition and injection outputs the ground comes from the ECU and 12v must be feed to the solenoid from elsewhere (BMW RED/WHITE works nicely).

Any questions ???


Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: VEMS new boost control guide.
« Reply #1 on: June 23, 2013, 09:38:15 pm »
I forgot to add some more stuff.
Examples of results.

Here you can see the potential results using the boost target setup without any closed loop if the target reference table is properly set up.




Here is an example I created to explain how the closed loop is actually behaving.


I set the enabled lines to various values so you could actually seem them.
These are all based on the settings from the previous post.

Walk through

2500rpm.
Here we are more then 90kpa away from the target so MAX DC is enabled and BoostDutyCycle is thus 100%.

3000rpm. We are now less then 90kpa away from target and MAX DC is disabled as can be seen in the BoostDutyCycle trace.

3100rpm . PD is enabled and  you can see the bump in DC% which is a combination of the P_DC% and DCRefvalue

3300rpm . PI is enabled, you can see the spike in I_DC% and maintainance of higher DC%.

3500rpm . PID is enabled, you can now see that we are very close to the target and P and I remain low. P being on the left hand axis and I the right hand axis.

And as the rpms rise there is less requirement for DC% as gotten from the main table so you can see DC% and DCRefvalue lowering with rpm to maintain the boost pressure.

Offline BigD

  • Full Member
  • ***
  • Posts: 111
  • BHP: 6
Re: VEMS new boost control guide.
« Reply #2 on: June 24, 2013, 03:25:40 pm »
Thanks dude!!! A lot to digest but I'm looking forward to trying it!

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: VEMS new boost control guide.
« Reply #3 on: June 26, 2013, 05:31:36 pm »
Thanks Gunni for your explanation.

I finally came to understand that DC does not mean "Direct Current" but "Duty Cycle" ;D and that the table "Boost refDC vs Boost Target" is to set the expected/openloop /feedforward  control as a percentage of pwm duty cycle at any target points (boost,rpm). So everything clears off  :)

To use my own notation (so many already), if one calls the above action:
- cntrl_refDC(boost,rpm), boost and rpm being the instant pressure and rpm, and if
- boostTarget(rpm,tps) is the pressure target which depends on rpm and tps, and
- cntrl_PID(boostTarget-boost) the PID action as a percentage of duty cycle
the total action which commands the percentage of duty cycle of the valve is:
  cntrl = cntrl_refDC + cntr_PID.
which is standard.

As you have explained, at the Target, which is an equilibrium stat,
 cntr= cntrl_refDC + k
k being the value of the integral term which has summed up, and which compensates for a possible error on the guessed cntrl_refDC.

Of course things are a little more complicated since a) the Target should be sliding following any rpm or tps change in a stable way, b) the Target as to be reached nicely with not too much overlap and minimum bursts for the turbos.

I agree the most important and first thing to do is to set the table "Boost refDC vs Boost Target". I have not done it yet, but probably I would follow the 1) procedure that you have given (the bleeding valve eg. open loop).
Step 2 for me would be to set a P (far from the target) + PI controller (close to the target), with the maxDC parameter off, as you said, and D action off.





Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: VEMS new boost control guide.
« Reply #4 on: June 26, 2013, 06:54:19 pm »
fphil :

You are of course correct. The principal item to do is create as good as possible Boost refDC vs Boost Target.
After this you are essentially 98% there in terms of running any boost your solenoid and wastegate combo is capable of in any scenario aside from boost threshold not being reached yet.

The rest really is very easy with the variables I put in there.


Offline BigD

  • Full Member
  • ***
  • Posts: 111
  • BHP: 6
Re: VEMS new boost control guide.
« Reply #5 on: June 30, 2013, 01:10:22 am »
What version of VEMS Tune and FW are you running? I have the latest I could find VT March 26, and 1.2.11 and I don't see some of those settings in your screenshot - one of them being something I've been waiting for a while - max DC until

Sorry, dumb question... you covered it in reference lookup
« Last Edit: June 30, 2013, 01:13:59 am by BigD »

Offline z0tya

  • Sr. Member
  • ****
  • Posts: 252
  • BHP: 11
Re: VEMS new boost control guide.
« Reply #6 on: June 30, 2013, 07:13:44 am »
What version of VEMS Tune and FW are you running? I have the latest I could find VT March 26, and 1.2.11 and I don't see some of those settings in your screenshot - one of them being something I've been waiting for a while - max DC until

Sorry, dumb question... you covered it in reference lookup

Switch reference lookup to boost target base.

Offline james

  • Jr. Member
  • **
  • Posts: 18
  • BHP: 0
Re: VEMS new boost control guide.
« Reply #7 on: June 30, 2013, 11:36:55 pm »
Hi I'm a completed vems novice really but I'm trying to follow gunni's guide but I also have a extra setting TPS weight ref dc: anyone got and ideas why I have that ? Although I don't acyuly have it on the ecu I'm just using config files

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: VEMS new boost control guide.
« Reply #8 on: July 01, 2013, 09:50:27 pm »
Set everything up exactly as in the post and the TPS weight goes away as it´s a reference for the old boost control. Also use the latest firmware version available.

Offline james

  • Jr. Member
  • **
  • Posts: 18
  • BHP: 0
Re: VEMS new boost control guide.
« Reply #9 on: July 09, 2013, 12:35:29 am »
Please correct me if I am wrong, as I have a 1bar spring in my waste gate as it is I would need to set all my boost targets to 200 kpa and above, and I would only require to find boost dc% for 200map and above?

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: VEMS new boost control guide.
« Reply #10 on: July 10, 2013, 04:09:29 pm »
The entries for the tables called the items  "Boost versus rpm"  and "Boost  refFC vs Boost target"  from the menu "Boost control" are (Pressure kPa, Engine speed RPM). This pressure is the absolute pressure, not the boost above atmosphere.
At least this what I have understood, I knos this is not obvious this the titles of the table change when they open.
I guess that your spring is there to let open the waste gate when the difference of pressure of the 2 chambers of the gate is 100 kPa, 1bar, hence the absolute pressure of the controlled chamber should be 200 kPa, 2bar.

Offline james

  • Jr. Member
  • **
  • Posts: 18
  • BHP: 0
Re: VEMS new boost control guide.
« Reply #11 on: July 10, 2013, 05:21:27 pm »
i think I have the set up right now but im worried about how I find out the DC% for the ref table, as my boost solenoid is a constantly open solenoid and I have a 1 bar spring in my waste gate wont I over boost every time when im logging pulls to populate the ref table?

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: VEMS new boost control guide.
« Reply #12 on: July 10, 2013, 08:07:46 pm »
what do you mean by constantly open? what exactly is constantly open

Offline james

  • Jr. Member
  • **
  • Posts: 18
  • BHP: 0
Re: VEMS new boost control guide.
« Reply #13 on: July 10, 2013, 08:57:00 pm »
Sorry I should of been clearer, I mean my solenoid is in the open position when it is off ie the boost pressure gets straight trough to the top chamber of the wastegate when it's not powered up.will this affect how it works?

When setting the pwm max and min to same figure say 20% for setting up the DC%, will this stop the pressure to the top chamber of the wastegate? if not would this mean even pressure on the wastegate and it won't open? At a 1 bar


Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: VEMS new boost control guide.
« Reply #14 on: July 10, 2013, 10:42:56 pm »
You should need set your solenoids piping up like that.

when it´s off there should be NO pressure going to the top chamber , only to the bottom chamber.

When connected correctly more DC% will mean more pressure to the top chamber which will raise the boost.