# Translations:The shaping filter/15/en

How is a shaping filter designed? Let us illustrate. The mathematical derivations are the same for either a causal or a noncausal filter, as long as we remember to let the filter index run from 0 to *N* on the causal filter and from –*N* to *N* on the noncausal filter. The purpose of the shaping filter is to shape (as well as possible in the least-squares sense) the input signal *x* into the desired output signal *z*. In other words, the actual output *y* of the filter should approximate the desired output. The error is the difference between the desired output and the actual output; that is, the value of the error signal at time *k* is . The basic principle for our filter design is the least-squares criterion: Minimize the energy of the error signal. In other words, we seek the filter coefficients that minimize the value of the error energy