Question

In: Electrical Engineering

3. For the following analog signal: xa(t) = 3sin(40πt) + 3cos(50πt) which is sampled at a...

3. For the following analog signal: xa(t) = 3sin(40πt) + 3cos(50πt) which is sampled at a rate of 100 samples/second. a. Design an IIR digital filter that will pass the first component 3sin(40πt) with attenuation of less than 1 dB and suppress the second component 3cos(50πt) at least 50 dB. The filter should be monotonic in the passband and have ripple in the stopband. ( 2 points ) b. Generate 500 samples of the sampled signal xa(t) at the given sampling rate and use the filter you designed to process the sampled signal using MATLAB’s ”filter” command. ( 1 point ) c. Plot the original signal and the output signal in one window using MATLAB’s subplot command ( in either a 1 X 2 arrangement or a 2 X 1 arrangement. Remember to title all plots and label all axes.

PLEASE SOLVE USING MATLAB

Solutions

Expert Solution

The given requirements demand a butterworth filter. This is because that a butterworth filter  can produce a small passband ripple for a less order than the other filters with higher orders.

The design of the butterworth filter consists of obtaining the order of the filter followed by the filter coefficients. The MATLAB code given below does what's required.

% MATLAB code is given below in bold letters.

clc;close all;clear all;

% define the cutoff frequency
fc = 20; % 20 Hz

% define the stop frequency
fstop = 25; % 25 Hz

% define sampling frequency
fs = 100; % 100 Hz

% define the filter characteristics
Wp = fc/fs/2;
Ws = fstop/fs/2;
Rp = 1; % passband ripple
Rs = 50; % stopband ripple


% obtain the required order of the butterworth filter for the given requirements.
[N, Wn] = buttord(Wp, Ws, Rp, Rs);

% obtain the filter coefficients
[b,a] = butter(N,fc/(fs/2));

% plot the frequency response of the filter
figure;freqz(b,a);


% now define the time sequence
t = 0:1/fs:99/fs; % 100 samples

% define the input signal
xa = 3*sin(40*pi*t) + 3*cos(50*pi*t);

% filter the signal
y = filter(b,a,xa);

% plot the input signals
figure;
subplot(211);
plot(t,xa,'linewidth',2);grid on;
xlabel('time');ylabel('Amplitude');title('Input signal');
subplot(212);
plot(t,y,'linewidth',2);grid on;
xlabel('time');ylabel('Amplitude');title('Output filtered signal');

Frequency response of the filter:

Filter Input and Output:


Related Solutions

3. For the following analog signal: xa(t) = 3sin(40πt) + 3cos(50πt) which is sampled at a...
3. For the following analog signal: xa(t) = 3sin(40πt) + 3cos(50πt) which is sampled at a rate of 100 samples/second. a. Design an IIR digital filter that will pass the first component 3sin(40πt) with attenuation of less than 1 dB and suppress the second component 3cos(50πt) at least 50 dB. The filter should be monotonic in the passband and have ripple in the stopband. b. Generate 500 samples of the sampled signal xa(t) at the given sampling rate and use...
3sin(t)+3sin(t)sin(2t)=3cos(t)-cos(3t). I'm trying to solve for t.
3sin(t)+3sin(t)sin(2t)=3cos(t)-cos(3t). I'm trying to solve for t.
------An analog signal is sampled, quantized, and encoded into a binary PCM wave. The number of...
------An analog signal is sampled, quantized, and encoded into a binary PCM wave. The number of representation levels used is 1024. A synchronizing pulse is added at the end of each code word representing a sample of the analog signal. The resulting PCM wave is transmitted over a channel of bandwidth 24kHz using a 8 PAM system with raised-cosine spectrum. The rolloff factor is 0.5. (a) Find the rate (bit/s) at which information is transmitted through the channel. (b) Find...
A signal has the functional form f(t) = 5sin(40πt) and is sampled at a rate of...
A signal has the functional form f(t) = 5sin(40πt) and is sampled at a rate of 30 samples per second. What false alias frequency would you expect in the discrete data? What sampling rate would avoid aliasing this signal?
A signal with a maximum frequency of 3 kHz is sampled at 50 kHz. What would...
A signal with a maximum frequency of 3 kHz is sampled at 50 kHz. What would the required transition width be in Hertz to... (a) decimate the signal by a factor of 8? (b) decimate the signal by a factor of 5? (c) interpolate the signal by a factor of 4?
A continuous signal contains the following two components: x1(t) = 3 cos 20πt x2(t) = 3...
A continuous signal contains the following two components: x1(t) = 3 cos 20πt x2(t) = 3 cos 50πt (a) Find the minimum required sampling rate to avoid aliasing. (b) Draw the discrete time signals obtained after sampling, when sampled with Fs = 100 Hz. Explain the disadvantage(s), if any, of sampling beyond the Nyquist rate. (c) Assume the sampling rate is Fs= 40 Hz, which components are exposed to aliasing effects? Support your answer by showing “Nyquist intervals” and the...
Digitization of signals Consider the analog signal s(t) = 5sin(500t +p 5)+ cos(200t +p 4) to...
Digitization of signals Consider the analog signal s(t) = 5sin(500t +p 5)+ cos(200t +p 4) to be transferred over a digital communications system. (a) Compute the maximum allowable sampling period that the analog-to-digital converter (ADC) must use to ensure the perfect reconstruction of the signal at the receiver. (b) What theorem governs the choice made in part (a)? (c) How many samples of the analog signal do we need to store in order to reproduce 10p seconds of it (i.e.,...
.         Given the following non-periodic signal:    x(t) = 3 e-5t cos(12t) u(t)             Find the Fourier...
.         Given the following non-periodic signal:    x(t) = 3 e-5t cos(12t) u(t)             Find the Fourier transform expression X(ω) without using Table.             Calculate the magnitude spectrum of X(ω) for ω = π/8, π/4, and π/2
Problem 3: The carrier c(t) = 100cos(2p fct) is frequency modulated by the signal m(t) =...
Problem 3: The carrier c(t) = 100cos(2p fct) is frequency modulated by the signal m(t) = 5cos(20000pt) , where fc = 108 Hz. The peak frequency deviation is 20 kHz. Determine the amplitude and frequency of all the signal components that have a power level of at least 10% of the power of the un-modulated carrier component. Hint: The wide-band FM has frequency components, fc, fc+ fm, fc? fm, fc+2 fm, fc?2 fm, and so on. The amplitude of the...
Find the Fourier coefficients of the following signal. x(t) = 5 + 2sin(w0.t) + cos(2.w0.t) -...
Find the Fourier coefficients of the following signal. x(t) = 5 + 2sin(w0.t) + cos(2.w0.t) - 3sin(2.w0.t)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT