HE351VE in a 4g63

Started by EvoAuto, July 15, 2015, 12:39:07 AM

EvoAuto

Quote from: hakcenter on July 31, 2015, 01:13:50 PM
Not on a dsm,  there's no real output. It communicates at 1953 baud, etc

Only way would be to interface the boost gauge output and make it a knock gauge. Then measure the output on an adc on the arduino.

I have an AEM ECU. It has a few options for output.

hakcenter

Is the new curve any better or is it lugging the motor to spool up?
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.

EvoAuto

#32
Quote from: hakcenter on August 01, 2015, 12:58:38 AM
Is the new curve any better or is it lugging the motor to spool up?

It is too restrictive. Engine seems to choke after 2500RPM. I will update with the new map I'm trying out. Car is at the body shop right now. I get it back on Wednesday.

Ryan


EvoAuto

Went for a drive tonight. I am having trouble controlling boost with the VGT. No matter what I set the "top_end_rpm" value to it easily exceeds it. At roughly 100000 RPM I was at 15 PSI tonight. I had set the "top_end_rpm" to 55000 just to test the VGT. I wanted to set a low number because I disabled my wastegate and didn't want to overboost. It didn't seem to change anything. Pressure would climb to 15+PSI before I would let go. Here is the settings I was using. I can't post a log from controller. Windows 10 will not copy the entire log to paste into notepad. Just a few lines.

hakcenter

#35
top_end_rpm is the intro rpm into the top end control. If you want to prevent it from exceeding the top_end_rpm set the last curve point value to 40, but that isn't really the right way.

I've taken the liberty of re-writing the top end section for you.

const unsigned long top_end_rpm = 94000;

The new intro rpm is at 94,000


        // -----
        // TOP End Control Section
             if (performance_mode && turbo_rpm <= 96000) { vane_position = map(turbo_rpm, top_end_rpm, 96000, turbo_curve[4] + performance_position, 580); }
        else if (turbo_rpm <= 96000) { vane_position = map(turbo_rpm, top_end_rpm, 96000, turbo_curve[4], 600); }
        else if (turbo_rpm <= 98000) { vane_position = 500; }
        else if (turbo_rpm <= 100000) { vane_position = 400; }
        else if (turbo_rpm <= 102000) { vane_position = 340; }
        else if (turbo_rpm <= 104000) { vane_position = 280; }
        else { vane_position = map(turbo_rpm, 104000, 106000, 280, min_position); }
        if (turbo_rpm > 106000) { vane_position = min_position; }
        // Overrun protection
        if (turbo_rpm > 130000) { vane_position = 0; };

The new top end control tries to keep the shaft speed under 106,000. Adjust that section if you want to raise / lower the total top rpm of the turbo.

Also I had noticed you had minimum_position = 600;. That's really bad. The min / max positions are for constraints, and are really for hard-coded maximums do not adjust these at all. Leave them at 40 / 940. With it set at 600, the turbo can't get any larger and prevent over-run.


Please use my attached zip, at the bottom of this post, or here, I've updated your setup to 1.1.1
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.

EvoAuto

Thank you for doing that. Looks like the code has changed . I will have to familiarize myself with it. When I try to compile and send, it gives me the following error. Not sure if I am doing something wrong.


AA_SETUP.ino: In function 'void setup()':
AA_SETUP:14: error: 'lbb_version' was not declared in this scope
AA_SETUP:21: error: 'FreqMeasure' was not declared in this scope
AA_SETUP:26: error: 't1' was not declared in this scope
AA_SETUP:27: error: 't2' was not declared in this scope
AA_SETUP:32: error: 'CAN1' was not declared in this scope
AA_SETUP:32: error: 'NORMAL' was not declared in this scope
AA_SETUP:38: error: 'SWITCH_SPARE' was not declared in this scope
AA_SETUP:42: error: 'idle_rpm' was not declared in this scope
AA_SETUP:44: error: 'idle_walkdown_rpm' was not declared in this scope
AA_SETUP:46: error: 'idle_position' was not declared in this scope
AA_SETUP:48: error: 'cruise_position' was not declared in this scope
AA_SETUP:49: error: 'HEADER_JP2' was not declared in this scope
AA_SETUP:49: error: 'performance_position' was not declared in this scope
AA_SETUP:49: error: 'perf_pos_1' was not declared in this scope
AA_SETUP:49: error: 'performance_position' was not declared in this scope
AA_SETUP:49: error: 'perf_pos_2' was not declared in this scope
AA_SETUP:51: error: 'performance_position' was not declared in this scope
AA_SETUP:54: error: 'HEADER_JP1_1' was not declared in this scope
AA_SETUP:54: error: 'HEADER_JP1_2' was not declared in this scope
AA_SETUP:56: error: 'turbo_curve' was not declared in this scope
AA_SETUP:56: error: 'turbo_curve_1' was not declared in this scope
AA_SETUP:59: error: 'turbo_curve' was not declared in this scope
AA_SETUP:59: error: 'turbo_curve_2' was not declared in this scope
AA_SETUP:62: error: 'turbo_curve' was not declared in this scope
AA_SETUP:62: error: 'turbo_curve_3' was not declared in this scope
AA_SETUP:65: error: 'turbo_curve' was not declared in this scope
AA_SETUP:65: error: 'turbo_curve_4' was not declared in this scope
AA_SETUP:70: error: 'curve_rpm' was not declared in this scope
AA_SETUP:74: error: 'turbo_curve' was not declared in this scope
AA_SETUP:109: error: 'top_end_rpm' was not declared in this scope
AA_SETUP:119: error: 'serial_out' was not declared in this scope
A_LOOP.ino: In function 'void loop()':
A_LOOP:20: error: 't1' was not declared in this scope
A_LOOP:21: error: 't2' was not declared in this scope
A_LOOP:23: error: 'FreqMeasure' was not declared in this scope
A_LOOP:30: error: 'turbo_rpm' was not declared in this scope
CALCULATE_MODES.ino: In function 'void calculate_modes()':
CALCULATE_MODES:12: error: 'port_d' was not declared in this scope
CALCULATE_MODES:13: error: 'SWITCH_CRUISE' was not declared in this scope
CALCULATE_MODES:13: error: 'cruise_mode' was not declared in this scope
CALCULATE_MODES:13: error: 'cruise_mode' was not declared in this scope
CALCULATE_MODES:14: error: 'SWITCH_PERFORMANCE' was not declared in this scope
CALCULATE_MODES:14: error: 'performance_mode' was not declared in this scope
CALCULATE_MODES:14: error: 'performance_mode' was not declared in this scope
CALCULATE_MODES:15: error: 'SWITCH_BRAKE' was not declared in this scope
CALCULATE_MODES:15: error: 'brake_mode' was not declared in this scope
CALCULATE_MODES:15: error: 'brake_mode' was not declared in this scope
CALCULATE_MODES:17: error: 'current_mode' was not declared in this scope
CALCULATE_MODES:18: error: 'idle_mode' was not declared in this scope
CALCULATE_MODES:19: error: 'idle_walkdown_mode' was not declared in this scope
CALCULATE_MODES:20: error: 'cruise_mode' was not declared in this scope
CALCULATE_MODES:21: error: 'performance_mode' was not declared in this scope
CALCULATE_MODES:22: error: 'brake_mode' was not declared in this scope
CALCULATE_MODES:23: error: 'spare_mode' was not declared in this scope
CALCULATE_MODES:25: error: 'cruise_mode' was not declared in this scope
CALCULATE_MODES:25: error: 'brake_mode' was not declared in this scope
CALCULATE_MODES:25: error: 'performance_mode' was not declared in this scope
CALCULATE_MODES:27: error: 'brake_mode' was not declared in this scope
CALCULATE_MODES:27: error: 'performance_mode' was not declared in this scope
CALCULATE_VANE_POSITION.ino: In function 'void calculate_vane_position()':
CALCULATE_VANE_POSITION:12: error: 'turbo_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:12: error: 'minimum_turbo_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:13: error: 'brake_mode' was not declared in this scope
CALCULATE_VANE_POSITION:13: error: 'cruise_mode' was not declared in this scope
CALCULATE_VANE_POSITION:14: error: 'curve_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:18: error: 'idle_check' was not declared in this scope
CALCULATE_VANE_POSITION:19: error: 'idle_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:20: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:20: error: 'idle_position' was not declared in this scope
CALCULATE_VANE_POSITION:21: error: 'idle_mode' was not declared in this scope
CALCULATE_VANE_POSITION:22: error: 'idle_walkdown_mode' was not declared in this scope
CALCULATE_VANE_POSITION:24: error: 'idle_mode' was not declared in this scope
CALCULATE_VANE_POSITION:25: error: 'idle_walkdown_mode' was not declared in this scope
CALCULATE_VANE_POSITION:25: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:25: error: 'last_vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:25: error: 'quarter_cm' was not declared in this scope
CALCULATE_VANE_POSITION:25: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:25: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:30: error: 'idle_walkdown_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:30: error: 'idle_check' was not declared in this scope
CALCULATE_VANE_POSITION:30: error: 'idle_walkdown_mode' was not declared in this scope
CALCULATE_VANE_POSITION:30: error: 'idle_walkdown_mode' was not declared in this scope
CALCULATE_VANE_POSITION:31: error: 'idle_walkdown_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:31: error: 'idle_check' was not declared in this scope
CALCULATE_VANE_POSITION:32: error: 'idle_walkdown_mode' was not declared in this scope
CALCULATE_VANE_POSITION:32: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:32: error: 'last_vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:32: error: 'quarter_cm' was not declared in this scope
CALCULATE_VANE_POSITION:33: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:33: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:34: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:34: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:35: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:35: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:36: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:36: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:38: error: 'top_end_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:39: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:39: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:43: error: 'performance_mode' was not declared in this scope
CALCULATE_VANE_POSITION:43: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:43: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:43: error: 'performance_position' was not declared in this scope
CALCULATE_VANE_POSITION:44: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:44: error: 'turbo_curve' was not declared in this scope
CALCULATE_VANE_POSITION:45: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:46: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:47: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:48: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:49: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:49: error: 'min_position' was not declared in this scope
CALCULATE_VANE_POSITION:50: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:50: error: 'min_position' was not declared in this scope
CALCULATE_VANE_POSITION:52: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:56: error: 'performance_mode' was not declared in this scope
CALCULATE_VANE_POSITION:56: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:56: error: 'top_end_rpm' was not declared in this scope
CALCULATE_VANE_POSITION:57: error: 'performance_position' was not declared in this scope
CALCULATE_VANE_POSITION:59: error: 'vane_position' was not declared in this scope
CALCULATE_VANE_POSITION:59: error: 'min_position' was not declared in this scope
MODE_CRUISE.ino: In function 'void cruise()':
MODE_CRUISE:12: error: 'turbo_rpm' was not declared in this scope
MODE_CRUISE:12: error: 'vane_position' was not declared in this scope
MODE_CRUISE:12: error: 'one_cm' was not declared in this scope
MODE_CRUISE:13: error: 'turbo_rpm' was not declared in this scope
MODE_CRUISE:13: error: 'vane_position' was not declared in this scope
MODE_CRUISE:13: error: 'half_cm' was not declared in this scope
MODE_CRUISE:14: error: 'vane_position' was not declared in this scope
MODE_CRUISE:14: error: 'min_position' was not declared in this scope
MODE_CRUISE:15: error: 'turbo_rpm' was not declared in this scope
MODE_CRUISE:15: error: 'vane_position' was not declared in this scope
MODE_CRUISE:15: error: 'quarter_cm' was not declared in this scope
MODE_CRUISE:16: error: 'vane_position' was not declared in this scope
MODE_CRUISE:16: error: 'cruise_position' was not declared in this scope
MODE_EXHAUST_BRAKE.ino: In function 'void exhaust_brake()':
MODE_EXHAUST_BRAKE:12: error: 'turbo_rpm' was not declared in this scope
MODE_EXHAUST_BRAKE:12: error: 'vane_position' was not declared in this scope
MODE_EXHAUST_BRAKE:12: error: 'vane_position' was not declared in this scope
MODE_EXHAUST_BRAKE:12: error: 'max_position' was not declared in this scope
SERIAL_OUTPUT.ino: In function 'void serial_output()':
SERIAL_OUTPUT:18: error: 'turbo_rpm' was not declared in this scope
SERIAL_OUTPUT:18: error: 'minimum_turbo_rpm' was not declared in this scope
SERIAL_OUTPUT:19: error: 'vane_position' was not declared in this scope
SERIAL_OUTPUT:33: error: 'last_vane_position' was not declared in this scope
SERIAL_OUTPUT:77: error: 'turbo_accel' was not declared in this scope
SERIAL_OUTPUT:110: error: 'current_mode_array' was not declared in this scope
SERIAL_OUTPUT:110: error: 'current_mode' was not declared in this scope
In file included from AA_SETUP.ino:11:0:
TIMER1_SET_TURBO_POSITION.ino: In function 'void set_turbo_position()':
TIMER1_SET_TURBO_POSITION:13: error: 'vane_position' was not declared in this scope
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:87:35: note: in definition of macro 'constrain'
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
                                   ^
TIMER1_SET_TURBO_POSITION:13: error: 'min_position' was not declared in this scope
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:87:41: note: in definition of macro 'constrain'
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
                                         ^
TIMER1_SET_TURBO_POSITION:13: error: 'max_position' was not declared in this scope
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:87:60: note: in definition of macro 'constrain'
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
                                                            ^
TIMER1_SET_TURBO_POSITION:14: error: 'final_vane_position' was not declared in this scope
TIMER1_SET_TURBO_POSITION:16: error: 'turbo_rpm' was not declared in this scope
TIMER1_SET_TURBO_POSITION:16: error: 'top_end_rpm' was not declared in this scope
TIMER1_SET_TURBO_POSITION:16: error: 'curve_rpm' was not declared in this scope
TIMER1_SET_TURBO_POSITION:16: error: 'brake_mode' was not declared in this scope
TIMER1_SET_TURBO_POSITION:17: error: 'last_vane_position' was not declared in this scope
TIMER1_SET_TURBO_POSITION:30: error: 'last_vane_position' was not declared in this scope
TIMER1_SET_TURBO_POSITION:36: error: 'CAN1' was not declared in this scope
TIMER1_SET_TURBO_POSITION:36: error: 'extID' was not declared in this scope
TIMER2_KEEP_TIME.ino: In function 'void keep_time()':
TIMER2_KEEP_TIME:12: error: 'timer' was not declared in this scope
TIMER2_KEEP_TIME:14: error: 'turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:14: error: 'top_end_rpm' was not declared in this scope
TIMER2_KEEP_TIME:14: error: 'update_vane_position' was not declared in this scope
TIMER2_KEEP_TIME:15: error: 'curve_rpm' was not declared in this scope
TIMER2_KEEP_TIME:15: error: 'update_vane_position' was not declared in this scope
TIMER2_KEEP_TIME:16: error: 'update_vane_position' was not declared in this scope
TIMER2_KEEP_TIME:19: error: 'accel_timer' was not declared in this scope
TIMER2_KEEP_TIME:20: error: 'alternate_accel' was not declared in this scope
TIMER2_KEEP_TIME:21: error: 'turbo_accel' was not declared in this scope
TIMER2_KEEP_TIME:21: error: 'turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:21: error: 'last_turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:24: error: 'turbo_accel' was not declared in this scope
TIMER2_KEEP_TIME:24: error: 'turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:24: error: 'last_turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:27: error: 'turbo_accel' was not declared in this scope
TIMER2_KEEP_TIME:28: error: 'last_turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:28: error: 'turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:30: error: 'accel_timer' was not declared in this scope
TIMER2_KEEP_TIME:36: error: 'update_vane_position' was not declared in this scope
TIMER2_KEEP_TIME:37: error: 'serial_out' was not declared in this scope
TIMER2_KEEP_TIME:38: error: 'turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:38: error: 'top_end_rpm' was not declared in this scope
TIMER2_KEEP_TIME:39: error: 'turbo_rpm' was not declared in this scope
TIMER2_KEEP_TIME:39: error: 'top_end_rpm' was not declared in this scope
'lbb_version' was not declared in this scope

hakcenter

unzip into a new folder named, _4g63_LBB

inside the arduino folder in documents. I put in the underscore so the variables would be on the first tab
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.

EvoAuto

Quote from: hakcenter on August 15, 2015, 01:17:12 AM
unzip into a new folder named, _4g63_LBB

inside the arduino folder in documents. I put in the underscore so the variables would be on the first tab

Just fixed it as you were typing it. Thank you. I will upload tomorrow and test it.

Ryan


EvoAuto

#40
Test was great. I'll upload settings I used tonight. I can get it to hold 10 psi without the wastegate opening at all. I will be going to the track on Friday and play with it some more.

Edit: File added

Ryan

What RPM are you seeing 10psi now? 

EvoAuto

Did some more testing at the track. I am having trouble controlling boost past 10psi.

With my previous test run, I was able to hold a very steady 10psi with the settings I uploaded without the wastegates help. I then decided for tonight I would raise the limit to 105000 RPM to see what pressure it would correspond to. I also had AEM open my wastegate at 20psi just in case. I was seeing anywhere from 17 to 24psi through out the RPM range. It would spike past 20, the wastegate would open up, the boost would drop, wastegate closes and boost would spike again.

We only got 3 runs in before they closed the track so I was not able to experiment further. I am going to try and slowly raise the top-end RPM since the shaft speed vs boost is hard to predict.

Another Issue I was having was with the positioning I have set for the turbo curve. It is modifying the value as the turbo reaches the pre-set RPMs. It is opening the vane more than it should. I was able to get a log of it.

As for what RPM I get 10psi, it is around 3300 at vane position 720 and from there it climbs much faster.

hakcenter

#43
This section is why you can't get into 105,000.

               if (performance_mode && turbo_rpm <= 90000) { vane_position = map(turbo_rpm, top_end_rpm, 95000, turbo_curve[4] + performance_position, 580); }
        else if (turbo_rpm <= 90000) { vane_position = map(turbo_rpm, top_end_rpm, 96000, turbo_curve[4], 600); }
        else if (turbo_rpm <= 910000) { vane_position = 400; }
        else if (turbo_rpm <= 92000) { vane_position = 340; }
        else if (turbo_rpm <= 93200) { vane_position = 240; }
        else if (turbo_rpm <= 94000) { vane_position = 180; }
        else { vane_position = map(turbo_rpm, 92000, 93000, 280, min_position); }
        if (turbo_rpm > 95000) { vane_position = min_position; }
        // Overrun protection
        if (turbo_rpm > 100000) { vane_position = 0; };


First it walks into the very first if, since no performance mode, it falls into the next.

else if (turbo_rpm <= 90000) { vane_position = map(turbo_rpm, top_end_rpm, 96000, turbo_curve[4], 600); }


The expectation of this code here, is top_end_rpm is less than 96,000. Since you adjusted top_end_rpm to 95,000 and didn't adjust any of the rest of the code. It gets stuck in this if, then it walks immediately to the final catch.


if (turbo_rpm > 95000) { vane_position = min_position; }
        // Overrun protection
        if (turbo_rpm > 100000) { vane_position = 0; };


Adjust the sections, and remember top_end_rpm is the intro rpm, not the final. The final rpm you want is decided in those last 2 if statements. Overrun being the final absolute last chance to prevent overspin.

If you wanted to limit to 105,000, it would look something like this:


const unsigned long top_end_rpm = 93000;



// TOP End Control Section
             if (performance_mode && turbo_rpm <= 93000) { vane_position = map(turbo_rpm, top_end_rpm, 96000, turbo_curve[4] + performance_position, 580); }
        else if (turbo_rpm <= 93000) { vane_position = map(turbo_rpm, top_end_rpm, 96000, turbo_curve[4], 600); }
        else if (turbo_rpm <= 96000) { vane_position = 400; }
        else if (turbo_rpm <= 98000) { vane_position = 340; }
        else if (turbo_rpm <= 100000) { vane_position = 240; }
        else { vane_position = map(turbo_rpm, 102000, 104000, 280, min_position); }
        if (turbo_rpm > 104000) { vane_position = min_position; }
        // Overrun protection
        if (turbo_rpm > 105000) { vane_position = 0; };
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.

EvoAuto

Thank you for responding so quickly. I am talking about this section of the curve:
const unsigned int curve_rpm[5] = { 9000, 27000, 46000, 69000, 85000 };
unsigned int turbo_curve[5] = { 0,0,0,0,0 };
const unsigned int turbo_curve_1[5] = { 800,740,700,660,640 };
const unsigned int turbo_curve_2[5] = { 820,760,720,680,660 };
const unsigned int turbo_curve_3[5] = { 840,780,740,700,680 };
const unsigned int turbo_curve_4[5] = { 780,720,700,680,520 };


It is exceeding the the positions I have set. Here is an example from the log:
CPOS : 657 | APOS : 656 | RPM :  30540 | Accel :  -19 | Mode : Normal
CPOS : 659 | APOS : 659 | RPM :  29820 | Accel :   -8 | Mode : Normal
CPOS : 660 | APOS : 660 | RPM :  29160 | Accel :   -1 | Mode : Normal
CPOS : 662 | APOS : 662 | RPM :  28080 | Accel :   -1 | Mode : Normal
CPOS : 664 | APOS : 664 | RPM :  27300 | Accel :   -1 | Mode : Normal
CPOS : 665 | APOS : 665 | RPM :  26580 | Accel :   -1 | Mode : Normal
CPOS : 667 | APOS : 667 | RPM :  25680 | Accel :   -1 | Mode : Normal
CPOS : 669 | APOS : 668 | RPM :  25020 | Accel :   -6 | Mode : Normal
CPOS : 670 | APOS : 670 | RPM :  24420 | Accel :   -3 | Mode : Normal
CPOS : 671 | APOS : 671 | RPM :  23820 | Accel :   -6 | Mode : Normal
CPOS : 673 | APOS : 672 | RPM :  23220 | Accel :   -2 | Mode : Normal
CPOS : 673 | APOS : 673 | RPM :  22860 | Accel :   -6 | Mode : Normal
CPOS : 675 | APOS : 675 | RPM :  22140 | Accel :   -5 | Mode : Normal


From 20000rpm to 30000rpm it should be in position 720-700 but it is in the 600-700 range. I don't know why.