MEGAsquirt A place to collectively sort out this megasquirt gizmo

MS-II Closed Loop Boost Control - PID

Thread Tools
 
Search this Thread
 
Old 05-28-2010, 09:09 AM
  #81  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,499
Total Cats: 4,080
Default

ive always been using 19.5Hz
Braineack is offline  
Old 05-28-2010, 10:02 AM
  #82  
Senior Member
iTrader: (2)
 
therieldeal's Avatar
 
Join Date: Oct 2007
Location: Northeastern CT
Posts: 547
Total Cats: 2
Default

alrighty
therieldeal is offline  
Old 05-28-2010, 07:21 PM
  #83  
Senior Member
iTrader: (2)
 
therieldeal's Avatar
 
Join Date: Oct 2007
Location: Northeastern CT
Posts: 547
Total Cats: 2
Default

anyone running this with an EWG? i set it up the way one would normally plumb an EBC with EWG and i'm getting some funky results. boost keeps climbing all the way to 7k...

its hooked up like:
boost source
|
tee --- bottom of WG
|
NC port
<VALVE>
COM port
|
Top of WG

i have the NO port plugged with an NPT plug

my settings for the log below are 19.5 hz, 10 ms contol interval, inverted polarity, closed duty 0/open duty 100, closed loop control PID 90-15-5, target boost 240kpa.
Attached Thumbnails MS-II Closed Loop Boost Control - PID-untitled.jpg  

Last edited by therieldeal; 05-29-2010 at 01:06 AM.
therieldeal is offline  
Old 05-29-2010, 01:29 AM
  #84  
Senior Member
iTrader: (2)
 
therieldeal's Avatar
 
Join Date: Oct 2007
Location: Northeastern CT
Posts: 547
Total Cats: 2
Default

it irks me how the code is written "in terms of the wastegate" instead of in terms of the solenoid. we are controlling the solenoid directly.. i feel like the code should be in terms of that. in theory in the "standard" config you would be hooked up between COM and NO, so a 0% DC on the valve = 100% wastegate aka open. then 100% DC valve = 0% wastegate = closed. it seems people are running "inverted" with this setup.

in my situation i'm using the NC and COM ports. 0% DC on the valve = 100% wastegate aka open. so i should be running inverted.... i started typing all this out thinking maybe that setting was my issue.

ugh..
therieldeal is offline  
Old 05-29-2010, 01:29 PM
  #85  
Senior Member
iTrader: (2)
 
therieldeal's Avatar
 
Join Date: Oct 2007
Location: Northeastern CT
Posts: 547
Total Cats: 2
Default

fk it i just rerouted my vac lines as if i had an internal gate, lets try this again
therieldeal is offline  
Old 05-29-2010, 06:18 PM
  #86  
Senior Member
iTrader: (2)
 
therieldeal's Avatar
 
Join Date: Oct 2007
Location: Northeastern CT
Posts: 547
Total Cats: 2
Default

okay, still zero luck with PID, but i got an open loop map working pretty well. DC varies from 40-50 depending on the RPM, and i'm holding steady at 19-21 psi all the way across. my hose connections and settings are all correct as lowering DC increases boost.

with PID everything was all over the place, i can post logs if anyone wants to see. i started out with 150-0-0 and kept dropping P 10 points at a time. i really need a tuning assistant, the only place i can tune this is on the highway (3rd gear, even that barely maintains traction) and i have to keep getting off at every exit to mess with the laptop lol.

anyway, i got down all the way to P=40 and it didnt improve. got a little rain so i'm done tuning for the evening. at around P=80-90 it would hold wastegate boost or slightly higher (15-17 psi) until about 6k, and then it would start WILDLY oscillating between wg boost and 22-23 psi. my boost duty graph was also all over the place, nearly a 0-100-0-100 sawtooth wave. target boost was set for 240kpa, ~20psi.

i have a 1 bar wastegate spring btw, 14.5 psi.

anyyyyyy suggestions?
therieldeal is offline  
Old 08-01-2010, 01:28 PM
  #87  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

I tried tuning the closed loop boost today, and didn't have a lot of luck. Is it possible that the EBC can't evacuate enough pressure? I was trying to tune at a conservative 8psi. The tuning only allowed me to keep steady at 12psi. Is my problem due to the wastegate spring that came with my turbo??? It says it is set to a max of 25psi in the ad. I don't really know what this means. Do I need to adjust my wastegate rod?

I did notice that the lower my P term got, the slower the spool. I guess it tries to bleed off air sooner.

what should I do?
miatauser884 is offline  
Old 08-01-2010, 02:42 PM
  #88  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,499
Total Cats: 4,080
Default

go out with just wastegate and see what you get. then triple check you plumbed the EBC solenoid correctly.

You should start with around 150% P and work your way down. if you are on v3.0.0 code, you should start with 100% P. FWIW I only have 23 P.

You just need to shift into 2nd and flog it to tune P, just sets the boost threshold, then you tune I to maintain that number towards redline in 4th gear pulls, the D to remove any overshoot and oscillation.

make sure you have closed loop set and your kPa targets table setup correctly.


here's a log i took thursday on my drive home from work. My kPa targets are 192kPa and then 197kPa after 6K.



p-27 I-35 D-50

Last edited by Braineack; 08-01-2010 at 02:53 PM.
Braineack is offline  
Old 08-01-2010, 02:54 PM
  #89  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

Originally Posted by Braineack
go out with just wastegate and see what you get. then triple check you plumbed the EBC solenoid correctly.

You should start with around 150% P and work your way down. if you are on v3.0.0 code, you should start with 100% P. FWIW I only have 23 P.

You just need to shift into 2nd and flog it to tune P, just sets the boost threshold, then you tune I to maintain that number towards redline in 4th gear pulls, the D to remove any overshoot and oscillation.

make sure you have closed loop set and your kPa targets table setup correctly.


here's a log i took thursday on my drive home from work. My kPa targets are 192kPa and then 197kPa after 6K.

Ok, I got down to P = 80% and was getting just under 12psi. I have the closed loop set to 8psi though. I didn't realize the P term was going to be so low. Then, as I lowered the P term my spool slowed so I thought I was doing something wrong. I'll give it another go when I figure out what is wrong with my communication with the laptop and diypnp.

I went out this morning and everything was fine. I just tried to connect, and I get a "invalid data received from controller" error. Have you ever received this? I'm not sure what to do.

I was accidentally using just wastegate the other day, and it boosted to over 20 psi. The turbo states say it has a 25psi max wastegate. I guess that means it will hold 25psi before the spring gives???
miatauser884 is offline  
Old 08-01-2010, 03:17 PM
  #90  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,499
Total Cats: 4,080
Default

this doesnt quite make sense... if wastegate will shoot over 20psi but using the EBC can bring it down to 12psi? thats not really possible

what does your boost duty cycle look like? probably at 100% because it's trageting way under what the wastegate even is.
Braineack is offline  
Old 08-01-2010, 03:53 PM
  #91  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

I just got back from another run. I don't think I was really controlling it at 12psi last time. This time I was doing second gear pulls and I would get all the way to my boost cutoff protection.

Is it possible that I need little I term with my P term? Do I need to adjust my wastegate arm? I checked the plumbing of my ebc. Ive got the "boost" port plumbed just after the IC, and the "WG" port plumbed to the WG.

Yes, my boost duty goes to 100%. What do I need to do. I'm lost here?

TITLE
GT28 Turbo Charger (The blue hose and fitting are not included)
APPLICATION
Universal, fits all cars and trucks, Modification may be required
DESCRIPTION
Perfect Upgrade for GT25/GT28
3" Inlet Diameter
Journal Bearing - Wet Float Type
Internal wastegate set at Max 25 Psi
t25 Flange
Oil Lube, Oil/Water Cool
Ideal for smaller displacement engines making up to 420hp
Compressor Wheel
0.60 A/R Cold Side
Ind: 54.00 mm
Exd: 70 mm
Trim: 60
Turbine Wheel
.64 A/R
Garrett 4 Bolt T25 Flange
Ind: 52.90 mm
Exd: 45.47 mm
miatauser884 is offline  
Old 08-01-2010, 04:00 PM
  #92  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,499
Total Cats: 4,080
Default

with a line directly into the wastegate and you see 20psi, then you need a wastegate thats rated around what you want to run... Mines 11psi fwiw.
Braineack is offline  
Old 08-01-2010, 04:27 PM
  #93  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

Will it be difficult for me to run 22psi on an 11psi wastegate actuator? I eventually want to run the limit of the map sensor.

EDIT: it appears that it is adjustable. That is why it says it's "set to 25psi max". I have to lengthen the adjustment rod I think.

Last edited by miatauser884; 08-01-2010 at 04:37 PM.
miatauser884 is offline  
Old 08-01-2010, 06:45 PM
  #94  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Having a 'D' term is important to be able to set the 'P' gain high for fast response, while preventing overshoot.

The AEM has PI and no D - I always had a problem with overshoot if I wanted fast response - so I built an analog circuit that approximates a simplified 'D':
https://www.miataturbo.net/aem-59/boost-overshoot-arrester-circuit-50169/

Based on what I learned in the above, the right way to implement a 'D' is to only let it come into play when target boost is 'x' ms away given the current rate of rise. In my case what worked was 150 ms. This way it doesn't slow the rate of rise of boost when the target is still far away.
JasonC SBB is offline  
Old 08-01-2010, 10:04 PM
  #95  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

Thanks guys. I have to play with my WG actuator to reduce the boost threshold of the WG. Then I'll get back to the PID tuning. I'm sure glad the problem was located. I w going bonkers trying to figure why the boost was shooting to over 20 psi with all values of P term I tried.
From another thread it sounds liek I won't have more than about 2 psi adjust-ability from messing with the WG actuator arm. It might be time to buy a new WG actuator
miatauser884 is offline  
Old 08-02-2010, 08:34 AM
  #96  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,499
Total Cats: 4,080
Default

what sorta boost levels are you shooting for and will you be toggling form wastegate to EBC eveR?
Braineack is offline  
Old 08-02-2010, 10:54 AM
  #97  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

Originally Posted by Braineack
what sorta boost levels are you shooting for and will you be toggling form wastegate to EBC eveR?
I'm shooting for 20psi. I plan on using the EBC. I was hopin gto have a range from about 12psi to 22psi. I adjusted the wastegate linkage last night. This morning it appears to have reduced boost to 12 psi. I adjusted it to where it barly opened the WG flapper. I'm going to shorten it a could of turns to where it is closed. I don't think it will change much. IF I end with 14-15 psi from WG then that will be fine.
miatauser884 is offline  
Old 08-02-2010, 11:15 AM
  #98  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,499
Total Cats: 4,080
Default

basically you need to find a weastegate pressure you are happy with and then the EBC can only increase it from there. so maybe if you adjust the rod so it's hitting 14psi then you can start using EBC to hold 20psi.
Braineack is offline  
Old 09-26-2010, 10:50 AM
  #99  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

It looks like I made a mistake while at the dyno so I didn't get closed loop tuned. I started with P term of 100 and it would only operation WG pressure. I thought I was supposed to lower the number, but in fact I should have raised the p term value. I'll start at 150 and work down'

Since the target table is where it gets the kpa that you are looking to maintain; Does this mean that one PID value set should be good for controlling any boost target?

OR, do you need to tune the PID at the max boost you plan to target?
miatauser884 is offline  
Old 01-08-2011, 04:45 PM
  #100  
Elite Member
iTrader: (11)
 
miatauser884's Avatar
 
Join Date: Feb 2009
Posts: 2,959
Total Cats: 11
Default

I finally got around to tuning the closed loop.

[IMG][/IMG]

[IMG][/IMG]

This is the best I could get it. Maybe a little more fine tuning would get it more stable. It my just be that i don't have a ported WG. IDK My target was 17psi.
Attached Files
File Type: msl
2011-01-08_15.07.08.msl (357.8 KB, 126 views)
miatauser884 is offline  


Quick Reply: MS-II Closed Loop Boost Control - PID



All times are GMT -4. The time now is 05:47 PM.