Home

controller for the ball and beam

image

Contents

1. 922 ABB Bes 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 Signal Generator Physical Limitation of Beam Command in centimeters Aplhato Theta Opertate in Linear Derivative ww filter Outer Loop Kd Convert to Rads Theta D Offset in Degrees Quanser Consulting MultiQ PCI ADC Ball Position Calibrate Postion in centimeters to read in centimeters 20 to 20 Analog Input Figure 5 Ball amp Beam Controller Figure 5 Above depicts the
2. the model comment on the performance of your controller calculated gains Include your scope output similar to Figure 4 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 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
3. 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 Damping Ratio Natural Percent Tp g Frequency wn Overshoot OS Inner Loop 0 200 s 0 707 22 2 rd s 4 6 Outer Loop 1 55s 0 707 2 96 rd s 4 6 Table 2 Controller Specifications 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 amp Beam module should be positioned in its calibrated base as it appears in Figure 1 The Ball amp Beam module requires 3 connections From To Cable Description To Load on the Motor Power on 6 pin DIN to 4 pin This is the Motor Power supplied UPM the SRV02 DIN from the UPM amplifier Encoder
4. Ball amp 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 amp 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 gt 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 P
5. Outer Loop This is your outer loop velocity derivative gain Kv_bb Notice that the derivative Kv 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 Position in Use this scope to monitor the position of the ball on the beam centimeters Table 4Model Block Descriptions 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 gt theta theta gt alpha wisely Once you are confident that you have built the equivalent ball amp beam model and you have implemented the controller correctly you can proceed and simulate the experiment Choose Simulation gt 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 lt Position in centimeters g SS ES BEE 8
6. Q SRV02 Series Rotary Experiment 3 oe eae Ball amp Beam Student Handout SRV02 Series Q Rotary Experiment 3 QUANSER Ball amp 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 amp 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 SRVO2 E T servo plant 1 Quanser BB01 Ball amp 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 SRVO2 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 ar
7. ationship is reversed and a 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 Damping Ratio Natural Percent Tp Frequency wn Overshoot OS Inner Loop 0 200 s 0 707 22 2 rd s 4 6 Outer Loop 1 55s 0 707 2 96 rd s 4 6 Table 1 Controller time specifications 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 Vm K Oa azi 8 Ky S OL Hint Fit your closed loop transfer function to the standard second order representation of 2 w n sS 2Tw stw Page 6 Revision 01 Using the state feedback signal your inner loop will be of the following form Vm V Theta rd Position Setpoint SRVO2 Plant Model Derivative Figure 3 Inner Loop Controller Schematic Hint You s
8. e connected as per dictated in the Experiment 0 as well as the SRVO2 User Manual and the Ball amp Beam User Manual Page 2 Revision 01 3 Mathematical Model Figure 1 below depicts the Ball and Beam module coupled to the SRVO2 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 Sensor Calibrated Base Support base Figure 1 Ball amp 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 a Beam pitch radians R Radius of the ball 0 Servo load gear angle radians J Ball s moment of inertia Fx Translational force on the Ball Fx Rotational force on the ball g Earth s gravitational constant Page 3 Revision 01 Base Load Gear Figure 2 Ball amp 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 t
9. 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 This is the setpoint signal you will notice that there is a signal generator Centimeters producing a square wave connected to it Use this block as your position setpoint Outer Loop This is your outer loop proportional gain Kp_ bb Kp Inner Loop 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 gt theta linear relationship is only true in this region 50 lt 8 lt 50 The limiter prevents the system from demanding an undesirable theta out of the linear region Ball amp Beam This is the model of the Ball amp Beam system you can think of this as your Open TF Loop transfer function from Alpha radians to X meters
10. gth traveled by the lever arm as Arc If we measure both angles in radians we get the following expression r Arc aL gt E 3 7 r To complete the system derivations we need to know the transfer function from Motor Voltage Vm to output angle 0 s _ n 0 K K ValS J Rs B R n n K K K s 3 8 Since there is only 1 configuration High Gear of the SRVO2 for the Ball amp Beam module we can rewrite the transfer function with all the model parameters entered 0 s _ 61 54 3 9 5 s 35 1s Note The above transfer function was obtained from the derivations of Experiment 1 of the SRV0O2 Position Control The model parameters used can be found in the SRV02_Exp1_Position Control Lab Handout or the SRVO2 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 Z 0 s als X s ValS Vals s a s There are two flaws with this approach Since the above model is of 4 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 a and 8 only holds true for approximately 90 lt 6 lt 90 Outside of this linear range the rel
11. hould notice that the inner loop controller is identical to the controller designed for SRVO2_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 a K _bb Xa X Kv_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 amp 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 Inner Loop Proportional Gain Vird K Inner Loop Velocity Derivative Gain V rd s K _bb Outer Loop Proportional Gain rd cm K _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 amp Beam module serves as a great example to illustrate the use of multiple control loops
12. on the Encoder 0 on the 5 pin DIN to 5 pin This is the digital encoder data that SRV02 terminal board DIN measures the servo angle Beam sensor SI onthe UPM 6 pin 6 pin DIN Analog ball position measurement Table 3 Ball amp 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 _SRV0O2_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
13. orque produced by the rotational acceleration of the ball The 2 forces are Gravitational force in the x direction F m gsin amp 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 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 F _R J a Jo 3 2 We now take the ball s moment of inertia Jae mR and re arrange equation 3 2 to solve for the rotational force F mx 3 3 Page 4 Revision 01 Given all the forces acting on the rolling ball we can again apply Newton s 2 law of motion and equate the ball s mass multiplied by its acceleration to the sum of forces acting on the ball mi SP F F mgsina 2ms 3 4 Finally we will rearrange equation 3 4 yielding gt gsino 3 5 To linearize the above equation note that sina a for small a 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 _ 5g als 7s 3 6 Referring back to the illustration of Figure 2 let us refer to the arc len
14. osition in cm Simulated Ball Position as well as Command in cm Your plot should look similar to figure 8 below xj q_Ball_Bea Ball Position in centimeters q_Ball_Bea Physical Limitation of Beam q_Ball_Beam_ Simulated Ball Position 10 0 Time 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 Vi Vil 5 1 The calculations made for question 1 of the pre lab Include your calculated gains as well as your design procedure 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 After simulating the system with

Download Pdf Manuals

image

Related Search

Related Contents

INSTALLATION AND OPERATING INSTRUCTIONS  Robinets d`équilibrage «Hydrocontrol VFC» en fonte  Guide salarié  MegaTune 2.25 User`s Guide for the Spectre eMS-pro  Handleiding RL70-130  Samsung DVD-CM250 Bruksanvisning  URGENT – Programme volontaire de correction de  Moule 1    English Manual  

Copyright © All rights reserved.
Failed to retrieve file