Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Digital Signal Pr. Project

Status
Not open for further replies.

doganx

Newbie level 2
Joined
Dec 29, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
Hi everyone. Here is my project and I need your help to solve this project. I did something but I dont know what is wrong in my code. If you fix it I will get 20 points from my lecture. The most important problem is option "d" please I have to submit this project next week...



An IIR highpass filter with a Butterworth characteristic is required to satisfy the
following specifications:
Passband=2-4kHz
Stopband=0-500Hz
Passband ripple=3dB
Stopband attenuation=20dB
Sampling frequency=8kHz
Determine,
a) Pass- and stopband edge frequencies for suitable analog prototype lowpass
filter; {Hint: You should write an m-file}
b) Order, M, of the prototype lowpass filter. c) Coefficients, and hence the transfer function, of the discrete-time filter using
the impulse invariant and bilinear z-transform methods.
d) Test your filter design by applying a sinusoidal input x(n) with the following
frequencies:
i) 3kHz
ii) 50Hz
In this part, you are required to modify the MATLAB m-file you have written
for part (a) such that it displays the output signal y(n). That is, for each input
signal, your program should plot the corresponding output signal y(n). Finally,
compare the outputs obtained from the impulse invariant and bilinear z-transform
methods.




Here is my code:


fs=8000;
Ts = 1/fs; %sampling time interval
t = 0:Ts:1-Ts; %sampling period
f=input('Enter the Frequency = ');

x=sin(2*pi*f*t);
subplot(2,1,1);
plot(t,x);
title('Input x(t) ');
grid

Ap=3;
As=20;
wp=2000/4000;
ws=500/4000;
[M,wc]= buttord(wp,ws,Ap,As);
[z,p,k]= butter(M,2000/4000,'high');
[b,a]= butter(M,2000/4000,'high');
[h,t] = impz(b,a,60);
y= conv(x,h);
subplot(2,1,2);
plot(y)
 

NOBODY doesnt know it????????
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top