Electrical Engineering
Use System Modeler to construct and study electrical circuits, power electronics, and electrical machinery. Combine electrical and mechanical components to build complete system models. Perform analysis tasks and measure performance.
Inverted Pendulum: Symbolic Model Linearization
The Model
In this example, a PID controller is used to keep the pendulum in its upright position. The pivot point of the pendulum is mounted on a cart that can move horizontally, controlled by a motor and gear arrangement.

Control Design
The inverted pendulum system is linearized around its upright position. The length of the pendulum is kept in symbolic form. The control system is then designed by tuning the PID parameters for different lengths of the pendulum.
New in SystemModeler 12.0
Obtain symbolic linearization with your selected symbolic parameters.

The combined system consisting of the PID controller and the inverted pendulum is verified for stability using the Nyquist plot. The open-loop transfer function of the combined system has one unstable pole, and there is one encirclement around {-1,0} in the counterclockwise direction. As the unstable pole and encirclement cancel out, it can be inferred that the closed-loop system will have no unstable poles.
Check stability
Use Nyquist plot to check unstable poles of the closed-loop system.

After verifying the stability, the model is simulated. You can now observe the raw data for the oscillations and plot the envelope of the response. You can see that with an increase in length, the time to reach steady state increases.
Deploy controller
Observe the system behavior for different lengths.

Wolfram System Modeler
Try
Buy
System Modeler is available in English
and Japanese
on Windows, macOS & Linux »
Questions? Comments? Contact a Wolfram expert »