Pages: 1 ... 3 4 [5] 6 7 ... 10
Author Topic: PID contoller calibration from square one  (Read 153467 times)
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6034


« Reply #60 on: April 17, 2013, 01:32:09 AM »

It's not "target boost", it's just a "very high value" so it gets filled with 95.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6034


« Reply #61 on: May 29, 2013, 07:26:30 AM »

I have something to add to this thread.

Just giving KFLDIMX the "WGDC value to reach target" is not going to give good results when the wastegate behaviour (KFLDRL) is fairly non-linear.
This is because after initial ramp up most of the duty cycle comes from I.

Now if for example at a point with a value of 70 KFLDIMX your KFLDRL reads 85, then effective WGDC will be way too high, as the 70 maximum in the KFLDIMX map will be "amplified" up by KFLDRL, resulting in a 85% max DC at that value, and not 70%.

The solution is to reverse lookup the "WGDC value to reach target" map through KFLDRL.

For example, taking the original resulting boost target -> wastegate duty map:


And running it in reverse through KFLDRL:


Results in:


This allows the PID to maintain much better control and all but eliminates overshoot on spoolup.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Online Online

Posts: 12268


WWW
« Reply #62 on: May 29, 2013, 08:16:34 AM »

Just giving KFLDIMX the "WGDC value to reach target" is not going to give good results when the wastegate behaviour (KFLDRL) is fairly non-linear.

Yes. *everything* goes through KFLDRL, so if you are looking at your logs to see what WGDC is right (for a given set of conditions), it always has to be run "backwards" through KFLDRL to get the pre-lin value.

I find it helpful to always log both post and pre-lin.

Quote
This is because after initial ramp up most of the duty cycle comes from I.

This statement is true regardless of KFLDRL Smiley
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
tbm
Full Member
***

Karma: +2/-1
Offline Offline

Posts: 176


« Reply #63 on: August 19, 2013, 06:08:56 AM »

I have something to add to this thread.

Just giving KFLDIMX the "WGDC value to reach target" is not going to give good results when the wastegate behaviour (KFLDRL) is fairly non-linear.
This is because after initial ramp up most of the duty cycle comes from I.

Now if for example at a point with a value of 70 KFLDIMX your KFLDRL reads 85, then effective WGDC will be way too high, as the 70 maximum in the KFLDIMX map will be "amplified" up by KFLDRL, resulting in a 85% max DC at that value, and not 70%.

The solution is to reverse lookup the "WGDC value to reach target" map through KFLDRL.

For example, taking the original resulting boost target -> wastegate duty map:


And running it in reverse through KFLDRL:


Results in:


This allows the PID to maintain much better control and all but eliminates overshoot on spoolup.

Does anyone keep pictures with prj's examples?
Logged
catbed
Sr. Member
****

Karma: +8/-2
Offline Offline

Posts: 300


« Reply #64 on: August 20, 2013, 10:48:25 AM »

Does anyone keep pictures with prj's examples?

I don't have pics, but all prj means is that when you get your WGDC -> boost pressure table that you made by logging, you need to run it reverse through DRL to get pre-lin values of DC to populate DIMX.

So in my case, I wanted to set boost for 20psi. My logs show that 20psi is achieved using ~55% WGDC. You can't just plug 55% into the DIMX table, you need to reverse lookup using DRL. So I found 55% DC on the Z-axis at the given RPM from the logs and traced it back to the DC axis in DRL, which turned out to be ~34%. This value is then used in DIMX.
Logged
savages4
Sr. Member
****

Karma: +10/-5
Offline Offline

Posts: 251


« Reply #65 on: August 20, 2013, 09:36:38 PM »

I don't understand, and I would like to see these pictures that aren't showing up.  I have seen how reducing the values of KFLDRL down to about 80% over 3000 rpm in the furthest column does get rid of the boost spikes on the freeway in the high gears, however it does seem to make spool slower in the lower gears, and does seem to make response slower as well in place of the over boost (pin the thorttle on the freeway and boost takes longer to build back up).
« Last Edit: August 20, 2013, 10:21:22 PM by savages4 » Logged
julex
Hero Member
*****

Karma: +79/-4
Offline Offline

Posts: 923


« Reply #66 on: August 21, 2013, 10:56:53 AM »

I don't understand, and I would like to see these pictures that aren't showing up.  I have seen how reducing the values of KFLDRL down to about 80% over 3000 rpm in the furthest column does get rid of the boost spikes on the freeway in the high gears, however it does seem to make spool slower in the lower gears, and does seem to make response slower as well in place of the over boost (pin the thorttle on the freeway and boost takes longer to build back up).

Let me try.

Forget KFLDRL for a second. If wastegates and turbos were perfectly linear, then there would be no need for it, but we will get to this later.

Let's look at KFLDIMX. It defines prescribed value of "I" component, which mashed together with "D" and "P" is eventually used to cycle wastegates at a certain duty cycle. Inputs into KFLDIMX table is a number describing difference between desired pressure and atmospheric pressure expressed in mbar (called LDE, "boost error"). If you're missing 1700mbar, then 1700 column is used, for a given RPM, to pick "I" limit for controller and off it goes.

There are also "P" values, defined in two tables for dynamic (big difference in desired and current boost) and static (small difference, I think it is 50mbar or so) whose values are expressed for each 100mbar of LDE. "P" output seems to be mainly responsible for spool up since it generates very large numbers with large LDE and diminishes to little numbers as you approach boost target when it switches in static "maintain boost" mode.

The "D" part is only used to keep current boost level in desired boost level band.

Ok, so now after all the calculations you get some PID value, which with ideal turbos would just be applied to wastegates and the car would be happy. Unfortunately turbos don't respond linearly at all. Not enough that a turbo capable of 40psi doesn't make 0 psi with 0 DC or 20psi with 50% DC (this would be linear!), it also generates different boost levels with the same exact DC as it moves up the RPM band. That's why a need for KFLDRL, think of it as a scaler that knows turbo's secrets and how to translate requested PID value to something that when applied delivers a predictable and constant boost level as the car revs up.

You will now ask, so why KFLDIMX is also changing with revs? I low revs, it is obviously high to help spool up. For the rest of table, when the turbo can easily spool up without high WGDC, I can't really answer this as I don't understand it perfectly myself. Usually the variations are small once the turbo is expected to be in spooled up range so maybe it is just a smoothing applied to table...

If you feel that your spool up is slow then you need to make changes to "D" as well. What turbos do you run, what wastegate pressure and what values for KFLDIMX/KFLDRL (k03, k04, some random stuff?)?
« Last Edit: August 21, 2013, 11:00:58 AM by julex » Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Online Online

Posts: 12268


WWW
« Reply #67 on: August 21, 2013, 12:00:36 PM »

I think your definitions of P, I, and D are not very good :/
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
julex
Hero Member
*****

Karma: +79/-4
Offline Offline

Posts: 923


« Reply #68 on: August 21, 2013, 12:33:16 PM »

I think your definitions of P, I, and D are not very good :/

Yeah, well. I hope he gets slightly better idea of how it all works as obviously super technical explanation doesn't make it home... like in my case [Smiley].
Logged
pablo53
Full Member
***

Karma: +5/-1
Offline Offline

Posts: 94


« Reply #69 on: August 21, 2013, 07:48:33 PM »

PID on ME7 as simply as I can think of it:

I -> Integral.  No need to go into integrals or calculus.  Stock coefficients Q1DY and Q1ST will output numbers that reach a limit in a very short amount of time.

We know that given intake air temperature (IAT), ambient pressure and humidity, once target boost is achieved, there is a WGDC that produces "X" amount of boost at "Y" rpm on a given engine/turbo/wastegate setup.

For all practical purposes there is a map for this and it's also the limit of that integral output above.  It's KFLDIMX. "X" boost is the X-axis of this map and "Y" RPM is the Y-axis. 

P -> Proportional.  P maps are Q0DY = dynamic and Q0ST = Static) and are a proportion of boost error.  What level of boost error divides them?  This is defined by UMDYLDR.

Q0DY allows rapid correction of large boost errors and flexibility on spool and change in throttle for different gears, IAT, and altitude (more specifically ambient pressure), each of which cause target boost to be reached at a different RPM.   

Q0ST needs to be large enough to make effective changes to WGDC (KFLDIMX), once target boost is attained.  Too low and adjustments won't be adequate and boost will stray from target.  Too high and boost will fluctuate around target (sine curve-ish).

SO:
I effectively gives a base WGDC
P gives the positive/negative change for flexibility to correct all errors very quickly.

D -> Derivative.  P and I are plenty potent enough to control boost but tuning will be a compromise between slower response near where error approaches zero and overshoot the target.   Hence, the Derivative Component.

D is used to "dampen" boost with a lower WGDC just before that larger error closes on target boost so you don't overshoot/undershoot your target.  The map KFLDRQ2 needs to be adjusted to be active at the rpm close to and above where your boost starts to meet requested and just large enough and at error values to eliminate overshoot.   

Now finally, KFLDRL.  Boost Linearization.  WTF is that?   In the RPM range that requested boost can be reached, there is no need for the full range of 0% to 100% WGDC.   This is where KFLDRL comes in. The map serves to magnify the area of WGDC that effectively makes a difference in controlling boost.   

It's impossible to understand PID and how it all works together without spending the time to see how changes in each component affect boost and wastegate duty cycle.   Start at the beginning of this thread and log, log, log.

Just as important, all that logging at different fixed WGDC to build your KFLDRL map will provide nearly all the data points to adjust the other PID maps for your setup.

Hope this helps.
Logged
julex
Hero Member
*****

Karma: +79/-4
Offline Offline

Posts: 923


« Reply #70 on: August 22, 2013, 06:32:57 AM »

Key here is, you need correct KFLDRL for your turbo. If this doesn't match what your turbo is doing at given RPMs and WGDC, you will never be able to properly tune the turbo.
Logged
catbed
Sr. Member
****

Karma: +8/-2
Offline Offline

Posts: 300


« Reply #71 on: August 22, 2013, 06:46:23 AM »

Key here is, you need correct KFLDRL for your turbo. If this doesn't match what your turbo is doing at given RPMs and WGDC, you will never be able to properly tune the turbo.

Definitely. Take some logs using KFLDRAPP, use the spreadsheet to populate KFLDRL, and then reverse lookup DIMX values from logs.
Logged
masterj
Hero Member
*****

Karma: +62/-5
Offline Offline

Posts: 1049



WWW
« Reply #72 on: August 31, 2013, 10:18:45 AM »

Guys, I need some help with winlogview. I have converted csv to winlogview format but for some odd reason my matrix only shows few first cells... Im attaching both matrix file and logs Smiley
Logged

20VTMK1
Full Member
***

Karma: +0/-0
Offline Offline

Posts: 113


« Reply #73 on: October 01, 2013, 11:58:27 AM »

I switched my M-box to use RS4 axis.  Now my lowest functional column after 0% is 3% instead of 10% like on the stock M-box.
Here's what I'd do.  Set CWMDAPP = 8.  Set my KFLDRAPP to look like what you see in the image below.
Now.   Go out and find a nice stretch of road.  Get moving and get into third gear.
Do a few pulls from 1500 to 6500, or whatever your target power band is on your engine.
Go ahead and log your RPM and Boost Actual.
Take your logs and get your RPM and Boost Actual for each pull into a spreadsheet.

What you want to do is a linear interpolation.  So that you have a matrix with columns: [RPM_general BoostPull#1 BoostPull#2 BoostPull#3...]
Then you want to take the mean of your BoostPull#K columns, so you now have a mtrix:  [RPM_general BoostPullAvg].
Is that what you were confused about?  Get the data and upload it for me and I'll help with the mathematics for you if you need.
The spreadsheet gives you a great start on that tbh.

Greetings ,

On the stock S3 BAM ECU , 366847 , KFLRAPP is already filled with zeros , any reason why ? I assumed this map is used to test purposed only when CWMDAPP is configured to 8 so it didn't matter , correct ?

Also , why did you need to log various gears , in my case I could get good resolution using ME7 logger in 3rd gear at WOT ? I could do this on my pal's dyno .. however that's also a pain ..
I guess the road is the best ..

Thanks
Logged
20VTMK1
Full Member
***

Karma: +0/-0
Offline Offline

Posts: 113


« Reply #74 on: October 01, 2013, 12:03:53 PM »

You don't have to.

Super hero member ! Thanks , this does DLR and DIMX correct ?

Thanks again
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 10
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.029 seconds with 17 queries. (Pretty URLs adds 0.001s, 0q)