Simulink - EOM in matrix form

8 views (last 30 days)
Stefano sala
Stefano sala on 12 Oct 2020
Commented: Stefano sala on 15 Oct 2020
Hi All,
I need to model an EOM , representing a 3 DOF point mass with a pendulum, defined by mean of 2 angles, total 5 DOF, of the kind
where λ and τ are the resp. the generalized coordinates and forces, and where μ is the time derivative of λ.
I was starting to model a block with as output with some integrators to calculate the inputs. As additional inputs a set of constant and the generalized forces, that then will be a function of a control feedback.
I have already the definition of the 3 matrices, M,C ad G, but I have some issues working with them correctly. I prepared a set of Matlab function blocks with the symbolic definitions of the matrices and the variables that are needed. In particular I receive an error when multiplying the C matrix times μ vector.
Then I need an advice to manage the signals in input and output. I was thinking of using a MUX/DEMUX pair to route the coordinates signal around the blocks, but not really sure of this method.
Thanks for help.
SS
  1 Comment
Stefano sala
Stefano sala on 15 Oct 2020
I succeeded in solving the errors form the matlab function block.
Being a 5x1 input (generalized forces) and a 5x1 output (generalized coordinates second derivative) i've noticed that the dimension during the integration the result is not automatically correct dimensionally. so the problem. I solved that splitting the signal in vectors and integrating one by one each of them, feedbacking the single 1x1 signals.
not really sure about the result but anyway, going further.

Sign in to comment.

Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!