Main Menu

HE351 code for me78569

Started by me78569, June 11, 2015, 09:38:57 AM

me78569

#120
Yea if you hold it long enough, but it takes 5 seconds or so. 

It goes kinda like this example so take with grain of salt. 

WOT
1 sec 65000 rpm 20psi
2 sec 100000 rpm 30 psi
3 sec 130000 rpm 38 psi
4 sec 140000 rpm 12 psi
5 sec 120000 rpm 12 psi
6 sec 110000 rpm 13 psi
7 sec 100000 rpm 14psi
8 sec 110000 rpm 20 psi
9 sec 120000 rpm 25 psi
10 sec 130000 rpm 30 psi

then repeat pretty much

I am thinking turbo rpms are increasing too fast from 80,000-120000 and it can't adjust fast enough, also I think the turbo averaging section is delayed enough ( because of 64 reads, you wont see the average come up to actual for a bit due to how averages work) to make it so the vane position is too small for the actual rpm vs averaged rpm if that makes sense?

If I stay at %40-%50 the mid range power is incredible,  anything more and the truck becomes  a monster for a second then the vanes open up fully. 

pondering how to get it under control as I am still having issues with the 130000 position being at 100 haha

else {
          // -----
          // Curve section
               
               if (turbo_rpm <= curve_rpm[0]) { vane_position = constrain(map(turbo_rpm, idle_rpm , curve_rpm[0], Offidle_position, turbo_curve[0]), Offidle_position, turbo_curve[0]);} //turbo_curve[0];}
          else if (turbo_rpm <= curve_rpm[1]) { vane_position = map(turbo_rpm, curve_rpm[0], curve_rpm[1], turbo_curve[0], turbo_curve[1]);}
          else if (turbo_rpm <= curve_rpm[2]) { vane_position = turbo_curve[1];}
          else if (turbo_rpm <= curve_rpm[3]) { vane_position = map(turbo_rpm, curve_rpm[2], curve_rpm[3], turbo_curve[1], turbo_curve[2]);}
          else { vane_position = map(turbo_rpm, curve_rpm[3], curve_rpm[4], turbo_curve[2], turbo_curve[3]);}
        }
      } else if (turbo_rpm < top_end_rpm) {
        vane_position = map(turbo_rpm, curve_rpm[4], top_end_rpm, turbo_curve[3], turbo_curve[4]);
      } else {

               if (turbo_rpm <= 126000) { vane_position = map(turbo_rpm, top_end_rpm, 126000, turbo_curve[4], 200); }
          else if (turbo_rpm <= 130000) { vane_position = map(turbo_rpm, 126000, 130000, 200, 100); }
          else { vane_position = map(turbo_rpm, 130000, 132000, 100, min_position); }
        }
        // Overrun protection
       if (turbo_rpm > 145000) { vane_position = 0;}


Maybe increasing the turbo_curve[4] positions to a large position?  almost like the turbo is being slingshot from 80000 rpm to 140000 rpm right now
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

hakcenter

#121
Well figure out where it is loading up all that inertia.

Set your under 126k to minimum size, and see if it over shoots it, if it does. You need to lower the band.

105 to 120, etc. then to 118, until it stops over shooting it, then retune the curve


if (performance_mode && turbo_rpm <= 120000) { vane_position = map(turbo_rpm, top_end_rpm, 120000, turbo_curve[4] + performance_position, 600); }
          else if (turbo_rpm <= 110000) { vane_position = map(turbo_rpm, top_end_rpm, 120000, turbo_curve[4], 600); }
          else if (turbo_rpm <= 115000) { vane_position = map(turbo_rpm, 120000, 128000, 600, 300); }
          else if (turbo_rpm <= 125000) { vane_position = map(turbo_rpm, 120000, 128000, 300, 200); }
          else { vane_position = map(turbo_rpm, 128000, 130000, 200, min_position); }
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

me78569

already working that out.  Slowly.  I hate burning up this much fuel haha. 
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

Rx7man

I would do something like


int overspeedcompensation = map(turbineshaftspeed,140000,150000,0,900)
overspeedcompensation = constrain(overspeedcompensation,0,900)

vaneposition += overspeedcompensation


some of the logic may be reversed, but I think you get the idea.. if it's over 140,000, start opening the vanes to full open by 150,000... this should work pretty good, and it's only a couple lines of code
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

me78569

#124
that is a good idea. 

Interestingly the 6.7 logs that I have  show that the turbo never goes about 18cm on a WOT run.
The log shows this
Idle pos is 14cm
offidle pos snaps to 7cm
then increases on a curve from 7 cm to 14cm rather quickly then stays there for awhile
then jumps to 18cm for awhile
then back down to 14cm
and the EB apply hovers around 4cm


Point I am wondering about is why is it that a 6.7 cummins with 350-380hp never needs more than 18cm, whereas I need positions of %100 to keep turbo speed in check?

All my testing is done with 100hp injectors and 65hp worth of programmer help.
So butt dyno quality math gives me 235+100+65 = ~400 hp ( closer to 380 hp as we don't trust everything they say)

I am wondering if our freq readings are delayed enough (averaging 64 reads ends up causing latency vs real speed) that we are keeping the vanes too tight down low and "slingshoting" the turbo to 100k+ speeds then the freq catches up and jumps to a large position? 

Now the 64 reads should take less than 100ms for the read[63] to make it to read[0], but is that too slow to keep up with the vanes? 



Really just spit balling here. 


side note, I changed the top_end_rpm to 90000 and changed the top end curves to the below.  This has helped a TON.   I am still getting Overrun, but it is if I am really pushing and it corrects itself quickly.  If I wasn't bored and picky I would call it good and be happy, but I have free time to tune more.

if (turbo_rpm <= 126000) { vane_position = map(turbo_rpm, top_end_rpm, 126000, (turbo_curve[4] - TPS_range), (200 - TPS_range)); }
          else { vane_position = map(turbo_rpm, 126000, 132000, (200 - TPS_range), min_position);}




Question for the programmer master dude haha,  I know the freq readings averaged at 64 are VERY stable, but in your opinion how delayed would a spike in RPM be taking into account that a spike read as read[0] would take 32 more reads to become the middle position?  watching my screen I know that 100,000 to 130000 can happen within 1/4 second. 








Little update, I finally got around to inserting the freq measure into the boostmap code I have.  as I expected by 20-25psi of boost, the turbo shaft speed was climbing past 160,000 rpm :o  the rpm based code is without a doubt the way to go.
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

hakcenter

#125
LOL pretty dangerous boost code there bro.

You can cut the averaging out... which may need to happen post 100k...


      final_sum = 0;
      for (int i = 0; i < 64 ; i++) { final_sum += sum[i]; }
      turbo_rpm = FreqMeasure.countToFrequency(final_sum >> 6);
      turbo_rpm = (turbo_rpm << 6) - (turbo_rpm << 2);
      if (count > 63) { count = 0; }

to

      final_sum = 0;
      if (turbo_rpm < 100000) {
        for (int i = 0; i < 64 ; i++) { final_sum += sum[i]; }
        turbo_rpm = FreqMeasure.countToFrequency(final_sum >> 6);
        turbo_rpm = (turbo_rpm << 6) - (turbo_rpm << 2);
        if (count > 63) { count = 0; }
      } else {
        for (int i = 0; i < 8 ; i++) { final_sum += sum[i]; }
        turbo_rpm = FreqMeasure.countToFrequency(final_sum >> 3);
        turbo_rpm = (turbo_rpm << 6) - (turbo_rpm << 2);
        if (count > 7) { count = 0; }
      }



Also.. I would look to the timer...


  // Update vane_position every 10ms 100k+ / 25ms 60k - 100k / 100ms 0 - 60k
       if (timer % 10 == 0 && turbo_rpm > 100000) { update_vane_position = true; }
  else if (turbo_rpm > 60000 && timer % 25 == 0) { update_vane_position = true; }
  else if (timer % 50 == 0) { update_vane_position = true; }


Change %10 to... %4 to update position every 4ms.. which will make it react faster.. even 2ms if you want. wouldn't go faster than that thou.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

me78569

yea,  I thought that might be the case, which is why I moved off of it weeks ago haha.


Still bugging me that 6.7s only need 18cm to keep things in check.

If you can to enlighten me more,  The shaft of the turbo has 1 notch on it? 4 notches etc?  How does the code know what 1 revolution is?  Is that not how a vr sensor works?
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

hakcenter

#127
from what I read and saw... its only 1 notch, so 1 count is 1 rev.

Seems about right cause it hits like a truck around 128k, whereas 115 was pretty fast.. but 128 was like weeeeeee

To be fair the 6.7 doesn't have an intro into 120k @ 12~cm, so there's more headroom for them to be safe, etc etc.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

me78569

#128
Very true. 

I cut down your 64 reads to 32 and things seem to be calming down some in the "slinshot" from 100k to 130+  I absolutely want to retain the averaging function of rpms so this seems to be a good median, as 16 reads was all over compared to 64 and 32.

I have moved all positions up and will test more in the morning.   


It's a good free hobby at this point haha.


Edit: finally found a rebuild video of the he351ve.  The shaft clearly has one notch as expected.  haha
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

hakcenter

Well I have good news and not so good news.


Your overspin made me want to go ahead and push my new clutch setup. So far seems to be holding.. I probably should of greased the throwout bearing a bit more since I can feel it a bit in the pedal now as to opposed to first drive, oh well whatever.


The bad news is, yep overspinning now too haha. And pretty bad.

Here's my current stuff:

Loop

final_sum = 0;
      if (turbo_rpm < top_end_rpm) {
        for (int i = 0; i < 64 ; i++) { final_sum += sum[i]; }
        turbo_rpm = FreqMeasure.countToFrequency(final_sum >> 6);
        turbo_rpm = (turbo_rpm << 6) - (turbo_rpm << 2);
        if (count > 63) { count = 0; }
      } else {
        for (int i = 0; i < 4 ; i++) { final_sum += sum[i]; }
        turbo_rpm = FreqMeasure.countToFrequency(final_sum >> 2);
        turbo_rpm = (turbo_rpm << 6) - (turbo_rpm << 2);
        if (count > 3) { count = 0; }
      }


Timer1

if (turbo_rpm < top_end_rpm) {
    if (vane_position >= last_vane_position + 20 && last_vane_position < max_position - 10) {
      final_vane_position = last_vane_position + 10;
    } else if (vane_position <= last_vane_position - 20 && last_vane_position > min_position + 10) {
      final_vane_position = last_vane_position - 10;
    } else if (vane_position - 10 >= last_vane_position || vane_position + 10 <= last_vane_position) {
      if (vane_position > last_vane_position + 2 && last_vane_position < max_position - 2) {
        final_vane_position = last_vane_position + 2;
      } else if (vane_position < last_vane_position - 2 && last_vane_position > min_position + 2) {
        final_vane_position = last_vane_position - 2;
      }
    }
  } else {
    if (vane_position > last_vane_position + 10 || vane_position < last_vane_position - 5) {
      final_vane_position = vane_position;
    } else {
      final_vane_position = last_vane_position;
    }
  }

You want to remove the jitter, but let it get bigger faster than smaller.

Timer2

// Update vane_position every 10ms 100k+ / 25ms 60k - 100k / 100ms 0 - 60k
       if (timer % 4 == 0 && turbo_rpm > top_end_rpm) { update_vane_position = true; }
  else if (turbo_rpm > curve_rpm[4] && timer % 25 == 0) { update_vane_position = true; }
  else if (timer % 50 == 0) { update_vane_position = true; }


WOT Curve

} else {
               if (performance_mode && turbo_rpm <= 120000) { vane_position = map(turbo_rpm, top_end_rpm, 120000, turbo_curve[4] + performance_position, 480); }
          else if (turbo_rpm <= 120000) { vane_position = map(turbo_rpm, top_end_rpm, 120000, turbo_curve[4], 480); }
          else if (turbo_rpm <= 128000) { vane_position = map(turbo_rpm, 120000, 128000, 480, 140); }
          else { vane_position = map(turbo_rpm, 128000, 130000, 140, min_position); }
        }


And ya.. its a bit more managable now.

The really really bad news is, my truck can't keep traction now. LSD 355 gears on 265x75x16 BFG AT's (the baha winners). So I don't know what else to do but get bigger tires or dial my pump down.. which I probably should since I can't see the tail pipe at night over at Sears where I do all my WOT pulls.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

hakcenter

#130
I'll come up with a more ingenious way to keep rpms around 128k.. just going to take more thought now

I did go through the cummins log to notice that basically position 506 to 372, with no incrementing at all. 0xfa 0x01 to 0x74 0x01

I imagine I'll probably end up writing stepping, instead of mapping up to that point.. seems like a good idea... lol

This'll be the next thing I try..


if (performance_mode && turbo_rpm <= 120000) { vane_position = map(turbo_rpm, top_end_rpm, 120000, turbo_curve[4] + performance_position, 480); }
          else if (turbo_rpm <= 120000) { vane_position = map(turbo_rpm, top_end_rpm, 120000, turbo_curve[4], 480); }
          else if (turbo_rpm <= 122000) { vane_position = 400; }
          else if (turbo_rpm <= 124000) { vane_position = 320; }
          else if (turbo_rpm <= 126000) { vane_position = 240; }
          else if (turbo_rpm <= 128000) { vane_position = 160; }
          //else if (turbo_rpm <= 128000) { vane_position = map(turbo_rpm, 120000, 128000, 480, 140); }
          else { vane_position = map(turbo_rpm, 128000, 130000, 160, min_position); }


And if it works pretty well I may go back to 64 averages, 10ms updates, no jitter removal, etc etc
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

me78569

The more you hash it out the better it gets.  I'll test your changes in the am
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

me78569

#132
well I might have figured out part of my issues.   When I set the averaging to 4 rather than 32 or 64 I am seeing random rpm reads of %30-%40 higher or lower than the rest of the group.  Seems as I drive the worse it gets then it clears up and comes back. 

I am wondering if I am getting interference on the turbo speed wires.  I am going to twist them and wrap in tinfoil tonight and see if that helps.

Idle rpms of 12k I see jumps to 5k and up to 20k,  at 50k I see 30k to 70k, and above 100k I see 80k to 170k very odd.
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

Rx7man

The sensor wires *should* be pretty resistant to interference as they operate on a differential voltage... The interference you get on 1 of the wires you'll also get on the other (since they run together), and the chip is designed to exclude common voltages between them.. but it can't hurt anything.
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

me78569

#134
From CF post

P2580 Turbo Speed Sensor Circuit Low

Turbo speed is used to throw a MIL and the ecm will try and estimate turbo speed.

I don't think the 6.7 tuning uses shaft speed to directly tune the turbo curves, rather it uses shaft speed to ensure the turbo stays within it's bounds.

It might explain that jump from 14 position to 18 directly in the canbus logs. Seems that maybe the turbo was reaching the limit on a long pull at 14cm^2 and shaft speed hit the limit, so the vanes snapped to 18cm.

This in theory would allow the turbo to keep making maximum boost, while reducing the speed some.


Quote from: Rx7man on July 22, 2015, 01:27:54 PM
The sensor wires *should* be pretty resistant to interference as they operate on a differential voltage... The interference you get on 1 of the wires you'll also get on the other (since they run together), and the chip is designed to exclude common voltages between them.. but it can't hurt anything.

Any theories on why I am seeing a HUGE jump in RPMS?    Only think I know is the wires from the sensor on the turbo are twisted. figure there might be a reason for it? haha.
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj