I'm going to take a stab at writing some docs to get started with GDI/HPFP. Specifically this will be about getting a decent/stable high fuel pressure rail reading, and won't be about injection angles and other stuff (i.e. what you actually do with the fuel after getting it pressurized). So it'll just be about the pump.
I will try to edit this point to keep it up to date with information included/added later in the thread, so that newcomers don't have to read through the whole thread to get started. Please feel free to provide feedback; I am certainly not a professional tuner, just some guy who wrote some code and has a decent mental model for how this works. The initial settings here might be more specific to my car than I realize, etc etc. Use at your own risk.
Over time I believe this work will be moved to the wiki.
There is some background reading that may help, including:
https://wiki.rusefi.com/GDI-status/
https://rusefi.com/forum/viewtopic.php?f=5&t=2192
STEP 1: DETERMINE CAM/PUMP CONFIGURATION
a. First thing is to determine whether rusEFI supports your car. At the time of this writing, rusEFI supports normally open solenoid type pumps like the Bosch HDP5, commonly found on BMW N20 and B48/B58 engines, among others.
b. Figure out what cam the pump is on. Most engines run the pump off either the intake or exhaust cam, though some engines have it on a "3rd" cam (BMW S55 and maybe N55). If you have a V/flat engine, you need to know what bank it is on (only one pump is supported at this time).
c. Figure out how many lobes on the cam. If you don't want to disassemble the engine, maybe search for the cam on ebay and look for the pump lobe. It is usually 3 or 4 lobes.
STEP 2: SET UP SOME BASICS IN THE TUNE
a. Set up the fuel high pressure sensor.. (I don't know where this is)
b. Under "Controller/HPFP Cam Configuration," you MUST know and enter the number of lobes and which cam the pump is driven by. Ideally you have a working cam sensor. We'll come back to "angle of first lobe peak" later, but just set it to 0 for now.
c. We'll set up the pump volume table under "Controller/HPFP Cam Configuration" later.
d. Clear the table "Controller/HPFP Pump Compensation" to 0. This needs to be set up after you get the motor running under a wide variety of load conditions.
e. Set the table "Controller/HPFP Target Fuel Pressure" to 5000. This is a decent start for idle and low load but you'll want to increase it for high RPM and high load. The maximum you set it to will depend on your engine, typical values range from 16,000 to 35,000 for current motors.
f. Under "Controller/HPFP Pump Configuration":
f1. Configure the pump valve. Valve Pin, Valve Pin Mode, Valve peak current, Valve hold current, Valve hold off time, Valve duration maximum, and the valve deadtime table (by voltage).
f2. Pump volume - if you don't know, enter 0.290cc.
f3. Minimum angle = 10 degrees. This must be greater than 0 in case other parameters are wrong so the controller can find a mode that doesn't activate the pump. Otherwise you risk overpressurizing the rail (usually there's an emergency bleed valve but no need to overly rely on it).
f4. Activation angle = 30 degrees. Or if you know better put something else here. It needs to be long enough that the pump "latches" up and can pump fuel into the rail, but if it's too long you risk overheating the pump solenoid.
f5. Target decay rate = 2000 kPa/s.
f6. We'll set up the PI system later.
STEP 3: EMPIRICALLY DETERMINE ANGLE OF FIRST LOBE ON A MOTOR THAT DOESN'T IDLE, BUT CAN SPIN WITH THE STARTER
a. Disable fuel injectors from running. We just want to try to find the HPFP lobe peak, and letting the injectors run will just wash the cylinder walls and ruin our engine. They also might use all the fuel we're trying to pump into the rail, confusing our tests. "Fuel/Injection Configuration" set Enabled=False.
b. Under "Controller/HPFP Pump Configuration" set the PI system to P=0.010 and I=0. Yes we're disabling the integrator because we don't want it keep pressurizing the rail once we've reached the target pressure.
c. Under "Controller/HPFP Cam Configuration" change the angles of the pump volume table. For percentage request under 30%, set it to 0 degrees. For any percentage >= 30%, set it to 20 degrees (must be a little larger than the Minimum Angle we set earlier).
d. Set the initial guess for the lobe position. Under "Controller/HPFP Cam Configuration" set "Angle of first lobe" to 240 if on a 3 lobe system, or 180 if on a 4 lobe system (720 / #lobes).
d. To run this experiment, the high pressure fuel rail must start at a low pressure (under 200kPa). The idea is to use the starter to spin the motor (but not actually start it, remember the injectors are disabled) and try to find a setting for the top of the lobe that just starts increasing fuel pressure in the rail.
d1. Try to start it. If the fuel high pressure reading jumps, then you're on a lobe. Ideally at this point you would let the car depressurize (could take hours - DO NOT ATTEMPT TO OPEN THE FUEL SYSTEM WHEN PRESSURIZED! 1000PSI OF FUEL IS NO JOKE!!), change the first lobe setting to 120 on a 3 lobe system or 90 on a 4 lobe (360 / #lobes), and repeat this step. If you don't have time to wait, then you can try running steps 4 & 5, then coming back to step 3 with a depressurized fuel rail.
d2. Assuming the pressure didn't change, then decrease the angle by 10 degrees and try again. It shouldn't take too long before you find the lobe. When you do this is probably a reasonably good measure of the actual TDC.
STEP 4: FINISH SETTING UP BASIC PARAMETERS
a. Reenable fuel injection. "Fuel/Injection Configuration" set Enabled=True.
b. Under "Controller/HPFP Pump Configuration" set the PI system to P=0.010 and I=0.0010. It's a bit aggressive on the integrator but that will help later tuning.
c. For the pump volume table under "Controller/HPFP Cam Configuration," you can either measure the cam lobe or enter in an approximation. For approximations I use a sine curve. Use the default percentages (something like 0.0, 1.0, 4.5, 9.5, 16.5, 25, 34.5, 45.0, 55.0, 65.5, 75.0, 83.5, 90.5, 95.5, 99.0, 100.0), but adjust the angles depending on how many lobes you have. For 3 lobes, you can start with 0.0, 8.0, 16.0, etc up to 120.0. For 4 lobes you can start with 0.0, 6.0, 12.0, etc up to 90.0.
STEP 5: START THE MOTOR
a. Go through normal tuning steps at this point to get the motor to the point where it can idle. Don't add too much load yet (see next step).
STEP 6: TUNING THE PUMP TARGET TABLE AS YOU TUNE THE MOTOR
a. As you're tuning the motor, you will need to update the "Controller/HPFP Target Fuel Pressure" table. The amount of fuel an injector delivers depends on the fuel rail pressure; more pressure means the injector doesn't have to open at long. This can be especially important at high RPM when there is limited time to inject, and can be important at high load when the pressure in the cylinder is high, esp if you are injecting during the upstroke of the piston. Use your best judgement and keep an eye on injector duty cycle to make sure you aren't running out of headroom. You presumably also want the injector to finish injecting long enough before ignition to give time for the mixture to, well, mix.
STEP 7: TUNING THE PUMP COMPENSATION TABLE
a. This step may need to be redone any time various HPFP settings are changed, including but not limited to: Angle of first lobe, the cam profile table (%->angle), pump volume, pump solenoid deadtime, and fuel injector flow/pressure rating.
b. Set the PI system to be reasonably aggressive. "Controller/HPFP Pump Configuration" set P=0.010 and I=0.0010.
c. Run through the various cells of the "Controller/HPFP Pump Compensation" table. X axis should be RPM, Y axis is "fuel CC requested per lobe" (I don't believe there is a logged variable for this right now, maybe there should be. See HpfpQuantity::calcFuelPercent in high_pressure_fuel_pump.cpp. At a given cell, add the value of "GDI: percent pi" to the current cell value. Do this cell by cell (either on a load dyno or maybe on the street using brake & gas simultaneously in 3rd or 4th gear). It is hard to do this on a Dynojet (non load dyno) because it's hard to target a fuel CC/lobe value.
d. Once finished, you should be able to make the PI system less aggressive to help smooth out the response. Under "Controller/HPFP Pump Configuration" set P=0.010 and I=0.0003.
How to tune GDI HPFP
- NormanAlphaspeed
- Posts: 79
- Joined: Fri Jan 13, 2017 7:15 am
- Location: Puerto Rico
- Contact:
Re: How to tune GDI HPFP
Question: Where do get injector modeling data? Any idea on that?
I have that written down but most changes in GDI pressure make it go crazy (runs too lean because too much PW is removed when pressure goes up)
I've played around with changing the reference pressure and the injector size, but idk. It's a 1.6 turbo 2017 Hyundai Elantra and idk what the injectors flow from the factory and no apparent way to get that data.
Besides that I need to do the pump setup as you explained, which I thank you very much for!
I have that written down but most changes in GDI pressure make it go crazy (runs too lean because too much PW is removed when pressure goes up)
I've played around with changing the reference pressure and the injector size, but idk. It's a 1.6 turbo 2017 Hyundai Elantra and idk what the injectors flow from the factory and no apparent way to get that data.
Besides that I need to do the pump setup as you explained, which I thank you very much for!
AlphaX Auto Electronics
https://www.facebook.com/AlphaXAutoElectronics/
Tuned by AlphaSpeed
https://www.facebook.com/AlphaSpeedPR
https://www.facebook.com/AlphaXAutoElectronics/
Tuned by AlphaSpeed
https://www.facebook.com/AlphaSpeedPR
- AndreyB
- Site Admin
- Posts: 14671
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: How to tune GDI HPFP
Roman asks if you have confirmed your peak and hold settings with a scope? I guess that applies both to pump and injectors
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute