Study and Operation of Inverted Pendulum System 
Procedure

Fig. 1. Schematic of the Cart-Pendulum plant
Steps to perform the simulation
- Enter the value of the gain kd2 (a positive integer value) in Controller Analysation box and click on 'Submit' button.
- The values of gains kp1, kp2, ki1, ki2 and kd1 will be calculated.
- Click on "Stabilizing controller" block in the control panel, click on 'Get calculated controller values' button. The controller values will be visible in respective boxes in controller block. Click on 'Ok'.
- Set desired time for simulation (preferably 10 sec., maximum 100 sec) in corresponding input box on top of the panel.
- Switch on the power supply by clicking on the 'Red Switch' under digital pendulum mechanical unit.
- Click on 'Incremental Build' icon and wait for an alert message to successfully build the model.
Fig. 4. Digital pendulum mechanical unit in simulation
- Click on "Connect to Target" icon now and wait for the run button to get enabled.
- Click on the green 'Power' button on digital pendulum controller. Now click on 'Start' button just beside that 'Power' button.
- Click on the run button now. Provide an initial value of angle (approximately -6° ≤ θ ≤ +6°) in Controller Analysation box then click on the pendulum pole to make it inverted (vertically upright position).
- Click on 'Simulate' button to observe the simulation for inverted pendulum control and graphical representation of cart position, pendulum angle and control voltage.
- Plot can be downloaded by clicking on 'Download' button. Now click on 'Ok' button beside the 'Download' button.
- Wait untill the pendulum stops oscillating and the system settles down. Click on 'Show Table' button in control panel, then on 'Clear' button. Click on 'Stop' button on digital pendulum controller.
- Note: If the cart-pendulum system becomes unstable for any initial angle, wait untill the pendulum stops oscillating and the system settles down. Then one alert message will get appeared. After the pendulum stops completely, click on 'Clear' button, then on 'Reset' button to bring the cart-pendulum system to center position on track.
- Change the gain value kd2 and repeat steps 2-8 for another initial value of angle (degree).
- Click on 'Compared plots' button to observe compared graphical representations of all the provided initial angle value and gain values.

Fig. 2. Controller Analysation box in simulation

Fig. 3. Stabilizing controller and controller block in simulation