281 272 Lab 3 (1)
-
Upload
mubashir-ali -
Category
Documents
-
view
217 -
download
0
Transcript of 281 272 Lab 3 (1)
-
7/27/2019 281 272 Lab 3 (1)
1/4
281.272 Signals and Systems Laboratory 3
School of Engineering and Advanced Technology
281.272 Signals and Systems
Laboratory 3: System Representations
Aim: To become familiar with, and explore different representations of a system its impulse
response, frequency response and system response.You will be working with the following amplifier circuit, modelling its behaviour using MATLAB,
and measuring the responses in the laboratory.
1K
R1
1K
R2
15nC1
1.5n
C2
150n
C3
1.5n
C4
10k
R3
1K
R4
10k
R5
1K
R6 Vout
NegV NegV
PlusV PlusV
Page 1 of4
Relationships:
The figure here shows the relationships that you will explore within this laboratory. The first step is
to derive the system response from the circuit diagram of the amplifier. From this, we can directlycalculate the frequency response, the impulse response and the step response. We can also derive
the impulse response from the frequency response. The responses of the amplifier will also be
measured, and compared with the modelled responses.
System Response:
1) Before coming into the laboratory, analyse the above circuit to derive the system function.You may assume that the operational amplifiers are ideal, and operating linearly. (Hint: take
particular care with loading in the input section.)
You should be able to show that the system function for the complete amplifier is:3
2
3
1 2
( ) 50( ) ( )
sH s
s s
=+ +
1
2
6666.7
66667
=
=, where
15nC1a
2
3
1A
8
4
U1ATL072CN
5
67
8
B
4
U1BTL072CNVin
Systemfunction
H s( )
Frequencyresponse
H j( )
Impulseresponse
h t( )
Stepresponse
Substitutes j=
Laplacetransform
Fouriertransform
Integrate
Convolvewith ( )t
InverseLaplace
transformofH s s( )/
-
7/27/2019 281 272 Lab 3 (1)
2/4
281.272 Signals and Systems Laboratory 3
Page 2 of4
s j
2) Sketch the pole-zero plot for the amplifier.a) From the pole-zero plot, what type of amplifier is this?
b) What is the order of the amplifier?Frequency Response:
3) Using the system response above (factorised into pole-zero form), use MATLAB to plot thefrequency response of the amplifier in the frequency range 10 Hz to 105 Hz. For a causal
system, this is achieved by substituting = into the system function. Do not use symbolic
manipulation for this MATLAB defines several commands which will do this substitution for
you:
a) The system response above is in pole-zero form. Use zp2tf to calculate the numeratorand denominator polynomial coefficients from the poles and zeros.
b) Pass the numerator and denominator coefficients to freqs, which will plot both themagnitude and phase of the frequency response.
Note that there are a number of problems with this plot. First, the frequency axis is in terms
of angular frequency, rather than frequency ( rather than f ). Second, the frequency
range is chosen automatically, and does match the desired range. Third, the magnitude
response is not plotted in dB. Fourth, the phase angle wraps around when it exceeds 180.
c) Use logspace to give a vector containing a set of logarithmically spaced frequenciesfrom 10 Hz to 105 Hz. Convert these to radians per second, and add as a third parameter to
freqs. This gets the frequency range correct. Assign the results of the freqs command
to a vectorH; these will correspond to the frequency response measurements at the input
frequencies.
d) Use subplot to create 2x1 plot for plotting both the magnitude and phase response plotsin a single figure.
e) Take the magnitude of the response (using abs) and convert it to dB. Note use log10 totake logarithms to base 10. Plot this in the upper of the two subplots, using a logarithmic
frequency scale. Label the axes appropriately.
f) Take the phase angle of the response (using angle). This needs to be unwrapped(unwrap) and plotted on the lower of the two subplots. Again, label the axes
appropriately.
g) Put all of your MATLAB commands for creating this plot into an M file.4) The next step is to take measurements from the physical amplifier, and compare them with the
theoretical response.
a) Set the bench power supply to 12V tracking mode (so that it provides 12V). Connect youramplifier power supply cables to the bench supply (red plug to +12V, black plug to 0V,
and blue plug to 12V). Connect the signal generator to the input, and the two channels of
an oscilloscope to the input and output of the amplifier.
b) Measure the frequency response (magnitude and phase) for frequencies in the range 10 Hzto 105 Hz. Take care that you are in the linear region of the amplifier (the output is not
clipped or distorted). Take sufficient measurements that you are confident that you have
captured the essential features of the frequency response.
c) Plot the data points on the previous graph. Plot using rx to plot the points as redcrosses. (Hint have your raw data in a MATLAB array, and use MATLAB to perform the
calculations needed for plotting).
-
7/27/2019 281 272 Lab 3 (1)
3/4
281.272 Signals and Systems Laboratory 3
Page 3 of4
d) Explain any differences between the measured and modelled results.5) From the pole-zero representation, manually estimate the linear approximation of the frequency
response, and plot these on the same data plot in green (g). You can do this by calculating
the corner points, and plotting these.
Comment on how well the approximation matches the true data.
Impulse Response:
6) Calculate and plot the impulse response by taking the inverse Fourier transform of thefrequency response. Note this requires that you have linearly spaced frequencies (why?) in the
following order: [DC, f , 2 f , ,max
f ,max
f , , f ]. (A total ofNpoints)
a) Create a frequency vector with the required frequencies. Then use freqs to calculate thefrequency response at those frequencies.
b) Use ifft to calculate the inverse Fourier transform and derive the impulse response.c) Since the ifft is using a discrete Fourier transform, the sample period is implicit. The
response needs to be scaled to take this into account. Multiply the amplitude by N f and
the time samples will be spaced 1/ N f .
d) Plot the time waveform from 0 to 1 ms. Label the graph appropriately.7) Calculate the impulse response by performing an inverse Laplace transform of the system
function
a) Create a symbolic representation of the system response, H(s).b) Use the ilaplace command to symbolically determine the expression for the impulse
response. To see the expression, pretty will make it easier to read.
c) Use subst to substitute a set of time samples fortin h(t) to evaluate the impulse responseat those frequencies.
d) Plot the inverse Laplace transform on the same graph as the inverse Fourier transform.8) Measure the impulse response of the amplifier using an appropriately short pulse. Remember
an impulse has unit area, so you will need to scale the impulse, and compensate with your
results.
a) Use a pulse generator to generate a short pulse. It needs to be sufficiently short in time thatthere is no appreciable output before the pulse completes (so that it is effectively an
impulse on the input). The amplitude will need to be sufficiently low that the amplifier is
operating linearly. Check the linearity by changing the amplitude of the impulse, andchecking that the output scales in proportion.
b) Measure the area of your impulse. You will not be applying a unit impulse, but a smallfraction of a unit impulse.
c) At a minimum, measure the following key parameters: the time and height of the firstpositive peak, the time at which the zero crossing occurs, and the time and height of the
negative peak.
d) Since the input is a scaled impulse, the output will be a scaled impulse response. Calculatewhat the output would be for the linear system if a unit impulse was applied. Plot these
data points on your graph using red crosses (rx).
e) Explain any differences in the results.
-
7/27/2019 281 272 Lab 3 (1)
4/4
281.272 Signals and Systems Laboratory 3
Page 4 of4
Step Response:
9) Use ilaplace to take the inverse Laplace transform of . Plot the time waveformfrom 0 to 1 ms. Label the graph appropriately.
( ) /H s s
10) Convolve the impulse response (from either step 6 or 7) with a unit step input, to get the stepresponse.
a) Use ones to get a rectangular pulse. This needs to be sufficiently long that the stepresponse has stabalised before the end of the pulse. Note that you will need to scale this by
the sample time, because we are using a discrete time representation within MATLAB.
b) Perform the convolution with conv. This will give a longer waveform, with the responseof the start of the pulse, and a negative step response following the end of the pulse.
Truncate the sequence to remove the negative step response.
c) Plot the resulting wave on the same graph as step 9.11) Measure the step response of the amplifier.
a)
Apply a square wave as input to the system. The frequency needs to be sufficiently lowthat the response has stabalised between the square wave transitions. Adjust the amplitude
so that the amplifier is operating in the linear region.
b) Measure the height of the step applied to the input of the amplifier. Since we are notproviding a unit step, we will need to scale the output response accordingly.
c) Make some key measurements on the output waveform.d) Scale your measurements and plot on the same graph.e) Explain any differences in the results.
Group report:
Include the following in your report:
Aim. Introduction. As part of this you should have the derivation of the system response. Method. Include MATLAB instructions used. This should be sufficiently detailed to enable
someone else to repeat the experiment and verify your results.
Results. Include raw results as an appendix. To compare the results from differentapproaches, they should be plotted on the same graph.
Discussion. What do the results show? Include explanation of discrepancies between results. Conclusions. These should relate back to your aims. Which approaches of measuring the
system behaviour give the best results?
Be careful to structure your report logically. You effectively have 3 separate lots of experiments
(frequency response, impulse response, step response), so structure your report with aim, method,
results, discussion, (and perhaps conclusions) for each sub-experiment. Do NOT put all the
methods together, the results together and the discussion together.