Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MEGAsquirt (https://www.miataturbo.net/megasquirt-18/)
-   -   MS2 V3.0 Boost control algorithm issue. (https://www.miataturbo.net/megasquirt-18/ms2-v3-0-boost-control-algorithm-issue-97052/)

fleka 05-26-2018 12:14 PM

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.

https://cimg2.ibsrv.net/gimg/www.mia...7bacba781a.png
https://cimg3.ibsrv.net/gimg/www.mia...081f54be51.png

Skamba 05-27-2018 03:05 AM

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...

fleka 05-27-2018 04:31 AM

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.

sshamrockk 05-27-2018 06:55 PM


Originally Posted by fleka (Post 1483948)
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.

fleka 05-28-2018 05:17 PM


Originally Posted by sshamrockk (Post 1484067)
Trying to use closed loop boost control on a MS2.

That seems to be the only correct answer...

sshamrockk 05-28-2018 09:40 PM

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.

Ted75zcar 05-30-2018 12:28 AM

Have you characterized this open loop yet? That is where you start. Turn off boost tolerance, reduce sensitivity, read the instructions, ...

Ted75zcar 05-30-2018 12:42 AM

And when you finally get there, reducing P is actually more aggressive with this algorithm. Start at 100 and go down.

fleka 05-30-2018 03:29 AM


Originally Posted by Ted75zcar (Post 1484454)
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.

Ted75zcar 05-30-2018 07:55 AM


Originally Posted by fleka (Post 1484460)
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.

18psi 05-30-2018 11:12 AM


Originally Posted by sshamrockk (Post 1484189)
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

fleka 05-30-2018 11:28 AM


Originally Posted by Ted75zcar (Post 1484470)
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.

18psi 05-30-2018 11:37 AM

that's a good start. at least then you're starting with known operation for each of the 3

fleka 05-30-2018 11:39 AM


Originally Posted by 18psi (Post 1484501)
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 :D

Ted75zcar 05-30-2018 12:05 PM

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.

18psi 05-30-2018 12:07 PM

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.

Ted75zcar 05-30-2018 12:21 PM

yeah, guess I should add that you need to be on 3.4.2


All times are GMT -4. The time now is 12:50 PM.


© 2024 MH Sub I, LLC dba Internet Brands