Method and device for correcting corresponding relation table of duty ratio and output frequency of terminal
Technical Field
The present application relates to the field of mobile communications technologies, and in particular, to a method and an apparatus for correcting a duty ratio and output frequency correspondence table of a terminal.
Background
A novel 230MHz wireless broadband communication system (LTE 230 system for short) is a deeply customized wireless communication system which uses discrete spectrum resources in 230MHz frequency band in each industry based on LTE core technologies such as Orthogonal Frequency Division Multiplexing (OFDM), adaptive coding modulation and adaptive retransmission aiming at wireless communication application requirements of industries such as electric power, petroleum and forestry.
Because the frequency precision requirements of different terminal systems are different, and the requirements of the terminal on cost, power consumption, area, integrator and crystal oscillator are all greatly different in hardware design, the requirements of the pulse width modulation system on period, level and current are different. The pulse width modulation system of the LTE230 baseband chip is thus designed as a configurable system.
The frequency pulse width modulation system of the LTE230 baseband chip can output stable direct current voltage after passing through an integrator by using periodic square wave signals. When the duty ratio of the square wave is different, the output direct current voltage is also different. When the adjustable range of the duty ratio is wider, the output direct-current voltage change precision is higher. The voltage controllable crystal oscillator achieves linear change of output frequency through linear change of voltage. If the input voltage precision is high enough, the output frequency precision of the crystal oscillator can reach any precision. Therefore, in the current terminal design, a pulse width modulation system is used to output a square wave with an adjustable duty ratio, and the square wave is input to a voltage controllable crystal oscillator through an integrator to generate a frequency controllable system.
For each type of terminal product, a set of special mapping table of adjustment parameters and frequency changes is required for the frequency adjustment control system to track the system frequency.
Since the pulse width modulation system of the LTE230 baseband chip is a configurable system, the following problems exist for the conventional design approach:
for a common single configuration system, a designer will design hardware with an integration circuit matched with a matched reference circuit. There is also a corresponding reference value for the relationship between the tuning parameter and the output frequency variation. The method has great advantages for quickly designing the frequency adjustment system, and the frequency adjustment table can be directly recommended by a manufacturer. However, if the product is changed, especially the frequency adjustment accuracy requirement is changed, the hardware circuit must be redesigned, and the adjustment table must be reset. Since there are many terminal forms in the current LTE230 system and the frequency adjustment accuracy requirements for different service forms are different, using a single configuration will reduce the multiplexing capability of the product hardware.
To solve the problem of single configuration reducing product reusability, a scheme of periodic software configuration of a pulse width modulation system is presented. This allows the frequency adjustment accuracy to be matched with software modifications. The LTE230 baseband chip adopts the design scheme to improve the application range of the chip. However, this solution brings new problems:
because of the flexibility of configuration, manufacturers do not provide a peripheral reference circuit for each configuration, nor do they provide a tuning table for the frequency output. Therefore, during the hardware circuit design and the later frequency adjustment software system design, a lot of experiments must be performed to obtain the most suitable pulse width period, the external integration circuit parameter, and the mapping table of the relationship between the adjustment parameter and the frequency.
In addition, the existing solutions all have the following unavoidable problem, namely, because the production batches of the crystal oscillators are different or the manufacturers are different, the same adjustment parameter table can meet the requirement of fine adjustment for the products of different batches in the same product line. Therefore, an additional frequency adjustment re-calibration link is required in actual production.
Disclosure of Invention
The application provides a method and a device for correcting a corresponding relation table of a duty ratio and an output frequency of a terminal, which do not need to repeatedly try a peripheral circuit aiming at different frequency adjustment precision requirements, and reduce a hardware development period. And different product lines can be reused in the hardware part of frequency adjustment.
The method for correcting the corresponding relation table of the duty ratio and the output frequency of the terminal provided by the embodiment of the application comprises the following steps:
A. acquiring an initial setting table of the corresponding relation between the duty ratio and the output frequency of the pulse width modulation hardware which can be configured through software, wherein the initial setting table is called as a first corresponding relation table in the following;
B. the terminal is electrified and searches for an effective cell, if the cell identifiers searched for 2 times continuously are the same, broadcast data is constructed according to the searched cell identifiers, the local broadcast is related to the received signals, and a first frequency deviation is calculated according to the related result;
C. and resetting the pulse bandwidth modulation (PWM) parameters in the first corresponding relation table by using the calculated first frequency deviation to obtain a second corresponding relation table.
Optionally, after step C, further comprising:
D. the terminal searches the cell identification again, if the cell identifications are the same, the second frequency deviation is calculated, the individual error of the terminal is calculated according to a formula, and if the cell identifications are different, the step A is carried out again;
the calculation formula is as follows:
individual error is the second frequency deviation/(initial PWM setting-step C results in the set PWM value);
E. revising the first corresponding relation table again according to the individual error to obtain a third corresponding relation table.
Optionally, the pulse width modulation hardware configurable by software is an LTE230 chip system.
The application also discloses a terminal, which comprises a pulse width modulation hardware which can be configured by software and a correction device which is obtained by a corresponding relation table of duty ratio and output frequency, wherein the device comprises:
an obtaining module, configured to obtain an initial setting table of a corresponding relationship between a duty ratio and an output frequency of the hardware, where the initial setting table is referred to as a first corresponding relationship table;
the searching module is used for searching the effective cell after the terminal is powered on, and enabling the frequency deviation calculating module if the cell identifiers searched for 2 times are the same;
the frequency deviation calculation module is used for constructing broadcast data according to the cell identifier searched by the search module, correlating the broadcast data with a received signal through local broadcast and calculating a first frequency deviation according to a correlation result;
and the resetting module is used for resetting the pulse bandwidth modulation (PWM) parameters in the first corresponding relation table by using the calculated first frequency deviation to obtain a second corresponding relation table.
Optionally, the searching module is further configured to search the cell identifier again after the resetting module obtains the second mapping table, and enable the frequency deviation calculating module to calculate the second frequency deviation again if the cell identifiers are the same;
the apparatus further comprises:
the individual error calculation module is used for calculating the individual error of the terminal according to a formula, and the calculation formula is as follows:
individual error is frequency deviation/(initial PWM setting-step C yields the set PWM value);
and the revising module is used for revising the first corresponding relation table again according to the individual error to obtain a third corresponding relation table.
Optionally, the pulse width modulation hardware configurable by software is an LTE230 chip system.
The application also discloses a duty ratio and output frequency corresponding relation table obtains correcting unit, the device includes:
an obtaining module, configured to obtain an initial setting table of a corresponding relationship between a duty ratio and an output frequency of the hardware, where the initial setting table is referred to as a first corresponding relationship table;
the searching module is used for searching the effective cell after the terminal is powered on, and enabling the frequency deviation calculating module if the cell identifiers searched for 2 times are the same;
the frequency deviation calculation module is used for constructing broadcast data according to the cell identifier searched by the search module, correlating the broadcast data with a received signal through local broadcast and calculating a first frequency deviation according to a correlation result;
and the resetting module is used for resetting the pulse bandwidth modulation (PWM) parameters in the first corresponding relation table by using the calculated first frequency deviation to obtain a second corresponding relation table.
Optionally, the searching module is further configured to search the cell identifier again after the resetting module obtains the second mapping table, and enable the frequency deviation calculating module to calculate the second frequency deviation again if the cell identifiers are the same;
the apparatus further comprises:
the individual error calculation module is used for calculating the individual error of the terminal according to a formula, and the calculation formula is as follows:
individual error is frequency deviation/(initial PWM setting-step C yields the set PWM value);
and the revising module is used for revising the first corresponding relation table again according to the individual error to obtain a third corresponding relation table.
According to the technical scheme, the corresponding relation table of the duty ratio and the output frequency is corrected through software, a peripheral integrator can be designed by adopting a unified recommended reference circuit in a frequency adjusting part, the peripheral circuit does not need to be tried repeatedly according to different frequency adjusting precision requirements, and the hardware development period is shortened. And different product lines can be reused in the hardware part of frequency adjustment. The frequency adjustment part of the software code can achieve basic multiplexing for the same pulse width modulation hardware. Increasing the maintainability of the software version. By applying the scheme of the application, a frequency correction process is not required to be added in production, so that the equipment cost and time required by production are reduced.
Drawings
Fig. 1 is a schematic flowchart of a method for correcting a corresponding relationship table between a duty ratio and an output frequency according to an embodiment of the present application.
Detailed Description
In order to make the technical principle, characteristics and technical effects of the technical scheme of the present application clearer, the technical scheme of the present application is explained in detail with reference to specific embodiments below.
The flow of the method for correcting the corresponding relation table of the duty ratio and the output frequency provided by the embodiment of the application is shown in fig. 1, and the method comprises the following steps:
step 101: and acquiring an initial setting table of the corresponding relation between the duty ratio and the output frequency of the pulse width modulation hardware of the terminal. The initial setting table is hereinafter referred to as a first correspondence table.
Table 1 gives an example of the initial setting table. The contents of table 1 are for illustration only and are not intended to limit the scope of the present application.
| Frequency setting value
|
Corresponding voltage (volt) \
|
Actual output frequency (KHz)
|
| 0
|
-3.3V
|
19.10
|
| 1
|
-3.29V
|
19.101
|
| 2
|
-3.25V
|
19.11
|
| ……
|
…..
|
,,,,,
|
| 10000
|
3.3V
|
19.3 |
TABLE 1
In the hardware implementation link, if the hardware is designed according to the recommended pulse width period and a peripheral integrating circuit, a standard duty ratio and frequency change table can be directly obtained. Or the hardware is designed according to self-requirement, but the basic corresponding relation table of the duty ratio and the output frequency is obtained by self-testing.
Step 102: the terminal is powered on to search for an effective cell and calculates a first frequency offset.
According to the design of the LTE230 system terminal on cell search, firstly, the terminal needs to search a cell identifier after being electrified, if the cell identifiers searched for 2 times continuously are the same, broadcast data is constructed according to the searched cell identifiers, the broadcast data is related with received signals through local broadcast, and a first frequency deviation can be calculated according to the related result.
Step 103: and resetting the pulse bandwidth modulation parameter in the first corresponding relation table by using the calculated first frequency deviation to obtain a second corresponding relation table.
For example, a frequency deviation of 1KHz and a preset frequency of 19KHz are measured. The voltage corresponding to 20KHz and an initial Pulse Width Modulation (PWM) setting value are retrieved from the first correspondence table, the PWM parameter is reset,
through the three steps, the corresponding relation table of the duty ratio and the output frequency for the terminal can be obtained preliminarily.
Optionally, frequency correction may be performed again to improve correction accuracy.
After step 103, further comprising:
step 104: and the terminal searches the cell identification again, and calculates the second frequency deviation if the cell identifications are the same. And calculating the individual error of the terminal according to a formula. If not, the step 101 is repeated.
The calculation formula is as follows:
individual error second frequency offset/(initial PWM set-step 103 get set PWM value)
Step 105: revising the first corresponding relation table obtained in the step 101 according to the individual error to obtain a third corresponding relation table. For example, the individual error is 1 KHz/set value, and after table 1 is adjusted, the obtained third correspondence table is shown in table 2:
TABLE 2 modified adjustment Table
| Frequency setting value
|
Corresponding voltage (volt) \
|
Actual output frequency (KHz)
|
| 0
|
-3.3V
|
19.10+1
|
| 1
|
-3.29V
|
19.101+1
|
| 2
|
-3.25V
|
19.11+1
|
| ……
|
…..
|
,,,,,
|
| 10000
|
3.3V
|
19.3+1 |
TABLE 2
The table of correspondence between duty ratio and output frequency required for frequency adjustment specific to the terminal is completed by the flow shown in fig. 1.
The scheme of the application can be applied to an LTE230 chip system or other pulse width modulation hardware systems which can be configured through software.
Another embodiment of the present application further provides a terminal, where the terminal includes pulse width modulation hardware configurable by software, and a correction device for a correspondence table between duty ratio and output frequency, where the correction device is implemented by software programming, and the correction device includes:
an obtaining module, configured to obtain an initial setting table of a corresponding relationship between a duty ratio and an output frequency of the hardware, where the initial setting table is referred to as a first corresponding relationship table;
the searching module is used for searching the effective cell after the terminal is powered on, and enabling the frequency deviation calculating module if the cell identifiers searched for 2 times are the same;
the frequency deviation calculation module is used for constructing broadcast data according to the cell identifier searched by the search module, correlating the broadcast data with a received signal through local broadcast and calculating a first frequency deviation according to a correlation result;
and the resetting module is used for resetting the pulse bandwidth modulation (PWM) parameters in the first corresponding relation table by using the calculated first frequency deviation to obtain a second corresponding relation table.
Optionally, the searching module is further configured to search the cell identifier again after the resetting module obtains the second mapping table, and enable the frequency deviation calculating module to calculate the second frequency deviation again if the cell identifiers are the same;
the apparatus further comprises:
the individual error calculation module is used for calculating the individual error of the terminal according to a formula, and the calculation formula is as follows:
individual error is frequency deviation/(initial PWM setting-step C yields the set PWM value);
and the revising module is used for revising the first corresponding relation table again according to the individual error to obtain a third corresponding relation table.
Optionally, the pulse width modulation system configurable by software is an LTE230 chip system.
It should be understood that although the present description has been described in terms of various embodiments, not every embodiment includes only a single embodiment, and such description is for clarity purposes only, and those skilled in the art will recognize that the embodiments described herein can be combined as a whole to form other embodiments as would be understood by those skilled in the art.
The above description is only a preferred embodiment of the present application and should not be taken as limiting the scope of the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the technical solution of the present application should be included in the scope of the present application.