Question

In: Electrical Engineering

Pass the signal x5 through the filter h using the command: x6 = filter(h,1,x5); In your...

Pass the signal x5 through the filter h using the command: x6 = filter(h,1,x5); In your report, include a plot of the amplitude spectrum of x6 (use the normalized frequency axis as you did for previous parts of this project).

Solutions

Expert Solution

clc
clear all
close all
fs = 600; %Sampling frequency
t = 0:1/fs:.5;
N=10;
%Input Signal
x = sin(2*pi*50*t)+sin(2*pi*150*t)+sin(2*pi*250*t);
%Band Pass filter design
d=fdesign.bandpass('N,F3dB1,F3dB2',N,100,200,fs);
Hd=design(d,'butter');
%Filtering input signal with Bandpass filter
y=filter(Hd,x);
subplot(2,1,1)
plot(t,x)
title('Input signal')
xlabel('time')
ylabel('Amplitude')
subplot(2,1,2)
plot(t,y,'-r')
title('Band Pass Filtered signal')
xlabel('time')
ylabel('Amplitude')

figure;
freq=0:(2*pi)/length(x):pi;
X=fft(x);
Y=fft(y);
subplot(2,1,1)
plot(freq,abs(X(1:length(x)/2+1)))
xlabel('Normalized Frequency (\times\pi rad/sample)')
ylabel('Magnitude')
title(['Frequency Response of input signal for order N=',num2str(N)])
subplot(2,1,2)
plot(freq,abs(Y(1:length(x)/2+1)),'-r')
xlabel('Normalized Frequency (\times\pi rad/sample)')
ylabel('Magnitude')
title(['Frequency Response of filtered signal for order N=',num2str(N)])

We can also design any type of filter using relevant filter model in the same way. Order of filter N can be changed to our requirement.


Related Solutions

Listen to the audio signal x6 using the soundsc command. In your report, describe the perceived...
Listen to the audio signal x6 using the soundsc command. In your report, describe the perceived sound and explain your results.
In matlab using a RC low pass filter Create a 1 Hz input signal (with amplitude...
In matlab using a RC low pass filter Create a 1 Hz input signal (with amplitude of one). Corrupt the input signal with signals greater than or equal to 100 Hz and/or random noise. Use randn(length(v_in,1)) to test filter
Designa low-pass filter that reduces magnitude of H(jw) to 0.4 for the signal with 10(X+4)Hz. a)Use...
Designa low-pass filter that reduces magnitude of H(jw) to 0.4 for the signal with 10(X+4)Hz. a)Use 10 Ω resistor and calculate the value of the inductance of the filter. Calculate the cutoff frequency of the filter .b)Design another filter for the same purpose by using the same resistorcombined with a capacitor.Find the value of the capacitance.Find the magnitudes of H(jw) for 2Hz and 200 Hz frequencies and sketch the frequency response graph of the filter c)(20+Y)Ωresistive loadis connected across the...
1. Design 3rd order ideal low pass filter H(s). Two poles are complex conjugates, and one...
1. Design 3rd order ideal low pass filter H(s). Two poles are complex conjugates, and one pole is on the real axis. 2. transform H(s) to H(z). (Use impulse invariance criterion) 1%criterion
Reconstruct the original signal with a higher order low pass filter. Which Sampling method (Natural, Flat-top,...
Reconstruct the original signal with a higher order low pass filter. Which Sampling method (Natural, Flat-top, Sample-and-hold) can be easy to reconstruct the signal? Explain your observations.
Design an FIR filter using the fixed window-based method. Use the following high pass filter requirements:...
Design an FIR filter using the fixed window-based method. Use the following high pass filter requirements: δp = 0.2 dB δs = − 30 dB fs = 3000 Hz f p = 5000 Hz The sampling frequency is 10000 Hz Select the optimal fixed window type for the calculations. Present the number of coefficients and the coefficient values of the impulse response of the specified filter
How can you use your circuit to obtain a low-pass or a high-pass filter? What is...
How can you use your circuit to obtain a low-pass or a high-pass filter? What is a low-pass filter used for?
Case Y X1 X2 X3 X4 X5 X6 1 43 45 92 61 39 30 51...
Case Y X1 X2 X3 X4 X5 X6 1 43 45 92 61 39 30 51 2 63 47 73 63 54 51 64 3 71 48 88 76 69 68 70 4 61 35 86 54 47 45 63 5 81 47 85 71 66 56 78 6 43 34 51 54 44 49 55 7 58 35 70 66 56 42 67 8 71 41 64 70 57 50 75 9 72 31 81 71 69 72 82...
Z X1 X2 X3 X4 X5 X6 RHS 1 170 0 0 25 -20 0 15,550...
Z X1 X2 X3 X4 X5 X6 RHS 1 170 0 0 25 -20 0 15,550 0 3 0 1 1/2 -1 0 65 0 1 1 0 0 1/2 0 205 0 -5 0 0 -1 2 1 480 a) Which variables are nonbasic, which ones are basic, and what are their respective values? b) If I were minimizing the objective, which nonbasic variables are legitimate candidates to enter the basis? How about if I were maximizing? c) Suppose...
I need to obtain an approximate implementation of a Butterworth low pass first order filter using...
I need to obtain an approximate implementation of a Butterworth low pass first order filter using P-spice. It suppose to have a cutoff frequency of 1000Hz and the attenuation cutoff frequencies fixed at 3db.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT