| Filter Design Toolbox | ![]() |
Designing the IIR Filter
Start to design the filter by clearing the MATLAB workspace and defining the four required vectors:
./) to perform element-wise division.
Use PBfreq and PBamp to generate the final frequency F and amplitude A vectors for our IIR filter. While defining these vectors, define edges and W, the edge and weight vectors.
F = [PBfreq .02 .0215 .025 1]; edges = [0 .0175 .02 .0215 .025 1]; A = [PBamp 0 0 0 0]; W = [ones(1,length(A)-1) 300];
Issuing these commands created four vectors in your MATLAB workspace. FDATool uses these vectors to create an IIR lowpass filter with a specified magnitude response curve. Vectors F and A each contain 40 elements, and vectors W and edges contain 40 and 6 elements. If we were not designing
a specific passband shape, you would not have needed to define these vectors.
Arbitrary Magnitude option to get precisely the curve we need. You could plot F and A to see that the curve is similar to the response in Figure 1-2. Use the command plot(F,A) to view a simple plot of the specified passband shape.
When you select Arbitrary Magnitude from the list, the options under Frequency and Magnitude Specifications change to require three vectors: Freq. vector, Mag. vector, and Weight vector.
Least Pth-norm from the list.
Normalized (0 to 1) from the Frequency Units list.
F, edges, A, and W.| Required Vector |
Variable |
| Freq. vector |
F |
| Freq. edges |
edges |
| Mag. vector |
A |
| Weight vector |
W |
8 for the numerator and denominator orders under Filter Order.
In the upper left corner, the plot shows the region of interest for this filter. Click
on the FDATool toolbar and use the zoom feature to inspect the filter passband between 0 and 0.05 (as shown in the figure). You see that the shape of the passband for the IIR filter generally matches the shape in Figure 1-2 (accounting for the shift from a linear to a logarithmic y-axis).
For now, we have an eighth-order, stable filter based on the direct form II transposed structure. It consists of one section.
| Getting Started with the Toolbox | Quantizing the IIR Filter | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |