MEGAsquirt A place to collectively sort out this megasquirt gizmo

MS2 V3.0 Boost control algorithm issue.

Thread Tools
 
Search this Thread
 
Old 05-26-2018, 12:14 PM
  #1  
Newb
Thread Starter
 
fleka's Avatar
 
Join Date: Oct 2016
Posts: 13
Total Cats: -1
Default MS2 V3.0 Boost control algorithm issue.

Hi guys, I've installed a new MAC solenoid for my internally gated gt2871, I'm tuning the PID controller but it's really not behaving as it should. Below are my tuner studio settings as well as a part of the log that shows the boost duty and target.
Considering the parameters, especially the derivative set to: 0, Boost duty shouldn't have fallen as the MAP was below the target, both P and I gains should increase, not decrease. Tell me what I'm doing wrong.


fleka is offline  
Old 05-27-2018, 03:05 AM
  #2  
Junior Member
 
Skamba's Avatar
 
Join Date: Mar 2018
Posts: 288
Total Cats: 38
Default

Depending on how you connected your solenoid (default open or default closed), you might have to flip the closed and open duty.

Also: Don't tell me you are doing all of this without a functioning wideband...
Skamba is offline  
Old 05-27-2018, 04:31 AM
  #3  
Newb
Thread Starter
 
fleka's Avatar
 
Join Date: Oct 2016
Posts: 13
Total Cats: -1
Default

The polarity is fine, it does rise and lower the boost as it should, but the derivative behaviour of the pid algorithm is not as it should be, only having coefficients for proportional and integrating while derivative is 0 it should first cross the boost target before lowering the duty.

also, my wideband died, but the map is fully tuned.
fleka is offline  
Old 05-27-2018, 06:55 PM
  #4  
Junior Member
 
sshamrockk's Avatar
 
Join Date: Oct 2016
Location: Western Mass.
Posts: 270
Total Cats: 20
Default

Originally Posted by fleka
Hi guys, I've installed a new MAC solenoid for my internally gated gt2871, I'm tuning the PID controller but it's really not behaving as it should. Below are my tuner studio settings as well as a part of the log that shows the boost duty and target.
Considering the parameters, especially the derivative set to: 0, Boost duty shouldn't have fallen as the MAP was below the target, both P and I gains should increase, not decrease. Tell me what I'm doing wrong.

Trying to use closed loop boost control on a MS2.
sshamrockk is offline  
Old 05-28-2018, 05:17 PM
  #5  
Newb
Thread Starter
 
fleka's Avatar
 
Join Date: Oct 2016
Posts: 13
Total Cats: -1
Default

Originally Posted by sshamrockk
Trying to use closed loop boost control on a MS2.
That seems to be the only correct answer...
fleka is offline  
Old 05-28-2018, 09:40 PM
  #6  
Junior Member
 
sshamrockk's Avatar
 
Join Date: Oct 2016
Location: Western Mass.
Posts: 270
Total Cats: 20
Default

I tried to tune mine, Vlad gave me tips and told me how, and i just couldnt get it to work, either made 10 psi or 18+ psi, there was like no inbetween.
sshamrockk is offline  
Old 05-30-2018, 12:28 AM
  #7  
Tweaking Enginerd
iTrader: (2)
 
Ted75zcar's Avatar
 
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,773
Total Cats: 354
Default

Have you characterized this open loop yet? That is where you start. Turn off boost tolerance, reduce sensitivity, read the instructions, ...
Ted75zcar is online now  
Old 05-30-2018, 12:42 AM
  #8  
Tweaking Enginerd
iTrader: (2)
 
Ted75zcar's Avatar
 
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,773
Total Cats: 354
Default

And when you finally get there, reducing P is actually more aggressive with this algorithm. Start at 100 and go down.
Ted75zcar is online now  
Old 05-30-2018, 03:29 AM
  #9  
Newb
Thread Starter
 
fleka's Avatar
 
Join Date: Oct 2016
Posts: 13
Total Cats: -1
Default

Originally Posted by Ted75zcar
And when you finally get there, reducing P is actually more aggressive with this algorithm. Start at 100 and go down.
I've simulated the source code for boost control in Matlab, it doesn't add up to what's happening in the car, given the same exact variables the pid gives me 100% duty when simulatedin Matlab with the same data, while the car lowers from 100 to 85% duty...
However I think I'm gonna try and do it with initial duty table as it seems this is not an actual PID controller, but something similar.
fleka is offline  
Old 05-30-2018, 07:55 AM
  #10  
Tweaking Enginerd
iTrader: (2)
 
Ted75zcar's Avatar
 
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,773
Total Cats: 354
Default

Originally Posted by fleka
I've simulated the source code for boost control in Matlab, it doesn't add up to what's happening in the car, given the same exact variables the pid gives me 100% duty when simulatedin Matlab with the same data, while the car lowers from 100 to 85% duty...
However I think I'm gonna try and do it with initial duty table as it seems this is not an actual PID controller, but something similar.
you simulated the MegaSquirt algorithm, or a traditional PID? MS does not use a traditional PID.

either way, good for you.
Ted75zcar is online now  
Old 05-30-2018, 11:12 AM
  #11  
VladiTuned
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

Originally Posted by sshamrockk
I tried to tune mine, Vlad gave me tips and told me how, and i just couldnt get it to work, either made 10 psi or 18+ psi, there was like no inbetween.
Correct. Even after dialing in a decent baseline in OL, then switching to CL and using extremely mild settings so all it has to do is adjust 1-2psi to hit targets, it still won't do it consistently and repeatedly.

Let's see if you can somehow figure it out. Also about PID: There were different FW versions for the ms2 over the years, and each had a different approach to how the PID settings worked. Just to further screw everything up for anyone trying to "solve" this now.

I usually just tell ms2 owners to stick to MBC
18psi is offline  
Old 05-30-2018, 11:28 AM
  #12  
Newb
Thread Starter
 
fleka's Avatar
 
Join Date: Oct 2016
Posts: 13
Total Cats: -1
Default

Originally Posted by Ted75zcar
you simulated the MegaSquirt algorithm, or a traditional PID? MS does not use a traditional PID.

either way, good for you.
I used the original source code from ms2extra_misc.c file for my 3.4.2 firmware (latest stable). I might rewrite the pid that's there and try to substitute with a very simple "normal" PID algorithm.
fleka is offline  
Old 05-30-2018, 11:37 AM
  #13  
VladiTuned
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

that's a good start. at least then you're starting with known operation for each of the 3
18psi is offline  
Old 05-30-2018, 11:39 AM
  #14  
Newb
Thread Starter
 
fleka's Avatar
 
Join Date: Oct 2016
Posts: 13
Total Cats: -1
Default

Originally Posted by 18psi
that's a good start. at least then you're starting with known operation for each of the 3
Exactly, than atleast I'll know what's happening for real, maybe even use matlab to optimize my pid values afterwards
fleka is offline  
Old 05-30-2018, 12:05 PM
  #15  
Tweaking Enginerd
iTrader: (2)
 
Ted75zcar's Avatar
 
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,773
Total Cats: 354
Default

MS2 EBC can be made to work, it just takes work. IMO you HAVE to start with open loop tuning of the initial duty table and open/closed duty fields for the solenoid. I feel like a broken record on this one, but the Boost Tolerance functin NEVER did anything that I considered beneficial.
Ted75zcar is online now  
Old 05-30-2018, 12:07 PM
  #16  
VladiTuned
iTrader: (76)
 
18psi's Avatar
 
Join Date: Apr 2008
Posts: 35,821
Total Cats: 3,481
Default

we did that. it didn't work. in various fw's the pid's went up from zero, then down from 200 iirc, and other variations.
18psi is offline  
Old 05-30-2018, 12:21 PM
  #17  
Tweaking Enginerd
iTrader: (2)
 
Ted75zcar's Avatar
 
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,773
Total Cats: 354
Default

yeah, guess I should add that you need to be on 3.4.2
Ted75zcar is online now  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
elektron
MEGAsquirt
7
01-08-2016 08:35 AM
ndragun
MEGAsquirt
0
09-20-2015 10:28 PM
derek072887
ECUs and Tuning
1
07-15-2015 10:17 PM
ENWOD
MEGAsquirt
10
04-10-2013 11:23 AM
elior77
MEGAsquirt
4
12-22-2012 11:38 AM



Quick Reply: MS2 V3.0 Boost control algorithm issue.



All times are GMT -4. The time now is 09:40 PM.