You get a bonus - 1 coin for daily activity. Now you have 1 coin

Farrow filters using the example of a third-order filter. Resampling signals

Lecture



To change the sampling frequency, or to shift the discrete signal in phase by a value smaller than the sampling interval, it is necessary to present the discrete signal as a continuous function of time and resampling it or else they say resampling.
Let there be Farrow filters using the example of a third-order filter.  Resampling signals discrete signal samples Farrow filters using the example of a third-order filter.  Resampling signalsFarrow filters using the example of a third-order filter.  Resampling signals . You need to resample and get Farrow filters using the example of a third-order filter.  Resampling signals discrete signal samples Farrow filters using the example of a third-order filter.  Resampling signals as shown in Figure 1. The sampling interval Farrow filters using the example of a third-order filter.  Resampling signals . Black shows the original signal, red - the result of resampling.
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 1: Signal before and after resampling
In order to perform resampling, it is necessary for the existing discrete signal Farrow filters using the example of a third-order filter.  Resampling signalsFarrow filters using the example of a third-order filter.  Resampling signals interpolate, i.e. continuous signal recovery Farrow filters using the example of a third-order filter.  Resampling signals then calculate its discrete values ​​for each new Farrow filters using the example of a third-order filter.  Resampling signals . Interpolation can be done in various ways, in this article we will discuss polynomial interpolation.
Polynomial interpolation. Polynomial representation
In the course of mathematical analysis it is proved that through Farrow filters using the example of a third-order filter.  Resampling signals points passes a polynomial Farrow filters using the example of a third-order filter.  Resampling signals degrees Farrow filters using the example of a third-order filter.  Resampling signals and with only one. For example, through two points it is possible to draw only one straight line, through three points only one parabola, and so on. Respectively through Farrow filters using the example of a third-order filter.  Resampling signalsFarrow filters using the example of a third-order filter.  Resampling signals you can also draw a single polynomial of degree Farrow filters using the example of a third-order filter.  Resampling signals which will be the result of interpolation, that is:
Farrow filters using the example of a third-order filter.  Resampling signals

(one)

Where Farrow filters using the example of a third-order filter.  Resampling signals - coefficients of the polynomial, which must be calculated based on the signal samples Farrow filters using the example of a third-order filter.  Resampling signals Then substituting the necessary values Farrow filters using the example of a third-order filter.  Resampling signals resampling is possible.
Consider the expression (1) in more detail, namely, open the sum:
Farrow filters using the example of a third-order filter.  Resampling signals

(2)

Put out in expression (2) Farrow filters using the example of a third-order filter.  Resampling signals for brackets:
Farrow filters using the example of a third-order filter.  Resampling signals

(3)

We will again Farrow filters using the example of a third-order filter.  Resampling signals for brackets:
Farrow filters using the example of a third-order filter.  Resampling signals

(four)

Thus enduring the possible number of times Farrow filters using the example of a third-order filter.  Resampling signals for brackets, we get a set of nested brackets:
Farrow filters using the example of a third-order filter.  Resampling signals

(five)

A scheme for calculating the values ​​of a polynomial (5) with known coefficients is presented in Figure 2.
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 2: Calculation of a polynomial for a given Farrow filters using the example of a third-order filter.  Resampling signals at known coefficients
The first multiplier returns Farrow filters using the example of a third-order filter.  Resampling signals then added Farrow filters using the example of a third-order filter.  Resampling signals the “innermost brackets” of the expression (5) is obtained Farrow filters using the example of a third-order filter.  Resampling signals . "Innermost brackets" are multiplied by Farrow filters using the example of a third-order filter.  Resampling signals and so on all the brackets are collected and it turns out Farrow filters using the example of a third-order filter.  Resampling signals .
Consider an example for Farrow filters using the example of a third-order filter.  Resampling signals . Get the cubic polynomial:
Farrow filters using the example of a third-order filter.  Resampling signals

(6)

The scheme for calculating a cubic polynomial is presented in Figure 3.
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 3: Cubic polynomial calculation scheme
Thus, we need to get the coefficients of the polynomial Farrow filters using the example of a third-order filter.  Resampling signals based on discrete readings Farrow filters using the example of a third-order filter.  Resampling signals . To do this, you can create a system of linear equations:
Farrow filters using the example of a third-order filter.  Resampling signals

(7)

However, this requires solving the system of equations for each new value Farrow filters using the example of a third-order filter.  Resampling signals . In addition, to solve the system of equations, matrix inversion is required, which is impossible to provide in real time, since for matrix inversion Farrow filters using the example of a third-order filter.  Resampling signals multiplication operations. Thus, to construct a cubic polynomial with Farrow filters using the example of a third-order filter.  Resampling signals 64 multiplications required! Of course, such an approach cannot be applied in practice. Next, the Farrow filter for constructing a cubic polynomial using only three multiplications will be considered.
Orthogonal Lagrange polynomials. Farrow Filter
When constructing Farrow filters, orthogonal Lagrange polynomials are used. Then a continuous signal Farrow filters using the example of a third-order filter.  Resampling signals can be represented as the sum of the product of its counts Farrow filters using the example of a third-order filter.  Resampling signals to the corresponding Lagrange polynomial Farrow filters using the example of a third-order filter.  Resampling signals :
Farrow filters using the example of a third-order filter.  Resampling signals

(eight)

Polynom lagrange is polynom of degree Farrow filters using the example of a third-order filter.  Resampling signals equal to one with Farrow filters using the example of a third-order filter.  Resampling signals where Farrow filters using the example of a third-order filter.  Resampling signals - sampling time Farrow filters using the example of a third-order filter.  Resampling signals - of the first counting and equal to zero at other moments of discretization. Figure 4 shows the cubic Lagrange polynomials for Farrow filters using the example of a third-order filter.  Resampling signals

Figure 4: Lagrange polynomials for N = 4
Sampling times selected Farrow filters using the example of a third-order filter.  Resampling signals . Each of the polynomials is equal to one at one of the sampling times and is zero in the others (this is indicated by markers).
It is very important at this stage to understand that for Farrow filters using the example of a third-order filter.  Resampling signals signal samples used Farrow filters using the example of a third-order filter.  Resampling signals different polynomials. Each Lagrange polynomial can be written in the form:

Farrow filters using the example of a third-order filter.  Resampling signals

(9)

Where Farrow filters using the example of a third-order filter.  Resampling signals and Farrow filters using the example of a third-order filter.  Resampling signals sampling points.
We write the Lagrange polynomials for Farrow filters using the example of a third-order filter.  Resampling signals and sampling points Farrow filters using the example of a third-order filter.  Resampling signals :
Farrow filters using the example of a third-order filter.  Resampling signals

(ten)

Lagrange Polynomials:
Farrow filters using the example of a third-order filter.  Resampling signals

(eleven)

Substitute the expression for the discretization points (10) in (11) and open all the brackets we get:
Farrow filters using the example of a third-order filter.  Resampling signals

(12)

Similarly, you can paint the Lagrange polynomials for any Farrow filters using the example of a third-order filter.  Resampling signals .
We will complete the Farrow filter synthesis for Farrow filters using the example of a third-order filter.  Resampling signals using cubic Lagrange polynomials (12). With Farrow filters using the example of a third-order filter.  Resampling signals expression (8):
Farrow filters using the example of a third-order filter.  Resampling signals

(13)

Since each of the Lagrange polynomials is a cubic polynomial, Farrow filters using the example of a third-order filter.  Resampling signals in expression (13) is the sum of cubic polynomials, which means Farrow filters using the example of a third-order filter.  Resampling signals also cubic polynomial with coefficients Farrow filters using the example of a third-order filter.  Resampling signals , Farrow filters using the example of a third-order filter.  Resampling signals .
We only need to calculate these coefficients. Substitute the polynomials (12) in the expression (13):
Farrow filters using the example of a third-order filter.  Resampling signals

(14)

We open the brackets and give similar relative degrees. Farrow filters using the example of a third-order filter.  Resampling signals , we get a cubic polynomial:
Farrow filters using the example of a third-order filter.  Resampling signals

(15)

Which coefficients are equal:
Farrow filters using the example of a third-order filter.  Resampling signals

(sixteen)

Each of the coefficients of the cubic polynomial (15) depends on the samples of the original signal. Wherein Farrow filters using the example of a third-order filter.  Resampling signals depend on the four previous values. Thus, the coefficients of polynomial (15), in accordance with formula (16), can be obtained using FIR filters of the third order. Figure 5 shows an example of calculating a polynomial coefficient. Farrow filters using the example of a third-order filter.  Resampling signals using FIR filter.
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 5: Calculation of the coefficient of a polynomial Farrow filters using the example of a third-order filter.  Resampling signals using a third order FIR filter
Similarly, you can draw the structure of FIR filters to calculate the remaining coefficients.
Earlier in Figure 3, a cubic polynomial scheme was presented with known coefficients. We found that the coefficients of a polynomial are third order filters. Now we can present the final structure of the third-order Farrow filter. This structure is shown in Figure 6.
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 6: Third-order Farrow Filter
Filters for calculating polynomial coefficients based on signal samples are represented by different colors: Farrow filters using the example of a third-order filter.  Resampling signals - black Farrow filters using the example of a third-order filter.  Resampling signals - red Farrow filters using the example of a third-order filter.  Resampling signals - blue Farrow filters using the example of a third-order filter.  Resampling signals - green. Gray marked branches multiplied by zero, which can be discarded from the scheme. According to the scheme, it is easy to calculate that the calculation of all coefficients of a polynomial requires 9 non-trivial multiplications (multiplication by zero and Farrow filters using the example of a third-order filter.  Resampling signals considered trivial). This is not 64 as required for the direct solution of the system of equations, but not three as stated above.
Modified Farrow Filter
Let's optimize the structure shown in Figure 6. To do this, consider carefully the expression for the coefficients of the polynomial (16). It is easy to notice that:
Farrow filters using the example of a third-order filter.  Resampling signals

(17)

In addition, you can pay attention:
Farrow filters using the example of a third-order filter.  Resampling signals

(18)

Then from (18) it follows that
Farrow filters using the example of a third-order filter.  Resampling signals

(nineteen)

Look further:

Farrow filters using the example of a third-order filter.  Resampling signals (20)
Then from (20) it follows:

Farrow filters using the example of a third-order filter.  Resampling signals

(21)

Then the expression for the coefficients of the polynomial can be represented in the form:

Farrow filters using the example of a third-order filter.  Resampling signals

(22)

As stated, only three multiplications! The scheme that implements the calculation of a polynomial based on (22), called the modified Farrow filter, is presented in Figure 7.
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 7: Third-order modified Farrow filter
At the first stage, the coefficient is formed Farrow filters using the example of a third-order filter.  Resampling signals (black branches), then it is used to calculate the coefficient Farrow filters using the example of a third-order filter.  Resampling signals blue branches. Further coefficients Farrow filters using the example of a third-order filter.  Resampling signals and Farrow filters using the example of a third-order filter.  Resampling signals used to calculate Farrow filters using the example of a third-order filter.  Resampling signals . Coefficient Farrow filters using the example of a third-order filter.  Resampling signals just removed after the second delay.
At this, the synthesis of the third-order Farrow filter can be considered complete and summarize some results:
1. A third-order Farrow filter has been synthesized that allows to obtain the value of a continuous signal at any time based on polynomial interpolation.
2. The filter of the third order requires only 3 multiplication operations and can be applied in real time.
Up to this point we have not said anything about the meaning Farrow filters using the example of a third-order filter.  Resampling signals required to be calculated Farrow filters using the example of a third-order filter.  Resampling signals . The filter was synthesized based on the following initial data: there are 4 samples taken at time points Farrow filters using the example of a third-order filter.  Resampling signals . Accordingly, in order to get the value of the polynomial Farrow filters using the example of a third-order filter.  Resampling signals value Farrow filters using the example of a third-order filter.  Resampling signals should be in the range of -2 to 1, while Farrow filters using the example of a third-order filter.  Resampling signals corresponds to the sampling time Farrow filters using the example of a third-order filter.  Resampling signals , but Farrow filters using the example of a third-order filter.  Resampling signals corresponds to the sampling time Farrow filters using the example of a third-order filter.  Resampling signals . Value Farrow filters using the example of a third-order filter.  Resampling signals must be recalculated in the interval from -2 to 1.
Resampling examples
Consider an example. Let there be 4 samples of the signal Farrow filters using the example of a third-order filter.  Resampling signals , Farrow filters using the example of a third-order filter.  Resampling signals , Farrow filters using the example of a third-order filter.  Resampling signals , Farrow filters using the example of a third-order filter.  Resampling signals taken at a sampling frequency of 1 kHz, i.e. Farrow filters using the example of a third-order filter.  Resampling signals sec, Farrow filters using the example of a third-order filter.  Resampling signals sec, Farrow filters using the example of a third-order filter.  Resampling signals sec and Farrow filters using the example of a third-order filter.  Resampling signals sec (Figure 8). Calculate the value of the signal at time Farrow filters using the example of a third-order filter.  Resampling signals sec
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 8: Normalizing the time scale
The scale is normalized according to the following formula:
Farrow filters using the example of a third-order filter.  Resampling signals

(23)

In our case:
Farrow filters using the example of a third-order filter.  Resampling signals (24)
Calculate the polynomial coefficients based on the modified third degree Farrow filter (22):
Farrow filters using the example of a third-order filter.  Resampling signals

(25)

Then the value of the signal at time Farrow filters using the example of a third-order filter.  Resampling signals equally:
Farrow filters using the example of a third-order filter.  Resampling signals

(26)

Figure 9 shows the polynomial and the value of a polynomial at a given point.
Farrow filters using the example of a third-order filter.  Resampling signals
Figure 9: Calculation Example Based on Farrow Filter
It should be noted that using such an approach it is impossible to calculate values ​​beyond the interval of taking four samples, i.e. Farrow filters using the example of a third-order filter.  Resampling signals Or Farrow filters using the example of a third-order filter.  Resampling signals . In the previous example, it is impossible to calculate the signal value from these four samples, for example, for Farrow filters using the example of a third-order filter.  Resampling signals , because Farrow filters using the example of a third-order filter.  Resampling signals . Of course, it is possible to calculate more precisely, but the value will not correspond to reality. With the greatest accuracy, the signal values ​​are calculated at normalized Farrow filters using the example of a third-order filter.  Resampling signals from -1 to 0. In practice, you should strive to recalculate the time scale in the interval from -1 to 0.
To change the sampling frequency, it is necessary to recalculate the time for sampling times in the range from -1 to 0. Figure 10 shows an example of resampling for a signal with a frequency of 3 kHz (red graph) digitized with a sampling frequency of 20 kHz to a frequency of 24 kHz (blue graph) .

Figure 10: Example of resampling a signal using Farrow 3-order filter
findings
It can be seen that after the oscillation one resampling there is an integer number of counts (8 pieces), while before resampling there were distortions caused by a non-integer number of counts per oscillation period. Since the sampling frequency increased from 20 to 24 kHz (6/5 times), every sixth count after resampling coincides with every fifth count before resampling (marked with markers).
Thus, the article describes the procedure for calculating the Farrow filter using the example of a third order filter. Modified filter to reduce computational operations. Shows an example of resampling the signal for a fractional change in the sampling rate

Comments

Ivan
06-05-2022
Я, конечно, всё понимаю, но залепить половину картинок с формулами рекламой с сайта - это просто ужас. Хуже некуда. Статья по содержанию хорошая, те, кто публиковали её и отвечали за надписи - просто огромный минус за непрофессионализм.
Ivan
06-05-2022
Исправьте рисунок 4, он отсутствует. Если пишете статьи, то делайте это по нормальному.
Админ
07-05-2022
Спасибо, обновили - лого сделали прозрачными защитные лого и исправили текст связанный с рисунком 4
Ivan
08-05-2022
Устраните ту же самую проблему с логотипом на рисунке 9.

To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Digital signal processing

Terms: Digital signal processing