• Pulse and frequency characteristics of filters. Digital filters with finite impulse response. Data smoothing. Parabolic smoothing

    Physically feasible digital filters operate in real time; the following data can be used to generate an output signal at the i-th discrete moment in time:

    1. Values ​​of the output signal at the current time; also a certain number of past samples of the input signal: x(i-1), x(i-2), x(i-m);

    2. A certain number of previous samples of the output signal: y(i-1), y(i-2), y(i-n).

    The integers m and n determine the order of the digital filter. Filters are classified depending on how information about the past state of the system is used.

    FIR filters or non-recursive filters operating according to the following algorithm.

    M – filter order.

    A non-recursive filter performs weighting and summation of previous samples of the input signal. Past output samples are not used.

    H(z) – system function.

    The system function has m zeros and one pole, at z=0.

    The operating algorithm of a digital FIR filter is shown in Fig. 45.

    The main elements of the filter are blocks of delay of value samples by 1 sampling interval.

    Scale blocks that perform digital multiplication by weighting factors. From the output of the scale blocks, the signal enters the adder, where the output signal is calculated.

    This block diagram is not electrical, but serves as a graphic representation of the signal processing algorithm on a computer. The output and input data for such an algorithm are arrays of numbers.

    Let's apply the inverse Z-transform to the system functions and find the impulse response:

    (filter impulse response).

    The impulse response of an FIR filter contains a finite number of elements and the filter is always stable.

    Let's find the frequency response by performing a substitution

    T=1/fs – sampling interval.

    NOVOSIBIRSK STATE TECHNICAL UNIVERSITY

    FACULTY OF AUTOMATION AND COMPUTER ENGINEERING

    Department of Data Collection and Processing Systems

    Discipline "Theory and signal processing"

    LABORATORY WORK NO.10

    DIGITAL FILTERS

    WITH FINITE IMPULSE CHARACTERISTIC

    Group: AT-33

    Option: 1 Teacher:

    Student: Shadrina A.V. Assoc. Shchetinin Yu.I.

    Purpose of the work: study of methods for analysis and synthesis of finite impulse response filters using smoothing window functions.

    Getting the job done:

    1. Impulse response plots of a low-pass FIR filter with a rectangular window cutoff frequency for values ​​of filter length and .

    The impulse response of an ideal discrete FIR filter has infinite length and is non-zero for negative values ​​of :

    .

    In order to obtain a physically feasible filter, one should limit the impulse response to a finite number, and then shift the truncated response to the right by an amount.

    The value is the length (size) of the filter, – filter order.

    Matlab Script (labrab101.m)

    N = input("Enter filter length N = ");

    h = sin(wc.*(n-(N-1)/2))./(pi.*(n-(N-1)/2));

    xlabel("Reference number, n")

    >> subplot(2,1,1)

    >> labrab101

    Enter filter length N = 15

    >> title("Impulse response of FIR filter for N=15")

    >> subplot(2,1,2)

    >> labrab101

    Enter filter length N = 50

    >> title("Impulse response of FIR filter for N=50")

    Fig.1. Impulse response plots of a low-pass FIR filter with a rectangular window cutoff frequency for values ​​of filter length and

    Comment: If we consider the frequency response of a digital filter as a Fourier series: , then the coefficients of this series will represent the values ​​of the impulse response of the filter. In this case, the Fourier series was truncated in the first case to , and in the second - to , and then the truncated characteristics were shifted along the sample axis to the right to obtain a causal filter. When the width of the main lobe is 2, and when - 1, i.e. As the filter length increases, the main lobe of the impulse response narrows. If we consider the level of the side lobes (using ), then with increasing it increases in absolute value from to . Thus, we can conclude that when using an approximation of the ideal frequency response of a filter with a rectangular window, it is impossible to simultaneously narrow the main lobe (and thereby reduce the transition region) and reduce the levels of the side lobes (reduce ripple in the passband and stopband of the filter). The only controllable parameter of a rectangular window is its size, which can be used to influence the width of the main lobe; however, it does not have much effect on the side lobes.

    2. Calculation of the DTFT impulse characteristics from step 1 using the function. Graphs of their frequency response on a linear scale and in decibels for 512 frequency samples. Passband, transition band and stopband of the filter. The influence of the filter order on the width of the transition band and the level of frequency response ripple in the pass and stop bands.

    Matlab Function (DTFT.m)

    function = DTFT(x,M)

    N = max(M, length(x));

    % Reducing FFT to size 2^m

    N = 2^(ceil(log(N)/log(2)));

    % Calculate fft

    % Frequency vector

    w = 2*pi*((0:(N-1))/N);

    w = w - 2*pi*(w>=pi);

    % Shift FFT to range from -pi to +pi

    X = fftshift(X);

    w = fftshift(w);

    Matlab Script (labrab102.m)

    h1 = sin(wc.*(n1-(N1-1)/2))./(pi.*(n1-(N1-1)/2));

    h2 = sin(wc.*(n2-(N2-1)/2))./(pi.*(n2-(N2-1)/2));

    DTFT(h1,512);

    DTFT(h2,512);

    plot(w./(2*pi),abs(H1)./max(abs(H1)),,"r")

    xlabel("f, Hz"), ylabel("|H1|/max(|H1|)"), grid

    plot(w./(2*pi),abs(H2)./max(abs(H2)),"b")

    xlabel("f, Hz"), ylabel("|H2|/max(|H2|)"), grid

    plot(w./(2*pi),20*log10(abs(H1)),,"r")

    title("Frequency response of a low-pass FIR filter with a rectangular window for N = 15")

    xlabel("f, Hz"), ylabel("20lg(|H1|), dB"), grid

    plot(w./(2*pi),20*log10(abs(H2)),"b")

    title("Frequency response of a low-pass FIR filter with a rectangular window for N = 50")

    xlabel("f, Hz"), ylabel("20lg(|H2|), dB"), grid

    Fig.2. Frequency response plots of a low-pass FIR filter with a rectangular window cutoff frequency for filter length values ​​and on a linear scale

    Fig.3. Frequency response plots of a low-pass FIR filter with a rectangular window cutoff frequency for filter length values ​​and on a logarithmic scale

    Comment:

    Table.1. Range of passband, transition region and stopband for filter length and

    Filter length

    Bandwidth, Hz

    Transition region, Hz

    Stopband, Hz

    Finite impulse response filter (Non-recursive filter, FIR filter) or FIR filter (FIR is abbreviated from finite impulse response - finite impulse response) - one of the types of linear digital filters, a characteristic feature of which is the time limitation of its impulse response (from some point in time it becomes exactly equal to zero). Such a filter is also called non-recursive due to the lack of feedback. The denominator of the transfer function of such a filter is a certain constant.

    Dynamic characteristics

    where is the delta function. Then the impulse response of the FIR filter can be written as:

    #define N 100 // filter order float h[N] = ( #include “f1.h” ); //insert a file with known filter coefficients float x[ N] ; float y[ N] ; short my_FIR(short sample_data) ( float result = 0 ; for ( int i = N - 2 ; i >= 0 ; i-- ) ( x[ i + 1 ] = x[ i] ; y[ i + 1 ] = y[ i] ; ) x[ 0 ] = (float ) sample_data; for (int k = 0 ; k< N; k++ ) { result = result + x[ k] * h[ k] ; } y[ 0 ] = result; return ((short ) result) ; }

    See also

    Links

    • Calculation of an FIR filter with a linear phase-frequency response using the frequency sampling method

    Wikimedia Foundation. 2010.

    • Romodin, Vladimir Alexandrovich
    • Vokhma (river)

    See what a “Filter with finite impulse response” is in other dictionaries:

      Filter - get a valid BeTechno promotional code on Akademika or buy a profitable filter at a discount on sale at BeTechno

      finite impulse response filter- - Telecommunications topics, basic concepts EN finite impulse response (filter)FIR ... Technical Translator's Guide

      Infinite Impulse Response Filter- (Recursive filter, IIR filter) or IIR filter (IIR abbreviated from infinite impulse response infinite impulse response) linear electronic filter using one or more of its outputs as an input, that is ... ... Wikipedia

      FIR filter

      Non-recursive filter- A filter with a finite impulse response (non-recursive filter, FIR filter, FIR filter) is one of the types of linear electronic filters, a characteristic feature of which is the time limitation of its impulse response (from which ... Wikipedia

      Recursive filter- An infinite impulse response filter (Recursive filter, IIR filter) is a linear electronic filter that uses one or more of its outputs as an input, that is, it forms feedback. The main property of such filters is... Wikipedia

      Digital filter- A digital filter in electronics is any filter that processes a digital signal in order to isolate and/or suppress certain frequencies of this signal. Unlike a digital filter, an analog filter deals with an analog signal, its properties... ... Wikipedia

      Discrete filter- A digital filter in electronics is any filter that processes a digital signal in order to isolate and/or suppress certain frequencies of this signal. Unlike a digital analog filter, it deals with an analog signal; its properties are non-discrete,... ... Wikipedia

      Line filter- Linear filter is a dynamic system that applies a certain linear operator to the input signal to highlight or suppress certain signal frequencies and other functions for processing the input signal. Linear filters are widely used in... ... Wikipedia

      Moving average (filter)- This term has other meanings, see Moving average (meanings). Block diagram of a simple second-order FIR filter implementing a moving average Moving average, moving average is a type of digital filter with ... ... Wikipedia

      Moving average (values)- Moving average, moving average: Moving average is a family of functions whose value at each point of definition is equal to the average value of the original function for the previous period. Moving average... ...Wikipedia

    Lecture No. 10

    "Digital filters with finite impulse response"

    The transfer function of a physically realizable digital finite impulse response filter (FIR filter) can be represented as

    (10.1).

    When replacing in expression (10.1), we obtain the frequency response of the FIR filter in the form

    (10.2),

    Where - amplitude-frequency response (AFC) filter,

    - phase-frequency response (PFC) filter.

    Phase delay filter is defined as

    (10.3).

    Group delay filter is defined as

    (10.4).

    A distinctive feature of FIR filters is the ability to implement constant phase and group delays, i.e. linear phase response

    (10.5),

    where a - constant. If this condition is met, the signal passing through the filter does not distort its shape.

    To derive the conditions that ensure a linear phase response, we write the frequency response of the FIR filter taking into account (10.5)

    (10.6).

    Equating the real and imaginary parts of this equality, we obtain

    (10.7).

    Dividing the second equation by the first, we get

    (10.8).

    Finally we can write

    (10.9).

    This equation has two solutions. First when a =0 corresponds to the equation

    (10.10).

    This equation has a unique solution corresponding to an arbitrary h (0) (sin (0)=0), and h (n)=0 for n >0. This solution corresponds to a filter whose impulse response has a single non-zero sample at the initial time. Such a filter is not of practical interest.

    We will find another solution for . In this case, cross-multiplying the numerators and denominators in (10.8) we get

    (10.11).

    From here we have

    (10.12).

    Since this equation has the form of a Fourier series, its solution, if it exists, is unique.

    It is easy to see that the solution to this equation must satisfy the conditions

    (10.13),

    (10.14).

    From condition (10.13) it follows that for each filter order N there is only one phase delay a , at which strict linearity of the phase response can be achieved. From condition (10.14) it follows that the impulse response of the filter must be symmetrical about the point for odd N , and relative to the midpoint of the interval (Fig. 10.1).



    The frequency response of such a filter (for odd N ) can be written in the form

    (10.15).

    Making a substitution in the second amount m = N -1- n , we get

    (10.16).

    Since h (n)= h (N -1- n ), then the two sums can be combined


    (10.17).

    Substituting , we get

    (10.18).

    If we designate

    (10.19),

    then we can finally write

    (10.20).

    Thus, for a filter with a linear phase response we have

    (10.21).

    For the case of even N similarly we will have

    (10.22).

    Making a substitution in the second sum, we get

    (10.23).

    Making the substitution, we get

    (10.24).

    Having designated

    (10.25),

    we will finally have

    (10.26).

    Thus, for an FIR filter with linear phase response and even order N can be written

    (10.27).

    In what follows, for simplicity, we will consider only filters with an odd order.

    When synthesizing the filter transfer function, the initial parameters, as a rule, are the requirements for the frequency response. There are many techniques for synthesizing FIR filters. Let's look at some of them.

    Since the frequency response of any digital filter is a periodic function of frequency, it can be represented as a Fourier series

    (10.28),

    where the coefficients of the Fourier series are equal

    (10.29).

    It can be seen that the coefficients of the Fourier series h(n ) coincide with the filter impulse response coefficients. Therefore, if the analytical description of the required frequency response of the filter is known, then it is possible to easily determine the coefficients of the impulse response, and from them the transfer function of the filter. However, in practice this is not feasible, since the impulse response of such a filter has an infinite length. In addition, such a filter is not physically realizable since the impulse response begins at -¥ , and no finite delay will make this filter physically realizable.

    One possible method for obtaining an FIR filter that approximates a given frequency response is to truncate the infinite Fourier series and impulse response of the filter, assuming that h (n)=0 at . Then

    (10.30).

    Physical realizability of the transfer function H(z ) can be achieved by multiplying H(z) on .

    (10.31),

    Where

    (10.32).

    With such a modification of the transfer function, the amplitude characteristic of the filter does not change, and the group delay increases by a constant amount.

    As an example, let's calculate a low-pass FIR filter with a frequency response of the form

    (10.33).

    In accordance with (10.29), the filter impulse response coefficients are described by the expression

    (10.34).

    Now from (10.31) we can obtain an expression for the transfer function

    (10.35),

    Where

    (10.36).

    Amplitude characteristics of the calculated filter for various N are presented in Fig. 10.2.

    Fig.10.2

    Ripple in the passband and stopband occurs due to the slow convergence of the Fourier series, which, in turn, is caused by the presence of a discontinuity in the function at the cutoff frequency of the passband. These pulsations are known as Gibbs ripple.

    From Fig. 10.2 it is clear that with increasing N the pulsation frequency increases and the amplitude decreases at both lower and higher frequencies. However, the amplitude of the last ripple in the passband and the first ripple in the stopband remain practically unchanged. In practice, such effects are often undesirable, which requires finding ways to reduce Gibbs pulsations.

    Truncated impulse response h(n ) can be represented as the product of the required infinite impulse response and some window functions w (n) of length n (Fig. 10.3).

    (10.37).



    In the considered case of simple truncation of the Fourier series, we use rectangular window

    (10.38).

    In this case, the frequency response of the filter can be represented as a complex convolution

    (10.39).

    This means that it will be a "blurred" version of the required characteristic.

    The problem comes down to finding window functions that make it possible to reduce Gibbs ripple with the same filter selectivity. To do this, you must first study the properties of the window function using the example of a rectangular window.

    The spectrum of the rectangular window function can be written as

    (10.40).

    The spectrum of the rectangular window function is presented in Fig. 10.4.

    Fig.10.4

    Since at , the width of the main lobe of the spectrum turns out to be equal to .

    The presence of side lobes in the spectrum of the window function leads to an increase in Gibbs ripple in the frequency response of the filter. To obtain low ripple in the passband and high attenuation in the stopband, it is necessary that the area limited by the side lobes be a small fraction of the area limited by the main lobe.

    In turn, the width of the main lobe determines the width of the transition zone of the resulting filter. For high filter selectivity, the width of the main lobe should be as small as possible. As can be seen from the above, the width of the main lobe decreases with increasing filter order.

    Thus, the properties of suitable window functions can be formulated as follows:

    - the window function must be limited in time;

    - the spectrum of the window function should best approximate the frequency-limited function, i.e. have a minimum of energy outside the main lobe;

    - The width of the main lobe of the window function spectrum should be as small as possible.

    The most commonly used window functions are:

    1. Rectangular window. Discussed above.

    2. Hamming window.

    (10.41),

    Where .

    This window is called the Hann window ( hanning).

    3. Blackman window.


    (10.42).

    4. Bartlett's window.

    (10.43).

    The indicators of filters built using the specified window functions are summarized in Table 10.1.

    Window

    Main lobe width

    Ripple coefficient, %

    N=11

    N=21

    N=31

    Rectangular

    22.34

    21.89

    21.80

    Hanning

    2.62

    2.67

    2.67

    Hamming

    1.47

    0.93

    0.82

    Blackman

    0.08

    0.12

    0.12

    The ripple factor is defined as the ratio of the maximum amplitude of the side lobe to the amplitude of the main lobe in the spectrum of the window function.

    To select the required filter order and the most appropriate window function when calculating real filters, you can use the data in Table 10.2.

    transitional

    Unevenness

    transmittance (dB)

    Attenuation in

    barrage (dB)

    Rectangular

    Hanning

    Hamming

    Blackman

    As can be seen from Table 10.1, there is a certain relationship between the ripple coefficient and the width of the main lobe in the spectrum of the window function. The smaller the pulsation coefficient, the larger the width of the main lobe, and therefore the transition zone in the frequency response of the filter. To ensure low ripple in the passband, it is necessary to select a window with a suitable ripple coefficient, and provide the required width of the transition zone with an increased filter order N.

    This problem can be solved using the window proposed by Kaiser. The Kaiser window function has the form

    (10.44),

    where a is an independent parameter, , I 0 – Bessel function of the first kind of zero order, defined by the expression

    (10.45).

    An attractive property of the Kaiser window is the ability to smoothly change the pulsation coefficient from small to large values, while changing only one parameter a. In this case, as for other window functions, the width of the main lobe can be adjusted by the order of the filter N.

    The main parameters set when developing a real filter are:

    Bandwidth - w p ;

    Obstacle strip - w a ;

    The maximum permissible ripple in the passband is A p ;

    Minimum stopband attenuation – A a ;

    -sampling rate - ws.

    These parameters are illustrated in Fig. 10.5. In this case, the maximum ripple in the passband is determined as

    (10.46),

    and the minimum attenuation in the stopband is as

    The relatively simple procedure for calculating a filter with a Kaiser window includes the following steps:

    1. The impulse response of the filter h (n) is determined, provided the frequency response is ideal

    (10.48),

    where (10.49).

    2. Parameter d is selected as

    (10.50),

    Where (10.51).

    3. The true value of A a and A p is calculated using formulas (10.46), (10.47).

    4.Parameter a is selected as

    (10.52).

    5.Parameter D is selected as

    (10.53).

    6. Select the smallest odd value of the filter order from the condition

    (10.54),

    (10.57)

    it follows that

    Since the samples of the impulse response of the filter are the coefficients of its transfer function, condition (10.59) means that the codes of all filter coefficients contain only the fractional part and the sign bit and do not contain the integer part.

    The number of digits of the fractional part of the filter coefficients is determined from the condition of satisfying the filter transfer function with quantized coefficients, the specified requirements for approaching the reference transfer function with exact values ​​of the coefficients.

    The absolute values ​​of the filter input signal samples are usually normalized so that

    If the analysis is carried out for an FIR filter with a linear phase response, then the algorithm for calculating its output signal can be as follows

    where are the filter coefficients rounded to s k.

    This algorithm corresponds to the filter block diagram shown in Fig. 10.5.



    There are two ways to implement this algorithm. In the first case, all multiplication operations are performed exactly and there is no rounding of products. In this case, the bit depth of the products is equal to s in +s k, where s in is the bit depth of the input signal, and s k is the bit depth of the filter coefficients. In this case, the block diagram of the filter shown in Fig. 10.5 exactly corresponds to the real filter.

    In the second method of implementing algorithm (10.61), each result of the multiplication operation is rounded, i.e. products are calculated with some error. In this case, it is necessary to change the algorithm (10.61) so as to take into account the error introduced by rounding the products

    If the sample values ​​of the filter output signal are calculated using the first method (with exact values ​​of the products), then the dispersion of the output noise is determined as

    (10.66),

    those. depends on the variance of the rounding noise of the input signal and the values ​​of the filter coefficients. From here you can find the required number of bits of the input signal as

    (10.67).

    Using the known values ​​of s in and s k, one can determine the number of bits required for the fractional part of the output signal code as

    If the values ​​of the output signal samples are calculated using the second method, when each product is rounded to s d digits, then the dispersion of the rounding noise created by each of the multipliers can be expressed in terms of the digit capacity of the product as

    DR in and signal-to-noise ratio at the filter output SNR out. The dynamic range of the input signal in decibels is defined as

    (10.74),

    where A max and A min are the maximum and minimum amplitudes of the filter input signal.

    The signal-to-noise ratio at the filter output, expressed in decibels, is defined as

    (10.75),

    determines the root mean square value of the power of the output sinusoidal signal of the filter with amplitude A min, and

    (10.77)

    determines the noise power at the filter output. From (10.75) and (10.76) with A max =1 we obtain an expression for the dispersion of the filter output noise

    (10.78).

    This filter output noise dispersion value can be used to calculate the bit depth of the filter's input and output signals.

    Let's consider the simplest of digital filters - filters with constant parameters.

    The input signal of the digital filter is supplied in the form of a sequence of numerical values, following at intervals (Fig. 4.1, a). When each next signal value is received in the digital filter, the next value of the output signal is calculated. Calculation algorithms can be very diverse; during the calculation process, in addition to the last value of the input signal, can be used

    previous values ​​of the input and output signals: The output signal of a digital filter is also a sequence of numerical values ​​following an interval of . This interval is the same for the entire digital signal processing device.

    Rice. 4.1. Signal at the input and output of the digital filter

    Therefore, if you apply the simplest signal in the form of a single pulse to the input of a digital filter (Fig. 4.2, a)

    then at the output we get a signal in the form of a discrete sequence of numerical values, following at intervals

    By analogy with conventional analog circuits, we will call this response signal the impulse response of the filter (Fig. 4.2, b). Unlike the impulse response of an analog circuit, the function is dimensionless.

    Rice. 4.2. Unit impulse and impulse response of a digital filter

    Let us apply an arbitrary discrete signal to the filter input (Fig. 4.1, a), which is a set of discrete values

    Under the action of the first element, a sequence multiplied by is formed at the output of the filter; under the action, a sequence is multiplied by and shifted to the right by an amount, etc. As a result, the output will obtain the sequence where

    Thus, the output signal is defined as the discrete convolution of the input signal and the impulse response. In this respect, digital filters are similar to conventional circuits, where the output signal is equal to the convolution of the input signal and the impulse response.

    Formula (4.1) is a digital filtering algorithm. If the impulse response of a filter is described by a sequence with a finite number of terms, then the filter can be implemented in the form of a circuit shown in Fig. 4.3. Here the letter indicates the elements of signal delay for time (per cell); -elements that multiply the signal by the corresponding coefficient.

    The diagram shown in Fig. 4.3 is not an electrical circuit of a digital filter; This diagram is a graphical representation of the digital filtering algorithm and shows the sequence of arithmetic operations performed during signal processing.

    Rice. 4.3. Non-recursive digital filter circuit

    For digital filters that process signals in the form of abstract numerical sequences, the concept of “time delay” is not entirely correct. Therefore, elements that delay the signal by one cell are usually marked on digital filter circuits with a symbol indicating the signal delay in the language of -transformations. In what follows we will adhere to this notation.

    Let's return to the digital filter circuit shown in Fig. 4.3, Such filters, where only the values ​​of the input signal are used for calculation, are called simple or non-recursive.

    The non-recursive filter algorithm is easy to write if the impulse response of the filter is known. For the practical implementation of the algorithm, it is necessary that the impulse response contains a finite number of terms. If the impulse response contains an infinite number of terms, but they quickly decrease in value, then you can limit yourself to a finite number of terms, discarding those whose values ​​are small. If the elements of the impulse response do not decrease in value, the non-recursive filter algorithm turns out to be unrealizable.

    Rice. 4.4. -chain

    As an example, consider the simplest digital filter, similar to the -circuit (Fig. 4.4). The impulse response of the circuit has the form

    To write the impulse response of the corresponding digital filter, the expression should be replaced by However, the impulse response of a circuit has a dimension, and the impulse response of a digital filter must be dimensionless. Therefore, we omit the multiplier in expression (4.2) and write the impulse response of the digital filter in the form

    Such an impulse response contains infinitely many terms, but their magnitude decreases according to an exponential law, and we can limit ourselves to terms, choosing such that

    Now we can write the expression for the signal at the filter output

    This expression is also a digital filter algorithm. The diagram of this filter is shown in Fig. 4.5.

    The second approach to analyzing processes in digital filters is similar to the operator method of analyzing conventional analog circuits, only instead of the Laplace transform, the -transform is used.

    Rice. 4.5. Circuit of a non-recursive digital filter similar to a -circuit

    Let's define a digital filter parameter similar to the transfer function of an electrical circuit. To do this, apply a transformation to the impulse response of a digital filter:

    The function is called the system filter function.

    In accordance with expression (4.1), the signal at the output of the digital filter is equal to the discrete convolution of the input signal and the impulse response of the filter. Applying the convolution theorem to this expression, we obtain that the output signal transformation is equal to the input signal transformation multiplied by the system filter function:

    Thus, the system function plays the role of the transfer function of a digital filter.

    As an example, let us find the system function of a first-order digital filter similar to a -circuit:

    The third method of analyzing the passage of signals through digital filters is similar to the classical method of differential equations. Let's consider this method using order chains as an example.

    The simplest analog circuit of the 1st order is the -circuit (see Fig. 4.4), the passage of signals through which is described by the differential equation

    For a discrete circuit, instead of the differential equation (4.8), a difference equation should be written, where the input and output signals are specified for discrete times, and instead of the derivative, the difference of adjacent signal values ​​should appear. For a discrete 1st order circuit, the difference equation can be written in a fairly general form

    Let's apply the transformation to the equation

    where we find the system filter function

    Formula (4.10) is a fairly general expression for the system function of a 1st order digital filter. When it coincides with the previously obtained expression (4.7) for the system function of a digital filter equivalent to a -circuit.

    Let us find a digital filtering algorithm corresponding to the system function (4.10). To do this, we solve equation (4.9) for

    An equivalent diagram of this algorithm is shown in Fig. 4.6. Compared to a non-recursive filter (see Fig. 4.5), a kind of “feedback circuit” has been added here, which means that the values ​​of the output signal are used in subsequent

    Rice. 4.6. Circuit of a recursive digital filter similar to a -circuit

    calculations. Filters of this type are called recursive.

    Algorithm (4.11) corresponds to a filter that is completely equivalent to the non-recursive filter considered earlier. But to determine one value of the output signal using the non-recursive filter algorithm (4.4), it is necessary to perform operations, and when using the recursive filter algorithm (4.11), only two operations are required. This is the main advantage of recursive filters. In addition, recursive filters allow signal processing with higher accuracy, since they allow a more correct implementation of the impulse response without discarding its “tail”. Recursive filters allow you to implement algorithms that cannot be implemented at all using non-recursive filters. For example, with a filter operating according to the circuit in Fig. 4.6, is essentially an ideal accumulator-integrator and has an impulse response of the form A filter with such a characteristic cannot be implemented using a non-recursive scheme.

    The considered examples show that there is no point in using non-recursive algorithms to create digital filters with a long impulse response. In these cases, it is more appropriate to use recursive filters.

    The area of ​​application of non-recursive algorithms is the implementation of digital filters with an impulse response containing a small number of terms. An example is the simplest differentiator, the output signal of which is equal to the increment of the input signal:

    The circuit of such a digital filter is shown in Fig. 4.7.

    Rice. 4.7. Circuit of the simplest digital differentiator

    Let us now consider a general digital filter, which is described by the equation

    This equation can be considered both as a difference equation of order and as a digital filtering algorithm, if it is rewritten differently, namely

    Rice. 4.8. Recursive digital order filter circuit

    Algorithm (4.13) corresponds to the circuit shown in Fig. 4.8. Let us find the system function of such a filter. To do this, apply the transformation to the equation:

    Expression (4.14) allows us to establish a connection between the fluctuations of the elements of the filter circuit and the system function. The coefficients in the numerator of the system function determine the values ​​of the coefficients for

    (in the non-recursive part of the filter), and the coefficients in the denominator determine the recursive part of the filter.