As with analog linear systems, we need to find the frequency response of discrete-time systems. We used impedances to derive directly from the circuit's structure the frequency response. The only structure we have so far for a discrete-time system is the difference equation. We proceed as when we used impedances: let the input be a complex exponential signal. When we have a linear, shift-invariant system, the output should also be a complex exponential of the same frequency, changed in amplitude and phase. These amplitude and phase changes comprise the frequency response we seek. The complex exponential input signal is . Note that this input occurs for all values of . No need to worry about initial conditions here. Assume the output has a similar form: . Plugging these signals into the fundamental difference equation, we have
The frequency response of the simple IIR system (difference equation given in a previous example) is given by
The length- boxcar filter (difference equation found in a previous example) has the frequency response
Suppose we multiply the boxcar filter's coefficients by a sinusoid: Use Fourier transform properties to determine the transfer function. How would you characterize this system: Does it act like a filter? If so, what kind of filter and how do you control its characteristics with the filter's coefficients?
It now acts like a bandpass filter with a center frequency of and a bandwidth equal to twice of the original lowpass filter.
These examples illustrate the point that systems described (and implemented) by difference equations serve as filters for discrete-time signals. The filter's order is given by the number of denominator coefficients in the transfer function (if the system is IIR) or by the number of numerator coefficients if the filter is FIR. When a system's transfer function has both terms, the system is usually IIR, and its order equals regardless of . By selecting the coefficients and filter type, filters having virtually any frequency response desired can be designed. This design flexibility can't be found in analog systems. In the next section, we detail how analog signals can be filtered by computers, offering a much greater range of filtering possibilities than is possible with circuits.