Ball Balancing on a Beam

Similar documents
DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL

Position Control of DC Motor by Compensating Strategies

Penn State Erie, The Behrend College School of Engineering

MEM01: DC-Motor Servomechanism

DC MOTOR SPEED CONTROL USING PID CONTROLLER. Fatiha Loucif

Figure 1: Unity Feedback System. The transfer function of the PID controller looks like the following:

PID, I-PD and PD-PI Controller Design for the Ball and Beam System: A Comparative Study

Mathematical Modeling, Simulation and Control of Ball and Beam System

SRV02-Series Rotary Experiment # 3. Ball & Beam. Student Handout

Comparative Study of PID and Fuzzy Controllers for Speed Control of DC Motor

Optimal Control System Design

Control Design for Servomechanisms July 2005, Glasgow Detailed Training Course Agenda

DC SERVO MOTOR CONTROL SYSTEM

Robot Joint Angle Control Based on Self Resonance Cancellation Using Double Encoders

Position Control of AC Servomotor Using Internal Model Control Strategy

of harmonic cancellation algorithms The internal model principle enable precision motion control Dynamic control

Design of a Simulink-Based Control Workstation for Mobile Wheeled Vehicles with Variable-Velocity Differential Motor Drives

Lab 2: Quanser Hardware and Proportional Control

Fundamentals of Servo Motion Control

Cantonment, Dhaka-1216, BANGLADESH

Implementation of Proportional and Derivative Controller in a Ball and Beam System

GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control

Automatic Control Systems 2017 Spring Semester

Advanced Servo Tuning

Phys Lecture 5. Motors

MAGNETIC LEVITATION SUSPENSION CONTROL SYSTEM FOR REACTION WHEEL

Motor Modeling and Position Control Lab 3 MAE 334

Motomatic Servo Control

FUZZY LOGIC CONTROL FOR NON-LINEAR MODEL OF THE BALL AND BEAM SYSTEM

Digital Control of MS-150 Modular Position Servo System

EE 560 Electric Machines and Drives. Autumn 2014 Final Project. Contents

Rotary Motion Servo Plant: SRV02. Rotary Experiment #03: Speed Control. SRV02 Speed Control using QuaRC. Student Manual

ACTIVE VIBRATION CONTROL OF HARD-DISK DRIVES USING PZT ACTUATED SUSPENSION SYSTEMS. Meng-Shiun Tsai, Wei-Hsiung Yuan and Jia-Ming Chang

Readings: FC: p : lead compensation. 9/9/2011 Classical Control 1

Andrea Zanchettin Automatic Control 1 AUTOMATIC CONTROL. Andrea M. Zanchettin, PhD Winter Semester, Linear control systems design Part 1

Servo Tuning. Dr. Rohan Munasinghe Department. of Electronic and Telecommunication Engineering University of Moratuwa. Thanks to Dr.

Rotary Motion Servo Plant: SRV02. Rotary Experiment #02: Position Control. SRV02 Position Control using QuaRC. Student Manual

Comparative Analysis of PID, SMC, SMC with PID Controller for Speed Control of DC Motor

Tuning of Controller for Electro-Hydraulic System Using Particle Swarm Optimization (PSO)

Laboratory Assignment 5 Digital Velocity and Position control of a D.C. motor

D102. Damped Mechanical Oscillator

Embedded Robust Control of Self-balancing Two-wheeled Robot

International Journal of Innovations in Engineering and Science

Lecture 5 Introduction to control

Actuators. EECS461, Lecture 5, updated September 16,

Analysis and Design of Conventional Controller for Speed Control of DC Motor -A MATLAB Approach

Comparisons of Different Controller for Position Tracking of DC Servo Motor

MEM380 Applied Autonomous Robots I Winter Feedback Control USARSim

MTE 360 Automatic Control Systems University of Waterloo, Department of Mechanical & Mechatronics Engineering

Upgrading from Stepper to Servo

REDUCING THE VIBRATIONS OF AN UNBALANCED ROTARY ENGINE BY ACTIVE FORCE CONTROL. M. Mohebbi 1*, M. Hashemi 1

Lab 11. Speed Control of a D.C. motor. Motor Characterization

EE443L Lab 8: Ball & Beam Control Experiment

BSNL TTA Question Paper Control Systems Specialization 2007

Brushed DC Motor PWM Speed Control with the NI myrio, Optical Encoder, and H-Bridge

Modelling and Control of Hybrid Stepper Motor

Tracking Position Control of AC Servo Motor Using Enhanced Iterative Learning Control Strategy

CHAPTER 2 PID CONTROLLER BASED CLOSED LOOP CONTROL OF DC DRIVE

Teaching Mechanical Students to Build and Analyze Motor Controllers

Sloshing Damping Control in a Cylindrical Container on a Wheeled Mobile Robot Using Dual-Swing Active-Vibration Reduction

A Searching Analyses for Best PID Tuning Method for CNC Servo Drive

Design Of PID Controller In Automatic Voltage Regulator (AVR) System Using PSO Technique

Magnetic Levitation System

GE 320: Introduction to Control Systems

CONTROLLING THE OSCILLATIONS OF A SWINGING BELL BY USING THE DRIVING INDUCTION MOTOR AS A SENSOR

Intelligent Learning Control Strategies for Position Tracking of AC Servomotor

EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall Lab Information

Embedded Control Project -Iterative learning control for

Design and Implementation of the Control System for a 2 khz Rotary Fast Tool Servo

OPTIMAL AND PID CONTROLLER FOR CONTROLLING CAMERA S POSITION IN UNMANNED AERIAL VEHICLES

Published in A R DIGITECH

Implementation of Conventional and Neural Controllers Using Position and Velocity Feedback

Optimizing Performance Using Slotless Motors. Mark Holcomb, Celera Motion

Electrical Drives I. Week 4-5-6: Solid state dc drives- closed loop control of phase controlled DC drives

An Introduction to Proportional- Integral-Derivative (PID) Controllers

CHAPTER-III MODELING AND IMPLEMENTATION OF PMBLDC MOTOR DRIVE

EE 461 Experiment #1 Digital Control of DC Servomotor

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

Laboratory Investigation of Variable Speed Control of Synchronous Generator With a Boost Converter for Wind Turbine Applications

POSITION TRACKING PERFORMANCE OF AC SERVOMOTOR BASED ON NEW MODIFIED REPETITIVE CONTROL STRATEGY

Sensors and Sensing Motors, Encoders and Motor Control

Robust Control Design for Rotary Inverted Pendulum Balance

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW

TRACK-FOLLOWING CONTROLLER FOR HARD DISK DRIVE ACTUATOR USING QUANTITATIVE FEEDBACK THEORY

Speed control of a DC motor using Controllers

Improved NCTF Control Method for a Two-Mass Rotary Positioning Systems

Elements of Haptic Interfaces

Where: (J LM ) is the load inertia referred to the motor shaft. 8.0 CONSIDERATIONS FOR THE CONTROL OF DC MICROMOTORS. 8.

Structure Specified Robust H Loop Shaping Control of a MIMO Electro-hydraulic Servo System using Particle Swarm Optimization

CDS 101/110a: Lecture 8-1 Frequency Domain Design

The Air Bearing Throughput Edge By Kevin McCarthy, Chief Technology Officer

Modeling Position Tracking System with Stepper Motor

CHASSIS DYNAMOMETER TORQUE CONTROL SYSTEM DESIGN BY DIRECT INVERSE COMPENSATION. C.Matthews, P.Dickinson, A.T.Shenton

Brushed DC Motor System

CHAPTER 3 WAVELET TRANSFORM BASED CONTROLLER FOR INDUCTION MOTOR DRIVES

EE 3TP4: Signals and Systems Lab 5: Control of a Servomechanism

Ball and Beam. Workbook BB01. Student Version

Vibratory Feeder Bowl Analysis

Automatic Control Motion control Advanced control techniques

Transcription:

1 Ball Balancing on a Beam Muhammad Hasan Jafry, Haseeb Tariq, Abubakr Muhammad Department of Electrical Engineering, LUMS School of Science and Engineering, Pakistan Email: {14100105,14100040}@lums.edu.pk, abubakr@lums.edu.pk Abstract In this paper, the problem of balancing ball on a beam at reference locations has been analyzed in detail. The dynamics of the system are taken into account by starting from the vary fundamentals of mechanics and electro magnetics. The design and construction of ball-on-a-beam balancing apparatus has also been discussed, along with the sensor and control design needed to balance a ball on a tilting beam. First, the motor and beam must be controlled in an inner loop to a crossover frequency much higher than expected for the ball. Then, the outer loop is designed to compensate for the dynamics of the ball. Essentially, the controller must deal with two double integrators, the inertias of the ball and beam, and that of the ball. I. INTRODUCTION Balancing is essential in carrying out robotic tasks such as transporting dynamic system. [1] There are a lot of very similar applications and Ball balancing on a tilting beam has remained a favorite for Control enthusiasts to study and test their experiments. It is inherently a nonlinear dynamic system which is quite difficult to control as it has a lot of issues, for example it involves delayed feedback associated with control actions; and the jumping ball phenomenon bringing sensor uncertainty. However, it is considered to be a classic control problem; the researchers benchmark it to test other control algorithms. Numerous control techniques have already been developed that are currently available in the literature. [2]. A. Background The objective of ball balancing on a beam is to use an actuator to command a tilt angle on the beam and balance the ball, which rolls in one dimension along the beam, at different reference locations, as prescribed the user. The ball position is unstable in open loop, and so a feedback loop is usually employed with some suitable controller to control the ball position, and minimize the error. II. THEORETICAL MODEL OF PLANT The objective of ball balancing on a beam is to use an actuator to command a tilt angle on the beam and balance the ball, which rolls in one dimension along the beam, at different reference locations, as prescribed the user. The ball position is unstable in open loop, and so a feedback loop is usually employed with some suitable controller to control the ball position, and minimize the error. 1 Submitted to the Department of Electrical Engineering on Dec 6, 2013 as course project for Digital Control Systems A. Modeling of Ball and Beam System The dc motor causes the beam to turn by an angle θ, which causes the ball to roll along the beam. The practical setup is the same as used by Amjad et al [3] and the system is shown in figure 2. By applying Newtonian mechanics, the forces and torques acting on the system can be shown and the dynamics understood. There are three main components that have moments and forces acting on them: the motor, the beam, and the ball. To simplify the derivation, the motor shaft and beam are considered to be a rigid body (i.e. the stiffness across the transmission is infinite), and centripetal acceleration is ignored. The pivot of the beam is also assumed to be near the plane of ball contact, and there is no skidding. Fig. 1: Free Body Diagram of Ball-on-Beam System The Lagrangian equation of motion for the ball is then given by the following: ( ) J 0 = R 2 + m r + mg sin θ mr θ 2 Linearization of this equation about the beam angle, θ = 0, gives us the following linear approximation of the system: ( ) J R 2 + m r = mgθ Taking the Laplace transform of the equation above, the following equation is found: ( ) J R 2 + m R(s)s 2 = mgθ(s) Rearranging we find the transfer function from the motor shaft angle (θ(s)) to the ball position (R(s)). P (s) = R(s) Θ(s) = mg ( J R + m ) 1 s 2 [ m rad ] 2 The constants for our system were: Mass of the ball = m = 0.121 kg

2 Fig. 2: Free Body Diagram of DC Motor Radius of the ball = R = 0.0111 meter Gravitational acceleration = 9.8 m s 2 Ball s moment of inertia = J = (2/5)M(R 2 ) = 5.9634 10 6 Kgm 2 Our final transfer function for the ball and beam plant becomes, P (s) = R(s) Θ(s) = 1.1858 1 0.1694 s 2 B. Modeling of DC Motor [ m rad ] 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. In most conventional laboratory ball on beam setups a servo motor is employed to provide the angle control of the ball and beam plant. This paper considers the additional complexity that is introduced into the model by disregarding the servo assumption and considers the case when a simple DC motor is used to control the angle of the beam. Essentially the DC motor has to be controlled in a feedback loop to mimic a servo motor and provide a responsive and accurate angle control of its shaft. A simplified model of the DC motor [4] is given as: K s(τs + 1) Where K and τ are the DC-gain and the mechanical time constant of the motor respectively. However this model does not accurately represent the dynamics of an actual motor as it is an over damped system and shows none of the overshoots and transients typically in the closed loop response of a real DC Motor. Though these transients have no bearing in most applications where torque requirements are the real constraint but in this case where the plant is sensitive to the slightest of overshoots in the input angle, the need for a more accurate representation of the DC motor arises. 1) Improved Model of DC Motor: To incorporate the appearance of the transients in the motors position we build our model from the very basics of a DC motors electrical and mechanical characteristics. The electric circuit of the armature and the free-body diagram of the rotor are shown in fig. 2: The input to the system is the voltage applied to the motor s armature (V ), while the output is the angular position of the shaft (θ). The relevant physical parameters that define the dynamics of our motor are: Fig. 3: Motor Specifications of DME37SB (J) Moment of inertia of the rotor (b) Motor viscous friction constant (K e ) Electromotive force constant (K t ) Motor torque constant (R) Electric resistance (L) Electric inductance These constants are derived from a set of empirical specifications of a DC motor most of which are commonly found on the datasheet of the motor. The motor in this model was the DME37SB whose specifications are as shown in fig. 3 The parameters of interest are the rated voltage V r, rated torque T r, rated current I r, stall torque T s, no load current I n and rated speed ω r all of which can be read off the datasheet. The stall current Is though not specified is easily measured experimentally. Our motor constants are then calculated as shown: R = V r I s T s K t = (I s I n b = (K t I r ) T r ω r K e = V r (I r R) ω r Once the motor constants are specified Newton s and Kirchoff s laws can be applied to the motor system to generate the following equations. [5] J d2 θ dt 2 = T bdθ dt = d2 θ dt 2 = 1 J (K ti b dθ dt ) L di di = Ri + V e = dt dt = 1 L ( Ri + V K dθ b dt ) These equations can be modeled as a block diagram in Simulink Matlab by using integrators, summers and gain blocks. The complete DC motor model in Simulink is shown in fig. 4:

3 and robust so as to not be easily excited into instability, and must also have good disturbance rejection. The disturbance rejection should compensate for the torque that the ball mass applies as it moves away from the center. To begin, a block diagram for the closed loop system was constructed as shown in fig. 6. In this system there are only two sensors available: the motor angle sensor and the ball position sensor. Therefore, there should be two closed loops, an inner motor loop and an outer ball position loop. Another intermediary loop sensing the beam angle would be beneficial in making the control and tuning of the system easier, but this loop is unnecessary and was not implemented in this project. Fig. 4: Simulink Model of DC Motor This gives us our complete model for the motors position control. 2) Alternative Models: The Simulink model can then be discretized by performing an input output linearization of the DC motor system. This operation is handled through the Matlab Linear Analysis Tool which gives us a linearized discrete transfer function representation of the DC motor which comes out to be: θ(s) V (s) = (3.746 10( 4))(z + 0.99)(z + 5.84 10 ( 8)) z(z 1)(z 0.968) The differential equations can also be expressed in statespace form by choosing the motor position, motor speed and armature current as the state variables. Again the armature voltage is treated as the input and the rotational position is chosen as the output. θ 0 1 0 θ 0 d dt θ = 0 b K J J θ + 0 V i 0 K L R 1 L i L θ y = [ 1 0 0 ] θ i The open loop frequency response of the DC motor position model is also shown in fig. 5 which shows the gain margin, phase margin and crossover frequency. The crossover frequency which indicates the speed of the dynamics the plant is of particular interest because a crossover frequency at 3Hz indicates that a sampling frequency of 1000Hz is more than enough to accurately sample the DC motors response. Fig. 6: Block Diagram of Closed Loop Ball-on-Beam System. An inner loop controls the position of the motor, while the outer loop controls the position of the ball along the beam A. Controller for DC Motor The design parameters of the controller adhere to the realistic performance expectations of the system. For this application, a series of lead compensators were chosen to counteract the abundance of open loop poles and improve transient response. An integrator with a 0.5s time constant was included in the motor loop to diminish the off-horizontal error of the beam and increase disturbance rejection. The integrator transfer function is, G mi (s) = 0.5s + 1 0.5s This transfer function in z-domain becomes, G mi (z) = 1.001z 0.999 z 1 III. CONTROL DESIGN To have the ball properly track a position command, a controller must be designed. The controller must be reliable Fig. 5: Open Loop frequency Response of model of DC Motor

4 Fig. 7: Closed Loop Simulink Model of DC Motor. An inner loop controls the position of the motor along with the controller and the delays incorporated To make the motor loop effective to control the ball loop, the motor loop also had to have a considerably higher bandwidth than the ball position loop. Therefore, the realistic crossover frequency of the motor loop, ω m, was arbitrarily chosen at about 25 Hz (158 rad s ). The lead compensator, G ml for the motor was thus designated as: G ml (z) = 19.98z 18.98 z 0.9 The integrator transfer function combined with the motor lead compensator became the motor controller, Fig. 8: Overall Closed Loop Response of DC Motor with compensator B. Controller for Ball and Beam System After modeling the ball and beam system and the dc motor, and designing controller for the DC motor, the entire system was put together as shown in fig. The simulink model (as shown in fig. 9) of the system also incorporated the delay due to the second sensor i.e. the sharp sensor. This was modeled using a zero order hold of 0.001 second. G mc (z) = 20(z 0.9501) z 0.9 The final transfer function of controller was included in the feedback loop of DC motor. Delays due to zero-order hold while providing input to the real-world system were incorporated, as well as the delays due to the delay in the sensor output of potentiometer. Dead zone was also given its weight-age by employing it at the output of the controller. A limiter was also put on the input of the plant, so that only realizable voltage levels (max 24 Volts, min -24 Volts) are sent as input to the plant. The final simulink model looked as shown in fig 7. The design constraints that were kept in mind while designing controller were as follows: Rise time: 0.05 sec Settling time: 0.25 sec Overshoot: 5 percent No steady state Error Bandwidth must be significantly larger than overall ball and beam system. The output of the closed loop system for DC Motor as shown in fig 8 met the requirements that were set for it quite easily. Fig. 9: Overall closed loop model in Simulink of Ball and Beam Experiment The controller designed for the entire ball and beam system was meant to achieve the desired ball and beam position system as soon as possible, keeping in mind the system could not get more fast than the inner loop of DC motor, as that would create instability. However, the controller needed to be robust against disturbance, and allow the system to achieve all possible ball locations on the beam. After a lot of consideration, and hit-and-trial method, the following controller was chosen: P (z) = 725z 722.5 z 0.9 The response of the system in closed loop after incorporating this controller met the required conditions, as shown in fig. 10. The rise time was 0.6613 sec, settling time was 9 sec (a little slow), and overshoot was just 5 percent.

5 Fig. 10: Overall response of closed loop model of Ball and Beam Experiment meeting the required conditions IV. SENSOR ISSUES The biggest difficulties encountered in this project were introduced by the unreliability of the ball position sensor. Because this sensor measured the system output, it was the most critical component of the apparatus. If the position of the ball was not exactly known, the position could not be precisely commanded. [6] Noise that was introduced through this sensor severely paralyzed the performance of the overall system. Signal dropout occurred intermittently as the ball rolled along the beam. Without a proper position measurement, control was impossible. A significant amount of time was spent testing various sharp sensors available and debugging them. A. Tested Ball Position Sensors The values of sharp sensor output were plotted against the distance, and after curve fitting on Matlab, the following expression was obtained. V d = 1.226 10 4 d 3 4 10 3 d 2 9.19 10 3 d + 2.86 where, d is the distance from the sharp sensor to the ball along the length of the beam, and V d is the output voltage provided by the sharp sensor at that specific distance d. Fig. 12: Output of Potentiometer with change of angle of beam B. Tested Potentiometer Similarly, the values of potentiometer output were plotted against the angle, and after curve fitting on Matlab, the following expression was obtained. V θ = 4.386 10 ( 7) θ 3 3.84 10 ( 7) θ 2 9.92 10 ( 3) θ+2.2135 where, θ is the angle covered by the team, taking horizontal line as θ = 0, and V θ is the output voltage provided by the potentiometer at that specific distance θ. V. FUTURE WORK Besides researching different sensors and determining which technique is most advantageous for this application, there are other possible areas of improvement. The mechanical design of the apparatus is an area that affects the performance of the system, but it should be noted that a relocation of the center of gravity and a decrease of overall dimensions could reduce material and cost. Two other main areas that could be redesigned are the controller and the transmission mechanism. The controller can be fine-tuned and even converted to analog control and the transmission mechanism can become more rigid or be eliminated. REFERENCES Fig. 11: Output of Sharp Sensor plotted against the length of the beam [1] J. Hauser, S. Sastry, and P. Kokotovic, Nonlinear control via approximate input-output linearization: The ball and beam example, Automatic Control, IEEE Transactions on, vol. 37, no. 3, pp. 392 398, 1992. [2] E. A. Rosales, A ball-on-beam project kit. PhD thesis, Massachusetts Institute of Technology, 2004. [3] M. A. Rana, Z. Usman, and Z. Shareef, Automatic control of ball and beam system using particle swarm optimization, in Computational Intelligence and Informatics (CINTI), 2011 IEEE 12th International Symposium on, pp. 529 534, IEEE, 2011. [4] P. H. Eaton, D. V. Prokhorov, D. C. Wunsch, et al., Neurocontroller alternatives for?fuzzy? ball-and-beam systems with nonuniform nonlinear friction, Neural Networks, IEEE Transactions on, vol. 11, no. 2, pp. 423 435, 2000.

[5] L.-X. Wang and J. M. Mendel, Fuzzy basis functions, universal approximation, and orthogonal least-squares learning, Neural Networks, IEEE Transactions on, vol. 3, no. 5, pp. 807 814, 1992. [6] S. Sastry, Nonlinear systems: analysis, stability, and control, vol. 10. Springer New York, 1999. 6