Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s=tf('s');
- L=[1];
- M5=[1 3.236 5.235 5.235 3.236 1];
- H5=tf(L,M5)
- %% Filtr dolnoprzepustowy 300Hz
- f1=300;
- wg_dp=2*pi*f1;
- s_dp=s/wg_dp
- G_dp=1/(s_dp^5+3.236*s_dp^4+5.235*s_dp^3+5.235*s_dp^2+3.236*s_dp+1)
- %% Filtr górnoprzepustowy 2kHz
- f2=2000;
- wg_gp=2*pi*f2;
- s_gp=wg_gp/s
- G_gp=1/(s_gp^5+3.236*s_gp^4+5.235*s_gp^3+5.235*s_gp^2+3.236*s_gp+1)
- %% Filtr pasmowoprzepustowy
- f3=1500;
- f4=3000;
- wg1_p=2*pi*f3;
- wg2_p=2*pi*f4;
- w0_p=sqrt(wg1_p*wg2_p);
- beta_p=w0_p/(wg2_p-wg1_p);
- s_p=beta_p*((s/w0_p)+(w0_p/s))
- G_p=1/(s_p^5+3.236*s_p^4+5.235*s_p^3+5.235*s_p^2+3.236*s_p+1)
- %% Filtr pasmowozaporowy
- f5=1500;
- f6=3000;
- wg1_z=2*pi*f5;
- wg2_z=2*pi*f6;
- w0_z=sqrt(wg1_z*wg2_z);
- beta_z=w0_z/(wg2_z-wg1_z);
- s_z=1/(beta_z*((s/w0_z)+(w0_z/s)))
- G_z=1/(s_z^5+3.236*s_z^4+5.235*s_z^3+5.235*s_z^2+3.236*s_z+1)
- %% Charakterystki
- figure(1)
- bode(G_dp,G_gp)
- legend('Filtr dolnoprzepustowy','Filtr górnoprzepustowy')
- figure(2)
- bode(G_p,G_z)
- legend('Filtr pasmowoprzepustowy','Filtr pasmowozaporowy')
- figure(3)
- bode(G_p)
- legend('Filtr pasmowoprzepustowy')
- figure(4)
- bode(G_z)
- legend('Filtr pasmowozaporowy')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement