4.1. Analog Dual Channel Accelerator Pedal Driver - AccrPedlDrvr

Id

AccrPedlDrvr

Version

0.5.0.0

Title

Analog Dual Channel Accelerator Pedal Driver

System

Drivetrain

Document Type

Application Software Component Specification Preview

4.1.1. Overview

The AccrPedlDrvr software component is responsible for processing the accelerator pedal position signals and providing the pedal position and status information to other components in the system. It performs the following main functions:

  • Reads the accelerator pedal position sensor voltage signals from two redundant channels

  • Converts the voltage signals to pedal position percentage values

  • Performs plausibility checks and fault detection on the pedal position signals

  • Provides filtered and rate-limited pedal position values

  • Determines the pedal pressed status

  • Outputs pedal position, status and fault information

4.1.2. Functions

Title

Description

1

Accelerator Pedal Voltage to Position Conversion

Converts the raw accelerator pedal position sensor voltage signals from two redundant channels to corresponding pedal position percentage values. Performs scaling and range checks.

2

Accelerator Pedal Plausibility and Fault Detection

Performs plausibility checks on the accelerator pedal signals to detect faults such as out-of-range values, cross-channel deviations, calibration errors, etc. Sets fault status flags accordingly.

3

Accelerator Pedal Filtering and Rate Limiting

Filters the raw pedal position signals to remove noise. Applies rate limiting to limit the maximum rate of change of pedal position. Different driver-selectable rate limits are provided.

4

Accelerator Pedal Pressed Detection

Determines if the accelerator pedal is pressed or not based on the pedal position and a calibrated threshold with hysteresis.

4.1.3. Ports

Id

Direction

Data Type

Dimensions

Unit

Description

Keywords

1

Ts

Incoming

single

[1]

s

Ts

2

AccrPedlUChn1

Incoming

single

[1]

V

Expected signal: Voltage for Channel 1 of accelerator pedal
If signal is NA: Mandatory

Accelerator Pedal Voltage Channel1

3

AccrPedlUChn2

Incoming

single

[1]

V

Expected signal: Voltage for Channel 2 of accelerator pedal
If signal is NA: Mandatory

Accelerator Pedal Voltage Channel2

4

AccrPedlDrvrURefExt

Incoming

single

[1]

V

Expected signal: Reference voltage from accelerator pedal
If signal is NA: Mandatory

Accelerator Pedal Driver Voltage Reference External

5

AccrPedlFilMod

Incoming

Enum: CmndrvAccrFilg

[1]

inherit

Expected signal: Drive mode used for acceleration filter settings
If signal is NA: Set to CmndrvAccrFilg.Normal

Accelerator Pedal Filter Mode

6

AccpdrvrAccrPedlVld

Outgoing

boolean

[1]

inherit

Accpdrvr Accelerator Pedal Valid

7

AccpdrvrAccrPedlPosn

Outgoing

single

[1]

%

Accpdrvr Accelerator Pedal Position

8

AccpdrvrAccrPedlPsd

Outgoing

boolean

[1]

inherit

Accpdrvr Accelerator Pedal Pressed

9

AccpdrvrDiagc

Outgoing

Bus: AccpdrvrDiagc

[-1]

inherit

Accpdrvr Diagnostic

10

AccpdrvrAccrPedlErr

Outgoing

boolean

[1]

inherit

Accpdrvr Accelerator Pedal Error

4.1.4. Parameters

Id

Data Type

Dimensions

Range

Unit

Description

Keywords

1

AccpdrvrChnCompHys

single

[1,1]

Min: 0, Max: 100

%

Cross-Channel Comparison Hysteresis

Accpdrvr Channel Comparison Hysteresis

2

AccpdrvrChnCompThd

single

[1,1]

Min: 0, Max: 100

%

Cross-Channel Comparison Fault Threshold

Accpdrvr Channel Comparison Threshold

3

AccpdrvrPedlPsdHys

single

[1,1]

Min: 0, Max: 100

%

Pressed Event Detection Hysteresis

Accpdrvr Pedal Pressed Hysteresis

4

AccpdrvrPedlPsdThd

single

[1,1]

Min: 0, Max: 100

%

Pressed Event Detection Threshold

Accpdrvr Pedal Pressed Threshold

5

AccpdrvrRateLimDwn

single

[1,3]

Min: -10000, Max: 0

%

Rate limit for decresing (in respect with driving mode)

Accpdrvr Rate Limit Down

6

AccpdrvrRateLimUp

single

[1,3]

Min: 0, Max: 10000

%

Rate limit for increasing (in respect with driving mode)

Accpdrvr Rate Limit Up

7

AccpdrvrFilTiCon

single

[1,1]

Min: 0, Max: 1

s

Accel pedal filter, <0.01 - to disable filter

Accpdrvr Filter Time Constant

8

AccpdrvrChnCompRstTmr

single

[1,1]

Min: 0, Max: 10

sec

Cross-Channel Fault RESET Timeout

Accpdrvr Channel Comparison Reset Timer

9

AccpdrvrChnCompSetTmr

single

[1,1]

Min: 0, Max: 10

sec

Cross-Channel Fault SET Timeout

Accpdrvr Channel Comparison Set Timer

10

AccpdrvrUEndStopPosnChn2

single

[1,2]

Min: 0, Max: 10

V

Voltage at Endstop Positions for channel 2

Accpdrvr Voltage End Stop Position Channel2

11

AccpdrvrURngChn1

single

[1,2]

Min: 0, Max: 12

V

Admissible Voltage Range channel 1

Accpdrvr Voltage Range Channel1

12

AccpdrvrURngChn2

single

[1,2]

Min: 0, Max: 12

V

Admissible Voltage Range channel 2

Accpdrvr Voltage Range Channel2

13

AccpdrvrConURef

single

[1,1]

Min: 0.01, Max: 100

V

Constant voltage reference for Accpdrvr

Accpdrvr Constant Voltage Reference

14

AccpdrvrUseExtURef

boolean

[1,1]

Min: , Max:

Use external voltage reference measurement for Accpdrvr

Accpdrvr Use External Voltage Reference

15

AccpdrvrUEndStopPosnChn1

single

[1,2]

Min: 0, Max: 10

V

Voltage at Endstop Positions for channel 1

Accpdrvr Voltage End Stop Position Channel1

16

AccpdrvrFilModOvrd

uint8

[1,1]

Min: 0, Max: 3

Manual mode overried (0 - NO override, 1 - smooth , 2 - normal , 3 - aggresive)

Accpdrvr Filter Mode Override

4.1.5. Calibration

AccrPedlDrvr must be set up according to the specifications of the accelerator pedal being used.

4.1.5.1. Step 1 - Configure Pedal Supply Voltage

The pedal position is calculated based on the input voltages of Channels 1 and 2. In a real-world application, it is possible that the actual reference (source) voltage of the pedal can vary slightly from the ideal voltage given by the parameter AccpdrvrConURef (typically 5V or 12V). In such case, the voltages of Channels 1 and 2 may be shifted slightly, which would also induce an error in the computed pedal position. To remedy this, a scaling factor can be activated to adjust the voltages of Channels 1 and 2 based on the deviation of the actual external voltage reference given by Inport #3: AccrPedlDrvrURefExt compared to the ideal voltage reference from AccpdrvrConURef. This scaling correction can be activated by setting AccpdrvrUseExtURef to true and ensuring that the expected reference voltage is correctly set in AccpdrvrConURef.

To disable this scaling correction, set AccpdrvrUseExtURef to false, and ground Inport #3: AccrPedlDrvrURefExt.

4.1.5.2. Step 2 - Calibrate Pedal Position Output Characteristic

AccrPedlDrvr must be configured with the correct voltage ranges to map the pedal position from zero to one hundred percent. The parameters AccpdrvrUEndStopPosnChn1 and AccpdrvrUEndStopPosnChn2 are used to define the actual end stop voltages of the pedal. These parameters contain two values, one for the 0% (fully depressed) pedal position and one for the 100% (fully pressed) pedal position. If a 5V sensor is used, and the voltage range is set to [0.5, 5], a typical end stop value would be [1, 4] so that a small margin is kept before reaching the end of the valid voltage range. This allows for flexibility while fine-tuning the pedal settings, and in case of small voltage reading errors.

4.1.5.3. Step 3 - Configure Voltage Range Monitor

Once the end-stop voltages are set, the parameters AccpdrvrURngChn1 and AccpdrvrURngChn2 define the sensor range of the first and secondary (redundant) channels respectively. For instance, if a 5V sensor is used, the range is typically set from 0.5V to 5V. Keeping a buffer from 0V to 0.5V allows for a pull-down resistor to pull the voltage to 0V (out of range) when the pedal is disconnected. The validity flag of the Channel would go to false when the voltage reading is outside of the expected range.

If only one channel is available, set both channels with the same inputs and parameters for Steps 2 and 3. However, it will disable the channel comparison described in Step 4 below, and the pedal position validity will be taken directly from the range checks described above.

4.1.5.4. Step 4 - Configure Dual Channel Comparison Monitor and Validity

The validity of the pedal position is determined by comparison of both channels and their respective validity. The comparison can be tuned using AccpdrvrChnCompThd to allow for a small difference in both channels before deeming the signal invalid. Similarly, AccpdrvrChnCompHys is used to set a hysteresis on the error signal, to avoid oscillations. An On/Off delay can also be tuned to reduce oscillations. Use AccpdrvrChnCompSetTmr for the On delay, and AccpdrvrChnCompRstTmr for the Off delay.

4.1.5.5. Step 5 - Configure Pedal Position Filter

The pedal position is filtered by a 1st order low-pass filter with configurable time constant, and configurable up/down rate limits. It can be configured using three predefined filtering modes: smooth, normal, and aggressive, that can be selected based on Drive Mode. If an external filtering mode request is available, it should be connected to Inport #4: AccrPedlFilMod, and the parameter AccpdrvrFilModOvrd shall be set to 0. Otherwise, a drive mode shall be selected using AccpdrvrFilModOvrd and Inport #4: AccrPedlFilMod can be grounded.

The rate limiter properties of the filter can be tuned using AccpdrvrRateLimUp and AccpdrvrRateLimDwn for the rising and falling rate limits respectively. These parameters have a dimension of 3, matching the three possible drive modes. AccpdrvrFltRstLo shall be set to the pedal position value under which the filter resets. AccpdrvrFilTiCon is the time constant of the filter itself, and can be set to tune the pedal response.

4.1.5.6. Step 6 - Configure Pedal Switch Deadband

The final pedal position signal is used to generate a pedal pressed flag, which goes through a Deadband detection with hysteresis. The activation threshold can be set with AccpdrvrPedlPsdThd, and the hysteresis with AccpdrvrPedlPsdHys. The signal from Outport #3: AccpdrvrAccrPedlPsd will remain false below the activation threshold.