0% found this document useful (0 votes)
35 views

'Var' 'S' 'Analogbutterworthlpf ': X TF (B, A, ,) Disp X (n1, d1) Bilinear (B, A,10) y TF (n1, d1, T) Disp y

This document contains programs for designing Butterworth low-pass analog filters using bilinear transformation and impulse invariance. It requests user input for filter parameters like stopband ripple, passband ripple, frequencies, and sampling frequency. It then uses Butterworth filter design functions to calculate the filter coefficients. The filter responses are analyzed by plotting the frequency response and comparing the analog and digital filters designed with each method.

Uploaded by

udaya57
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

'Var' 'S' 'Analogbutterworthlpf ': X TF (B, A, ,) Disp X (n1, d1) Bilinear (B, A,10) y TF (n1, d1, T) Disp y

This document contains programs for designing Butterworth low-pass analog filters using bilinear transformation and impulse invariance. It requests user input for filter parameters like stopband ripple, passband ripple, frequencies, and sampling frequency. It then uses Butterworth filter design functions to calculate the filter coefficients. The filter responses are analyzed by plotting the frequency response and comparing the analog and digital filters designed with each method.

Uploaded by

udaya57
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

%Program for the design of

butterworth low pass analog filter


using bilinear transformation

clc;
close all;
clear all;
format long
rs=input('enter the stopband
ripple...');
rp=input('enter the passband
ripple...');
ws=input('enter the stopband
freq...');
wp=input('enter the passband
freq...');
fs=input('enter the sampling
freq...');
w1=2*wp/fs;
w2=2*ws/fs;
t=0.1;
[n,wn]=buttord(w1,w2,rp,rs);
% Butterworth filter order
selection.
[b,a]=butter(n,wn);
%Butterworth digital and analog
filter design.
w=0:0.01:pi;
x=tf(b,a,'var','s');
disp('analogbutterworthlpf=');x
[n1,d1]=bilinear(b,a,10);
y=tf(n1,d1,t);
disp('digital butterworthlpf=');y
[h,om]=freqs(b,a,w);
m=20*log10(abs(h));
an=angle(h);
subplot(2,1,1);
plot(om/pi,m);
ylabel('GainindB-->');
xlabel('(a)Normalised frequency--
>');
subplot(2,1,2);
plot(om/pi,an)
xlabel('(b)Normalised frequency--
>');
ylabel('Phase in radians-->');




%Program for the design of
butterworth low pass analog filter
using impulse invariance
clc;
close all;
clear all;
format long


rs=input('enter the stopband
ripple...');
rp=input('enter the passband
ripple...');
ws=input('enter the stopband
freq...');
wp=input('enter the passband
freq...');
fs=input('enter the sampling
freq...');
w1=2*wp/fs;
w2=2*ws/fs;
t=0.1;
[n,wn]=buttord(w1,w2,rp,rs);
% Butterworth filter order
selection.
[b,a]=butter(n,wn);
%Butterworth digital and analog
filter design.
w=0:0.01:pi;
x=tf(b,a,'var','s');
disp('analogbutterworthlpf');x
[nl,dl]=impinvar(b,a,1);
y=tf(nl,dl,t);
disp('digital butterworth
filter');y
[h,om]=freqs(b,a,w);
m=20*log10(abs(h));
an=angle(h);
subplot(2,1,1);
plot(om/pi,m);
ylabel('GainindB-->');
xlabel('(a)Normalised frequency--
>');
subplot(2,1,2);
plot(om/pi,an)
xlabel('(b)Normalised frequency--
>');
ylabel('Phase in radians-->');




Vaiva Question


1)what is signal ?
2)why processing needed ?
3)Draw ramp,step,impulse signal ?
4)why you use plot ,subplot, grid on ?
5)what is convolution ?
6)why you use linear convolution ?
7)now you find k?
8)Draw output of convolution signal ?
9)What is fft ?
10)what is ifft ?
11)where to use stem?
12)where to use circular convolution?
13)What is sampling ?
14)what is aliasing?
15)what is the use of sampling ?
16)what is the use of fft ?
17)What are the types of windows ?
18)write formula to find windowing function of all windows ?
19)what is boxcar ?
20)which is best hamming or hanning why?
21)what is butterworth filter?
22)Write the chebyshev filter ?
23)what is polyphase decomposition?
24)what is decimation?
25)what is assembler?

You might also like