Dear Label_Name,

Greetings! I hope you are well.

I am writing on behalf of an international publishing house, Science and Education Publishing, USA (http://www.sciepub.com).

Science and Education Publishing (SciEP) is a multidisciplinary open access publisher of Journals covering the fields of Science, Technology and Medicine. All SciEP publications are subject to high-quality peer review, editorial and production processes and are freely available online.

Welcome to the April, 2013 edition of SciEP newsletter, providing monthly summaries of articles on science & education related topics of interest to scientist and professionals. The mission of our journals is to provide an open access forum for publishing new findings on issues pertinent to scientific and academic field. We also invite you to submit original research papers, review articles, short reports, or case studies are considered for publication in our Multidisciplinary Journals.

American Journal of Public Health Research
DOI: 10.12691/ajphr-1-1-3

The Implementation of a Tele-Homecare System with Service Oriented Architecture and HL7 Message Transmission Standard
Ching-Sung Wang

American Journal of Medical and Biological Research
DOI: 10.12691/ajmbr-1-1-2

The Influence of Ethanol on Pyruvate Kinases Activity in Vivo, in Vitro, in Silico
Lelevich Sergey Vladimirovich, Khrustalev Vladislav Victorovich, Barkovsky Eugene Victorovich, Shedogubova Tatyana Aleksandrovna

American Journal of Medical Sciences and Medicine
DOI: 10.12691/ajmsm-1-1-1

Clinical and Histological Features in Wegener Granulomatosis
Li Cavoli Gioacchino, Passantino Rita, Bono Luisa, Tortorici Calogera, Ferrantelli Angelo, Giammarresi Carlo, Rotolo Ugo

American Journal of Infectious Diseases and Microbiology
DOI: 10.12691/ajidm-1-1-2

The Curse of Lymphatic Filariasis: Would the Continual Use of Diethylcarbamazine Eliminate this Scourge in Papua New Guinea?
Anne Lanham, Lillian Mwanri

We have released issues of some journals on February 2013.
American Journal of Public Health Research
American Journal of Medical Sciences and Medicine
American Journal of Medical and Biological Research
American Journal of Pharmacological Sciences
American Journal of Clinical Medicine Research
American Journal of Nursing Research
American Journal of Cancer Prevention
American Journal of Medicine Studies
American Journal of Infectious Diseases and Microbiology
American Journal of Cardiovascular Disease Research
American Journal of Biomedical Research
American Journal of Mechanical Engineering
American Journal of Microbiological Research
Journal of Preventive Medicine
American Journal of Food and Nutrition
American Journal of Hypertension Research
American Journal of Sports Science and Medicine
Journal of Cancer Research and Treatment
American Journal of Zoological Research
Journal of Biomedical Engineering and Technology
American Journal of Microbiological Research
Biomedical Science and Engineering

We are pleased to announce that submissions are now being accepted for peer review for all the journals across all our subject areas in SciEP.

Please submit your manuscript via our online submission system:
http://www.sciepub.com/author/signin

To unsubscribe from our mailing list, please click on the following link: unsubscribe

I am looking forward to hearing from you.

Kind regards,

David Rain
Email:join@sciepub.com
Science and Education Publishing (http://www.sciepub.com)

Design and Implementation of Ball and Beam System Using PID Controller

A. Taifour Ali*, Ahmed A. M., Almahdi H. A., Osama A. Taha, A. Naseraldeen A.

Sudan University of Science and Technology

Abstract: The ball and beam system is laboratory equipment with high nonlinearity in its dynamics. The main ideas of the paper are to model the ball and beam system considering nonlinear factors and coupling effect and to design Proportional Integral Derivative (PID) controller to control the ball position. The system consists of an Arduino microcontroller. It receives the ball position from ultrasonic distance sensor and compares it with the desired distance which can be set by the user. PID algorithm has built in Arduino to process the difference in signal between desired and real position into control signal. Arduino sends control signal to the DC servomotor which rotate to change the ball position and meet the desired distance. MATLAB software program has been used to plot instant system response by interfacing Arduino with computer to determine the system characteristics with different values of controller parameters in order to choose parameters values which obtained best performance for the system.

Keywords: ball, beam, PID, implementation

Citation: A. Taifour Ali, Ahmed A. M., Almahdi H. A., Osama A. Taha, A. Naseraldeen A., Design and Implementation of Ball and Beam System Using PID Controller. Automatic Control and Information Sciences, 3 (1). 1-4. January 2017. doi:10.12691/acis-3-1-1

1. Introduction

The control of unstable systems is very important for many control problems. Since such systems prove dangerous to test in vertical position control of aerospace and air planes, we can only study them in laboratories by modeling the system. The ball and beam system is also called ‘balancing a ball on a beam’. It is generally linked to real control problems such as horizontally stabilizing an airplane during landing and in turbulent air flow. The aim of the system is to control the position of the ball to a desired reference point, and reject disturbances such as a push from a finger. The control signal can be derived by feeding back the position information of the ball. The control voltage signal goes to the direct current (DC) servomotor, and then the torque generated from the motor drives the beam to rotate to the desired angle. Thus, the ball can be located at the desired position.

The ball and beam system has been studied and used in the tests of new methods by many researchers. In particular, I. Petkoviç, M. Brezak, and R. Cupec have conducted artificial vision based tests of the system [1]. P. Dadios and R. Baylon did a similar study on fuzzy logic [2]. J. Whelan and J. V. Ringwood, on the other hand, used the same system for position tracking through a camera instead of sensors, using PID controllers [3]. Sıtkı KOCAOĞLU, Hilmi KUŞÇU they Design and Control Ball and Beam System in which they used PID controllers [4].

2. System Mathematical Modeling

The system consist of two separated systems, the first one is the DC servo motor which is an electromechanical system that receives electrical signal from controller and gives output as a rotational displacement (angle). The second is ball and beam model which is a mechanical system that receives rotational displacement (angle) from motor and converts it into a linear displacement.

2.1. DC Servo Motor Model

A common actuator in control systems is the DC motor. It directly provides rotary motion and, coupled with wheels or drums and cables, can provide translational motion. The electric equivalent circuit of the armature and the free-body diagram of the rotor are shown in Figure 1.

Figure 1. Equivalent circuit of DC motor

So the transfer function becomes as shown in Equation (1)

[picture] | (1)

2.2. Ball and Beam System Model

A ball is placed on a beam, as shown in Figure 2, where it is allowed to roll the ball along the length of the beam. A lever arm is attached to the beam at one end and a servo gear at the other. As the servo gear turns by an angle , the lever changes the angle of the beam by . When the angle is changed from the horizontal position, gravity causes the ball to roll along the beam. A controller will be designed for this system so that the ball's position can be manipulated.

Figure 2. Ball and beam model

So the transfer function becomes as shown in Equation (2)

[picture] | (2)

3. System Practical Model

System Practical model is separated into two parts; the mechanical part which consists of beam, lever arm and DC servomotor horn and electrical part which consists of DC servomotor, ultrasonic sensor and Arduino microcontroller.

3.1. System Mechanical Part

Selection of appropriate material for a mechanical part is an essential element of all engineering projects. The main mechanical parts of the system are the base support, beam and ball as shown in Figure 3.

Figure 3. Main parts of the system

Following materials are used in to build the system:

• Base support made of wood has length of (40 cm) and width of (20 cm).

• Aluminum beam which has length of (34 cm), and width of (2 cm).

• Servo motor horn.

• Lever horn.

The dimensions of the physical model are shown in Figure 4.

Figure 4. Dimensions of the physical model

3.2. System Electrical Part

The Electrical circuit consists of:

• Arduino Uno

• DC servo motor (DSS-M15)

• Ultrasonic sensor.

Ultrasonic sensor connected to pin 7 (digital pin) because it sends its output signal in a digital form to the Arduino which divide the input signal into 58 to determine the ball distance in centimeters, this value represent the input of the PID to be compared with the set point. The servo motor connected to pin 9 which it can be used as a Pulse Width Modulation (PWM), it receives its input (angle) from PID controller. The electric circuit connections shown in Figure 5.

Figure 5. The electrical circuit connections

4. PID Controller Design

It is difficult to design a controller with Ziegler-Nicolas for major reason; it was found that the overall system is a fifth order system which mean difficult to design controller for a higher order systems. To make the control design easy the whole system is separated into two feedback loops; inner loop and outer loop as shown in Figure 6. The purpose of the inner loop is to control the motor gear angle position so that gear angle (θ) tracks the reference signal (ref θ). The outer loop uses the inner feedback loop to control the ball position.

Figure 6. Overall system

In general the gains of Kp, Ki, and Kd will need to be adjusted by the user in order to best serve the system. While there is no a static set of rules for which the values should be used for any system, following the general procedures should help in tuning a circuit to match one’s system and environment. In general a PID circuit will typically overshoot the set point value slightly and then quickly damp out to reach the set point value.

Manual tuning of the gain settings is the simplest method for setting the PID controls. However, this procedure is done actively (the PID controller turned on and properly attached to the system) and requires some amount of experience to fully integrate. To tune PID controller manually, first the integral and derivative gains are set to zero [5]. Increase the proportional gain until observing oscillation in the output. After the proportional gain is set, the derivative gain can then be increased. Derivative gain will reduce overshoot and damp the system quickly to the set point value or near it. If the derivative gain increased too much, large overshoot will be seen. Once the derivative gain is set, increase the integral gain until any offset is corrected for on a time scale appropriate for the system. If the gain increased too much, significant overshoot of the set point value and instability in the circuit will be observed. The best performance depends on designer specifications. All the parameters had get from manual tuning method shown in Table 1.

Table 1. The PID parameters

The best parameters that gives the best response in real KP=4, Ki=1, Kd=2.

5. Experimental Results

This section demonstrates the results of a real time plotting using MATLAB of ball and beam system using design of PID controller with manual tuning method. With desired value of distance between ultrasonic sensor and rolling ball set to be 15 cm, noted that this value can be changed by modifying it in the controller algorithm considering it as the set point (reference) of the control system.

Setting the values of controller parameters as Kp=2, Ki=0, Kd=0 the real time plotting of ball position as shown in Figure 7. The system oscillates at the beginning but the oscillating decrease with time, in addition to large steady state error, bad long settling time, bad longer rise time and large overshoot value.

Figure 7. System response with Kp=2, Ki=0, Kd=0

By substituting the values of controller parameters with Kp=3, Ki=0, Kd=0.5 as shown in Figure 8. Adding derivative component to controller decreases the overshoot and settling time, also improving the steady state error to some extent.

Figure 8. System response with Kp=3, Ki=0, Kd=0.5

Changing the values of controller parameters with Kp=3, Ki=0.5, Kd=1 as shown in Figure 9. Adding Integral component to controller decreases the overshoot and significantly improves both the settling time and the steady state error.

Figure 9. System response with Kp=3, Ki=0.5, Kd=1

By substituting the values of controller parameters with Kp=4, Ki=1, Kd=2 as shown in Figure 10. The steady state errors of the response eliminated and overshoot and settling time decreased.

Figure 10. System response with Kp=4, Ki=1, Kd=2

To test system accuracy, the set point changed to be 10cm as shown in Figure 11 and 20cm as shown in Figure 12 by using the best controller parameters (Kp=4, Ki=1, Kd=2). Noticed that, where the ball near to the sensor (10cm) there wasn’t over shoot and small oscillation around set point (10cm). Where the ball far from the sensor (20cm) the over shoot and settling time increased.

Figure 11. System response with set point (10cm)

Figure 12. System response with set point (20cm)

6. Conclusion

A mathematical model of the ball and beam system was developed using physical and electrical laws. A simplified mathematical model was derived through system parameters. The controller parameters values (Kp, Ki and Kd) were obtained by using manual tuning method from practical model so as to perform best system response. From experimental results, it is found that the best controller parameters which gave the best response of the system are: Kp=4, Ki=1 and Kd=2. The accuracy of the system is tested by adjusting the position of the ball at three different points and it found that the accuracy doesn’t affected by changing the set point.

References

[1]   | E. P. Dadios, R. Baylon, R. D. Guzman, A. Florentino, R. M. Lee ve Z. Zulueta, Vision Guided Ball-Beam Balancing System Using Fuzzy Logic, 26th Annual Conference of the IEEE Industrial Electronics Society, Cilt 3, pp. 1973-1978, 2000.
[2]   | J. Whelan ve J. W. Ringwood, A Demonstration Rig for Control Systems Based on the Ball and Beam with Vision Feedback, Proc.3rd IFAC Symposium on Control Education, Tokyo, 1994.
[3]   | S. Sridharan ve G. Sridharan, Ball and Beam on Roller: A New Control Labrotary Device, Proceedings of the 2002 IEEE International Symposium on Industrial Electronics, Cilt 4, pp. 1318-1321, 2002.
[4]   | Sıtkı KOCAOĞLU, Hilmi KUŞÇU: Design and Control of PID-Controlled Ball and Beam System. Unitech. Int. Science Conference, p. 41-46., Gabrovo, 2013,
[5]   | Robert C. Rice, PID Tuning Guide A Best-Practices Approach, NovaTech. PP 20-26.