Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

FIR Example

An example sinewave input signal is shown in Fig.5.7(a), and the output of a length $ N=128$ FIR ``running sum'' filter is shown in Fig.5.7(b). These signals were computed by the following matlab code:

  Nx = 1024; % input signal length (nonzero portion)
  Nh = 128;  % FIR filter length
  A = 1; B = ones(1,Nh); % FIR "running sum" filter
  n = 0:Nx-1;
  x = sin(n*2*pi*7/Nx);  % input sinusoid - zero-pad it:
  zp=zeros(1,Nx/2); xzp=[zp,x,zp]; nzp=[0:length(xzp)-1];
  y = filter(B,A,xzp);   % filtered output signal
We know that the transient response must end $ \texttt{Nh}-1=127$ samples after the input sinewave switches on, and the decay-time lasts the same amount of time after the input signal switches back to zero.

Since the coefficients of an FIR filter are also its nonzero impulse response samples, we can say that the duration of the transient response equals the length of the impulse response minus one.

For Infinite Impulse Response (IIR) filters, such as the recursive comb filter analyzed in Chapter 3, the transient response decays exponentially. This means it is never really completely finished. In other terms, since its impulse response is infinitely long, so is its transient response, in principle. However, in practice, we treat it as finished for all practical purposes after several time constants of decay. For example, seven time-constants of decay correspond to more than 60 dB of decay, and is a common cut-off used for audio purposes. Therefore, we can adopt $ t_{60}$ as the definition of decay time (or ``ring time'') for typical audio filters. See [84]6.5 for a detailed derivation of $ t_{60}$ and related topics. In summary, we can say that the transient response of an audio filter is over after $ t_{60}$ seconds, where $ t_{60}$ is the time it takes the filter impulse response to decay by $ 60$ dB.


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Introduction to Digital Filters with Audio Applications'', by Julius O. Smith III, (September 2007 Edition)
Copyright © 2024-09-03 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA