Solving state space equation using matlab function block in simulink

5 views (last 30 days)
Hi, Im trying to model a synchronous machine. My present situation is, i know the A, B, C, D values and my input signal is coming from other blocks which are voltages, speed etc. State variable in my case is flux. I need to find this flux value so as to find derive current, torque etc. So how to solve this state space equation to get the state variable. I tried to read many examples but im not able to find the one I need. Any help is appreciable

Answers (1)

Sebastian Castro
Sebastian Castro on 18 Aug 2015
If you already know the A, B, C, D matrices, why not use a State-Space Simulink block, then?
- Sebastian
  2 Comments
leonn alexander
leonn alexander on 18 Aug 2015
But i don't know how to use that block. And one more thing i forgot to say is, i have the equation xdot= Ax + Bu only with me. Im not concerned about y. So, i can give an input which will act as "u" in the equation, but i have to get "x", the state variable, as output. So can I use y=x as the second equation which will give me C=1 and D=0 and is that the way to do it?
Sebastian Castro
Sebastian Castro on 18 Aug 2015
That block takes in the A, B, C, D matrices as MATLAB matrices -- not much to it!
Also yes, if y = x, then your C and D matrices are 1 and 0 respectively, as you said. For example, if your A matrix is 4x4, your C matrix is the 4-dimension identity matrix: In MATLAB, eye(4).

Sign in to comment.

Categories

Find more on Programmatic Model Editing 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!