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.

Need to design LPF in Matlab using Butter

Status
Not open for further replies.

locchamp

Member level 2
Joined
Nov 8, 2005
Messages
53
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,668
matlab butter

I am trying to design a low pass filter using butter filter in matlab I am confussed how to od this. If my carrier Fc is 20000,( but can be changed if needed) and Fs is 44100 (MP3 file) what do I put in the matlab function below? Please help me I can not get htis please??
I need to filter: outfm = Ac * cos(wc.*t + 2 * pi * kf * cumsum(snd));
Fc=20000
Fs=44100

[N, Wn] = BUTTORD(Wp, Ws, Rp, Rs)

loses no more than Rp dB in
the passband and has at least Rs dB of attenuation in the stopband.
Wp and Ws are the passband and stopband edge frequencies, normalized
from 0 to 1 (where 1 corresponds to pi radians/sample).
 

butter matlab

Try to use fdatool, just type fdatool on Matlab and it will give you a GUI of a filter design...it really help coz it also displays the different responses of the filter you just designed
 

matlab lpf

try this
[N, Wn] = BUTTORD(Fc/Fs, Fstop/Fs, Rp, Rs)
 

lpf matlab

locchamp said:
I am trying to design a low pass filter using butter filter in matlab I am confussed how to od this. If my carrier Fc is 20000,( but can be changed if needed) and Fs is 44100 (MP3 file) what do I put in the matlab function below? Please help me I can not get htis please??
I need to filter: outfm = Ac * cos(wc.*t + 2 * pi * kf * cumsum(snd));
Fc=20000
Fs=44100

Try this, if you didn't get result up to now:

Fc=20000;
Fs=44100;
Fstop=21500; % stopband frequency
Rp = 0.1; % 0.1 dB loss in passband
Rs = 40; % 40 dB attenuation in stopband
[N, Wn] = buttord(Fc/(Fs/2), Fstop/(Fs/2), Rp, Rs);
[B,A] = butter(N,Wn);
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top