You are on page 1of 10

PREFACE

Preparing laboratory experiments can be time-consuming. Quanser understands time constraints of teaching
and research professors. Thats why Quansers control laboratory solutions come with proven practical
exercises. The courseware is 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 courseware sample is prepared for users of The MathWorks MATLAB/Simulink software in
conjunction with Quansers QUARC real-time control software. A version of the course materials for
National Instruments LabVIEW users is also available.
The courseware for Quanser Ball and Beam experiment 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 Ball and Beam experiment. 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.

TABLE OF CONTENTS

PREFACE ...................................................................................................................... PAGE 1


INTRODUCTION TO QUANSER BALL AND BEAM COURSEWARE SAMPLE ................. PAGE 3
INSTRUCTOR WORKBOOK TABLE OF CONTENTS ....................................................... PAGE 4
BACKGROUND SECTION SAMPLE ............................................................................ PAGE 5
PRE-LAB QUESTIONS SECTION SAMPLE ................................................................... PAGE 6
LAB EXPERIMENTS SECTION SAMPLE ...................................................................... PAGE 7

1. INTRODUCTION TO QUANSER BALL AND BEAM COURSEWARE 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. Quanser Ball and Beam courseware covers topics, such as:
Modeling dynamics of the ball from first principles
Obtaining transfer function representation of the system
Design of a proportional-velocity (PV) 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 on the 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 Workbook 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 Workbook look for indicators such as A-1, A-2
These indicators correspond to specific performance criteria for an outcome. Appendix A of the Instructor
Workbook 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.

2.

INSTRUCTOR WORKBOOK TABLE OF CONTENTS

The full Table of Contents of the Quanser Ball and Beam Instructor Workbook is shown here:
1. INTRODUCTION
2. BACKGROUND
2.1. MODELING FROM FIRST PRINCIPLES
2.1.1.NONLINEAR EQUATION OF MOTION
2.1.2.ADDING SRV02 DYNAMICS
2.1.3.OBTAINING TRANSFER FUNCTION
2.2. DESIRED CONTROL RESPONSE
2.2.1.TIME-DOMAIN SPECIFICATIONS
2.3. BALL AND BEAM CASCADE CONTROL DESIGN
2.3.1.INNER LOOP CONTROLLER DESIGN: SRV02 PV POSITION CONTROLLER
2.3.2.OUTER LOOP CONTROLLER DESIGN
3. PRE-LAB QUESTIONS
4. LAB EXPERIMENTS
4.1. CASCADE CONTROL WITH IDEAL PD CONTROLLER
4.1.1.SIMULATION WITH NO SERVO DYNAMICS
4.1.2.SIMULATION WITH SERVO DYNAMICS
4.2. CASCADE CONTROL WITH PRACTICAL PD CONTROLLER AND SERVO DYNAMICS
4.2.1. SIMULATION WITH PRACTICAL PD CONTROLLER
4.2.2. IMPLEMENTATION WITH PRACTICAL PD CONTROLLER
4.2.3. CONTROLLER USING THE REMOTE SENSOR (OPTIONAL)
4.3. RESULTS
5. SYSTEM REQUIREMENTS
5.1. OVERVIEW FILES
5.2. SETUP FOR POSITION CONTROL SIMULATION
5.3. SETUP FOR POSITION CONTROL IMPLEMENTATION
6. LAB REPORT
6.1. TEMPLATE FOR CONTENT (CASCADE CONTROL WITH IDEAL PD CONTROL EXPERIMENTS)
6.2. TEMPLATE FOR CONTENT (CASCADE CONTROL WITH PRACTICAL PD CONTROL EXPERIMENTS)
6.3. TIPS FOR REPORT FORMAT
7. SCORING SHEET FOR PRE-LAB QUESTIONS
8. SCORING SHEET FOR LAB REPORT (IDEAL PD)
9. SCORING SHEET FOR LAB REPORT (PRACTICAL PD)
APPENDIX A BB01 INSTRUCTORS GUIDE
REFERENCES

3. BACKGROUND SECTION - SAMPLE


Modeling from First Principles
As illustrated in Figure 2.1, this system is comprised of two plants: the Rotary Servo (SRV02) and the Ball and
Beam (BB01).

Figure 2.1: Ball and Beam open-loop diagram.


The main objective in this section is to obtain the complete SRV02+BB01 transfer function
(2.1)
where the BB01 transfer function is
(2.2)
And the SRV02 transfer function is
(2.3)
The BB01 transfer function describes the linear displacement of the ball, x(t), with respect to the load angle
of the servo,
. In the next few sections, the time-based motion equations are developed and the
transfer function is obtained. The SRV02 transfer function models the servo load gear position,
, with
respect to the servo input voltage, Vm(t). Recall that in Modeling Laboratory ([7]), this transfer function was
found to be:
(2.4)
The nominal model parameters, K and , of the SRV02 with no load and in high-gear configuration are:
K = 1.53 rad/(V.s)
(2.5)
and
= 0.0248 s
(2.6)
Note: These parameters are different than the those found in the Modeling Laboratory because it does not
include the inertial disc load.

4. PRE-LAB QUESTIONS SECTION - SAMPLE


1. 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 Figure 3.1. The compensator is unity

Figure 3.1: Unity feedback system.

C(s) = 1

(3.1)

And the reference step is


(3.2)
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.
Answer 3.2
Outcome
A-1

Solution
Substituting the BB01 plant in 2.21 along with the compensator and reference input
defined above into the general error transfer function
(Ans. 3.5)

A-2

results in the expression


(Ans. 3.6)
When simplified, the error becomes
(Ans. 3.7)
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 time-domain is
(Ans. 3.8)

5. LAB EXPERIMENTS SECTION - SAMPLE


Cascade Control with Ideal PD Controller Simulation with No Servo Dynamics
Experimental Setup
The s bb01_pos_outer_loop Simulink diagram shown in Figure 4.1 is used to simulate the closed-loop
position response of the BB01 when using the outer-loop control. Thus, the SRV02 dynamics are neglected,
i.e. d = l. The response is simulated using the developed nonlinear model of the Ball and Beam.

Figure 4.1: Simulink diagram used to simulate the outer closed-loop BB01 system.

The BB01 Nonlinear Model subsystem includes the Pbb(s) transfer function that was derived in Section 2.1.3.
Recall that in Section 2.1.2 the model had to be linearized in order to obtain the Pbb(s) transfer function. This
nonlinearity is re-introduced in the BB01 Nonlinear Model subsystem in order to represent the plant more
accurately and ensure the specifications can still be satisfied. The BB01 PD Position Control subsystem
contains the ideal PD compensator designed in Section 2.3.2. Note that it includes a Saturation block that
limits the SRV02 angle between 56 degrees.
IMPORTANT: Before you can conduct these experiments, you need to make sure that the lab files are
configured according to your system setup. If they have not been configured already, then you need to go to
Section 5.2 to configure the lab files first.
Simulation
The root locus of the forward path is plotted using Matlab and the closed-loop step position response of the
BB01 is simulated to verify that the specifications are met. As previously mentioned, the simulation is
performed using the nonlinear model of the Ball and Beam and the ideal PD controller that was designed.
1.
2.
3.
4.

Ensure the s_bb01_pos_outerr_loop Simulink diagram is open and setup as described in Section 5.2.
Enter the BB01 model gain found in Pre-Lab question 1 in the matlab Command Window as variable
K_ bb(e.g., type K_bb = 1 in the Matlab prompt).
In Matlab, enter the BB01 compensator gain K_c and the compensator zero, z, that were found in PreLab question 11.
K-1 Using Matlab, plot the root locus of BB01 loop transfer function when using the ideal PD
controller. Use the sgrid command to include the dashed lines that show the desired locations of the
poles. Ensure the poles go through the desired locations at the gain that was computed in the Pre-Lab
question 11.

Answer 4.1
Outcome
K-1

Solution
Students should use the Matlab commands tf and rlocus to plot the root locus of the
open-loop system. For instructors, run setup_srv02_exp04_bb01.m with
CONTROL_TYPE=AUTO,PLOT_RL = 1 and PD_TYPE = 0 to plot the root locus of the Ball
and Beam ideal PD loop transfer function picturedin Figure 4.2. Also illustrated is how the
poles move to the desired locations when the compensator gain is as computed in
Ans.3.20.

Figure 4.3: Root locus of BB01 Ideal PD loop transfer function.

5. Select square in the Signal Type field of the SRV02 Signal Generator in order to generate a step
reference
6. Set the Amplitude (cm) slider gain block to 5 to generate a step with an amplitude of 5.0 centimeters
7. Open the load shaft position scope, theta l (deg), and the ball position scope, x (m).
8. Start the simulation. By default, the simulation runs for 25.0 seconds. The scopes should be
displaying responses similar to Figure 4.3 and Figure 4.4. In the x (m) scope, the yellow trace is the
desired ball position and the purple trace is the simulated response.

Figure 4.3: outer-loop ideal PD


ball position response.

Figure 4.4: Outer-loop ideal PD


servo angle response.

You might also like