Delay - Initial conditions config.
38 views (last 30 days)
Show older comments
How to configure the delay block to delay a sample with initial conditions.
Sample Time: Ts
Initial Condition: Input port. External constant block with value 3.
Delay Length: 1
Simulink Configuration:
Start time:0
Stop time:4
Solver selection: Fixed-step
Solver: Runge-Kutta
Fixed-step size: Ts/100.
I can't get the initial conditions value I want in the Delay state.
I would be grateful if you could help me with this issue.
Regards
Juan
0 Comments
Answers (2)
Ashok
on 19 Nov 2024 at 5:30
The Delay block can be used to delay the input signal by a specific number of samples. The output during the initial time steps of the simulation is influenced by the block sample time, delay length, and simulation start time. The block adopts a discrete sample time represented as [Tsampling, Toffset], where Tsampling is the sampling period and Toffset is the initial time offset. Here, n refers to the value of the Delay length parameter, and Tstart is the simulation start time for the model. The following table shows the Delay block output for the first few time steps with these settings:
Please ensure that the value of the sampling time, 'Ts' is less than or equal to the simulation's stop time. More information on specifying sample time can be found in the following page:
Here's an example to help with using the Initial condition parameter in the Delay block. A simple use case of the 'Delay' block with sampling time of 'Ts' has been constructed with the properties of the different blocks set as depicted below.
The solver properties are shown below.
The scope displays the step signal delayed by 0.5 seconds:
The Initial condition parameter in the Delay block sets the output signal value as 3 for the first 0.5 seconds. Kindly refer the following page for more details on the ‘Delay’ block:
0 Comments
See Also
Categories
Find more on Discrete in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!