WOLFRAM SYSTEM MODELER

InvertedPendulum

A controlled inverted pendulum system

Diagram

Wolfram Language

In[1]:=
SystemModel["IntroductoryExamples.Systems.InvertedPendulum"]
Out[1]:=

Information

The pendulum system consists of an electrical motor, a gear, and a pendulum connected to a cart. The position of the cart is controlled using a controller with LQ (Linear Quadratic) design. The first priority of the controller is to make sure that the pendulum stays in an upright position.

Simulate the system for 20 seconds and view the result in an animation window. The figure below shows an animation at time 11.3 seconds using the pulse reference signal (referenceType=2):

The position of the cart can be changed by the referenceType parameter. With the time table option (referenceType=3) you can create your own arbitrary signal. Change different parameters of the system, e.g., limit the maximum output signal from the controller (controller.uMax), length of pendulum (pendulum.l_pendulum) and see what happens.

Parameters (1)

referenceType

Value: 2

Type: Integer

Description: Type of reference signal: 1=step, 2=pulse, 3=time table

Components (4)

motor

Type: ElectricalMotor

Description: A simplified voltage controlled motor

controller

Type: LQControlSystem

Description: Controller based on LQ (Linear Quadratic) design

pendulum

Type: Pendulum

Description: An inverted pendulum connected to a cart

gear

Type: GearBox

Description: A gear system with a rotational gear coupled to a pinion and a rack