Tuning Boost Control With Bias Table

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Post Reply
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Tuning Boost Control With Bias Table

Post by aidandj »

I need a bit of help tuning the new boost control. I love the new bias table, and setup mode, made it really easy to setup.

But I am having a hell of a time getting PID to work correctly. If I tune the Bias table for one day, then the next morning suddenly I blow straight to overboost. I have tried all sorts of PID combos but the main thing thats getting me is that every time I go to tune I get different results. I attached a couple datalogs and my msq. A little step by step on using the setup mode and tuning PID would be helpful. I found a bit about the setup mode, but the slider and PID are not working well for me. The way that I tuned PID before isn't doing the same things that it used to.

Adding any I more than 3 gives me huge oscillations. Adding D seems to do nothing, and changing P doesn't do much either.

Also where should the slider be set. If I set it near 500 the I get really fast oscillations, down near 0 and boost overshoots by a mile and slowly goes back down. Somewhere in the middle?

Aidan
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Re: Tuning Boost Control With Bias Table

Post by muythaibxr »

Not at a computer right now, but how large is your delta setting?
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Re: Tuning Boost Control With Bias Table

Post by muythaibxr »

Looking at your settings:

What solenoid are you using? 39Hz seems high to me, most people use 19.5 Hz.

Min duty and max duty should actually be set to the min and max values that really make a difference. Otherwise PID will go into areas that don't do anything and you'll be trying to fight to tune it to do something in those areas when there's no way it can.

Slowing down the valve frequency will likely help tunability... the rest is probably down to setting the right min and max.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

I'm using the DIYAutoTune solenoid. I had seen 39 around. I'll give those a shot. Thanks.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

I set my min and max values. But that slowed down spool a lot because before the delta the valve was held at my max value, not held closed.
nathaninwa
Super MS/Extra'er
Posts: 2639
Joined: Tue Sep 14, 2004 4:17 pm
Location: Aberdeen, Wa

Re: Tuning Boost Control With Bias Table

Post by nathaninwa »

I noticed this today too that with min duty set to 20 that in the logs boost duty is always at 20 and if set to a max of 80 then spool duty was at 80 as well. I went back to 0/100
Volvo 940, 2jzge, MS3Pro, daily
240Z, 2JZ, MS3Pro boost control
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

Is this a bug or a feature?
nathaninwa
Super MS/Extra'er
Posts: 2639
Joined: Tue Sep 14, 2004 4:17 pm
Location: Aberdeen, Wa

Re: Tuning Boost Control With Bias Table

Post by nathaninwa »

Im not sure. Which firmware are you on? Looks like 1.4.5 or earlier? My understanding was the code would run 100 regardless of the min/max settings under spool till the Dela was met. Im just commenting here is all.

Edit, just saw it is a later version than .5
Last edited by nathaninwa on Sat Apr 04, 2015 3:59 pm, edited 1 time in total.
Volvo 940, 2jzge, MS3Pro, daily
240Z, 2JZ, MS3Pro boost control
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

1.4 beta 12. That was my understanding too.
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Re: Tuning Boost Control With Bias Table

Post by muythaibxr »

aidandj wrote:I set my min and max values. But that slowed down spool a lot because before the delta the valve was held at my max value, not held closed.
That means the min was set too high. It should be set to a value just below where it has an effect.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Re: Tuning Boost Control With Bias Table

Post by muythaibxr »

Don't set it back to 0/100 unless 100 actually makes it spool faster than 80. The code was working as intended. Set up properly, the max should be the lowest number that you can set without affecting spool, and the min should be the highest you can set without affecting spool. The max is more important than the min though.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

OK that makes a bit of sense. I had it set to the min and max that I thought it would be using.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

Why should I be using 19.5 instead of 39 though?
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Re: Tuning Boost Control With Bias Table

Post by muythaibxr »

In my experience that works better with that solenoid. It will also slow down the PID loop which may make it easier to tune.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

Did some more testing and tuning. Switched the solenoid to 19.5Hz and that helped considerably.

Raising the minimum duty cycle made the solenoid consistently clicking. Lowering the maximum hindered spool.

I still can't get the control perfect. I've played with a lot of different things and I'm hoping for a bit of help. Attached are some logs and a tune. The title of the log are the PID numbers. So 100-22-0 is P: 100, I: 22, D:0.

Things I've run into. Lowering P gives a nasty overshoot when I is anywhere above 9 or 10. Having I that low means it doesn't seem to hold solid later in the boost curve. D does weird things sometimes.

Advice is greatly appreciated.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

More files
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Tuning Boost Control With Bias Table

Post by E30_Driv3r »

I'm also on the pre-beta 1.4 12 and my PID boost control that was soild with the previous release code seems to be, strange now in its behavior. I'm always hitting my overboost protection. Were there any changes since the last release? Don't want to threadjack but I find it interesting that two people on the same firmware are having strange issues.


The following two pics show the same settings but the code handling them in entirely different ways:
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Tuning Boost Control With Bias Table

Post by aidandj »

Did you tune the bias table?
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Tuning Boost Control With Bias Table

Post by E30_Driv3r »

aidandj wrote:Did you tune the bias table?

Yes, my bias table is tuned. You can see when the code starts it goes to my duty load cell and starts from there.

I'm going to try the newest alpha firmware and see if it's any different.
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Tuning Boost Control With Bias Table

Post by E30_Driv3r »

Ok, so I did some reading and looks like things have changed with this bias table - I thought it was the same as the inital duty table.
Post Reply