Вы находитесь на странице: 1из 2

Assignment-1

ECE 3793: Signals & Systems, Spring 2020


Total Points: 18

Due Date: Sunday, April 12th by 11:59PM

General Guidelines
• MATLAB Symbolic Computations are NOT allowed for this assignment.
• Include the MATLAB codes as an appendix at the end of your document.
• Make sure you comment your MATLAB codes so we can understand what you are doing.
• When presenting your results, please explain how you got them and what they represent.
• The discussion of your results is very important, don’t forget to include them.
• All plots should be clearly labeled: provide a x-axes and y-axes labels, specify units as needed, add titles
and legend as needed, add grids as needed, use different line stiles and/or symbols as needed.

1. In this assignment, you will explore the Exponential Fourier Series (FS) using a numerical integration
implementation of the Exponential FS Spectrum.

a) Implement a MATLAB function that will estimate using numerical integration the Exponential Fourier Series
of a sampled signal. (4 pts)

The function should accept the following input arguments:


• The sampling interval Ts.
• The period of the signal T0.
• A vector (of length N 0 = T0 /Ts) containing the sampled signal ( x k ) over one complete period.
• The number of harmonics ( N ) to be included in the series ( N £ N 0 /2).

The function should provide the following output results:


• A vector containing the coefficients ( Dn ) of the Exponential Fourier Series (of length (2N +1), for
n = -N, - N +1,...,-1, 0, 1,..., N -1, N ).
• A vector with the FS estimation of the signal x(t) over the time interval [-2.T0 : Ts : 2.T0 ] (in seconds).

In addition, the function should plot the following:


• In one figure, the Amplitude Spectrum and the Phase Spectrum in two subplots (one on top of the
other). Use the interval n = -N, - N +1,...,-1, 0, 1,..., N -1, N . I would recommend using ‘stem’ for
plotting. Add the proper axis labels in both subplots.
• In another figure, the estimated signal x(t) over the time interval [-2.T0 : Ts : 2.T0 ].

b) Test your function with the signal:


x(t)
1

-3 -2 -1 0 1 2 3 t

-1

To check that your function is working properly, show the plots being generated for different values of
N = 0, 1, 5, 10, 50, 100. Indicate what values of N you used for each set of figures. Use a sampling interval
of Ts = 0.001. Discuss how the value of N affects your signal reconstruction. (2 pts)

c) Explain what is the Gibbs phenomenon. Indicate whether it is present or not for the signal above. (1 pts)

1
2) Here, you will compare how well your function is estimating the values of the Exponential FS coefficients ( Dn )
using numerical integration.
a) Derive the analytical equation for the coefficients ( Dn ) of the Exponential FS for the same signal provided
in Problem-1. (1 pts)
b) Implement the analytical equation in Matlab and compute the values of Dn for 𝑛 = [−10, … , −1,0,1, … ,10];
store your results in a vector ‘Dn_an’. (2 pts)
c) Using your function from Problem-1, compute the same coefficients and store your results in a vector
‘Dn_ni’. On the same figure, plot the Magnitude Spectra derived from both Dn_an (the analytical solution)
and Dn_ni (the numerical integration solution). Use a legend and different line stiles/colors to indicate
which spectrum correspond to what solution. On another figure, do the same for the Phase Spectra.
Repeat this for different values of your sampling interval Ts = 0.1, 0.01, 0.001. Discuss how the value of
Ts affects the numerical estimation of the coefficients. (3 pts)

3) The Matlab data file ‘ABP_360Hz_mmHg.mat’ is a 10-sec segment of a continuous arterial blood pressure
(ABP) trace sampled at f s = 360 Hz (thus, the sampling interval would be Ts =1/ f s =1/360 s). When you
open this file, a variable ‘abp’ of length 3600 containing the values of blood pressure in mmHg is created.
Here we will assume that this signal is periodic and compute the corresponding Exponential FS Spectra.
a) Identify a piece of the segment that could be assumed as a representative period. If the segment is of
length N 0, the period will be T0 = N 0 .Ts. (1 pt)
b) Using your function from Problem-1, investigate how many harmonics (N) you need to include in the
Fourier Series in order to get a good estimation of the ABP trace. For that number of harmonics, plot the
Exponential Fourier Series (Amplitude and Phase) Spectra. (2 pt)
c) Perform that for at least 3 different pieces of the ABP signals taken as the representative period and
compare their spectra. Discuss your results. (2 pts)

Вам также может понравиться