LAB 1 – MEASUREMENT OF TRANSFER FUNCTION



LAB 1 – TRANSFER FUNCTION MEASUREMENT

& SYSTEM IDENTIFICATION

I. BACKGROUND

In applying control theory to an actual system, we need to know the behavior of the system as expressed by the transfer function. For instance, if you have a motor controlling a robot arm, you need to characterize the motor and the robot arm in order to design a stable control system which will control the position of the arm. To characterize the system means to find the transfer function of the system.

There are perhaps two standard ways to express the transfer function of a system. One is, of course, mathematically. For instance, the transfer function of a single order, continuous time system can be written as:

[pic] = [pic]= [pic] or [pic]= [pic],

where y is the output of the system and x is the input of the system.

Another way to express a transfer function is graphically. This is typically done using a Bode plot. A typical bode plot actually consists of two plots: 1) a plot of gain vs (versus) frequency and 2) a plot of phase vs frequency.

We will first look at the Bode plot in more detail and then make some observations about the transfer function from a mathematical perspective.

Gain Plot

The gain plot is a plot of the gain of the transfer function in decibels (dB) as a function of the frequency in rad/sec on a semi-log graph as shown below. In other words, the frequency axis is a logarithmic scale and the gain in dB is linear.

[pic]

Using decibels is a typical way of stating gain and is defined as follows:

Gain in dB = 20 * log10( gain) = 20 * log10( Vout / Vin ),

where Vin and Vout are the input and output voltage, respectively. In other words, if I apply a sinusoid with a certain magnitude and frequency to a system, I will get a sinusoid on the output with a specific magnitude. The output sinusoid will have the same frequency, but there may be a phase shift with respect to the input sinusoid.

The bandwidth of the system is determined by the cutoff frequency, ωc. This is the frequency (either in rad/sec or Hz) at which the gain falls off or drops down -3dB. This point is indicated on the graph. For this system, the bandwidth is 3.2Hz (ωc / 2π where ωc is 20 rad/sec).

Phase Plot

The phase plot is a plot of the phase difference in degrees (or radians) between the output and input as a function of the frequency in rad/sec on a semi-log graph.

In other words, if I apply a sinusoid with a certain magnitude and frequency to a system, I will get a sinusoid on the output which has been shifted in time. The following shows an output signal which lags the input:

This diagram shows/depicts a phase lag of φ radians, corresponding to Δt, in the system at this frequency. While the input signal is given as vin = sin(ωt), the output signal is given as vout = sin(ωt - φ).

The following is a typical phase plot:

[pic]

Transfer Function Observations

There are some useful and simple properties associated with the transfer function.

DC Gain:

If the gain of a system is | T(s) |, we would expect that the dc gain of the system can be found by evaluating |T(s)| at s = 0. The Bode gain plot should asymptotically approach this value as the frequency gets small.

Cutoff Frequency – 3dB Point - Bandwidth

The cutoff frequency or the 3dB point or the bandwidth can be determined mathematically from the transfer function. We will only look at the simple case of

[pic] = [pic]= [pic] or [pic]= [pic]

The 3dB point, ωc , is where the system gain drops down 3dB from its maximum. Thus,

[pic]

We see then that for this simple case the cutoff frequency or bandwidth corresponds to the system pole.

II. LAB

In this lab, you will characterize a simple system, i.e. find the system’s transfer function.

The system is the Comdyna. This is an analog computer which can be configured to represent different types of ‘plants’ or transfer functions. You are to ensure that the Comdyna is configured as on the attached page. With this configuration, the transfer function of the system will be of the form:

[pic]

Grounding:

It is important when you do the lab that all the equipment has a common ground. Basically, this means that all the grounds should be connected together.

Comdyna Operation:

When you are ready to turn the Comdyna on, turn the Compute Time knob clockwise until the display comes on.

Hit the OP button.

A. DC Gain Measurement

Using the DC power supply, determine the DC gain of the system.

B. Bode Plot Measurements

Use the function generator to apply a sine wave to the system at various frequencies. By doing this, you will be able to get the data to generate the Bode plots, both gain and phase. You will need to measure both the input and output sine waves on the oscilloscope.

Apply a sine wave with frequencies 1, 5, 10, 15, 20, 25, 28, 30, 32, 34, 36, 38, 40, 45, 50, 55, 60, etc in increments of 10 Hz up to 100, then at 150, 200, 250, 300, 350, and 400 Hz. Make the necessary measurements in order to obtain the bode plots.

III. ANALYSIS & REPORT

A. Bode Plot

Using your data provide a plot of the gain and phase plot of the system transfer function. Include a copy of your data in the report and provide a sample calculation to show how you determined the gain and phase at one frequency. Be sure to have the right units.

B. Transfer Function

Write out what the transfer function is that you measure. You will need to use your bode plot and DC gain measurement in order to determine the transfer function. Show how you arrived at the transfer function.

C. Obtain the bode plots of the transfer function you estimated for the system in part B using Matlab. Overlay these bode plots on your plots of part A.

To obtain the bode plots in Matlab, you can use the bode command. For instance,

[mag,phase]=bode(sys,w)

will give you the magnitude and phase of the system sys at the frequencies you specify in the vector w. The frequencies supplied to the function should be in rad/sec. The magnitude is unitless, so you will have to convert this to decibels. The phase is in degrees.

In order to use the bode command, you need to define the system transfer function sys. You do that by first defining s in the following manner:

s = tf(‘s’);

Then you write out your transfer function using s. For example, your transfer function might be:

sys = 2/(s+10);

-----------------------

wðc

Dðt

ωc

Δt

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download