ITT: MS3 1.4.0+ and Closed Loop EBC
#141
Elite Member
iTrader: (2)
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I've been working to set up my EBC on the new internally waste-gated setup. My mode of setting things up was basically to find the min and max duty that the valve made a noise during, then tighten that up a little to account for the 'dead' zone on the ends. I jump right into tuning closed loop using a target boost table once I've done that.
In order to check if the PID algorithm was working, I set the boost cutoff a bit high so I could watch for oscillations instead of the BANG of hitting cutoff. To my surprise, I couldn't get oscillations no matter what I did, even with Sensitivity 450, P 200, I 0, D 0. If I raised I a little and D more, it managed to stabilize, but still no sin wave kinda thing for a rough way to check to see if PID was working.
Well... In order to even induce oscillations, I had to set sensitivity to 500, P to 200, I to 0, and D to 0. Is there any reason why the algorithm would appear to only start working with the sensitivity slider maxed out? What happens if that isn't enough? Does one raise the frequency of the valve up from 19.5?
In order to check if the PID algorithm was working, I set the boost cutoff a bit high so I could watch for oscillations instead of the BANG of hitting cutoff. To my surprise, I couldn't get oscillations no matter what I did, even with Sensitivity 450, P 200, I 0, D 0. If I raised I a little and D more, it managed to stabilize, but still no sin wave kinda thing for a rough way to check to see if PID was working.
Well... In order to even induce oscillations, I had to set sensitivity to 500, P to 200, I to 0, and D to 0. Is there any reason why the algorithm would appear to only start working with the sensitivity slider maxed out? What happens if that isn't enough? Does one raise the frequency of the valve up from 19.5?
#142
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
The way to see the PID values working is to set them up for SD card logging. This was added in version 1.5.1 as I recall. There is a thread on it in the development section on the MS site.
You need to enable INTERNAL_LOG_FIELDS in your project properties, then you can add fields like these to your SDcard datalog. These are not available in regular datalogs.
pid_log_boost_p
pid_log_boost_i
pid_log_boost_d
pid_log_boost_count
Per the developers...
Note that these are in internal units which won't necessarily correspond to the externally visible units e.g. for idle the 0-100% scale is handled 0-255 internally. Viewing the "idle steps" field gives you 0-255. The "count" field increments each time the calculation is run, so log this as well.
Once that is done, you simply download/convert the appropriate log and watch what it is doing by graphing that in MLV.
Good Luck.
You need to enable INTERNAL_LOG_FIELDS in your project properties, then you can add fields like these to your SDcard datalog. These are not available in regular datalogs.
pid_log_boost_p
pid_log_boost_i
pid_log_boost_d
pid_log_boost_count
Per the developers...
Note that these are in internal units which won't necessarily correspond to the externally visible units e.g. for idle the 0-100% scale is handled 0-255 internally. Viewing the "idle steps" field gives you 0-255. The "count" field increments each time the calculation is run, so log this as well.
Once that is done, you simply download/convert the appropriate log and watch what it is doing by graphing that in MLV.
Good Luck.
Last edited by fwman1; 09-14-2018 at 09:57 AM.
#143
Elite Member
iTrader: (2)
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I have overboost enabled. I'll look for that thread and get an SD card.
You can't log PID directly when you're logging on a laptop? I've actually been meaning to get the wireless stuff working so I can use my phone or tablet to log and do a few things to the tune when I don't have a laptop.
You can't log PID directly when you're logging on a laptop? I've actually been meaning to get the wireless stuff working so I can use my phone or tablet to log and do a few things to the tune when I don't have a laptop.
#144
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
If your MS3 does not already have an SD card, do some research on which one to get, as it seems to make a difference. From what I was told, it isn't possible for them to make PID values available in normal logging at this time.
It is a bit of a headache. Typically, I'll run a separate logs when making changes. Once I am done I'll turn the car off and download the SDCard log and sync the timestamps so I see what results particular settings give.
Others may have better methods...
It is a bit of a headache. Typically, I'll run a separate logs when making changes. Once I am done I'll turn the car off and download the SDCard log and sync the timestamps so I see what results particular settings give.
Others may have better methods...
#146
Retired Mech Design Engr
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (3)
Join Date: Jan 2013
Location: Seneca, SC
Posts: 5,011
Total Cats: 859
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Can be set up on a switch, or trigger, or on all the time.
Even on all the time is not bad if you are using it for specific purposes, because you can change the setting in TS at any time.
With SD in, and TS connected to MS, go to the top, Data Logging, and choose SD. I cannot remember the choices of trigger. For your case, "over 90kPa" would likely work, if that is available.
Even on all the time is not bad if you are using it for specific purposes, because you can change the setting in TS at any time.
With SD in, and TS connected to MS, go to the top, Data Logging, and choose SD. I cannot remember the choices of trigger. For your case, "over 90kPa" would likely work, if that is available.
#147
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Looking for help or maybe just a shoulder to cry on.
I've pretty much given up on getting the PID to control this beast.. But perhaps my problem is an overly sensitive (small range) for the EBC:
at 30% DC: 10psi
at 33% DC: 14psi
at 35% DC: 19psi
So what I find is that my laggy response comes slamming in and there is no way in hell the PID can respond to such a short window. I hit the overboost every time. I tried using the initial bias table, but how can that help when I've got such a narrow range of duty cycles.
Does anyone else see such a narrow range for the EBC to work over? It would be nice if we could figure out a way to make the EBC work from 0% to 100% linearly..
I'm using the stock EFR6758 spring (~9psi). 4-port EBC and 2-port Turbosmart wastegate actuator.
QUESTION: do the big boost guys rely on spring pressure and an MBC? To me, that is a safer way to do it. Stop dicking around with some controller and go old school.
I've pretty much given up on getting the PID to control this beast.. But perhaps my problem is an overly sensitive (small range) for the EBC:
at 30% DC: 10psi
at 33% DC: 14psi
at 35% DC: 19psi
So what I find is that my laggy response comes slamming in and there is no way in hell the PID can respond to such a short window. I hit the overboost every time. I tried using the initial bias table, but how can that help when I've got such a narrow range of duty cycles.
Does anyone else see such a narrow range for the EBC to work over? It would be nice if we could figure out a way to make the EBC work from 0% to 100% linearly..
I'm using the stock EFR6758 spring (~9psi). 4-port EBC and 2-port Turbosmart wastegate actuator.
QUESTION: do the big boost guys rely on spring pressure and an MBC? To me, that is a safer way to do it. Stop dicking around with some controller and go old school.
#151
Tweaking Enginerd
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (2)
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,809
Total Cats: 366
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Had to hit submit, little more context
I am of the opinion that a 4 port configuration should only be used in special cases. The 4 port is appropriate when you want a large dynamic range of control over the target pressure. This comes into play for instance when you want a big difference in a boost by gear or valet mode type setup. If your target maximum pressure divided by your target minimum pressure is less than 2.5, a 3 port configuration should be used. The reason is exactly what you have observed. The dynamic range is expanded in a 4 port at the expense of control resolution. You can achieve upwards of a 4x max/min dynamic range in 4 port.
if you are looking at getting into the high 20's in boost, but also want 9psi x ~1.3 on the low end, then 4 port is the way to go.
edit: and your hardware will support 3 port.
I am of the opinion that a 4 port configuration should only be used in special cases. The 4 port is appropriate when you want a large dynamic range of control over the target pressure. This comes into play for instance when you want a big difference in a boost by gear or valet mode type setup. If your target maximum pressure divided by your target minimum pressure is less than 2.5, a 3 port configuration should be used. The reason is exactly what you have observed. The dynamic range is expanded in a 4 port at the expense of control resolution. You can achieve upwards of a 4x max/min dynamic range in 4 port.
if you are looking at getting into the high 20's in boost, but also want 9psi x ~1.3 on the low end, then 4 port is the way to go.
edit: and your hardware will support 3 port.
#152
Tweaking Enginerd
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (2)
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,809
Total Cats: 366
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Oh, and one more thing
the custom controller I designed has a linear response to DC from 10-90%. It is super complicated, and probably not worth the effort.
I am not even running it right now.
the custom controller I designed has a linear response to DC from 10-90%. It is super complicated, and probably not worth the effort.
I am not even running it right now.
#153
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
hahaha.. awesome. I think I've said that very thing at work. "This thing is so awesome that you can't even imagine. So amazing that I'm not even using it."
I'll hit you up about this. I want what everyone wants. All the HP, but with the pedal modulation that lets me feather the gas with a glass of wine on the dashboard.
I'll hit you up about this. I want what everyone wants. All the HP, but with the pedal modulation that lets me feather the gas with a glass of wine on the dashboard.
#154
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Well hot damn.
Leafy: interesting suggestion, didn't change much.
Ted: I pulled the bottom port on my actuator and dig darn diggity doo it worked. I now have a very well behaved response like:
at 30% DC: 10psi
at 40% DC: 13.5psi
at 50% DC: 15psi
at 60% DC: 17psi
So unfortunately I don't get to use the (costly) 4-port MAC with 2-port actuator for now. I'll use it as a 1-port actuator. I'll take that over slamming into the overboost.
Now I'll try and get the PID to do its job again.
Thanks!!!
Leafy: interesting suggestion, didn't change much.
Ted: I pulled the bottom port on my actuator and dig darn diggity doo it worked. I now have a very well behaved response like:
at 30% DC: 10psi
at 40% DC: 13.5psi
at 50% DC: 15psi
at 60% DC: 17psi
So unfortunately I don't get to use the (costly) 4-port MAC with 2-port actuator for now. I'll use it as a 1-port actuator. I'll take that over slamming into the overboost.
Now I'll try and get the PID to do its job again.
Thanks!!!
#155
Tweaking Enginerd
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (2)
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,809
Total Cats: 366
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Sweet. I have found that a 3 port configuration allows for slightly more aggressive ebc. You will also get a higher dynamic range and max PR with 3 port. Plus you yould be able to use that fance 2 port IWG actuator ![](https://www.miataturbo.net/images/smilies/smile.gif)
That said, if 1 port gets you where you want to go, roll with it.
![](https://www.miataturbo.net/images/smilies/smile.gif)
That said, if 1 port gets you where you want to go, roll with it.
#157
Tweaking Enginerd
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (2)
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,809
Total Cats: 366
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Turbosmart is the best
they call it a two port single solenoid method, not a 3 port here. This configuration has the advantage of regulating the relative differential across the diaphram instead of the absolute differential. This improves the linearity in the process control variable (DC) which allows you to use bigger P and I terms.
Edit: you need to plug one of the ports on a 4 port solenoid to configure this way.
they call it a two port single solenoid method, not a 3 port here. This configuration has the advantage of regulating the relative differential across the diaphram instead of the absolute differential. This improves the linearity in the process control variable (DC) which allows you to use bigger P and I terms.
Edit: you need to plug one of the ports on a 4 port solenoid to configure this way.
#158
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Turbosmart is the best
they call it a two port single solenoid method, not a 3 port here. This configuration has the advantage of regulating the relative differential across the diaphram instead of the absolute differential. This improves the linearity in the process control variable (DC) which allows you to use bigger P and I terms.
Edit: you need to plug one of the ports on a 4 port solenoid to configure this way.
they call it a two port single solenoid method, not a 3 port here. This configuration has the advantage of regulating the relative differential across the diaphram instead of the absolute differential. This improves the linearity in the process control variable (DC) which allows you to use bigger P and I terms.
Edit: you need to plug one of the ports on a 4 port solenoid to configure this way.
#159
Tweaking Enginerd
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (2)
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,809
Total Cats: 366
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Typically you dont connect a solenoid as they've described on that one because it will eventually result in just both sides of the diaphragm to be at the same pressure since theres no vent except for leakage. You can get the same effect and have it be a lot more adjustable by putting a flow control on the exhaust port of the 4 port. I think most people dont have an issue with this because they put a fairly restrictive sintered brass muffler on that port and thats enough.
edit: if you aren't getting venting, it is hooked up wrong