Hi,

how can I get all state vectors of state space block during simulation in Xcos?

Thank you.

Scilab

__Answers:__

You can get all output states of state space block by using a vector multiplication. For example, if the states are [x1 x2], you can extract the x1 state by multiplying the output by the vector [1 0]. Similarly, you can extract the x2 state by multiplying the output by the vector [0 1]. This vector can be defined using the "GAINBLK_f". This block can be found inside the "Mathematical Operations" category on the "Palette Browser".

Rupak

Yes and the states (the x vector) are available on the output "y" because we define "y=C*X". So if you define C as an identity matrix of proper dimension, all your states are available on output "y".

Hm, intreresting approach... Actually C is not identity matrix in my model so I need to dupplicate the state space block and define C as a identity matrix for this new block. The new block must run in parallel with the original block. I guess that's doable... Thank you very much for the tip.

Login to add comment

You are welcome. I think you can safely consider C to be identity with its "number of rows" matching the "number of rows" of B. I dont see any reason how C affects your system's model.

Rupak

Oh, it does... The state space comes from reducing a FE model by using the model superposition method. I couple the state space with a controller model. The states x are in modal coordinates. The output y is in physical coordinates. Big difference...

Login to add comment

17-12-18, 3:07 p.m.alexandruLogin to add comment