50 likes | 161 Vues
This document delves into the design of elliptic filters using the `ellip` function, focusing on the impact of varying the normalized cutoff frequency parameter. It examines stability issues linked to high-order filters and roundoff errors in transfer function design. Practical examples illustrate the transfer function and zero-pole-gain designs, utilizing different characteristics such as order, passband, and stopband specifications. A comparison of results between transfer function and zero-pole-gain designs is also provided through graphical analysis.
E N D
Question • When designing the filter using [b,a] = ellip(7,1,80,0.95) we have a functional reconstruction filter. • However if you try different values for the 4th argument to the ellip function (this argument is the normalized cut off frequency) you can get some pretty weird results. Try [b,a] = ellip(7,1,80,0.9999)
You could check • How many orders do you need? [n,Wp] = ellipord(Wp,Ws,Rp,Rs) • Stability ? [z,p,k] = ellip(n,Rp,Rs,Wp) It returns the zeros and poles in length n column vectors z and p and the gain in the scalar k. zplane(z,p); • Limitations For higher order filters, numerical problems due to roundoff errors may occur when forming the transfer function using the [b,a] syntax.
Limitation check example • n = 7; • Rp = 1; Rs = 40; • Wn = 0.50; • ftype = 'low'; • % Transfer Function design • [b,a] = ellip(n,Rp,Rs,Wn,ftype); • h1=dfilt.df2(b,a); % This is an unstable filter. • % Zero-Pole-Gain design • [z, p, k] = ellip(n,Rp,Rs,Wn,ftype); • [sos,g]=zp2sos(z,p,k); • h2=dfilt.df2sos(sos,g); • % Plot and compare the results • hfvt=fvtool(h1,h2,'FrequencyScale','log'); • legend(hfvt,'TF Design','ZPK Design')
Limitation check example • n = 7; • Rp = 1; Rs = 40; • Wn = 0.9999; • ftype = 'low'; • % Transfer Function design • [b,a] = ellip(n,Rp,Rs,Wn,ftype); • h1=dfilt.df2(b,a); % This is an unstable filter. • % Zero-Pole-Gain design • [z, p, k] = ellip(n,Rp,Rs,Wn,ftype); • [sos,g]=zp2sos(z,p,k); • h2=dfilt.df2sos(sos,g); • % Plot and compare the results • hfvt=fvtool(h1,h2,'FrequencyScale','log'); • legend(hfvt,'TF Design','ZPK Design')