[Simulink] 'Discrete' state-space block with stable system diverging its output while 'continuous' one doesn't.
2 views (last 30 days)
Show older comments
jongmin on 30 May 2018
Answered: Matthieu Labat on 2 Mar 2023
I have a system equation to solve, so I tried to use Simulink state-space block. Since there are both continuous and discrete state-space block available, I tried utilizing both blocks to solve the same equation.
The outcome is that, with exactly the same [A,B,C,D] matrices, discrete state-space block make the small disturbance diverges, while the continuous one doesn't.
But my system is stable, with all the poles' real part are negative. This fact is clearly be seen in continuous state-space block case, but it's not in discrete one. It makes the output diverging right after the simulation starts, as in the figure below.
What difference between these two blocks induces this result? Any clue..?
Paul on 2 Mar 2023
"The outcome is that, with exactly the same [A,B,C,D] matrices, ...."
The A,B,C,D matrices mean different things in the State Space and Discrete State Space blocks. The former implements a differential equation and the latter implements a difference equation. No reason at all to think that the output of both blocks would be anywhere close to the same with the same A,B,C,D, except possibly in a corner case like A = B = C = 0.
I had the same issue, because I was using the same state spaces matrices in the definition of continous and discrete state spaces.
Using the c2d command gives the proper matrices for discrete state spaces and solves the problem.
Find more on Additional Math and 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!