Report
Report:
Abstract:
The report below examines an inverted pendulum experiment. In the report a brief description of the system used has been provided. The aims of the experiment have also been discussed. A block diagram of the equipment used in the experiment has also been included in the report. Matlab has been used to plot the data derived from the experiment and using this graphs the behavior of the inverted pendulum has been discussed.
A QNET rotary inverted kit was used in the experiment. The kit is shown in the figure 1 below. The kit used in the experiment consists of a DC motor, a pendulum, an L-shaped arm, two optical encoders, Elvis II board, and Lab view software. A metal chamber in the system houses the DC motor while the L-shaped arm is connected to the DC motor shaft. The L-shaped arm is connected in a way to allow it to move through ±180 degrees. At the end of the arm, there is a pendulum suspended on a horizontal axis. Two different encoders within the system measure the angle of the L-shaped arm and the pendulum. An input voltage is input into the system through the DC motor. This input produces an output in terms of the pendulum and angle of the motor.
Aims
The main aim of the experiment is to balance an inverted pendulum using the QNET Rotary Inverted Pendulum (ROTPENT) trainer kit, Elvis II board, and LabVIEW software.
Block diagram of the ROTPEN hardware
Based on the description of the system above, below is the block diagram of the entire system. The block diagram shows how the different hardware elements in the system are connected and related to each other.
Matlab Plots:
Using Matlab 8.1 the results obtained from the lab were imported into the software. The plot function was used to plot two charts. The first chart shows the input voltage vs. time while the second chart shows the angle of the pendulum and arm vs. time.
Chart 1: Chart showing the input voltage vs. time
Chart 2: Chart showing the angle of the pendulum and arm vs. time
The same behavior is seen in the plot of the arm angle shown in chart 2 since the oscillation noted in the arm is also periodic as it increases and decreases in equal intervals with time. The oscillations in the arm angle range from – 49.5 degrees to 26.5 degrees over a period of 1.7 seconds. The oscillations noted in the arm angle are as a result of the changes in the input DC voltage.
However, from chart 2 the pendulum angle seems to be balanced. This form of stabilization is achieved without a feedback loop and is known as dynamic stabilization in control systems. The pendulum is said to be stable due to the fact that the pendulum angle remains relatively constant with time and does not show any periodic variations. The pendulum angle varies slightly from 176.2 degrees to 182.5 degrees.
This stabilization has been achieved due to the oscillations seen in the arm, which help in dampening the oscillations in the entire system. The arm in this case acts as the pivot point above which the inverted pendulum’s center of mass is located. The oscillations in the arm are important as they help the inverted pendulum recover from any agitations and this helps the pendulum to balance in the inverted position. This shows clearly the behavior of the inverted pendulum.
Questions:
a.) List three (3) examples of real-world applications of an inverted pendulum.
The three real-world applications of the inverted pendulum are:
- Principles from the inverted pendulum are used in rockets and missiles guidance systems
- Principles from the inverted pendulum are used by robot manufacturers to create robots that are self-balancing
- Principles from the inverted pendulum are used in the manufacture of two wheeled Segway
b) List what types of control schemes have been applied so far for controlling inverted pendulum.
The control schemes that have been applied so far in controlling the inverted pendulum include:
- PI controllers
- PID controllers
- Fuzzy logic control systems (Mattson, 2010).
c) Explain the construction and applications of a rotary (absolute & optical) encoder, grey encoding, and encoders’ output formats.
Rotary encoder:
A rotary encoder is a device that utilizes rotational motion to convert mechanical energy into digital signals that can be detected by a computer. A rotary encoder achieves this since it is made up of a rotating shaft that changes rotational motion into an electrical signal (Sclater, 2011). An absolute encoder is a specific type of rotary encoder that converts mechanical energy into electrical energy based on the position of the rotating shaft (Kim, 2011). For an absolute encoder information on the position of the shaft is constant, therefore, information is available even when the encoder is not powered. Furthermore, the encoder does not need to adjust constantly information about its position since the position of the encoder does not change during normal operations. During the manufacturing process of the encoder, the output received from a specific position of the rotational shaft remains constant (Kim, 2011).
Construction of a rotary encoder
An absolute rotary encoder is either constructed as a mechanical encoder or an optical encoder. A mechanical encoder consists of a metal disc that has a number of rings, which are fixed permanently on the shaft. The design is also composed of a number of stationary contacts that touch the metal disc at different positions based on the position of the shaft. The metallic disc is then connected to a current source while the stationary contacts are connected to electrical sensors (Wilson, 2009). The metallic disc contains regions where the electrical circuit is complete as well as regions where it has gaps and the electrical circuit is not complete. When the shaft rotates, the stationary contacts touch the metal disc at different positions with some positions being gaps and others having electrical contacts. This leads to binary encoding during the on / off positions as the disc rotates. The on position gives a 1 while the off position gives a 0 (Kim, 2011).
Construction of an optical encoder
An optical encoder utilizes principles of light transmissions. An optical encoder is constructed using a glass disc that contains opaque and transparent sections. On one end of the glass disc is a light source while on the other is a light detector. As the disc rotates, the light in the opaque parts is obstructed while in transparent parts it is allowed to pass. This leads to binary encoding during as it gives rise to on / off positions as the glass disc rotates. The on position (when light is allowed to pass) gives a 1 while the off position (when light does not pass) gives a 0 (Wilson, 2009).
Applications of rotary encoders
Rotary encoders are used in numerous applications, which include robotics, input devices such as the optical mouse and track balls in computing.
Grey encoding
Grey encoding and encoders rely on the Gray code. The Gray code is a binary system whereby two successful digits differ by only one value. This implies that only one switch is required to be moved in order to move from one value to the next.
Output formats
Once the encoder has encoded 1’s and 0’s it must be able to transmit them to the computer or control system. This is achieved through a number of output formats. The three main output formats utilized for communication are the Ethernet format, point-to-point format, and fieldbus format. The Ethernet format main relies on computer networking equipment and communication protocols. This is done by creating a computer network between the encoder and controller where the encoder can transmit the encoded data. For the point-to-point format, parallel and serial analogue communication protocols are utilized. For this format, the encoder requires a point-to-point serial or parallel communication channel to the controller. Lastly, the field bus format requires the use of a computer bus to transmit encoded data to the controller (Wilson, 2009).
d) What is the accuracy (in degrees) of the optical encoder measuring the pendulum angle?
The optical encoder measuring the pendulum angle has an accuracy of 0.001 degrees. This value of accuracy is derived from the figures that the optical encoder provides such as 176.224. This implies that it has an accuracy of three decimal places.
e) Which inverted pendulum is easier to control – one with the heavier weight or lighter weight, and why?
An inverted pendulum with a heavier weight is easier to control as compared to one with a lighter weight. This is attributed to the fact that a heavier inverted pendulum will stabilize quicker as compared to a lighter one. A lighter weight will be easily affected by oscillations and will loose balance easily as compared to a heavier load.
Conclusion
The experiment carried out was successful since we were able to balance an inverted pendulum using the QNET Rotary Inverted Pendulum (ROTPENT) trainer kit, Elvis II board, and LabVIEW software.
References
Gu, D.-W., Konstantinov, M. M., & Petkov, P. H. (2005). Robust control design with MATLAB. London: Springer.
Kim, T. (2011). Control and automation, and energy system engineering Berlin: Springer.
Li, Z., Yang, C., & Fan, L. (2013). Advanced control of wheeled inverted pendulum systems. London: Springer.
Maeda, K. (2006). Nonlinear control system of inverted pendulum based on input-output linearization. New York: Sage
Mattson, M. (2010). CNC programming: Principles and applications. Clifton Park, NY: Delmar, Cengage Learning.
Sclater, N. (2011). Mechanisms and mechanical devices sourcebook. New York, NY: McGraw-Hill.
Wilson, J. S. (2009). Test and measurement. Amsterdam: Elsevier/Newnes.