ELEG 305 Signals and Systems Computer Assignment 5 – Due 5/19 midnight This is a computer exercises for submission. You can work in pairs or groups of 3, but not in larger groups, and should each turn in your own report. You should create a single report that details the analytic setup, the requested plots, along with your complete set of code in a readable format. You can use MATLAB/Octave, Python, or Julia. These problems are more open ended. The goal is to learn through doing. ABET Outcomes: (1) An ability to identify, formulate, and solve complex engineering problems by applying principles of engineering, science, and mathematics. (1.5) Apply knowledge of science and math towards problems in signal processing and communications 1. AM signal reflections (15 points) Consider a continuous-time communications system like an AM radio. The signal that you get from the broadcaster arrives by many paths because the signal can bounce off objects or boundaries that reflects radio waves. Let’s assume that there are only two paths: a direct one, and another that bounces off the ground first. The second received signal is a replica of the transmitted signal, but it arrives delayed and attenuated relative to the first. (Hint: Recall the discussion of comb filters in the lecture.)
Consider the following family of systems !() described by the equations
indexed by ∈ {1,2,3}! = 4 [ 1″ #$%!& + 1! #$%”&], where = ‘(& 6 meters, c = 300 6 10) meters/second, ” = 10*meters, ” = +!, seconds, ! = +”, , and ! = 2(10#!”)’. A) Make a figure that contains all three plots of the magnitude (in dB) of the frequency response for positive frequencies on the log scale from 540 kHz to 1700 kHz for each (like in a Bode plot). Use different colors and linestyles {‘-’,‘:’,’–’} for the three and label them with a legend (label the axes). [4 points] B) Let = #$'(-#% + #$'((-##//”)% where , = 880 kHz, make a plot that contains 10 periods of the signal starting at t=0, choosing an appropriate sampling rate, and making sure to plot both the real and imaginary components as separate curves. [4 points] C) Plot the output for the three cases of ! as above. Note: you don’t need the inverse Fourier transform, since the input is a sum of complex exponentials. [4 points] D) Be sure your code use variables for all constants so they could be changed easily. Clearly document any inline or stand alone functions. [3 points] 2. Moving average inverse (15 points) From https://myhealthycommunity.dhss.delaware.gov/locations/state Download the data (CSV = comma separated values) regarding the 7-day moving average for the last 1012 days (don’t use the cumulative values) https://myhealthycommunity.dhss.delaware.gov/locations/state/download_covid_19_data/overview The discrete-time system corresponding to a 7 day moving average can be implemented as y=filter(ones(7,1),7,x); or equivalently as y=filter(1/7*ones(7,1),1,x); A) Create the impulse response h[n] for n=0,…,10, by passing in the signal delta=[1,zeros(1,9)]. Plot the signal (make sure to label the time points starting at 0 for h[0]). [2 point] The discrete-time inverse system of the 7-day moving average can be implemented as x=filter(7,ones(7,1),y). B) Plot the impulse response of the inverse system using stem (make sure to label the time points correctly). [2 point] C) Plot the output of the inverse system when the input is the impulse response of the moving average. [2 point] C) Filter the 7-day moving average data from the CSV file (you only need one column) and plot it. [5 points] D) Using max find the index of the largest single day count and the index of the largest 7-day average. Report the index and go back to the full CSV file to lookup and record the actual date. [4 points] 3. Clipping (20 points) Consider a continuous time signal before and after amplification and sampling. The sampling chip has voltage rails
of ±2.5 V, signals with larger absolute values are clipped. The
original continuous time signal is =(1 + sin 21 ) 6 cos(22) V with 2 =
420 Hz, 1 = 60 Hz, and = ( 0.1) A) What are its Fourier
series coefficients (Hint: there should be 6 nonzero coefficients).
Using using the Fourier series synthesis equation plot the signal
(with appropriate sampling rate/interval) and compare it to the
amplitude modulated definition above. [5 points] B) What is largest value of such that there is no clipping of Call the largest value !”# [2 points]
D) Verify this by plotting and three cases of () corresponding to ∈
{!”#,1.2 !”#,2 !”#} where z t = ‘ min 2.5, , ≥ 0max 2.5, , ()
< 0 , choosing a sampling rate that is 20 times higher than the limit
imposed by the Nyquist criterion. Make 2 subplots using subplot(2,1,1) subplot(2,1,2) with the second having all 3 curves of () for 2 periods [5 points]
It is known that clipping introduces higher-order harmonics. Design a
causal moving average filter , =1/"( " ) in continuous time to
help shape the () wave to be smoother for the A = 2345 case. Hint: pick " so that it perfectly cancels out the first new harmonic after clipping. E) Plot [] the discrete time version = , 6 where 6 = 1/6 is the sampling interval. [2 points] F) Plot the filtered versions of '[] = [] +[] for the three cases of (). [2 points] Hint: y2 = filter(w,1,z_d); G) In MATLAB listen to these using soundsc or using an audio player and audiowrite. (You’ll need to make a much longer signal than you plotted.)Describe what differences you hear in the audio. [2 points]