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

Similar documents
Linear Motion Servo Plants: IP01 or IP02. Linear Experiment #0: Integration with WinCon. IP01 and IP02. Student Handout

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

Penn State Erie, The Behrend College School of Engineering

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

Lab 2: Introduction to Real Time Workshop

SRV02-Series. Rotary Servo Plant. User Manual

EE 461 Experiment #1 Digital Control of DC Servomotor

Lab 2: Quanser Hardware and Proportional Control

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

Ball and Beam. Workbook BB01. Student Version

Sfwr Eng/TRON 3DX4, Lab 4 Introduction to Computer Based Control

Rotary Motion Servo Plant: SRV02. Rotary Experiment #17: 2D Ball Balancer. 2D Ball Balancer Control using QUARC. Instructor Manual

Mathematical Modeling, Simulation and Control of Ball and Beam System

MCE441/541 Midterm Project Position Control of Rotary Servomechanism

Ver. 4/5/2002, 1:11 PM 1

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

Lab 1: Steady State Error and Step Response MAE 433, Spring 2012

GE 320: Introduction to Control Systems

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

Interfacing dspace to the Quanser Rotary Series of Experiments (SRV02ET)

7 Lab: Motor control for orientation and angular speed

PID Control with Derivative Filtering and Integral Anti-Windup for a DC Servo

Automatic Control Systems 2017 Spring Semester

Teaching Mechanical Students to Build and Analyze Motor Controllers

Exp e riment 1a: Intro duction to PC-Base d Data Acquisition and Real-Time Control

Root Locus Design. by Martin Hagan revised by Trevor Eckert 1 OBJECTIVE

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

Observer-based Engine Cooling Control System (OBCOOL) Project Proposal. Students: Andrew Fouts & Kurtis Liggett. Advisor: Dr.

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

MEM01: DC-Motor Servomechanism

Fundamentals of Servo Motion Control

Robust Control Design for Rotary Inverted Pendulum Balance

MAE106 Laboratory Exercises Lab # 5 - PD Control of DC motor position

DC SERVO MOTOR CONTROL SYSTEM

5 Lab 5: Position Control Systems - Week 2

EE 482 : CONTROL SYSTEMS Lab Manual

Sensors and Sensing Motors, Encoders and Motor Control

2. Experiment s Title: The Linear and Rotary Potentiometer - AMEM 211

DC motor control using arduino

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

UNIVERSITY OF JORDAN Mechatronics Engineering Department Measurements & Control Lab Experiment no.1 DC Servo Motor

Lab 1: Simulating Control Systems with Simulink and MATLAB

Laboratory Project 1: Design of a Myogram Circuit

Motomatic Servo Control

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

Optimal Control System Design

Laboratory Tutorial#1

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

Ball Balancing on a Beam

ELECTRICAL ENGINEERING TECHNOLOGY PROGRAM EET 433 CONTROL SYSTEMS ANALYSIS AND DESIGN LABORATORY EXPERIENCES

Application of H-infinity Robust Controller on PAC

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

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

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

3D HELICOPTER SYSTEM (WITH ACTIVE DISTURBANCE)

SKEE 3732 BASIC CONTROL LABORATORY (Experiment 1) ANGULAR SPEED CONTROL

UNIT 2: DC MOTOR POSITION CONTROL

Advanced Servo Tuning

Active Vibration Isolation of an Unbalanced Machine Tool Spindle

A Do-and-See Approach for Learning Mechatronics Concepts

The MFT B-Series Flow Controller.

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

EE443L Lab 8: Ball & Beam Control Experiment

ECE 5670/6670 Project. Brushless DC Motor Control with 6-Step Commutation. Objectives

Magnetic Levitation System

Introduction to MS150

SKEE 3732 BASIC CONTROL LABORATORY (Experiment 1) ANGULAR SPEED CONTROL

AE2610 Introduction to Experimental Methods in Aerospace

USER MANUAL. SRV02 Rotary Servo Base Unit. Set Up and Configuration

Experiment 9. PID Controller

Experiment A2 Galileo s Inclined Plane Procedure

Implementation of Conventional and Neural Controllers Using Position and Velocity Feedback

2.737 Mechatronics Laboratory Assignment 1: Servomotor Control

Lab 3 Swinging pendulum experiment

Brett Browning and. Spring 2011

The Discussion of this exercise covers the following points: Angular position control block diagram and fundamentals. Power amplifier 0.

MEM 01 DC MOTOR-BASED SERVOMECHANISM WITH TACHOMETER FEEDBACK

Experiment A2 Galileo s Inclined Plane Procedure

Modelling and Simulation of a DC Motor Drive

Sensor Calibration Lab

Modeling and System Identification for a DC Servo

Rectilinear System. Introduction. Hardware

Lab Exercise 9: Stepper and Servo Motors

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

Massachusetts Institute of Technology. Lab 2: Characterization of Lab System Components

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Experiment 3 Topic: Dynamic System Response Week A Procedure

Vibratory Feeder Bowl Analysis

CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System

Elements of Haptic Interfaces

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

ECE411 - Laboratory Exercise #1

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

Tech Note #3: Setting up a Servo Axis For Closed Loop Position Control Application note by Tim McIntosh September 10, 2001

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

Design and Development of Novel Two Axis Servo Control Mechanism

Motor Modeling and Position Control Lab 3 MAE 334

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

Actuators. EECS461, Lecture 5, updated September 16,

EE283 Laboratory Exercise 1-Page 1

Transcription:

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

SRV02-Series Rotary Experiment # 3 Ball & Beam Student Handout 1. Objectives The objective in this experiment is to design a controller for the ball and beam module such that the position of the ball accurately tracks a defined path. Upon completion of the exercise, you should have have experience in the following: How to mathematically model the Ball & Beam system. To linearize the model about an operating point. To control the position of the ball on the track by manipulating the servo angle. To design and simulate a WinCon controller for the system. 2. System Requirements To complete this Lab, the following hardware is required: [1] Quanser UPM 2405/1503 Power Module or equivalent. [1] Quanser MultiQ PCI / MQ3 or equivalent. [1] Quanser SRV02-E(T) servo plant. [1] Quanser BB01 Ball & Beam Module. [1] Quanser SS01 Remote Sensor (Optional). [1] PC equipped with the required software as stated in the WinCon user manual. The required configuration of this experiment is the SRV02-E(T) in the High-Gear configuration with a UPM 2405/1503 power module and a suggested gain cable of 1. It is assumed that the student has successfully completed Experiment #0 of the SRV02 and is familiar in using WinCon to control the plant through Simulink. It is also assumed that all the sensors and actuators are connected as per dictated in the Experiment #0 as well as the SRV02 User Manual and the Ball & Beam User Manual. Page # 2 Revision: 01

3. Mathematical Model Figure 1 below depicts the Ball and Beam module coupled to the SRV02 plant in the correct configuration. The beam consists of a steel rod in parallel with a nickel-chromium wire-wound resistor forming the track on which the metal ball is free to roll. The position of the ball is obtained by measuring the voltage at the steel rod. When the ball rolls along the track, it acts as a wiper similar to a potentiometer resulting in the position of the ball. Figure 1 - Ball & Beam Module The following table is a list of the nomenclature used is the following illustration and derivations. Symbol Description Symbol Description L Beam Length (L = 16.75 in) r Lever arm offset (r = 1 in) x Ball Position m Mass of the ball α Beam pitch (radians) R Radius of the ball θ Servo load gear angle (radians) J Ball's moment of inertia F tx Translational force on the Ball F rx Rotational force on the ball g Earth's gravitational constant Page # 3 Revision: 01

Figure 2 - Ball & Beam Mathematical Illustration Let us begin by examining the forces acting on the ball. We have the translational force due to gravity, and we have a rotational force due to the torque produced by the rotational acceleration of the ball. The 2 forces are: Gravitational force in the x-direction: F tx =mgsin [3.1] The torque produced by the ball's rotational motion is equal to the radius of the ball multiplied by the rotational force (opposing the direction of travel). Using Newton's 2 nd equation of motion, we also know that the torque is equal to the ball's moment of inertia multiplied by its angular acceleration, which then can be written as its moment of inertia multiplied by the double-derivative of its translational motion (x) divided by its radius yielding the following expression: T r =F rx R=J a=j ẍ R [3.2] We now take the ball's moment of inertia J= 2 5 mr2 and re-arrange equation [3.2] to solve for the rotational force: F rx = 2 5 m ẍ [3.3] Page # 4 Revision: 01

Given all the forces acting on the rolling ball, we can again apply Newton's 2 nd law of motion and equate the ball's mass multiplied by its acceleration to the sum of forces acting on the ball: m ẍ= F =F tx F rx =mgsin 2 5 m ẍ [3.4] Finally, we will rearrange equation [3.4] yielding: ẍ= 5 7 gsin [3.5] To linearize the above equation, note that sinα = α for small α (in radians). Since the pitch of the beam will always remain relatively small, this estimation will hold true for this particular experiment yielding a final, linearized transfer function of: X s s = 5 g 7 s 2 [3.6] Referring back to the illustration of Figure 2, let us refer to the arc length traveled by the lever arm as Arc. If we measure both angles in radians, we get the following expression: r= Arc= L = L r [3.7] To complete the system derivations, we need to know the transfer function from Motor Voltage V m to output angle θ l : L s V m s = g m K t K g J eq R m s 2 B eq R m g m K m K t K 2 g s [3.8] Since there is only 1 configuration (High-Gear) of the SRV02 for the Ball & Beam module, we can rewrite the transfer function with all the model parameters entered: L s V m s = 61.54 s 2 35.1 s [3.9] *Note: The above transfer function was obtained from the derivations of Experiment #1 of the SRV02 Position Control. The model parameters used can be found in the SRV02_Exp1_Position Control Lab Handout or the SRV02 User Manual. Page # 5 Revision: 01

3.1 Pre Lab Questions In the previous section, we have completely derived the mathematical model of the Ball and Beam experiment. Theoretically, we can design a state-feedback controller based on the open loop transfer function described as: X s V m s = s L V m s s L s X s s There are two flaws with this approach. Since the above model is of 4 th order, designing a controller to meet time specifications becomes increasingly complicated. The above model was obtained by linearizing the physical system. In the Ball and Beam experiment, the relationship between α and θ only holds true for approximately -90 θ 90. Outside of this 'linear' range, the relationship is reversed and α actually decreases as θ is increased. Considering the above limitations, the objective of this lab is to design a controller by implement two independent control loops: Inner Loop to control the position of the servo gear to a commanded angle. Outer Loop to control the position of the ball on the beam by manipulating the servo angle. The goal is to design the inner loop to be sufficiently faster than the outside loop to ensure that the servo plant dynamics do not interfere with the ball controller dynamics. The following table lists the recommended time specifications to be designed for each loop: Time to Peak ( T p ) Damping Ratio ( ζ ) Natural Frequency (ω n ) Inner Loop 0.200 s 0.707 22.2 rd/s 4.6% Outer Loop 1.5 s 0.707 2.96 rd/s 4.6% Table 1 Controller time specifications Percent Overshoot (%OS) 1) Given the above specifications and equation [3.9], calculate the gains required to achieve the inner-loop requirements for the servo motor. Use the state-feedback signal: V m = K p (θ d θ L ) K v s θ L *Hint: Fit your closed loop transfer function to the standard second order representation of: n 2 s 2 2 n s n 2 Page # 6 Revision: 01

Using the state feedback signal, your inner loop will be of the following form: Figure 3 Inner Loop Controller Schematic *Hint: You should notice that the inner loop controller is identical to the controller designed for SRV02_Exp1_Position Control. 2) Design the outer-loop gains with the requirements from Table 1 and the outer loop transfer function derived in equation [3.6]. Use the state-feedback signal: α = K p _bb (X d X) K v _bb s X You should notice that the design procedure is the same for the outer and inner loops. The outer-loop gains that were just calculated are in radians/meter. We would like to operate the Ball & Beam module in centimeters so at this point you should adjust your outer-loop gains from rd/m to rd/cm. (Divide your outer-loop gains by 100). You should now have all four controller gains calculated as described in the following table: Gain Description Units K p Inner-Loop Proportional Gain. V/rd K v Inner-Loop Velocity/Derivative Gain. V/rd/s K p _bb Outer-Loop Proportional Gain. rd/cm K v _bb Outer-Loop Velocity/Derivative Gain. rd/cm/s 3) The first task upon entering the laboratory session will be to construct a simulation of the plant and controllers from the provided Simulink blocks. It is suggested that you take some time before the lab and put together a signal flow diagram in order to quickly connect the blocks and simulate the controller once you enter the session. Page # 7 Revision: 01

4. In Lab Procedure The Ball & Beam module serves as a great example to illustrate the use of multiple control loops within one system. As described in the Pre-Lab, the purpose of this laboratory is to control a ball's position along a beam by manipulating the load angle of the servo motor. The controller to be designed has 2 separate PV (Proportional Velocity/Derivative) control loops. The Inner-Loop controls the servo angle to a desired setpoint angle, while the Outer-Loop controls the ball position by commanding a setpoint position. By design, the inner-loop is intended to respond respectively faster than the outer-loop to ensure the servomotor's dynamics do not interfere with the ball position dynamics. The following table details the time specifications best suited for this experiment. Time to Peak ( T p ) Damping Ratio ( ζ ) Natural Frequency (ω n ) Inner Loop 0.200 s 0.707 22.2 rd/s 4.6% Outer Loop 1.5 s 0.707 2.96 rd/s 4.6% Table 2 Controller Specifications Percent Overshoot (%OS) At this point, it is assumed that you have calculated the required controller gains needed to meet the specifications of Table 2. The first task upon entering the laboratory is to familiarize yourself with the experiment. The Ball & Beam module should be positioned in its calibrated base as it appears in Figure 1. The Ball & Beam module requires 3 connections: From... To... Cable Description 'To Load' on the UPM Encoder on the SRV02 Motor Power on the SRV02 Encoder #0 on the terminal board 6 pin DIN to 4 pin DIN 5 pin DIN to 5 pin DIN This is the Motor Power supplied from the UPM amplifier. This is the digital encoder data that measures the servo angle. Beam sensor SI on the UPM 6 pin 6 pin DIN Analog ball position measurement. Table 3 Ball & Beam Connections *Note: If you are unsure about the wiring and connections, ask a T.A. Assigned to the lab for help. The experiment should have already been pre-wired and might not need any connections made. After ensuring the experiment has been set-up and wired correctly, you are now ready to begin your session. Page # 8 Revision: 01

4.1 Simulation of the Plant On the PC connected to the experiment, launch a Matlab session. In the directory assigned to the lab, you should find a Matlab script file called Setup_SRV02_Exp3.m. By running this script, you initialize all the experimental variables to your workspace and set all parameters needed by Simulink. After execution of the script, you will be prompted to enter in your calculated controller gains from the pre-lab. Matlab is case-sensitive so the variable names should be as follows: Kp = (Calculated Value) Inner loop proportional gain. Kv = (Calculated Value) Inner loop velocity/derivative gain. Kp_bb = (Calculated Value) Outer loop proportional gain. Kv_bb = (Calculated Value) Outer loop velocity/derivative gain. After entering in your calculated gains, the first task of this lab is to Build a controller for this experiment. In the Simulink model called s_ball_beam.mdl, you will find all the required blocks that will make up your simulation. After successfully building your simulated control system, you can use the simulation to test the performance of the controller you have implemented. As mentioned in the pre-lab, you will have to connected all the building blocks provided in the Simulink model to make a complete feedback control system. The following table describes the blocks that have been provided to build the simulation. Block Name Description Command in Centimeters Outer Loop This is your outer loop proportional gain. Kp_bb. Kp Inner Loop Ball & Beam TF Outer Loop Kv Position in centimeters Table 4Model Block Descriptions This is the setpoint signal, you will notice that there is a signal generator producing a square wave connected to it. Use this block as your position setpoint. We have included the completed inner loop as a template of how the full system should be connected. You should look inside the inner loop to get an idea of how the controller functions. Also, you should note the limiter attached to the input of the inner loop as the alpha->theta linear relationship is only true in this region (- 50 θ 50 ). The limiter prevents the system from demanding an undesirable theta out of the linear region. This is the model of the Ball & Beam system, you can think of this as your Open- Loop transfer function from Alpha (radians) to X (meters). This is your outer loop velocity/derivative gain. Kv_bb. Notice that the derivative block attached has a filter with it. In practical application, a derivative block should never be unfiltered as high frequencies will damage any motor over time. Use this scope to monitor the position of the ball on the beam. Page # 9 Revision: 01

The rest of the blocks are straight-forward and should be self-explanatory. Every block in this diagram should be used in your simulation. The blocks that are wired together should be kept together. *Hint: If you look at the units of the calculated gains, it will assist you in determining the required connections. You should also make note that a desired alpha is reached by commanding a theta first, so you should make use of the conversion blocks (alpha- >theta, theta->alpha) wisely. Once you are confident that you have built the equivalent ball & beam model and you have implemented the controller correctly, you can proceed and simulate the experiment. Choose Simulation->Start to begin the simulation of your system. Double-Click on the Position in Centimeters scope to monitor the response of your system. Using the suggested time requirements in your calculations and building your Simulink model correctly, you should have a measurement similar to Figure 4 below. Figure 4 Simulated Position of Ball If your scope looks similar to Figure 4, you have connected the simulation blocks properly and your gains were calculated correctly. If your plot does not match that of Figure 4, then: You may not have connected the simulation blocks correctly, check with a T.A. assigned to the lab to see if your simulation of the experiment is connected correctly. Your controller gains were not calculated correctly. At this point you should re-iterate the calculation of the controller gains. Make sure your outer loop gains have been adjusted to accept centimeters instead of meters. Page # 10 Revision: 01

4.2 Implementing the Controller After verifying the calculated controller gains, it is time to implement the controllers on the actual system. In the same working directory, open a Simulink model called q_ball_beam.m. This model has the I/O connection blocks linking to the physical plant as well as a simulated block to compare real and simulated results. Figure 5 Ball & Beam Controller Figure 5 Above depicts the Ball & Beam controller we have developed for this experiment. Take note of the two limiter blocks, one to limit theta to the linear region as mentioned above, and one to ensure the commanded ball position falls withing the physical beam limits. An important block in this controller is the 56 offset added to Theta_D. This is needed to initialize the controller from the starting position to the zero position as depicted in the two figures below. Figure 6 Starting Position Figure 7 Zero Position Page # 11 Revision: 01

Due to this configuration, the controller will only operate correctly if the Ball & Beam system is always started in the starting position seen in Figure 6. Due to the weight of the system, it should in most cases rest in the starting position, but it is always a good idea to double-check before running the controller. Your calculated controller gains should still be in the workspace and will get passed to this model. From the menu bar select WinCon->Build. Once the code has compiled, you may run your controller through the WinCon server. *WARNING: If at any point the system is not behaving as expected, make sure to immediately press STOP on the WinCon server. The ball and beam module should now be running and the ball should be tracking a square wave from 5 cm to -5 cm on the beam. Through the Simulink diagram you may adjust the commanded position of the ball. Through the WinCon server, you should now plot the Ball Position in cm, Simulated Ball Position as well as Command in cm. Your plot should look similar to figure 8 below. Figure 8 Step Response of the Plant As you can clearly see, the response of the system does not follow the simulated response. On the other hand, the physical response does meet our required time specifications and the system is stable. Page # 12 Revision: 01

5. Post Lab Question and Report Upon completion of the lab, you should begin by documenting your work into a lab report. Included in this report should be the following: i. The calculations made for question 1 of the pre-lab. Include your calculated gains as well as your design procedure. ii. iii. iv. The solution for question 2 of the pre-lab, include your complete design steps and all calculations. In question 3 of the pre-lab, you were required to design a signal flow diagram of the controller being designed. Include the signal flow diagram with comments on the different signals and states of the system. Your first task of the lab was to build a simulation of the plant and controller. Include your finished model (print the model after you have successfully connected and simulated) with all the provided blocks connected. v. After simulating the system with the model, comment on the performance of your controller (calculated gains). Include your scope output similar to Figure 4. vi. vii. In section 4.2, you implemented your controller on the physical plant. Provide the response of the system as well as the simulated result. This graph should look similar to Figure 8. Comment on the performance of your controller on the actual system as opposed to the simulated model. Make sure to include your final controller gains and any re-iterative calculations made if any. 5.1 Post Lab Questions 1) After implementing your controller on the actual plant, you should have noticed the obvious discrepancies between actual and simulated results. What reasons would you believe would lead to these large discrepancies? 2) In this lab, the ball's position on the beam was controller using two control loops. After completing this laboratory, what other types of controllers would you suggest as an alternative to this method? What would be the limitations of such an approach? 3) It should be evident after implementing the controller on the actual plant, that the step response will have a steady-state error. What method would you propose to remove this error? Explain. Page # 13 Revision: 01