Variable in a simulink state space matrix
이전 댓글 표시
How can I implement a matrix in a state space model in simulink that has a variable that is dependent on another component of the model signal such as an angle etc?
I have tried sending the signal to the workspace and calling in the matrix with a variable (of the same name) in it and it does not work.
Thank you.
댓글 수: 8
David Wilson
2019년 4월 20일
First up, you do realise that if you have a varying parameters in your state-space model, it is no longer a linear constant coefficient time-invariant ODE, so that means no more simple linear tools such as ss, lti etc. You have now a nonlinear model.
One way is to use a matlab funciton block to assemble you [A] matrix. Then you'll have to build your own dynamic ss model such as below (from my text book)

Sugs
2019년 4월 20일
David Wilson
2019년 4월 20일
편집: David Wilson
2019년 4월 20일
The book is free.
But I guess it still would be a waste of your time.
Andreas Bernatzky
2019년 4월 20일
Hey Sugs,
David is right you would produce a non-linear model. But I will not bother you with it.
The picture David posted is the solution so ¯\_(ツ)_/¯ It means you can not use the built in StateSpace-Block you have to build your State-Space Model by your own. And a State-Space model consists of your 4 Matrices A,B,C,D.
Depending on your application you have to manipulate one of your matrices, but which one depends on your real system.
Sugs
2019년 4월 20일
Star Strider
2019년 4월 20일
@David Wilson — Thank you for the links! I’ll peruse them later.
Walter Roberson
2019년 4월 22일
편집: Walter Roberson
2019년 4월 23일
Tunable models in Simulink correspond to ss() with a genmat() parameter, or to genss() .
When you have a tunable model, then at any one time each parameter has a distinct value, but you can change the parameter and the effect will be reflected on the model blocks. This differs from creating something like a symbolic representation with a variable name and using laplace transform and so on, in that for symbolic representations the calculation is generalized and the variable does not have a value until later, if ever. The MATLAB tools for symbolic control systems are mostly missing.
Sugs
2019년 4월 23일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Time and Frequency Domain Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!