Sunteți pe pagina 1din 52

FACULTY OF ENGINEERING AND APPLIED SCIENCE

ENGR/MECE 3350U

Control Systems Laboratory Manual

Fall 2014

Supported by
Revised by Cliff Chan

FACULTY OF ENGINEERING AND APPLIED SCIENCE

Lab 1: Motor Static Relationship


and
Motor Parameter Estimation

Page 2 of 12

1. Laboratory Objectives
The objective of this laboratory is to develop your understanding of modeling for control
design and to practice modeling skills using the DC Motor Control Trainer.
In particular, you will have to:
practice the first principle of the system modeling,
determine the system parameters by experimental tests, and
develop an insight into the linear and nonlinear aspects of the model.

2. Preparation and Pre-Requisition


Before proceeding, you should first review the modeling section of your textbook. A brief
summary is given in Section 3. You should also review the following material from the
courses in mechanics and physics, which you have already had:
Calculation of moments of inertia;
Basic Newtonian mechanics;
Forces on a conductors in a magnetic field;
Voltage generated in a conductor that moves in a magnetic field.

3. Introduction
Modeling is an essential aspect of the control system study. The key elements of modeling
are briefly outlined as:
Get an overview of the system and get familiar with its components.
Understand the physics of the system and how the system works.
First principles involving in component modeling.
Modeling from the experimental tests Parameter Estimation.
Disturbances applied to the system.
Model uncertainty.
Model validation.

Page 3 of 12

An overview of the system can be obtained by the pictures, schematic diagrams, and the
block diagrams. This gives the representations of a system, which emphasizes the aspects
of the system that are relevant for the control and suppresses many details. The work is
guided by focusing on the variables that are of primary interest for control.

The block diagram presents a natural partition of the system. The mathematical
descriptions of the behavior of the subsystems representing each block are necessary to
have a complete model. In control it is often sufficient to work with the linearized models,
where the dynamics are represented by the transfer functions. These transfer functions can
be obtained from the first principles by applying the basic physical laws that describe the
subsystems or by experiments on a real system. First principle modeling always requires a
good knowledge of the physical phenomena involved and a good sense for reasonable
approximations.

Experiments on the actual physical system are good complements to the first principles of
system modeling. This can also be used when the knowledge required for first principles
modeling is not available.
It is a good practice to start the experiments by first determining the static input-output
characteristics of the actual system. For the systems with several inputs (Multi-Inputs as
for the case of the motor in the DCMCT) one can often obtain an additional insight to the
dynamics of the system by exploiting all the input signals.

4. Nomenclature
The following list of nomenclature, as described in Table 1.1, is used for the modeling of
an open-loop control system.

Page 4 of 12

Table 1.1: Open-Loop System Nomenclatures


Symbol

Description

Unit

Motor speed which can be computed from the motor angle

Vm

Voltage from the amplifier which drives the motor

Td

Disturbance torque externally applied to the inertial load

N.m

Tm

Torque generated by the motor

N.m

Im

Motor Armature Current

km

Motor Torque Constant

N.m/A

Rm

Motor Armature Resistance

Lm

Motor Armature Inductance

mH

Jm

Moment Of Inertia Of Motor Rotor

kg.m2

J1

Moment Of Inertia Of Inertial Load

kg.m2

Total Moment Of Inertia Of Motor Rotor And The Load

kg.m2

Jeq
K

Open-Loop Steady-State Gain

Open-Loop Time Constant

rad/s
V

rad/(V.s)
s

M1

Inertial Load Disc Mass

kg

r1

Inertial Load Disc Radius

mH

Sampling Interval

laplace Operator

rad/s

Continuous Time

5. Laboratory Session
5.1. QICii Modeling Module
The main tool for this laboratory experiment is the front panel of the module entitled
Modeling in the QICii software, which should be similar to the one shown in Figure 1.1.
As a quick module description, Table 1.2 lists and also describes the main elements
composing the QICii Modeling module user interface. Every element is uniquely
identified through an ID number and located in Figure 1.1.

Page 5 of 12

Figure 1.1: Modeling Module of the QICii Software

Table 1.2: QICii Modeling Module Nomenclatures

ID#

Label

Parameter

Description

Unit

Speed

Motor Output Speed Numeric Display

Rad/s

Current

Im

Motor Armature Current Numeric Display

Vm

Motor Input Voltage Numeric Display

5
6
7

Voltage
Signal
Generator
Amplitude
Frequency
Offset

Speed

9
10
11
12

Voltage
K

Tf

Vm
K

Type of Generator For The Input Voltage Signal

Tf

Generated Signal Amplitude Input Box


Generated Signal Frequency Input Box
Generated Signal Offset Input Box
Scope With Actual (in red) and Simulated (in
blue) Motor Speeds
Scope With Applied Motor Voltage(red)
Motor Model Steady-State Gain Input Box
Motor Model Time Constant Input Box
Time Constant of Filter for Measured Signal
Page 6 of 12

V
Hz
V
rad/s
V
rad/(V.s)
s
s

The Modeling Module program runs the process in the open-loop condition by utilizing
the motor voltage given by the signal generator. There are two windows that show the
time histories of the motor speed and the motor voltage, respectively.
A simulation study of the system runs in parallel with the hardware. The output of the
simulation study can be used for the model fitting and the parameter validation. The input
for the simulation study is equal to the motor voltage while the output of the simulation is
displayed (blue trace) in the same window as the actual motor speed (red trace).
The parameters K and t of the simulation model could be adjusted from the front panel.
The simulated motor speed,

s is obtained from the simulated transfer function and the

actual motor voltage as illustrated in the following

s (s)

KVm ( s)
s 1

The implemented digital controller in the QIC runs at 100Hz. Thus the sampling interval
is therefore being equal to h = 0.01 [s]
The actual speed is obtained by filtering the position signal using the following filter:

s m
Tf s 1

where m is the position of the motor shaft measured by the encoder.

5.2. Module Startup Procedure


Power up the DCMCT: To start and use the Modelling module, first launch the QICii
software and then select Modelling in the drop-down menu.
To download the controller code, follow the steps described below:
1. Press the Download program button on top of the QICii window.
2. Click on the Write (F4) button of the PIC downloader popup window.
3. Push the Reset button on the QICii to actually start the download. The two LED's
stop flashing.
4. Once the download is complete, press down the Reset button on the QICii one
more time. The two LED's should now start flashing again.
5. Close the PIC downloader window.

Page 7 of 12

Once it is loaded, the controller code stays on the QICii (even when the power to the
DCMCT is off).
To start the controller, press down the DCMCT User Switch (i.e., the pushbutton next to
the two flashing LED's). The two LED's stop flashing The controller starts running.
Select the Connect to data source button on top of the QICii window in order to be able
to receive / send data from / to the controller. LED2 should now turn on.

Table 1.3: Default Module Parameters


Signal
Type
Square
Wave

Amplitude Frequency
[V]
[HZ]
2.0

0.4

Offset
[V]

K
[Rad/V.S]

[S]

0.0

10.0

0.2

[s]

Tf
0.0

5.3. Static Relationship

Experimental Procedure
A procedure of this type is very useful in order to make sure that a system will function
properly.

Please follow the steps exactly as described below:


1. Run the system as an open-loop one by changing the voltage to the motor. The
motor voltage is set by the signal generator. With zero signal amplitude, change
the signal offset to generate a constant DC voltage. Sweep the voltage gently over
the full signal (voltage) range and observe the steady-state speed, current, and the
motor input voltage. What are the minimum and maximum voltages you can input
to the system? What exactly happens to the variables as you change the offset (i.e.
change the offset from -3V to +3V)? Can you determine the following
relationships: i) input voltage vs motor speed; and ii) current vs motor speed?

2. Start with a zero value of voltage on the motor and increase the voltage gradually
until the motor starts to move. Determine the value of the voltage (start-up
voltage) when this occurs. Repeat the test with negative values of voltages. What
forces are restricting the motor from spinning?
Page 8 of 12

3. Determine the actual maximum value of the motor velocity and compare it with
the calculate one. To determine the calculated value, you have to record the motor
velocity values subjected to the change of the input voltage from -3V to 3V with
an increment of 1V. Then, draw a best-fit-line through these data points. Next,
extrapolate the motor velocity values to determine the calculated maximum value
of the motor velocity. Do you see the difference between the actual and the
calculated values? (Hint: You may or may not see the difference. In either case,
explain your observation.)

5.4. Estimate The Motor Resistance


Some of the parameters of the mathematical model of the system can be determined by
measuring how the steady-state velocity and the current would change with the applied
voltage.

To estimate the motor resistance experimentally, follow the steps described below:
1. Set the generated signal amplitude to zero. If the signal offset is different from
zero then the motor will spin in one direction, since a constant voltage is applied.
You can change the applied voltage by entering the desired value in the Offset
numeric control of the Signal Properties box. You can also read off the actual
value of the current of the motor from the digital display. The value is in Amperes.
Fill up the following table (i.e., Table 1.4). For each measurement hold the
motor shaft stationary by grasping the inertial load to stall the motor.
Note that for zero Volts you will measure a current, Ibias that is possibly a non-zero
value. This is an offset in the measurement, which you will need to subtract from
the subsequent measurements in order to obtain the exact value of the current
(Im(i) = Imeas(i)-Ibias). Note also that the current value shown in the digital display
is filtered and you must wait for the value to settle down (steady state is reached)
before writing it down.

Page 9 of 12

Table 1.4: Motor Resistance (Experimental results)


SAMPLE
i

V m (i)

SAMPLE
i

Voltage
Offset [V]

-5

-4

-3

-2

-1

10

Offset in Measured
Current: I bias[A]

[V]

V m (i)

Measured Current: I

[V]

meas[A]

Corrected for
Bias: I m (i) [A]

Resistant:
Rm(i) [ ]

Average Resistant: Ravg []

From the values noted in Table 1.4, calculate the values of the motor resistance Rm(i) for
every iteration and obtain an average value for it, Ravg. Explain the procedure that you
have used to estimate the resistance Rm.
2. From the system parameters, which are given in Appendix A, the value of the
resistance is 10.6 10%. Compare the estimated value for Rm (i.e., Ravg) with the
specified value and discuss your results in detail.

Page 10 of 12

5.5. Estimate The Motor Torque Constant


To estimate the value of the motor back-EMF constant experimentally, follow the steps
described below:
1. With the motor free to spin, apply the same procedure as given above and fill the
given table (i.e., Table 1.5). You can read off a value for the motor angular speed
from the digital display. Wait a few seconds after you entered a new voltage value
as the displayed speed values are low-pass filtered. The values of the angular
speed are in radians per seconds. The current measurement may have an offset,
which you should need to account for. The speed measurement will have a very
small offset, which also need to be compensated for. Calculate the motor backEMF constant for each measurement iteration and then calculate an average value
for the 10 measurements. You should use the value of Rm that you have estimated
in the previous section.
Note that km can be calculated using

V m

Rm I m

2. From the system parameters that are given in Appendix A, km = 0.0502Vs/rad.


Compare the estimated value for km (i.e., km_avg) with the specified value, and then
discuss your results in detail.

5.6. Obtain the Transfer Function of the Motor


The open-loop transfer function of the system can be described as

G ,V ( s )

where

1
system constant;
km

and

K
s 1

J eq Rm
km

system time constant

From the above estimates, determine a numerical expression for the open-loop transfer
function G,V of the motor (Jeq = 0.0000221 kg.m2, 0.130 s). What are the estimated
open-loop steady-state gain value and the time constant?

Page 11 of 12

Table 1.5: Back-EMF Constant Experimental Results


SAMPLE
i

V m (i)

SAMPLE
i

Offset
Voltage [V]

-5

-4

-3

-2

-1

10

R aver
[]

Offset in Measured
Current: I bias[A]

[V]

V m (i)
[V]

Measured Speed:
m (i) [Rad/S]

meas (i)

[A]

m (i)
[A]

K m (i)
[V.s/Rad]

Average Back EMF--Constant: Km(i) [V.s/Rad]

5.7. Estimate The Measurement Noise


The measurement noise could be determined experimentally. Please follow the steps
described below:
1. Determine the measurement noise for the speed control by running the motor with
a constant positive as well as a constant negative voltage and observe the
fluctuations in the velocity, if any.
2. Does the noise level depend on the velocity and /or the direction of rotation? Do
you also observe any repeatable fluctuations in the velocity signal? Can you find
their causes?

Hint: Can the fluctuations in the velocity signal be related to the motor position?

Page 12 of 12

FACULTY OF ENGINEERING AND APPLIED SCIENCE

Lab 2: Dynamics Modeling


Experimental Determination of System Dynamics

Page 1 of 6

1. Experiment Objective
The objective of this experiment is to develop your understanding of modeling for control
system design and to practice modeling skills using the DC Motor Control Trainer.
In particular, you will:
Observe and understand the transient response of a first-order dynamic system
Practice modeling from experimental tests
Understand the importance and the technique of system validation

2. Lab Preparation
Before the proceeding you should review the modeling experiment you did in Lab 1.

3. Introduction
Model of a dynamic system can be approximated by exciting the system with a known
input and observing its system response. The so called bump test is a simple method to
determine the response based on a step function input. When a step input of known
amplitude is applied to a dynamic system, its time response is captured until the condition
of steady-state is reached. A graphical method (as described in Section 4.1.1) can then be
applied to the plot of time response to estimate the parameters of the dynamic system.
For instance, in the case of the first-order system, the system gain, K and the time
constant, can be estimated. A model can in principle be obtained by applying any type
of input to the system and analyzing the corresponding response. There is abundant
literature and good software available to do this. In this experiment we will utilize a
simple graphical method. You can review your lecture notes on this subject.
When a model is obtained, it is a good practice to assess the validity of the model by
running simulations of the model and comparing its response with that of the actual
system. To determine how closely a model resembles or fits the actual system, we
usually compare the difference of their responses by measuring the error (as described in
Section 4.2.1) between them. Model validation is an important procedure that should be
performed in order to give a level of confidence in the expected performance before such
model is applied to a closed-loop system.
Page 2 of 6

4.

In-Laboratory Content

4.1 The Bump Test


(Step function input)

4.1.1 Preamble
The bump test is a simple model estimation method based on the step response of a stable
system. It is carried out by inducing a step input of known amplitude to a stable system,
whose output will eventually reach the equilibrium state. If the system output is recorded
during the estimation period (from the time when the step input is induced until the time
when steady state is reached), a plot of the time response, similar to the one depicted in
Figure 1 for a first-order system, can be produced. As you recall from Lab 1, the DC
motor control system actually demonstrates a first-order system response. Thus, we will
approximate the motor control system according to the first-order system transfer
function given below:

G , V ( s )

K
s 1

Figure 1: Bump test (Step function) input and output response


Page 3 of 6

[2.1]

Assuming that the input changes with u and that the corresponding change in the
steady-state output is y, an estimate of the steady-state gain is then given by:

y
u

[2.2]

The quantity (time constant) is approximately given by the time the output has reached
63% of its total change at steady state.

4.1.2 Experiment Process


Please read Appendix B which describes how to use the QICii plots to take measurements
of the acquired data, to start and stop the plots, and to measure point coordinates on the
plots. Please follow the steps below:
1. Apply a series of step inputs to the open-loop system by setting the QICii module
parameters as described in Table 2.1.
Signal
Type

Amplitude
[V]

Frequency
[Hz]

Offset
[V]

K
[rad/(V.s)]

Square
Wave

0.4

0.0

[s]

Table 2.1: Module Parameters for the Bump-test experiment


2. The open-loop controller now applies a constant-amplitude voltage square wave
to the motor. Step voltages are applied to the motor from the signal generator with
a period that is so long that the system well reaches steady-state at each step. The
motor should run at the corresponding constant speeds. Determine the transfer
function from the voltage Vm to angular velocity m using the obtained bump
tests.

Page 4 of 6

3. Determine the parameters K and of the model defined in [2.1].

4. Repeat the procedure for a few different signal amplitudes, as well as for the
rising and falling steps. Average your estimated parameters.

4.2 Model Validation


4.2.1 Preamble
A simple form of the model validation can be done because the software Modelling
contains a first-order simulation, whose model expressed by Equation [2.1] is driven by
the actual open-loop motor voltage. This model is running in parallel with the motor,
which can be used for model fitting. The simulation parameters K and can be adjusted
from the front panel. The output of the model is displayed together with the actual motor
speed.
To measure how closely a model fits the actual system, we can calculate the root mean
squared (RMS) error measured within the validation period as given below:

[2.3]
where

is the output of the actual system,

is the output of the simulation model,

i is the index of the data point, and n is the index of the last (at the end of the validation
period) data point.

Page 5 of 6

Alternatively, Eq. [2.3] can be expressed in terms of its relative percentage error, given
by:

[2.4]

4.2.2 Experiment Process


Follow the procedures described below:
1. Activate the model by changing the simulation parameters K and .
2. Set K and to the values which you have previously estimated from the bump
test. Do you obtain a good fit between the estimated and the actual responses?
3. Try to minimize the error between the simulated response and the actual response
by adjusting the simulation parameters K and on-the-fly until you obtain a good
fit. This procedure is called model fitting.
4. Change the signal amplitude to see if you have to change the values of the
simulation parameters in order to get a better fit.
5. Is your model valid? Apply Eq. [2.4] to determine if your model is valid and
summarize your observation.

Page 6 of 6

FACULTY OF ENGINEERING AND APPLIED SCIENCE

Lab 3: Qualitative Properties of PI Control

Page 1 of 11

1. Laboratory Objective
The objective of this laboratory is to develop an understanding of the PI (Proportional +
Integral) control (applied to speed control), how does it work, and how it can be tuned to
meet the required specifications.
In particular, in this experiment you will explore:

Pure proportional control action.


Pure integral control action
Proportional and integral control action

2. Preparation and Pre-Requisites


A pre-requisite to this laboratory is to have successfully completed the modelling and
model validation laboratory in Lab 1 and Lab 2.
Before the lab, you should also review the Proportional + Integral (PI) control from your
textbook.
The system can be represented by the block diagram as shown in Figure 3.1. This block
diagram illustrates the parts of the system that are relevant for the speed control.

Figure 3.1 DCMCT Block Diagram for the Speed Control

The process is represented by a block which has the motor voltage Vm and the torque Td
as the inputs and the motor speed m as the output. The torque is typically a disturbance
torque that you can apply manually to the inertial load.
Page 2 of 11

The velocity is actually computed in the PIC by filtered differences of the motor angle m
using the following relationship

where Tf is the time constant of the filter and s is the Laplace Transform operator.
The controller block represents the control algorithm in the computer and the power
amplifier. Vsd is a simulated external disturbance voltage.

Make sure that you understand this fully.


The linear behaviour of the system is described by the transfer functions given in the
block diagram. The major nonlinearities are the saturation of the motor amplifier at 15 V,
the Coulomb friction corresponding to 0.5 V, and the quantization of the encoder.
The major unmodeled dynamics is due to the effects of the sampling and filtering. The
former can be approximated by a time delay of one sampling period.

3. Introduction: The PI Controller


The PI controller is the most common control algorithm. It is used for a variety of
purposes and it often works very well. For systems with simple dynamics it can give
close to the optimal performance and for processes with complicated dynamics, it can
often give good performance provided that the specifications are not too demanding.
Better performance can, however, be obtained by using more complicated controllers.

3.1 PI Control Law


The linear behaviour of a PI controller can be described by:

where, u(t) is the control signal, r(t) the reference, and y(t) the measured process output.
Page 3 of 11

The reference r(t) is also called the set-point or the command. The linear behaviour of the
controller is governed by three parameters:

kp: proportional gain


ki: integral gain
bsp: set-point weight

Further in this experiment, we introduce a fourth parameter, aw, which governs the
nonlinear properties of the controller.
Sometimes the filtered measurement yf(t) is also used in the control loop. It is computed
from Tf, the time constant of filter for measured signal. The filter time constant Tf is
typically set to a constant value and it is often combined with the sensor. The filter
provides the roll-off at high frequencies.
It is important to reduce the effects of the sensor noise, which it improves robustness. In
this particular case, the filtering is incorporated in the calculation of the velocity from the
encoder signal.

3.2 The magic of Integral Action


A nice property of a controller with the integral action is that it always gives the correct
steady-state value provided that there is equilibrium. This can be seen simply by
assuming that there is a steady-state value with constant u(t) = uss, r(t) = rss, and y(t) = yss.
Equation [3.1] can then be written as:

Since the left-hand-side is a constant, the right-hand-side must also be a constant. This
requires that yss = rss. Notice that the only assumption, which has been made about the
process is that there exists an asymptotic steady-state value.

4. Laboratory Session
4.1 QICii Modeling Module
The main tool for this experiment is the front panel of the module entitled Speed Control
in the QICii software, which should be similar to the one shown in Figure 3.2.
Page 4 of 11

Figure 3.2 Speed Control Module of the QICii Software


As a quick module description, Table 3.1 lists and describes the main elements
composing the QICii Speed Control module user interface. Every element is uniquely
identified through an ID number and located in Figure 3.2.
The Speed Control module program runs the process in the closed-loop using the motor
reference speed given by the signal generator. There are two windows that show the time
histories of the motor speed (control output) and the motor voltage (control input).
The implemented digital controller in the QIC runs at 100Hz. Thus the sampling interval
is:
h=0.01 [s]
The actual speed is obtained by filtering the position signal using the following filter:

s m
Tf s 1

where, m is the position of the motor shaft measured by the encoder.

Page 5 of 11

ID#

Label

Parameter

Description

Unit

Speed

Motor Output Speed Numeric Display

Rad/s

Current

Im

Motor Armature Current Numeric Display

Voltage

Vm

Motor Input Voltage Numeric Display

Signal
Generator

Type of Generator For The Input Voltage Signal

Amplitude

Generated Signal Amplitude Input Box

Frequency

Generated Signal Frequency Input Box

Hz

Offset

Generated Signal Offset Input Box

Speed

m,r

Scope With Actual (in red) and Reference (in


blue) Motor Speeds

rad/s

Voltage

Vm

Scope With Applied Motor Voltage(red)

10

Kp

Kp

Controller Proportional Gain Input Box

V.S/rad

11

Ki

Ki

Controller Intergral Gain Input Box

V/rad

12

bsp

bsp

Controller Set-point Weight Input Box

13

aw

aw

Controller Windup protection Parameter Input


Box

14

Tf

Tf

Time Constant of Filter for Measured Signal

Table 3.1 QICii Modeling Module Nomenclatures

4.2 Module Startup


Power up the DCMCT: To start and use the Speed Control module, launch the QICii
software and select the Speed Control in the drop-down menu.

Page 6 of 11

To download the controller code, follow the steps described below:


1. Press the Download program button on top of the QICii window.
2. Click on the Write (F4) button of the PIC downloader popup window.
3. Push the Reset button on the QICii to actually start the download. The two LED's
stop flashing.
4. Once the download is completed, press the Reset button on the QICii one more
time. The two LED's should start flashing again.
5. Close the PIC downloader window.
Once loaded, the controller code stays on the QICii (even when the power to the DCMCT
is off).
To start the controller, press the DCMCT User Switch (i.e. pushbutton next to the two
flashing LED's). The two LED's now stop flashing. The controller starts running. Select
the Connect to data source button on top of the QICii window to be able to receive/send
data from/to the controller. LED2 should turn on.

Table 3.2: Default Parameters for the Speed Control Module


Signal
Type
Square
Wave

Amplitud Frequency
e [Rad/s]
[HZ]
50.0

0.4

Offset
[V]

Kp
Ki
[V.S/Rad] [V/rad]

100.0

0.0

1.0

b sp

aw

0.0

0.0

4.3 Qualitative Properties of the Proportional and Integral Control


The goal of the following procedures is to develop an intuitive feel for the properties of
the proportional and integral control.

1. Pure Proportional Control


Start by exploring the properties of the pure proportional control. Please follow the steps
below:

Page 7 of 11

[s]

Tf

0.01

Step 1:
Set the reference signal to a square wave. Reasonable amplitude is 50 rad/s. When you
change the reference signal level ensure that the control signal does not reach saturation.
It may be useful to adjust the Offset of the signal generator so that the sign of the velocity
does not change. In this way you will avoid the effects of the Coulomb friction.
What is saturation?
Saturation is a nonlinear response and it also determines the physical control limit of
a system (e.g. how high the voltage you can supply to the motor until it stops
increasing the speed, as depicted in Fig. 4.1 below). When you sweep the control
signal from low to high level, the motor speed may behave nonlinearly when it
approaches its physical limits (upper and lower bounds). Saturation can limit the
controllable range of a system. Hence, it is important to know the saturation
characteristic of a system before a controller can be constructed. The effect of
saturation can be seen on a time-domain plot where a portion of the plot is chopped
off horizontally when the system is reaching its upper or lower limit. If such scenario
happens, you should lower the value of the control signal so to eliminate the effect of
saturation.

Fig. 4.1 Effect of saturation (circled in blue)

Page 8 of 11

Set the integral gain to zero. Set the proportional gain to 0.02 V.s/rad to start with. Ensure
that the following parameters of the Speed Control window, as displayed in Table 3.3, are
set properly.

Signal
Type

Amplitude
[rad/s]

Frequency
[Hz]

Offset
[rad/s]

ki
[V/rad]

kp
[V.s/rad]

bsp

Square
Wave

50

0.4

100

0.02

Table 3.3 Module Parameters for Pure Proportional Control

Step 2:
Change the proportional gain by incremental steps of 0.04 V.s/rad to investigate the
closed-loop system for the proportional controllers (ki = 0) with different gains.
What are your observations?

Step 3:
Determine the critical gain, kpc, where the system becomes critically stable and a
stable oscillation is achieved. Also determine the critical period Tpc of the
corresponding oscillations.

Step 4:
Describe the steady-state error to a step input.

Step 5:
Repeat the previous observations. Change the Amplitude of the reference signal and
observe under what conditions the control signal saturates.

Step 6:
Summarize your observations in your report. Select some representative results,
screen captures, and plots.

Page 9 of 11

2. Pure Integral Control


In this procedure we will explore the pure integral control. Please follow the steps below:

Step 1:
Set the proportional gain to zero. Set the integral gain to 0.02 V/rad to start with.
Ensure that the parameters of the QICii module window, as listed in Table 3.4, are set
properly.

Signal
Type

Amplitude
[rad/s]

Frequency
[Hz]

Offset
[rad/s]

kp
[V.s/rad]

ki
[V/rad]

aw

Square
Wave

50

0.4

100

0.02

Table 3.4: Module Parameters for Pure Integral Control


Step 2:
Change the integral gain by incremental steps of 0.5 V/rad to investigate the closedloop system for the integral controllers (kp = 0) with different gains.
What are your observations?

Step 3:
Determine the critical gain, kic where the system becomes critically stable and a
stable oscillation is sustained.
Also determine the critical period Tic of the corresponding oscillations.

Step 4:
Determine a value of the integral gain, which gives a set-point response without the
overshoot. Determine the settling time for the closed loop system.

Step 5:
Repeat the previous observations. Change the Amplitude of the reference signal and
observe under what conditions the control signal saturates?

Page 10 of 11

Step 6:
Summarize your observations in your report. Select some representative results,
screen captures, and plots.

3. Proportional and Integral Control


The combination of the proportional and integral control action will now be explored.
Please follow the steps below.

Step 1:
Set the parameters of the QICii module window as listed in Table 3.5.
Signal
Type

Amplitude
[rad/s]

Frequency
[Hz]

Offset
[rad/s]

bsp

aw

Square
Wave

50

0.4

100

Table 3.5 Module Parameters for Proportional and Integral Control


Step 2:
Set the proportional gain to a constant value, like kp = 0.1 V.s/rad, and change the
integral gain. Observe the tracking error and the control signal.

Step 3:
Set the integral gain to a constant value, like ki = 0.5 V.s/rad, and change the
proportional gain. Observe the tracking error and the control signal.

Step 4:
Summarize your observations in your report. Select some representative results,
screen captures, and plots.

Page 11 of 11

FACULTY OF ENGINEERING AND APPLIED SCIENCE

Lab 4: Speed Control

Page 1 of 11

1. Laboratory Objective:
The objective of this laboratory experiment is:
to develop an understanding of the Proportional plus Integral (PI) control (applied
to speed control),
as how the system works, and
as how it can be tuned in order to meet the required specifications.
In particular you will explore in this experiment the followings:

Ziegler-Nichols method
Set-point Weighting
Response to load disturbance

2. Preparation and Pre-Requisites:


A pre-requisite to this laboratory is to have successfully completed the modelling and the
PI control in the previous Lab 3.
Before you start the experiment, you should also review the Proportional-plus-Integral
(PI) controller action from your lecture notes and textbook.
The system can be represented by the block diagram shown in Figure 4.1. This block
diagram illustrates the parts of the system that are relevant for speed control.

Figure 4.1: DCMCT Block Diagram for the Speed Control


The process is represented by a block which has the motor voltage Vm and the torque Td
as the inputs and the motor speed m as the output. The torque is typically a disturbance
torque that you will apply manually to the inertial load.
Page 2 of 11

The velocity is actually computed in the PIC by filtered the differences of the motor
angle m using the following relationship:

where Tf is the filters time constant and s is the Laplace transform operator.
The controller block represents the control algorithm in the computer and the power
amplifier. Vsd is a simulated external disturbance voltage.
Make sure that you understand this fully.
The linear behaviour of the system is described by the transfer functions given in the
block diagram. The major nonlinearities are the saturation of the motor amplifier at 15 V,
the Coulomb friction corresponding to 0.5 V, and the quantization of the encoder.
The major un-modeled dynamics is due to the effects of the sampling and filtering. The
former can be approximated by a time delay of one sampling period.

3. Introduction
3.1 The Ziegler-Nichols Method
A good way to find the ball park values of the controller parameters is to look at pure
proportional and integral controllers and to determine the gains where the system become
critically stable (a.k.a., a stable). The Ziegler-Nichols frequency response method is a
classical tuning rule based on this idea. A proportional controller is adjusted so that the
system reaches the stability limit. The critical gain kpc where this occurs is observed
together with the period of oscillation Tpc.
In the early 1940s J.G. Ziegler and N.B. Nichols experimentally developed the PID
tuning methods based on the closed-loop tests. However the Ziegler-Nichols method
suffers from one major drawback.
That is the physical system has to tolerate to be brought into a critically stable state
without catastrophic consequences. For example, the sustained oscillation is generally out
of the question for most industrial processes.
The Ziegler-Nichols closed-loop method recommends the following PI controller gain
tuning:

Page 3 of 11

3.2 Simulated Load Disturbance: Disturbance Response with PI Control


A disturbance torque can be simulated by applying an additional voltage, Vsd, to the
motor input. The DCMCT system uses this as a way to simulate a load disturbance in a
repeatable manner, as illustrated in Figure 4.2.
You can do this by depressing the User Switch on the DCMCT.

Figure 4.2: DCMCT Regulation Block Diagram with Simulated Load Disturbance

4. Laboratory Session
4.1 QICii Modeling Module
The main tool for this lab is the front panel of the module entitled Speed Control in the
QICii software, which should be similar to the one shown in Figure 4.3.

Page 4 of 11

Figure 4.3: Speed Control Module of the QICii Software


As a quick module description, Table 4.1 lists and describes the main elements
composing the QICii Speed Control module user interface. Every element is uniquely
identified through an ID number and located in Figure 4.3.
The Speed Control module program runs the process in the closed-loop using the motor
reference speed given by the signal generator. There are two windows that show the time
histories of motor speed (control output) and the motor voltage (control input).
The implemented digital controller in the QIC runs at 100Hz. Thus the sampling interval
is:
h = 0.01 [s]
The actual speed is obtained by filtering the position signal using the following filter:

s m
Tf s 1

where m is the position of the motor shaft, measured by the encoder.


Page 5 of 11

Table 4.1 QICii Modeling Module Nomenclatures


ID#

Label

Parameter

Description

Unit

Speed

Motor Output Speed Numeric Display

Rad/s

Current

Im

Motor Armature Current Numeric Display

Voltage

Vm

Motor Input Voltage Numeric Display

Signal
Generator

Type of Generator For The Input Voltage Signal

Amplitude

Generated Signal Amplitude Input Box

Frequency

Generated Signal Frequency Input Box

Hz

Offset

Generated Signal Offset Input Box

Speed

m,r

Scope With Actual (in red) and Reference (in


blue) Motor Speeds

rad/s

Voltage

Vm

Scope With Applied Motor Voltage(red)

10

Kp

Kp

Controller Proportional Gain Input Box

V.S/rad

11

Ki

Ki

Controller Intergral Gain Input Box

V/rad

12

bsp

bsp

Controller Set-point Weight Input Box

13

aw

aw

Controller Windup protection Parameter Input


Box

14

Tf

Tf

Time Constant of Filter for Measured Signal

4.2 Module Startup


Power up the DCMCT: To start and use the Speed Control module, launch the QICii
software and select Speed Control in the drop-down menu.
To download the controller code, follow the steps described below:
1. Press the Download program button on top of the QICii window.
2. Click on the Write (F4) button of the PIC downloader popup window.
3. Push the Reset button on the QICii to actually start the download. The two LED's
stop flashing.
Page 6 of 11

4. Once the download is complete, press the Reset button on the QICii one more
time. The two LED's should start flashing again.
5. Close the PIC downloader window.
Once loaded, the controller code stays on the QICii (even when the power to the DCMCT
is off).
To start the controller, press the DCMCT User Switch (i.e. the pushbutton next to the two
flashing LED's). The two LED's will stop flashing. The controller starts running. Select
the Connect to data source button on top of the QICii window to be able to receive/send
data from/to the controller. The LED2 should turn on.
Table 4.2: Default Parameters for the Speed Control Module
Signal Amplitud Frequency
Type e [Rad/s]
[HZ]
Square
Wave

50.0

Offset
Kp
Ki
b sp
[V]
[V.S/Rad] [V/rad]

0.4

100.0

0.0

1.0

0.0

aw

Tf
[s]

0.0

0.01

4.3 Manual Tuning: Ziegler-Nichols


In Lab 3, we have obtained a good feel for the properties of the Proportional and the
Integral control. This knowledge will now be used to develop manual tuning procedures.
Manual tuning procedures are generally used when no mathematical model of the system
is available to perform control system design. Typically in the manual control, we first set
the integral gain to zero and increase the proportional gain until the system reaches the
stability boundary. At this point a critically stable condition (i.e. a stable output
oscillation) is achieved and the critical gain kpc, where this occurs and the frequency of
the oscillation Tpc are determined. Similarly, applying the same technique to pure integral
control gives kic and Tic. The values of kpc and kic give the ranges for the proportional
gain and integral gain respectively. Suitable values can then be determined empirically or
by the traditional tuning rules.

Please carry on with the following process:


Step 1: Set the parameters of the QICii module window as following table.
Signal
Type

Amplitude
[rad/s]

Frequency
[Hz]

Offset
[rad/s]

bsp

aw

Square
Wave

50

0.4

100

Page 7 of 11

Set both the proportional and the integral gains to the recommended values by the
Ziegler-Nichols method as
Kp = 0.4 Kpc

and

Ti = 0.8 Tpc then

Ki = Kp / Ti

or

Ki = 0.5Kpc / Tpc

1. What is the resulting 2 % settling time?


2. What are your observations?
Step 2: Adjust the proportional and the integral gains manually to give a very slightly
under-damped set-point response with no saturation.
Step 3: Summarize your observations and your calculations in your report. Select some
representative results, screen captures, and plots.

4.4 Set-Point Weighting


We have only investigated the effects of the proportional gain kp and the integral gain ki.
The PI controller does however, have more parameters to examine. In this Section we
will explore the effects of the set-point weight for the proportional gain bsp. This
parameter, which ranges from 0 to 1, was set to bsp = 1 in the earlier experimental
procedures.
You will observe that the set-point weight has a significant effect on the response to
command signals. However as expressed by Equation [3.1] in Lab 3, it only affects the
reference signal input but does not influence the response to load disturbances.

where u(t) is the control signal and r(t) is the reference or set-point (defined by the
amplitude, offset and frequency settings).

Experimental Process:
Step 1
Set the values of kp = 0.23 V.s/rad and ki = 2.3 V/rad. Choose a Square Wave signal from
the QICii signal generator.
Investigate the effects of the set-point weight on the step response and the control signal
by initially setting the value of bsp to 0 then gradually increase the value with an
Page 8 of 11

increment of 0.20 until the value reaches unity. Capture the graph each time when you
increase the value.
Step 2
Make some analysis that explains your observations based on the equation [3.1].
Step 3
In your report document your results and your analysis and illustrate with typical
responses.

4.5 Response to the Load Disturbance


In this session the students will carry out an experimental investigation into the system
response to the applied load disturbances.

4.5.1

Manual Load Disturbance

A load disturbance can be introduced by manually applying a torque to the inertial load.

Please follow the steps below:


Step 1
The regulation problem, at r = 100 rad/s, is investigated. Set the QICii module parameters
as given in the following table.

Amplitude [rad/s]

Offset [rad/s]

aw

100

Step 2
Choose a pure proportional controller (i.e., ki = 0) with the given value of the gain being
kp = 0.10 V.s/rad, and bsp = 1.0.
Page 9 of 11

Step 3
Apply a torque manually by gently touching the inertial load with your finger. Observe
closely as what happens when you change the proportional gain of the controller (e.g.
gradually increase the value of kp with an increment of 0.10 Vs/rad until kpc is reached).
Step 4
Investigate a controller with the pure integral action. To do so, set the proportional gain
to zero (kp = 0) and the initial value of the integral gain to unity (ki = 1.0 V/rad). Now
apply a disturbance torque manually and observe what happens when you increase the
integral gain of the controller gradually with an increment of 0.50 V/rad until kic is
reached.

4.5.2 Simulated Load Disturbances: Disturbance Response With PI Control


A disturbance torque can be simulated by applying an additional voltage, Vsd, to the
motor input (i.e. control signal disturbance).

Experimental Process
Step 1
The regulation problem at zero velocity (i.e., r = 0 rad/s) should be investigated.
Set the QICii module parameters as given in the following table.

Amplitude [rad/s]

Offset [rad/s]

aw

Step 2
Emulate a load disturbance torque by pressing down and holding or releasing the User
Switch.
Page 10 of 11

Step 3
Investigate the behaviour of the closed-loop system for the pure proportional controllers
(i.e., ki = 0 and bsp = 1) with different values of the gain. You can start off with kp = 0.10
Vs/rad and step up the value with an increment of 0.10 Vs/rad until kpc is reached.
1. Summarize your observations in your report.
2. Determine the steady-state error ss_P.
3. Select some representative results, screen captures, and plots.
Step 4
Investigate the behaviour of the closed-loop system for the pure integrating controllers
(i.e., kp = 0 and aw = 0) with different values of the gain. You can start off with ki = 1.0
V/rad and step up the value with an increment of 0.50 V/rad until kic is reached.
Summarize your observations in your report. Select some representative results, screen
captures, and plots.
Step 5
Can you estimate from your experiment as how much voltage disturbance, Vsd, is applied
when you press the DCMCT User Switch? Please explain in detail as how you have
arrived at this.

Page 11 of 11

University of Ontario Institute of Technology

Lab 5: Position Control

PD, PI and PID Controllers

Page 1 of 12

1. Laboratory Objectives:
The objective of this laboratory experiment is to develop an understanding of PID control of
motor rotational angle, how it works, and how it can be tuned to meet the required
specifications.
In particular you will explore the followings:

Qualitative properties of the proportional, derivative, and the integral actions

Comparisons with the PI control of motor speed

2. Preparation and the Pre-requisite:


A pre-requisite to this laboratory is to have successfully completed the modelling experiment
and the model validation experiment described in Laboratories 1 and 2, respectively. Before
the start of this lab experiment, you should also review the topic of the Proportional-plusIntegral (PI) control of motor speed, as you have performed in Laboratories 3 and 4.
For the purpose of the position control, the system can be represented by the block diagram as
shown in Figure 5.1. This block diagram illustrates the parts of the system that are relevant for
the position control.

Figure 5.1 DCMCT Block Diagram for the Position Control

The process is represented by a block, which has the motor voltage Vm and the torque Td as
the load disturbance and the motor rotational angle m as the output. The torque disturbance Td
is typically a torque that you could apply manually to the inertial load (e.g. using your finger
to apply a retarding force to the flywheel momentarily, as seen in Lab 4). The PID controller
block represents the control algorithm in the computer and the power amplifier unit. The
control signal disturbance Vsd is a simulated external disturbance voltage.
Page 2 of 12

The linear behaviour of the system is described by the transfer functions given in the block
diagram. The major sources of nonlinearities are the saturation of the motor amplifier at 15 V,
the Coulomb friction corresponding to 0.4 V (i.e., the minimum voltage required to start-up
the motor from stationary), and the quantization of the encoder which, causes a time delay of
1 sampling period (i.e., due to a combination of the encoder resolution of 4096 counts per
revolution and the sampling rate of the encoder being set at h = 100 Hz).

3. Introduction : PID controller


The PID controller is a classical control algorithm. It is used for a variety of purposes and it
often works very well. For systems with simple dynamics it can give close to optimal
performance and for processes with complicated dynamics, it can often give good
performance provided that specifications are not too demanding. Better performance can,
however, be obtained by using more complicated controllers.
3.1 The PID Control Law
The linear behaviour of a PID controller can be described by the following equation:

where, u(t) is the control signal, r(t) being the reference signal and y(t) is the measured
process output. The reference signal r(t) is also called the set-point or the command signal.
The linear behavior of the PID controller is governed by the following parameters:

kp : proportional gain

ki : integral gain

kd : derivative gain

bsp : proportional set-point weight

bsd : derivative set-point weight

Tf : time constant of the filter for the measured signal

Page 3 of 12

Sometimes the filtered measurement yf(t) is also used in the control loop. It is computed from
Tf, the time constant of the filter for the measured signal. The filter time constant Tf is
typically set to a constant value and it is often combined with the sensor. The filter provides
the roll-off at high frequencies. It is important to reduce the effects of the sensor noise as it
improves the system robustness.
The PID controller is similar to the PI controller and the additional derivative term provides
added flexibility. In particular, it improves the possibilities of introducing the damping effect
because it is an approximate prediction of future measurements.

3.2 The Magic of Integral Action


An interesting property of a controller with an integral action is that it always gives the
correct steady-state value provided that there is equilibrium. This can be seen simply by
assuming that there is a steady-state value with the constant values of u(t) = uss, r(t) = rss, and
also y(t) = yss.
Equation [5.1] can now be written as:

Since the left-hand-side is a constant, then the right-hand-side must also be a constant. This
requires that yss = rss. Notice that the only assumption that has been made about the process
is that there should be an asymptotic steady-state condition.
The load disturbance response of a PID controller has an interesting property, which can be
seen as follows:

where, e is the control error, as defined:

Page 4 of 12

e (t ) r (t ) y (t )
One can assume that the PID controller is connected to a process and also the closedloop
system remains stable. Apply a load disturbance in the form of a step function to the system.
There will be a transient response and the error will then approaches to zero because the
system is stable. The above equation implies that:

The value of u() is the steady-state control signal required to eliminate the load disturbance.
We can conclude from Equation [5.2] that the integral of the error signal due to a load
disturbance is inversely proportional to the integral gain of the controller.

3.3 Controls with TwoDegreeofFreedom


A PID controller with the set-point weights bsp = 1 and bsd = 1 is a controller with the error
feedback because the control actions are based on the error e = r y. A controller where, one
of the setpoint weights is different from one is said to have twodegreesoffreedom
because the signal transmission from the reference r to the control u is different than from the
signal transmission from the measurement y to the control u.
A controller with twodegreesoffreedom has two inputs and one output, as shown in the
block diagram of Figure 5.1.
The set-point weights have no effect on the load disturbance response or on the system
dynamics but they can influence the response to command signals significantly. Both the setpoint weights range from 0 to 1.

4. Laboratory Content
4.1 The QICii Position Control Module
4.1.1 Module Description
Page 5 of 12

The main tool for this laboratory experiment is the front panel of the module entitled Position
Control in the QICii software, which should be similar to the one shown in Figure 5.2.

Figure 5.2: The Position Control Module of the QICii Software

As a quick module description, Table 5.1 lists and describes the main elements composing the
QICii Position Control module user interface.
Every element is uniquely identified through an ID number and located in Figure 5.2.
The Position Control module program runs the process in the closedloop with the motor
reference position angle given by the signal generator. There are two windows that show the
time histories of the motor position (i.e., the control output) and the motor voltage (i.e., the
control input).

Page 6 of 12

Table 5.1: System Modelling Nomenclature

ID # Label

Parameter

Description

Unit

Position

Motor Output Position Numeric Display

rad

Current

Im

Motor Armature Current Numeric Display

Voltage

Vm

Motor Input Voltage Numeric Display

Signal
Generator

Type of Generator For The Angle Reference


Signal: Sawtooth Wave or Square Wave

Amplitude

Generated Signal Amplitude Input Box

rad

Frequency

Generated Signal Frequency Input Box

Hz

Offset

Generated Signal Offset Input Box

rad

Position

Scope With Actual (in red) and the Reference rad


(in blue) Angles

Voltage

Vm

Scope With Applied Motor Voltage (in red)

10

kp

kp

Controller Proportional Gain Input Box

V/rad

11

kd

kd

Controller Derivative Gain Input Box

V.s/rad

12

ki

ki

Controller Integral Gain Input Box

V/(rad.s)

13

bsp

bsp

Controller Proportional Set-Point Weight Input


Box

14

bsd

bsd

Controller Derivative Set-Point Weight Input Box

15

Tf

Tf

Time Constant of Filter for Measured Signal

The implemented digital controller in the QIC runs at 100 Hz, and therefore, the sampling
interval is:

Page 7 of 12

The motor position is measured by an encoder generating 4096 counts per revolution. The
position time derivative (speed) is obtained by filtering the position signal using the following
filter:

where, m is the position of the motor shaft measured by the encoder.

4.1.2 Module Startup


First, power up the DCMCT unit and in order to start the experiment use the Position Control
module, launch the QICii software and then select Position Control in the dropdown menu.
To download the controller code, follow the steps described below:
1. Press the Download program button on the top of the QICii window.
2. Click on the Write (F4) button of the PIC downloader popup window.
3. Push the Reset button on the QIC to actually start the download.
The two LED's will stop flashing.
4. Once the download is completed, press the Reset button on the QIC one more time.
The two LED's should now start flashing again.
5. Close the PIC downloader window.
Once it is loaded, the controller code stays on the QIC (even when the power to the DCMCT
is off).
To start the controller, press the DCMCT User Switch (i.e. the pushbutton next to the two
flashing LED's). The two LED's will stop flashing. The controller now starts running. Select
the Connect to data source button on the top of the QICii window in order to be able to
receive/send data from/to the controller. LED 2 should turn on.

The default module parameters, loaded after the download, are given in Table 5.2.

Page 8 of 12

Table 5.2: Default Parameters for the Position Control Module


Signal Type

Amplitude
[rad]

Frequency
[Hz]

Offset
[rad]

kp
[V/rad]

kd
[V.s/rad]

ki
[V/(rad.s)]

Square Wave

1.0

0.4

0.0

3.0

0.05

0.0

bsp

bsd

Tf [s]

1.0

0.0

0.006

4.2 Qualitative Properties of the Proportional and Derivative Control


The goal of the following experiments is to develop an intuitive feel for the properties of the
proportional and the derivative control actions.

4.2.1 Pure Proportional (P) Control


Start by exploring the properties of the pure proportional control. Please follow the steps
indicated below:
1. Set the reference signal to a square wave. Reasonable amplitude is 3 rad. When you
changed the reference signal level ensure that the control signal does not saturate.
Set both the integral and the derivative gains to zero (ki = kd = 0).
To start with the proportional gain is set to 0.1 V/rad, ensure that the following
parameters of the Position Control window, as displayed in Table 5.3, are set properly.
Table 5.3: Module Parameters for the Pure Proportional Control Test

Signal Type

Amplitud
e
[rad]

Frequency
[Hz]

Offset
[rad]

kp
[V/rad]

bsp

Square Wave

0.4

0.1

2. To investigate the closedloop system for the proportional controllers, with different
gains, change the proportional gain to the following values: kp = 1, 2, and 4 V/rad.
What are your observations? Explain in detail.
3. Describe the steadystate error in response to a step function input for the above kp
values.

Page 9 of 12

4. In Step 2, under what conditions the control signal will saturate (e.g., at what voltage
limit)? What should you do to keep the control signal away from saturation?
5. Set the Amplitude to 0 rad and Offset to 0 rad too; apply a torque (load disturbance)
on the inertial load by gently touching and rotating the flywheel with your finger.
Observe the effect on the position. What do you feel when you turn the flywheel and
then what does the motor do after you let go of the flywheel?
6. Now simulate a control signal disturbance Vsd by pressing the User Switch of the
module. You should press the switch down and hold it until steady state is reached,
then release the switch. Observe the effect on the position.
7. Summarize your detailed observations in your Lab report. Select some representative
results, screen captures, and plots and include them in your report.

4.2.2 Proportional and Derivative (PD) Control Actions


The combination of the proportional and derivative control actions will now be explored.
Please follow the steps given below:
1. Set the proportional gain to 2.0 V/rad and fix the derivative gain to 0.0 V.s/rad to start
the test. Set the parameters of the QICii module window as listed in Table 5.4.
Set the integral controller action gain to zero (i.e., ki = 0).

Table 5.4: Module Parameters for the ProportionalplusDerivative Control Test

Signal Type

Amplitude
[rad]

Frequency
[Hz]

Offset
[rad]

kp
kd
bsp
[V/rad] [V.s/rad]

bsd

Square Wave

0.4

2.0

Change the derivative gain with the following values to investigate the closedloop
system for the PD controllers with different derivative gains:
2. Try again but with the values of gains: kd = 0, 0.05, 0.1, 0.15 and 0.2 V.s/rad.
What are your observations? Explain in detail.

Page 10 of 12

3. Determine a value of the derivative gain, which gives a setpoint response without any
overshoot. Determine the settling time and the steady-state error for the closedloop
system.

4. Now set the Amplitude to 0 rad, Offset to 2 rad, and change the derivative gain with
the following values: kd = 0, 0.05, 0.1, 0.15 and 0.2 V.s/rad. Then, apply a torque on
the inertial load by gently touching and rotating the flywheel with your finger.
Observe the effect on the position. What do you feel when you turn the flywheel and
then what does the motor do after you let go of the flywheel?

5. Simulate a control signal disturbance Vsd by pressing the User Switch of the module.
You should press the switch down and hold it until steady state is reached, then release
the switch. Observe the effect on the position. Compare the system response of this
PD control with that of the pure proportional (P) control in the previous section?

6. Summarize your overall observations in your Lab report. Select some representative
results, screen captures, and plots and include them in your report.

4.2.3 Proportional and Integral (PI) Control Actions


1. Repeat Section 4.2.2 with module parameters being configured to the values depicted
in Table 5.4. Change the integral gain with the following values: ki = 0, 1, 2, 5 and
10 V/rad.s. Observe the system response as you change the integral gain.
2. Now set the Amplitude to 0 rad, Offset to 2 rad and then change the integral gain
value in according to the values in Step 1. Then, apply a torque on the inertial load by
gently touching and rotating the flywheel with your finger. Observe the effect on the
position. What do you feel when you turn the flywheel and then what does the motor
do after you let go of the flywheel? How does this PI control differ from the PD
control in the previous section?
3. Simulate a control signal disturbance Vsd by pressing the User Switch of the module.
You should press the switch down and hold it until steady state is reached, then release
the switch. Observe the effect on the position. How does this PI control differ from the
PD control in the previous section?
4. Look up your Lab Report from the PI control of the motor speed described in Lab
experiments 3 and 4, and compare the process outputs and the control signals for the
speed and position controls in response to a reference input.

Page 11 of 12

4.2.4 Proportional, Integral and Derivative (PID) Control Actions


The combination of the proportional, integral and derivative control actions will now be
explored.
Please follow the steps given below:
1. Set the proportional gain to 2.0 V/rad and the derivative gain to the value you have
determined in Step 3 of Section 4.2.2 (zero overshoot scenario) to start the test. Set the
parameters of the QICii module window as listed in Table 5.4.
2. Manually tune the integral gain ki such that the steady-state error reaches zero. What
are the parameter values of your PID controller?
3. Now vary the Amplitude of the set point with the following values: 0.5, 1.0, 2.0, 4.0,
and 5.0 rad. Observe what happen to the system response such as steady-state error,
overshoot, settling timeetc. as you change the amplitude of the set point. Do you see
any changes in the system response? At what set point amplitude the control signal
starts to saturate (i.e. this will determine the controllability of the motor system
subjected to your PID parameter values)?
4. What conclusion can do draw from this experiment? In your own words, describe the
roles and significances of kp, ki, and kd in both speed and position controls.

Page 12 of 12

S-ar putea să vă placă și