[FW MOD] ms2extra 3.2.1 beta gslender v2

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

GintsK
Experienced MS/Extra'er
Posts: 274
Joined: Sat Aug 07, 2004 11:15 am
Location: Riga, Latvia

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by GintsK »

If I choose CLT - then I have no MAT table. And opposite. But in both cases have Rpm. And I can't catch sense under that...

Rpms are involved in target Rpm curve - versus CLT. It is good. But it is just rpm target. Not DC target for initial valve position before PID.

Do I understand correctly? Code allows use user defined DC table for valve position before PID (instead l-k-g value). But I want to define this position from both CLT and MAT - it is reasonable. No?
Some of my instalations:
VW TBI, VW 16V 60-2,
BMW M50 COPs 60-2, BMW M20 and M50 ITBs as Alpha-N, BMW M20 turbo Wasted spark
Opel 20XE Wasted Alpha-N with ITBs
Audi 10VT Audi20V
MR2 3S-GE.............
and over 100 tuned
Greg G
Experienced MS/Extra'er
Posts: 311
Joined: Thu Mar 10, 2011 11:33 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by Greg G »

GintsK wrote:If I choose CLT - then I have no MAT table. And opposite. But in both cases have Rpm. And I can't catch sense under that...

Rpms are involved in target Rpm curve - versus CLT. It is good. But it is just rpm target. Not DC target for initial valve position before PID.

Do I understand correctly? Code allows use user defined DC table for valve position before PID (instead l-k-g value). But I want to define this position from both CLT and MAT - it is reasonable. No?
Then don't choose clt, choose mat :)

The code will look up the initial value from the initial value table based on the target rpm set in the clt vs rpm target table. So the calculation of the duty value will incorporate both clt and mat. Unless you choose clt as the y-axis in the former. Which you shouldn't.. :lol:

Ps. It will also add the dashpot duty and the AC duty to that initial duty value from the table.
1996 Mazda MX-5 1.6L NA6/ Mazdaspeed M45 SC/ BSP AW Intercooler/ Maruha F-cams/ 425cc RX-8 injectors/ DIYPNP

MS2/Extra test mule :)
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by gslender »

GintsK wrote:Do I understand correctly? Code allows use user defined DC table for valve position before PID (instead l-k-g value). But I want to define this position from both CLT and MAT - it is reasonable. No?
GintsK, this is Ken's work and he should probably explain the thinking behind this (I was heading in this direction too, but when I spoke to Ken he suggested I port from MS3 instead of building my own solution).

You set target rpm with CLT in the Closed-loop idle target rpm curve (which has RPM in it for targeting), so when you go to i-v-t you are stating which duty should be needed for a given CLT or MAT when the rpm is being targetted... based on the curve above. When cold, the target rpm is perhaps 1200 rpm and duty needs to be at 55% to ensure soft landing into stable idle. When hot, the target rpm might be 900 rpm and therefore might only need 30% duty to achive a nice step down to correct duty.

I've found that a MAT/RPM duty IVT works best, as really CLT temp has very little to do with the equation (as you already know that if you are targeting a 1100 rpm, the engine must be cold and therefore your required duty for a given MAT is really correct) - CLT is irrelevant in that point as why would be targetting a 1100rpm if the engine is hot ????

So I believe Ken's approach is correct.

G
Mazda MX5 + MS3 Pro
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by muythaibxr »

GintsK wrote:Seems solved!

Gslender, regading this table. What do you think if x axis would be MAT, y - CLT instead of RPMs?
Rpms are unattached value to DC. With same DC we can get full variety of rpms. Depending on some circumstances as oil temperature, electrical load etc.
It's targeted using CLT indirectly. The Target RPMs are set by the CLT-based target curve. The point is to set the duty to the value without load that gives you that RPM. Then you feed forward the electrical loads, AC, etc.. using the proper feature to feed forward those values. We "reattach" the RPM to the duty using the feedforwards.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
GintsK
Experienced MS/Extra'er
Posts: 274
Joined: Sat Aug 07, 2004 11:15 am
Location: Riga, Latvia

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by GintsK »

I do not understand, sorry.
Why then it is not just 2D MAT correction of DC?

Now becomes we have some kind of closed loop table before PID: by changing slope in Rpm direction we can get valve feedback. Similar to ignition aid for idle VS rpm. Is it designed so?

What means "targeted indirectly"? Target curve is for target. Target is for PID. DC table is not for PID it is for valve bias position before PID start to act. How user now can preopen valve for -20deg CLT situation overrun?

Gints
Some of my instalations:
VW TBI, VW 16V 60-2,
BMW M50 COPs 60-2, BMW M20 and M50 ITBs as Alpha-N, BMW M20 turbo Wasted spark
Opel 20XE Wasted Alpha-N with ITBs
Audi 10VT Audi20V
MR2 3S-GE.............
and over 100 tuned
Greg G
Experienced MS/Extra'er
Posts: 311
Joined: Thu Mar 10, 2011 11:33 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by Greg G »

Gints,

We still apply a dashpot value to the initial value table, as well as AC duty adder and voltage corrections, so we come up with what should be the correct duty value to catch the revs on throttle lift. The when CL idle is entered, the current RPM becomes PID target and is ramped down to the normal idle target.

I have it working fairly well in my car, just needs some fine tuning and maybe a long run to find any more hidden bugs. But it is much more predictable than Last Known Good.

To answer your question, you have to make sure -20 temperature is in both tables. Code looks for the target in the CLT vs target RPM table, then looks up the duty from the MAT vs RPM table.

Greg
1996 Mazda MX-5 1.6L NA6/ Mazdaspeed M45 SC/ BSP AW Intercooler/ Maruha F-cams/ 425cc RX-8 injectors/ DIYPNP

MS2/Extra test mule :)
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by gslender »

GintsK wrote:How user now can preopen valve for -20deg CLT situation overrun?
I'll assume in this example that if you CLT is -20 then the engine isn't warm - or at least not close to operating tempature. I will also assume that outside air temp is -30 or lower. I will assume also that you need a higher than normal idle speed (say 1100rpm) as the car isn't at operating tempature. If it is at operating tempature at -20 then there is something really wrong ??

This works simply because -20deg CLT would be 1100 rpm in your "Closed loop idle target rpm curve". The ECU then looks at the IVT to see that 1100 rpm at -30 MAT is 55% duty. Whereas at 30deg CLT the idle might drop to 950rpm and outside MAT would still be -30. The ECU then looks at the IVT to see that 950 rpm at -30 MAT is 45% duty. If MAT for some reason goes to 0deg then the ECU then looks at the IVT to see that 950 rpm at 0 MAT is 40% duty.

And so everything works - is it still hard to understand?

g
Mazda MX5 + MS3 Pro
GintsK
Experienced MS/Extra'er
Posts: 274
Joined: Sat Aug 07, 2004 11:15 am
Location: Riga, Latvia

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by GintsK »

OK... So rpms in this table are just target rpms [table isn't read from actual rpm value] with purpose connect table to CLT target curve?
....Or something additional? I mean what we loose if we change RPM->CLT in this table?

I would call it non-intuitive. Non understandable without clarification. But yes - it should work then.
Sadly - I have to wait for my car. Currently my friend driving it. "for short period"

Gints
Some of my instalations:
VW TBI, VW 16V 60-2,
BMW M50 COPs 60-2, BMW M20 and M50 ITBs as Alpha-N, BMW M20 turbo Wasted spark
Opel 20XE Wasted Alpha-N with ITBs
Audi 10VT Audi20V
MR2 3S-GE.............
and over 100 tuned
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by gslender »

GintsK wrote:OK... So rpms in this table are just target rpms [table isn't read from actual rpm value] with purpose connect table to CLT
Yup, that's it. :|
GintsK wrote: I would call it non-intuitive. Non understandable without clarification.
Really? And what part of the entire ms2 configuration is understandable without clarification?

Oh boy :?
Mazda MX5 + MS3 Pro
Red_Baron
Experienced MS/Extra'er
Posts: 328
Joined: Wed Mar 05, 2008 2:05 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by Red_Baron »

Here is a thought,

Is it possible to have a normal hard-coded warmup table for idle valve position against coolant temp... (we have this already) and then have the closed-loop idle use +/- 15 degrees of ignition timing to hone-in the idle and keep it against the target.

so you have the normal warmup table with a fixed value, I would set his to a couple-of-hundred rpm over-target, and then have closed loop ignition timing management bring it down to target.
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by gslender »

Red_Baron wrote:Here is a thought,

Is it possible to have a normal hard-coded warmup table for idle valve position against coolant temp... (we have this already) and then have the closed-loop idle use +/- 15 degrees of ignition timing to hone-in the idle and keep it against the target.

so you have the normal warmup table with a fixed value, I would set his to a couple-of-hundred rpm over-target, and then have closed loop ignition timing management bring it down to target.

Already there and working on it ... Gonna be called Adaptive Idle Advance.
Mazda MX5 + MS3 Pro
Red_Baron
Experienced MS/Extra'er
Posts: 328
Joined: Wed Mar 05, 2008 2:05 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by Red_Baron »

That's a cool name! It's important to get the name right on these things :)

I think this will be an absoultely awesome addition to the code. Idle advance is so fast it can probably catch all the loads/AC and coolant fan which kick idle out of whack on some engines!
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by gslender »

Red_Baron wrote:Idle advance is so fast it can probably catch all the loads/AC and coolant fan which kick idle out of whack on some engines!
Nice if that would work, but sadly it isn't likely. The advance just isn't strong enough to catch AC or large electrical loads, but it is sure good enough to keep idle rpm dead bang on target. You try it now with this firmware mod as the rpm based idle advance.

Adaptive Idle Advance (AIA) will work off target rpm and delta from that so that it can work from cold startup all the way to hot idle etc. Nice 8)

G
Mazda MX5 + MS3 Pro
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by muythaibxr »

Also, the hard-coded warmup idle valve table with the adaptive advance isn't going to happen.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
tpsretard2
Master MS/Extra'er
Posts: 662
Joined: Thu Feb 14, 2008 4:59 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by tpsretard2 »

gslender wrote:
GintsK wrote:OK... So rpms in this table are just target rpms [table isn't read from actual rpm value] with purpose connect table to CLT
Yup, that's it. :|
GintsK wrote: I would call it non-intuitive. Non understandable without clarification.
Really? And what part of the entire ms2 configuration is understandable without clarification?

Oh boy :?
have you ever used an ecu like Gems or its variants (AEM)
ms is VERY VERY!!! VERY intuitive!!
Red_Baron
Experienced MS/Extra'er
Posts: 328
Joined: Wed Mar 05, 2008 2:05 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by Red_Baron »

Stock ECU on my car idles it at around 6/7 degrees, when I run the MS up that would idle at 900 shaky, but if I shift that to 20/23 degrees goes up to 1100, that's easy enough to cover alternator and fan... I guess my engine is just a bit of a one-off, you guys have to think of all the engines.

It's awesome stuff still; I'm planning on a test this weekend with your code so I'll throw back some logs and feedback if you like, I'm 4cyl 2/alt, 60-2 8000rpm, 4-wire stepper

Cheers!
RB
EDIT: I find MS very intuitive too
GintsK
Experienced MS/Extra'er
Posts: 274
Joined: Sat Aug 07, 2004 11:15 am
Location: Riga, Latvia

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by GintsK »

gslender wrote:
GintsK wrote:OK... So rpms in this table are just target rpms [table isn't read from actual rpm value] with purpose connect table to CLT
Yup, that's it. :|
OK. And then what is sense to choose "use CLT" in mentioned table menu?
GintsK wrote: I would call it non-intuitive. Non understandable without clarification.
Really? And what part of the entire ms2 configuration is understandable without clarification?

Oh boy :?
Good point! :)
However I could find some parts after some digging...
And then your decision is keep this direction?..

Greetings from my wife - she had deep relationships with l-k-g pos in the past! :) She is a master to make this part of code fool!
Some of my instalations:
VW TBI, VW 16V 60-2,
BMW M50 COPs 60-2, BMW M20 and M50 ITBs as Alpha-N, BMW M20 turbo Wasted spark
Opel 20XE Wasted Alpha-N with ITBs
Audi 10VT Audi20V
MR2 3S-GE.............
and over 100 tuned
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by muythaibxr »

The decision on what goes into ms2/extra is mine (and James' and Jean's). This new method works, so we'll be keeping it in the code.

The point of having it be able to switch to CLT was to have the option. I figured someone would ask for it and added it.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
juansh2385
Master MS/Extra'er
Posts: 612
Joined: Fri Feb 25, 2011 4:28 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by juansh2385 »

This is working great but could someone make the necessary changes to enable the diagnostic tab in tuner studio for this firmware.

Juan
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2 beta5

Post by gslender »

juansh2385 wrote:This is working great but could someone make the necessary changes to enable the diagnostic tab in tuner studio for this firmware.

Juan
Not sure I follow you - it is enabled for me... ??
Mazda MX5 + MS3 Pro
Post Reply