Pendulum in Cartesian and Polar Coordinates
This example shows two different implementations of a planar pendulum.
The implementation in Cartesian coordinates has a high differential index, which means that nonlinear index reduction using the Projection method is required in order to simulate this model.
The implementation in Polar coordinates does not have a high differential index, which means that nonlinear index reduction is not required.
The Cartesian implementation of a planar pendulum has a differential index of three, and is not compatible with the Derivative Replacement method. The "Projection" method must be used in order to simulate this implementation, and neither "None" nor "Derivative replacement" will simulate successfully.
Simulation Results from Simscape Logging
The figure shows the pendulum angle as a function of time. The amplitude decreases due to the damping in the model.