-
Notifications
You must be signed in to change notification settings - Fork 2
Logging Parameters For Rev Matching
The rev matching patch adds several data-logging parameters that are useful for tuning.
Rev Match Gear Multiplier - This shows the current ratio between vehicle speed and engine speed. I'm actually not sure what the units are, but I do know that it's the same units that are used in the "Gear Multipliers" table. Log this parameter to find the values to put into that table.
Rev Match Current Gear - This is the ECU's best guess as to what your current gear is, based on engine RPM and vehicle speed. Note that if you have the clutch pedal pressed, or if the transmission is in neutral, this can be inaccurate.
While the clutch pedal is not pressed, this should always reflect that actual gear that you're in. If it doesn't you need to adjust the parameters in the Gear Determination Thresholds table.
Rev Match Target Upshift RPM - This is the RPM that the ECU will try to achieve for shifting into the next higher gear. This is only used for flat-foot-shifting.
Rev Match Target Downshift RPM - This is the RPM that the ECU will try to achieve for shifting into the next lower gear. This is used for downshift rev matching.
Rev Match Calibration Index - This probably won't be very useful, but it is the index of the RPM value used in calibration mode.
Rev Match Throttle Plate Target - This is the value from the drive-by-wire tables, or the value substituted by the rev-matching code when rev matching is active.
Rev Match From Gear - This is usually equal to the Rev Match Current Gear parameter, unless the clutch pedal is pressed. In that case, this will hold the last value calculated by the Current Gear logic.
Rev Match Throttle Pedal Position - This value comes from the throttle pedal position sensor.
Rev Match Throttle Plate Actual - This value comes from the sensor in the throttle butterfly valve.
Rev Match Feedback Proportional / Integral / Derivative - These are the values computed the PID feedback loop that manages the throttle plate angle while rev matching is active. A proper discussion of PID feedback is beyond the scope of this wiki page.
Rev Match Cruise Flags - This is an 8-bit value where each bit corresponds to something that is of interested to the cruise-control logic:
enum CruiseFlagsABits { CruiseFlagsAEnableButton = 1, CruiseFlagsAIsEnabled = 2, CruiseFlagsASetCoast = 4, CruiseFlagsAResumeAccel = 8, CruiseFlagsAHardBrake = 16, CruiseFlagsALightBrake = 32, CruiseFlagsACancel = 64, CruiseFlagsAClutch = 128 };
Rev Match State - This will be a small whole-number value. The values are:
enum RevMatchStates { RevMatchDisabled = 0, RevMatchAlmostEnabled = 1, RevMatchEnabled = 2, RevMatchReadyForAccelerationDownshift = 3, RevMatchDecelerationDownshift = 4, RevMatchAccelerationDownshift = 5, RevMatchCalibration = 6, RevMatchExpired = 7, };
It will be in the Disabled state after starting the engine (or any time RPM drops below 500).
It will be in AlmostEnabled while you're holding the cruise-cancel switch, then Enabled after you release the switch.
Brakes+Clutch puts you into DecelerationDownshift. Tapping cruise-cancel gives you a 2-second window where pressing the clutch by itself will put you into AccelerationDownshift.
DecelerationDownshift and AccelerationDownshift are the states where it will take over throttle control. They will transition to Expired after 2 seconds.
After Enabled, it will stay in Enabled until RPM drops below 500, which basically means shutting off the engine. There isn't any other way to go from Enabled back to Disabled. It's reliable and consistent enough that I just didn't see a reason to add that.