Notes
Notes - notes.io |
eps = [0.5,1,3];
for i = 1:1:3
eps(i) = sqrt((10^(eps(i)/10))-1);
end
for j = 1:1:3
for n = 2:1:8
if(mod(n,2) == 0) % uwzglednienie rzedow przarzystych
H=tf(1,1);
for k = 1:1:n/2
alfak = ((2*k - 1) * pi)/(2*n): % wspolczynnik pomocniczy
u = (1/n).* asinh(1/eps(j));
Bk = 1/(cosh(u)^2 - cos(alfak)^2);
Ak = 2 * Bk * sinh(u) * cos(alfak);
% wyznaczamy pulsacje omega c
omega_c = 1/(cosh((1/n) * acosh(sqrt((2 * eps(j)^2 + 1)/eps(j)^2))));
ak = Ak/omega_c;
bk = Bk/(omega_c^2);
H = H * tf(1,[bk ak 1])
end
end
if(mod(n,2) == 1) % uwzglednienie rzedow nieparzystych
u = asinh(1/eps(j))/n;
B1 = 0;
Al = 1/sinh(u);
omega_c=1/(cosh((1/n)*acosh(sqrt((2*(eps(j)^2)+1)/eps(j)^2))));
a1 = A1/omega_c;
b1 = B1/(omega_c.^2);
H = tf(1,[b1 a1 1])
for k = 2:1:((n+1)/2)
betak = ((k-1) * pi)/n; % - wspolczynnik pomocniczy
Bk = 1/((cosh(u)^2) - (cos(betak)^2));
Ak = 2 * Bk * sinh(u) * cos(betak);
ak = Ak/omega_c;
bk = Bk/(omega_c^2);
H = H * tf(1,[bk ak 1])
end
end
figure(j);
hold on
bode(H);
hold off
figure(j+3);
hold on
step(H);
hold off
figure(j+6):
hold on
pzmap(H);
hold off'
end
end
BUTTERWORTH!!!
for n = 2 : 1 : 8
% Rzad parzysty
if(mod(n, 2) == 0)
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
% Brad nieparzysty
elseif(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
BESSEL!!!
for n = 2 : 1 : 8
for i= n : -1: 1
if i==n
B(i)=tf(2*i-1,[1,0]);
else
B(i)=tf(2*i-1,[1,0])+(1/B(i+1));
end
end
num=B.num{1};
den=B.den{1};
Q=tf(num,1)+tf(den,1);
k=Q.num{1}(size*(Q.num{1},2));
Bessel(n)=k/Q;
end
for n = 2 : 1 : 8
figure(1)
grid on
hold on
bode(Bessel(n))
end
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
for n = 2 : 1 : 8
figure(2)
grid on
hold on
step(Bessel(n))
end
legend('n=2','n=3','n=4','n=5','n=6','n=7','n=8')
|
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