multi spark: random bursts of CUSTOM_OBD_SKIPPED_SPARK = 9009 error code at Abricos's #3223

This commit is contained in:
rusefi 2021-09-27 17:11:04 -04:00
parent 7aab88f521
commit 62b712be5c
5 changed files with 34 additions and 20 deletions

View File

@ -95,6 +95,11 @@ floatms_t WallFuel::adjust(floatms_t desiredFuel DECLARE_ENGINE_PARAMETER_SUFFIX
float alpha = expf_taylor(-120 / (rpm * tau));
float beta = CONFIG(DISPLAY_CONFIG(wwaeBeta));
if (engineConfiguration->debugMode == DBG_KNOCK) {
tsOutputChannels.debugFloatField1 = alpha;
tsOutputChannels.debugFloatField2 = beta;
}
// If beta is larger than alpha, the system is underdamped.
// For reasonable values {tau, beta}, this should only be possible
// at extremely low engine speeds (<300rpm ish)
@ -106,6 +111,11 @@ floatms_t WallFuel::adjust(floatms_t desiredFuel DECLARE_ENGINE_PARAMETER_SUFFIX
float fuelFilmMass = wallFuel;
float M_cmd = (desiredFuel - (1 - alpha) * fuelFilmMass) / (1 - beta);
if (engineConfiguration->debugMode == DBG_KNOCK) {
tsOutputChannels.debugFloatField3 = fuelFilmMass;
tsOutputChannels.debugFloatField4 = M_cmd;
}
// We can't inject a negative amount of fuel
// If this goes below zero we will be over-fueling slightly,
// but that's ok.
@ -116,6 +126,10 @@ floatms_t WallFuel::adjust(floatms_t desiredFuel DECLARE_ENGINE_PARAMETER_SUFFIX
// remainder on walls from last time + new from this time
float fuelFilmMassNext = alpha * fuelFilmMass + beta * M_cmd;
if (engineConfiguration->debugMode == DBG_KNOCK) {
tsOutputChannels.debugFloatField5 = fuelFilmMassNext;
}
DISPLAY_TEXT(Current_Wall_Fuel_Film);
DISPLAY_FIELD(wallFuel) = fuelFilmMassNext;
DISPLAY_TEXT(Fuel correction);

View File

@ -1,6 +1,6 @@
#include "global.h"
#include "rusefi_enums.h"
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Sun Sep 26 02:05:28 EDT 2021
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Mon Sep 27 17:04:22 EDT 2021
// see also gen_config_and_enums.bat
@ -210,8 +210,6 @@ case Force_4_bytes_size_cranking_ignition_mode:
}
const char *getDebug_mode_e(debug_mode_e value){
switch(value) {
case DBG_16:
return "DBG_16";
case DBG_34:
return "DBG_34";
case DBG_ALTERNATOR_PID:
@ -314,6 +312,8 @@ case DBG_VVT_3_PID:
return "DBG_VVT_3_PID";
case DBG_VVT_4_PID:
return "DBG_VVT_4_PID";
case DBG_WALL_WETTING:
return "DBG_WALL_WETTING";
case Force_4_bytes_size_debug_mode_e:
return "Force_4_bytes_size_debug_mode_e";
case MODE_52:

View File

@ -792,7 +792,7 @@ typedef enum {
DBG_SD_CARD = 13,
DBG_SR5_PROTOCOL = 14,
DBG_KNOCK = 15,
DBG_16 = 16,
DBG_WALL_WETTING = 16,
/**
* See also DBG_ELECTRONIC_THROTTLE_EXTRA
*/

View File

@ -295,7 +295,7 @@ float baseFuel;+Base mass of the per-cylinder fuel injected during cranking. Thi
int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0
end_struct
#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "GPPWM", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "VVT1 PID", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION_1_7", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "FSIO_COMPOSITE_LOG", "FSIO_EXPRESSION_8_14", "INVALID", "Injector Compensation", "Dyno_View", "Logic_Analyzer", "rusEFI Wideband", "TCU", "Lua", "VVT2 PID", "VVT3 PID", "VVT4 PID", "mode 52", "mode 53"
#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "GPPWM", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "VVT1 PID", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Wall Wetting", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION_1_7", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "FSIO_COMPOSITE_LOG", "FSIO_EXPRESSION_8_14", "INVALID", "Injector Compensation", "Dyno_View", "Logic_Analyzer", "rusEFI Wideband", "TCU", "Lua", "VVT2 PID", "VVT3 PID", "VVT4 PID", "mode 52", "mode 53"
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@
#define VM_VVT_INACTIVE 0

View File

@ -439,14 +439,14 @@ enable2ndByteCanID = false
; wall of debug mode :)
; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields
; Alternator TPS Acceleration GPPWM Idle Engine Load Acc Trigger Counters VVT1 PID VVT Sync Cranking Ignition Timing Fu Corr VSS SD Card Knock ETB PID Executor InstantRpm FSIO_1_7 CJ125 CAN MAP TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune FSIO_8_14 FSIO_SPECIAL Injector flow compensation DYNO_VIEW LOGIC_ANALYZER Wideband TCU Lua VVT2 PID VVT3 PID VVT4 PID
; Alternator TPS Acceleration GPPWM Idle Engine Load Acc Trigger Counters VVT1 PID VVT Sync Cranking Ignition Timing Fu Corr VSS SD Card Knock Wall Wetting ETB PID Executor InstantRpm FSIO_1_7 CJ125 CAN MAP TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune FSIO_8_14 FSIO_SPECIAL Injector flow compensation DYNO_VIEW LOGIC_ANALYZER Wideband TCU Lua VVT2 PID VVT3 PID VVT4 PID
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
; DBG_ALTERNATOR_PID DBG_TPS_ACCEL DBG_GPPWM DBG_IDLE_CONTROL
debugFieldF1List = bits, U08, [0:7], "Alt: Controller Output", "From TPS", "GPPWM 1", "Idle: Controller Output", "Idle output", "Channel 1 Rise Counter", "", "VVT1: Controller Output","VVT Event Position", "", "Ign IAT Corr", "", "", "Total SD", "last volts", "", "", "ETB Controller Output", "", "", "df1", "df1", "InstantRpm", "fsio 1", "24:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude", "", "fsio 8", "idle offset", "Pressure across injector(kpa)", "VSS", "", "WB: Pump DAC duty", "", "Lua Debug 1", "VVT2: Controller Output","VVT3: Controller Output","VVT4: Controller Output"
debugFieldF2List = bits, U08, [0:7], "Alt: I Term", "To TPS", "GPPWM 2", "Idle: I Term", "Idle df2", "Channel 2 Rise Counter", "", "VVT1: I Term", "VVT Ratio", "", "Ign CLT Corr", "", "", "Write Cnt","last filtered","", "", "ETB I Term", "", "", "df2", "df2", "InstantRPM Ratio","fsio 2", "24:df2", "CJ125: i term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude", "", "fsio 9", "idle min", "Pressure ratio vs. nominal", "Speed", "", "WB: ESR", "", "Lua Debug 2", "VVT2: I Term", "VVT3: I Term", "VVT4: I Term"
debugFieldF3List = bits, U08, [0:7], "Alt: Previous Error", "Current TPS<>TPS", "GPPWM 3", "Idle: prev error", "Idle df3", "ICU sum", "", "VVT1: prev error", "", "", "Ign FSIO Adj", "", "", "Sync Cnt", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "fsio 3", "24:df3", "CJ125: err", "", "", "", "", "", "", "TPS1/2 Diff", "", "", "", "Boost Duty", "S unused" "", "Tu", "", "fsio 10", "", "Flow ratio vs. configured", "DeltaSpeed", "", "WB: Nernst Voltage", "", "Lua Debug 3", "VVT2: prev error", "VVT3: prev error", "VVT4: prev error"
debugFieldF4List = bits, U08, [0:7], "Alt: I Gain", "Extra Fuel", "GPPWM 4", "Idle: I Gain", "Idle df4", "VVT rise", "", "VVT1: I Gain", "", "", "Ign PID Adj", "", "", "File Cnt", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "fsio 4", "24:df4", "CJ125: UA", "", "MAP Estimate", "", "", "", "", "Acc Pedal Pri/Sec Diff","", "", "", "Boost Target", "S unused" "", "Ku", "", "fsio 11", "", "", "accel", "", "WB: Lambda", "", "Lua Debug 4", "VVT2: I Gain", "VVT3: I Gain", "VVT4: I Gain"
debugFieldF5List = bits, U08, [0:7], "Alt: D Gain", "df5", "df5", "Idle: D Gain", "Idle df5", "VVT fall", "df5", "VVT1: D Gain", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "fsio 5", "24:df5", "CJ125: UR", "", "", "", "", "", "", "TPS1 Pri/Sec Ratio", "", "", "", "", "S unused" "", "Kp", "", "fsio 12", "", "", "", "", "", "", "Lua Debug 5", "VVT2: D Gain", "VVT3: D Gain", "VVT4: D Gain"
debugFieldF1List = bits, U08, [0:7], "Alt: Controller Output", "From TPS", "GPPWM 1", "Idle: Controller Output", "Idle output", "Channel 1 Rise Counter", "", "VVT1: Controller Output","VVT Event Position", "", "Ign IAT Corr", "", "", "Total SD", "last volts", "", "WW: Alpha", "ETB Controller Output", "", "", "df1", "df1", "InstantRpm", "fsio 1", "24:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude", "", "fsio 8", "idle offset", "Pressure across injector(kpa)", "VSS", "", "WB: Pump DAC duty", "", "Lua Debug 1", "VVT2: Controller Output","VVT3: Controller Output","VVT4: Controller Output"
debugFieldF2List = bits, U08, [0:7], "Alt: I Term", "To TPS", "GPPWM 2", "Idle: I Term", "Idle df2", "Channel 2 Rise Counter", "", "VVT1: I Term", "VVT Ratio", "", "Ign CLT Corr", "", "", "Write Cnt","last filtered","", "WW: Beta", "ETB I Term", "", "", "df2", "df2", "InstantRPM Ratio","fsio 2", "24:df2", "CJ125: i term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude", "", "fsio 9", "idle min", "Pressure ratio vs. nominal", "Speed", "", "WB: ESR", "", "Lua Debug 2", "VVT2: I Term", "VVT3: I Term", "VVT4: I Term"
debugFieldF3List = bits, U08, [0:7], "Alt: Previous Error", "Current TPS<>TPS", "GPPWM 3", "Idle: prev error", "Idle df3", "ICU sum", "", "VVT1: prev error", "", "", "Ign FSIO Adj", "", "", "Sync Cnt", "", "", "WW: film mass", "ETB err", "", "", "df3", "df3", "22df3", "fsio 3", "24:df3", "CJ125: err", "", "", "", "", "", "", "TPS1/2 Diff", "", "", "", "Boost Duty", "S unused" "", "Tu", "", "fsio 10", "", "Flow ratio vs. configured", "DeltaSpeed", "", "WB: Nernst Voltage", "", "Lua Debug 3", "VVT2: prev error", "VVT3: prev error", "VVT4: prev error"
debugFieldF4List = bits, U08, [0:7], "Alt: I Gain", "Extra Fuel", "GPPWM 4", "Idle: I Gain", "Idle df4", "VVT rise", "", "VVT1: I Gain", "", "", "Ign PID Adj", "", "", "File Cnt", "", "", "WW: m_cmd", "ETB I setting", "", "", "df4", "df4", "22df4", "fsio 4", "24:df4", "CJ125: UA", "", "MAP Estimate", "", "", "", "", "Acc Pedal Pri/Sec Diff","", "", "", "Boost Target", "S unused" "", "Ku", "", "fsio 11", "", "", "accel", "", "WB: Lambda", "", "Lua Debug 4", "VVT2: I Gain", "VVT3: I Gain", "VVT4: I Gain"
debugFieldF5List = bits, U08, [0:7], "Alt: D Gain", "df5", "df5", "Idle: D Gain", "Idle df5", "VVT fall", "df5", "VVT1: D Gain", "", "", "", "", "", "", "", "", "WW: film mass next","ETB D setting", "df5", "df5", "df5", "df5", "22df5", "fsio 5", "24:df5", "CJ125: UR", "", "", "", "", "", "", "TPS1 Pri/Sec Ratio", "", "", "", "", "S unused" "", "Kp", "", "fsio 12", "", "", "", "", "", "", "Lua Debug 5", "VVT2: D Gain", "VVT3: D Gain", "VVT4: D Gain"
debugFieldF6List = bits, U08, [0:7], "Alt: D Term", "", "", "Idle: D Term", "Idle df6", "Current Gap", "", "VVT1: D Term", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "fsio 6", "24:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki", "", "fsio 13", "", "", "", "", "", "", "Lua Debug 6", "VVT2: D Term", "VVT3: D Term", "VVT4: D Term"
debugFieldF7List = bits, U08, [0:7], "Alt: Max-Value", "", "", "Idle: Max-Value", "Idle df7", "", "", "VVT1: Max-Value", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "fsio 7", "24:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd", "", "fsio 14", "", "", "", "", "", "", "Lua Debug 7", "", "", ""
debugFieldI1List = bits, U08, [0:7], "Alt: P Gain", "", "", "Idle: P Gain", "Idle di1", "Channel 1 Fall Counter", "", "VVT1: P Gain", "VVT Sync Counter", "Cycle Counter", "Multispark Count", "", "", "", "hip corr", "", "", "ETB P-Gain", "t counter", "", "di1", "di1", "Spark Event Gap","", "24:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count", "", "", "", "", "", "", "deltatime", "", "", "Solenoid 1 State", "Lua memory used","VVT2: P Gain", "VVT3: P Gain", "VVT4: P Gain"