MS2Extra SD Staged Injection table TPS based

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

Moderators: jsmcortina, muythaibxr

Post Reply
martin2day
Experienced MS/Extra'er
Posts: 169
Joined: Tue Nov 01, 2016 11:56 am

MS2Extra SD Staged Injection table TPS based

Post by martin2day »

Hello,

first sorry for my bad english. I am from Germany and my english is not the best.

I have a SBC in my cobra with a TBI. It is a body from a Atomic EFI i have convert to megasquirt.
The front TPS open first to about 48% TPS (the rear TPS is full close), the the second beginn also to open. At 100% TPS both (front/rear) TPS are full open.
I have to injectors in the front and 2 in the rear above the TPS.

I run a MS2Extra in SD mode.
To about 48% TPS the car run great. At 48%TPS i need staged Injection to squirt the rear injectors.
Here i need a table that is rpm/tps based.

The problem is i run SD so the staged injection table is in fuel load and not in tps.

To solve the problem i look in the ms2_extra_inj.c and find the part:

Code: Select all

if ((flash10.staged & 0x7) == 5) {
        /* This mode is a bit more complicated... we look up a value in an loadxRPM table,
         * and use the percent there to figure out what percentage through the staging process
         * the user wants to be at... 0% is no staging, and 100% is fully staged
         */
        staged_transition_percent = intrp_2dctable(outpc.rpm, outpc.fuelload, 6, 6,
                pg10_ptr->staged_rpms,
                pg10_ptr->staged_loads,
                (unsigned char *)pg10_ptr->staged_percents, 1);
I change outpc.fuelload to outpc.tps and run the car.
First i think it does what i want, but if i look closer there are some problems. :-(
Over a wide range it does what i want, but only at one TPS% (54.6) it got to 100% staged.... before and after 54.6% it does what i want.
If i look closer and recalculate i see that the calculation isn't right.
At 70% TPS i will have 45% staged.
At this point my PW1 is 6.22mss
6.22-1.1(deadtime)=5.22 5.22*0.45=2.35ms 2,35ms+1.1(deadtime)=3,5ms for PW2 but in the log i see only 2,5ms for PW2?

I hope you understand what my problem is. :-)

I attended my MSQ and a log with the problem.
I hope someone can help me... i don't want to switch to alpha-n... :-)
Test.zip
Bildschirmfoto 2017-04-26 um 20.02.51.png
Bildschirmfoto 2017-04-26 um 20.02.16.png
Thank u very much
Martin
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MS2Extra SD Staged Injection table TPS based

Post by dontz125 »

That's some impressive work, but I think you're trying WAY too hard.

1. Does the rear throttle feed the same intake manifold as the front, or a different manifold? If the same, then the front injectors can provide fuel for the air from the front and rear throttles. (I really do have to believe it's the same manifold.)

2. The staged injection system allows 'TPS' as a parameter; there is nothing stopping you from selecting 48% as the switch point.

3. What is the duty cycle (% time ON) of your front injectors when the rear begins to open? If it's << 85% AND the answer to question 1 is "the same", you could use a duty-based staging, and use only the front injectors until the rear throttle is more open.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: MS2Extra SD Staged Injection table TPS based

Post by slow_hemi6 »

I ran a staged TBI for years. I would suggest instead of using the table, use primary staging of TPS AND secondary staging of MAP. I staged around 60 TPS and 80 MAP. Under light load my car will easily go to 6000rpm on the primaries alone. When you have 50% primary opening point, secondaries just do not get opened unless you are going full throttle. So Map is a good way to make sure it doesn't stage unless you seriously want it to. I am currently not running mine as staged because after driving around for a long period of not actually using the secondary injectors, I had to take them out and clean them. As standard my TBI opens the rear plates just after the fronts but can be adjusted out to start about 1/3 the fronts. I have another custom linkage that takes it closer to 50% front for when I run staged. Back to standard at the moment and it really doesn't make much difference. I originally moved to staged because it made tuning AE easier.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
martin2day
Experienced MS/Extra'er
Posts: 169
Joined: Tue Nov 01, 2016 11:56 am

Re: MS2Extra SD Staged Injection table TPS based

Post by martin2day »

Hello,

thank u for the quick answer.

Yes the rear throttle feed the same manifold.
I have this manifold: http://www.airflowresearch.com/sbc-tito ... eet-strip/

First i have usesd TPS als paramater fpor staged injection. But it does not function very well. The problem hear is i used as u say 48% as swich point but at
47% the front plades are open about 50%... the rear are full closed. 100% fuel goes troth the front inj.
at 48% the front plades are 52% open... the rear plades are only 3% open. With Staged Injecton TPS pased at this point 50% fuel is on the front and 50% fuel is on the rear inj.
At this point my AFR goes from 12.0 to 15.5.... not good at WOT...
So i deside the way to switch to TPS based Table. :-)

My dyty at the switch point in my last log goes from 46 to 64%... debend on rpm ant tps.
But i also see if i only rev the car very quick with onbly 30% tps the duty goes up to 75%... so i think i can use duty only above 80% or higher because i can only inject fuel at the rear inj. if the rear blades are open...

@slow_hemi6:
I don't understand how i can change this in MS. Primiy an TPS and sec. on MAP?
How can i cange to stage around 60 TPS and 80 MAP? :-)

If i undersand you right u drive only with inj. in the front blades... so at WOT only air get throuh the rear blades..... At this point i have doubt that the rear cylinders do not get enough fuel... and the front cylinders get to much fuel.... i only have an lambda at the collector from zylinders frome one side.
At your TPI are the inj. over the blades?

At my TPI it is also that the rear plates open just after the fronts, but in my light car and high power engine the setup is much better if i drive the car at light load with only the first blades...

Martin
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: MS2Extra SD Staged Injection table TPS based

Post by slow_hemi6 »

No I have 4 injectors. 2 primary and 2 secondary. All are 630cc/m. This is how I had it set. 70kpa in this shot but I used 80kpa when I went to a larger cam. Keep your eye on primary duty cycle before staging.
Screenshot (36).jpg
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
martin2day
Experienced MS/Extra'er
Posts: 169
Joined: Tue Nov 01, 2016 11:56 am

Re: MS2Extra SD Staged Injection table TPS based

Post by martin2day »

Thank you,

now i understand... an my engine this option doesn't seem to do it right...
See the picture....
Bildschirmfoto 2017-04-27 um 18.36.36.png
Before the second blade open i have about 92kPa... and than no more than 93kPa with 70% TPS.... so the second option MAP based for staged injection is every time on... or off.... :-)

In the next picture you can see the problem if i only use staged TPS based... at 49%TPS... at this point i go real lean near WOT.... not good.
Bildschirmfoto 2017-04-27 um 18.42.34.png
At more %TPS it worked better, but also not good.

Regards Martin
martin2day
Experienced MS/Extra'er
Posts: 169
Joined: Tue Nov 01, 2016 11:56 am

Re: MS2Extra SD Staged Injection table TPS based

Post by martin2day »

Hello,

after reeding the code and calculate some parts i have found the first solution.
If i set the point auf 70% TPS to 50% Staging i think if the base PW is 10ms and i have the same injectors front and rear the msq make 6,66ms front and 3,33ms rear.... but the calculation auf the msq make 7,5ms front and 2,5ms rear...

calculated_pw1=base_pw1-(staged_transition_percent*(base_pw1-calculated_base_pw1)/1000
calculated_pw2=(calculated_base_pw1*staged_transition_percent) / 1000

staged_transition_percent calculated_pw1 calculated_pw2
0% =10 -( 000 * (10-5)/1000 =10 =5*0/1000 = 0
20% =10 -( 200 * (10-5)/1000 =9 =5*200/1000 = 1
50% =10 -( 500 * (10-5)/1000 =7,5 =5*500/1000 =2,5
75% =10 -( 750 * (10-5)/1000 =6,25 =5*750/1000 =3,75
85% =10 -( 850 * (10-5)/1000 =5,75 =5*850/1000 =4,25
100% =10 -( 1000 * (10-5)/1000 =5,0 =5*1000/1000 =5,0

So i can change my table to get the right PW.

So i only hat the problem that at 54,6% TPS the staged goes to 100% staged.... this is what i don't understand.... the TPS Signal is very stable.
And i see this happen 2 times in my log and only at 54,6% TPS ans on no other TPS value.... :-(

Regards Martin
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: MS2Extra SD Staged Injection table TPS based

Post by slow_hemi6 »

Not following you. What is it not doing? Seems to be holding the AFR through the transition, perhaps a little rich but that would just be a little tuning.
Before the second blade open i have about 92kPa... and than no more than 93kPa with 70% TPS.... so the second option MAP based for staged injection is every time on... or off.... :-)
Correct you can reach atmospheric on your primaries... and opening the secondary to 70% is still going to have your manifold at atmosheric. At almost no vacuum situations like this there is no pressure difference between the more open primary and the less open secondary. So you don't want to fire the secondary injectors till you get some air speed/flow through the secondary. This happens a lot slower when your manifold has no vacuum, so on/off is applicable. It is actually on/off with transition.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
martin2day
Experienced MS/Extra'er
Posts: 169
Joined: Tue Nov 01, 2016 11:56 am

Re: MS2Extra SD Staged Injection table TPS based

Post by martin2day »

Hello,

okay, my problem is not fix.
I hope someone can help my.
Please looking on the following picture. I think the staging code does not calculate right.
As u see in the 3 diagram the PW is at approx 6ms and the PW2 at approx 1,3ms... the TPS is at about 50%... low staging.
At one time u see, that PW and PW2 switch to the same value.... so the staging go to 100%.... See my Staging Table also attaged.
As you see at 50% TPS i will only have 4% Staging....

What cause the problem that staging thing 100% and go to halfe PW?

Regards Martin
Bildschirmfoto 2017-05-07 um 14.39.00.png
123.png
martin2day
Experienced MS/Extra'er
Posts: 169
Joined: Tue Nov 01, 2016 11:56 am

Re: MS2Extra SD Staged Injection table TPS based

Post by martin2day »

Hello,

i have change to the original Software 3.4.2.
Today i change to Alpha-N and drive the car.
One time the staged injection make the same error like the code i have change...
Please see LOG File 1322.279s... :-(
He goes from low % staged to full stage back to low staged... you see this in PW and PW2.
But my TPS does only change small, and don't go to 100%. My TPSdot is zero. (WOT curve)

I hope someone can help me to find whats wrong.
Thank u so much.
Martin
2017-05-11_18_modified.msl
2017-05-11_22.04.08.msq
Edit: I find out... the error is at 51,1% TPS my Staged Table say
50%TPS = 8% Staging
60%TPS = 28% Staging
so 51,1% TPS are approx 10%Staging.... and at this point it goes to 100% Staging....
Could it be there are any problem with 10% to 100%...

Martin
martin2day
Experienced MS/Extra'er
Posts: 169
Joined: Tue Nov 01, 2016 11:56 am

Re: MS2Extra SD Staged Injection table TPS based

Post by martin2day »

Hello,

i take a look into the source code.
ms2_extra_inj.c
This is the line were i think my problem is.

Code: Select all

  } else if (staged_transition_percent == 100) {
            flagbyte4 |= flagbyte4_staging_on;
            pw_staged1 = pw_staged2 = calculated_base_pw1;
            if (base_pw2 !=0) {
                pw_staged3 = pw_staged4 = calculated_base_pw2;
            }
If i right 10% in the Staging Table.... what value have got

Code: Select all

staged_transition_percent

Code: Select all

staged_transition_percent = intrp_2dctable(outpc.rpm, outpc.fuelload, 6, 6,
                pg10_ptr->staged_rpms,
                pg10_ptr->staged_loads,
                (unsigned char *)pg10_ptr->staged_percents, 1);
10 or 100? :-)

My hope is... 100.
So the equation is:

Code: Select all

} else if (staged_transition_percent == 1000) {
            flagbyte4 |= flagbyte4_staging_on;
            pw_staged1 = pw_staged2 = calculated_base_pw1;
            if (base_pw2 !=0) {
                pw_staged3 = pw_staged4 = calculated_base_pw2;
            }
This would help me.
I hope you understand what i want to say. :-)

Regards Martin
Alfagta
Experienced MS/Extra'er
Posts: 239
Joined: Wed Aug 21, 2013 2:54 am

Re: MS2Extra SD Staged Injection table TPS based

Post by Alfagta »

This is for sure a bug within the code.
The intrp_2dctable function returns the table value *10 if the last instruction is set to 1.

So this:

Code: Select all

staged_transition_percent == 100
must be changed to:

Code: Select all

staged_transition_percent == 1000
I have compiled it with this change. Martin will test and confirm.

James can you confirm that this is a bug?

Best Regards
Alfa 156 GTA
Alfa 75 Race Car MS III -- alway latest FW
Alfa 164 V6 Turbo
Alfa 155 2,5TD RIP
Test MS II --always latest FW
Tunerstudio V2.6.11 Registered
MegaLog Viewer V3.4.04 Registered
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MS2Extra SD Staged Injection table TPS based

Post by jsmcortina »

Alfagta wrote:This is for sure a bug within the code.

Code: Select all

staged_transition_percent == 1000
James can you confirm that this is a bug?
This line was changed in MS3 in 2010, so I'm inclined to agree that it is a way old typo. Once you've confirmed the fix, I have some other MS2/Extra changes pending and can put out another beta.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Alfagta
Experienced MS/Extra'er
Posts: 239
Joined: Wed Aug 21, 2013 2:54 am

Re: MS2Extra SD Staged Injection table TPS based

Post by Alfagta »

Hello,

i can confirm now that the change to this:

Code: Select all

staged_transition_percent == 1000
works like a charm.

Before this change the staging goes to 100% everytime we have a 10% value within the table.
After the change dis does not happen again.
Staging goes only to 100% now if 100% is in the table.

I have looked at the interpolate function and it is clea that we must compare with 1000.
Becaue the last parameter for the fucntion defines to multiply the return value by 10.
So 100% from the table becomes 1000% after the lookup.

James can you fix this for the next firmware update?

Thanks
Alfa 156 GTA
Alfa 75 Race Car MS III -- alway latest FW
Alfa 164 V6 Turbo
Alfa 155 2,5TD RIP
Test MS II --always latest FW
Tunerstudio V2.6.11 Registered
MegaLog Viewer V3.4.04 Registered
Post Reply