Beruflich Dokumente
Kultur Dokumente
Name:
Name:
Name:
Figure 1: The system block diagram of close-loop speed/position control in Quanser lab series, and its re-
lationship to this lab.
1
1.1 Reasoning of Plant Modeling
Designing the PID controller for a close-loop control system, such as Figure 1, is like solving an equation
for an unknown. Recall the knowledge you learned in Chapter 5 of [1], the transfer function of the close-
loop system can be calculated if the transfer functions of all subsystems are known. The customers’ re-
quirements determine the transfer function of the close-loop system, and the equation giving rise to the
close-loop system transfer function with the PID controller’s transfer function as the only unknown is solv-
able. With the physical structure of the plant predefined, the transfer function of it should be acquirable.
We need to obtain the transfer function of the plant, input it to a Matlab computational tool, with which
we then solve the equation for the transfer function of the PID controller.
1.2 Objective
The focus of this lab is to get the transfer function of the plant, i.e. the Quanser DC motor SRV02, as
shown in Figure 1. The objective of this lab is to:
1. Familiarize the hardware and software to be used for Quanser lab series.
2. Obtain and validate the transfer function of the Quanser DC motor SRV02 through experimental
approach.
3. Calculate the transfer function of the Quanser DC motor SRV02 theoretically using the provided
datasheets and system schematic.
The theoretical calculation and analysis in Section 5 of this document can be carried out without the help
of the hardware/software resources in the lab. You may opt to study Section 5 before and/or after the lab.
Note that you define how you explore the questions being posed in the procedure. In preparation for your
entry into the real world of engineering, this document is not intended to be a cookbook.
2 Prelab
See your lab website.
3 Lab Deliverables
A completed worksheet per group is required. Answer all questions in bold. Where indicated with an
[SS#], you should collect screen shots and submit them to your instructor. Your instructor can decide on
the format for submission of screenshots (e.g. direct printout, pasted into a Word document and uploaded
to Canvas, etc.)
Notice, a comprehensive individual lab report is required per student (not per group) after the entire Quanser
lab series are completed. You are suggested to make a wise use of the screenshots and answers to the ques-
tions in the work sheets to compose your individual report.
2
4 Procedure
The hardware setup and software configuration introduced here will be used throughout the Quanser lab
series, including position control and speed control.
2. The Quanser VoltPAQ-X1 combines two functions in one device, namely a voltage controlled power
amplifier and a signal conditioner. Make sure the Amplifier Gain is set as ‘1x’ to avoid damage to
the motor assembly.
A signal conditioner is commonly used in control system to process the analog signal outputted from
the sensor and make it ready to be sampled by the computer. Analog sensor output is inherently
combined with hostile noise, which can be filtered out by the low-pass filter enclosed in the signal
conditioner. You might want to look up signal conditioning online to obtain more knowledge about
it. Please take a note of the series number on the bottom of your amplifier/signal con-
ditioner set VoltPAQ-X1. You will be using the same VoltPAQ-X1 throughout the Quanser
lab series.
Do you think the device VoltPAQ-X1 (combined amplifier and signal conditioner) will
be used between the encoder and the DAQ board? Why?
3
Figure 2: Connecting the SRV02 to a Single-Channel Amplifier and DAQ.
In this laboratory, the tachometer is used to measure the rotary speed. According to the knowledge
you learnt in lecture, when having the rotary speed as output and driving voltage as input,
what’s the order of the transfer function of the DC motor system? What’s the general form
for the transfer function?
4
Figure 3: Configuration of ‘Control and Simulation Loop’.
As the tachometer is an analog sensor which will output a voltage proportional to the speed of the shaft it
is attached to, the transfer function achieved experimentally should be Gexp (s) = Vt (s)/Ea (s), where Vt (s)
is the voltage output of the tachometer.
In this laboratory, you are going to get the value of a and A experimentally. In the lecture, you have done
similar exercise to get the values of a and A by measuring the step response of a system. What key char-
acteristics of the step response should you measure to get the value of A and a respectively?
Write down the equations to calculate A and a from these key characteristics.
5
Figure 4: Setup of HIL Initialize, CL HIL Read and CL HIL Write blocks to complete an I/O task associ-
ated with the Quanser DAQ board.
Slightly different to what you did in lecture, square waveforms with a DC offset is used instead of step sig-
nal as input in this lab to conduct the so-called bump test. In the bump test, you are going to drive the
motor with a train of square waveforms having a DC offset.
What’s the benefit of using bump test, instead of step response test? (Hint: think about the
static friction.)
Now, you are ready to compose your code to complete the bump test on top of the LabVIEW code as
given in Figure 4. Please set the appropriate input and output channels of the DAQ board in the HIL
Read and HIL Write blocks. Below are the setups of some key components you will need in your bump
test code.
6
2. Data Collection Using XY Graph
One way compatible to Control and Simulation Loop is recommended and introduced below:
(a) Bring in the Collector from Control Design & Simulation → Simulation → Utilities. The Col-
lector will temporally store all the data sent to the Collector in a buffer throughout the running
period of the program.
(b) Bring in a XY Graph in the front panel, put it outside of the loop in the block diagram. Con-
nect the output of the Collector with the input of the XY Graph. Set up the Minimum and
Maximum value of the X Scale in the Properties of the XY Graph to make sure that the data
to be displayed contain the entire dynamic process from the lower speed to the higher speed.
3. Data Measurement
Below is the method of using a Cursor to measure the time response displayed in the XY Graph:
(a) Right click the graph in the front panel, and select Visible Items → Cursor Legend from the
shortcut menu.
(b) Right click anywhere in the cursor legend, select Create Cursor, and select a cursor mode from
the shortcut menu. Free Cursor is recommended.
(c) The cursor is very hard to see at this point, as by default it has very similar color as the grid.
You may want to turn off the grid, or change the color of either the grid or the cursor to make
the cursors more visible. This modification can be made in the Properties panel by right click-
ing anywhere of the graph.
(d) Now you can move the cursors to appropriate places to measure the key characteristics. Show
the screenshot of your measurement in XY graph[SS1]. Write down your measure-
ment process and results. From your measurement, derive the values of A and a in
your transfer function Gexp (s) = Vt (s)/Ea (s) and write down the transfer function
with values plugged in.
Schematic of the experimental modeling validation is presented in Figure 6. You are going to use a Trans-
fer Function block in LabVIEW to simulate the motor SRV02. Driven by the same voltage source, the
transfer function model and the SRV02 should generate the same response if the model is accurate. You
7
Figure 5: An example of the .bmp file exported from the XY Graph.
will increase the accuracy of the model by tweaking the values of A and a until the same responses are dis-
played, as seen in Figure 7(b).
1. Build the simulation model of your motor using Transfer Function block.
Go to Control Design and Simulation → Simulation → Continuous Linear Systems → Transfer Func-
tion. Double click the Transfer Function block, inside the Transfer Function Configuration window,
change the Parameter source to Terminal. Now move your mouse on the left edge of the Transfer
Function block, you will find an input port also called Transfer Function at the bottom left of the
block. This input accepts the combination of numerator and denominator coefficients of the transfer
function.
Both the numerator and denominator polynomial coefficients need to be given in Array data type.
8
Figure 7: Sample screenshots of the waveform chart seen in Figure 6. Scenario of (a) happens when the
parameters of the transfer function, i.e. A and a, are inaccurate. Scenario of (b) happens when the model
is accurate enough so that the measurement matches the simulation.
A Build Array block in Array palette is needed to build either the numerator or denominator array.
The coefficients of the numerator or denominator polynomial, from the lowest to the highest order,
are inputted from the top to the bottom element of the Build Array block. Make sure the numerator
and denominator polynomial coefficients are formed with a and A, and you are able to change the
values of A and a via Controls on the Front Panel.
The numerator and denominator array will then be bundled together by a Bundle block in Cluster,
Class and Variant palette. The output of the Bundle block will then be sent to the Transfer Func-
tion block as the Transfer Function input.
How does doing bump test instead of step response test facilitate the validation pro-
cess?
9
5 Theoretical Modeling and Validation
The physical structure of the motor SRV02 is shown in Figure 8, with the component names listed in Ta-
ble 1. Notice, the motor will be running in high-gear mode, as shown in Figure 8. The theoretical trans-
fer function of a DC rotary motor can be derived from the electrical and the mechanical equations. Then
the students are required to evaluate all the parameters comprising the transfer function, with the spec-
ification sheet provided by the manufacturer, as shown in Table 2 and 3. Furthermore, the theoretically
calculated transfer function and the experimentally obtained transfer function will be compared.
10
Figure 9: Simplified schematic of SRV02 plant. The corresponding real devices and components are dis-
played in Figure 8.
Slightly different than the approach used in [1], the mechanical equation will be built on the load shaft, as
the only damping coefficient Dle given by the manufacturer, as shown in Table2, is the equivalent damping
coefficient seen on the load shaft. Furthermore, in order to be more realistic, the motor’s efficiency ηm and
the gearbox’s efficiency ηg are both taken into account.
11
Table 3: SRV02 gearhead specifications [2].
The schematic of the motor is depicted in Figure 9. According to the Kirchhoff’s voltage law, the voltage
drop on each component of the circuit can be summarized by the following equation:
The armature inductor La is negligible, and the back emf voltage Vb (s) = Kb Ωm (s), therefore (1) can be
simplified as:
Ra Ia (s) + Kb Ωm (s) = Ea (s). (2)
According to Newton’s second law, the torque felt on the load shaft can be summarized by the following
equation:
(Jle s2 + Dle s)θl (s) = Tl (s) (3)
where Tl is the torque exerted on the load shaft, which is transmitted from the torque generated on the
armature shaft, Tm , through two gearboxes, as can be seen from Figure 9. More quantitatively,
N2 N4
Tl (s) = Tm (s) ηg ηg , (4)
N1 N3
where N2 /N1 = Kgi and N4 /N3 = Kge are the internal and external gear ratio, ηg is the gearbox effi-
ciency. The values of all of them can be obtained from Table 1 and 2. ηg = 0.9 means that only 90% of
the torque can be transmitted from the driving shaft to the driven shaft through the meshing gears con-
necting the two shafts, and 10% of the torque is lost in the gearbox. While the external gearboxes are visi-
ble as Component 19 and 20 from the outside of the SRV02 motor fixture; the internal gearbox is not visi-
ble from outside but hidden inside the metal tube Component 19 enclosing both Shaft 0 and Shaft 1.
As can be seen from Table 1, ηm = 0.69 indicates that only 69% of the theoretically-calculated torque
can be actually delivered to drive the shaft. Therefore, the torque generated by the motor on the armature
shaft can be formulated as:
Tm (s) = Kt Ia (s)ηm , (5)
where Kt and Ia are the motor’s torque-current constant and the current flowing through the armature
circuit. Notice in (2), Ωm (s) = Ωl (s)Kg , where Kg is the total gear ratio from the armature shaft to the
load shaft, and Kg = Kgi Kge . By manipulating (2)∼(5), you should eventually yield the theoretical trans-
fer function of the plant as:
12
Show the process of deriving the transfer function in (6) from (2)∼(5).
While all the other parameters in (6) can be found in Table 2 and 3, the equivalent moment of inertia seen
on the load shaft Jle needs to be calculated. Following the system schematic depicted in Figure 9, the mo-
ments of inertia of some major gears cannot be ignored, and it should be calculated as:
1 2
J= mr , (7)
2
where m and r are the mass and radius of a specific gear disc, which can be found in Table 3.
Based on the system schematic in Figure 9, complete and formula below by filling out the
correct gear ratio. Then using the values in Table 2 and 3, calculate the equivalent load in-
ertia Jle . Notice, inertias of the internal gearbox and the encoder are ignored.
2 2 2
Jle = (J1 + Jmotor + Jtach ) · + (J2 + J3 ) · + (J4 + J5 ) + J6 ·
=
13
Plug in the values of all the parameters in the transfer function shown in (6) and get Gthe (s).
14
5.3 Comparison between Experimental and Theoretical Model
Recall your experimentally obtained transfer function of the motor: Gexp (s) = Vt (s)/Ea (s) that has the
tachometer voltage Vt (s) as the output. The voltage Vt should be proportional to the speed of the shaft
the tachometer is attached to. Check Figure 9 to see where the tachometer is mounted. The ratio of the
voltage and the rotary speed it is measuring is the tachometer sensitivity, which is 1.5 V/krpm according
to the user manual [2].
On the other hand, the theoretical transfer function you calculated Gthe (s) = Ωl (s)/Ea (s) has the load
shaft speed in SI unit as output. Please convert the experimentally obtained transfer function
Gexp (s) to Gexp,l,sp (s), which has load shaft speed in SI unit as output. (Hint: you should use
the appropriate gear ratios found in Figure 9 and Table 3, as well as the tachometer sensi-
tivity 1.5 V/krpm to do the conversion.)
Compare Gexp,l,sp (s) and Gthe (s), are they close to each other? Why?
Between theoretical and experimental modeling methods, which do you think it’s more ac-
curate? Why?
Discuss the cause of similarity and discrepancy between the process and results of theoreti-
cal and experimental modeling.
15
References
[1] Norman S. Nise, Control Systems Engineering (6 edition), John Wiley & Sons, Inc.
[2] SRV02 User Manual, Quanser Inc., 2011.
[3] Jacob Apkarian, Michel Levis and Hakan Gurocak, SRV02 Instruction Book of User Manual, Quanser
Inc. 2012.
16