Advertisement
Ostu

Untitled

Apr 27th, 2021
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.09 KB | None | 0 0
  1. s=tf('s');
  2. L=[1];
  3. M5=[1 3.236 5.235 5.235 3.236 1];
  4. H5=tf(L,M5)
  5. %% Filtr dolnoprzepustowy 300Hz
  6. f1=300;
  7. wg_dp=2*pi*f1;
  8. s_dp=s/wg_dp
  9. 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)
  10. %% Filtr górnoprzepustowy 2kHz
  11. f2=2000;
  12. wg_gp=2*pi*f2;
  13. s_gp=wg_gp/s
  14. 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)
  15. %% Filtr pasmowoprzepustowy
  16. f3=1500;
  17. f4=3000;
  18. wg1_p=2*pi*f3;
  19. wg2_p=2*pi*f4;
  20. w0_p=sqrt(wg1_p*wg2_p);
  21. beta_p=w0_p/(wg2_p-wg1_p);
  22. s_p=beta_p*((s/w0_p)+(w0_p/s))
  23. 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)
  24. %% Filtr pasmowozaporowy
  25. f5=1500;
  26. f6=3000;
  27. wg1_z=2*pi*f5;
  28. wg2_z=2*pi*f6;
  29. w0_z=sqrt(wg1_z*wg2_z);
  30. beta_z=w0_z/(wg2_z-wg1_z);
  31. s_z=1/(beta_z*((s/w0_z)+(w0_z/s)))
  32. 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)
  33. %% Charakterystki
  34. figure(1)
  35. bode(G_dp,G_gp)
  36. legend('Filtr dolnoprzepustowy','Filtr górnoprzepustowy')
  37. figure(2)
  38. bode(G_p,G_z)
  39. legend('Filtr pasmowoprzepustowy','Filtr pasmowozaporowy')
  40. figure(3)
  41. bode(G_p)
  42. legend('Filtr pasmowoprzepustowy')
  43. figure(4)
  44. bode(G_z)
  45. legend('Filtr pasmowozaporowy')
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement