Sampling and Reconstruction

Implement sampling and reconstruction in Simulink with the following specifications.
• x(t) is a sinusoid with 70Hz with amplitude 1 with sample period 1/20000s for 1s time interval
• Zero-Order-Hold (ZOH) sampling
• Sampling frequencies: 80Hz, 400Hz, and 1000Hz. Changed by applying the corresponding sampling times in second in the zero-order hold sampling time block.

a) Build a SIMULINK model to sample x(t) with ZOH sampling method with different sampling frequencies listed in the specifications. Output the data generated to the MATLAB workspace. Include screenshot of your SIMULINK block diagram.
Note: You will need the following SIMULINK blocks: “Zero-Order Hold” block is under Simulink->Discrete and “To Workspace” block is under Simulink->Sinks.

You may notice the “To Workspace” symbol above has one input and no output. What it does is to write its input to the MATLAB workspace. The block writes its input to an array or structure (based on how you set its “Save Format” parameter). For this assignment, set “Save Format” to “Structure with time”. The name of the array or structure is specified by the block’s “Variable name” parameter with “simout” as the default name. Array or structure contains not only the input, but also some information about the input. To access the input data with name “simout”, you can use the commands below:
>> Data=simout.signals.values;
>> Time = simout.time;
The above commands generate a time series that can be plotted with plot(Time, Data).
a) Run the above SIMULINK model with different sampling frequencies listed in the specifications. After each run, type the commands in Part a) at command line to save the results in the workspace. Make sure to use different variable names such as data80, time80, data400, time400, etc. Write a MATLAB program to plot the sampled signals and the frequency magnitude character of the sampled signals with FFT. Include your MATLAB code and figures. Compare results and discuss your observations. (Hint: an example of how to plot FFT is in Lab 1 Manual Section 2.4.)

b) Design a discrete low-pass Butterworth filter of order 6, sampling rate of 20,000Hz. Use “lsim” to simulate signal reconstruction. Your data from (a) needs to be upsampled first (see note below) before passing through the filter you designed. Specify the proper cut-off frequency of the filter. Provide the transfer function. Plot the upsampled signals and the frequency magnitude plot of the reconstructed signals (80, 400, 1000 Hz sampling rates as in (a)) with FFT. Include your MATLAB code and figures. Compare results and discuss your observations.

In the MATLAB code provided in Section 5 of the lab manual, we created a sinusoid with frequency 1 kHz. We used a high sampling frequency of fs = 44.1 kHz that represents a fairly good approximation of the continuous time signal. Copy the MATLAB code and run it in a script.
a) Include the plots generated.
b) Compare the analytical continuous-time Fourier transform with its FFT computation. Discuss your observations

In the MATLAB code provided in Section 6 of the lab manual, we sampled the same sinusoid (1 kHz) in Task 2 at a lower sampling rate (fs/4) to observe the aliasing effects. Copy the MATLAB code and run it in a script. You must have all the variables from Task 2 in the MATLAB workspace for this to work.
a) Include the plots generated.
b) By looking at the plots, explain whether aliasing effects have increased or decreased

In the MATLAB code provided in Section 7 of the lab manual, we used upsampling to “interpolate” the values of the low rate signal and converted it to a high rate signal and then passed the signal through a low pass filter to recover the original signal. Copy the MATLAB code and run it in a script. You must have all the variables from Task 2 and 3 in the MATLAB workspace for this to work.
a) Include the plots generated.
b) Discuss the effects of aliasing of the reconstructed signal and any effect it may have had on how it sounds based on the results you see from running the code.

In the MATLAB code provided in Section 8 of the lab manual, a frequency equalizer is implemented. Copy the MATLAB code and run it in a script.
a) Try three different sets of values for the equalization coefficients and include the frequency response plots generated.
b) Does the frequency response correspond to what you entered as coefficients in all three cases? Explain by using the plots from part a).

 

 

Sample Solution

find the cost of your paper