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.
RTE Delay
Library
RT-EVENTS Discrete
Block
Description
The RTE Delay block delays the RTE Boolean-type input by a variable amount of time. The block accepts two inputs: the first input is the signal that passes through the block; the second input is the time delay.
The Buffer size parameter defines the maximum number of events that can be stored in the internal buffer. The block clips events of the delay that exceed this size. The Buffer size must be greater than or equal to zero.
During the simulation, the block stores events in an internal buffer. At the start of the simulation, the block outputs the Initial state condition parameter until the simulation time exceeds the time delay input. Then, at each simulation step, the block outputs the signal at the time that corresponds to the current simulation time minus the delay time.
The RTE Delay block also allows you to:
- Ignore / Allow multiple outputs of same event
- Compensate for skipped events
Ignoring / Allowing multiple outputs of the same event
The RTE Delay block, as mentioned above, outputs the input signal delayed by a variable amount of time. When the time delay increases rapidly, it can occur that some events are output multiple times. By enabling Multiple Output of same Event parameter, the block will output the events multiple times. Suppose for example a delay block with an initial time delay of 0 seconds. After 2 seconds of simulation, the time delay increases to 2 seconds. The following figure illustrates the effect of the parameter on the output.
Compensating skipped events
When the time delay decreases rapidly, it can occur that some events stored in memory are never output and that the output state is invalid for the next event that will occur. By enabling the Skipped Events Compensation parameter, the block can compensate for these events and add a new event (rising or falling) to toggle the output state in a valid state. The block will output the events multiple times. Suppose for example a delay block with an initial delay of 2 seconds. After 3 seconds of simulation, the time delay decreases to 0 seconds. The following figure illustrates the effect of the compensation. When the compensation is enabled, the block adds a falling event. When the compensation is disabled, the block skips the first event to be output.
Mask
Parameters
Ignore event output multiple times | When enabled, the block ignores events that should be output multiple times. |
---|---|
Skipped events compensation | When enabled, the block compensates for skipped events. |
Initial Condition | Initial state condition output before the first event is detected. |
Buffer size | Number of events the block can store in memory. |
Maximum number of events | The maximum number of events or transitions that can occur during a single step. Over this number, events are ignored and not output. |
Input
Input (RTE Boolean) | RTE Boolean signal to delay |
---|---|
Delay (Double) | Delay signal |
Output
Output (RTE Boolean) | Delayed RTE Boolean signal |
---|
Characteristics
Direct Feedthrough | Yes |
---|---|
Sample time | Inherited and fixed discrete |
Work offline | Yes |
Dimensionalized | Yes |
Examples
The rte_encoder.mdl model demonstrates how to use RT-EVENTS blocks to simulate an incremental encoder connected to a rotating object. This example also shows how to use blocks of the library to insert a fault, to filter noise and to measure some characteristics of RTE Boolean signal. In this example, the RTE Delay block is used to generate channel B of the incremental encoder by delaying channel A.
The rte_pwm_generation.mdl model demonstrates how to use RT-EVENTS blocks to generate PWM signals of a different type. In this example, the RTE Delay block is used to generate dead time on the rising and falling edges of the two complementary signal of the PWM.
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter