EE 402 Control Systems Lab

advertisement
Prescott, Arizona Campus
Department of Electrical and Computer Engineering
EE 402 Control Systems Laboratory
Fall Semester 2013
Lab Section 01
Thursday 1:25 – 4:05 pm
King Eng. Bldg. Rm 122
Lab Instructor:
Dr. Stephen Bruder
Lab 02 - Pre-lab
Control Systems Modeling & Analysis with MATLAB
Date Experiment Performed:
??, ??, 2014

Instructor’s Comments:
Comment #1

Comment #2
Date Report Submitted:
??, ??, 2014
Group Members:
Student # 1 Name & Email
Student # 2 Name & Email
Grade:
EE 402 Control Systems Lab
Fall 2014
1. BACKGROUND
In this pre-lab we will perform some preliminary analysis in preparation for the lab to follow.
One of the strengths of control system design lies in the fact that once the physical system has
been reduced to transfer functions and represented via a block diagram, the ensuing analysis
remains independent of the underlying physical system. This process of the mathematical
abstraction of a physical system is referred to as the modeling phase. While this lab introduces
you to a block diagram representation of a device that
stephencartwrightstudio.blogspot.com
plots computer generated images, the X-Y plotter (see
Figure 1), it is important to realize that the underlying
physical system could be anything and the design of the
controller would remain unchanged. Eventually, the
physics of the system (hydraulic, pneumatic, electrical,
electromechanical, etc.) will impact how you actually
implement the controller (circuit, pump, …) that you
Figure 1 An X/Y plotter
have designed, but, not the controller design itself.
1.a.
A Unity Feedback System
In this lab you will get to see how to manipulate the performance of a system by changing the
controller design parameters, but first, a little background. The most common form of a control
system is the single loop unity feedback control system illustrated in Figure 2.
Controller
+
Input
Plant
E

-
Error
Signal
C
Output
Figure 2 A Single loop, unity feedback control system
The output, C ( s ) is the signal we seek to control while R( s ) represents a fixed input signal.
We want to develop a controller that causes C ( s ) to meet the design specifications, given
Names of Students in the Group
Page 2 of 6
EE 402 Control Systems Lab
Fall 2014
knowledge of R( s ) . There are generally two types of control problems that we will encounter.
The first is the tracking problem, wherein we seek to have the output “track” or follow a varying
input with minimal error. A radar tracking system is an example of such. The second is referred
to as the regulator problem, in which we want the output to match a fixed input, often zero. In a
regulator system, the controller attempts to reject all external disturbances to the system in order
to keep the system at its set point. Chemical plants frequently require this type of control system
in order to control chemical mixing.
The transfer function that relates output to input for Figure 2 is:
G ( s) 
Gc ( s )G p ( s )
1  Gc ( s )G p ( s )
For a given input function, R( s ) , the output is C ( s )  G ( s ) R( s ) . The output function in the
time domain, c (t ) , is just the inverse Laplace of C ( s ) . The design specifications that the control
engineer is trying to achieve are frequently given in terms of desired output signal (i.e., c (t ) )
characteristics. Often, the output can be modeled as a first or second order system response to a
step input so that the design specs can be given in terms of the system’s time constant, rise time,
settling time, and/or percent overshoot. Even when the system is of a higher order the output can
often be approximated by a lower order system’s response while retaining the original design
specifications.
1.b.
Second Order System Response
Figure 3 presents the typical step response of an underdamped second order system. Even
higher order systems, like the one we will consider later in the lab, frequently may have a
response similar to this. Thus, several of the response specifications such as rise time ( Tr ),
percent overshoot, settling time ( Ts ), and steady-state error, remain applicable. Figure 3
introduces you to the definitions of these terms.
Names of Students in the Group
Page 3 of 6
EE 402 Control Systems Lab
Fall 2014
c(t )
1.6
1.4
M pt
1.2
1.0
css  2%
css
css  2%
0.8
0.6
0.4
0.2
Time (sec)
Tr
Tp
Ts
Figure 3 Plot of a second order system’s unit step response (underdamped case)
The rise time, Tr , is defined to be the time required for the output to increase from 10% to
90% of its final value. The peak value of the response is denoted by M pt , and the time
required to reach this peak value is T p . This peak time corresponds to the first occurrence of
a zero slope in the response (and t > 0). The percent overshoot is defined as
100   M pt  css  / css . The settling time, Ts , is defined as the time required for the output to
reach and remain within a given percentage of the steady-state value ( css ). While various
percentages may be used, we will adopt the 2% convention. The settling time is obtained by
observing the envelop of c (t ) and determining when it first remains within the 1.02 css to
0.98 css (i.e., ±2%) boundaries.
The steady-state error is the difference between the input and the output as time approaches
infinity. While this can be a fairly involved topic, for our purposes we will adopt the convention
that if the final value of the output seems to be approaching the input over a “reasonable” time,
then the steady state error is zero. For the output response shown in Figure 3, the steady-state
error appears to be zero since the input is a unit step whose final value is 1 and the output seems
to be asymptotically approaching that value.
Names of Students in the Group
Page 4 of 6
EE 402 Control Systems Lab
1.c.
Fall 2014
MATLAB Simulation
We will use MATLAB to determine the step response of the system we will be studying in
this lab. MATLAB has the built-in function “step” which calculates the step responses of a
transfer function. Entering “>> help step” at the MATLAB command prompt provides
assistance on using the function. By describing the transfer function as a ratio of polynomials
(i.e., G ( s) 
num( s)
) one can define a system transfer function (sys=tf(…)) object in MATLAB
den( s)
and then apply the step function to this object.
For example, consider the transfer function G( s) 
num( s)
1
 2
. We can define the
den( s) s  0.4s  1
system via the transfer function numerator and denominator polynomials as
>> num = [1];
>> den = [1 0.4 1];
Step Response
1.6
1.4
>> sys = tf (num, den)
s+1
------------s^2 + 0.4 s + 1
1
Amplitude
sys =
1.2
0.8
0.6
0.4
Now, to get a plot of the step response of the
system modeled by sys (see Figure 4) enter:
>>step(sys)
0.2
0
0
5
10
15
20
25
30
Time (seconds)
Figure 4 System step response
Note that you could also have used Simulink (see Figure 5), as demonstrated in Lab 1.
Figure 5 Plot of a second order system’s unit step response (Simulink)
Names of Students in the Group
Page 5 of 6
EE 402 Control Systems Lab
Fall 2014
2. PRE-LAB ASSIGNMENT:
1. Review the description of the X-Y plotter in laboratory experiment 2 and list the design
specifications that must be met for the X-Y plotter to fulfill its design requirements:
a. M pt 
b. Ts 
c. ?
2. In Lab 2 you will be considering three different controller options for the design of the XY plotter. For each case determine the transfer function of the overall feedback system:
a. Case I: A Fixed Gain Controller
G ( s)  ?
b. Case II: A Lead Controller
G ( s)  ?
c. Case III: Pole Cancellation
G ( s)  ?
Names of Students in the Group
Page 6 of 6
Download