27-07-2012, 03:22 PM
Algorithm
Algorithms.docx (Size: 14.03 KB / Downloads: 26)
1 Enter pass band and stop band ripple (rp and rs).
2 Enter pass band and stop band frequencies (fp and fs).
3 Get the sampling frequency (f) and Beta value.
4 Calculate the analog pass band edge frequency w1 and w2.
where w1 =2* fp /f
w2. =2* fs /f
5 Calculate the numerator and denominator.
6 Use an if condition to choose either Rectangular or Triangular or Kaiser windowing technique.
7 Use rectwin, triang and Kaiser Commands.
8 Calculate magnitude of frequency response in dB {20*log10(abs (w))}.
9 Plot magnitude response by giving relevant names to X & Y-axis and Title for plot.