This example shows a single pendulum modeled using Simulink® input/output blocks and using Simscape™ Multibody™. The initial angle for the joint is defined by a MATLAB® variable. The annotations on the integrator block show the initial angle of the joint with respect to the world frame.
The Simulink model is built using signal connections, which define how data flows from one block to another. The Simscape Multibody model is built using physical connections, which permit a bidirectional flow of energy between components. Physical connections make it possible to add further stages to the pendulum simply by using copy and paste. Input/output connections require rederiving and reimplementing the equations.