On/Off Delay
Implement switch-on or switch-off delay
Library
Simscape / Electrical / Specialized Power Systems / Control
Description
The On/Off Delay block implements the following logic when the Select
type parameter is set to On delay
:
When the input becomes true, the output becomes true after a preset time delay. The output remains true as long as the input is true.
When the input is false or becomes false, the output becomes false with no delay.
When the Initial condition of previous input parameter is set to
1
, and the input is true at t = 0, the output is true with no delay.
The On/Off Delay block implements the following logic when the Select
type parameter is set to Off delay
:
When the input becomes false, the output becomes false after a preset time delay. The output remains false as long as the input is false.
When the input is true or becomes true, the output is true with no delay.
When the Initial condition of previous input parameter is set to
0
, and the input is false at t = 0, the output is false with no delay.
Parameters
- Select type
Select between
On delay
(default for On Delay blocks) orOff delay
(default for Off Delay blocks).- Time delay (s)
Specify the duration of the delay, in seconds. When the Sample time parameter is greater than 0, the time delay value must be a multiple of the sample time. Default is
0.01
.- Initial condition of previous input
Specify the initial value of the previous input. Default is
0
for On Delay blocks and1
for Off Delay blocks.- Sample time
Specify the sample time of the block, in seconds. Set to
0
to implement a continuous block. Default is0
.
Inputs and Outputs
The input signal must be a Boolean signal. The output is Boolean.
Characteristics
Direct Feedthrough | Yes |
Sample Time | Specified in the Sample Time parameter |
Scalar Expansion | Yes, of parameters |
Dimensionalized | Yes |
Zero-Crossing Detection | No |
Examples
The power_Logic
example
shows the operation of the On/Off Delay block.
The model sample time is parameterized with the variable Ts (default value Ts = 5e-3). To simulate a continuous On/Off Delay block, specify Ts = 0 in the MATLAB® Command Window.
Version History
Introduced in R2013a