How does initial state discrete transfer function work in Simulink?

조회 수: 20 (최근 30일)
Ilya Yakovlev
Ilya Yakovlev 2023년 8월 20일
댓글: Ilya Yakovlev 2023년 8월 20일
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
Paul
Paul 2023년 8월 20일
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 2023년 8월 20일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by