NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

%% FILTR BESSELA
%% Dane
n=2;
m=8;

%% Obliczenia
%% Krok 1
% s=tf('s');
% t2=1/s+1/(3/s)
% t3=1/s+1/((3/s)+1/(5/s))
% t4=1/s+1/((3/s)+1/((5/s)+1/(7/s)))
% t5=1/s+1/((3/s)+1/((5/s)+1/((7/s)+1/(9/s))))
% t6=1/s+1/((3/s)+1/((5/s)+1/((7/s)+1/((9/s)+1/(11/s)))))
% t7=1/s+1/((3/s)+1/((5/s)+1/((7/s)+1/((9/s)+1/((11/s)+1/(13/s))))))
% t8=1/s+1/((3/s)+1/((5/s)+1/((7/s)+1/((9/s)+1/((11/s)+1/((13/s)+1/(15/s)))))))

%% Krok 2
t2=3/(s*s+3*s+3);
t3=15/(15+15*s+6*s*s+s^3);
t4=105/(s^4+10*s^3+45*s*s+105*s+105)
t5=945/(945+s^5+15*s^4+105*s^3+420*s*s+945*s)
t6=10395/(10395*s+10395+4725*s*s+1260*s^3+210*s^4+21*s^5+s^6)
t7=135135/(s^7+s^6*28+378*s^5+3150*s^4+17325*s^3+62370*s*s+135135*s+135135)
t8=2027000/(s^8+36*s^7+630*s^6+6930*s^5+51975*s^4+270270*s^3+945945*s^2+2027000*s+2027000)

%% Wykresy
figure(1)
bode(t2)
hold on
bode(t3)
hold on
bode(t4)
hold on
bode(t5)
hold on
bode(t6)
hold on
bode(t7)
hold on
bode(t8)
hold on

figure(2)
step(t2)
hold on
step(t3)
hold on
step(t4)
hold on
step(t5)
hold on
step(t6)
hold on
step(t7)
hold on
step(t8)
hold on

figure(3)
impulse(t2)
hold on
impulse(t3)
hold on
impulse(t4)
hold on
impulse(t5)
hold on
impulse(t6)
hold on
impulse(t7)
hold on
impulse(t8)
hold on

%% FILTR BUTTERWORTHA
for n = 2 : 1 : 7
%% Dla rzędów nieparzystych
for k = 1 : 1 : n / 2
a(k) = 2 * cos((2 * k - 1) / (2 * n) * pi);
b(k) = 1;
R(k) = tf(1, [b(k), a(k), 1]);
if (k==1)
H(n) = R(k);
else
H(n) = H(n) * R(k);
end
end

%% Dla rzędów nieparzystych
if(mod(n,2) == 1)
for k = 2 : 1 : (n + 1) / 2
a(1) = 1;
b(1) = 0;
a(k) = 2 * cos(((k-1) / n ) * pi);
b(k) = 1;
PP = tf(1, [b(1), a(1), 1]);
R(k) = tf(1,[b(k), a(k), 1]);
if (k==2)
H(n) = R(k) * PP;
else
H(n) = H(n) * R(k);
end
end
end
end

for i = 2 : 1 : 7
figure(1);
bode(H(i));
hold on
end
legend('Rząd 2', 'Rząd 3', 'Rząd 4', 'Rząd 5', 'Rząd 6', 'Rząd 7');

for i = 2 : 1 : 7
figure(2)
pzplot(H);
hold on
end
legend('Rząd 2', 'Rząd 3', 'Rząd 4', 'Rząd 5', 'Rząd 6', 'Rząd 7');

%% FILTR CZYBYSZEWA
%%Rp=0.5
rzad=1;
Rp1=0.5;
for n=2:8

[b,a]=cheby1(n,Rp1,rzad,'s');
H=tf(b,a)

figure(1)
bode(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
figure(2)
step(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
figure(3)
pzmap(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
end
%% Rp= 1
rzad=1;
Rp2=1;
for n=2:8

[b,a]=cheby1(n,Rp2,rzad,'s');
H=tf(b,a)

figure(4)
bode(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
figure(5)
step(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
figure(6)
pzmap(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
end

%% Rp=3
rzad=1;
Rp3=3;
for n=2:8

[b,a]=cheby1(n,Rp3,rzad,'s');
H=tf(b,a)

figure(7)
bode(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
figure(8)
step(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
figure(9)
pzmap(H)
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
hold on
end

%%LP2LP
syms s
s=tf('s');
w2=2
filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
figure(1)
hold on
bode(filtr)
s = s/w2;
filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
bode(filtr);

%%LP2HP
syms s
s=tf('s');
w2=2
filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
figure(1)
hold on
bode(filtr)

s = 1/s;
filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
bode(filtr);

%%LP2BP
syms s
s=tf('s');
w2=2
filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
figure(1)
hold on
bode(filtr)

s = 1/s + s/1;
filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
figure(2)
bode(filtr);

%%LP2BS
syms s
s=tf('s');
w1=1
w2=2
w0=sqrt(w2*w1);
beta=w0/(w2-w1);

filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
s = 1/(beta*w0/s+s/w0);
filtr = 1/(s^3 + 2* s^2 + 2*s + 1);
figure(1)
bode(filtr);
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.