Académique Documents
Professionnel Documents
Culture Documents
response
verification.
Theoretical and experimental magnitude
and phase response plotted together. Shows
close fit, low frequency gain and
0
.
Theoretical step response plotted showing
both theoretical and experimental steady-
state value and time constant.
/4 SUBTOTAL
Project Letter
Signals and Systems Autumn 2012
Group Project Digital Controller
Mark Grade Item Comments
/1 G A P Desired poles. Specification regions defined and drawn in
the s-plane.
/1 G A P State-variables. Designed using matrix algebra, and then
confirmed using block diagram reduction.
/1 G A P Root-locus. Screen shot of MATLAB
with RLTOOL.
Investigation of 10% variation of MR pole
location.
/1 G A P Minor-loop. Design by block diagram reduction.
/1 G A P MATLAB
continuous-
time step response
simulation.
Continuous-time step response for all three
schemes, showing actual peak time, P.O.
and settling time.
/1 G A P MATLAB
discrete-
time step response
simulation.
Discrete-time step response for all three
schemes, showing actual peak time, P.O.
and settling time. Effect of coefficient
round-off and bilinear transformation.
/2 G A P Lab verification. A plot of experimental results, for each
scheme, verifying that they meet the control
specifications, and lab mark attached.
/8 SUBTOTAL
Group Project Demodulator Design
Mark Grade Item Comments
/1 G A P VCO characteristic.
Graph of vs. DC input voltage. Values
for and determined.
i
f
k
o
f
v
/1 G A P Phase detector filter
design.
Design of filter based on criterion.
/1 G A P Loop filter design.
Design of filter based on criterion.
Design of phase-shifter.
/1 G A P Modulated spectra.
Identification of modulation scheme and
based on experimental results (magnitude
spectra and time-domain waveforms).
c
f
/1 G A P Demodulator design.
Theoretical design of demodulator, showing
spectra at each point. Includes all
frequencies, phases, gains and cutoff
frequencies.
/1 G A P Demodulator filter
design.
Design of comb-resonator filter.
MATLAB
simulation of demodulator.
/2 G A P Lab verification.
A plot of experimental results when
transmitting both messages, verifying that
the demodulation scheme works, and lab
mark attached.
/8 SUBTOTAL
Signals and Systems Autumn 2012
Signals and Systems Autumn 2012
Control.1
Group Project Digital Controller
Maze rover control system. Specifications.
Introduction
The MR uses a control system to respond to position commands received from
its communication system. You will be designing elements of both systems.
They are implemented in the C of the MR, so they are inherently discrete-
time systems. This document outlines the control system specifications. The
communication system is specified in a separate document.
Control System Overview
The control scheme is used to achieve a desired position. The MR has internal
position sensing, so a feedback control system can be easily designed based on
a reference position input:
Maze Rover
general control
scheme
R s ( ) E s ( )
controller
C s ( )
F s ( )
maze rover
G s ( )
s
1
V s ( )
M s ( )
H s ( )
controller
Figure 1 - General Control Scheme
Notice how the position is obtained from the velocity by an integrator and that
a continuous-time model of the system has been used, when in fact most of the
system is discrete-time. It will be easier to design the controllers using
continuous-time techniques and then discretize them, rather than designing
directly in the z-domain.
In Lab 6 you should find a continuous-time model for the open-loop MR
(a transfer function) in terms of the input force s F
s
and the output
velocity V .
Signals and Systems Autumn 2012
Control.2
You now have to design the controller to meet certain time-domain
performance specifications.
Specifications
All MRs must meet the following specifications:
The sample period is 4 ms.
Individual MRs must meet the following specifications for a unit step. A
unit step for the MR will physically mean a -2 V to +2 V step.
Group Project 5% Settling Time
(ms)
Peak Time
(ms)
Percent
Overshoot
(%)
A 200 230 2.5
B 290 210 3.0
C 315 245 3.5
D 355 275 4.0
E 290 250 4.5
F 310 295 5.0
G 220 235 5.5
H 210 230 6.0
I 230 300 5.5
J 230 250 5.0
K 315 335 4.5
L 310 230 4.0
Note: Lab 6 measured velocity in terms of distance per sample period. We
need the velocity in terms of distance per second. You therefore need to
multiply the transfer function of the MR obtained in Lab 6 by a scaling factor
to correct for this.
Signals and Systems Autumn 2012
Control.3
Control Schemes
The following three control schemes are being trialled. You will need to design
controller coefficients for each of them.
R s ( )
C s ( )
F s ( )
maze rover
s
1
V s ( )
M s ( )
K
1
K
2
K
0
Q s ( )
1
Q s ( )
2
Figure 2 - Scheme 1 Linear State-Variable Feedback
C s ( )
F s ( )
maze rover
s
1
V s ( )
M s ( )
R s ( )
K
3
( ) s+z
c
( ) s+p
c
Figure 3 - Scheme 2 Phase-Lead Compensator using Root Locus
R s ( )
C s ( )
F s ( )
maze rover
s
1
V s ( )
M s ( ) K
4
K
5
Figure 4 - Scheme 3 Minor-Loop Feedback
Each control scheme will need to be put into the form shown in Figure 1 so
that coefficients can be entered into the MR.
Signals and Systems Autumn 2012
Control.4
Modelling
All control schemes should be modelled in MATLAB
in discrete-time. Use
the bilinear transformation to individually discretize the continuous time blocks
shown in the figures above. Perform the discretization by hand or use the
MATLAB
z a
z b b
z G
d
1
1
1
1 0
1
z c
z d d
z H
d
Setting the controller coefficients
To set the coefficients, follow the steps given below:
It is important to
use the parallel
mode of the dual
power supply
because the Maze
Rover motors
draw large
transient currents
1. Power up the MR with the dual power supply in parallel mode.
2. Connect the MR to the PC via the USB cable.
3. Run the Maze Rover I nt er f ace Windows program. It is
available from:
http://services.eng.uts.edu.au/pmcl/ss/Downloads/MRInterface.exe
4. To change the controller coefficients, click on the controller buttons. A
dialog box will prompt for the controller coefficients.
5. All coefficients need to be normalised to 256. That is, before entering
coefficients, multiply them by 256 and round the result. This is because
the MR has a fixed point processor, so its internal maths uses implied
binary points.
Signals and Systems Autumn 2012
Control.5
Signals and Systems Autumn 2012
Report
Only submit ONE report per project group.
A HAND WRITTEN report with the following sections must be completed:
Controller Design
1. Calculation of the desired pole locations.
2. State-variables. You should perform the design using matrix algebra, and
then confirm your design using block diagram reduction. You will have to
rearrange your state-feedback to suit the implementation requirements.
3. Root-Locus. You should design the controller gain and pole/zero locations
by trial and error in MATLAB
Simulation
5. A continuous-time simulation of the step-responses of the proposed
schemes using MATLAB
Verification
4. Provide a MATLAB
t
u
t u
For example, if 8 = m , then
4
t
u
n
= . A plot of the zeros in the z-plane is then:
z -plane
unit-circle
t /4
Signals and Systems Autumn 2012
Comms.10
Unit-Pulse Response
Taking the inverse z-transform of the transfer function, we get the unit-pulse
response:
| | | | | | m n n n h = o o
which looks like:
n
1
-1
h n [ ]
m
0
Frequency Response
The frequency response is obtained by setting in the
transfer function. A graph of the magnitude response for looks like:
O
= = =
j T j sT
e e e z
s s
e
8 = m
0 /4 t /2 t 3 /4 t t
H( ) O | |
A
O
Difference Equation
Finally, the difference equation for the comb is given by:
| | | | | | m n x n x n y =
Signals and Systems Autumn 2012
Comms.11
Linear Phase Comb
Another type of comb is described by:
( )
m
z z H
+ =1
It has the desirable property of having a linear phase, which means it is a
distortionless filter each sinusoid experiences a constant delay through the
filter, thus preserving wave shape.
For example, if 8 = m , then a plot of the zeros in the z-plane is:
z -plane
t /8
t /4
unit-circle
Unit-Pulse Response
| | | | | | m n n n h + = o o
Frequency Response
The frequency response, for , looks like: 8 = m
0 /8 t 3 /8 t
H( ) O | |
A
O
5 /8 t 7 /8 t
Difference Equation
| | | | | | m n x n x n y + =
The MRs have a linear phase comb filter with 250 = m .
Signals and Systems Autumn 2012
Comms.12
Resonator
A discrete-time resonator produces a sinusoid when hit with a unit-pulse. Its
transfer function is:
( )
( )( )
r r
j j
r
R
re z re z
z
r z r z
z
z H
O O
=
+ O
=
2
2 2
2
cos 2
A plot of its poles is:
z -plane
r
O
r
Unit-Pulse Response
n
1
-1
h n [ ]
Frequency Response
0
H( ) O | |
O
O
r
Difference Equation
| | | | | | |n x n y r n y r n y
r
+ O = 2 1 cos 2
2
|
We normally take 1 99999 . 0 ~ = r to keep the system stable.
Signals and Systems Autumn 2012
Comms.13
Comb-Resonator Combination
The idea behind cascading the comb and resonator is for the resonators pole
pair to approximately cancel out one pair of the combs zeros. For example:
t /8
t /4
t /8
t 3 /8
The resulting frequency response, in this case, makes a bandpass filter:
0 /8 t 3 /8 t
H( ) O | |
O
5 /8 t 7 /8 t
Signals and Systems Autumn 2012
Comms.14
Demodulator Implementation
The MR needs to be controlled from a PC. Follow the steps below to control
the functionality of the MR.
Setting up the MR
1. Connect the MR to the PC via the USB cable.
2. Run the Maze Rover I nt er f ace Windows program. It is
available from:
http://www.eng.uts.edu.au.~pmclean/ss/Downloads/MazeRoverInterface.exe
Setting filter coefficients
1. To change the filter coefficients, click on the relevant filter button. A
dialog box will prompt for the filter coefficients.
The MR has a fixed
point processor, so
its internal maths
uses implied binary
points
2. All coefficients need to be normalised. The normalising factor is given
next to the equations below. For example, for the phase detector filter,
multiply the coefficients by 256 and round the result.
Phase Detector Filter
The format for the discrete-time version of the phase detector filter is:
( )
1
1
1
1 0
1
+
+
=
z e
z f f
z P
d
Normalize to 256
Loop Filter
The format for the discrete-time version of the loop filter is:
( )
1
1
1
1 0
1
+
+
=
z g
z h h
z L
d
Normalize to 256
Phase Shifter
Integer between
-180 and 180 only
The phase shifter needs an integer value between -180 and 180 degrees.
Resonator
The format for the discrete-time version of the resonator is:
( )
|
|
.
|
\
|
+ +
=
2
2
1
1 0
1
1 1
z r z r r
z R
Normalize r
1
and r
2
to 16384, normalize
r
0
to 1
Signals and Systems Autumn 2012
Comms.15
Signals and Systems Autumn 2012
Report
Only submit ONE report per project group.
A HAND WRITTEN report with the following sections must be completed:
PLL Design
1. Outline the procedure used in determining the VCOs characteristic. Graph
the experimental results. Determine the VCO characteristic.
2. Detail the theoretical design of the phase detector filter.
3. Detail the theoretical design of the loop filter. Detail the design of the
phase shifter.
Demodulator Design
4. Outline the procedure used in determining the modulation technique.
Include relevant sketches of experimentally obtained spectra and time-
domain waveforms. Determine the modulation technique. Determine the
MRs carrier frequency.
5. Design (by hand) your demodulator, showing magnitude spectra at each
point in the system.
6. Detail the theoretical design of the demodulators comb-resonator filter.
Provide a MATLAB