Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an I/Q unbalance phase error compensation method based on an FPA (field programmable gate array), wherein a compensation module of the I/Q unbalance phase error is designed to be equivalent to a nonlinear optimization problem, the nonlinear optimization problem is calculated by the FPA, the optimal parameters of the compensation module are obtained, and then phase compensation is completed.
In order to achieve the above object, the present invention provides an I/Q imbalance phase error compensation method based on FPA, comprising the following steps:
(1) acquiring an I/Q imbalance phase error to be compensated by inputting a single-tone frequency sweeping signal;
(1.1) carrying out equal-interval frequency sweeping on the bandwidth to be tested by using a signal generator, so that single-tone frequency sweeping signals with N frequency values are output at equal intervals within the frequency range of the bandwidth to be tested and are sequentially input to an I/Q receiver;
(1.2) the monophonic frequency sweep signal r
i(t) has phase error in the two paths with I/Q, respectively
Local oscillator signal cos (ω)
LOt) and
multiplication of ω wherein
LOIs the local oscillator signal frequency;
then, obtaining an unbalanced I/Q test signal after low-pass filtering processing;
xI(t)=cos(ωit)
xQ(t)=sin(ωit+θ(ωi))
where i is 1,2, … N, θ (ω)
i) Representing frequency omega
iThe phase error is detected, and the phase error is detected,
φ(ω
i) Representing a frequency dependent phase error;
(1.3) sampling the unbalanced I/Q test signal by an ADC to obtain an unbalanced I/Q test signal x after samplingI(n) and xQ(n);
Then inputting the test signal into a frequency domain conversion processor, performing discrete Fourier transform to complete the conversion of the I/Q test signal from a time domain to a frequency domain, wherein the converted frequency domain I/Q test signal is as follows:
(1.4) testing the frequency domain I/Q test signal XI(ω)、XQ(ω) inputting to the imbalance phase estimator to estimate the imbalance phase error;
(1.5) continuously processing the N single tone frequency sweep signals according to the method of the steps (1.2) - (1.4) to obtain an imbalance phase error theta (omega), wherein omega is [ omega ], [ omega ]1,ω2,…,ωN]T;
(2) Designing an I/Q unbalance phase compensation module by using an FPA (field programmable gate array) based on the unbalance phase error theta (omega);
(2.1) building an I/Q unbalance phase compensation module, which specifically comprises a delay module, an FD compensation module and an all-pass filter;
(2.2) designing the total phase-frequency response function phi of the I/Q unbalance phase compensation modulec(ω,R);
φc(ω,R)=-δd·ω+φAPF(ω,R)
Wherein R is [ delta ]d,M,ψ],δdFor fractional delay of FD compensation module, M ═ Mn]T=[M1,M2,…,MN/2]T,MnIs the amplitude of the nth second-order junction pole of the all-pass filter, [ psi ═ phi [ [ phi ]n]T=[ψ1,ψ2,…,ψN/2]T,ψnThe phase angle of the nth second-order junction pole of the all-pass filter; phi is aAPF(ω, R) is the phase frequency response function of the all-pass filter;
(2.3) defining an error matrix E;
E=[e(ω,R)]T=[e(ω1,R),e(ω2,R),…,e(ωi,R),…,e(ωN,R)]T
wherein e (ω)i,R)=φc(ωi,R)-θ(ωi);
(2.4) defining a cost function J (R);
(2.5) optimizing J (R) by using a flower pollination algorithm FPA to minimize J (R) and satisfy Mn<1,n=1,2,…,N/2;
(3) Compensating the I/Q phase error by utilizing an I/Q unbalance phase compensation module;
testing the unbalanced I/Q signal x after samplingI(n) and xQ(n) input to the I/Q imbalance phase compensation module to output a compensated I/Q signal xIC[n]、xQC[n]。
The invention aims to realize the following steps:
the invention relates to an I/Q unbalance phase error compensation method based on an FPA (field programmable gate array), which comprises the steps of firstly obtaining an I/Q unbalance phase error theta (omega) to be compensated through inputting a continuous single tone frequency sweep signal, then designing an I/Q unbalance phase compensation module by utilizing the FPA based on the unbalance phase error theta (omega), equivalently designing the I/Q unbalance phase compensation module into a nonlinear optimization problem, then calculating the solution of the nonlinear optimization problem by utilizing the FPA to obtain the optimal parameter of the compensation module, and finally compensating the I/Q phase error by utilizing the designed I/Q unbalance phase compensation module.
Meanwhile, the I/Q unbalance phase error compensation method based on the FPA also has the following beneficial effects:
(1) the method comprises the steps of obtaining the I/Q unbalance phase error to be compensated by inputting a single-tone frequency sweeping signal, and equating the phase error in the whole bandwidth to be tested to the phase error of each frequency sweeping frequency point by utilizing the principle that the phase error in a small bandwidth of a frequency sweeping interval can be approximated to be a constant, so that the novel method for testing the I/Q unbalance phase error is provided.
(2) The I/Q phase unbalance compensation module based on the all-pass filter and the fractional delay filter is designed, and a new thought for compensating I/Q phase unbalance is provided for innovatively converting the design problem of the I/Q phase unbalance compensation module into a constrained nonlinear optimization problem in order to ensure the stability of the all-pass filter realized by adopting an IIR filter structure.
(3) Compared with the traditional optimization algorithm based on gradient, the FPA is not easy to fall into local optimization and can better find an approximate optimal solution closer to global optimization, thereby better completing the compensation work of I/Q (input/output) unbalance phase.
Detailed Description
The following description of the embodiments of the present invention is provided in order to better understand the present invention for those skilled in the art with reference to the accompanying drawings. It is to be expressly noted that in the following description, a detailed description of known functions and designs will be omitted when it may obscure the subject matter of the present invention.
Examples
FIG. 1 is a flow chart of the I/Q imbalance phase error compensation method based on FPA according to the present invention.
In this embodiment, as shown in fig. 1, the method for compensating an I/Q imbalance phase error based on FPA of the present invention mainly includes three stages S1-S3:
s1, acquiring an I/Q imbalance phase error to be compensated by inputting a single tone frequency sweep signal;
assuming that there is no amplitude imbalance error in the path, the I/Q imbalance model is shown in the dashed box of fig. 2. Omega
LO=2πf
LOIn order to be the angular frequency of the local oscillator signal,
the phase difference between two local oscillation signals is irrelevant to the frequency. And the frequency-dependent phase error is partly caused by the frequency response differences introduced by the different components between the I/Q paths, denoted as (ω). The low pass filter LPF is used to remove high frequency components and the analog-to-digital converter ADC is used to sample the I/Q signal. Without loss of generality, the total phase error between the I/Q channels is all equivalent to the Q channel, denoted as
Where ω is the baseband signal angular frequency.
In order to correctly compensate the phase error, the I/Q phase imbalance error to be compensated needs to be accurately measured, and the embodiment estimates the I/Q phase imbalance error by using a single-tone test signal, and the specific process is as follows:
s1.1, performing equal-interval frequency sweeping on a bandwidth to be tested by using a signal generator, so that single-tone frequency sweeping signals with N frequency values are output at equal intervals within the frequency range of the bandwidth to be tested and are sequentially input to an I/Q receiver;
in this embodiment, the N single tone frequency sweep signals cover the entire test bandwidth, i.e., the entire test bandwidth is divided into N equal narrow frequency bands, where the phase error parameter in each frequency band can be considered as a constant. Therefore, the phase error in the whole test bandwidth can be equivalent to the phase error of the N frequency points.
S1.2, tone frequency sweep signal r
i(t) has phase error in the two paths with I/Q, respectively
Local oscillator signal cos (ω)
LOt) and
multiplication of ω wherein
LOIs the local oscillator signal frequency;
then, obtaining an unbalanced I/Q test signal after low-pass filtering processing;
xI(t)=cos(ωit)
xQ(t)=sin(ωit+θ(ωi))
where i is 1,2, … N, θ (ω)
i) Representing frequency omega
iThe phase error is detected, and the phase error is detected,
φ(ω
i) A phase error portion, which represents a frequency dependence, is caused by differences in the frequency response of different components between the I/Q paths;
s1.3, sampling the unbalanced I/Q test signal by an ADC (analog to digital converter) to obtain an unbalanced I/Q test signal x after samplingI(n) and xQ(n);
Then inputting the test signal into a frequency domain conversion processor, performing discrete Fourier transform to complete the conversion of the I/Q test signal from a time domain to a frequency domain, wherein the converted frequency domain I/Q test signal is as follows:
s1.4, testing the frequency domain I/Q test signal XI(ω)、XQ(omega) is input to an imbalance phase estimator to obtain an imbalance phase estimation result;
so as to estimate the unbalanced phase error;
s1.5, continuously processing the N monophonic frequency sweep signals according to the method of steps S1.2-S1.4 to obtain an imbalance phase error θ (ω), where ω is [ ω ═ ω1,ω2,…,ωN]T;
S2, designing an I/Q unbalance phase compensation module by using an FPA (field programmable gate array) based on the unbalance phase error theta (omega);
s2.1, building an I/Q unbalance phase compensation module, as shown in fig. 3, specifically comprising a Fractional Delay (FD) compensation module, an all-pass filter and a delay module. Since the FD compensation filter introduces a delay associated with the order of the FD filter on the channel to be compensated, the delay module adds the delay value to the other channel to keep the delay consistent.
In this embodiment, the FD compensation module of the Q channel is implemented by an FD filter, and the order of D (D is an even number) will bring D/2 delay to the Q channel, so in order to make the I/Q channel delay consistent, the delay module is used to delay the I channel by D/2.
S2.2, the implementation structure of the all-pass filter adopts a cascade structure of an Infinite Impulse Response (IIR) filter, can be expressed in a form of multiplication of a plurality of second-order nodes, and the expression in a z domain is shown as the following formula
Wherein N is an even number and is the order of the all-pass filter,
is the pole of the nth second-order junction, and has amplitude and phase angle of M
nAnd psi
nThe phase frequency response of the all-pass filter can be expressed as:
assuming fractional delay delta of FD compensation moduledThus, the total phase-frequency response of the phase compensation module can be expressed as:
φc(ω,R)=-δd·ω+φAPF(ω,R)
wherein R is [ delta ]d,M,ψ],M=[Mn]T=[M1,M2,…,MN/2]T,MnIs the amplitude of the nth second-order junction pole of the all-pass filter, [ psi ═ phi [ [ phi ]n]T=[ψ1,ψ2,…,ψN/2]T,ψnThe phase angle of the nth second-order junction pole of the all-pass filter; phi is aAPF(ω, R) is the phase frequency response function of the all-pass filter;
s2.3, in order to compensate for the previously obtained theta (omega), phic(ω, R) should be equal to θ (ω), thus defining an error matrix E;
E=[e(ω,R)]T=[e(ω1,R),e(ω2,R),…,e(ωi,R),…,e(ωN,R)]T
wherein e (ω)i,R)=φc(ωi,R)-θ(ωi);
S2.4, the design of the I/Q unbalance phase compensation module can be equivalent to a nonlinear optimization problem, so that a cost function J (R) is defined;
s2.5, in the embodiment, an all-pass filter in the I/Q imbalance phase compensation module is realized by adopting an IIR filter structure, and the stability of the all-pass filter is guaranteed to be crucial, so that constraint is added in a nonlinear optimization problem to guarantee a stability condition, the stability condition is further converted into a least square problem with constraint, and finally J (R) is optimized by using a pollination algorithm FPA to enable J (R) to be minimum and meet Mn< 1, N ═ 1,2, …, N/2; compared with the traditional optimization algorithm based on gradient, the FPA is not easy to fall into local optimum, and an approximate optimal solution closer to global optimum can be better found, so that I/Q imbalance phase compensation is better completed.
As shown in fig. 4, we describe in detail the specific process of FPA optimizing j (r), specifically:
1) and setting the pollen individual number S of the FPA, wherein the maximum iteration number maximum and the conversion probability p are 0.8. Randomly generating an initial population containing S individuals, taking a cost function J (R) as a fitness function and calculating the fitness value of each individual of the initial population;
2) and starting to circularly perform population propagation: during each circulation, sequentially traversing each individual and generating a new individual corresponding to the next generation; wherein, when the t-th cycle is performed, the mth individual is traversed
Then, a number r is randomly generated
m,t∈[0,1]Then, a new individual of the next generation is generated according to the following formula
Wherein ε is [0,1 ]]The random parameters are uniformly distributed on the surface of the substrate,
is the current optimal solution and gamma is a scale factor, set to 0.01. The global pollination step length L follows the levy distribution:
where Γ (λ) is the standard gamma function, s is the Levy flight step, s is0Is the step minimum, step s can be given by:
where U and V satisfy a gaussian distribution and the constant λ is set to 1.5.
Then will be
Substituting into fitness function to calculate its fitness value
3) After each circulation is finished, the fitness values of S new individuals generated by the circulation are compared, and the new individual with the minimum fitness value is selected as the optimal individual generated by the circulation
4) Comparing the optimal individuals generated by the circulation
And the last timeCyclically generated optimal individuals
The magnitude of the corresponding fitness value if
Then use
Is replaced by
And is used as the current optimal solution; otherwise, the optimal individuals generated by the last cycle are kept
Unchanged and used as the optimal individual generated by the current cycle;
5) judging whether the current cycle time t reaches the maximum iteration number maximum, if not, continuing the cycle; if so, selecting the optimal solution recorded after the maximum cycles
As the final optimal solution.
S3, I/Q phase error compensation is carried out by utilizing an I/Q unbalance phase compensation module;
testing the unbalanced I/Q signal x after samplingI(n) and xQ(n) input to the I/Q imbalance phase compensation module to output a compensated I/Q signal xIC[n]、xQC[n]。
Although illustrative embodiments of the present invention have been described above to facilitate the understanding of the present invention by those skilled in the art, it should be understood that the present invention is not limited to the scope of the embodiments, and various changes may be made apparent to those skilled in the art as long as they are within the spirit and scope of the present invention as defined and defined by the appended claims, and all matters of the invention which utilize the inventive concepts are protected.