MEGAsquirt A place to collectively sort out this megasquirt gizmo

ITT: MS3 1.4.0+ and Closed Loop EBC

Thread Tools
 
Search this Thread
 
Old 08-28-2017, 10:39 PM
  #21  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Originally Posted by ridethecliche
I've never run it on open loop, so I never used the bias duty table, just the sensitivity and PID algorithm.
Yes you have. The bias duty table is used for closed loop.
aidandj is offline  
Old 08-28-2017, 11:37 PM
  #22  
Elite Member
iTrader: (2)
 
ridethecliche's Avatar
 
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
Default

Originally Posted by aidandj
Yes you have. The bias duty table is used for closed loop.
Huh. I thought only the map target was used. I think my table for the valve duty cycle should be nonsensical at this point. I posted my tune on my build thread. I can upload it here when I get home from school.
ridethecliche is offline  
Old 08-28-2017, 11:53 PM
  #23  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

here's what you're actually running:
looks pretty decently setup, even if you apparently had no idea that your tune even had it



For whatever reason I find the DIY solenoids a bit easier to dial in than the EFR+it's proprietary solenoid.

Well, actually, it's just @Colipto's that seems to be all funky at this point.
18psi is offline  
Old 08-29-2017, 12:47 AM
  #24  
Elite Member
iTrader: (2)
 
ridethecliche's Avatar
 
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
Default

Yeesh. It's been so long that I don't even remember setting it up.

I think what I had done was set my min and max duty cycle in a really narrow range at the very start, like 10-30. Then I looked at a bunch of logs I took with those settings and tried to see which boost values were holding at what duty cycle. Then I just extrapolated down from the value that held things, i.e. 20 in this case, down to what my min duty was at that time, i.e. 10. It's a bit nonsensical now because my min is 15 so 3 of those rows are useless. I think that's how my friend had explained it to me, but I'm probably butchering it a bit.

Looking at a few logs, it appears that my boost target of 170 holds in the realm of 169-171 kpa. I'll take it!

I legitimately have looked at 50-60 logs to get things to where they are right now. I'm sure there's a better way, but I got kinda spooked after hitting the cutoff a few times the first time I tried things, that I decided to totally narrow the valve duty range and up the max till I overshot by too much, then I lowered it. IIRC, if the valve value was too high, I needed a larger delta to compensate. By lowering the max, I was able to bring down delta so PID doesn't have to work as hard and I see less oscillation. I was running a delta of like 28 when I first started and I had a bunch of oscillation. Now, I think my next step here will be to either raise max duty to 65 or 70 to see how that reacts or lower delta to 7kpa and see if it causes an acceptable level of overshot, i.e. not jumping up past 11psi.

But for now I'm just going to leave this ish as is because it works. I've been playing with something else lately.
ridethecliche is offline  
Old 08-29-2017, 12:49 AM
  #25  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Originally Posted by ridethecliche
But for now I'm just going to leave this ish as is because it works. I've been playing with something else lately.
Hopefully you didn't trick someone into letting you tune their car...
​​​​​
aidandj is offline  
Old 08-29-2017, 01:12 AM
  #26  
Elite Member
iTrader: (2)
 
ridethecliche's Avatar
 
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
Default

Originally Posted by aidandj
Hopefully you didn't trick someone into letting you tune their car...
​​​​​
C'mon. I'm not that terrible of a person! I aint tryna blow someone elses ish up!
ridethecliche is offline  
Old 08-29-2017, 01:13 AM
  #27  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Could have fooled me
aidandj is offline  
Old 08-29-2017, 01:21 AM
  #28  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

anyways back to topic: 50kpa delta reasonable to start with?
18psi is offline  
Old 08-29-2017, 01:26 AM
  #29  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Depends on boost level and spool speed. 50kpa can lead to some wicked integral windup as the PID loop tries to hit a target that it can't (when you are below boost threshold)

For example, you wire the wastegate shut and make 140kpa at 3000rpm and 150kpa at 3500 and 170kpa at 4000rpm. Whathat happens is if you are at 120kpa (using the 170kpa target from above) at 3000rpm then the PID loop with jump to the bias table, which will not make enough boost (because you can't get to the target at that rpm because you can only make 140kpa) and the control loop will tell the valve to keep closing more and more to make boost. Now you hit 4k rpm and your control loop is freaking out and has the valve fully shut. Boom over boost.

I'd start at 25-30 and adjust from there.
aidandj is offline  
Old 08-29-2017, 10:30 AM
  #30  
Elite Member
iTrader: (17)
 
pdexta's Avatar
 
Join Date: Aug 2007
Location: Knoxville, TN
Posts: 2,949
Total Cats: 182
Default

Just to clarify for us dum-dums...

Originally Posted by 18psi
1.) Set your range
Open I/O test mode under CANbus to enable test mode, set frequency, under PP3boost click Pulsed. Now, change the duty cycle % to 0, increase by 5 until you hear the boost control solenoid pulsing/clicking/ticking. Once it starts pulsing, decrease it by 1 until it stops, then click back up 1-2%. Record this as Min Duty %. Now do the same sort of test, but start at 100% and decrease by 5 until it starts pulsing, then increase by 1 until it stops, then decrease 1-2% to get it to pulse again. Record this as Max Duty %.. These two numbers are now your range.
Assuming this process will be done with ignition on, engine off?

Now that your bias table is somewhat set up, go back into boost control settings and set the tuning mode to: Basic Mode. Now that slider controls how sharp the car will respond, so adjust it up/down to hit target boost, and to not have sharp oscillations.

In the screen shot of the log below, you can see the solenoid pulsing really violently from 28 to 81 boost duty, which causes the boost to jigsaw as a result. You want to reduce sensitivity until that doesn't happen.
Slider adjustment should be adjusted up until you see oscillations, then decreased until oscillations go away?
pdexta is offline  
Old 08-29-2017, 11:02 AM
  #31  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

-Yes.
-Yes. But really you probably don't want to stay on "basic" and then go on to tune Advanced/PID to really dial it in. I haven't even begun to outline that process because: a) I haven't really polished the currently discussed steps, and want to get them correct and easy to understand for everyone before I move on, and
b) I've been crazy busy with tuning cars both in person and over the interwebz

In one of the other threads there's discussion about the slider: basic mode basically defaults the PID to 100 or something like that, and you adjust from there. Check it out
18psi is offline  
Old 08-29-2017, 11:10 AM
  #32  
Elite Member
iTrader: (17)
 
pdexta's Avatar
 
Join Date: Aug 2007
Location: Knoxville, TN
Posts: 2,949
Total Cats: 182
Default

Originally Posted by 18psi
anyways back to topic: 50kpa delta reasonable to start with?
With a delta too high I get overboost on long pulls from low rpms, like a dyno pull. Boost duty keeps increasing trying to hit it's target when it's unable to, then when rpms get high enough to actually spool the turbo it's too slow to react and passes the target.

With a delta too low I get overshoots on up-shifts. It closes the valve when boost falls between shifts, then it's too slow to react once boost recovers in the next gear and passes the target.

I think you want it as low as possible without overshooting boost between shifts. Right now my boost controller isn't set up properly and seems to react way slower than everyone elses. With my current tune 40kpa delta seems to work well for me, I would expect this to be considerably lower once properly tuned.

TLDR: I would expect delta to be <40kpa. Decrease delta until you overshoot your target between shifts.
pdexta is offline  
Old 08-29-2017, 12:06 PM
  #33  
Former Vendor
iTrader: (31)
 
Savington's Avatar
 
Join Date: Nov 2006
Location: Sunnyvale, CA
Posts: 15,442
Total Cats: 2,099
Default

Originally Posted by aidandj
Depends on boost level and spool speed. 50kpa can lead to some wicked integral windup as the PID loop tries to hit a target that it can't (when you are below boost threshold)

For example, you wire the wastegate shut and make 140kpa at 3000rpm and 150kpa at 3500 and 170kpa at 4000rpm. Whathat happens is if you are at 120kpa (using the 170kpa target from above) at 3000rpm then the PID loop with jump to the bias table, which will not make enough boost (because you can't get to the target at that rpm because you can only make 140kpa) and the control loop will tell the valve to keep closing more and more to make boost. Now you hit 4k rpm and your control loop is freaking out and has the valve fully shut. Boom over boost.
Seems like an easy problem to solve - just reduce your boost targets in the spoolup area so you don't have the PID controller trying to reach unobtainable targets. Set them maybe 10kpa above what you can reasonably obtain from a 1:1 2000rpm pull.
Savington is offline  
Old 08-29-2017, 12:13 PM
  #34  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

Yes exactly, even OEMs set up their target vs wg duty tables like that. Otherwise it wil overshoot target at least slightly every single time. If you set it 2-3 psi lower it should work well. And if your PIDs are set right then it should accommodate both upshift and low rpm high load overshoot
18psi is offline  
Old 08-29-2017, 12:20 PM
  #35  
Elite Member
iTrader: (17)
 
pdexta's Avatar
 
Join Date: Aug 2007
Location: Knoxville, TN
Posts: 2,949
Total Cats: 182
Default

Originally Posted by Savington
Seems like an easy problem to solve - just reduce your boost targets in the spoolup area so you don't have the PID controller trying to reach unobtainable targets. Set them maybe 10kpa above what you can reasonably obtain from a 1:1 2000rpm pull.
The problem with that is 10kpa over what you can obtain is still going to create the same issue, it's still not hitting the target and still increasing boost duty trying to hit something it can't hit, causing boost to spike once it does finally come in. Plus lowering your target allows you to get within your delta range easier, causing further integral windup issues.

If you set your target to obtain exactly the boost you're able to hit in your 1:1 gear, then in a shorter gear you're back to the same issue of not being able to hit your target again, and back to overboost. If you set your target to what you're able to hit in the shorter gear, then you start giving up spool in a taller gear because boost duty is too low.

I've been back and forth over this and it all seems to come down to finding the appropriate delta, otherwise you're just chasing an ideal fixed number that's constantly changing under different circumstances.
pdexta is offline  
Old 08-29-2017, 12:44 PM
  #36  
Senior Member
iTrader: (2)
 
Lexzar's Avatar
 
Join Date: Nov 2013
Location: Redlands, CA
Posts: 953
Total Cats: 41
Default

Valve stays closed until it hits delta, trying to cause best possible spool up time; I think if you're having overboost issues with spiking, it may be with the slider sensitivity and/or PID tuning combined with the bias table targets.

Try a small delta and the tips Savington gave, see what they do with a log, compare to old tune. For objective truth.
Lexzar is offline  
Old 08-29-2017, 01:29 PM
  #37  
Elite Member
iTrader: (17)
 
pdexta's Avatar
 
Join Date: Aug 2007
Location: Knoxville, TN
Posts: 2,949
Total Cats: 182
Default

Originally Posted by Lexzar
Valve stays closed until it hits delta, trying to cause best possible spool up time; I think if you're having overboost issues with spiking, it may be with the slider sensitivity and/or PID tuning combined with the bias table targets. Try a small delta and the tips Savington gave, see what they do with a log, compare to old tune. For objective truth.
So here's the scenario; I run through 3rd gear, and grab 4th, back in the gas, boost comes on very quick. With a small delta your valve is closed until you're almost at your target. By the time the valve opens you've already overshot the target and into overboost. I can move PID, adjust the slider, change bias table to anything, and it will still do that because delta is holding the valve closed too long. For this reason I can't go below a 40kpa delta or I'm hitting boost cut between every shift.

If I decrease low-end boost targets like Savington suggested it causes other issues. I certainly get where he's coming from, I've tried exactly what he's suggesting and was not able to make it work how it's supposed to. If I want 200kpa at a 3000rpms I'm going to target 200kpa at that rpm. If I target 140kpa at 3000rpms because I'm only able to hit 130kpa, then as soon as I hit 100kpa my EBC starts to open since I'm within my 40kpa delta. I think we can all agree an open boost controller at 100kpa is kind of defeating the point.

All this said, I know I've got other issues to resolve. My EBC is not working right. I just think the boost target table should be what your ideal most optimistic impossible goal should be and not based on what physics forces it to be.
pdexta is offline  
Old 08-29-2017, 03:03 PM
  #38  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Originally Posted by 18psi
-Yes.
-Yes. But really you probably don't want to stay on "basic" and then go on to tune Advanced/PID to really dial it in. I haven't even begun to outline that process because: a) I haven't really polished the currently discussed steps, and want to get them correct and easy to understand for everyone before I move on, and
b) I've been crazy busy with tuning cars both in person and over the interwebz

In one of the other threads there's discussion about the slider: basic mode basically defaults the PID to 100 or something like that, and you adjust from there. Check it out
You want to start on basic to get it as close as possible. And then if you have to you can switch to advanced. Basic mode P=I=D=100. And in advanced mode the slider is still active.

Originally Posted by pdexta
So here's the scenario; I run through 3rd gear, and grab 4th, back in the gas, boost comes on very quick. With a small delta your valve is closed until you're almost at your target. By the time the valve opens you've already overshot the target and into overboost. I can move PID, adjust the slider, change bias table to anything, and it will still do that because delta is holding the valve closed too long. For this reason I can't go below a 40kpa delta or I'm hitting boost cut between every shift.

If I decrease low-end boost targets like Savington suggested it causes other issues. I certainly get where he's coming from, I've tried exactly what he's suggesting and was not able to make it work how it's supposed to. If I want 200kpa at a 3000rpms I'm going to target 200kpa at that rpm. If I target 140kpa at 3000rpms because I'm only able to hit 130kpa, then as soon as I hit 100kpa my EBC starts to open since I'm within my 40kpa delta. I think we can all agree an open boost controller at 100kpa is kind of defeating the point.

All this said, I know I've got other issues to resolve. My EBC is not working right. I just think the boost target table should be what your ideal most optimistic impossible goal should be and not based on what physics forces it to be.
Originally Posted by Lexzar
Valve stays closed until it hits delta, trying to cause best possible spool up time; I think if you're having overboost issues with spiking, it may be with the slider sensitivity and/or PID tuning combined with the bias table targets.

Try a small delta and the tips Savington gave, see what they do with a log, compare to old tune. For objective truth.

I checked my tune. 40kpa is what I had to stay at. Even with the PID loop reacting as fast as possible, any lower than that would cause overshoot. The wastegate literally could not open fast enough and release enough exhaust to not overshoot if I had it start any later. EFR probs.

I'll try lowering my targets and see what happens. But the turbo can hit different boost levels in different gears. For example in a 3rd gear downhill pull I may not hit full boost until 4k rpm, but a 5th gear slight uphill pull I'm hitting 20psi at 3800rpm. Lots of little nuances that cause issues.
aidandj is offline  
Old 08-29-2017, 08:11 PM
  #39  
Elite Member
iTrader: (2)
 
ridethecliche's Avatar
 
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
Default

Can you tune the aggressiveness of the PID by adjusting sensitivity? I.e. if you're hitting overboost because of PID being too aggressive, would an increase in sensitivity enable one to decrease PID values?

I'm asking because that's what seemed to work for me through trial and error and that's one of the reasons why my delta is so low.

That said, I think your min and max duty cycle values are probably on the high side, no? If you have a slightly lower max, wouldn't that limit overboost because the valve wouldn't open as much? It could slow down spool by a small amount, but may help stave off overboost.

I can hear my valve at 86% duty cycle and I'm only running it at 60. I might try seeing what happens to spool and overboost at 70. You know... for science!
ridethecliche is offline  
Old 08-29-2017, 08:12 PM
  #40  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Slider sets how aggressive the PID is. Think of it as an overall multiplier.
aidandj is offline  


Quick Reply: ITT: MS3 1.4.0+ and Closed Loop EBC



All times are GMT -4. The time now is 09:13 AM.