How does initial state discrete transfer function work in Simulink?

17 Ansichten (letzte 30 Tage)
Ilya Yakovlev
Ilya Yakovlev am 20 Aug. 2023
Kommentiert: Ilya Yakovlev am 20 Aug. 2023
Let there be the following model:
in which the discrete transfer function has an initial state equal to 5
Step block has a step time of 0, initial value: 0, final value: 0, sample time: 0.1.
The solver is configured as a fixed-step with a fixed-step size of 0.1.
As I understand "the block initializes all filter states to the same scalar value" (https://www.mathworks.com/help/simulink/slref/discretetransferfcn.html#br74ug2-1).
The transfer function can be rewritten into a difference equation:
.
After initialization, we obtain the following calculation algorithm:
and in the next step
Why did Simulink calculate the value in step as -3.3? Why did he subtract another half of the initial value?
  2 Kommentare
Paul
Paul am 20 Aug. 2023
Hi Ilya,
The difference equation represented by the transfer function is a relationship between the output, y[n], and the input, u[n].The linked doc page suggests that the transfer function is implemented with a state space realization, and the state vector is x[n].
Unfortunately, and MUCH to its discredit, the linked doc page doesn't define the state space realization in terms of the transfer function coefficients (an infinite number of state space realizations could be used) so the meaning of the "Initial states Value" is ambiguous.
I'll note that the Discrete Filter block uses a Direct Form II as the default implmentation. But I tried that realization and it didn't seem to match the simulation of the Discrete Transfer Fcn block.
Ilya Yakovlev
Ilya Yakovlev am 20 Aug. 2023
Thank you for your reply, Paul. Indeed, after a while I realized that it was a type of Direct Form. If we change to Direct Form I, then the result coincides with the calculations.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by