METHOD FOR COMPENSATING GAIN FLATNESS OF TRANSCEIVER

20200395968 ยท 2020-12-17

    Inventors

    Cpc classification

    International classification

    Abstract

    The present disclosure provides a method for compensating gain flatness of a transceiver including: a method for compensating gain flatness of a receiver, which compensates gain flatness of a receiving channel by using a complex-coefficient FIR filter in digital domain; and a method for compensating gain flatness of a transmitter, which compensates gain flatness of a transmitting channel by using a complex-coefficient FIR filter in digital domain. The method according to the present disclosure can balance compensation accuracy and calculation amount flexibly, and can focus on compensating the gain flatness at an edge of a frequency band, obtaining good performance with less calculation amount.

    Claims

    1. A method for compensating gain flatness of a receiver, by compensating gain flatness of a receiving channel using a complex-coefficient FIR filter in digital domain, the method comprising: converting a signal received by an ADC into an IQ signal with zero-intermediate frequency; setting, by a signal generator, f.sub.cf.sub.s/2 as a starting frequency point, transmitting single-tone signals at N frequency points with an frequency interval of f.sub.s/N, and calculating a power P.sub.n of each frequency point in the digital domain, wherein f.sub.c represents a center frequency of the receiving channel, f.sub.s represents a sampling rate of a digital signal, and N takes a value of an integer power of 2; calculating the gain flatness in a whole f.sub.s bandwidth based on a power of the center frequency f.sub.c of the receiving channel to obtain a sequence P.sub.n; adding linear phase information to P.sub.n to construct a complex sequence X.sub.n of N points; performing an IFFT transformation of N points on X.sub.n to obtain a frequency response Y.sub.n; approximating the frequency response Y.sub.n using a complex sequence Z.sub.q of Q points, wherein Q is chosen from a suitable integer; and constructing a Q-order complex FIR filter with Z.sub.q as a coefficient of the filter in the digital domain, filtering the IQ signal, and obtaining a filtering result as data after compensating the gain flatness.

    2. The method of claim 1, wherein a power of an input signal is calculated by the following formula by using an amplitude of the IQ signal in the digital domain:
    P=10*log.sub.10((.sub.m=0.sup.M1I.sub.m.sup.2+Q.sub.m.sup.2)/M), wherein M represents the number of points for calculating the power.

    3. The method of claim 1, wherein the sequence P.sub.n is calculated by the following formula:
    P.sub.n=10.sup.(P.sup.n.sup.P.sup.N/2.sup.)/20,n=0,1,2 . . . N1, wherein P.sub.N/2 is a power point corresponding to the center frequency f.sub.c of the receiving channel.

    4. The method of claim 1, wherein the adding the linear phase information to P.sub.n to construct the complex sequence X.sub.n of N points is calculated by the following formula:
    X.sub.n=P.sub.n*e.sup.j(N/2n)*(N1)/N,n=0,1,2 . . . N1.

    5. The method of claim 1, wherein the performing the IFFT transformation of N points on X.sub.n to obtain the frequency response Y.sub.n comprising: performing a shift processing on X.sub.n to obtain X.sub.n, and performing the IFFT transformation on X.sub.n to obtain the frequency response Y.sub.n; wherein the shift processing is performed by the following formula: X n = { X n + N / 2 if .Math. .Math. n < N / 2 X n - N / 2 if .Math. .Math. n N / 2 .

    6. The method of claim 1, further comprising: giving single-tone signals at a plurality of frequency points (f.sub.1, f.sub.2, . . . , f.sub.n) different amplitudes (G.sub.1, G.sub.2, . . . , G.sub.n), wherein the single-tone signals at an edge of a frequency band are given an amplitude of a relative large G value, and the single-tone signals at other part of the frequency band are given an amplitude of a relative small G value; using the single-tone signals at the plurality of the frequency points as an excitation source of the filter; calculating half of the Y.sub.n to obtain half of the Z.sub.q; and obtaining the Z.sub.q for best approximating the Y.sub.n when a mean square error is the smallest or an self-adaptation process converges.

    7. The method of claim 1, wherein one complex-coefficient FIR filter is constructed with four real coefficient FIR filters.

    8. A method for compensating gain flatness of a transmitter, by compensating a gain flatness of a transmitting channel using a complex-coefficient FIR filter in digital domain, the method comprising: generating, by an NCO, single-tone signals at N frequency points with an frequency interval of f.sub.s/N in a frequency range from f.sub.s/2 to f.sub.s/2, and measuring, by a spectrum analyzer the power P.sub.n at each frequency point, wherein f.sub.s represents a sampling rate of a digital signal, and N takes a value of an integer power of 2; calculating the gain flatness of the transmitting channel based on a power of a center frequency of the transmitting channel to obtain a sequence P.sub.n; adding linear phase information to P.sub.n to construct a complex sequence X.sub.n of N points; performing an IFFT transformation of N points on X.sub.n to obtain a frequency response Y.sub.n; approximating the frequency response Y.sub.n using a complex sequence Z.sub.q of Q points, wherein Q is chosen from a suitable integer; and constructing a Q-order complex FIR filter with Z.sub.q as a coefficient of the filter in the digital domain before the digital signal is transmitted to a DAC, converting a signal received by the ADC into an IQ signal, filtering the IQ signal, and obtaining a filtering result as transmitting data after compensating the gain flatness.

    9. The method of claim 8, wherein a power of an input signal is calculated by the following formula by using an amplitude of the IQ signal in the digital domain: P = 1 .Math. 0 * log 1 .Math. 0 ( ( .Math. m = 0 M - 1 .Math. I m 2 + Q m 2 ) / M ) wherein M represents the number of points for calculating the power.

    10. The method of claim 8, wherein the sequence Pr is calculated by the following formula:
    P.sub.n=10.sup.(P.sup.n.sup.P.sup.N/2.sup.)/20,n=0,1,2 . . . N1, wherein P.sub.N/2 is a power point corresponding to the center frequency f.sub.c of the transmitting channel.

    11. The method of claim 8, wherein the adding the linear phase information to P.sub.n to construct the complex sequence X.sub.n of N points is calculated by the following formula:
    X.sub.n=P.sub.n*e.sup.j(N/2n)*(N1)/N,n=0,1,2 . . . N1.

    12. The method of claim 8, wherein the performing the IFFT transformation of N points on X.sub.n to obtain the frequency response Y.sub.n comprising: performing a shift processing on X.sub.n to obtain X.sub.n, and performing the IFFT transformation on X.sub.n to obtain the frequency response Y.sub.n; wherein the shift processing is performed by the following formula: X n = { X n + N / 2 if .Math. .Math. n < N / 2 X n - N / 2 if .Math. .Math. n N / 2 .

    13. The method of claim 8, further comprising: giving single-tone signals at a plurality of frequency points (f.sub.1, f.sub.2, . . . , f.sub.n) different amplitudes (G.sub.1, G.sub.2, . . . , G.sub.n), wherein the single-tone signals at an edge of a frequency band are given an amplitude of a relative large G value, and the single-tone signals at other part of the frequency band are given an amplitude of a relative small G value; using the single-tone signals at the plurality of the frequency points as an excitation source of the filter; calculating half of the Y.sub.n to obtain half of the Z.sub.q; and obtaining the Z.sub.q for best approximating the Y.sub.n when a mean square error is the smallest or an self-adaptation process converges.

    14. The method of claim 8, wherein one complex-coefficient FIR filter is constructed with four real coefficient FIR filters.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0024] FIG. 1 is a schematic structural diagram illustrating a device for implementing a method for compensating gain flatness of a receiver according to an embodiment of the present disclosure.

    [0025] FIG. 2 is schematic diagram illustrating a method for approximating a frequency response Y.sub.n using a complex sequence Z.sub.q of Q points according to an alternative embodiment of the present disclosure.

    [0026] FIG. 3 is a schematic diagram of constructing a complex-coefficient filter with four real coefficient FIR filters according to an alternative embodiment of the present disclosure.

    [0027] FIG. 4 is a schematic structural diagram illustrating a device for implementing a method for compensating gain flatness of a transmitter according to an embodiment of the present disclosure.

    DETAILED DESCRIPTION OF THE EMBODIMENTS

    [0028] The preferred embodiments of the present disclosure will be described in detail below with reference to the drawings.

    [0029] The receiver includes an analog circuit unit, an analog-to-digital converter (ADC) and a digital signal processor (DSP) or Field-programmable gate array (FPGA). FIG. 1 is a schematic structural diagram illustrating a device for implementing a method for compensating gain flatness of a receiver according to an embodiment of the present disclosure. As shown in FIG. 1, the analog circuit unit of the receiver generally includes a duplexer, a one-stage or multi-stage band-pass filter, a low noise amplifier (LNA), a mixer or demodulator, a gain amplifier, an attenuator and other circuits. Since the analog circuit unit is not an important part of the present disclosure, it is illustrated by one module block in FIG. 1.

    [0030] The un-flatness gain of the receiver is mainly caused by the analog circuit unit. According to the present disclosure, a complex FIR filter is constructed in digital domain so as to compensate the gain flatness.

    [0031] In the digital domain, a signal sampled by the ADC is firstly converted into an IQ signal with zero-intermediate frequency (zero-IF) through spectrum shifting and low-pass filtering. If the analog circuit unit adopts a zero-IF scheme and the ADC adopts dual-channel IQ sampling, this process can be omitted.

    [0032] A power calculation module calculates a power of an input signal. The power is calculated in the digital domain using the following formula:


    P=10*log.sub.10((.sub.m=0.sup.M1I.sub.m.sup.2+Q.sub.m.sup.2)/M),

    [0033] where M represents the number of points for calculating the power. In order to make the calculation result as accurate as possible, M=32768 in this embodiment.

    [0034] A signal generator sets f.sub.cf/2 as a starting frequency point, and f.sub.s/N as a stepping. N represents the number of the frequency points and there are single-tone signals at N frequency points. The power P.sub.n of each frequency point in the digital domain is calculated using the above formula. f.sub.c represents a center frequency of a receiving channel, and f.sub.s represents a sampling rate of a digital signal. Since an IFFT transformation is to be performed on P.sub.n, for convenience of calculation, a value of N is limited to an integer power of 2. The larger the value of N, the more accurate the flatness compensation result is.

    [0035] A gain flatness P.sub.n of the receiving channel is calculated based on the center frequency f.sub.c of the channel. The power point corresponding to f.sub.c is P.sub.N/2, then:


    P.sub.n=10.sup.(P.sup.n.sup.P.sup.N/2.sup.)/20,n=0,1,2 . . . N1.

    [0036] Since a logarithm operation is used to calculate the power P, the unit of P is dB. The power operation in the above formula converts the value in dB to an absolute value.

    [0037] In order for signals of different frequencies to pass through the communication system without distortion, the communication system requires a characteristic of linear phase. The method for compensating gain flatness according to the present disclosure is implemented by a complex-coefficient FIR filter, so the filter also requires the characteristic of linear phase. In the above description, only the amplitude characteristics at different frequency points are obtained, and thus it is necessary to add a phase characteristic artificially to construct a linear phase system.

    [0038] The complex sequence after adding the phase characteristic is as follows.


    X.sub.n=P.sub.n*e.sup.j(N/2n)*(N1)/N,n=0,1,2 . . . N1

    [0039] According to the above, a frequency sequence for calculating power is from f.sub.s/2 to f.sub.s/2. However, according to the principle of IFFT transformation, the corresponding frequency sequence is from 0 to f.sub.s. Thus, before performing IFFT transformation, the sequence X.sub.n needs to be transformed to a sequence X.sub.n which corresponds to frequencies from 0 to f.sub.s. The method for transformation is as follows.

    [00003] X n = { X n + N / 2 if .Math. .Math. n < N / 2 X n - N / 2 if .Math. .Math. n N / 2

    [0040] Finally, a IFFT transformation of N points is performed on X.sub.n, so as to obtain a complex sequence Y.sub.n as the coefficient of the FIR filter.


    Y.sub.n=IFFT(X.sub.n)

    [0041] The IFFT transformation is a general algorithm in digital signal processing, the detail of which is not described here.

    [0042] FIG. 2 is schematic diagram illustrating a method for approximating a frequency response Y.sub.n using a complex sequence Z.sub.q of Q points according to an alternative embodiment of the present disclosure. As shown in FIG. 2, the complex sequence Z.sub.q of Q points is used to approximate the frequency response Y.sub.n. Single-tone signals at a plurality of frequency points (f.sub.1, f.sub.2, . . . f.sub.n) are given different amplitudes (G.sub.1, G.sub.2, . . . G.sub.n). The single-tone signals at an edge of the frequency band are given an amplitude of a relative large G value, and the single-tone signals at other part of the frequency band are given an amplitude of a relative small G value, because the gain flatness is usually poor at the edge of the frequency band and the gain flatness is better at a middle of the frequency band. Thus, when compensating the flatness, the weight is tilted toward the edge of the frequency band.

    [0043] The above single-tone signals at the plurality of the frequency points are used as an excitation source of the filter, and during the calculation, it is only necessary to calculate half of the Y.sub.n to obtain half of the Z.sub.q. Since the filter has the characteristic of linear phase, the coefficients of the filter are symmetrical, that is, only half of the coefficients need to be calculated.

    [0044] When the mean square error is the smallest, i.e., the self-adaptation process converges, a Z.sub.q for best approximating the Y.sub.n is obtained.

    [0045] In an alternative embodiment of the present disclosure, a complex-coefficient FIR filter may be used to compensate the gain flatness. However, in conventional digital signal processing, a real coefficient FIR filter is generally used. Thus, a method for constructing the complex FIR filter with the real coefficient FIR filter is also provided.

    [0046] FIG. 3 is a schematic diagram of constructing the complex-coefficient filter with four real coefficient FIR filters according to an alternative embodiment of the present disclosure. As shown in FIG. 3, four real coefficient FIR filters construct one complex-coefficient FIR filter. The h_real represents the real part of the complex-coefficient and the h_imag represents the imaginary part of the complex-coefficient.

    [0047] FIG. 4 is a schematic structural diagram illustrating a device for implementing a method for compensating gain flatness of a transmitter according to an embodiment of the present disclosure. As shown in FIG. 4, the transmitter generally includes a DSP or FPGA, a DAC, and an analog circuit unit.

    [0048] The analog circuit unit of the transmitter generally includes a one-stage or multi-stage band-pass filter, a mixer or modulator, a power amplifier (PA), a duplexer and other circuits. Since this analog circuit unit is not an important part of the present disclosure, it is illustrated by one module block in FIG. 4.

    [0049] The un-flatness gain of the transmitter is mainly caused by the analog circuit unit. According to the present disclosure, a complex FIR filter is constructed in digital domain so as to compensate the gain flatness.

    [0050] In the digital domain, an NCO is used to generate single-tone signals at N frequency points, with a frequency range from f.sub.s/2 to f.sub.s/2, and f.sub.s/N is used as a stepping. Firstly, in FIG. 4, the output of the NCO is selected by the multiplexer module (MUX) and sent to the DAC, and the power P.sub.n at each frequency point is measured by using the spectrum analyzer. Then, the transmitter enters the normal operating mode, and the output of the FIR filter is selected by the MUX and transmitted to the DAC. Since the IFFT transformation is to be performed on P.sub.n, for convenience of calculation, the value of N is limited to an integer power of 2. The larger the value of N, the more accurate the flatness compensation result is.

    [0051] The result P.sub.n measured by the spectrum analyzer is input to the digital signal processor for subsequent processing. The gain flatness P.sub.n of the transmitting channel is calculated based on the power of the center frequency f.sub.c of the channel (that is, the zero frequency in the digital domain). The power point corresponding to the center frequency is P.sub.N/2, then:


    P.sub.n=10.sup.(P.sup.n.sup.P.sup.N/2.sup.)/20,n=0,1,2 . . . N1.

    [0052] Since the power measured by the spectrum analyzer is in the unit of dB, it is necessary to be converted as an absolute power value through a power operation.

    [0053] The remaining processing methods are consistent with the method for compensating the gain flatness of receiver, and will not be repeated herein.

    [0054] The above description is only the preferred embodiments of the present disclosure. It should be noted that for those skilled in the art, without departing from the principles of the present disclosure, several improvements and modifications can be made, and the improvements and modifications should be regarded as the protection scope of the present disclosure.