NefMoto

Technical => Tuning => Topic started by: Rick on December 19, 2010, 04:20:25 AM



Title: Boost PID tuning
Post by: Rick on December 19, 2010, 04:20:25 AM
As I run KO4's i thought i'd copy across the RS4 boost PID calibration onto my ECU.  The weather is atrocious so didn't really get a chance to fully test but the two pulls in 2nd i did it hit the boost cut pretty much straight away.

Does anyone have experience tuning the PID, what works, what doesn't etc?

Rick


Title: Re: Boost PID tuning
Post by: nokiafix on December 21, 2010, 01:09:02 PM
I would like to fully understand the me7 boost pids aswell, I am running a K04 hybrid on a S3 1.8T me7.5 512k file.
The turbo is running a uprated 20psi 34 actuator, I have spent around 10hours on the rolling road dialing in the N75 map table and have got the car to run a perfect 21psi flat line to the red line in every gear and pulling around 305bhp at 250g/s, but my problem is when over 4000rpm I lift off the gas from WOT and then straight away return toWOT the boost will surge to 24-26psi and it seems the n75 is not responding for a few seconds?.    Would this be down to the PIDs and which one?  I am making a map pack for the map which will include the PIDs.  I am going to flat line them all and start from scratch to see what they do and how the values change the boost control. 
So any input at this point would be help full to me.

Cheers


Title: Re: Boost PID tuning
Post by: tobz on December 21, 2010, 01:42:38 PM
A good reference is http://en.wikipedia.org/wiki/PID_controller.  If you're overshooting after a load change (disturbance in steady state), then you're probably looking to adjust the proportional value, since that deals with current error. (the error being the change from WOT to not WOT to back to WOT, which is where you're overshooting as boost is allowed to rebuild uninhibited)


Title: Re: Boost PID tuning
Post by: hammersword on December 22, 2010, 09:06:36 PM
nokiafix mail me your files to help you


Title: Re: Boost PID tuning
Post by: nokiafix on December 23, 2010, 03:08:47 PM
nokiafix mail me your files to help you


Just putting a pid map pack together for the file in question,  just need to find the correct  axis scale positions then I will drop you an email when I am ready to go.  Most other tuners tend to put a mbc in line which I dont like. If a jobs worth doing its worth doing right.


Title: Re: Boost PID tuning
Post by: nokiafix on December 28, 2010, 01:12:01 PM

I have took another look at my options and have found the best way to run this -34 actuator is via the KFLDRAPP and fully go open loop with just TPS with the car running CWMDAPP = 1  I just need to find out how running CWMDAPP swithed on with the torque base off effects the lambda and ignition areas.  The theory is that running all the boost control from KFLDRAPP is the best solution for big turbo setups?

Anyone know what the % of LDRAPP relates to?  Its a switch from signal B_ldsafw and is a post control to KFLDRAPP.

Cheers


Title: Re: Boost PID tuning
Post by: nokiafix on January 01, 2011, 10:49:06 AM
Bump for APP mapping?


I am going to give it a try on a stock 1.8T, I will log the WOT N75dc% via the stock map using the torque structure then the just implant the vcds readings in to the open loop n75% vs throttle map and switch to development mode and in theory it should kick out simlar power only IF the fuel and timing still scale with RL v RPM.

I managed to sort out the inital boost issues I have via the post n75 linear control, the stock map was NOT linear it seem some one at VW got it wrong in the stock map, but now its fully inear it works a treat.



Title: Re: Boost PID tuning
Post by: elRey on February 18, 2011, 02:13:39 PM
I have spent around 10hours on the rolling road dialing in the N75 map table and have got the car to run a perfect 21psi flat line to the red line in every gear and pulling around 305bhp at 250g/s

Which map/s did you fine tune?


Title: Re: Boost PID tuning
Post by: elRey on February 22, 2011, 12:13:13 AM
OK. I have boost fluctuations under control except for the initial onset over shoot and then the one following under shoot. Then it levels out flat.

So question is.... what to do for that initial overshoot? KFLDRQ0? (increase D in the PID?)



Title: Re: Boost PID tuning
Post by: Rick on March 16, 2011, 05:05:03 PM
KFLDIMX - have you tried reducing slightly?


Title: Re: Boost PID tuning
Post by: Rick on March 17, 2011, 07:33:39 AM
also, need to check but I think LDRQ0 is a P term.


Title: Re: Boost PID tuning
Post by: TTQS on March 17, 2011, 07:57:22 AM
also, need to check but I think LDRQ0 is a P term.

I believe that to be the case too Rick. Q0 = P, Q1 = I & Q2 = D.

Funktionsrahmen page 873:

Control algorithms are defined thus:

Proportional component ldptv   = (LDRQ0DY (or LDRQ0S) - KFLDRQ2 (or 0)) x lde
Integral component       lditv    =  lditv(i-1) + KFLDRQ1 (or LDRQ1ST) x lde(i-1)
Derivative component    ldrdtv  = (lde - lde(i-1)) x KFLDRQ2 (or 0)

where lde is the charge pressure control error, i.e. (set point - process value) or (DV - MV)


Title: Re: Boost PID tuning
Post by: Tony@NefMoto on March 18, 2011, 03:43:58 PM
I believe that to be the case too Rick. Q0 = P, Q1 = I & Q2 = D.

That is correct. Each of the terms also have multiple limits applied to them as well.


Title: Re: Boost PID tuning
Post by: elRey on April 08, 2011, 09:24:02 AM
OK. What now?


Title: Re: Boost PID tuning
Post by: judeisnotobscure on April 08, 2011, 01:31:07 PM
I think we just need to take this info and experiment with it.  Use an mbc for safety.  I just tuned an rs6'ed s4 today, 24 psi, Ev14 injectors, 90 mm maf.... the base file pulls like crazy, I can't wait to dial it in.
I'm really starting to get a feel for this stuff.
Many Thanks to those who guide us newbies in the right direction.


Title: Re: Boost PID tuning
Post by: jibberjive on April 09, 2011, 12:34:48 PM
I have spent around 10hours on the rolling road dialing in the N75 map table
Wow, 10 hrs.  Do you own a shop, or were you paying for those?  I'm curious to see how this all irons out.

I think we just need to take this info and experiment with it.  Use an mbc for safety.  I just tuned an rs6'ed s4 today, 24 psi, Ev14 injectors, 90 mm maf.... the base file pulls like crazy, I can't wait to dial it in.
I'm really starting to get a feel for this stuff.
Many Thanks to those who guide us newbies in the right direction.

What size EV14's?  What rail pressure?


Title: Re: Boost PID tuning
Post by: judeisnotobscure on April 09, 2011, 02:18:02 PM
What size EV14's?  What rail pressure?

6o lbs @ 4 bar


Title: Re: Boost PID tuning
Post by: jibberjive on April 09, 2011, 03:02:46 PM
Nice.  And thanks for your email the other day.  I'll be in touch for sure when some more of my hardware starts coming in :)


Title: Re: Boost PID tuning
Post by: Tony@NefMoto on April 19, 2011, 02:13:38 PM
I found that I was only able to really tune the PID controller when I was able to data log each of the different terms in it. When you can data log the P, I, and D separately you can determine which part of the equation is affecting the result at any given moment.

Granted, you need a data logger that can log specific RAM variables. ECUx doesn't define any of the PID values, and I still haven't found the time to release my data logger. :P


Title: Re: Boost PID tuning
Post by: jibberjive on April 21, 2011, 03:47:40 AM
Granted, you need a data logger that can log specific RAM variables. ECUx doesn't define any of the PID values, and I still haven't found the time to release my data logger. :P

ETA??


Title: Re: Boost PID tuning
Post by: Tony@NefMoto on April 21, 2011, 01:17:23 PM
Granted, you need a data logger that can log specific RAM variables. ECUx doesn't define any of the PID values, and I still haven't found the time to release my data logger. :P
ETA??

I just need to write the user interface for it, so it should only be a few days to get a basic version done. The trouble is that I'm busy trying to fix a few bugs that come up with flashing in cars that have poor K-line connections. I also am trying to finish getting the website moved to another server and getting some more info put on the site.

So I will say, that I can hopefully release something with a basic user interface in two weeks to a month.


Title: Re: Boost PID tuning
Post by: jibberjive on April 21, 2011, 01:31:57 PM
Cool. I'm not stressed cause I've got ECUx, but it'll be nice when you get around to it.  I'm not computer guru, but if there's something I can help with whenever, let me know :)


Title: Re: Boost PID tuning
Post by: em.Euro.R18 on May 14, 2011, 06:29:18 PM
I have an issue with overshooting my requested boost level. Requested will be 22psi and I will spike and hold 35psi. Originally my requested matched my actual during my first attempt but I was lean as hell so I made the adjustment in my main fuel scaling map. Next log I took it spiked over 35psi. I'm lost. Even in the quick settings I reduced requested boost by 20 % and it still never changed.


Title: Re: Boost PID tuning
Post by: Tony@NefMoto on May 16, 2011, 12:13:20 PM
I have an issue with overshooting my requested boost level. Requested will be 22psi and I will spike and hold 35psi. Originally my requested matched my actual during my first attempt but I was lean as hell so I made the adjustment in my main fuel scaling map. Next log I took it spiked over 35psi. I'm lost. Even in the quick settings I reduced requested boost by 20 % and it still never changed.

If you are requesting 22psi and overshooting to 35psi, then you are likely running more pressure then the MAP sensor can read. The MAP sensor cannot read above 22psi, so if you ask for 22psi and you get anything above 22psi, the ECU is happy.

To properly use the PID to control boost pressure, you must stay below the max limit of the MAP sensor, otherwise it cannot detect when you overboost.


Title: Re: Boost PID tuning
Post by: nyet on May 16, 2011, 12:44:23 PM
If you are requesting 22psi and overshooting to 35psi, then you are likely running more pressure then the MAP sensor can read. The MAP sensor cannot read above 22psi, so if you ask for 22psi and you get anything above 22psi, the ECU is happy.

To properly use the PID to control boost pressure, you must stay below the max limit of the MAP sensor, otherwise it cannot detect when you overboost.

Also, it is worth pointing out (again) that if you are using a stock DSLOFS, the maximum possible requested boost is HIGHER than the limit of the map sensor, which means the ECU will be happy with ANY amount of boost if your requested boost is maxed.


Title: Re: Boost PID tuning
Post by: damos07 on October 31, 2011, 04:51:57 AM
Which maps are necessary to tune P,I and D boost regulator parameter to make boost overshoot lower?


Title: Re: Boost PID tuning
Post by: Rick on October 31, 2011, 01:03:58 PM
I would start with lowering KFLDIMX


Title: Re: Boost PID tuning
Post by: damos07 on October 31, 2011, 04:49:09 PM
I would start with lowering KFLDIMX

What if it is not enough?


Title: Re: Boost PID tuning
Post by: Rick on November 02, 2011, 02:00:56 PM
Then you go back to first principles with the PID tuning - first pass might be to half the P and I terms.  What is the specific issue, when did the boost spike start?   You may have a load issue.

Rick


Title: Re: Boost PID tuning
Post by: Bische on August 04, 2012, 08:02:55 AM
Im in the process of tuning and understanding my boost regulation, I think I got a pretty good basic understanding but I want discuss and clear a few things up.

P = Corrects current error between setpoint and actual?
I = Corrects for predicted large errors, ie. In this application for quickly ramp up in pressure?
D = Corrects for predicted overshoot?

Currently im riding the I limit during spoolup with 0 P, and I have the I to drop dead after setpoint is reached, and then correcting with P and D when boost is "stable". My I limit is pegged at 95% until 3600rpm where is setpoint is reached, then drop right down to into low 20's at 3700rpm.

Is this how it is supposed to work? Or is it supposed to run both P and I during big transitions?


Title: Re: Boost PID tuning
Post by: Rick on August 04, 2012, 02:02:13 PM
Not quite.

Don't forget your set point isn't always going to be reached at 3600.  What if you floor the throttle at 4k?

Rick


Title: Re: Boost PID tuning
Post by: Bische on August 04, 2012, 11:34:33 PM
Not quite.

Don't forget your set point isn't always going to be reached at 3600.  What if you floor the throttle at 4k?

Rick

Yes, I realized this shortly after my post. Setpoint is also reached sooner in higher gears.. I also read up on PID controllers and their tuning and found out I had some terms wrong due to translation.

I thought about this and came to conclusion that the integer should probably be around 80% and the proportional the remaining 20% up to meet setpoint?

Does anyone have a log with stock turbos/PID maps?


Title: Re: Boost PID tuning
Post by: silentbob on August 04, 2012, 11:54:45 PM
Bosch boost control is shit because there is no proper way of precontrol for the valve.
What you can do for better boost response is use the strategy that is implemented in the RS4 with using LDDIMNN as precontrol. But use with caution because this tends to overshoot.


Title: Re: Boost PID tuning
Post by: Bische on August 05, 2012, 01:05:37 AM
Thanks for the tip!

I noticed my P, I and D maps are all KF's, this should allow for more flexibility:
(http://img337.imageshack.us/img337/1998/pidmaps.jpg)


Title: Re: Boost PID tuning
Post by: nyet on August 05, 2012, 01:29:50 AM
Integer != Integral


Title: Re: Boost PID tuning
Post by: Bische on August 05, 2012, 03:15:00 AM
Integer != Integral

Thanks, corrected :)

I have a question: How is the pressure axis used in the P, I and D maps?

Example:

error/lde is 900hpa, my axis looks like this:

100  25
200  26
400  27
700  28

Does it use the 700 axis to multiply with?

(900/700=1,285714285714286) x 28 ?

Or does still multiply by each 100hpa, and use the value of 28 in my 700 axis?

(900/100) x 28 ?


Title: Re: Boost PID tuning
Post by: nyet on August 05, 2012, 10:43:20 AM
some are lde, some are ld.. you'll have to consult the FR to know which.


Title: Re: Boost PID tuning
Post by: silentbob on August 05, 2012, 11:04:40 AM
............................
Or does still multiply by each 100hpa, and use the value of 28 in my 700 axis?

(900/100) x 28 ?

This is correct


Title: Re: Boost PID tuning
Post by: Bische on August 05, 2012, 11:30:49 AM
some are lde, some are ld.. you'll have to consult the FR to know which.

Yeah I know the axes is lde, but I was riddled how/if it was used in the math.

This is correct

Thanks for confirming  :)


Title: Re: Boost PID tuning
Post by: nyet on August 05, 2012, 11:44:10 AM
Sorry, I misunderstood your question..

And even worse, I don't understand the answer either :)

Can you or silentbob go through it for me?

Thanks, I appreciate it.


Title: Re: Boost PID tuning
Post by: nyet on August 05, 2012, 11:49:36 AM
Ok i think i understand what your question is.

The example you gave is lde=900hpa

The row you are looking at is

700 28 (last row, since 700<900)

The result is 28 (which is in % per 100hpa)

Which means the actual coefficient is 900/100 * 28 (28 per 100 hpa)

What threw me was "Or does still multiply by each 100hpa", which i incorrectly read as "multiply each by 100hpa", instead of "multiply by 28 per 100hpa"


Title: Re: Boost PID tuning
Post by: matchew on August 05, 2012, 12:09:49 PM
Any value above 700 will use 28


Title: Re: Boost PID tuning
Post by: nyet on August 05, 2012, 02:11:17 PM
Which means the actual coefficient is 900/100 * 28 (28 per 100 hpa)

Actually, this isn't always true.

The usage of the output is only lde on the P part.



Title: Re: Boost PID tuning
Post by: Bische on August 07, 2012, 11:59:18 AM
Can someone explain this to me:
Quote
P component (LDRQ0DY (or LDRQ0S) - KFLDRQ2 (or 0)) = * lde ldptv

Why is the D component subtracted from the P component? Or I guess my question really is, why isnt the P% set lower from the beginning with the D% = 0, instead of setting the P% to 25 then subtract 18 from the D%?


Title: Re: Boost PID tuning
Post by: nyet on August 07, 2012, 12:10:07 PM
The answer to your question is more of a PID/math theory question .. you'll have to look more at the various PID "forms".

The basic form  "Kp(P) + Ki(I) + Kd(D)" isn't the only form.


Title: Re: Boost PID tuning
Post by: Bische on August 07, 2012, 12:19:27 PM
The answer to your question is more of a PID/math theory question .. you'll have to look more at the various PID "forms".

Yeah, I have found this pattern in all binarys I have so it must be done this way for a good reason :)

Thing is I cant find myself comfortable to tune a function whos logic I dont understand.

The basic form  "Kp(P) + Ki(I) + Kd(D)" isn't the only form.

Do you think it can be applied though? For simplicitys sake?


Title: Re: Boost PID tuning
Post by: nyet on August 07, 2012, 12:36:56 PM
It can be applied, but that isn't the form that ME7 uses :)