Search code examples
matlabmatrixsimulink

Simulink transfer fcn with matrix as parameters


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


Solution

  • 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.