0
votes

Let's say I want to model this equation (electrical motor, 6 phases):

Vs = Rs*Is + d/dt*(Ls*Is)

where all variables are matrix, so:

Vs = [va1 vb1 vc1 va2 vb2 vc2]' (column vector)

Is = [ia1 ib1 ic1 ia2 ib2 ic2]' (column vector)

Ls and Rs are 6x6 matrix (constants)

From my point of view the Vs is the input vector and Is is the output vector so I need to rearrange the equation.

I have seen that is not possible in Simulink to feed the Transfer Fcn block with matrix, at least not for a multiple input multiple output system.

Is there a way to realize this on Simulink still using the matrix Ls and Rs without "unpacking" the equation?

Thank you

2

2 Answers

0
votes

I would re-arrange your equations in state-space form and use the State-Space block, which is better suited for matrix equations.

Another option is to use basic Simulink blocks, such as Integrator and Gain blocks, with vectorized inputs. I am not 100% sure this will work, but reasonably confident.

0
votes

You can use the product block with matrices inside Matlab so there should be no problem. It's also possible to use integrator/derivative block (though it's better to avoid using derivative if possible) with a vector input so if you can put your equation with Is as an output there should be no problem. You can put 2 multiply blocks with your matrices as inputs and the vector you need and you will get a vector for the output like you want.