Notices
MEGAsquirt A place to collectively sort out this megasquirt gizmo

MS2 V3.0 Boost control algorithm issue.

Thread Tools
 
Search this Thread
 
Old May 26, 2018 | 12:14 PM
  #1  
fleka's Avatar
Thread Starter
Newb
 
Joined: 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.


Old May 27, 2018 | 03:05 AM
  #2  
Skamba's Avatar
Junior Member
 
Joined: 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...
Old May 27, 2018 | 04:31 AM
  #3  
fleka's Avatar
Thread Starter
Newb
 
Joined: 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.
Old May 27, 2018 | 06:55 PM
  #4  
sshamrockk's Avatar
Junior Member
 
Joined: Oct 2016
Posts: 297
Total Cats: 20
From: Western Mass.
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.
Old May 28, 2018 | 05:17 PM
  #5  
fleka's Avatar
Thread Starter
Newb
 
Joined: 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...
Old May 28, 2018 | 09:40 PM
  #6  
sshamrockk's Avatar
Junior Member
 
Joined: Oct 2016
Posts: 297
Total Cats: 20
From: Western Mass.
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.
Old May 30, 2018 | 12:28 AM
  #7  
Ted75zcar's Avatar
Tweaking Enginerd
iTrader: (2)
 
Joined: Mar 2013
Posts: 1,870
Total Cats: 383
From: Boulder, CO
Default

Have you characterized this open loop yet? That is where you start. Turn off boost tolerance, reduce sensitivity, read the instructions, ...
Old May 30, 2018 | 12:42 AM
  #8  
Ted75zcar's Avatar
Tweaking Enginerd
iTrader: (2)
 
Joined: Mar 2013
Posts: 1,870
Total Cats: 383
From: Boulder, CO
Default

And when you finally get there, reducing P is actually more aggressive with this algorithm. Start at 100 and go down.
Old May 30, 2018 | 03:29 AM
  #9  
fleka's Avatar
Thread Starter
Newb
 
Joined: 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.
Old May 30, 2018 | 07:55 AM
  #10  
Ted75zcar's Avatar
Tweaking Enginerd
iTrader: (2)
 
Joined: Mar 2013
Posts: 1,870
Total Cats: 383
From: Boulder, CO
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.
Old May 30, 2018 | 11:12 AM
  #11  
18psi's Avatar
VladiTuned
iTrader: (76)
 
Joined: Apr 2008
Posts: 35,821
Total Cats: 3,482
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
Old May 30, 2018 | 11:28 AM
  #12  
fleka's Avatar
Thread Starter
Newb
 
Joined: 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.
Old May 30, 2018 | 11:37 AM
  #13  
18psi's Avatar
VladiTuned
iTrader: (76)
 
Joined: Apr 2008
Posts: 35,821
Total Cats: 3,482
Default

that's a good start. at least then you're starting with known operation for each of the 3
Old May 30, 2018 | 11:39 AM
  #14  
fleka's Avatar
Thread Starter
Newb
 
Joined: 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
Old May 30, 2018 | 12:05 PM
  #15  
Ted75zcar's Avatar
Tweaking Enginerd
iTrader: (2)
 
Joined: Mar 2013
Posts: 1,870
Total Cats: 383
From: Boulder, CO
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.
Old May 30, 2018 | 12:07 PM
  #16  
18psi's Avatar
VladiTuned
iTrader: (76)
 
Joined: Apr 2008
Posts: 35,821
Total Cats: 3,482
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.
Old May 30, 2018 | 12:21 PM
  #17  
Ted75zcar's Avatar
Tweaking Enginerd
iTrader: (2)
 
Joined: Mar 2013
Posts: 1,870
Total Cats: 383
From: Boulder, CO
Default

yeah, guess I should add that you need to be on 3.4.2
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
elektron
MEGAsquirt
7
Jan 8, 2016 08:35 AM
ndragun
MEGAsquirt
0
Sep 20, 2015 10:28 PM
derek072887
ECUs and Tuning
1
Jul 15, 2015 10:17 PM
ENWOD
MEGAsquirt
10
Apr 10, 2013 11:23 AM
elior77
MEGAsquirt
4
Dec 22, 2012 11:38 AM




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