Filter löschen
Filter löschen

solving for x in a state space model

2 Ansichten (letzte 30 Tage)
Peppe
Peppe am 27 Aug. 2017
Kommentiert: Jan am 5 Jun. 2018
Hi, Assume that we have a diff equation as :
where x is nx1 and A is nxn and b is nxm and u is mx1. How do I perform algorithm to find for x given an initial values of x? If matrix A is containing different parameters from workspace how do I insert these values to a new matrix in simulink? and regarding the integrator block , how will it perform the integration when you have arrays/matrices? row by row or matrix calculations? and how do you give the initial values of x in such model?
In fact I have an observator looking like:
I use a matlab function for calculating the inverse of jacobian. for multiplication of jacobian and gain K I used the matrix multiplication block in simulink. and for addition of these terms I used a sum block. and for integration I used a integrator block. Am I doing this correctly?

Antworten (1)

Suhan
Suhan am 31 Aug. 2017
I have attached here a model 'Sample_Model.slx' which can solve the above differential equation. I have used dummy values for matrix A and B in the model, you can replace it by the actual values.
You can set the initial values for the state X in the 'integrator' block which does element wise integration of the input array.
If the matrix A is defined in case workspace, you can directly enter 'A' in the constant block. Also, note that you have to use 'matrix multiplication' in the product block.
  3 Kommentare
Peppe
Peppe am 9 Sep. 2017
I still cant see the attached file. Can you update your post Suhan
Jan
Jan am 5 Jun. 2018
[MOVED from flags] Maa wrote:
Where is the model

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by