Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

OpFcn Rpg Engine Pulse Decoder

Block

Mask

Description

This block is used to extract engine pulses positions from events captured using the OpFcn Multi-Event Capture block. At the hardware level, the ReferencePulseGeneration board Injector and Engine Spark inputs are generally used.

The block outputs positions of extracted pulses for each engine cycle. A cycle window (in degrees) can be specified to limit the position range where the block looks for pulses. This allows isolating pulses of an individual cylinder when the same physical signal is used for more than one cylinder.

A status output allows monitoring errors such as inverted pulse polarity or incomplete pulse within a specified extraction window.

Parameters

PolarityEither active high ('1') or active low ('0') . An active high pulse starts on a rising edge and ends with a falling edge. Active low pulses start with a falling edge.
Number of pulses to detectSpecify the number of pulses to be detected by the block in a single cycle. The block output size varies according to this parameter. Whenever the block detects fewer pulses than this value, the incomplete error status will be set.
Cycle durationDuration of an engine cycle. Typically 720 degrees for a car.
ResolutionResolution in degrees for the pulse start position and duration. Most application uses 0.1 degrees.

Inputs

RTEEvents that were captured in the last computation step. This input typically comes from the OpFcnMultiEventCapture block.
SpeedCurrent engine speed in RPM. This input typically comes from the OpFcnEngineSyncPatternGenerator block.
PositionThe current position of the engine in degrees. This input typically comes from the OpFcnEngineSyncPatternGenerator block.
Window Start/Window End

Determines the engine cycle position range where pulses are extracted. Values between 0 and Cycle duration (parameter) are accepted. The OpFcnRpgEnginePulseDetector block accumulates pulses events from Window Start to Window End then refreshes its output every time the engine position passes Window End.

It is possible to define Window Start and End that cross 0 degrees. ie.Window Start of 600 degrees and Window End of 200 degrees will cause the block to accumulate events from 600 degrees of a cycle to the first 200 degrees of the next cycle.

STS StatusSlow-to-Stop status. This input comes from the OpFcnEngineSyncPatternGenerator block and it is only used when a loopback test is done.The pulses generated by the OpFcnEngineSyncPatternGenerator block are fed back in the RPG board and they are captured by the OpFcnRpgEnginePulseDecoder block.

Outputs

Each block outputs are refreshed every time the engine position passes the Window End.

Status: Status of the pulse extraction for the last cycle. The possible values are:

ValueDescription
0No errors, pulse(s) have been found.
1No pulse detected.
2Incomplete. At least one edge was detected but the number of detected pulses is not equal the Number of pulses to detect parameter.
4Out of sync. A capture error occurred and some events might have been lost. This could happen if an overrun occured during the model execution.
8Polarity error. The first edge received does not fit with selected polarity. This usually means polarity has been inverted or the Window range is not located where the pulse occured.
16Too many events: Occurs when more pulses than expected (See Number of pulses to detect parameter) were received.
32Invalid Window Start or Window End value specified.

Values can be added to indicate multiple errors. ie. A value of 10 means incomplete (2) and polarity (8) errors.

StatusStatus of the pulse extraction for the last cycle. The possible values are:
Number of pulsesNumber of pulses that were detected during the last cycle.
Number DroppedNumber of pulses that were dropped during the last cycle. A number of 1 means one more pulse than expected has been received.
Pulse StartVector with start position (degrees) of each pulse. The size of this vector is equal to the Number of pulses to detect the parameter value. Pulses positions are stored in the vector in sequence, the first element represents the start position of the first pulse received during the last cycle.
Pulse DurationVector with pulse duration (degrees) of each pulse. The size of this vector is equal to the Number of pulses to detect the parameter value. Pulses durations are stored in the vector in sequence, the first element represents the duration of the first pulse received during the last cycle.

Characteristics and Limitations

This block has no special characteristics.

Direct FeedthroughYes
Discrete sample timeYes
XHP supportNo
Work offlineYes

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323