VLabs logo

Virtual Labs
IIT Kharagpur

IIT KGP Logo

Simulation


Instructions

  1. Enter the value of the gain kd2 (a positive integer value) in Controller Analysation box and click on 'Submit' button.

  2. The values of gains kp1, kp2, ki1, ki2 and kd1 will be calculated.
  3. 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.
    • 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).

  4. Click on 'Simulate' button to observe the simulation for inverted pendulum control and graphical representation of cart position, pendulum angle and control voltage.

  5. Plot can be downloaded by clicking on 'Download' button. Now click on 'Ok' button beside the 'Download' button.

  6. 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.

  7. 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.

  8. Change the gain value kd2 and repeat steps 2-8 for another initial value of angle (degree).

  9. Click on 'Compared plots' button to observe compared graphical representations of all the provided initial angle value and gain values.

The gain value kd2 must be a positive integer, not zero or negative.

For the provided kd2 gain value, the cart-pendulum system moves beyond the track length, hence the balancing of the pendulum fails. Change the kd2 gain value.

Controller Analysation



 kp1 :  kp2 :  ki1 :  ki2 :  kd1 :


Controller block

Controller C1
 kp1
 ki1
 kd1

Controller C2
 kp2
 ki2
 kd2