Fuel Pump speed control
Discussion
Yeah, i've had the controller driving some high and low resistive loads, a "gutted" bosch fuel pump (equivalent to the worst case "stalled" load pump) and also some large SPAL cooling fans. (it would make a nice cooling fan speed controller btw ;-)
(all rather safer/easier than having real fuel systems inside for early development)
I'm pretty happy with the current feedback, it's a compromise between response and stability of course. i.e. the more filtering i do in h/w and s/w the greater the systems noise rejection, but also the slower it will respond (although this is really only critical in major "short circuit" events (control loop is running at 250Hz currently, and i might be able to push that up to >500Hz if required).
I have also managed to get the back EMF "speed" sensing working, by inputing an expected DC resistance for the load, the system can use the supply voltage and the measured current to work out the motor's fwd voltage and hence the motors back emf. So without any additional sensing it can tell if the motor is actually spinning (usefull for failed/jammed pump detection or pump flow monitoring etc;-)
I need to build a proper fuel rig next (have a spare couple of pumps and a spare FPR so i can experiment with control stragtegy etc
Also i need to write a bit of code to calculate engine rpm and fuel injector duty from a fuel injector pulse (shouldn't be too hard)
Also, at the moment i'm just using my favourite "shortcut" to calibrate / control the device, which is MS Excel with an add-on terminal program interfacing with a "virtual" serial port (actually uses a USB port). This makes it very quick and easy to change things, but is a bit clunky for end users with less knowledge, so i really should write a proper "interface" program, than will enable users to calibrate the device themselves etc
And finally, i need to confirm the BOM and the ££ to build each unit, depending on the options that are fitted to the board
Ah, don't you love these "simple" little projects...........
(all rather safer/easier than having real fuel systems inside for early development)
I'm pretty happy with the current feedback, it's a compromise between response and stability of course. i.e. the more filtering i do in h/w and s/w the greater the systems noise rejection, but also the slower it will respond (although this is really only critical in major "short circuit" events (control loop is running at 250Hz currently, and i might be able to push that up to >500Hz if required).
I have also managed to get the back EMF "speed" sensing working, by inputing an expected DC resistance for the load, the system can use the supply voltage and the measured current to work out the motor's fwd voltage and hence the motors back emf. So without any additional sensing it can tell if the motor is actually spinning (usefull for failed/jammed pump detection or pump flow monitoring etc;-)
I need to build a proper fuel rig next (have a spare couple of pumps and a spare FPR so i can experiment with control stragtegy etc
Also i need to write a bit of code to calculate engine rpm and fuel injector duty from a fuel injector pulse (shouldn't be too hard)
Also, at the moment i'm just using my favourite "shortcut" to calibrate / control the device, which is MS Excel with an add-on terminal program interfacing with a "virtual" serial port (actually uses a USB port). This makes it very quick and easy to change things, but is a bit clunky for end users with less knowledge, so i really should write a proper "interface" program, than will enable users to calibrate the device themselves etc
And finally, i need to confirm the BOM and the ££ to build each unit, depending on the options that are fitted to the board
Ah, don't you love these "simple" little projects...........
Spent a few hrs coding this arvo, and now have the injector signal decoding working well. It just needs to be hooked to the switched side of an injector, and from the signal it calculates both the engine rpm and the injector duty.
The current strategy plan is as follows:
1) wait till "wake up" line is high (KL-15 ignition sense, effectively the "Ignition is on" signal. if you don't want to use this it can simple be hooked to the BattV+ line to make the ecu be active all the time.
2) every 4ms, check the status of the inertia switch input. This is configerable as "active high" or "active low" and will disable all pump running on a state change. (It can be totally ignored by setting cal parameter if you don't want to use this added safety feature)
3) On first receipt of "wake up" run "pump prime schedule" - configerable for run time and run pwm on all 3 channel - designed to allow the fuel system to purge on key-on (espec. after hot soak to avoid vapour lock)
4) monitor injector duty and engine rpm from injector signal. all 3 channels have a pwm output that is set as a factor of these varriable hence:
2d table of injector duty Vs pump pwm allows basic pump speed control vs injector flow rate (injector duty is directly proportional to total fuel consumption)
e.g.
this is then multipled by a second 2d table, with engine rpm as the input
(where a value of 100% has no effect, a value of 50% would halve the inital table value, and a value of 200% would double it)
This enables a basic dependancy on injector duty, with a "trim" vs engine rpm (so at low rpm you can have a smaller margin for critical pump flow, and at high rpm you can have a large margin
finaly, each pwm channel has a calibratable "up and down ramp" that allows you to control how fast the system blends to the new pwm value on transient changes in duty and rpm. This would i expect be calibrated to agressively ramp on the pwm quickly on positive changes in duty, but to hold the pwm high as duty ramps down (keeping the pumps spinning fast on tip outs etc
On top of the basic "calibration" of pwm vs load, each channel is monitored for over current and i will develop an "expected" pump speed vs pwm checking table, that will detect a stalled or failed pump and turn on the "system fault" lamp etc.
The current strategy plan is as follows:
1) wait till "wake up" line is high (KL-15 ignition sense, effectively the "Ignition is on" signal. if you don't want to use this it can simple be hooked to the BattV+ line to make the ecu be active all the time.
2) every 4ms, check the status of the inertia switch input. This is configerable as "active high" or "active low" and will disable all pump running on a state change. (It can be totally ignored by setting cal parameter if you don't want to use this added safety feature)
3) On first receipt of "wake up" run "pump prime schedule" - configerable for run time and run pwm on all 3 channel - designed to allow the fuel system to purge on key-on (espec. after hot soak to avoid vapour lock)
4) monitor injector duty and engine rpm from injector signal. all 3 channels have a pwm output that is set as a factor of these varriable hence:
2d table of injector duty Vs pump pwm allows basic pump speed control vs injector flow rate (injector duty is directly proportional to total fuel consumption)
e.g.
[X] Injduty x 10 | 0 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 |
---|---|---|---|---|---|---|---|---|---|---|---|
[Y] Pump pwm x 10 | 0 | 300 | 350 | 400 | 500 | 600 | 700 | 800 | 900 | 950 | 1000 |
this is then multipled by a second 2d table, with engine rpm as the input
[X] Eng Rpm | 0 | 500 | 1000 | 1500 | 2000 | 2500 | 4000 | 5000 | 6000 | 7000 | 9000 |
---|---|---|---|---|---|---|---|---|---|---|---|
[Y] modifier % | 100 | 100 | 100 | 100 | 100 | 100 | 120 | 140 | 150 | 150 | 150 |
(where a value of 100% has no effect, a value of 50% would halve the inital table value, and a value of 200% would double it)
This enables a basic dependancy on injector duty, with a "trim" vs engine rpm (so at low rpm you can have a smaller margin for critical pump flow, and at high rpm you can have a large margin
finaly, each pwm channel has a calibratable "up and down ramp" that allows you to control how fast the system blends to the new pwm value on transient changes in duty and rpm. This would i expect be calibrated to agressively ramp on the pwm quickly on positive changes in duty, but to hold the pwm high as duty ramps down (keeping the pumps spinning fast on tip outs etc
On top of the basic "calibration" of pwm vs load, each channel is monitored for over current and i will develop an "expected" pump speed vs pwm checking table, that will detect a stalled or failed pump and turn on the "system fault" lamp etc.
Unless i can find an affordable flow meter then yes, i'm going to go back to a simple look up table for pump voltage. When i get my fuel rig built, i'll have a play around with a few options and see what capabilites the flow control gives (it might be worth it for some people for "ease of calibration" etc??
Well the other option is to install an "orifice" in the return line, after the FPR, and insert a pressure sensor upstream of the orifice. The flow rate across the orifice will be proportional to the square root of the pressure across it. The trick will be to "size" the orifice correctly, to allow sufficient resolution for the sensor, but not to artificially restrict return flow (which would move the FPR response curve a bit)
That way i can use a simple low range gauge pressure sensor, and there are more of them with gasoline proof "wetted" parts (usually stainless steel diaphram etc)
I'll get my fuel rig built this weekend and have a play around!
That way i can use a simple low range gauge pressure sensor, and there are more of them with gasoline proof "wetted" parts (usually stainless steel diaphram etc)
I'll get my fuel rig built this weekend and have a play around!
andygtt said:
ease of calibration is definatelly high up my list as I don't follow half of the technical info you talk about lol
Ok, then here's a simple refresher for the less technically minded:(concentrate, here comes the science bit....;-)
For any electrical conductor the following is true:
Voltage[in Volts[V]] = Resistance[Ohms[R]] multiplied by Current[Amperes[I]] (V = IR)
For an electric motor the flowing is also true:
"A motor's rotational speed [S] is proportional to its supply voltage[V]"
"A motor's torque[T] is proportional to the current[I] it is drawing"
The crucial part to understand about an "permanent magnet" electric motor (which is what is inside things like fuel pumps etc) is that when it spins, it actually generates an opposing voltage (called the "back EMF" [symbolised with a capital E]. This is caused by the spining magnets cutting across the conductors in the windings and generating a voltage. This is the effect that limits the speed of an unloaded motor. (connect a fuel pump to say a 12v supply, and without load, it will accelerate until a speed is reached where the E = V (back EMF = supply voltage).(called the "BASE speed")
Therefore for a motor to generate torque (which is proportional to current drawn) it must always spin at a speed where the supply voltage is larger than the back emf (V>E). This "forward voltage" is the voltage pushes the current through the windings (of resistance R).
What happens in a real motor, is that when you apply a fixed voltage, initally say the motor is stationary, hence E = 0, (no back emf at all), so ALL the supply voltage acts through the windings (usually of a low resistance) and produces a large current (the "in rush" or "stalled" current). This creates a large torque (T prop to [I]) which causes the motor to rapidly accelerate (assuming it is not totally stalled). As it accelerates,E rises with S (back EMF increases with speed) which lowers the effective voltage pushing current through the windings, and current and torque fall. Some point is reached where the pumps speed is just enough lower than the base speed, that sufficient forward voltage exists to just produce enough current, that balances the torque on the motor. This natural negative feedback means that a motor will respond to a torque change with a change in speed (if the supply voltage is fixed)
However, if we modulate the supply voltage, we effectively can change the base speed (the speed at which E = V). For any given motor torque (and hence current) the motor will settle at a margin below the new base speed, just the same as it did when the full voltage was applied.
For the case of a fuel pump, the motors speed is proportional to the volume of fuel delivered (because every rotation transferes a fixed volume of fluid from the pump rotors inlet to outlet, more rotations per second = more fuel). The motors current is proportional to the mechanical load (torque) from that pump. A pumps torque is a result of the difference in pressure between inlet and outet, so the motor's current is proportional to fuel pressure effectively.
If we want to control the volume of fuel delivered, it should be obvious that we need to control the speed of the pump motor, and hence that requires us to control the supply voltage.
(for more the "advanced" the interesting quirk of electric machines is that the useful power generated by the motor is E x I (back emf x current, which is effectively speed x torque (sound familiar? ;-), but the energy lost to heat in the resistance of the windings is the square of the current x the resistance (I squared R). This leads to the fundamental principle in motor design for efficiency, of getting the lowest winding resistance possible)
For a fuel pump operating against a fixed fuel pressure, the torque on the motor will be largely constant, varrying only with the efficiency of the pump at various speeds.
Mapping the supply voltage to create a "base speed" which keeps the pump spinning at a rotational speed sufficient to pump just enough fuel therefore means that broadly, you will need a supply voltage that increases proportionally with the fuel quanity required.
As injector duty is a measure of the total time the injectors are on, if we control output voltage as a function of injector duty, a broadly linear output should suffice
(complications will shape the edges of the that curve, for example the minimum "start up voltage" and the amount of "flow headroom" you want to leave between the pumps delivery and the engine's consumption etc)
Next weeks episode, Pulse Width Modulation and Inductance ;-)
Totally off topic...but you seem the man to ask.
DO you know of anywhere that does a proper crimp tool, at sensible cost for the pins on typical Tyco AMP connectors used on many ecu's now ?
Motec, Haltech, DTA etc, the little round pins.
Not sure if that's the same style connector you are using on this controller ?
DO you know of anywhere that does a proper crimp tool, at sensible cost for the pins on typical Tyco AMP connectors used on many ecu's now ?
Motec, Haltech, DTA etc, the little round pins.
Not sure if that's the same style connector you are using on this controller ?
Argh, it's the "at sensible cost" bit which is the issue. Ages ago i bought a series of cheap crimp tools with different jaws to try to find one that would be reliable on those contacts. And, eventually, i just ended up buy the specific one to do them properly, think it was circa £120 (about 7 years ago now). Can't even remember where i got it from, might have been Farnells on special offer come to think of it.
There's quite a few cheapys normally for sale on ebay, it might be worth a £20 punt on one or two of those, you might get lucky???
There's quite a few cheapys normally for sale on ebay, it might be worth a £20 punt on one or two of those, you might get lucky???
Max_Torque said:
Argh, it's the "at sensible cost" bit which is the issue. Ages ago i bought a series of cheap crimp tools with different jaws to try to find one that would be reliable on those contacts. And, eventually, i just ended up buy the specific one to do them properly, think it was circa £120 (about 7 years ago now). Can't even remember where i got it from, might have been Farnells on special offer come to think of it.
There's quite a few cheapys normally for sale on ebay, it might be worth a £20 punt on one or two of those, you might get lucky???
It's basically in relation to thisThere's quite a few cheapys normally for sale on ebay, it might be worth a £20 punt on one or two of those, you might get lucky???
http://dtaforum.psycode.com/viewtopic.php?t=2811&a...
A few different tools have been tried, and some of them not overly cheap. But they still arent right.
Think Ive found the correct tool...still around £150 though.
Edited by stevieturbo on Thursday 24th March 16:41
Spent 10mins this arvo "knocking up" a bit of a bodge-y pump test rig:
(note the Max_Torque "patent pending" domestic radiator hanger bracket, designed so you can do fuel systems development in the comfort of your own home....... ;-)
(note2, i'm not using gasoline but injector test fluid, for those worried about the potential for towering inferno style accidents )
Anyway, it just uses a cheapo FPR from ebay, and well, it doen't work. The reg has a massive pressure slope with flow, if you set it to say 3bar at 20% return flow, then increase the pump speed to say 50% the pressure gets to about 6bar....... If you used this FPR on your normal system, then if you ever even get close to using 50% of the delivered fuel, the rail pressure is going to be under half what it should be (not great characteristic for maintaining injector flow rates at high loads that !!!)
Options to go forward are:
1) buy a better fpr and try that
2) just use say a 0.5mm hole as a return flow restriction
3) give up on trying to control the return flow and go to a returnless pressure controlled system
4) design my own custom FPR to suit
My fav is 3, as it means you can use all your pump capability without any "return" wasteage etc
But i will try 2 initally, as some people might want to keep their return system??
(the main issue comes with people who want a manifold pressure referenced fuel system, that aims to try to keep injector deltaP constant, although, from my trials, i'm now going to put at least a tenner on not many of those aftermarket FPR systems actually doing what they are meant to do with any repeatability)
(note the Max_Torque "patent pending" domestic radiator hanger bracket, designed so you can do fuel systems development in the comfort of your own home....... ;-)
(note2, i'm not using gasoline but injector test fluid, for those worried about the potential for towering inferno style accidents )
Anyway, it just uses a cheapo FPR from ebay, and well, it doen't work. The reg has a massive pressure slope with flow, if you set it to say 3bar at 20% return flow, then increase the pump speed to say 50% the pressure gets to about 6bar....... If you used this FPR on your normal system, then if you ever even get close to using 50% of the delivered fuel, the rail pressure is going to be under half what it should be (not great characteristic for maintaining injector flow rates at high loads that !!!)
Options to go forward are:
1) buy a better fpr and try that
2) just use say a 0.5mm hole as a return flow restriction
3) give up on trying to control the return flow and go to a returnless pressure controlled system
4) design my own custom FPR to suit
My fav is 3, as it means you can use all your pump capability without any "return" wasteage etc
But i will try 2 initally, as some people might want to keep their return system??
(the main issue comes with people who want a manifold pressure referenced fuel system, that aims to try to keep injector deltaP constant, although, from my trials, i'm now going to put at least a tenner on not many of those aftermarket FPR systems actually doing what they are meant to do with any repeatability)
Well, i have improved the FPR a bit by taking it apart and linishing the pressure seating area on some 1200grit emerypaper on a flat metal plate, then polishing it with some polishing compound (has reduced the "leak path" by about 50%.
The issue with the pressure slope is a simple result of the fact that they have "designed" it to use a short stiff spring (which results in a high spring "rate"). So you set the preload (i.e the rail pressure) when the regulating orifice is at a height determined by the level of return flow. Then if the return flow drops (because you engine is using more fuel), and the orifice closes, but because of the short stiff spring, this results in a big drop in orifice load and hence fuel pressure. What it needs is a long soft spring, that is heavily preloaded, so changes in length do not change the load as much...........
Unfortunately, really the only way you are going to set your fuel pressure is probably with no engine fuel consumption (i.e. ign on, engine off) which is obviously at maximum return flow, so most compressed spring. As the injectors use more and more fuel, the pressure will drop and drop. not good! (but maybe thats what you get if you only spend £25 on an FPR ;-)
(i should nick the FPR off my rally car and try that and see how it responds)
The issue with the pressure slope is a simple result of the fact that they have "designed" it to use a short stiff spring (which results in a high spring "rate"). So you set the preload (i.e the rail pressure) when the regulating orifice is at a height determined by the level of return flow. Then if the return flow drops (because you engine is using more fuel), and the orifice closes, but because of the short stiff spring, this results in a big drop in orifice load and hence fuel pressure. What it needs is a long soft spring, that is heavily preloaded, so changes in length do not change the load as much...........
Unfortunately, really the only way you are going to set your fuel pressure is probably with no engine fuel consumption (i.e. ign on, engine off) which is obviously at maximum return flow, so most compressed spring. As the injectors use more and more fuel, the pressure will drop and drop. not good! (but maybe thats what you get if you only spend £25 on an FPR ;-)
(i should nick the FPR off my rally car and try that and see how it responds)
Edited by anonymous-user on Saturday 2nd April 22:11
Well, it would seem that perhaps the righteous path to controls nirvana is a more twisting and tortuous one that would at first be appreciated, where enlightenment comes in unexpected forms......
Or, put it another way, having a pressure reg with a significant "slope" might actually help matters somewhat ;-)
After a fun afternoon of playing, i have come up with a plan!
Option 1 - using std return system, with FPR connected to plenum (for Inj deltaP compensation)
Control system needs to measure:
fuel rail pressure - additional 10bar gauge pressure sensor (cal via lookup table)
MAP - can just piggyback into your existing MAP sensor output (cal via lookup table)
Setup as follows:
Decide on "base" fuel injector delta pressure, say 4bar, set controller to 4bar injdeltaP
Without engine running, adjust FPR to a setting that is just below the 4bar setpoint, until a small amount of return flow occurs (the "pressure slope" of the regulator helps us here, by allowing us to have this small offset at a reasonably constant flow, because the offset is directly proportional to the height of the valve off its seat (via the FPR spring rate)
The system will then automatically add the measured MAP value to it's target injector deltaP, and drive the pumps with a speed that meets that absolute pressure. As the injector flow increases with load, the pumps will automatically drive as hard as required to maintain that target injDeltaP.
And as the plenum pressure varries, the system compentates to try to maintain an constant injector DeltaP.
The real time injector DeltaP is output via the 0-5v analogue output channel, for compensation in via your EMS system. This allows the EMS to correct for any pressure errors during transient events (either from control system (mainly on tip outs where rail pressure takes some time to fall) or from "wobbly" pressure regulator!)
The following cases suggest it should work:
low load: MAP = 30kPa(abs), InjDeltaP = 400kPa, rail pressure target = 330kPa
WOT (NA): MAP = 100kPa(abs), InjDeltaP = 400kPa, rail pressure target = 400kPa
WOT (boosted): MAP = 200kPa(abs), InjDeltaP = 400kPa, rail pressure target = 500kPa
in each case the FPR with its connection to the plenum should be trying also to maintain a fuel injector deltaP of say 390kPa, so we get "10kPa" worth of return flow at all times
More testing required to confirm this strategy works to follow ;-)
Or, put it another way, having a pressure reg with a significant "slope" might actually help matters somewhat ;-)
After a fun afternoon of playing, i have come up with a plan!
Option 1 - using std return system, with FPR connected to plenum (for Inj deltaP compensation)
Control system needs to measure:
fuel rail pressure - additional 10bar gauge pressure sensor (cal via lookup table)
MAP - can just piggyback into your existing MAP sensor output (cal via lookup table)
Setup as follows:
Decide on "base" fuel injector delta pressure, say 4bar, set controller to 4bar injdeltaP
Without engine running, adjust FPR to a setting that is just below the 4bar setpoint, until a small amount of return flow occurs (the "pressure slope" of the regulator helps us here, by allowing us to have this small offset at a reasonably constant flow, because the offset is directly proportional to the height of the valve off its seat (via the FPR spring rate)
The system will then automatically add the measured MAP value to it's target injector deltaP, and drive the pumps with a speed that meets that absolute pressure. As the injector flow increases with load, the pumps will automatically drive as hard as required to maintain that target injDeltaP.
And as the plenum pressure varries, the system compentates to try to maintain an constant injector DeltaP.
The real time injector DeltaP is output via the 0-5v analogue output channel, for compensation in via your EMS system. This allows the EMS to correct for any pressure errors during transient events (either from control system (mainly on tip outs where rail pressure takes some time to fall) or from "wobbly" pressure regulator!)
The following cases suggest it should work:
low load: MAP = 30kPa(abs), InjDeltaP = 400kPa, rail pressure target = 330kPa
WOT (NA): MAP = 100kPa(abs), InjDeltaP = 400kPa, rail pressure target = 400kPa
WOT (boosted): MAP = 200kPa(abs), InjDeltaP = 400kPa, rail pressure target = 500kPa
in each case the FPR with its connection to the plenum should be trying also to maintain a fuel injector deltaP of say 390kPa, so we get "10kPa" worth of return flow at all times
More testing required to confirm this strategy works to follow ;-)
Edited by anonymous-user on Sunday 3rd April 20:29
I'm intrigued by the idea of a returnless system. A simple question - would this be compatible with using a low pressure lift pump from the fuel tank, and then having all of the HP stuff in the engine bay?
If so, it'll make fuel injecting old cars (i.e. originally carburetted) much easier, since there'll be virtually no plumbing involved, and no mucking about under the car.
If so, it'll make fuel injecting old cars (i.e. originally carburetted) much easier, since there'll be virtually no plumbing involved, and no mucking about under the car.
davepoth said:
I'm intrigued by the idea of a returnless system. A simple question - would this be compatible with using a low pressure lift pump from the fuel tank, and then having all of the HP stuff in the engine bay?
If so, it'll make fuel injecting old cars (i.e. originally carburetted) much easier, since there'll be virtually no plumbing involved, and no mucking about under the car.
That is more or less achievable though with a small swirl tank and efi pump. Although a fuel cooler would be a good idea too as all the fuel would be circulating via a very small tank.If so, it'll make fuel injecting old cars (i.e. originally carburetted) much easier, since there'll be virtually no plumbing involved, and no mucking about under the car.
I'm not sure the turbo cars work well with the idea of running a returnless system. The idea behind it is sound, but due to the FPR needing a vacuum pipe we questioned the pressure drop over the distance between the front and rear of the car. For an NA engine I would advocate it 100%
Gassing Station | Engines & Drivetrain | Top of Page | What's New | My Stuff