Frequency calibration method and device
Technical Field
The present invention relates to communications technologies, and in particular, to a frequency calibration method and apparatus.
Background
With the rapid development of Mobile communication systems, terminals supporting Multiple standards have also been rapidly developed, and currently, terminal manufacturers have developed related products supporting Multiple standards such as GSM (Global System for Mobile communication), WCDMA (Wireless Code Division Multiple Access), TD-SCDMA (time Division synchronous CDMA), LTE (Long Term Evolution), and the like. Before the terminal products are networked, consistency tests need to be carried out on the terminal products, wherein radio frequency consistency tests are the most basic tests, and a large number of test cases exist.
Currently, the radio frequency conformance tests for the terminals of different standards are generally integrated test equipment, which is called an integrated tester. The integrated tester generally needs to have a function of fast calibration in addition to the function of testing related measurement items according to the relevant protocol of the radio frequency conformance test, and performs calibration of frequency, power and gain on the terminal. Calibration of Frequency is generally called AFC (Automatic Frequency Control) calibration, and a fast and accurate estimation of a Frequency error in a large range is often required.
The AFC calibration function implemented by the existing integrated tester usually needs to know cell information (the information includes cell ID (identification), pilot symbol configuration, etc.), and after the integrated tester knows the cell information, the integrated tester reconstructs the reference symbols, and can precisely time the received signal by using the correlation between the local reference symbols and the received reference symbols, thereby reducing the influence of the timing synchronization error on frequency estimation and estimating the frequency offset according to the timing synchronization result.
The common AFC calibration needs that after the comprehensive tester acquires the cell configuration information, a local reference symbol can be reconstructed according to the cell configuration information, and the correlation between the reconstructed local reference symbol and a received reference signal is utilized to perform accurate timing synchronization, so that the test precision can be improved.
Disclosure of Invention
The embodiment of the invention provides a frequency calibration method and a frequency calibration device, which are used for reducing the complexity of frequency calibration and improving the test efficiency.
A method of frequency calibration, comprising:
receiving a Phase Shift Keying (PSK) modulated signal sent by a terminal, and determining the position of the rising edge of the signal;
intercepting data with enough length according to the position of the rising edge;
determining a coarse frequency offset value according to the intercepted data, and performing coarse frequency offset compensation on the intercepted data through the coarse frequency offset value;
intercepting two sections of data from the data after the coarse frequency offset compensation, determining a correlation value of the intercepted two sections of data, and determining a fine frequency offset value according to the correlation value;
and carrying out frequency calibration according to the sum of the coarse frequency offset value and the fine frequency offset value.
A frequency calibration device, comprising:
a rising edge determining unit, which is used for receiving PSK modulation signals sent by a terminal and determining the rising edge position of the signals;
the data intercepting unit is used for intercepting data with enough length according to the rising edge position;
a coarse frequency offset estimation unit, configured to determine a coarse frequency offset value according to the intercepted data, and perform coarse frequency offset compensation on the intercepted data through the coarse frequency offset value;
the fine frequency offset estimation unit is used for intercepting two sections of data from the data after the coarse frequency offset compensation, determining a correlation value of the intercepted two sections of data, and determining a fine frequency offset value according to the correlation value;
and the frequency calibration unit is used for carrying out frequency calibration according to the sum of the coarse frequency offset deviation value and the fine frequency offset deviation value.
The embodiment of the invention provides a frequency calibration method and a frequency calibration device, after coarse frequency offset estimation and coarse frequency offset compensation are carried out, two sections of data are intercepted from the data after the coarse frequency offset compensation, and the correlation value of the intercepted two sections of data is determined, namely, a fine frequency offset deviation value can be determined according to the correlation value, and cell information does not need to be obtained through information interaction for determining the accurate time slot initial position for fine frequency offset estimation, so that the complexity of frequency calibration is reduced, and the test efficiency is improved.
Drawings
Fig. 1 is a flowchart of a frequency calibration method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a more specific frequency calibration method according to an embodiment of the present invention;
fig. 3 is a flowchart of a frequency calibration method according to a first embodiment of the present invention;
fig. 4 is a flowchart of a frequency calibration method according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a frequency calibration apparatus according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a frequency calibration method and a frequency calibration device, after coarse frequency offset estimation and coarse frequency offset compensation are carried out, two sections of data are intercepted from the data after the coarse frequency offset compensation, and the correlation value of the intercepted two sections of data is determined, namely, a fine frequency offset deviation value can be determined according to the correlation value, and cell information does not need to be obtained through information interaction for determining the accurate time slot initial position for fine frequency offset estimation, so that the complexity of frequency calibration is reduced, and the test efficiency is improved.
As shown in fig. 1, a frequency calibration method provided in an embodiment of the present invention includes:
step S101, receiving a PSK (Phase Shift Keying) modulation signal sent by a terminal, and determining the position of the rising edge of the signal;
s102, intercepting data with enough length according to the position of the rising edge;
step S103, determining a coarse frequency offset value according to the intercepted data, and performing coarse frequency offset compensation on the intercepted data through the coarse frequency offset value;
step S104, intercepting two sections of data from the data after the coarse frequency offset compensation, determining the correlation value of the intercepted two sections of data, and determining a fine frequency offset value according to the correlation value;
and step S105, carrying out frequency calibration according to the sum of the coarse frequency offset value and the fine frequency offset value.
In step S102, the longer the intercepted data is, the higher the accuracy of the result of channel estimation is, and the higher the complexity thereof is, and the shorter the intercepted data is, the lower the accuracy of the result of channel estimation is, and the lower the complexity thereof is, and generally, the intercepted data is data of at least one slot in step S102.
In step S104, it is not necessary to obtain a pilot frequency or a local training sequence through information interaction to determine an accurate time slot starting position, two pieces of data are directly intercepted from the data after the coarse frequency offset compensation, and a correlation value of the intercepted two pieces of data is determined, i.e., a fine frequency offset value can be determined according to the correlation value, thereby reducing the complexity of frequency calibration and improving the test efficiency.
Specifically, as shown in fig. 2, the method includes:
step S201, configuring a terminal by an upper computer to send M-ary PSK (such as BPSK, QPSK, 8PSK modulation and the like) modulation signals, wherein the purpose of the configuration is to obtain modulation signals of a standard M-ary PSK constellation diagram so as to conveniently remove modulation information and carry out frequency offset estimation;
step S202, the comprehensive tester searches power and determines the position of the rising edge of the received signal;
step S203, according to the position of the rising edge, by setting a large enough margin, the comprehensive measuring instrument intercepts long enough data (data after the real rising edge is determined) which are determined to be effective;
step S204, solving a coarse frequency offset value: firstly, solving M power (M is a modulation index: M =2 for BPSK; M =4 for QPSK, M =8 for 8 PSK; and the like) of intercepted data to eliminate modulation information of M-element PSK modulation signals; zero padding is carried out on the obtained data, FFT transformation is carried out, and FFT shifting operation is carried out on the data after the FFT transformation so that zero frequency is in the center position; then solving the peak position of the absolute value of the data after the FFT shifting operation; finally, obtaining a coarse frequency offset value according to the difference between the peak position and the central position and the values of the FFT resolution and M;
step S205, carrying out coarse frequency offset compensation on the intercepted data;
step S206, solving a fine frequency offset value: solving the M power (M is a modulation index: M =2 for BPSK, M =4 for QPSK, M =8 for 8PSK, and the like) of the data after the coarse frequency offset compensation so as to remove modulation information, intercepting two sections of data from the obtained data, determining the correlation value of the intercepted two sections of data, and determining a fine frequency offset value according to the correlation value;
step S207, adding the coarse frequency offset value and the fine frequency offset value to obtain a final frequency offset estimation result.
Specifically, in the WCDMA system, the terminal may be configured to only send DPCCH (Dedicated Physical Control Channel) signals and not send DPDCH (Dedicated Physical Data Channel) signals, so as to obtain standard QPSK (Quadrature Phase Shift Keying) modulation signals, and when the signals are TD-SCDMA signals, the terminal may also be configured to only send traffic Channel signals and not send Control Channel signals, thereby facilitating removal of modulation information for frequency offset estimation.
In step S101, receiving the PSK modulated signal sent by the terminal, and determining a position of a rising edge of the signal, which may be implemented by determining a power value of a sampling point sliding window of the PSK modulated signal, and then determining a position of a rising edge of the signal according to the power value of the sampling point sliding window of each sampling point.
In step S102, intercepting data of at least one time slot length according to the rising edge position, specifically:
and intercepting data of one time slot length according to the position of the rising edge.
Specifically, intercepting data of a time slot length according to a rising edge position specifically includes:
determining the intercepted data as r ═ r (0), r (1), …, r (N-1)],N=NFOEWherein r (I) ═ r (I + I)start+NΔ),NΔFor a preset margin, NFOEIs the number of symbols of a slot, IstartThe position of the rising edge of the signal.
In step S103, determining a coarse frequency offset value according to the intercepted data, and performing coarse frequency offset compensation on the intercepted data according to the coarse frequency offset value, specifically including:
performing M power operation on the intercepted data, wherein M is a modulation index;
zero filling is carried out on the obtained data subjected to the M-power operation, and FFT (fast Fourier transform) conversion is carried out, wherein the number of points of the FFT conversion is within a set range, so that the FFT resolution is within the range of fine frequency offset estimation;
performing FFT shift operation on the data after the FFT so that the zero frequency is in the center position;
determining a peak position of an absolute value of the data after the FFT shift operation;
obtaining a coarse frequency offset value according to the difference between the peak position and the central position and the values of the FFT resolution and M;
and performing coarse frequency offset compensation on the intercepted data through the coarse frequency offset value.
When the data intercepted according to the position of the rising edge is greater than a time slot length, before determining a coarse frequency offset value according to the intercepted data and performing coarse frequency offset compensation on the intercepted data through the coarse frequency offset value in step S103, the method further includes:
determining a sampling position with the minimum sampling deviation;
and from the sampling position with the minimum sampling deviation, the data used for FFT operation is intercepted again.
In step S104, two pieces of data are intercepted from the data after the coarse frequency offset compensation, a correlation value of the two pieces of intercepted data is determined, and a fine frequency offset value is determined according to the correlation value, which specifically includes:
taking the result r after coarse frequency deviation compensationcomp=[rcomp(0),rcomp(1),…,rcomp(N-1)]N is the data length;
intercepting two sections of data d according to a preset intercepting data initial position start _ pos, a data length corr _ length and a distance gap between two sections of databWherein b is 1,2, gap is a non-negative integer, and
d1=rcomp(start_pos:corr_length+start_pos-1)
d2=rcomp(corr_length+start_pos+gap:2corr_length+gap+start_pos-1);
by pair dbSolving the fourth power to remove the modulation information to obtain:
db,sqr=[db,sqr(0),db,sqr(1),...,db,sqr(corr_length-1)],
wherein d isb,sqr(i)=(db(i))2·(db(i))2Number of symbols of 1 data block;
determination of d1,sqrAnd d2,sqrCorrelation value R of medium element:
determining the fine frequency offset estimation result as follows: <math>
<mrow>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>2</mn>
</mrow>
</msub>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<mi>π</mi>
<msub>
<mi>T</mi>
<mi>c</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>corr</mi>
<mo>_</mo>
<mi>length</mi>
<mo>+</mo>
<mi>gap</mi>
<mo>)</mo>
</mrow>
</mrow>
</mfrac>
<mi>arg</mi>
<mrow>
<mo>(</mo>
<mi>R</mi>
<mo>)</mo>
</mrow>
<mo>/</mo>
<mn>4</mn>
<mo>,</mo>
</mrow>
</math> wherein T iscIs the chip period;
the frequency calibration method of the present invention is explained in detail by the following specific examples:
the first embodiment,
In the TD-SCDMA system, a terminal transmits an uplink DPCH signal, and an integrated tester performs frequency offset estimation by using the received DPCH signal. As shown in fig. 3, the specific steps of the frequency calibration are as follows:
step S301, detecting a signal rising edge:
calculating the power value of a received signal sampling point sliding window:
<math>
<mrow>
<msub>
<mi>P</mi>
<mi>win</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mi>i</mi>
</mrow>
<mrow>
<mi>i</mi>
<mo>+</mo>
<msub>
<mi>L</mi>
<mi>win</mi>
</msub>
<mo>-</mo>
<mn>1</mn>
</mrow>
</munderover>
<msup>
<mrow>
<mo>|</mo>
<mi>r</mi>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>)</mo>
</mrow>
<mo>|</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>,</mo>
<mi>i</mi>
<mo>=</mo>
<mn>0,1</mn>
<mo>,</mo>
<mo>.</mo>
<mo>.</mo>
<mo>.</mo>
<mo>,</mo>
<mi>N</mi>
<mo>-</mo>
<msub>
<mi>L</mi>
<mi>win</mi>
</msub>
<mo>;</mo>
</mrow>
</math>
wherein L iswinCalculating the number of sampling points contained in the window length for the power;
searching for a rising edge:
fori=0:N-Lwin
if
Istart=i+2Lwin
end
break;
end
wherein P islimA rising edge power difference threshold value (linear value).
Step S302, extracting data of one slot length:
r=[r(1),r(2),…,r(864)];
wherein r (I) ═ r (I + I)start+NΔ),NΔA margin set to ensure that data after the position where the real data starts can be taken;
step S303, coarse frequency offset estimation is carried out:
solving the power of r to 4 to eliminate phase jump caused by modulation, and obtaining:
rpow4=[rpow4(0),rpow4(1),...,rpow4(N-1)]wherein r ispow4(i)=(rFFT(i))4=(rFFT(i))2(rFFT(i))2;
To rpow4Zero padding to obtain NFFTData point-by-point FFT, where NFFTIs an integer power of 2;
performing an FFT operation, and an FFT shift operation:
the FFT operation yields: r isFFT_OUT=FFT(rFFT_IN);
FFT shift yields: r isFFT_Shift=[rFFT_Shift(0),rFFT_Shift(1),...,rFFT_Shift(NFFT-1)];
Wherein <math>
<mrow>
<msub>
<mi>r</mi>
<mrow>
<mi>FFT</mi>
<mo>_</mo>
<mi>Shift</mi>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mfenced open='{' close=''>
<mtable>
<mtr>
<mtd>
<msub>
<mi>r</mi>
<mrow>
<mi>FFT</mi>
<mo>_</mo>
<mi>OUT</mi>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>+</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mo>,</mo>
<mn>0</mn>
<mo>≤</mo>
<mi>i</mi>
<mo><</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>r</mi>
<mrow>
<mi>FFT</mi>
<mo>_</mo>
<mi>OUT</mi>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>-</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mo>,</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>≤</mo>
<mi>i</mi>
<mo><</mo>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>;</mo>
</mrow>
</math>
Determining the position with the maximum absolute value:
obtaining a coarse frequency offset estimation result: <math>
<mrow>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mrow>
<mo>(</mo>
<msub>
<mi>A</mi>
<mi>index</mi>
</msub>
<mo>-</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mi>Δf</mi>
<mo>/</mo>
<mn>4</mn>
<mo>;</mo>
</mrow>
</math>
whereinIs the frequency resolution of the FFT transform.
Step S304, coarse frequency offset compensation is carried out to obtain: r iscomp=[rcomp(0),rcomp(1),…,rcomp(N-1)];
Where N864 is the number of chips of 1 slot,
<math>
<mrow>
<msub>
<mi>r</mi>
<mi>comp</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>r</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>·</mo>
<msup>
<mi>e</mi>
<mrow>
<mo>-</mo>
<mi>j</mi>
<mn>2</mn>
<mi>π</mi>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>1</mn>
</mrow>
</msub>
<mi>i</mi>
<msub>
<mi>T</mi>
<mi>c</mi>
</msub>
</mrow>
</msup>
<mo>,</mo>
</mrow>
</math>
<math>
<mrow>
<msub>
<mi>r</mi>
<mi>comp</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>r</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>·</mo>
<msup>
<mi>e</mi>
<mrow>
<mo>-</mo>
<mi>j</mi>
<mn>2</mn>
<mi>π</mi>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>1</mn>
</mrow>
</msub>
<mi>i</mi>
<msub>
<mi>T</mi>
<mi>c</mi>
</msub>
</mrow>
</msup>
<mo>=</mo>
<msub>
<mi>r</mi>
<mi>comp</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mrow>
<mo>(</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<mn>2</mn>
<mi>π</mi>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>1</mn>
</mrow>
</msub>
<mi>i</mi>
<mo>/</mo>
<msub>
<mi>f</mi>
<mi>c</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>-</mo>
<mi>j</mi>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<mn>2</mn>
<mi>π</mi>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>1</mn>
</mrow>
</msub>
<mi>i</mi>
<mo>/</mo>
<msub>
<mi>f</mi>
<mi>c</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
<mo>,</mo>
</mrow>
</math>
i=0,1,...,Nc-1;
step S305, fine frequency offset estimation:
taking the result r after the frequency deviation compensation of a time slotcomp=[rcomp(0),rcomp(1),…,rcomp(N-1)];
Intercepting two sections of data for correlation, wherein the initial position of the first section of data is start _ pos, the length of the data is corr _ length, the distance between the two sections of data is gap, and the three parameters are all parameters which can be configured in advance;
determining two data blocks for correlation calculation as dbWherein b is 1, 2;
d1=rcomp(start_pos:corr_length+start_pos-1)
d2=rcomp(corr_length+start_pos+gap:2corr_length+gap+start_pos-1)
removing modulation information:
by pair dbSolving the fourth power to remove the modulation information to obtain:
db,sqr=[db,sqr(0),db,sqr(1),...,db,sqr(corr_length-1)],
wherein d isb,sqr(i)=(db(i))2·(db(i))2Number of symbols of 1 data block;
and (3) correlation calculation:
calculating d1,sqrAnd d2,sqrCorrelation value R of medium element:
then calculating residual frequency offset: <math>
<mrow>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>2</mn>
</mrow>
</msub>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<mi>π</mi>
<msub>
<mi>T</mi>
<mi>c</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>corr</mi>
<mo>_</mo>
<mi>length</mi>
<mo>+</mo>
<mi>gap</mi>
<mo>)</mo>
</mrow>
</mrow>
</mfrac>
<mi>arg</mi>
<mrow>
<mo>(</mo>
<mi>R</mi>
<mo>)</mo>
</mrow>
<mo>/</mo>
<mn>4</mn>
<mo>;</mo>
</mrow>
</math>
step S306, obtaining total frequency offset: f. ofe=fe1+fe2;
And step S307, carrying out frequency calibration according to the total frequency offset.
Example II,
In a WCDMA system, the received data for one radio frame is:
r=[r(0),r(1),…,r(N-1)],N=OSR*Nc*Nslot(ii) a Where OSR is the oversampling ratio, Nc2560 number of chips for one slot of the DPCCH channel, Nslot15 is the number of slots of the input data.
At this time, as shown in fig. 4, the specific steps of the frequency calibration are as follows:
step S401, detecting a signal rising edge:
calculating the power value of a received signal sampling point sliding window:
<math>
<mrow>
<msub>
<mi>P</mi>
<mi>win</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mi>i</mi>
</mrow>
<mrow>
<mi>i</mi>
<mo>+</mo>
<msub>
<mi>L</mi>
<mi>win</mi>
</msub>
<mo>-</mo>
<mn>1</mn>
</mrow>
</munderover>
<msup>
<mrow>
<mo>|</mo>
<mi>r</mi>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>)</mo>
</mrow>
<mo>|</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>,</mo>
<mi>i</mi>
<mo>=</mo>
<mn>0,1</mn>
<mo>,</mo>
<mo>.</mo>
<mo>.</mo>
<mo>.</mo>
<mo>,</mo>
<mi>N</mi>
<mo>-</mo>
<msub>
<mi>L</mi>
<mi>win</mi>
</msub>
</mrow>
</math>
wherein L iswinCalculating the number of sampling points contained in the window length for the power;
searching for a rising edge:
fori=0:N-Lwin
if
Istart=i+2Lwin
end
break;
end
wherein P islimIs a rising edge power difference threshold value (linear value);
taking out data for frequency offset estimation:
r′=[r′(0),r′(1),…,r′(N′-1)],N′=OSR*NFOE;
wherein r' (I) ═ r (I + I)start+NΔ*OSR),NΔTo ensure that the data after the position where the real data starts can be fetched, N is a marginFOEThe number of active chips for coarse frequency offset estimation;
step S402, coarse frequency offset estimation is carried out:
and (3) solving the sampling position with the minimum sampling deviation:
to the first N of rvarGrouping OSR data to obtain 1 time sampling data of an OSR group:
r'0、r'1、...、r'OSR-1;
the j-th sampling point value of the ith group of data is as follows:
r′i(j)=r′(j*OSR+i),i=0,1,…,OSR-1,j=0,1,…,Nvar-1;
and respectively squaring the amplitude of the OSR group data to obtain: rs,0、r's,1、...、r's,OSR-1;
Wherein rs,i(j)=|r'i(j)|2,i=0,1,…,OSR-1,j=0,1,…,Nvar-1;
And respectively averaging the obtained OSR group data to obtain:
wherein <math>
<mrow>
<mover>
<msubsup>
<mi>r</mi>
<mrow>
<mi>s</mi>
<mo>,</mo>
<mi>i</mi>
</mrow>
<mo>′</mo>
</msubsup>
<mo>‾</mo>
</mover>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<msub>
<mi>N</mi>
<mi>var</mi>
</msub>
</mfrac>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>j</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mrow>
<msub>
<mi>N</mi>
<mi>var</mi>
</msub>
<mo>-</mo>
<mn>1</mn>
</mrow>
</munderover>
<msubsup>
<mi>r</mi>
<mrow>
<mi>s</mi>
<mo>,</mo>
<mi>i</mi>
</mrow>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>,</mo>
</mrow>
</math> i=0,1,…,OSR-1;
Respectively determining the variance of the module vector to the obtained OSR group data to obtain sigma0,σ1,...,σOSR-1;
Wherein <math>
<mrow>
<msub>
<mi>σ</mi>
<mi>i</mi>
</msub>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<msub>
<mi>N</mi>
<mi>var</mi>
</msub>
</mfrac>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>j</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mrow>
<msub>
<mi>N</mi>
<mi>var</mi>
</msub>
<mo>-</mo>
<mn>1</mn>
</mrow>
</munderover>
<msup>
<mrow>
<mo>(</mo>
<msubsup>
<mi>r</mi>
<mrow>
<mi>s</mi>
<mo>,</mo>
<mi>i</mi>
</mrow>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>-</mo>
<mover>
<msubsup>
<mi>r</mi>
<mrow>
<mi>s</mi>
<mo>,</mo>
<mi>i</mi>
</mrow>
<mo>′</mo>
</msubsup>
<mo>‾</mo>
</mover>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>,</mo>
</mrow>
</math> i=0,1,…,OSR-1;
The sampling deviation of the path of packet data with the minimum variance is minimum:
and performing coarse frequency offset estimation by using FFT operation:
truncating non-oversampled samples for FFT operation:
r'FFT=[r'FFT(0),r'FFT(1),...,r'FFT(NFOE-1)]
wherein rFFT(i)=r(i*OSR+Istart+NΔ*OSR+Iopt),i=0,1,...,NFOE-1,NFOEThe number of effective samples for FFT operation;
to rFFTSolving 4 power of operation to eliminate phase jump caused by modulation to obtain:
r'pow4=[r'pow4(0),r'pow4(1),...,r'pow4(NFOE-1)];
to rpow4Zero padding to obtain data for FFT:
wherein N isFFTTaking the number of FFT points;
performing FFT operation, and FFT shift operation:
the FFT operation yields: r isFFT_OUT=FFT(rFFT_IN);
FFT shift yields: r isFFT_Shift=[rFFT_Shift(0),rFFT_Shift(1),...,rFFT_Shift(NFFT-1)];
Wherein <math>
<mrow>
<msub>
<mi>r</mi>
<mrow>
<mi>FFT</mi>
<mo>_</mo>
<mi>Shift</mi>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mfenced open='{' close=''>
<mtable>
<mtr>
<mtd>
<msub>
<mi>r</mi>
<mrow>
<mi>FFT</mi>
<mo>_</mo>
<mi>OUT</mi>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>+</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mo>,</mo>
<mn>0</mn>
<mo>≤</mo>
<mi>i</mi>
<mo><</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>r</mi>
<mrow>
<mi>FFT</mi>
<mo>_</mo>
<mi>OUT</mi>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>-</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mo>,</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>≤</mo>
<mi>i</mi>
<mo><</mo>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>.</mo>
</mrow>
</math>
Determining the position with the maximum absolute value:
obtaining a coarse frequency offset estimation result: <math>
<mrow>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mrow>
<mo>(</mo>
<msub>
<mi>A</mi>
<mi>index</mi>
</msub>
<mo>-</mo>
<mfrac>
<msub>
<mi>N</mi>
<mi>FFT</mi>
</msub>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mi>Δf</mi>
<mo>/</mo>
<mn>4</mn>
<mo>;</mo>
</mrow>
</math>
whereinIs the frequency resolution of the FFT transform.
Step S403, for data rpow4And performing coarse frequency offset compensation to obtain:
rcomp=[rcomp(0),rcomp(1),…,rcomp(NFOE-1)],
wherein, <math>
<mrow>
<msub>
<mi>r</mi>
<mi>comp</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msubsup>
<mi>r</mi>
<mrow>
<mi>pow</mi>
<mn>4</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<mn>0</mn>
<mo>)</mo>
</mrow>
<msup>
<mi>e</mi>
<mrow>
<mo>-</mo>
<mi>j</mi>
<mn>2</mn>
<mi>πi</mi>
<mn>4</mn>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>T</mi>
<mi>c</mi>
</msub>
</mrow>
</msup>
<mo>,</mo>
<mi>i</mi>
<mo>=</mo>
<mn>0,1</mn>
<mo>,</mo>
<mo>.</mo>
<mo>.</mo>
<mo>.</mo>
<mo>,</mo>
<msub>
<mi>N</mi>
<mi>FOE</mi>
</msub>
<mo>-</mo>
<mn>1</mn>
<mo>;</mo>
</mrow>
</math>
step S404, fine frequency offset estimation is carried out:
for the signal rcompPerforming a pre-and post-correlation operation to obtain ecorr:
ecorr=[ecorr(0),ecorr(1),...,ecorr(corrsize-1)]WhereincorrsizeIs the distance of the front and back correlation;
will correlate the signal ecorr(i) Adding the phases and summing the phases to obtain:
wherein the 'arg ()' is angle calculation;
and phase conversion to obtain a fine frequency offset estimation result:
step S405, obtaining total frequency offset: f. ofe=fe1+fe2;
And step S406, carrying out frequency calibration according to the total frequency offset.
An embodiment of the present invention further provides a frequency calibration device, which may be embodied as an integrated tester, as shown in fig. 5, and includes:
a rising edge determining unit 501, configured to receive a PSK-modulated signal sent by a terminal, and determine a position of a rising edge of the signal;
a data intercepting unit 502 for intercepting data of a sufficient length according to a rising edge position;
a coarse frequency offset estimation unit 503, configured to determine a coarse frequency offset value according to the intercepted data, and perform coarse frequency offset compensation on the intercepted data through the coarse frequency offset value;
a fine frequency offset estimation unit 504, configured to intercept two pieces of data from the data after the coarse frequency offset compensation, determine a correlation value of the two pieces of intercepted data, and determine a fine frequency offset value according to the correlation value;
a frequency calibration unit 505, configured to perform frequency calibration according to the sum of the coarse frequency offset value and the fine frequency offset value.
When the signal is a WCDMA signal, the rising edge determining unit 501 receives a PSK modulated signal sent by the terminal, and before determining the position of the rising edge of the signal, is further configured to:
configuring a terminal to ensure that the terminal only transmits DPCCH signals and does not transmit DPDCH signals;
when the signal is a TD-SCDMA signal, the leading edge determining unit 501 receives a PSK modulated signal sent by a terminal, and before determining the position of the leading edge of the signal, the method further includes:
and configuring the terminal, so that the terminal does not send the control channel signal and only sends the traffic channel signal.
The rising edge determining unit 501 is specifically configured to:
determining the power value of a sample point sliding window of the PSK modulation signal;
determining the rising edge position I of the signal according to the power value of the sampling point sliding window of each sampling pointstart。
The data intercepting unit 502 is specifically configured to:
and intercepting data of one time slot length according to the position of the rising edge.
The data intercepting unit 502 is specifically configured to:
determining the intercepted data as r ═ r (0), r (1), …, r (N)FOE-1)]Wherein r (I) ═ r (I + I)start+NΔ),NΔFor a preset margin, NFOEIs the number of symbols of a slot, IstartThe position of the rising edge of the signal.
The coarse frequency offset estimation unit 503 is specifically configured to:
performing M power operation on the intercepted data, wherein M is a modulation index;
zero filling is carried out on the obtained data subjected to the M-power operation, and FFT (fast Fourier transform) is carried out, wherein the point number of the FFT is within a set range, so that the FFT resolution is within the range of fine frequency offset estimation;
performing FFT shift operation on the data after the FFT so that the zero frequency is in the center position;
determining a peak position of an absolute value of the data after the FFT shift operation;
obtaining a coarse frequency offset value according to the difference between the peak position and the central position and the values of the FFT resolution and M;
and performing coarse frequency offset compensation on the intercepted data through the coarse frequency offset value.
When the data intercepted according to the position of the rising edge is greater than the length of one time slot, the coarse frequency offset estimation unit 503 is further configured to, before determining a coarse frequency offset value according to the intercepted data and performing coarse frequency offset compensation on the intercepted data through the coarse frequency offset value:
determining a sampling position with the minimum sampling deviation;
and from the sampling position with the minimum sampling deviation, the data used for FFT operation is intercepted again.
Fine frequency offset estimation section 504 is specifically configured to:
taking the result r after coarse frequency deviation compensationcomp=[rcomp(0),rcomp(1),…,rcomp(N-1)]N is the data length;
intercepting two sections of data d according to a preset intercepting data initial position start _ pos, a data length corr _ length and a distance gap between two sections of databWherein b is 1,2, gap is a non-negative integer, and
d1=rcomp(start_pos:corr_length+start_pos-1)
d2=rcomp(corr_length+start_pos+gap:2corr_length+gap+start_pos-1);
by pair dbSolving the fourth power to remove the modulation information to obtain:
db,sqr=[db,sqr(0),db,sqr(1),...,db,sqr(corr_length-1)],
wherein d isb,sqr(i)=(db(i))2·(db(i))2Number of symbols of 1 data block;
determination of d1,sqrAnd d2,sqrCorrelation value R of medium element:
determining the fine frequency offset estimation result as follows: <math>
<mrow>
<msub>
<mi>f</mi>
<mrow>
<mi>e</mi>
<mn>2</mn>
</mrow>
</msub>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<mi>π</mi>
<msub>
<mi>T</mi>
<mi>c</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>corr</mi>
<mo>_</mo>
<mi>length</mi>
<mo>+</mo>
<mi>gap</mi>
<mo>)</mo>
</mrow>
</mrow>
</mfrac>
<mi>arg</mi>
<mrow>
<mo>(</mo>
<mi>R</mi>
<mo>)</mo>
</mrow>
<mo>/</mo>
<mn>4</mn>
<mo>,</mo>
</mrow>
</math> wherein T iscIs the chip period;
the frequency calibration device provided in the embodiment of the present invention may be specifically an integrated tester, where the integrated tester includes an antenna capable of receiving a PSK modulated signal sent by a terminal, a CPU for determining a coarse frequency offset value and a fine frequency offset value and performing frequency calibration processing, and a storage unit for caching related data when the CPU performs corresponding processing.
By the frequency calibration method provided by the embodiment of the invention, the comprehensive tester can accurately and effectively estimate the large frequency offset of the terminal under the condition of not knowing the cell information of the signal transmitted by the terminal. The frequency offset estimation method does not need accurate synchronous timing, only needs to receive effective data, and is divided into coarse frequency offset estimation and fine frequency offset estimation on the basis, wherein the coarse frequency offset estimation can ensure the range of the frequency offset estimation, and the fine frequency offset estimation ensures the accuracy of the estimation. The method reduces the requirement on timing, has simple process, saves the interaction of a comprehensive tester for acquiring cell configuration information, and is a more efficient frequency calibration method.
The embodiment of the invention provides a frequency calibration method and a frequency calibration device, which are used for intercepting two sections of data from the data after coarse frequency offset compensation after coarse frequency offset estimation and coarse frequency offset compensation and determining the correlation value of the intercepted two sections of data, namely determining a fine frequency offset value according to the correlation value without determining the accurate time slot initial position for fine frequency offset estimation, thereby reducing the complexity of frequency calibration and improving the test efficiency.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.