80.1k views
5 votes
Consider the system lineup shown below:

x[n] y[n]
x(t)→(ADC)→(DSP)→(DAC)→y(t)


Suppose that x(t)=1+cos(2πt)+cos(4πt)+cos(8πt). The ADC uses a sampling rate of fₛ=10 Hz and acquires 100 samples of x(t). The resulting digital signal x[n] is fed to a DSP whose impulse response is defined as h[n]=δ[n]−2cos(0.4π)δ[n−1]+δ[n−2]. Use MATLAB to simulate the above system lineup and generate the signals x(t),x[n],y[n], and y(t). Additionally, generate the spectrum for x(t) and y(t). For analog signals, use a time step of 10 ⁻².
Report: Submit a short report including the MATLAB code, plots, comments, and a discussion of results. Keep the report length to less than 10 pages.

User Quintin
by
7.8k points

1 Answer

7 votes

Final answer:

To simulate the given system lineup using MATLAB, you need to generate the analog signal x(t), sample it to obtain x[n], apply the DSP filter, and then convert the filtered signal back to analog form. The spectrum for x(t) and y(t) can be generated using the Fourier transform.

Step-by-step explanation:

In order to simulate the given system lineup using MATLAB, you need to first generate the analog signal x(t). Given x(t) = 1+cos(2πt)+cos(4πt)+cos(8πt), you can plot this function using appropriate time values. Next, you need to sample x(t) using the provided sampling rate of fₛ = 10 Hz. This will give you x[n].

Once you have x[n], you can then apply the DSP filter with impulse response h[n] = δ[n]−2cos(0.4π)δ[n−1]+δ[n−2]. This can be done using convolution in MATLAB.

Finally, you need to convert the filtered signal y[n] back to analog form y(t). This can be done using the DAC. You can plot both x(t) and y(t) to visualize the signals. To generate the spectrum for x(t) and y(t), you can use the fast Fourier transform (FFT) in MATLAB.

User Hamza Kubba
by
7.7k points