Introduction
The RaceROM port injection strategy adds fuel via secondary port injectors, blending it seamlessly with the Directly Injected fuel.
The overall fuel quantity is split according to the output of a table with engine load and rpm as inputs. Typically, port fuel starts at very load boost and ramps up with increasing load, although the exact fraction of the overall fuel is dependent on the port injector size and calibration.
Port injector fuel mass is corrected for using and flow rate table based on differential fuel pressure, and offset using a 3d injector latency table of differential pressure and voltage.
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
System Basics
The port injection system comprises a port injection ecu utilising custom firmware (commonly a MOTIV Motorsport Re|Flex). This in turn communicates with RaceROM code in the OEM ECU and operates as follows.
Because there are additional calculation steps and communication between the ECUs, the port injection system cannot react as quickly as the direct injection system. As such you’ll want to utilise the direct injection system for all transient fuel adjustments.
System Setup
CAN Output
This system sets up similar to the way you add on an external ethanol content sensor to these vehicles. First you navigate to the RaceROM Can Output folder and select the MOTIV Motorsport Re|Flex Controller from the list. Then select which pins you chose to connect it to the CAN system through. With that output selected you don’t need to mess with any of the other CAN sensor settings as it will auto configure with the correct options for the controller. If you’re using a different controller it is possible to adjust the frequency and ID for different communications.
CAN Input
Since the port injection controller sends information in addition to receiving the signal for when to fire the port injectors, you’ll also need to add it as an input. To do so, set the CAN Sensor Enable to the port injection controller.
The port injection controller will allow you to input ethanol content, Fuel Pressure and up to two other auxiliary input sensors in addition to the port injection communication all through the same pathway. Once enabled those values and their relevant error flags will be routed to the existing variables
CAN Ethanol
CAN Pressure
CAN Status
CAN PW Actual
CAN aux Input
There is also a CAN Status that will trigger a failsafe if the communication failes. It’s also possible to specify the input packet information manually using the custom sensor device type if a different type of controller is being used. CAN Input Notes allows you to mark information relevant to the custom can setup you’re doing for these devices.
Port Injection Setup
The port injection subsystem is enabled using the PI Control Options map. It can be enabled in any of the 4 mapswitch modes. If it is not enabled in any of the modes the entire system is diabled. If it is enabled in any of the modes it will be enabled in all of the modes and will request a duty cycle of zero in the modes it is not enabled in. This is required in order to allow the system to correctly handle a situation when a driver changes mapswitch mode.
Selecting MOTIV Motorsport Re|Flex enables the ability to send multiple inputs and outputs from the port injection controller. The system will not be enabled unless the version sent by CAN from the Re|Flex matches the version stored in RaceROM. This check can be turned off to allow the system to operate with a different port injection controller.
Simulation Mode (No Port Injection) performs all the map lookups and calculations but does not actually inject any fuel through the PI system. This is to allow testing and diagnostics on a vehicle that does not have the port injection hardware present
Average Actual and Target Pulsewidth is an attempt to reduce the effect of CAN Bus latency. If the Pulsewidth Actual received by RaceROM and the Pulsewidth Target sent out by RaceROM to the MOTIV Motorsport Re|FlexController within tolerance of eachother than the real Pulsewidth Actual is assumed to be the average of the two. The tolerance is defined in the 1D PI Pulsewidth Target/Actual Tolerance map. See the example table for explanation.
Time | Target Sent by RaceROM | CAN | Target Received by Re|Flex | Fuel injected by Re|Flex | Actual Sent by Re|Flex | CAN | Actual Received by RaceROM | Average of Target Sent and Actual Received |
1 | 0 | 0 | 0 | 0 | 0 | 0 | ||
2 | 10 | 0 | 0 | 0 | 0 | 0 | ||
3 | 20 | 10 | 10 | 10 | 0 | 10 | ||
4 | 30 | 20 | 20 | 20 | 10 | 20 | ||
5 | 40 | 30 | 30 | 30 | 20 | 30 | ||
6 | 50 | 40 | 40 | 40 | 30 | 40 | ||
7 | 60 | 50 | 50 | 50 | 40 | 50 | ||
8 | 70 | 60 | 60 | 60 | 50 | 60 | ||
9 | 70 | 70 | 70 | 70 | 60 | 70 | ||
10 | 70 | 70 | 70 | 70 | 70 | 70 | ||
11 | 60 | 70 | 70 | 70 | 70 | 70 | ||
12 | 50 | 60 | 60 | 60 | 70 | 60 | ||
13 | 40 | 50 | 50 | 50 | 60 | 50 | ||
14 | 30 | 40 | 40 | 40 | 50 | 40 | ||
15 | 20 | 30 | 30 | 30 | 40 | 30 |
Prerequisite Calculations
In order to appropriately establish the final injector pulsewidth for the port injection, there are several additional calculations the RaceROM code will run through.
Fuel Rail Pressure
If the CAN status is 0 and the CAN Pressure reading is between your set max and min for PI Pressure the value coming over CAN from the port injection ECU (CAN Pressure) will be used for fuel pressure. If it is outside of those values, the PI Failsafe Pressure value will be used instead.Differential Pressure
Calculated as Fuel Rail Pressure + Atmospheric Pressure - Manifold Absolute PressureInjector Flow Rate
The default calibration data is based on Injector Dynamics 1050X injectors and will need to be changed if you are using different injectors. There is a 2D map of PI Injector Flow Rate which is driven by Differential PressureInjector Lag Time
The default calibration of injector lag time is based on ID1050x injectors. There is a 3D map describing this relationship against Voltage and Differential Pressure. For these injectors we can avoid the non-linear behavior at lower pulsewidth by making sure the minimum pulsewidth is higher than 3ms.Total Fuel Mass
The OEM code calculates Relative Fuel (RK) on a per-cylinder basis. These values are then multiplied by the Fuel Multiplier in order to achieve the Mass Fuel (MK) value. RaceROM takes an average RK of the 6 cylinders (for B48 this is done on 4 cylinders) and multiplies this by the fuel multiplier to get the Total Fuel Mass, which is the average fuel mass for 1 cylinder. This happens after any adjustments done by the flex fuel system so Total Fuel Mass includes the ethanol compensation.
Port Injection Activation
In order to function at all the PI subsystem must be enabled in the current mapswitch moe. If the vehicle is in or changes to a mapswitch mode where port injection is not enabled, then the target variables will be zeroed, causing the ECU to revert to 100% direct injection.
Engine Load Threshold
For the Port injection system to activate the engine load (relative filling) must exceed the value defined by the PI Engine Load Activation Threshold
CAN Status
The CAN status must be a value of 0 in order for the system to be activated. A value of 0 indicates that valid packets are being frequently received from the PI ECU. The Version/Multiplex Byte received from the PI ECU must also match what is expected and the incoming CAN PW Actual must be within the valid range.
Total Fuel Mass
In order to ensure the system is not operating when the ECU is commanding a fuel cut or the engine is not running, the Total Fuel Mass must be higher than 0 in order for the system to activate
Port Injection Target
Sets a percentage of the fuelling demand that the ecu will request from the port injection system. The value must be higher than 0% in order for the system to do anything.
Minimum Effective Pulsewidth
A map with hysteresis. The purpose of this map is to prevent the PI system from requesting pulsewidths smaller than what is possible. the operation is designed to prevent the system from cycling on and off constantly at low pulsewidths.
Initially the system is inactive when the Effective Target is 0 (1-3 on the diagram)
When the Calculated Pulsewidth rises above the Upper Threshold the system becomes active. The Effective Target follows the Calculated Pulsewidth (steps 3-7 and 9-11)
If the Calculated Pulsewidth drops below the Upper Threshold the Effective Target is stopped at that upper threshold (7-9 and 11-12)
Finally when the Calculated Pulsewidth drops below the Lower Threshold the system becomes inactive and the target drops to 0
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
When the Pulsewidth is flatlined at the upper threshold, the actual PI Percentage may Exceed it’s target. |
Minimum Injector Duty
The Minimum Injector Duty map works the same as the Minimum Effective Pulsewidth map described above. Thus the system will not start if the required duty is too low. While running it will not fall below the upper minimum injector duty.
Pulsewidth Target Calculations
The port injection percentage target comes from PI Port Injection Target a 3d map of engine load and RPM and is the main map for controlling the Port Injection Subsystem. There is also an ethanol version of this map and a 2D blender which allows the percentage target to be adjusted according to ethanol content of the fuel.
The primary reason for using PI in addition to the factory DI is the inability of the stock fuel system to inject enough fuel within the available injection window. To simplify the tuning process there is a 2d map of DI Fuel Mass Maximum based on RPM. If the DI fuel quantity is higher than the value in this map then the PI Percentage Target is automatically increased. It effectively caps the DI Fuel Quantity at the value in the map and delivers the excess fuel through the PI System.
The Percentage target can also be adjusted by custom maps.
In order to ensure there is enough DI to rapidly respond to transient fluctuations there is a minimum DI Percentage map (PI DI Percentage Minimum). The PI Percentage Target is validated to ensure it doesn’t exceed the maximum PI percentage which is equal to 100-Minimum DI percentage
DI Fuelling Adjustments
PI Injector Pulsewidth Actual
If the CAN Status value is 0 indicating the messages are working properly, then the Injector Pulsewidth Actual is read from the CAN PW Actual value from the PI ECU. In the event that the status is not 0, the CAN PW Actual is assumed to be 0, as under those conditions the PI should be disabled. It then sanity checks the CAN PW Actual against the min and max allowed pulsewidth values.
In order to reduce CAN latency, there is an option to average incoming Pulsewidth Actual with the outgoing Pulsewidth Target. This can be done in order to reduce CAN latency. If that function is enabled, this is the stage at which that calculation is done. If the fuel demand is then increased the following applies.
The Injector Pulsewidth Target will be too high because it has not been received by the Re|Flex ECU yet. The Re|Flex is still injecting a previous Target Pulsewidth. Therefore, if the Target Pulsewidth was used to calculate the Current PI Pulsewidth, then the result would be too high. The system would then calculate a DI value that is too low. It would inject less total fuel than required and the engine would run lean.
The Injector Pulsewidth Actual will be too low because that was the Pulsewidth some time ago. The current Pulsewidth will have gone up since then. Therefore, if the Actual Pulsewidth was used to calculate the Current Pulsewidth, then the result would be too low. The system would then calculate a DI value that is too high. It would inject more total fuel than required the engine would run rich.
The Average (ie. somewhere in the middle) of Target and Actual should be about right provided that the CAN latency is equal in both directions and the rate of change of pulsewidth is constant for that CAN round trip duration.
If the fuel demand is decreasing then the opposite will happen, however in both cases the average will come out best.
Strategy for determining current PI PW | Increasing fuel demand (Target>Actual) | Steady Fuel Demand (Target=Actual) | Decreasing Fuel Demand (Target<Actual) |
---|---|---|---|
Use target PW sent to PI ECU | Lean | Approximately correct | Rich |
Use actual PW Returned from PI ECU | Rich | Approximately correct | Lean |
Use average of Target and Actual PW | Approximately Correct | Approximately correct | Approximately correct |
Use minimum of Target and Actual PW | Rich | Approximately correct | Rich |
Use Maximum of Target and Actual PW | Lean | Approximately correct | Lean |
If the Target and Actual PW values differ by more than the tolerance amount, then we assume that something unexpected has happened. In this case the sytem will fall back to using the raw Actual Pulsewidth value from the PI ECU as this is the most accurate information it would have available on how much fuel is being injected by the PI system.
If the averaging option is not enabled then it will also go straight to using the Actual Pulsewidth value from the PI ECU.
Port Injection Tables
PI Control Options
Toggle to enable for different modes (map slots) as well as using EcuTek PI Controller CAN Protocol (enabled by default) will work with MOTIV Motorsport Re|Flex with no alteration.
Simulation mode offers a calculation only option allowing you to verify input/output on monitors without actually running the PI system. This is useful for diagnosing issues or verifying the system is working properly.
Average Actual and target pulsewidth can help deal with CAN latency if present in order to improve the accuracy of fuel corrections that occur.
PI DI Fuel Mass Maximum
Can help to prevent excessive (impossible) DI Injection angle by adding additional load to the PI system that goes over and above the base PI split. Default values can be raised in most applications in order to avoid DI being too low. Can set to 255 to test.
If you have very high PI utilization and very low DI pump angles raise the numbers in this map.
PI DI Effective Pulsewidth Minimum
Used to prevent very low effective pulsewidths being requested from the port injectors. At low pulsewidths many will not function properly/effectively or have non-linear behavior that may be undesireable. Suggest starting with 1.0 and 0.8ms
PI DI Engine Load Minimum
Upper value represents the cylinder fill that must be exceeded to trigger activation of PI, lower value is what the fill must bo below to deactivate the PI.
PI Injector Duty Maximum
Maximum duty cycle allowed for the PI Injectors. Any pulsewidth that would exceed this duty cycle will not be requested.
PI Injector Duty Minimum
Additional threshold that needs to be exceeded in order to activate the system. Any injector duty lower than the top value will not activate the port injection system.
PI Port Injection Target (Ethanol)
For ethanol, this represents the percentage of fuel mass you want to be delivered by the port injectors. Map data is just a suggestion but appears to work okay. This is the main map to adjust when requesting more or less fuel from the PI. DO NOT ATTEMPT TO ADD ALL FUEL VIA THE PORT INJECTORS.
PI Port Injection Target (Gasoline)
For gasoline, this represents the percentage of fuel mass you want to be delivered by the port injectors. This is combined with the ethanol version of this map and the PI Port Injection Target Blend map to give the final fuel split. This will allow you to raise the proportion of fuel delivered by the PI system when using ethanol. The blend method is the same for all similar FF basemap and blendstrategies.
PI Pulsewidth Ramp Rate Negative
This table functions to limit how quickly your PI Pulsewidth is reduced in units of MS PW change per cycle. A value of 1 is basically no limit. Lower values will slow the response. If set low the PI pulsewidth wil not decrease as low as the map requests. In many instances this will not be required due to target smoothing.
PI Pulsewidth Ramp Rate Positive
This table much like it’s negative counterpart above works to limit how quickly the pulsewidth is changed (in this case how rapidly it is increased). A value of 1 is basically no limit. Lower values will help slow the response. If set low the PI will not increase as rapidly as the map may request. In many instances this will not be required due to target smoothing.
PI Pulsewidth Target Smoothing
General exponential filter applied to the pulsewidth to prevent very sudden large changes.
PI Pulsewidth Target / Actual Tolerance
Compares pulsewidth values as requested by the ECU vs what is reported by your PI ECU (Re|Flex). If the difference exceeds this value only the reported PW is used for the DI fuel correction.
Data Logging
The following datalogging parameters are provided for this system. Additionally it is beneficial to log the OEM parameter Fuel Injection Quantity Cylinder1 as this indicated the DI Fuel Mass per cylinder. It has been observed that when the ECU is running a multi-shot injection strategy, this parameter may only report the mass of the first shot.
It is normal to see PI Percentage Actual spike to more than 100% duty in the log file during lift off when the PI Fuel Mass Total drops below the Actual.
PI Duty Cycle Actual
The Injector Duty Actual is calculated purely for logging and diagnostic purposes. It may be displayed on the vehicle sports display if requested.
PI Effective Pulsewidth Actual
Calculated by subtracting the lag time from the Injector Pulsewidth Actual. If less than the Lag Time then the Effective Pulsewidth Actual is assumed to be 0 as the system should not be active in those conditions.
PI Volume Actual
The volume of fuel coming from the PI system. Found by dividing the Effective Pulsewidth Actual from the Injector Flow in msec/cc.
PI Mass Actual
Calculated by multiplying the Volume Actual by the OEM BMW calculation for Fuel Density. This related to gasoline rather than a gasoline/ethanol blend, however it will not impact final calculations/driveability. This value is passed through custom maps allowing tuners to bypass all port injection logic and create their own if desired.
PI Percentages
a ratio of PI Mass Actual to Mass Total
Fuel Multiplier Adjustment
Calculated by multiplying the existing fuel multiplier (which already contains FlexFuel compensation) by the DI Percentage.
PI Mass Target
The Port Injection Mass Target is the value achieved by multiplying the Total Fuel Mass (amount of fuel the engine is requesting) by the Port Injection Target Percentage which tells you what percentage of the fueling should come from the port injection vs the direct. The resultant PI Mass Target is then sent through any custom maps (if applicable) and the final value is validated to ensure it doesn’t exceed the Maximum PI Percentage of the Total Fuel Mass
PI Volume Target
The PI Mass Target is converted to a volume by dividing it based on fuel density found in an internal OEM calculation. This is the density of gasoline NOT an ethanol blend. However there are adjustments made for ethanol compensation done elsewhere so it will not have an impact here. In any case this calculation is inverted when calculating the PI Mass Actual from the PI Volume Actual. Any inaccuracy here will get cancelled out by an equal and opposite inaccuracy in the later calculations.
PI Effective Pulsewidth Target
Calculated by converting the injector flow rate to msec/cc and multiplying it by the PI Volume Target. The Calculated pulsewidth is checked against the minimum allowed as described in section 8.
System Inactive -Port injection not activate until the pulsewidth value exceeds the minimum.
System Active - The Effective Pulsewidth Target will be held at the minimum unless (until) the calculated value falls below the lower hysteresis threshold.
The maximum rate of change can be limited using the PI Pulsewidth Ramp Rate Positive / Negative maps.
PI Injector Pulsewidth Target
the PI Injector Pulsewidth Target is calculated by adding the Injector Lag Time calculated earlier to the Effective Pulsewidth Target. An optional smoothing factor can be applied in order to remove small undesireable fluctuations that may upset fuel trims.
The PI Duty Cycle Target is calculated from the Injector Pulsewidth Target. The duty cycle is validated to make sure that it falls between the minimum and maximum duty cycle values.
The target is then sanity checked against the minimum and maximum allowed maps (PI Pulsewidth Minimum / Maximum) These maps are used to validate the incoming Pulsewidth Actual. They are checked here to ensure the system does not request a target pulsewidth that will be rejected when it comes back.
Finally the PI Injector Pulsewidth Target is sent to the port injection ECU (Unless the system is in simulation mode)
Error Flags
We have a 32 bit PI Diagnostic Flags parameter as described in the table below. The flags do not necessarily indicate an error or trigger a failsafe operation, they are simply a diagnostic aid to understand what is happening. Multiple flags triggered at once will see the Hex Values added together. e.g. a value of 7 would indicate the first three flags (00000001+00000002+00000004=00000007)
Hex Value | Decimal Value | Meaning |
---|---|---|
00000001 | 1 | Port Injection System not enabled in this mapswitch mode |
00000002 | 2 | Incoming CAN packet not valid |
00000004 | 4 | Engine Load below activation threshold |
00000008 | 8 | Incoming Fuel Pressure not valid |
00000010 | 16 | Fuel cut in progress |
00000020 | 32 | Pulsewidth Actual is less than Lag Time |
00000040 | 64 | Pulsewidth Actual and Pulsewidth Target differ by more than tolerance amount |
00000100 | 256 | Pulsewidth Target is less than maximum allowed |
00000200 | 512 | Pulsewidth Target is more than maximum allowed |
00000400 | 1024 | Pulsewidth Actual is less than minimum allowed |
00000800 | 2048 | Pulsewidth Actual is more than maximum allowed |
00001000 | 4096 | PI Mass Actual is more than Mass Total |
00002000 | 8192 | PI Mass Target is more than Mass Total |
00004000 | 16384 | PI Percentage Actual is more than maximum allowed |
00008000 | 32768 | PI Percentage Target is more than maximum allowed |
00010000 | 65536 | PI Injector Duty Target is less than minimum allowed |
00020000 | 131072 | PI Injector Duty Target is more than maximum allowed |
00040000 | 262144 | PI Injector Duty Actual is less than minimum allowed |
00080000 | 524288 | PI Injector Duty Actual is more than maximum allowed |
00100000 | 1048576 | PI Effective Pulsewidth Target is less than minimum allowed |
00200000 | 2097152 | PI Effective Pulsewidth Actual is less than minimum allowed |
00400000 | 4194304 | DI Fuel Mass has reached the maximum allowed. PI Percentage Target has been increased |
00800000 | 8388608 | Overrun detected, fuel will be cut from PI immediately |
01000000 | 16777216 | Post fuel cut PI fuel will be restored immediately |
Tuning
The main steps for tuning are:
Ensure port injectors are properly calibrated for flow rate and latency (default tables are for ID1050x)
Set minimum Effective pulsewidth to suit (default values are an acceptable starting point)
Adjust
Note |
---|
At this time optimum default values for the maps have not been fully worked out. |
Customisation
The Port Injection Subsystem is highly customisable.
The PI variables for Mass, Volume and Pulsewidth Target and Actual can be used as Custom Map input so all sorts of custom control are possible.
The PI Percentage Target is a Custom Map output and can be altered or replaced
The PI Mass Target is a Custom Map output and can be altered or replaced
The PI Mass Actual is a Custom Map output and can be altered or replaced
If you are not using the MOTIV Motorsport Re|Flex, then any of the Target values can be sent over CAN to some other external controller. Data returned from the external controller can either be fed into PI Pulsewidth Actual, or into a custom map that can replace PI Mass Actual.
Alternately the tuner can create their own system because the Fuel Multiplier can be directly altered by a Custom Map driven from a CAN Input.