Reply
Avnet Employee (Star Contributor)
Posts: 111
Registered: ‎07-07-2009

Building Filters using FIR Compiler and Simulink - Normalized Frequency explained

When building filters using Simulink and Xilinx FIR Compiler, I often get asked about "Normalized Frequency".  I'll try to explain it in terms we can all understand.

 

In the digital domain, a change in sample rate changes the frequency response of a system.  That's just life.  For example, a digital filter's effective cutoff frequency, stopband, etc change proportional to the sample rate.  It’s handy to normalize by the sample rate, so that it’s easy to analyze the filter’s characteristics when you decide to change the sample rate of your design.

 

MATLAB/Simulink uses several different methods for expressing period, frequency and sample rates. The Filter Design Assistant Tool (FDA Tool) normalizes frequency to half the sample rate (Nyquist), or Fs/2, and expresses frequency in terms of radians/sample.  Here’s how that works out:

 

           f   (cycles/sec)     2*f  (cycles)

     fn = ---- ------------- =  ---  -------- ;   Where fn is normalized freq; Fs is sample freq;

          Fs/2 (samples/sec)    Fs   (sample) ;   and f is your periodic signal being sampled.

 

Notice the units.  The seconds cancel out leaving you with units of cycles/sample, which is a common measure in DSP.  Thinking back to FDA Tool, it displays radians/sample in Normalized mode.   In order to get there, we recall that a sinusoid repeats every 2*pi (radians/cycle).   In our normalization we are looking at pi (radians/cycle).  Whenever we talk in terms of pi, we're referring to angular frequency (versus linear freq.).

 

     Wn = pi(radians/cycle) * fn(cycles/sample); = pi*fn (radians/sample);

 

For example, let's say I set my sample rate to Fs=100Msps and design the normalized cutoff frequency of a filter to be 0.2 rad/sample.  We can rearrange our original normalized equation to calculate the linear frequency.

 

           fn * Fs          0.2 (radians/sample)*100e6 (Msamples/sec)

     f  = ------------  =  ---------------------------------------- = 10 MHz

              2                               2

 

Now if I change my sample rate to Fs=80Msps, I can easily figure out that the same filter will have a cutoff frequency of 8MHz.

 

The MathWorks has a table of Time and Frequency Terminology that might be helpful.

 

http://www.mathworks.de/access/helpdesk_r13/help/toolbox/dspblks/ch_sign4.html

 

This will become second nature after working in MATLAB/Simulink for a little while, but it's always fun to revisit first priciples.