Delay - Initial conditions config.

34 次查看(过去 30 天)
JuanMa
JuanMa 2024-11-18,19:48
回答: JuanMa 2024-11-19,12:10
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

回答(2 个)

Ashok
Ashok 2024-11-19,5:30
Hey @JuanMa,
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:

JuanMa
JuanMa 2024-11-19,12:10
Thank´s Ashok!!!

类别

Help CenterFile Exchange 中查找有关 Discrete 的更多信息

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by