VEMS Community Forum

VEMS => Calibration & Mapping => Topic started by: gunni on June 23, 2013, 09:20:30 PM

Title: VEMS new boost control guide.
Post by: gunni 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,
(http://www.vems.hu/files/BoostControl/BoostSettings.jpg)

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.

(http://www.vems.hu/files/BoostControl/ExampleTable.jpg)

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
(http://www.vems.hu/files/BoostControl/ExampleTable.jpg)

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 ???

Title: Re: VEMS new boost control guide.
Post by: gunni 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.

(http://www.vems.hu/files/BoostControl/BaseRefOnly.jpg)


Here is an example I created to explain how the closed loop is actually behaving.
(http://www.vems.hu/files/BoostControl/CurvesExample.jpg)

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.
Title: Re: VEMS new boost control guide.
Post by: BigD on June 24, 2013, 03:25:40 PM
Thanks dude!!! A lot to digest but I'm looking forward to trying it!
Title: Re: VEMS new boost control guide.
Post by: fphil 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.




Title: Re: VEMS new boost control guide.
Post by: gunni 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.

Title: Re: VEMS new boost control guide.
Post by: BigD 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
Title: Re: VEMS new boost control guide.
Post by: z0tya on June 30, 2013, 07:13:44 AM
Quote from: BigD 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

Switch reference lookup to boost target base.
Title: Re: VEMS new boost control guide.
Post by: james 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
Title: Re: VEMS new boost control guide.
Post by: gunni 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.
Title: Re: VEMS new boost control guide.
Post by: james 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?
Title: Re: VEMS new boost control guide.
Post by: fphil 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.
Title: Re: VEMS new boost control guide.
Post by: james 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?
Title: Re: VEMS new boost control guide.
Post by: gunni on July 10, 2013, 08:07:46 PM
what do you mean by constantly open? what exactly is constantly open
Title: Re: VEMS new boost control guide.
Post by: james 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

Title: Re: VEMS new boost control guide.
Post by: gunni 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.

Title: Re: VEMS new boost control guide.
Post by: james on July 11, 2013, 08:42:56 AM
I understand I will alter the piping to my solenoid,

as I have a 1 bar spring in my waste gate which way of the two you recommended for finding the duty cycle% would you use? Would they both still work As obviously below 1bar the duty cycle will have no effect on boost?

Thanks for you advice
Title: Re: VEMS new boost control guide.
Post by: james on July 25, 2013, 10:38:36 PM
anyone tried this yet? im having trouble finding the correct duty cycles what gear are you meant to do pulls in? I have been doing them in 2nd the find it overshooting the target massively in 3rd gear :'(
Title: Re: VEMS new boost control guide.
Post by: fphil on August 07, 2015, 01:57:50 PM
I read and reread, the documentation and Gunni's guide and I feel stupid not to underdand why the Boost PE value is so crazy and negative.

I shall be thankful if someone can explain that to me

(http://i18.servimg.com/u/f18/15/63/46/75/pe110.jpg)

(http://i18.servimg.com/u/f18/15/63/46/75/pe210.jpg)
Title: Re: VEMS new boost control guide.
Post by: VEMS on August 07, 2015, 02:32:19 PM
Hello Philippe,

Simple answer: Boost PE is calculated by VemsTune and VT calc model is not up to date for the new boost control. Reported boost integral should be good this is a real-time variable.

Best regards, Dave

Title: Re: VEMS new boost control guide.
Post by: fphil on October 27, 2015, 09:14:24 AM
Does someone knows when the Boost Integral value reset to zero?
In my case never once the boost integral action is used for some values. This is even when returning to idle.
So when entering the PI domain for a new time the I value is not zero but has  some value which was reached in a former action. Is it planned so?

btw speaking about possible or not planned property , I noticed that when RPM < IACTargetRPM  the IdleIgnitionControl is active even when TPS is not zero.
Title: Re: VEMS new boost control guide.
Post by: gunni on December 08, 2015, 10:02:22 PM
I don´t think there is any reset for the Boost Intergral as soon as your I is enabled it will move quickly. I would do some tests and if you find you are getting inconsistent results advice VEMS to implement a reset system. If you are left with big I values you need to revisit your DC_ref table.

So ignition is being raised to counter rpm dropping below the Idle target? Unless its clear that is should do so then its effectively a bug and you should report it via the reporting feature in Vemstune.

Any un-documented features should be reported so that they can be documented if planned or removed if unplanned.
Title: Re: VEMS new boost control guide.
Post by: fphil on December 09, 2015, 10:19:13 PM
I think I have reported.
As for the Boost, during many years of practice in system control, I was mostly used with an integral action being reinitialized whenever the system state enters some specific domain which have been set around the target. On another hand it means nothing to tune the  DC_ref  boost table, say @ 70kPa, when no boost is of use. So to be sure not to be bothered with the table one put the entries  = 100% for such map values. Hence the I action is quite large when the actual map enters the boost I domain.
But this is not much important and besides I may have missed something...
Title: Re: VEMS new boost control guide.
Post by: gunni on December 10, 2015, 05:45:49 PM
This is why you can control at what point the I becomes active again
Title: Re: VEMS new boost control guide.
Post by: fphil on December 10, 2015, 11:46:49 PM
indeed, but that value of I means nothing, better to enter with a zeroed value
Title: Re: VEMS new boost control guide.
Post by: VEMS on December 11, 2015, 09:28:23 AM
Hello Phil,

Is your boost control working properly using the new algorithm in open loop with PID = 0 ? With boostcontrol it is imperative to tune the reference table properly for all boost targets first.

Best regards, Dave
Title: Re: VEMS new boost control guide.
Post by: fphil on December 11, 2015, 02:06:50 PM
No it is not. Doing so, as Gunni said, I agree the I integral should be zero on a static mode. However it occurs that you have to leave the boost target domain before reaching the target and before the integral term has decreased to zero (assuming that refDc table is ideal). Hence past I values may accumulate.
I see no problem to reset the integral term when entering the target domain. The advantage is that this releases the constraint to search for a good open loop control every where before setting the closed loop. A feedforward term might be seen as an help to the control action for  getting about the target, the last step to the target being done by the integral action.