Lab report ( Qnet rotary inverted pendulum trainer )

Experiment: Simulation of an Inverted Pendulum using Virtual Instruments


The need for stabilization of unstable systems is a much-needed necessity. Advances in in computing and software has made design simpler coupled with a cheaper implementation of the systems. This gives an explanation why applications of control are expanding (Sinha, & Gupta, 2000). The skill necessities for control systems include modeling, control design, implementation, simulation and tuning commissioning and control system operation (Proceedings of the 2000 IEEE International Symposium on Computer Aided Control System Design, 2000). Many tasks and experimentations can be carried in demonstration of full range of skills in control systems. One of the experiments that can be used to illustrate a deeper understanding of the control systems is the Simulation of an Inverted Pendulum using Virtual Instruments. The inverted pendulum forms the benchmark is very much used in demonstrating the linear feedback control theory which is applied in stabilization of open-loop unstable systems. The inverted pendulum system is typically simple for experimentation yet it gives aver detailed practical representation of the control systems (Liu, n.d.).

The principle task in this control experimentation is to swing the up the pendulum from its stable equilibrium position to the unstable equilibrium one and eventually balance it at the upright position, then to further move the cart to a specified position through driving it left and right. The more ideal problem is moving/guiding the pendulum from an arbitrary condition to the upright equilibrium then stabilizing the cat in the most desired position.

The experiment involves simulation. Simulation is important since it helps to create and analyse the behavior of the dynamic system in software before implementing it in hardware. It enables an easy reusability and ability to observe the behavior of a dynamic system. It can be used to validate the system under real-world constraints. The first step in creating simulation is through creation of a simulation loop. The simulation loop is important in bringing together differential equation solvers and timing features (Lessard, 2009). The Labview also uses graphical approach which allows non-programmers to build programs using the drag and drop feature for virtual representations of the lab equipment they are familiar with. However, this may not be of help where large-scale systems that may require extensive knowledge is necessary (Johnson, & Jennings, 2006). Through graphical feature enables an easy testing of each VI before embedding as a subroutine into a larger program. The graphical (G) language is a dataflow language whose execution depends on the structure of graphical block diagram. The programmer connects different function nodes (build arrays) by drawing wires which then propagate variables and any of the nodes executes when all its input data is available. This implies a parallel execution. The multiprocessing and multithreading hardware automatically gets used by the built-in scheduler for node ready for execution.

Schematics and procedure

Start-up procedure

The TA powered up the AMP and the inverted pendulum. The Labview zipped files were downloaded and unzipped all the contents in a folder on the desktop. An exe file was found in one of the subfolders which opened the simulation and control windows when started. The hardware program was started after the pendulum was manually inverted. In order to check if the pendulum was working properly, Kpx=50 value was provided to the Cart Controller and a value for Kp to make sure the motor responded and was working well. The simulation was then stopped.

Obtaining the model and model verification

Having set all the tools necessary in this experimentation, the Labview palettes were of greatest help in carrying out the experiment. There were several palettes used as can be shown below but the main palettes used were the simulation palette, design control palette and the functions palette. An illustration of how they appeared is as shown below. From

lab report ( Qnet rotary inverted pendulum trainer )

lab report ( Qnet rotary inverted pendulum trainer ) 1

The first task was to obtain the damping parameter which was mainly done using the relevant palettes. The damping value was changed until a near desirable value was obtained and noted down. Through simulation, the process of linearization and obtaining the transfer function was done. Then, the P, PI and the PID controller feedback loop for the pendulum was obtained using the relevant palettes. Then the Labview simulator program was used in stabilizing both the pendulum and the cart.

Note: In using the simulation, the simulation loops were used. In order to do this, necessary blocks were dragged from the control and simulation palettes. The “connection wire” from the tools palette was used to draw necessary wires. Simulation parameters were then configured accordingly. The results were then noted as shown in the section below.

Results and Discussions

Having followed the proper procedures as outlined above, the end result for the simulation was functions were as illustrated in the snapshot below

Flab report ( Qnet rotary inverted pendulum trainer ) 2 igure1: This gave a graphical representation as shown in the diagram below.
The functional view of the simulation

Flab report ( Qnet rotary inverted pendulum trainer ) 3 igure 2:
Different blocks used in e simulation

From the diagram, It can be seen the control and simulation loop as well as different blocks that were used in the simulation. It shows the damping, the angling and the stabilization outputs of the process. As a result of this simulation, the inverted pendulum went vertical and stayed there.

lab report ( Qnet rotary inverted pendulum trainer ) 4

This implies that the simulation succeeded as would be expected of an ideal experimental design concerning the control systems of this kind.


This experiment shows an experimental success of an experimental design because the simulation succeeded in achieving the task objective. It can therefore be concluded that Labviews can be used to successful simulate control systems


Johnson, G., & Jennings, R. (2006). LabVIEW graphical programming. New York: McGraw-Hill.

Lessard, C. (2009). Basic feedback controls in biomedicine. [San Rafael, Calif.]: Morgan & Claypool.

Liu, Z. Control engineering and information systems.

Proceedings of the 2000 IEEE International Symposium on Computer Aided Control System Design. (2000). Piscataway, N.J.

Sinha, N., & Gupta, M. (2000). Soft computing and intelligent systems. San Diego: Academic Press.

Thomas, P. (1999). Simulation of industrial processes for control engineers. Oxford: Butterworth-Heinemann.