Algorithm Enter the pass band ripple (rp) and stop band ripple (rs). Enter the pass band frequency...

60.1K

Verified Solution

Question

Electrical Engineering

Algorithm

  1. Enter the pass band ripple (rp) and stop band ripple (rs).
  2. Enter the pass band frequency (wp) and stop band frequency(ws).
  3. Get the sampling frequency (fs).
  4. Calculate normalized pass band frequency, and normalized stopband frequency w1 and w2respectively.           

w1 = 2 * wp/fs            

w2 = 2 * ws /fs

  1. Make use of the following function to calculate order offilter

Butterworth filterorder                       

[n,wn]=buttord(w1,w2,rp,rs)

  1. Design an nth order digital lowpass Butterworthfilter using the following statements. Butterworth filter [b,a]=butter (n, wn)

OR

Design an nth order digitalhigh pass Butterworth filter using the following statement.Butterworth filter [b,a]=butter (n, wn,’high’)

  1. Find the digital frequency response of the filter by using‘freqz( )’ function

[H,w]=freqz(b,a,512,fs)

  1. Calculate the magnitude of the frequency response in decibels(dB)

mag=20*log10 (abs (H))

  1. Plot the magnitude response [magnitude in dBversus normalizedfrequency (Hz)]
  2. Calculate the phase response using an = angle (H)
  3. Plot the phase response [phase in radians Vs normalizedfrequency (Hz)]

Program

Output

Answer & Explanation Solved by verified expert
4.0 Ratings (417 Votes)
    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students