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-27-2017, 11:27 PM
  #1  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Smile ITT: MS3 1.4.0+ and Closed Loop EBC

Ok, so I've been thinking of making this thread for a while, but didn't want to skimp on info, and yet if I don't make it now then I'll just never get to it being crazy busy, so here goes.

warning: this is not the complete process, but just to get the discussion started for now.

ITT: we discuss setting up and dialing in closed loop boost on MS3 1.4.0+

There have been some really good discussions about this already:

https://www.miataturbo.net/megasquir...1-4-1-a-92161/

And posts here and there:
https://www.miataturbo.net/build-thr...6/#post1435708

and

https://www.miataturbo.net/build-thr...hp-bust-84579/


So here is my attempt to organize all this stuff. This is by no means "the way" but hopefully be "a way" and hopefully with everyone's input we can standardize the approach.
0.)Make sure to turn overboost protection on, and set to a reasonable pressure.
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.
2.) Input the range into Boost Control Settings
Open up boost control settings, set to Setup Mode, set Delta to something like 25kpa, plug in your Min and Max Duty % here.
3). Fill out the KPA target table, just put your targets at your max pressure everywhere.
Now open up Boost Control Bias Duty table and set everything to your Min Duty %
4) go for a drive. start in 3rd gear at a really low rpm (2k or less), go WOT, and WATCH YOUR BOOST until it reaches your target kpa that you've input into the target table. you can log this too so it's easier to see. AGAIN make sure overboost is turned on, and make sure your target is at least a bit lower than overboost or you'll hit both at the same time and not really be able to see what rpm you hit your target in. once you see where you hit your target, and how much boost duty it took to get there, input that into the bias table, and reduce everything after that to a much lower (possibly even min duty) bias boost duty. THIS WILL RE-SHAPE THE BIAS TABLE FROM WHAT IT LOOKS LIKE IN THE PICTURE BELOW, TO SOMETHING THAT TAPERS DOWN AS BOOST RISES AND RAMPS UP AS BOOST DROPS OFF.
5) Repeat step 4 many times until you are not overshooting your target (in fact, you probably want to slightly undershoot it everywhere, AND YOU PROBABLY WANT TO SET YOUR TARGET LOWER THAN DESIRED UNTIL YOU GET THE HANG OF THIS). 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.


Anyways, please feel free to contribute and correct any (or many?) of my mistakes or possible misunderstandings of how to set this up.

Thanks




We will get to discussing PID once everyone looks through this and confirms this is the proper approach.

Last edited by 18psi; 08-30-2017 at 01:01 PM.
18psi is offline  
Old 08-28-2017, 12:50 AM
  #2  
Senior Member
iTrader: (1)
 
stefanst's Avatar
 
Join Date: Sep 2011
Location: Lambertville, NJ
Posts: 1,215
Total Cats: 74
Default

So, boost target in the target table seems to be 170kpa across the range. But in the log you're stuck at 165 target. And then you only get to 155kpa max in actual MAP. And even when your MAP is below target, your boost duty goes down. Something seriously ain't right here. Or, quite possibly, I'm not getting what's going on at all.
stefanst is offline  
Old 08-28-2017, 12:53 AM
  #3  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

My bad, deleted that pic it wasn't really showing what I was trying to demonstrate.

Last edited by 18psi; 08-28-2017 at 01:06 AM.
18psi is offline  
Old 08-28-2017, 03:23 AM
  #4  
Senior Member
iTrader: (6)
 
yossi126's Avatar
 
Join Date: Sep 2013
Posts: 854
Total Cats: -15
Default

Vlad,
Thank you for taking the time to write this up. One day I will tackle cl and report my findings here. Subbed for now.
yossi126 is offline  
Old 08-28-2017, 04:13 AM
  #5  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,554
Total Cats: 101
Default

4) go for a drive. start in 3rd gear at a really low rpm (2k or less), go WOT, and WATCH YOUR BOOST until it reaches your target kpa that you've input into the target table. you can log this too so it's easier to see. AGAIN make sure overboost is turned on, and make sure your target is at least a bit lower than overboost or you'll hit both at the same time and not really be able to see what rpm you hit your target in. once you see where you hit your target, and how much boost duty it took to get there, input that into the bias table, and reduce everything after that to a much lower (possibly even min duty) bias boost duty. THIS WILL RE-SHAPE THE BIAS TABLE FROM WHAT IT LOOKS LIKE IN THE PICTURE BELOW, TO SOMETHING THAT TAPERS DOWN AS BOOST RISES AND RAMPS UP AS BOOST DROPS OFF.
In addition to this - if you log the attempts at different duties and got a copy of Megalogviewer HD at hand - you can input the log(s) and create a boost duty table with the Histogram/table generator.

@18psi - thanks for the writeup (I will have to reset my min and max duty as you describe- very handy), I am looking forward to the PID part...
Zaphod is offline  
Old 08-28-2017, 07:10 AM
  #6  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

thanks, but i could have used this yesterday at 11am ET...
Braineack is offline  
Old 08-28-2017, 08:55 AM
  #7  
Elite Member
iTrader: (17)
 
pdexta's Avatar
 
Join Date: Aug 2007
Location: Knoxville, TN
Posts: 2,949
Total Cats: 182
Default

I really appreciate the thread and looking forward to testing it out. I've been fighting with EBC for a long time and always struggled to find good, clear, complete information on exactly what needed to be done. I've been able to get close, but just can't ever seem to get over inconsistency issues.
pdexta is offline  
Old 08-28-2017, 10:46 AM
  #8  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

Glad to hear I'm not alone in trying to organize the info
If any part of what I've outlined so far is wrong or off please feel free to correct me (in fact, that's the whole point of this thread) and provide your input.
Thanks all
Originally Posted by Zaphod
In addition to this - if you log the attempts at different duties and got a copy of Megalogviewer HD at hand - you can input the log(s) and create a boost duty table with the Histogram/table generator.

@18psi - thanks for the writeup (I will have to reset my min and max duty as you describe- very handy), I am looking forward to the PID part...
That's a really good idea, I'm going to try it. I do have MLV HD
18psi is offline  
Old 08-28-2017, 12:28 PM
  #9  
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 18psi
Now open up Boost Control Bias Duty table and set everything to your Max Duty %
This will keep the wastegate closed completely, so boost should rise as fast as possible.
4) go for a drive. start in 3rd gear at a really low rpm (2k or less), go WOT, and WATCH YOUR BOOST until it reaches your target kpa that you've input into the target table. you can log this too so it's easier to see. AGAIN make sure overboost is turned on, and make sure your target is at least a bit lower than overboost or you'll hit both at the same time and not really be able to see what rpm you hit your target in. once you see where you hit your target, and how much boost duty it took to get there, input that into the bias table...
This is a pretty scary game to play. Consider that if you do this in 3rd gear, and then you repeat the test in 4th gear, the car will (almost certainly) hit target boost at a lower RPM. You will get major overboost in the RPM range between your 4th gear target-boost RPM and 3rd gear target-boost RPM.

IMO the safer way to achieve the same thing is to never set your bias table higher than what is necessary to maintain the boost level you want. Let the PIDs artificially inflate the duty cycle at lower RPM to keep the wastegate from cracking until you are at/near target boost. This way, the EBC valve can naturally vary that cracking pressure with RPM in different gears.

In theory, the only time I would set bias duty to 100% would be if I were able to use a load dyno to actually determine the minimum RPM at which the engine is capable of producing max boost. You can only do this if you're able to hold RPM stable at WOT. In reality, sitting there at WOT at 1700rpm on a dyno is not good for anything, so I would likely never do this - the tiny additional benefit over just letting the PIDs determine where to apply max DC% is just not worth it.
Savington is offline  
Old 08-28-2017, 02:18 PM
  #10  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

Ok, good point.
So would you start at min duty and work your way up to get a baseline bias value?
18psi is offline  
Old 08-28-2017, 02:47 PM
  #11  
Senior Member
iTrader: (2)
 
Lexzar's Avatar
 
Join Date: Nov 2013
Location: Redlands, CA
Posts: 953
Total Cats: 41
Default

I don't run into this issue; maybe I should log 3rd WOT to 4th shift to see if I overshoot and if so how much.

edit: especially WOT into 5th
Lexzar is offline  
Old 08-28-2017, 04:46 PM
  #12  
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 18psi
Ok, good point.
So would you start at min duty and work your way up to get a baseline bias value?
Yep. You want the minimum duty that will get you the target boost you want. Realistically, that means doing a few 1:1 gear pulls to determine that number, and then going down 2-3%DC to make sure that you aren't targeting too high on a cold night. The EBC should be capable of adding DC% if the boost is too low, and that's safer than relying on the EBC to reduce DC% if the boost is too high.
Savington is offline  
Old 08-28-2017, 04:50 PM
  #13  
VladiTuned
Thread Starter
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

Yeah that last part was what I was getting at in step 5. Ok cool beans, appreciate the input I'll revise the post.
18psi is offline  
Old 08-28-2017, 09:29 PM
  #14  
Elite Member
iTrader: (2)
 
ridethecliche's Avatar
 
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
Default

My valve test yielded a range of 6-86 for my valve duty cycle. I'm currently running 15-60 as min and max lower limit delta was 25 but I'm at 15 right now for testing purposes.

As savington has said, my max duty cycle is artificially low so as not to overboost. As a result, my sensitivity is currently 450. PID values are 140-20-10.
Obviously still not done tuning, but I reach 10psi on a JB 2560 equivalent at 3200rpm. My boost targets are scaled to throttle input, so I have a feeling that I'm slowing things down during the phase when I go from 0-100 TPS, so this isn't bad. I'm also running less boost closer to redline. I think dnmakinson had his map setup like this and I emulated it just for the wiggle room... for now.

Once I'm content with this, I might increase the max duty cycle, decrease the sensitivity by 100 or so and start the process anew if I want to try to increase spool.

I've had some help getting this up and running, but my friend and I were working with the understanding that we were going to increase the max duty cycle as we got more and more results. I've never done things with setup mode. Having the duty too high early on led to an abrupt rush into overboost, so this is the approach we took. The only thing I did that required purposeful use of boost cutoff was a run with the wastegate disconnected. I set the overboost to the max value I wanted for boost (12psi) and did a 4th gear pull. This basically set the bar for the maximum achievable spool. I.e. it was a value to compare to for EBC tuning. Once I start hitting boost close to that value, I know that there's no way to increase spool with the current setup.

It's required a lot of testing, but it's been way better than when I first started testing. I almost went back to running wastegate because the car was almost undriveable at first since I hit the boost cutoff with normal street driving... Now, I've got about 2k miles on this setup and have yet to hit the cutoff outside of times when I'm tuning things and that's only been a couple of times since we're pretty conservative about most things.

I'm attaching a log of a recent 4th gear pull. I maintain target boost at 20 boost duty % afaik, but my min is 15 just to make sure it can go lower like on a cold night as savington suggested.
Attached Files
File Type: msl
2017-08-27_01.56.33.msl (338.3 KB, 72 views)
ridethecliche is offline  
Old 08-28-2017, 09:43 PM
  #15  
Elite Member
iTrader: (1)
 
Leafy's Avatar
 
Join Date: Jun 2012
Location: NH
Posts: 9,479
Total Cats: 104
Default

How does the duty cycle increase in this when in setup mode? I thought in setup mode it was basically just open loop control except it read from the bias table instead of the open loop table.
Leafy is offline  
Old 08-28-2017, 09:58 PM
  #16  
Senior Member
iTrader: (2)
 
Lexzar's Avatar
 
Join Date: Nov 2013
Location: Redlands, CA
Posts: 953
Total Cats: 41
Default

RTC, the rushing into overboost thing is when you would decrease the bias table, whenever it tries to overshoot, decrease until it doesn't, or per Savington's much safer idea, start lower than you need in the bias table and increase until you hit your target.

And Leafy, your understanding of the setup mode, I believe, is correct more or less. The bias table just tells the algorithm as it receives data, that this "bias" number is probably pretty close to what it should be, such that, it starts there every time it calculates the new duty cycle it needs to hold the target kpa. You'll see it really clearly if you run the bias table at all 0 and it will cause the boost to oscillate extremely hard as it looks to the bias table every ~0.3-0.5s, changes duty cycle to 0, then sees "oh this isn't close to the target kpa" and increases duty cycle artificially. If you have a working open loop map, you can simply pasta that into the bias table.

Someone please correct me if I am off in this. Don't want to spread wrong info, just pulling from my experience.
Lexzar is offline  
Old 08-28-2017, 10:01 PM
  #17  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Not really right.

Setup mode holds the valve closed until you are at (Target kpa - lower limit delta). Then it will follow the bias table. If you then drop below that value it will close the valve again. Leading to oscillations.

If your target is 170kpa, and your lower limit delta is 20kpa then the valve will stay shut until its at 150kpa, then it will follow the bias table. If the bias table is too low the MAP will drop below 150kpa and the valve will close again.
aidandj is offline  
Old 08-28-2017, 10:04 PM
  #18  
Senior Member
iTrader: (2)
 
Lexzar's Avatar
 
Join Date: Nov 2013
Location: Redlands, CA
Posts: 953
Total Cats: 41
Default

That makes more sense. I like a low delta compared tot he 100kpa I see sometimes, running 25kpa delta.
Lexzar is offline  
Old 08-28-2017, 10:10 PM
  #19  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

100 is way too high. It will lead to overshoot and integral windup. Because the PID algorithm is actively trying to increase boost before your car can even make your target boost. I'm having trouble picking one. If its 15 then i get overshoot on quick throttle applications. But 25 it will wind up on a long 4th gear pull. I think I need to drop some bias duty in a lot of my cells. Haven't been out in a while though. Just working from memory.
aidandj is offline  
Old 08-28-2017, 10:17 PM
  #20  
Elite Member
iTrader: (2)
 
ridethecliche's Avatar
 
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
Default

Ahhh so setup mode basically helps one figure out what values are necessary to hold target boost. That makes sense.

I've essentially found that with trial and error.

Lexzar, I'm on closed loop only. I've never run it on open loop, so I never used the bias duty table, just the sensitivity and PID algorithm. I figured I'd up the stakes so I had to learn to do **** right. Have had a ton of help along the way. Check out the log, it goes right to the max value and then drops down and the valve duty oscillates a tiny bit before settling, then drops again when I'm in the lower boost range closer to redline.

In my EWG disconnected run in 4th gear, I hit 12 psi at ~3200 rpm starting at 2k. I'm pretty damn close to that.

I'm currently running a 15kpa delta because I still haven't seen any ill effects from it. I honestly don't think there was too much of a difference between that and 25, but I haven't scrutinized the logs much, just the spool and lack of hitting cutoff.
ridethecliche is offline  


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



All times are GMT -4. The time now is 03:50 AM.