Detailed Description
Please refer to fig. 3A, which is a system block diagram of a frequency synchronization apparatus according to a first embodiment of the present invention. As shown, the frequency synchronization apparatus of the present invention includes a plurality of pre-filters 3011, 3031, 3051, a plurality of power meters 3111, 3131, 3151, 3171, a plurality of signal averagers 3211, 3231, 3251, 3271, a maximum signal selector 3301, a power calibrator 3401, and a signal processor 3501.
In practice, the present invention may have a plurality of signal power generators (each including a pre-filter, a power measurer and a signal averager), and the number of the signal power generators is not limited, and the larger the number of the signal power generators, the more accurate the frequency offset value estimated by the present invention is. In addition, the input signal of the frequency synchronization apparatus of the present invention is a base-band signal samples (samples) of the baseband signal received and demodulated by the mobile station from the wireless channel.
First, the frequency synchronization apparatus of the present invention uses these pre-filters 3011, 3031, and 3051 to perform pre-filtering on the demodulated baseband signal. Then, the frequency synchronization apparatus uses the power measuring devices 3111, 3131, 3151, 3171 to measure the power of each pre-filtered signal, and uses the signal averagers 3211, 3231, 3251, 3271 to obtain the average power value of the signal of each path.
The power meters 3111, 3131, 3151, 3171 can be implemented in many different ways, and the implementation of the power meters 3111, 3131, 3151, 3171 is not limited in the present invention. To make the disclosure of the present invention more clear, please refer to fig. 4A-4C, which are possible implementations of the power meter of the present invention.
FIG. 4A is an internal block diagram of a power meter according to a first embodiment of the present invention. The power meter has a squarer 401, an accumulator 403, and a decimator 405. The squarer 401 is used to calculate the square value of each baseband signal sample; the accumulator 403 is used to add the square values of two consecutive samples of the baseband signal; the down sampler 405 is used to perform down sampling (down sampling) to reduce the amount of operation of the system. With this embodiment, a real-time power value is obtained for every two samples.
FIG. 4B is an internal block diagram of a power meter according to a second embodiment of the present invention. Wherein the power meter has a reduced sampler 411 and a squarer 413. The down sampler 411 is used to perform down sampling (down sampling) to reduce the amount of computation of the system; the squarer 413 is used for calculating the square value of the baseband signal samples to obtain the real-time power value.
FIG. 4C is an internal block diagram of a power meter according to a third embodiment of the present invention. The power meter has an accumulator 421, a reduced sampler 423, and a squarer 425. The accumulator 421 is used to add two consecutive samples of the baseband signal; the down sampler 423 is used for performing down sampling (down sampling) to reduce the amount of calculation of the system; the squarer 425 is used to calculate the square of the accumulated samples of the baseband signal to obtain the real-time power value.
After calculating the real-time power values and averaging the power values of the paths, the frequency synchronization apparatus of the present invention uses the maximum signal selector 3301 to compare the average power values of the signals of the paths to find a signal with the maximum power, and transmits the signal to the signal power calibrator 3401. The power normalizer 3401 normalizes the signal with the maximum power to make the signal size fall between 0 and 1To generate a first detection value PnTo determine whether the frequency calibration channel sends a frequency calibration signal.
In GSM, for example, various logical channels (logical channels) are used for transmitting user information and control signals, and these logical channels actually utilize time slots (slots) of physical channels (physical channels) for transmitting signals. The frequency correction channel is one of the logical channels, and the frequency correction channel sends out the frequency correction signal to perform frequency synchronization.
Since the signal modulation is gmsk (gaussian minimum shift keying) and the content of the frequency correction signal is a series of "0", after demodulation, the frequency correction signal forms a sine wave with a frequency of about 66.7 kHz.
In addition, the frequency generated by the frequency synthesizer (frequency synthesizer) of the mobile station of the GSM system, such as a mobile phone, is generally less accurate due to cost considerations. Furthermore, since the frequency generated by the frequency synthesizer is affected by temperature, the generated frequency generally changes with temperature.
The frequency generated by the mobile station is usually shifted by a frequency offset, such as 20kHz, compared to the carrier frequency generated by the base station. Therefore, when the mobile station is turned on or needs to perform a handoff (hand over) operation, the mobile station must use the frequency correction channel for time and frequency synchronization.
However, since the frequency offset value is unknown, the mobile station of the GSM system may shift the base frequency of the received frequency correction signal during demodulation (i.e., the frequency of the frequency correction signal may deviate from 66.7kHz after demodulation). Therefore, the present invention uses the pre-filters 3011, 3031, and 3051 with different center frequencies to perform filtering operation on the baseband signal to detect the frequency correction signal and find the offset value of the frequency correction signal.
In the present invention, since the pre-filters 3011, 3031, and 3051 have specific frequency bands, the present invention can detect a wider frequency band as a whole. Furthermore, since the frequency band detectable by the present invention is increased or the resolution of the signal detection of the present invention is increased when the number of the pre-filters used is increased, the frequency correction signal detection capability and the frequency correction capability of the present invention can be enhanced by increasing the number of the pre-filters. In practice, the number of these pre-filters may be increased or decreased as needed or cost considerations dictate.
In addition, since the pre-filter used in the present invention does not need to be dynamically adjusted according to the location or the input signal, compared with the prior art using an adaptive filter, the present invention is less likely to cause the problems of time delay and the inability to detect the frequency correction channel.
In practice, these pre-filters 3011, 3031, 3051 may be implemented using IIR filters (infinite impulse response filters) or FIR filters (finite impulse response filters). In the present invention, these pre-filters 3011, 3031, 3051 are IIR filters using a first-order (first-order).
To make the disclosure of the present invention clearer, please refer to fig. 5, which is a spectrum distribution diagram of the prefilter of the present invention. The spectral distributions of these pre-filters 3011, 3031, 3051 are respectively marked by H0~2To indicate. In this embodiment, it is assumed that the frequency of the frequency correction signal after being demodulated mainly falls within the frequency band of the pre-filter 3011 (the frequency correction signal may also fall within the frequency band of the pre-filter 3031 or 3051), wherein the frequency correction signal is represented by an arrow.
It is obvious that in this case, the power of the output signal of the pre-filter 3011 is greater than that of the output signal of the pre-filter 3031 or 3051. Therefore, after the processing by the power meters 3131, 3151, 3171 and the signal averagers 3231, 3251, 3271, the maximum signal selector 3301 selects the signal output by the path using the pre-filter 3011, i.e., the signal output by the signal averager 3231, for subsequent processing.
Furthermore, in order to provide a reference value for the power calibrator 3401 to perform normalization, the frequency synchronization apparatus of the present invention directly measures the power of the frequency calibration signal by the power meter 3111, and obtains the average power value by the signal averager 3211 to serve as the reference value for the power calibrator 3401.
Then, using the reference value, the power normalizer 3401 makes the magnitude of the signal output by the signal averager 3231 fall between 0 and 1 to generate the first detection value Pn. In the present invention, the power normalizer 3401 is implemented by dividing the average power value output by the signal averager 3231 by the average power value output by the signal averager 3211 to normalize the signal.
Since the path of the signal averager 3211 does not use a pre-filter (in general, the power of the signal is reduced by passing through a filter), the average power value outputted by the path is larger than that outputted by other paths, and the power normalizer 3401 makes the magnitude of the outputted signal fall between 0 and 1.
In practice, the power normalizer 3401 is not limited to make the magnitude of the signal fall between 0 and 1, but only needs to make the magnitude of the signal fall within a fixed range to meet the requirement of the present invention.
It is noted that, for the purpose of normalizing the signal by using the power normalizer 3401, the first detection value P is used to reduce the effect of fading effect (fading effect) caused by the wireless channel on the frequency synchronization apparatus of the present inventionnCan fall within a fixed range and cannot fluctuate along with the position of the mobile machine.
In addition, the present invention achieves the signal normalization by dividing the average power value outputted from the signal averager 3231 by the average power value outputted from the signal averager 3211. Therefore, in the normalization process of the present invention, a large amount of memory is not required to store additional lookup tables, so that the present invention can greatly reduce the cost compared with the prior art.
After obtaining the first detection value PnThen, the power calibrator 3401 of the present invention will detect the first detection value PnTo the signal processor 3501. The signal processor 3501 utilizes the first detection value PnTo determine whether the frequency calibration channel sends a frequency calibration signal, when the first detection value PnWhen the frequency is greater than a first preset threshold, it is determined that the frequency correction channel has sent a frequency correction signal. Otherwise, the frequency calibration channel is considered not to send a frequency calibration signal. In practice, the first threshold is preset between 0.75-0.8, but the invention is not limited thereto, and the setting of the first threshold can be changed according to the actual application.
When the signal processor 3501 determines that the frequency correction channel has sent a frequency correction signal, it calculates an estimate of the frequency offset value using the signal sent by the maximum signal selector 3301 through the power normalizer 3401. Taking fig. 5 as an example, the frequency band in which the frequency correction signal falls is H0Therefore, the signal output by the pre-filter 3011 has the largest power, and the largest signal selector 3301 sends a signal to the signal processor 3501 that the signal output by the pre-filter 3011 is the largest signal. Thus, the signal processor 3501 can know that the frequency of the frequency correction signal falls within the frequency band of the pre-filter 3011, and calculate the difference between the operating frequency of the frequency synchronization device itself and the center frequency of the pre-filter 3011 to obtain the frequency offset value.
Please refer to fig. 3B, which is a system block diagram illustrating a frequency synchronization apparatus according to a second embodiment of the present invention. As shown, the frequency synchronization apparatus of the present invention has a plurality of pre-filters 3012, 3032, 3052, a plurality of power meters 3132, 3152, 3172, a plurality of signal averagers 3232, 3252, 3272, a maximum signal selector 3302 and a signal processor 3502.
Since the pre-filters 3012, 3032, 3052, the power meters 3132, 3152, 3172, the signal averagers 3232, 3252, 3272, and the maximum signal selector 3302 have the same functions and embodiments as the same devices in the first embodiment, they are not described again here.
The main difference between the second embodiment and the first embodiment is that the signal processor 3502 samples the baseband signal at different time points, compares the baseband signal at different time points, and generates a second detection value by using a predetermined correlation function.
Since the sampled values of the fundamental frequency signal can be expressed in mathematical form when transmitting the frequency correction signal:
wherein, w
nSample values, s, of ambient noise
nRefers to the value, V, of the demodulated and sampled signal from the base station
nReferring to received power, θ is a phase difference value caused by a local oscillator (local oscillator), and
refers to the phase difference caused by the wireless channel. Therefore, the sampled values of four consecutive base frequency signals can be represented by the constellation diagram shown in fig. 6.
As shown in fig. 6, since snAnd sn+2And sn+1And sn+3The difference between them is the largest, so to obtain a larger detection value, the correlation function of the signal processor 3502 is set as:
An=(rn+2-rn)×(rn+3-rn+1),
wherein,r n -r n+3 for samples of the fundamental frequency signal at different time points, A n As a function of the value of the correlation functionThe symbol "x" shown in the above formula represents an outer product.
After the values obtained by the correlation function are accumulated and normalized, the second detected value Q can be generatedn. First, the signal processor 3502 generates two accumulated values by using the values obtained by the correlation function and the k-th power of the absolute value thereof, as shown in the following formula 2:
<math><mrow><msub><mi>S</mi><mn>1</mn></msub><mo>=</mo><munderover><mi>Σ</mi><mrow><mi>n</mi><mo>=</mo><mn>1</mn></mrow><mi>N</mi></munderover><msup><mrow><mo>(</mo><msub><mi>A</mi><mi>n</mi></msub><mo>)</mo></mrow><mi>k</mi></msup></mrow></math>
<math><mrow><msub><mi>S</mi><mn>2</mn></msub><mo>=</mo><munderover><mi>Σ</mi><mrow><mi>n</mi><mo>=</mo><mn>1</mn></mrow><mi>N</mi></munderover><msup><mrow><mo>|</mo><msub><mi>A</mi><mi>n</mi></msub><mo>|</mo></mrow><mi>k</mi></msup></mrow></math>
wherein, k is an odd number, and the invention makes k equal to 1 so as to reduce the operation amount; and N is the size of a preset moving window, which is used for representing the number of accumulations each time.
Then, the signal processor 3502 performs a normalization operation to generate the second detection value QnThe operation is shown as the following formula:
Qn=S1/S2
thus, the second detection value QnAlso has a numerical value ofBetween 0 and 1.
The signal processor 3502 uses the second detection value QnTo determine whether the frequency calibration channel sends a frequency calibration signal, when the second detection value QnIf the value is greater than a second threshold, it is determined that the frequency calibration channel has sent a frequency calibration signal. Otherwise, the frequency calibration channel is considered to not send a frequency calibration signal. In practice, the second threshold is preset between 0.75-0.8, but the invention is not limited thereto, and the setting of the second threshold can be changed according to the actual application.
When the signal processor 3502 determines that the frequency correction channel has sent a frequency correction signal, it calculates an estimate of the frequency offset value using the signal sent by the maximum signal selector 3302. Taking fig. 5 as an example, the frequency band in which the frequency correction signal falls is H0Therefore, the signal output by the pre-filter 3012 has the largest power, and the maximum signal selector 3302 sends a signal to the signal processor 3502 that the signal output by the pre-filter 3012 is the largest signal. Thus, the signal processor 3502 can know that the frequency of the frequency correction signal falls within the frequency band of the pre-filter 3012, and calculate the difference between the operating frequency of the frequency synchronization device itself and the center frequency of the pre-filter 3012 to obtain the frequency offset value.
Please refer to fig. 3C, which is a block diagram of a frequency synchronization apparatus according to a third embodiment of the present invention. As shown, the frequency synchronization apparatus of the present invention includes a plurality of pre-filters 3013, 3033, 3053, a plurality of power meters 3113, 3133, 3153, 3173, a plurality of signal averagers 3213, 3233, 3253, 3273, a maximum signal selector 3303, a power calibrator 3403, and a signal processor 3503.
Since the pre-filters 3013, 3033, 3053, the power meters 3113, 3133, 3153, 3173, the signal averagers 3213, 3233, 3253, 3273, the maximum signal selector 3303, and the power calibrator 3403 have the same functions and embodiments as the same devices in the first embodiment, further description is omitted here.
Like the first embodiment, the maximum signal selector 3303 compares the average power values of the signals from the signal averagers 3233, 3253, 3273 to find a signal with the maximum power, and sends the signal to the signal power normalizer 3403. The power normalizer 3403 normalizes the signal with the maximum power to make the magnitude of the signal fall between 0 and 1 to generate a first detection value Pn. Wherein the frequency synchronization device can be based on the first detection value PnTo determine whether the frequency calibration channel sends a frequency calibration signal.
After obtaining the first detection value PnThen, the power calibrator 3403 of the present invention will detect the first detection value PnTo the signal processor 3503. The signal processor 3503 utilizes the first detection value PnTo determine whether the frequency calibration channel sends a frequency calibration signal, when the first detection value PnWhen the frequency is greater than a first preset threshold, it is determined that the frequency correction channel has sent a frequency correction signal. Otherwise, the frequency calibration channel is considered not to send a frequency calibration signal.
Similar to the second embodiment, the signal processor 3503 generates a second detection value Q by using the sampled values of the baseband signal at different time points and a predetermined correlation functionn. Wherein the frequency synchronization device can be based on the second detection value QnTo determine whether the frequency calibration channel sends a frequency calibration signal. When the second detection value QnIf the value is greater than a second threshold, it is determined that the frequency calibration channel has sent a frequency calibration signal. Otherwise, the frequency calibration channel is considered to not send a frequency calibration signal.
As described above, signal processor 3503 can utilize the first detection value P alonenOr a second detected value QnTo determine whether the frequency calibration channel sends a frequency calibration signal, and when the first detection value PnOr a firstTwo detected values QnIf the value is greater than the first threshold or the second threshold, the signal processor 3503 determines that the frequency correction channel has sent a frequency correction signal. At this time, the signal processor 3503 can determine which pre-filtered band the fundamental frequency of the frequency correction signal falls within (i.e. the one outputting the maximum power) through the information provided by the maximum signal selector 3303, and thereby perform the frequency synchronization.
In the third embodiment, the signal processor 3503 combines the first detection value PnAnd a second detection value QnTo determine whether the frequency calibration channel sends a frequency calibration signal, the combination of the frequency calibration signal and the frequency calibration signal is as follows:
Rn=λ·Qn+(1-λ)·Pn
wherein λ is set between 0 and 1, as required. Thus, the first detection value P is, as a whole, the valuenAnd a second detection value QnThe third detection value R generated by the bindingnAlso between 0 and 1.
Due to the first detection value PnDerived from the power value of the signal and therefore less disturbed by the amount of phase error of the signal itself. However, since the baseband signal must first pass through the pre-filter before the first detection value P is performednSo that there is a loss of energy, so that generally the first detection value PnIs compared with the second detection value QnThe peak value of (a) is low.
Furthermore, since the second detection value QnDerived from the baseband signals of different phases taken at different time points, so that the second detection value QnMay be more susceptible to interference by the amount of phase error in the signal itself. However, since the signal processor directly uses the sampled values of the baseband signal to derive the second detected value QnSo that the peak value thereof is compared with the first detection value PnIs high.
Therefore, the present invention combines the first detection value PnAnd a second detected valueQnTo generate the third detection value RnTo minimize instability due to loss of phase error and energy.
It is noted that when λ is 0, Rn=PnAnd when λ is 1, Rn=QnThese two extreme examples are the case where either of the detection values is used alone as described above.
Please refer to fig. 7, which is a diagram illustrating a relationship between a third detection value and time. Wherein the horizontal axis of the graph represents time, and the vertical axis represents the third detection value RnThe size of (d); the first and second threshold values are respectively TH1And TH2And (4) showing. As shown in the figure, the third detection value R is at the beginning of receiving the frequency correction signalnThe third detection value R increases with time at the later stage of receiving the frequency correction signalnWill decrease over time.
The above-mentioned phenomenon is caused mainly by the first detection value PnDerived from an accumulated value of the power of the signal, and the second detection value QnIs derived from the accumulated value of the correlation function values generated by signal processor 3503. At the beginning of receiving the frequency correction signal, the frequency correction signal inputted to the frequency synchronization device is gradually increased, so that the third detection value RnWill gradually increase; on the contrary, in the later period of receiving the frequency correction signal, the frequency correction signal inputted to the frequency synchronization device is gradually decreased, so that the third detection value RnWill gradually decrease.
The frequency synchronization device of the present invention utilizes this phenomenon to detect the frequency correction signal. When the third detection value RnWhen the first threshold value is exceeded, it can be determined that the frequency synchronization device has received a frequency correction signal, and when the third detection value R is exceedednIf the second threshold value is exceeded, the frequency synchronization device can be confirmed to receive the frequency correction signal; otherwise, the frequency synchronization device is considered not to receive the frequency correction signal. In practice, the first threshold is preset at 0.75, and the second threshold is preset at 0.8,however, the invention is not limited. In addition, the setting of the first and second thresholds may be changed according to actual requirements, but the second threshold needs to be larger than the first threshold.
When the frequency synchronization device confirms that the frequency correction signal is received, it can find out the pre-filter of the output signal with the maximum power to estimate the frequency offset value of the system. In addition, the frequency synchronization device also utilizes the third detection value RnTo estimate the time offset value of the system. When the signal processor 3503 determines that the frequency correction channel has sent a frequency correction signal, it calculates an estimate of the frequency offset value using the signal sent by the maximum signal selector 3303 through the power normalizer 3403. Taking fig. 5 as an example, the frequency band in which the frequency correction signal falls is H0Therefore, the signal output by the pre-filter 3013 has the largest power, and the maximum signal selector 3303 sends a signal to the signal processor 3503 that the signal output by the pre-filter 3013 is the largest signal. Therefore, the signal processor 3503 can know that the frequency of the frequency correction signal falls within the frequency band of the pre-filter 3013, and calculate the difference between the operating frequency of the frequency synchronization device itself and the center frequency of the pre-filter 3013 to obtain the frequency offset value.
To make the disclosure of the present invention clearer, please refer to fig. 8A, which is a flowchart illustrating the operation of the first preferred embodiment of the frequency synchronization method according to the present invention. The method comprises the following steps:
step 8011: executing an initialization program;
step 8031: calculating a first detection value Pn;
Step 8051: determining whether there are N continuous signals to make the first detection value PnGreater than a first threshold value TH1Is there a If yes, entering a step 8111, otherwise, jumping to a step 8131;
step 8111: find out the time offset and the frequency offset and determine whether these offsets are within a predetermined range? If yes, entering a step 8151, otherwise, jumping to a step 8131;
step 8131: determine whether a predetermined value of a receive window (RX window) is reached? If yes, go to step 8011, otherwise, go to step 8031; and
step 8151: and (6) ending.
As shown in fig. 9, step 8031 further includes:
step 901: using a plurality of pre-filters to perform a filtering action on a fundamental frequency signal of the frequency correction signal;
step 903: measuring the power of the baseband signal by using a first power measuring device to generate a first power value; using a plurality of second power measuring devices to respectively measure the power of the signals output by the prefilters so as to generate a plurality of second power values; the number of the second power measurers is equal to that of the prefilters and corresponds to that of the prefilters one by one; and
step 905: calculating an average value of a predetermined number of first power values by using a first signal averager to generate a first power average value; calculating the average value of a predetermined number of second power values by using a plurality of second signal averagers respectively, wherein the number of the second signal averagers is equal to the number of the second power measuring devices and corresponds to the second signal averagers one by one; selecting the largest one of the average power values output by the second signal averagers by using the maximum signal selector to generate a second average power value; and using a power calibrator to divide the second power average value by the first power average value to perform normalization operation to generate the first detection value Pn。
To make the disclosure of the present invention clearer, please refer to fig. 8B, which is a flowchart illustrating an operation of the frequency synchronization method according to the second preferred embodiment of the present invention. The method comprises the following steps:
step 8012: executing an initialization program;
step 8072: calculating a second detected value Qn(please refer to the above calculation method);
step 8092: judging whether there are M continuous signals to make the second detection value QnGreater than a second threshold value TH2And the second detection value Q is madenRise and fall? If yes, entering a step 8112, otherwise, jumping to a step 8132;
step 8112: find out the time offset and the frequency offset and determine whether these offsets are within a predetermined range? If yes, go to step 8152, otherwise, go to step 8132;
step 8132: determine whether a predetermined value of a receive window (RX window) is reached? If yes, go to step 8012, otherwise, go to step 8072; and
step 8152: and (6) ending.
To make the disclosure of the present invention clearer, please refer to fig. 8C, which is a flowchart illustrating an operation of the frequency synchronization method according to the third preferred embodiment of the present invention. The method comprises the following steps:
step 8013: executing an initialization program;
step 8033: calculating a first detection value Pn;
Step 8053: determining whether there are N continuous signals to make the first detection value PnGreater than a first threshold value TH1Is there a If yes, go to step 8073, otherwise, go to step 8133;
step 8073: calculating a second detected value Qn(please refer to the above-mentioned calculation method), and by combining the first detection value PnAnd a second detection value QnTo generate a third detection value Rn(please refer to the above combination);
step 8093: determining whether there are M continuous signals to make the third detection value RnGreater than a second threshold value TH2And the third detection value R is usednRise and fall? If yes, go to step 8113, otherwise, go to step 8133;
step 8113: find out the time offset and the frequency offset and determine whether these offsets are within a predetermined range? If yes, go to step 8153, otherwise, go to step 8133;
step 8133: determine whether a predetermined value of a receive window (RX window) is reached? If yes, go to step 8013, otherwise, go to step 8033; and
step 8153: and (6) ending.
Step 8033 has the steps shown in fig. 9, which are the same as those in the first embodiment, and are not described again here.
In summary, the present invention has the following features and advantages:
(1) in the normalization process, a large amount of memory is not needed to store additional lookup tables, so that compared with the prior art, the cost can be greatly reduced.
(2) Since the pre-filter used in the present invention does not need to be dynamically adjusted according to the location or the input signal, the present invention is less likely to cause the problems of time delay and the inability to detect the frequency correction channel, compared to the prior art using an adaptive filter.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.