Simscape multibody model is not following simulink output
Show older comments
Dear community,
I'm facing an unexpected behavior in my Simscape Multibody model (File attached).
I'm trying to build a model in Simscape Multibody that can represent the motion of two pendulums at the same time, one using linear equation of motion and the other using non-linear equation of motion, both starting at the same angle. Both equations are modeled in Simulink by block diagrams just as in the Matlab example called "Single Pendulum in Simulink and Simscape Multibody" (I took this example as a reference).
The Simulink model is passing the values of θ through variables defined in the second inetgrator (see Figure 1, highligthed in yellow) to the revolute joints of the pendulums modeled in Simscape Multimody.

Figure 1: Pendulum Linear tranfer function (top) and pendulum non-linear transfer function (bottom).
I was expecting to see a difference in the angular position θ according to the Simulink output (Figure 2), but the motion is the same for both cases linear and non-linear in the Simscape Multibody model (Figure 3).

Figure 1: Simulink output - Output 1 is linear equation, output 2 is non-linear equation.

Figure 2: Simscape multibody output - The output in the model is the same for linear and non-linear.
I would like to know why the Simscape Multibody is having the same output when the linear motion should be different
Any ideas?
Hope you can help.
Omar
Accepted Answer
More Answers (1)
Vasco Lenzi
on 3 May 2021
0 votes
Hi Omar
Your file doesn't work out of the box because the variable declaration or the data dictionary are missing. Can you add the parameter declaration? In the meantime I used the parameters from the shipping example you shared "Single Pendulum in Simulink and Simscape Multibody"
I noticed that your two revolute joints in Multibody are configured eactly the same. How are you expecting something different? Where do you plan to implement the non-inearity? I see that in Simulink you added a sinus to the angle feedback for the non-linear system. Right now that would be more convoluted to implement in Multibody, because off-the-shelf you can only parametrize linear mechanics element such as spring and damping:

If you want to implement a non-linear loss function, you have to program it by hand
hope this helps!
Vasco
1 Comment
Omar Valladolid
on 3 May 2021
Edited: Omar Valladolid
on 3 May 2021
Categories
Find more on Assembly 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!







