ACTIVE TUNING SYSTEM FOR ENGINE CONTROL UNIT USING AIRFLOW METER TABLE
20190093582 ยท 2019-03-28
Inventors
Cpc classification
F02D41/2454
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
F02D2200/701
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
F02D2200/702
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
F02D41/18
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
F02D41/1402
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
F02D41/182
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
International classification
Abstract
A method for an engine control unit to conduct real time updating of data tables based on feedback from the air flow sensor without external computing. The air fuel ratio is based on information received from an air flow meter, where a look-up table is actively tuned for the air flow calibration instead of the volumetric efficiency tables. Here, the look-up table involves a single dimension value so the calculations are simpler than more complex evaluations previously set forth.
Claims
1. A method for updating an automotive fuel injection system of a combustion engine during active tuning, comprising: reading an air flow meter for determining a measured air flow entering the combustion engine; recalling a target lambda (air-to-fuel ratio) value using the lambda value from one of a look-up table and an engine control unit calculated value; determining if a difference between a current lambda value and the target lambda value is present; adjusting the look-up table lambda adjustment value based on the difference between the current lambda value and the target lambda value; replacing the lambda adjustment value for the air flow in the look-up table with the adjusted lambda value; and wherein the air to fuel table values are checked when updating to ensure that successive values are larger than the preceding values.
2. (canceled)
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0033]
[0034] The engine 85 may also be equipped with an air flow meter 92 used to find out the mass flow rate of air entering the fuel-injected engine. The air mass information is necessary for the ECU 15 to balance and deliver the correct fuel mass to the engine. Air changes its density as it expands and contracts with temperature and pressure. In automotive applications, air density varies with the ambient temperature, altitude, and the use of forced induction, which means that mass flow sensors can be more appropriate than volumetric flow sensors for determining the quantity of intake air in each cylinder.
[0035] To aid in the foregoing performance of the ECU, after market engine control units often include tables that are updatable, but this feature is not found on OEM ECUs. The OEM ECU in a vehicle uses fixed tables in flash memory to store engine operational data. These tables may be directly referenced by flash memory program code, or they can be referenced by a pointer to the table. Because flash memory takes considerable time to erase and re-flash, it cannot be altered while the ECU processor is running as the ECU operation will halt while the re-flashing task is underway. Random access memory, or RAM, on the other hand, is fast to update but is un-initialized when the power is removed from the ECU and therefore is cleared every driving cycle.
[0036] To enable rapid real time updating of the ECU's tables, the data may be copied from flash memory to RAM. To achieve this, an area of ECU RAM is reserved for a copy of the table. At startup, the ECU's code copies the data from its flash memory to RAM. All program code pointers to the table are updated to reference the table in RAM. In addition, a communication routine is added to the ECU that alters the RAM table based on commands received from external tuning software on a laptop. When the ECU is powered down and re-started, the ECU startup routine copies the original flash memory table into RAM so that all changes made to the RAM table are lost. To prevent this, the laptop can detect that the ECU has re-started and update the table automatically.
TABLE-US-00001 Pseudo code - ECU RAM initialization: ; On ECU startup if ram location flag <> special value then ; Cold boot clear all RAM copy real time update tables from flash to RAM set ram location flag = special value else ; Warm boot clear RAM outside our tables end if
[0037] Most ECUs 15 have battery backed up RAM 105 so that RAM contents such as the idle learn parameter are retained whilst the vehicle battery 5 is connected via connection 120. For real time tuning using processing internal to the ECU 15, the RAM table memory 125 contents need to be retained over multiple driving cycles in order to give satisfactory self-tuning results. Upon initialization, the ECU erases all RAM, and the real time tuning code copies tables from flash memory to RAM as described above. For active tuning, it is desirable to retain the contents of the RAM tables between driving cycles. In order to do this, the ECU initialization code is modified so that RAM tables are only copied from flash memory from a cold boot (vehicle battery has been disconnected) but not from a warm boot (ignition has been switched on).
[0038]
[0039] The state of the real time tables may be saved between tuning sessions by external tuning software running on a laptop. If a tuning session is suspended and then resumed, then the external software can determine that live tuning for a particular table is active, and sends commands to the ECU to set the RAM table values without needing to re-write the whole ECU flash memory. This process takes a fraction of a second compared to minutes to re-write the ECU flash memory.
[0040] When using an ECU with real time tuning (as with the above method or any other method that allows the ECU memory to be altered whilst the ECU is running) and while using feedback from a wideband lambda sensor, the ECU fuel tables using the present invention can be altered by software in a closed feedback loop to bring the ECU fuel tables closer to optimum. The software uses parameters to determine when fuel table changes should be made, such as engine conditions (like temperature, throttle setting), lambda parameters (minimum & maximum readings to consider) and dynamic parameters (delay after engine events etc). A copy of the base fuel table is kept so that a maximum change in the fuel table can be specified. Additional parameters determine how often changes should be made, and what closed loop strategy is used (e.g., PID algorithms), and what table smoothing algorithm should be used.
[0041] As set forth above, the fuel table is a matrix of discrete fuel values. Engine parameters are scalar values that index each axis (two to three axes or more). Because the fuel table has discrete values, an algorithm must be used to determine which cell or cells should be altered. Options include: a) closest cell, where the closest matching fuel table cell to the indexes is altered; b) weighted cell, where the four closest cells (or eight cells for three axis tables) are altered by proportion of the cell midpoint to the index scalar value; and c) precise cell, where the software only changes a cell when the index values are close to the center of the cell.
[0042] In addition, all modern ECUs 15 have a knock sensor 65 and associated processing circuitry, that use engine noise processing to determine if engine knock is occurring, and optionally how close the engine 85 might be to engine knock. An additional ignition trim table may be created that allows the main ignition tables to be altered in order to minimize engine knock where knock occurs, and optionally increase engine timing when conditions allow it. Also, there are multiple algorithms available for tuning ignition tables: a) retard on knock, when the ignition is reduced in a cell by a fixed amount when there is knock present; b) adaptive retard when the ignition is also advanced back in a cell if no knock occurs; and c) noise based timing when the knock sensor noise (rather than the presence of knock) is used to trim ignition timing.
[0043] The active knock control routines are typically executed in a timer interrupt at a fixed frequency, such as 100 Hz. The active_knock_adjustment table is a 2 or more axes lookup table with rpm and engine load indexes containing ignition timing adjustment values used to trim the ignition timing. The reference_engine_noise table below contains typical knock sensor noise value when engine knock is not occurring.
[0044] To employ a knock count method into the active ignition tuning, a pseudo code such as the following can be used:
TABLE-US-00002 set step_size = user setting for knock retard step calculate rpm & load indexes for table lookup read knock_adjustment_value from active_knock_adjustment table set knock_count = sum of all cylinder knock count if knock_count <> previous_knock_count then previous_knock_count = knock_count set new_knock_adjustment_value = knock_adjustment_value + step_size if new_knock_adjustment_value < settings_maximum_knock_adjustment then update active_knock_adjustment table value with new_knock_adjustment_value end if else if using adaptive knock control method then set new_knock_adjustment_value = knock_adjustment_value step_size if new_knock_adjustment_value > settings_minimum_knock_adjustment then update active_knock_adjustment table value with new_knock_adjustment_value end if end if
[0045] In the pseudo code above (see
[0046] Alternatively, the active tuning can be used with a knock level method as well:
TABLE-US-00003 set knock_noise = knock sensor noise calculate rpm & load indexes for table lookup read knock_adjustment_value from active_knock_adjustment table read reference_engine_noise_value from reference_engine_noise table set adjustment = (knock_noise reference_engine_noise_value) * adjustment factor set new_knock_adjustment_value = knock_adjustment_value + adjustment if new_knock_adjustment_value < maximum_knock_adjustment and new_knock_adjustment_value > minimum_knock_adjustment then update active_knock_adjustment table value with new_knock_adjustment_value end if
[0047] In the above code sequence, referring to the flow chart of
[0048] The table below illustrates an example of an ignition adjustment matrix after driving:
[0049] To modify the fuel tables using the ECU alone, a closed loop feedback routine is established. All modern ECUs use a wideband type oxygen sensor that reads the exhaust lambda ratio. Analyzing the measurements from this sensor can be used to trim the fuel tables using a closed loop feedback routine, as set forth below. The first step is establishing a target lambda, which is typically the stoichiometric ratio (lambda=1) for light and moderate load areas, which enrichment high load and cold operating temperatures. A sample target lambda table is set forth below:
[0050] Once the target lambda is established, the measurements from the oxygen sensor are compared with the target lambda to determine if the engine is operating at or close to the target lambda. The look-up table value is adjusted and the value is replace in the table when the adjusted value is greater than the previous value. In this way, the successive table values are continuously increasing.
[0051] The parameters used to control fuel active tuning are:
[0052] a. operational area (closed loop and/or open loop)
[0053] b. operational conditions (temperature, load, engine speed, gear etc)
[0054] c. operation limits (maximum trim)
[0055] d. correction methods (using existing ECU fuel trims)
[0056] e. transitional delays (engine start delay, injector restart delay)
[0057] f. sensor processing (sensor correction, lambda reading delay)
[0058]
[0059]
[0060] To compensate for the delay in lambda reading when the ECU is in active tuning, a circular buffer is kept containing engine conditions used to index changes to the fuel adjustment table (rpm, load, cam position etc). When active tuning changes are made, the historical engine conditions are then used to determine where the fuel tuning adjustment should be made. The active fuel tuning routines are typically executed in a timer interrupt at a fixed frequency, such as 100 Hz.
[0061] When using a circular buffer routine, active tuning can be accomplished by the following pseudo code:
TABLE-US-00004 ; Implements a circular delay buffer for engine conditions to compensate ; for oxygen sensor delay set old_rec_no = engine_rec_ptr + 1 ; The size of the circular array is the minimum of the maximum size and the ; delay setting (at 100Hz the units are 10ms) set end_engine_rec_no = maximum buffer size if end_engine_rec_no > setting_lambda_delay then end_engine_rec_no = setting_lambda_delay end if ; Cope with circular buffer rolling over if old_rec_no = end_engine_rec_no then old_rec_no = 0 end if get engine conditions record using index old_rec_no call active fuel tuning conditions checking routine (below) ; Update circular buffer of engine conditions save engine conditions record at index engine_rec_ptr set engine_rec_ptr = engine_rec_ptr + 1 if engine_rec_ptr = end_engine_rec_no then engine_rec_ptr = 0 end if
[0062] In the foregoing code, an array of engine conditions are created in a memory, such as rpm, load, cam position, and the like obtained at a fixed frequency (100 Hz). Referring to
[0063] Similarly, active fuel tuning conditions using a checking routine:
TABLE-US-00005 set tps = throttle position set vtc = intake camshaft position set tps_ok = tps > setting_min_tps and tps < setting_max_tps set vtc_ok = vtc > setting_min_vtc and vtc < setting_max_vtc set engine_fuel_cut when injector are shut off ; Start a delay counter if the injectors are off, or the tps ; or cam angle is out of range if engine_fuel_cut or not tps_ok or not vtc_ok then set injector_delay_counter = setting_fuel_restart_delay else if injector_delay_counter > 0 then set injector_delay_counter = injector_delay_counter 1 else ; Table update frequency if active_tuning_counter > 0 then set active_tuning_counter = active_tuning_counter 1 else ; Check engine conditions set load_ok = load > settings_min_load and load < settings_max_load set rpm_ok = rpm > settings_min_rpm and rpm < settings_max_rpm set ect_ok = ect > settings_ min_ect and ect < settings_max_ect set iat_ok = iat > settings_min_iat and iat < settings_max_iat set gear_ok = gear > settings_min_gear and gear < settings_max_gear set time_ok = engine running time > settings_min_engine_run_time if engine is in closed loop then set cl_ok = setting_active_closed_loop else set cl_ok = setting_active_in_open_loop end if set lambda_ok = lambda > settings_min_lambda and lambda < settings_max_lambda if load_ok and rpm_ok and ect_ok and iat_ok and gear_ok and time_ok and cl_ok and lambda_ok then call active fuel tuning update adjustment table routine (below) end if ; Set the cycle delay counter set active_tuning_counter = settings active fuel update frequency end if end if
[0064] In this code sequence, illustrated by the flow chart of
[0065] The active fuel tuning can also update the adjustment table using pseudo code:
TABLE-US-00006 ; Find target lambda read target_af from target_af_table ; Adjust target lambda for closed loop operation (short & long term trims) if settings_use_fuel_trims then set adjustment = (short_term_fuel_trim + long_term_fuel_trim) set target_af = target_af* adjustment end if ; Find adjustment table indexes call find closest table indexes (below) ; Check the delta cam, load & rpm and within range if cam_angle_delta < settings_max_delta_cam and rpm_delta < settings_max_rpm_delta and load_delta < settings_max_load_delta then ; Calculate adjustment read current lambda adjustment value from table if lambda < target_af then ; Lean set delta_lambda = target_af lambda set adjustment = delta_lambda * fuel change per cycle set new_value = value + adjustment if new_value > settings_max_delta then new_value = settings_max_delta end if else ; Rich set delta_lambda = lambda target_af set adjustment = delta_lambda * fuel change per cycle set new_value = value adjustment if new_value < settings_min_delta then new_value = settings_min_delta end if end if update lambda adjustment table value with new_value end if
[0066] In the preceding routine, the target lambda is read from the target lambda table in step 800 of
[0067] To find the closest table index, the following code is used:
TABLE-US-00007 ; Find closest cam angle index ; cam_index_lookup is the table lookup scalar index if no vtc then ; use first cam angle table set cam_index = 0 set cam_angle_delta = 0 else set cam = engine intake camshaft advance angle set cam_index = number of cam angle tables 1 set cam_delta = 0 while index > 0 set mid_point = (cam_index_lookup[cam_index] + cam_index_lookup [cam_index 1]) / 2 set cam_angle_delta = cam cam_index_lookup[cam_index 1] if cam > mid_point then set cam_angle_delta = cam_index_lookup[cam_index] cam exit while loop end if set cam_index = cam_index 1 end while if cam_delta < 0 then set cam_delta = cam_delta end if end if ; ; Find closest rpm and load indexes ; rpm_index_lookup and load_index_lookup are the table lookup scalar indexes ; ; Rpm set rpm_index = rpm_index_lookup size 1 set rpm_delta = 0 while rpm_index > 0 set mid_point = (rpm_index_lookup[rpm_index] + rpm_index_lookup [rpm_index 1]) / 2 set rpm_delta = rpm rpm_index_lookup [rpm_index 1] if rpm > mid_point ; Rpm is higher than the mid point set rpm_delta = rpm_index_lookup[rpm_index] rpm exit while end if set rpm_index = rpm_index 1 end while if rpm_delta < 0 then set rpm_delta = rpm_delta end if ; Load set load_index = load_index_lookup size 1 set load_delta = 0 while load_index > 0 set mid_point = (load_index_lookup[load_index] + load_index_lookup[load_index 1]) / 2 set load_delta = load load_index_lookup[load_index 1] if load > mid_point ; Load is higher than the mid point set load_delta = load_index_lookup[load_index] load exit while end if set load_index = load_index 1 end while if load_delta < 0 then set load_delta = load_delta end if
[0068] In the foregoing routine, the rpm, load and current camshaft position are read in step 900 of
[0069] Using the code above, the sample active tuned fuel adjustment table before driving found above is modified as follows after driving:
[0070] In an alternate embodiment, the airflow meter table is optimized during active tuning to determine the fuel requirements using mass flow rather than volumetric efficiency. The fuel injected quantity is based on information received from an air flow meter, where a look-up table is actively tuned for the air flow calibration instead of the volumetric efficiency tables of the previous embodiment. In this embodiment, the look-up table involves a single dimension value so the calculations are simpler than the preceding example.
[0071] For the Air-Fuel Meter active tuning, the code to determine the target lambda is still used, but a new update routine is employed. Rather than using an adjustment table like the speed density active tuning, when using the Air Fuel Meter active tuning the original table values are kept in another table and used to limit the changes to the AFM look-up table as per the parameters of
[0072] The AFM update routine, the flow chart of which is shown in
TABLE-US-00008 set AFM_voltage = time delayed value of the AFM voltage from the circular buffer set AFM_table_index = the AFM table index value for AFM_voltage set original_value = AFM_original_values[AFM_table_index] set limit_value = original_value * max delta set current_value = AFM_table[AFM_table_index] set new_value = current_value if lambda < target_af then ; lean set delta_lambda = target_af lambda set adjustment = delta_lambda * fuel change per cycle if adjustment < 1 then adjustment = 1 if current_value + adjustment < limit_value then new_value = current_value + adjustment else ; rich set delta_lambda = lambda target_af set adjustment = delta_lambda * fuel change per cycle if adjustment < 1 then adjustment = 1 if current_value adjustment > limit_value then new_value = current_value adjustment ; make sure AFM table value increase if new_value < previous value in AFM table then new_value = previous value in AFM table if new_value > next value in AFM table then new_value = next value in AFM table
[0073] The AFM table values are checked when updating to ensure that successive values are larger than the preceding values. The same process could be used with the fuel injector table. That is, if only one variable is changed at a time on a stock vehicle, then the difference in engine operation can be attributed to that change and the corresponding look-up table is adjusted accordingly.