quanser course material sample - ball and beam rotary workstation
TRANSCRIPT
QUANSER COURSE MATERIALS SAMPLE
BALL AND BEAM ROTARY WORKSTATION FOR MATLAB®/SIMULINK® SOFTWARE USERS
WITH ABET OUTCOMES ASSESSMENT EMBEDDED
DEVELOPED BY: Paul Karam, B.A.Sc., Quanser; Michel Levis, M.A.Sc., Quanser;
Jacob Apkarian, Ph.D., Quanser; Hakan Gurocak, Ph.D., Washington State University
WWW.QUANSER.COM
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 1 of 11
PREFACE
Preparing laboratory experiments can be time‐consuming. Quanser understands time constraints of teaching and research professors. That’s why Quanser’s control laboratory solutions come with proven practical exercises. The course materials are designed to save you time, give students a solid understanding of various control concepts and provide maximum value for your investment.
Quanser course materials are supplied in two formats:
1. Instructor Workbook – provides solutions for the pre‐lab assignments and contains typical experimental results from the laboratory procedure. This version is not intended for the students.
2. Student Workbook – contains pre‐lab assignments and in‐lab procedures for students.
This curriculum is prepared for users of The MathWorks’s Matlab/Simulink software in
conjunction with Quanser’s QUARC real‐time control software. A version of the course materials for National Instruments LabVIEW™ users is also available.
This curriculum is aligned with the requirements of the Accreditation Board for Engineering and Technology (ABET), one of the most respected organizations specializing in accreditation of educational programs in applied science, computing, science and technology. The Instructor Workbook provides professors with a simple framework and set of templates to measure and document students’ achievements of various performance criteria and their ability to: ‐ Apply knowledge of math, science and engineering ‐ Design and conduct experiments, and analyze and interpret data ‐ Communicate effectively ‐ Use techniques, skills and modern engineering tools necessary for engineering practice
Quanser, Inc. would like to thank Dr. Hakan Gurocak, from the Washington State University Vancouver, for rewriting the original manual to include embedded outcomes assessment.
The following material provides an abbreviated example of pre‐lab assignments and in‐lab procedures for the SRV02 Ball and Beam Rotary Workstation. Please note that the examples are not complete as they are intended to give you a brief overview of the structure and content of the course materials you will receive with the plant.
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 2 of 11
COURSE MATERIALS SAMPLE TABLE OF CONTENTS
PREFACE ...................................................................................................................... PAGE 1
INTRODUCTION TO QUANSER BALL AND BEAM CURRICULUM SAMPLE .................. PAGE 3
INSTRUCTOR’S MANUAL TABLE OF CONTENTS .......................................................... PAGE 4
BACKGROUND SECTION – SAMPLE ............................................................................ PAGE 6
PRE‐LAB QUESTIONS SECTION – SAMPLE ................................................................... PAGE 7
LAB EXPERIMENTS SECTION – SAMPLE ...................................................................... PAGE 9
SYSTEM REQUIREMENTS SECTION – SAMPLE .......................................................... PAGE 11
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 3 of 11
1. INTRODUCTION TO QUANSER BALL AND BEAM COURSE MATERIAL SAMPLE
Quanser course materials provide step‐by‐step pedagogy for a wide range of control challenges. Starting with the basic principles, students can progress to more advanced applications and cultivate a deep understanding of control theories. The Quanser Ball and Beam course material covers topics, such as:
Modeling dynamics of the ball from first principles.
Obtaining a transfer function representation of the system
Design of a proportional‐velocity compensator to control the position of the servo load shaft according to time‐domain requirements.
Assessment of how well the system meets design specifications using root locus.
Design of a cascade control system to regulate the position of the ball and beam.
Simulation of the Ball and Beam control to ensure that the specifications are met without any actuator saturation.
Implementation of the controllers on the Quanser Ball and Beam device and evaluation of its performance.
Every laboratory chapter in the Instructor’s Manual is organized into four sections:
Background section provides all the necessary theoretical background for the experiments. Students should read this section first to prepare for the Pre‐Lab questions and for the actual lab experiments.
Pre‐Lab Questions section is not meant to be a comprehensive list of questions to examine understanding of the entire background material. Rather, it provides targeted questions for preliminary calculations that need to be done prior to the lab experiments. All or some of the questions in the Pre‐Lab section can be assigned to the students as homework.
Lab Experiments section provides step‐by‐step instructions to conduct the lab experiments and to record the collected data.
System Requirements section describes all the details of how to configure the hardware and software to conduct the experiments. It is assumed that the hardware and software configuration have been completed by the instructor or the teaching assistant prior to the lab sessions. However, if the instructor chooses to, the students can also configure the systems by following the instructions given in this section.
Assessment of ABET outcomes is incorporated into the Instructor’s Manual – look for indicators such as A‐1, A‐2 These indicators correspond to specific performance criteria for an outcome. Appendix B of the Instructor’s Manual includes: ‐ details of the targeted ABET outcomes, ‐ list of performance criteria for each outcome, ‐ scoring rubrics and instructions on how to use them in assessment.
The outcomes targeted by the Pre‐Lab questions can be assessed using the student work. The outcomes targeted by the lab experiments can be assessed from the lab reports submitted by the students. These reports should follow the specific template for content given at the end of each laboratory chapter. This will provide a basis to assess the outcomes easily.
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 4 of 11
2. INSTRUCTOR’S MANUAL TABLE OF CONTENTS
The full Table of Contents of the Quanser Rotary Servo Instructor’s Manual is shown here:
PREFACE
1. SRV02 BALL AND BEAM POSITION CONTROL 1.1. BACKGROUND
1.1.1. MODELING FROM FIRST PRINCIPLES 1.1.1.1. NONLINEAR EQUATIONS OF MOTION 1.1.1.2. ADDING SRV02 DYNAMICS 1.1.1.3. OBTAINING TRANSFER FUNCTION
1.1.2. DESIRED CONTROL RESPONSE 1.1.2.1. TIME‐DOMAIN SPECIFICATIONS
1.1.3. BALL AND BEAM CASCADE CONTROL DESIGN 1.1.3.1. INNER LOOP CONTROLLER DESIGN: SRV02 PV POSITION CONTROLLER 1.1.3.2. OUTER LOOP CONTROLLER DESIGN
1.2. PRE‐LAB QUESTIONS 1.3. LAB EXPERIMENTS
1.3.1. CASCADE CONTROL WITH IDEAL PD CONTROLLER 1.3.1.1. SIMULATION WITH NO SERVO DYNAMICS 1.3.1.2. SIMULATION WITH SERVO DYNAMICS
1.3.2. CASCADE CONTROL WITH PRACTICAL PD CONTROLLER AND SERVO DYNAMICS 1.3.2.1. SIMULATION WITH PRACTICAL PD CONTROLLER 1.3.2.2. IMPLEMENTATION WITH PRACTICAL PD CONTROLLER 1.3.2.3. CONTROLLER USING THE REMOTE SENSOR (OPTIONAL)
1.3.3. RESULTS 1.4. SYSTEM REQUIREMENTS
1.4.1. OVERVIEW OF FILES 1.4.2. SETUP FOR POSITION CONTROL SIMULATION 1.4.3. SETUP FOR POSITION CONTROL IMPLEMENTATION
1.5. LAB REPORT 1.5.1. TEMPLATE FOR CONTENT (CASCADE CONTROL WITH IDEAL PD EXPERIMENTS) 1.5.2. TEMPLATE FOR CONTENT (CASCADE CONTROL WITH PRACTICAL PD EXPERIMENTS) 1.5.3. TIPS FOR REPORT FORMAT
1.6. SCORING SHEET FOR PRE‐LAB QUESTIONS 1.7. SCORING SHEET FOR LAB REPORT (IDEAL PD) 1.8. SCORING SHEET FOR LAB REPORT (PRACTICAL PD)
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 5 of 11
A. BALL AND BEAM INSTRUCTOR’S GUIDE
A.1. PRE‐LAB QUESTIONS AND LAB EXPERIMENTS A.1.1 HOW TO USE PRE‐LAB QUESTIONS A.1.2 HOW TO USE THE LABORATORY EXPERIMENTS
A.2. ASSESSMENT FOR ABET ACCREDITATION A.2.1 ASSESSMENT IN YOUR COURSE A.2.2 HOW TO SCORE THE PRE‐LAB QUESTIONS A.2.3 HOW TO SCORE THE LAB REPORTS A.2.4 ASSESSMENT OF THE OUTCOMES FOR THE COURSE
A.2.4.1. COURSE SCORE FOR OUTCOME A A.2.4.2. COURSE SCORES FOR OUTCOME B, K AND G
A.2.5 ASSESSMENT WORKBOOK A.3. RUBRICS
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 6 of 11
3. BACKGROUND SECTION ‐ SAMPLE
Modeling from First Principles
As illustrated in Figure 1.1, this system is comprised of two plants: the SRV02 and the Ball and
Beam (BB01).
The main objective in this section is to obtain the complete SRV02+BB01 transfer function
where the BB01 transfer function is
and the SRV02 transfer function is
The BB01 transfer function describes the linear displacement of the ball, X(t), with respect to the load angle
of the servo,l (t). In the next few sections, the time‐based motion equations are developed and the transfer function is obtained. Recall that in Modeling Laboratory, the SRV02 voltage‐to‐load shaft angle transfer function was found to be:
Also, the nominal model parameters, K and _ , when the SRV02 was in high‐gear configuration were found as:
and
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 7 of 11
4. PRE‐LAB QUESTIONS SECTION ‐ SAMPLE
1. A‐2 Find Kbb by simplifying the expression given in Equation 1.20. Then, evaluate it using the system
parameters in [6]. Hint: Recall that the mass moment of inertia of a solid sphere is
Answer 1.1
Outcome Solution A‐2 The linear equation of motion becomes
Recall that the mas moment of inertia of a solid sphere is
where m is the mass of the ball and r is its radius. Substituting the parameters listed in [6] into the model gain gives
2. A‐1, A‐2 Find the steady‐state error of the Ball and Beam system given by the Pbb (s)transfer function.
The system is shown in the Figure 1.9. The compensator is unity
and the reference step is
where R0 is the step amplitude. Note that in this calculation the SRV02 dynamics is to be ignored and only the BB01 plant is to be considered.
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 8 of 11
Answer 2.1
Outcome Solution A‐1 Substituting the BB01 plant in 1.21 along with the compensator and reference input
defined above into the general error transfer function
A‐2 results in the expression
When simplified, the error becomes
This system has two poles along the imaginary axis, i.e. at s = j Kbb. Its response is oscillatory and, therefore, there is no steady‐state value that can be found. By taking the inverse Laplace, the error in the timedomain is
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 9 of 11
5. LAB EXPERIMENTS SECTION ‐ SAMPLE
Cascade Control with Practical PD Controller and Servo Dynamics ‐ Simulation with Practical PD
Controller
The practical PD controller developed in Section 1.1.3.2 is simulated in this section. This is the compensator that will be used to control the actual BB01 device. The control gain and zero may have to be fine‐tuned in order to compensate for the added dynamics of the filtering and the inner‐loop servo control. Follow these steps to simulate the closed‐loop practical cascade PD response:
1. Enter the BB01 model gain found in Pre‐Lab question 1 in MATLAB as variable Kbb. 2. Enter the practical PD compensator gain Kc, and zero, z, that were found in Pre‐Lab question 12. The
filter cutoff filter,f , is already set by the script (See Section 1.4.2 for more details). 3. Follow steps 2‐6 in Section 1.3.1.2 to setup the SRV02 model parameters and control gains and setup
the Simulink diagram. 4. To simulate using the practical PD controller, set the Manual Switch in the BB01 PD Position Control
subsystem to the downward position.
5. K‐1 Using MATLAB, plot the root locus of BB01 loop transfer function when using the practical PD compensator. Show the desired locations of the poles on the plot and ensure the poles go through the desired locations at the gain that was computed.
Answer 1.20
Outcome Solution K‐1 Run the setup_srv02_exp04_bb01.m with CONTROL_TYPE = ’AUTO’, PLOT_RL = 1 and
PD_TYPE = 1 to plot the root locus of the Ball and Beam practical PD loop transfer function pictured in Figure 1.21. Also illustrated is how the poles move to the desired locations when the compensator gain is as computed in Ans.1.20.
Figure 1.21: Root locus of BB01 practical PD control loop transfer function.
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 10 of 11
6. Open the ball position scope x (m), the load shaft position scope theta_l (deg), and the SRV02
motor input voltage scope Vm(V). 7. Start the simulation. By default, the simulation runs for 25.0 seconds. The scopes should be
displaying responses similar to figures Figure 1.22, Figure 1.23 and Figure 1.24. 8. B‐5, K‐3 Generate a Matlabr figure showing the practical cascade ball position, servo angle, and
servo input voltage response.
Answer 1.21
Outcome Solution B‐5 If the experimental procedure is followed correctly, the response should be similar to
Figure 1.25. B‐5 The closed‐loop position response when using the cascade control with the practical
outer‐loop PD compensator is depicted in Figure 1.25. This is generated using the meas_srv02_bb01_specs.m script. To use this script, do the following: (a) Execute the setup_srv02_exp04_bb01.m script with CONTROL_TYPE = ’AUTO’,
PD_TYPE = 1, c_ts = 0.04, ts_bb =3.5, and PO_bb = 10.0. (b) Run the s_srv02_bb01 Simulinkr model with Manual Switch in the DOWN position. (c) Run the meas_srv02_bb01_specs.m script.
COURSE MATERIALS
SAMPLE BALL AND BEAM ROTARY WORKSTATION
©2011 Intellectual property of Quanser. Do not reproduce without written permission.
QUANSER.COM +1-905-940-3575 [email protected] Page 11 of 11
6. SYSTEM REQUIREMENTS SECTION ‐ SAMPLE
Set up for Position Control Simulation
Follow these steps to configure the lab properly:
1. Load the MATLAB software. 2. Browse through the Current Directory window in MATLAB and find the folder that contains the
BB01 controller files. 3. Double‐click on the s_bb01_pos_outer_loop.mdl file to open the Simulink diagram shown in
Figure 4.11. 4. Double‐click on the setup_srv02_exp04_bb01.m file to open the setup script for the BB01
Simulink models. 5. Configure setup script: When used with the Ball and Beam, the SRV02 must be in the high‐gear
configuration and no load is to be specified. Make sure the script is setup to match this configuration, i.e. the EXT_GEAR_CONFIG should be set to ’HIGH’ and the LOAD_TYPE should be set to ’NONE’. Also, ensure the ENCODER_TYPE, TACH_OPTION, K_CABLE, AMP_TYPE, and VMAX_DAC parameters are set according to the SRV02 system that is to be used in the laboratory. Next, set CONTROL_TYPE to ’MANUAL’.
Answer 1.33 Set CONTROL_TYPE = ’AUTO’ to automatically calculate the zero and gain according to the specifications. Set PLOT_RL = 1 and PD_TYPE = 0 to plot the root locus of the open‐loop BB01 system, the Ideal PD compensator, and the BB01+Ideal PD system.
The students should not have access to the scripts d_pv_design.m, d_bb01_model_param.m, d_bb01_specs.m, and d_bb01_pd.m described in 1.2. However, exactly what should be given to the students is at the discretion of the instructor. It may be desired to supply d_pv_design to automatically calculate the SRV02 PV gains.
SRV02 model parameters:
K = 0 rad/s/V tau = 0 s
SRV02 Specifications: tp = 0.15 s PD = 5 % BB01 model parameters:
K_bb = 0 m/s^2/rad BB01 Specifications: ts = 3.5 s PD = 10 % Calculated SRV02 PV control gains
kp = 0 V/rad kv = 0 V/rad/s
Natural frequency and damping ratio: wn = 0 rad/s zeta = 0
BB01 PD compensator: Kc = 0 rad/m z = 1 rad/s wf = 6.28 rad/s Display message shown in Matlab Command Window after running setup \_srv02|exp04\_bb01.m