RADIO DEVICE WITH RESONATOR

20230231592 · 2023-07-20

Assignee

Inventors

Cpc classification

International classification

Abstract

A radio device comprises a radio transceiver, a resonator, a temperature measurement unit, a frequency synthesiser and a processing system. A temperature signal from the temperature measurement unit, representative of a measured temperature of the resonator, is used to determine an estimated frequency offset for the resonator at the measured temperature using a model stored in a memory of the processing system that relates frequency offset to temperature. A periodic signal from the resonator is provided to the frequency synthesizer, which, in dependence on the estimated frequency offset, is used to generate a periodic local signal. The radio transceiver receives a radio signal comprising a periodic component at a received signal frequency. An error value representative of a difference between the received signal frequency and a frequency of the periodic local signal is determined and used to update one or more parameters of the model stored in the memory.

Claims

1. A radio device comprising: a radio transceiver; a resonator or an interface to a resonator; a temperature measurement unit or an interface to a temperature measurement unit; a frequency synthesizer; and a processing system, wherein the radio device is configured to: receive a temperature signal from the temperature measurement unit, representative of a measured temperature of the resonator; use the temperature signal to determine an estimated frequency offset for the resonator, using a model, stored in a memory of the processing system, that relates frequency offset to temperature; receive a periodic resonator signal from the resonator; provide the periodic resonator signal to the frequency synthesizer; control the frequency synthesizer, in dependence on the estimated frequency offset, to generate a periodic local signal from the periodic resonator signal; receive a radio signal at the radio transceiver, wherein the radio signal comprises a periodic component having a received-signal frequency; determine an error value representative of a difference between the received-signal frequency and a frequency of the periodic local signal; and use the error value to update one or more parameters of the model stored in the memory.

2. The radio device of claim 1, wherein the radio device is further configured to: receive a second temperature signal from the temperature measurement unit, representative of a second measured temperature of the resonator; use the second temperature signal and the model stored in the memory of the processing system to determine a second estimated frequency offset for the resonator; and use the second estimated frequency offset for transmitting or receiving a radio signal.

3. The radio device of claim 1, wherein the radio device is configured to determine and use error values to update one or more parameters of the model repeatedly, at intervals, over time.

4. The radio device of claim 1, wherein the resonator is a quartz crystal resonator.

5. The radio device of claim 1, wherein the radio transceiver is configured to transmit a radio signal according to a half-duplex radio protocol.

6. The radio device of claim 1, wherein the radio transceiver implements an NB-IoT or half-duplex eMTC protocol.

7. The radio device of claim 1, wherein the periodic local signal is a local-oscillator signal that is input to a mixer in the radio transceiver.

8. The radio device of claim 1, wherein the radio device is a semiconductor chip and comprises an interface for connection to an off-chip resonator and an interface for connection to an off-chip temperature measurement unit.

9. The radio device of claim 1, wherein the radio device comprises the resonator and the temperature measurement unit, and wherein the temperature measurement unit is thermally coupled to the resonator.

10. The radio device of claim 1, wherein the model comprises one or more parameters for a predetermined equation, and wherein the processing system is configured to evaluate the equation numerically, by inputting the measured temperature, to determine the estimated frequency offset.

11. The radio device of claim 1, comprising one or more further environmental sensors, wherein the model additionally relates frequency offset to one or more additional environmental factors.

12. The radio device of claim 1, wherein the frequency synthesizer is a fractional frequency synthesizer and the processing system is configured to provide the estimated frequency offset, or a value derived therefrom, as input to a fractional divider of the fractional frequency synthesizer.

13. The radio device of claim 1, wherein the periodic component of the received radio signal is the carrier frequency of the radio signal.

14. The radio device of claim 1, wherein the radio transceiver comprises an automatic frequency control unit, and wherein the processing system is configured to generate the error value at least in part using the automatic frequency control unit.

15. The radio device of claim 1, wherein the processing system is configured to use a gradient descent process to minimize a cost function when updating the one or more parameters of the model.

16. The radio device of claim 1, wherein the model is a linear combination of two predetermined polynomial functions of temperature and wherein the processing system is configured to use the error value to update a parameter representing one or more coefficients of the linear combination.

17. The radio device of claim 1, wherein the processing system is configured to use a least-squares process to fit a polynomial function to a data set that includes the error value and the associated measured temperature.

18. The radio device of claim 1, wherein the processing system is configured to use, at times, one or more predetermined auxiliary values, in addition to one or more determined error values and measured temperatures, when updating the model.

19. A radio communication system comprising: a radio device as claimed in claim 1; and a remote radio transceiver, wherein the remote radio transceiver is configured to transmit said radio signal.

20. A method comprising: receiving a temperature signal representative of a measured temperature of a resonator; using the temperature signal to determine an estimated frequency offset for the resonator, using a model that relates frequency offset to temperature; receiving a radio signal, wherein the radio signal comprises a periodic component having a received-signal frequency; receiving a periodic resonator signal from the resonator; using the estimated frequency offset to generate a periodic local signal from the periodic resonator signal; determining an error value representative of a difference between the received-signal frequency and a frequency of the periodic local signal; and using the error value to update one or more parameters of the model.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Certain preferred embodiments of the invention will now be described, by way of example only, with reference to the accompanying drawings, in which:

[0073] FIG. 1 is a schematic diagram of a cellular communication system including a radio device embodying the invention;

[0074] FIG. 2 is a schematic diagram of a fractional frequency synthesizer and crystal resonator of the radio device;

[0075] FIG. 3 is a flow chart of steps of a transmit operation performed by the radio device;

[0076] FIG. 4 is a flow chart of steps of a receive operation performed by the radio device; and

[0077] FIG. 5 is a graph of relative frequency offset against temperature for crystal oscillators at a range of cut angles.

DETAILED DESCRIPTION

[0078] FIG. 1 is a schematic diagram of a Long Term Evolution (LTE) cellular communication system 100, embodying the invention, including a base station (eNodeB) 120 and a user-equipment (UE) radio device 110.

[0079] The radio device 110 implements a local frequency compensation scheme and also embodies the invention.

[0080] The radio device 110 may be a wireless Internet-of-Things (IoT) sensor or any other appropriate electronic device.

[0081] The radio device 110 includes a system-on-chip (SoC) 111, which is connected to an off-chip crystal unit 101 and a temperature measurement unit 102, arranged to measure the temperature of the crystal unit 101. The crystal unit 101 in this example is a bare resonator device that does not contain any driver circuitry nor any internal temperature compensation mechanism. The oscillator driving circuitry is integrated on the SoC 111.

[0082] While FIG. 1 shows a crystal unit 101, in other embodiments a MEMS resonator, or other type of resonator or packaged oscillator, could be substituted for the crystal unit 101 without altering the relevant functioning of the radio device 110 as described herein.

[0083] The radio device 110 may include conventional elements such as a battery, sensors, displays, data interfaces, user interfaces, discrete electronic components (e.g. capacitors and inductors), further integrated-circuit chips, etc., which are omitted from FIG. 1 for the sake of simplicity.

[0084] The SoC 111 comprises a processing system 104 which may contain one or more processors and associated memory for executing software to control the radio device 110. The processing system 104 may include a microcontroller and/or one or more application processors such as an Arm™ Cortex™ processor and/or a digital signal processor (DSP). In some embodiments it may additionally or alternatively contain application-specific logic. It may comprise RAM and flash memory..

[0085] The SoC 111 further comprises a radio frequency (RF) receiver 105 and an RF transmitter 107 (together providing a radio transceiver as disclosed herein). These are capable of being operated in half-duplex NB-IoT and eMTC modes, in which transmit and receive operations are carried out at different times, rather than simultaneously. The RF transmitter 105 and RF receiver 107 may in some embodiments share common circuitry or components. They may be connected to various off-chip elements (not shown) such as a power amplifier, inductors. They communicate with the base station 120 through a common antenna 108.

[0086] The SoC 111 also includes a frequency estimator unit 103, a learning unit 109, and a radio-frequency (RF) fractional frequency synthesizer 113. It may also contain conventional peripherals, such as timers, interfaces, security components, power management circuitry, etc. The frequency estimator unit 103 and/or the learning unit 109 may be software components executing on one or more processors of the processing system 104, for example on a digital signal processor or an application processor. In other embodiments, the frequency estimator unit 103 and/or learning unit 109 may be implemented using dedicated hardware logic, or as a combination of both software and hardware.

[0087] The crystal unit 101 and the fractional frequency synthesizer 113 together form an RF frequency generator 200, for providing a radio-frequency local-oscillator signal f.sub.out to the RF receiver 105 and the RF transmitter 107. The receiver 105 can input the signal f.sub.out to a mixer to down-mix an incoming radio signal received at the antenna 108, while the transmitter 107 can use it to up-mix a baseband signal (e.g. provided to the RF transmitter 107 by the processing system 104) to an RF electrical signal for transmission from the antenna 108.

[0088] FIG. 2 shows the frequency generator 200 in more detail.

[0089] When powered on, the crystal unit 101 generates an oscillating reference signal, f.sub.r, e.g. of frequency f.sub.r = 32 MHz, which is sent to the fractional frequency synthesizer 113. The fractional frequency synthesizer 113 is a highly-accurate, charge-pump phase-locked loop (PLL) synthesizer, which generates an output signal, f.sub.out, at a desired output frequency, f.sub.out, e.g. 2 GHz, derived from the reference signal f.sub.r. The output frequency f.sub.out will typically be set by the processing system 104 depending on the radio band it is desired to transmit or receive on.

[0090] The frequency synthesizer 113 comprises a phase frequency detector 203, a charge pump 205, a loop filter 207, a voltage controlled oscillator (VCO) 209, and a fractional divider 211.

[0091] The phase frequency detector 203 receives the reference signal f.sub.r from both the crystal unit 101 and a feedback signal from the fractional divider 211. It produces an error signal proportional to the difference between the phases of the two signals. This error signal is passed to the charge pump 205, which generates positive and negative current pulses that are passed to the loop filter 207. The loop filter 207 removes unwanted noise, e.g. from the phase detector 203, before the signal is fed to the voltage controlled oscillator (VCO) 209. The VCO 209 generates an output signal f.sub.out with an output frequency f.sub.out.

[0092] The output signal f.sub.out is fed to a fractional divider 211 and back to the phase frequency detector 203, producing a negative feedback loop. If the output frequency f.sub.out drifts, the phase error signal will increase, thus driving the VCO 209 in the opposite direction and reducing the error.

[0093] The fractional divider 211 is implemented using dedicated transistors and logic, and is configurable by software executing on the processing system 104 through a register interface. At any moment, the fractional divider 211 divides the output frequency f.sub.out by an integer value, thereby causing f.sub.out to be that integer multiple of the reference frequency f.sub.r. However, the fractional divider 211 can dynamically change this integer value over time, e.g. between values N and N+1, such that the average division over time is fractional. If, out of B cycles, f.sub.out is divided by N+1 for A cycles, and by N over B minus A cycles, the average division corresponds to the fraction N+A/B.

[0094] Thus, by appropriately controlling the fractional divider 211, the frequency generator 200 can generate a signal f.sub.out with an output frequency

[00001]fout=frN+AB

where N, A, and B are non-negative integers obeying 0 ≤ A < B, and where N and A relate to the integer and fractional components used to set up the fractional divider 211, and where B is a fixed value determined by the design of the frequency synthesiser.

[0095] In this way a large number of output frequencies are achievable, each separated by a minimum step value. This allows a wide range of radio channels to be tuned, with very fine granularity.

[0096] The minimum achievable step value between output frequencies occurs for A =1, N = 0. Assuming a value of B = 2.sup.24, output signals can be generated from the voltage controlled oscillator 209 with a minimum difference between them of N / B = 32/2.sup.24 MHz, i.e. around 2 Hz.

[0097] For example, for a desired output frequency from the fractional frequency synthesizer of f.sub.out = 965 MHz, and a value of B = 2.sup.24, the integer and fractional components can be determined as N+A/B = f.sub.out/f.sub.r = 965/32=30.15625 Hz, by taking the integer component to be the value of N, i.e. N = 30, and the fractional part as equal to A/B, i.e. A/B = 0.15625. The value of A required to produce an output frequency of 965 MHz can be determined to be A = 0.15625 * 2.sup.24, i.e. A = 2,621,440. Using these values of A and N, the chosen output frequency f.sub.out = 965 MHz can be generated. The generated output frequency may be calculated using software executing on a processor of the processing system 104, however it could also be calculated using suitable hardware.

[0098] This loop therefore ensures that the output frequency f.sub.out remains a chosen fractional multiple of the frequency of the crystal unit 101.

[0099] Although the minimum step value is, in principle, determined based on the value of B and the frequency of the crystal unit 101, in practice, the system is limited by the stability of the crystal unit 101. For example, a typical stability of the crystal may be +/-1 ppm, which for the exemplary 32 MHz crystal unit 101 would be around +/-32 Hz. If the crystal unit frequency drifts within this range as a result of a temperature changes, and increases by 1 ppm, e.g. 32 Hz, then applying the fractional frequency operation above, an erroneous output frequency f.sub.out is obtained of f.sub.out = 965,000,965 Hz, i.e. 965 Hz too high.

[0100] Such a large drift would cause problems in applications such as LTE radio communication, where the half-duplex specifications for the eMTC and NB-IoT standard require that the user-equipment transmission frequency stay within +/-0.1 ppm relative to base station frequency. However, the radio device 110 addresses this problem by compensating numerically for any temperature-induced offset in the oscillator output.

[0101] To achieve this, the fractional divider 211 of the fractional frequency synthesizer 113 employed in the radio device 110 additionally receives a data input F.sub.est (e.g. a floating point value) from the frequency estimator unit 103, which it uses in the generation of the output frequency f.sub.out as follows.

[0102] The frequency estimator unit 103 is configured to generate an estimate, F.sub.est, of the relative frequency offset (i.e. the frequency offset divided by the nominal frequency) resulting from the current operating temperature T of the crystal unit 101, and to provide this estimate to the fractional frequency synthesizer 113. The estimated relative frequency offset F.sub.est is used in the fractional divider 211 to compensate for any actual temperature-induced frequency offset that might be present in the signal f.sub.r output by the crystal unit 101. In this embodiment, the frequency estimator unit 103 is implemented using software executing on a processor of the processing system 104, although in other embodiments it could be implemented using dedicated hardware logic, or a combination of both software and hardware.

[0103] The frequency generator 200 can output a local-oscillator signal, f.sub.out, to the radio receiver 105 or the radio transmitter 107, as needed, having a desired frequency f.sub.out.

[0104] The radio device 110 operates differently depending on whether it is acting in a half-duplex transmit mode or a half-duplex receive mode. In particular, when in receive mode, it may at times enter a calibration state, whereas it is in a normal running state (i.e. not the calibration state) during transmit mode and at other times in receive mode.

[0105] During transmission operations, the radio device 110 operates according to the process shown in FIG. 3. In step 301, the temperature measurement unit 102 measures the temperature of the crystal unit 101. In step 303 the temperature measurement unit 102 provides the measured temperature to the frequency estimator unit 103, as part of an input variable vector X.sub.N. The input variable vector X.sub.N may also optionally include information related to other variables, such as an atmospheric pressure measurement determined from a barometric pressure sensor in the radio device 110.

[0106] In step 305 the frequency estimator unit 103 applies the received variable vector X.sub.N as input to a frequency-drift model H(X.sub.N), which is used to determine an estimated relative frequency offset value F.sub.est for the measured temperature (and optionally for other variables such as atmospheric pressure). The model H(X.sub.N) may be implemented in any appropriate way. In some embodiments, the frequency estimator unit 103 evaluates a polynomial function of the temperature, e.g. a cubic function, where the parameters of the polynomial function are stored in a memory of the frequency estimator unit 103. The parameters may have been received previously from the learning unit 109, as described below. In other embodiments, the model may be stored as a look-up table—this may be more efficient if the temperature measurement unit 102 can output only a relatively few different values, e.g. temperature to the nearest 1° C. or 5° C.

[0107] In step 307 the relative frequency offset value F.sub.est is provided to the fractional divider 211 of the frequency synthesizer 113. In step 309 the fractional divider 211 uses it to adjust the default values of N and A (corresponding to a desired output frequency f.sub.out) to compensate for the estimated offset in the signal f.sub.r received from the crystal unit 101. The integer part of the ratio f.sub.out/F.sub.est is used as the adjusted N value, while the remainder is multiplied by the fixed value B, and the integer component of the resulting value is used as the adjusted A value.

[0108] For example, in the case of a desired output frequency of 974 MHz, a fixed value of B=2.sup.24, a nominal frequency value f.sub.r = 32,000,000 Hz, and a relative frequency offset value F.sub.est = 32,000,150 the offset frequency is 150 Hz higher than the nominal frequency. The ratio f.sub.out/ F.sub.est = 974,000,000/32,000,150 ≈ 30.437357325, from which the value of N can be taken as the integer component, N = 30. The remainder 0.437357325 is then multiplied by the fixed value of B, resulting in a value of 0.437357325*B = 7,337,638.3107072.00. The integer component of this value is then taken as the adjusted value of A, i.e. A = 7337638. The frequency synthesizer 113 then uses these values to output the frequency f.sub.out = F.sub.est*(7337638/2.sup.24) ≈ 973,999,999.41 Hz, which is 0.59 Hz less than desired 974 MHz, achieving the desired accuracy of < 0.1 ppm.

[0109] In step 311, the frequency synthesizer 113 outputs the adjusted local-oscillator RF signal f.sub.out, derived from the incoming crystal signal f.sub.r, to the RF transmitter 107.

[0110] This process may be performed repeatedly during a transmission operation, i.e. looping back round to step 301 and step 311, so as to adjust the local oscillator signal f.sub.out dynamically in response to on-going changes in the temperature of the crystal 101 during a radio transmission.

[0111] During receive operations, the radio device 110 may, at times, enter a calibration state in which it uses the stable carrier frequency of a radio signal received from the base station 120 to update its frequency-drift model H(X.sub.N). It may enter the calibration state every time it receives a relevant radio signal, or it may do so according to a schedule and/or based on other factors.

[0112] The RF receiver 105 contains an automatic frequency control (AFC) unit 105a which determines an actual relative frequency offset F.sub.err as the difference between the carrier frequency F.sub.rec of the incoming signal from the base station 120 and the local-oscillator frequency f.sub.out being generated by the fractional frequency synthesizer 113 (plus any intermediate frequency, unless the receiver is a zero-IF receiver), expressed as a fraction of the local-oscillator frequency f.sub.out (e.g. in parts per million).

[0113] This relative offset F.sub.err is provided to the fractional divider 211 of the fractional frequency synthesizer 113 which uses it to apply correction to the local oscillator signal f.sub.out during the receive options. However, the relative offset F.sub.err is also used to train the model H(X.sub.N), for use during subsequent transmit operations, by comparing an estimated relative frequency offset F.sub.est, calculated by the frequency estimator unit 103 from the current model H(X.sub.N), with the actual relative offset, F.sub.err, measured during a receive operation.

[0114] The frequency of the transmitted signal from base station 120 is significantly more precise than the signal generated by the crystal unit 101 employed in the radio device 110 of the present invention. For example, the base station signal may be generated using a highly stable temperature controlled crystal oscillator (TCXO), as the power and cost requirements of the base station 120 are not constrained as they are for the radio device 110.

[0115] In step 401, the RF receiver 105 receives a radio signal, F.sub.rec, from the base station 120, having a carrier frequency F.sub.rec, which the receiver 105 tunes using an initial local-oscillator signal, f.sub.out, generated by the frequency synthesizer 113. The initial signal, f.sub.out, is generated using an estimated relative frequency offset, F.sub.est, provided by the frequency estimator unit 103. The offset may be calculated from the current model H(X.sub.N) using the current crystal temperature, as measured by the temperature measurement unit 102.

[0116] In step 403, the AFC 105a compares the received signal F.sub.rec with the signal f.sub.out output from the fractional frequency synthesizer 113, and generates an error signal F.sub.err representative of the relative frequency error between them. The error signal F.sub.err is fed back to the frequency synthesizer 113 which uses it to adjust the output frequency f.sub.out, as required, in order to maintain frequency synchronization with the base station 120 while in the receive mode.

[0117] In step 405, the relative frequency error signal F.sub.err is also input to a subtraction unit 115, along with the estimated relative frequency offset, F.sub.est, generated by the frequency estimator unit 103 based on the current crystal temperature from the temperature measurement unit 102. The subtraction unit 115 calculates the difference (if any) between the estimated relative offset error, F.sub.est, and the actual relative offset error, F.sub.err and provides this to the learning unit 109.

[0118] In step 407, the learning unit 109 acquires an up-to-date crystal temperature measurement, T. It can use this to calculate the current value of F.sub.est.

[0119] In some embodiments, the values of F.sub.err and F.sub.est may both be provided directly to the learning unit 109.

[0120] In step 409, the learning unit 109 determines if the difference between the values of F.sub.err and F.sub.est is above a threshold value (for example 0.5 ppm), and, if so, updates the model H(X.sub.N) for the current temperature T using a learning algorithm (explained in more detail in the following), before providing the updated model parameters to the frequency estimator unit 103 in step 411, for later use in determining another F.sub.est value using the updated frequency drift model H(X.sub.N) during transmission operations. In some other embodiments there may be no comparison against a threshold value and the model parameters may always be updated.

[0121] This calibration process may be repeated multiple times, at intervals, during a single radio reception operation, or it may be performed more occasionally—e.g. once every hour, or once a day, if the device 110 is performing a receive operation. In some embodiments, calibration may be performed more frequently (e.g. hourly) when the device 110 is first initialised from new, until measurements spanning a minimum range of crystal temperatures have been obtained, and may thereafter perform calibration operations less frequently (e.g. weekly, monthly or yearly), so that the model adapts as the crystal 101 slowly ages. In some embodiments, calibration may be performed in response to the relative offset error F.sub.err being determined to be greater than a predetermined threshold value. The time interval in which F.sub.err is likely to increase is strongly dependent on the conditions experienced by the crystal 101, which may accelerate the aging of the crystal 101.

[0122] When preparing to receive a radio signal—e.g. on switching from a transmit mode to a receive mode—the radio device 110 may follow the same process described with reference to FIG. 3, but outputting the local-oscillator signal f.sub.out to the RF receiver 105 (instead of to the RF transmitter 107) in the final step 311. In this way, an initial local-oscillator signal can be generated which should be closely matched to the actual incoming carrier signal. Once the radio signal starts being received, the AFC 105a can track the actual carrier frequency, as already explained above.

[0123] By updating the parameters of the frequency drift model H(X.sub.N) based on a locally measured oscillator temperature and a precise received frequency from the base station 120, an up-to-date model of the oscillating frequency of the crystal unit 101 can be developed and maintained. Over time, the model will be trained on measured data points spanning the full range of operating temperatures that the crystal 101 actually experiences. Also, through this on-going learning process, the model H(X.sub.N) will be updated to reflect the changing characteristics of the crystal unit 101 over its lifetime.

[0124] The implementation of the learning algorithm will now be explained in more detail.

[0125] For a crystal oscillator, the frequency drift with temperature is dependent on the cut of the crystal, i.e. the angle at which the crystal has been cut relative to the planes of lattice structure of the crystal. This variation of frequency with temperature is demonstrated in FIG. 5, which shows the relative frequency offset Δf/f in parts per million against temperature, for a variety of cut angles (referenced to a predefined temperature of 27° C., at which there is no temperature related offset by definition).

[0126] The frequency offset curves in FIG. 5 show how the relative frequency offset changes for different cutting angles relative to an absolute cutting angle of 35°15′ from the Z-axis of the crystal (the “AT” cut angle). Each curve represents a different cutting angle with an indicated angular difference (in minutes, i.e. 1/60°) relative to the AT-cut angle.

[0127] Due to variability in crystal processing, a desired cutting angle may only be achievable within a particular tolerance. Also, in practice, the behaviour of a crystal against temperature does not perfectly follow the smooth curves shown in FIG. 5. Instead, there will be slight deviations from the idealised model. It may have systematic and/or random frequency dips. Also, there can be some error in the measurements from the temperature sensor 102 and from the AFC 105a. An example of this variability is shown by curve 501, which illustrates how the relative frequency offset with temperature does not follow the curves exactly, but has some variability, specific to each individual crystal. The present empirical modelling approach can help to compensate for this kind of variation.

[0128] The shape of the temperature-related frequency drift curves shown in FIG. 5 comes from the particular material physics of the crystal, and is dependent on the cutting angle of the crystal. The shape of the temperature-related frequency drift curves can generally be modelled with reasonable accuracy using a polynomial function, typically a polynomial function of degree two, three or four. For example, the temperature-related frequency drift curves for AT-cut type crystals can be accurately modelled using a third order polynomial function. In some embodiments, a MEMS resonator may be used in place of a crystal resonator, in which case the temperature-related frequency drift curves will not depend on the cut angle, but rather the specific frequency-temperature profile of the MEMS resonator used. In such embodiments, the operations carried out by the learning unit 109 apply equally, however the exact shape of the functions used will vary depending on the nature of the resonator.

[0129] At least in some embodiments, the relative frequency error Δf/f as a function of temperature around a reference temperature T.sub.0 can be modelled by the learning unit 109 using the following equation:

[00002]Δff=aTT03+bTT02+cTT0+d

[0130] This relationship is typically valid for temperatures between -60° C. ≤ T ≤ 120° C. The reference temperature T.sub.0 is generally in the range 20-35° C. In some examples the reference temperature may be 27.5° C. The scale of the relative frequency error Δf/f is typically of the order of parts per million (ppm).

[0131] The values of a, b, c and d are stored in a memory of the learning unit 109 and/or of the frequency estimator unit 103, as the parameters of the model H(X.sub.N) used by the frequency estimator unit 103 to estimate the relative frequency offset during radio transmission. The learning unit 109 updates these parameters at intervals, when one or more new samples have been collected from the temperature measurement unit 102 and the RF receiver 105.

[0132] Custom initial values for a, b, c and d could be measured for each individual resonator, e.g. crystal 101, but this would incur a significant cost and time expenditure. Additionally, as the values of these coefficients change with time, as the resonator ages, they are not perpetually valid. The learning algorithm aims to determine accurate values of each of the coefficients a, b, c, and d for the unique resonator, employed in the radio device 110 (e.g. crystal 101 in this embodiment).

[0133] In general, the dependence on temperature can be modelled by a polynomial function, depending on the characteristics of the resonator. For crystal resonators, polynomials of degree three are most appropriate for AT-cut crystal resonators, while polynomials of degree two may be applied for BT-cut crystal resonators. The description herein primarily refers to third-degree polynomials, but it will be appreciated that, if the resonator properties differ, (e.g. for a BT-cut crystal resonator or a MEMS resonator), the same approaches are still valid, but that the polynomial functions used may also be changed. For example, for a BT-cut crystal 101, the cubic term may be disregarded in the implementation of the learning algorithm (e.g. by considering a = 0). Conversely, some embodiments may go the other way and include a fourth-power term.

[0134] A number of different methods may be used by the learning unit 109 in different embodiments of the radio device 110. These are collectively referred to herein as “the learning algorithm”. Some non-exhaustive exemplary methods will be described in the following.

Two-Polynomial Approach

[0135] In some embodiments, the learning unit 109 uses the insight that, since a, b and c in Equation (1) depend on the cutting angle θ of the crystal 101, a reference angle θ.sub.0 can be chosen for the parameterisation in which c equals 0. This then allows Equation (1) to be rewritten as a function of the temperature of the crystal 101 and of the actual cutting angle, relative to the reference cutting angle θ.sub.0, as follows:

[00003]ΔffT,θ=pt,θ0+qT,θθ0

where p and q are both polynomials.

[0136] If two polynomials, p.sub.1 and p.sub.2, of two different angles of the same type of cutting are known, then all of the other polynomials for that cutting type, within the appropriate temperature range, can be derived from the two polynomials by

[00004]rT,α=p1T,θ1+p2T,θ2p1T,θ1α

where θ.sub.1 and θ.sub.2 are two angles of the same type of cutting, and α is a coefficient, typically of value 0 ≤ α ≤ 1. However the range of α may differ from this depending on the desired set of polynomials. Although it is not necessary to know the cutting angles in this equation, for this approach to be successful the cutting angles must all be of the same type, e.g. the set of polynomials may apply only to AT-cut crystals.

[0137] For embodiments where this insight is used in the learning unit 109, the above relationship is used alongside two polynomials, which may be provided by the crystal manufacturer, defining minimum and maximum bounding curves for the temperature-dependent frequency error of the crystal 101.

[0138] For 0 ≤ α ≤ 1, the polynomial representing the frequency-temperature curve of the crystal unit 101, p.sub.XO(T) will then lie be between these curves, i.e.

[00005]minp1T,p2TpXOTmaxp1T,p2T

for all T in the relevant range, such as -60° C.≤T≤120° C.

[0139] Initially, the coefficients for the polynomial p.sub.xo(T) are unknown.

[0140] When the RF receiver 105 of the radio device 110 receives a signal at a known frequency, the F.sub.err value and the current temperature T of the crystal 101 can be saved as a measurement pair (F.sub.err, T) for that temperature. A collection of these measurements, e.g. {(F.sub.err-0, T.sub.0), (F.sub.err-1, T.sub.1), ..., (F.sub.err-N,T.sub.N)} can be collected during receive operations over time and buffered in memory, as already described above.

[0141] Based on the two polynomials provided by the crystal manufacturer, and a measurement pair (F.sub.err-k, T.sub.k), the learning unit 109 may learn the parameters of the polynomial p.sub.xo(T) = r(T, α) by assigning the value α in Equation (2) to be

[00006]αk=Ferrp1Tp2Tp1T

thus yielding a model H(X.sub.N) for the particular crystal 101 as

[00007]pXOT=p1T+p2Tp1Tα

[0142] Once a plurality, n, of measurement pairs (F.sub.err, T) have been collected and buffered (e.g. following multiple receive operations), the learning unit 109 may compute an average value of the individual α.sub.k values over the n sample pairs as

[00008]αave=α0+α1+α2+,.Math.,+αn-1/n

and apply this average value α.sub.ave to Equation (5) in place of just a single value α.sub.k.

[0143] This approach is relatively straightforward to implement in the learning unit 109.

Least Squares

[0144] Some embodiments of the learning unit 109 may instead employ a least squares approach to fit a polynomial. This is done by minimising the (Euclidean) proper distance between the measurement data set and the polynomial, e.g. of the type in Equation (1) above.

[0145] A minimum of three measurement points must have been collected before a least-squares approach can be used in order to determine the three coefficients a, b and c uniquely. If a constant term, d, is solved too, then the minimum number of data points is four. The use of methods of least squares to solve frequency temperature curves provides can provide more filtering of data points, thereby potentially improving the quality of the resulting estimates.

[0146] In some embodiments, the learning unit 109 uses a gradient descent process, as described in more detail below. In other embodiments, the learning unit 109 uses a method of orthogonal polynomials with the Clenshaw recursion formula at a final step.

[0147] The least squares approach can be very precise for estimating relative frequency offsets at temperatures that are close to temperatures for which measured sample pairs have been obtained.

[0148] However, when the device 110 starts to receive data for the very first time after being initialised, the measurement points will initially cover only a short temperature interval of a whole operating range. In this case, a polynomial p.sub.xo(T) calculated using least squares from these buffered data pairs may be only a loose approximation to the true frequency temperature curve.

[0149] To overcome this inaccuracy, in some embodiments, three extra auxiliary data points may be added to the buffer for training the model. These auxiliary {temperature, T; frequency-offset, F} pairs are not measurements, and are instead synthesised frequency values associated with minimum, maximum, and mid-point expected operational temperatures, T.sub.min, T.sub.max, and T.sub.mid.

[0150] The corresponding frequency errors, F.sub.err,min, F.sub.err,max, and F.sub.err,mid, are calculated by the learning module 109 as

[00009]Ferr,min=p1Tmin+p2Tminp1Tminγ

[00010]Ferr,mid=p1Tmid+p2Tmidp1Tmidγ

[00011]Ferr,min=p1Tmax+p2Tmaxp1Tmaxγ

where p.sub.1 and p.sub.2 are manufacturer-provided curves as used in the inequality of Equation (3), and where y is an angle weight which may be determined in the same way as α in Equation (4) or (6).

[0151] In some embodiments, the values of T.sub.min, T.sub.max, and T.sub.mid may be chosen such that T.sub.min=-60.0° C., T.sub.mid=+29.5° C. and T.sub.max=+120.0° C. T.sub.mid may be chosen such that it has a value close to the temperature at which p.sub.1 and p.sub.2 have a shared root, To, i.e. where p.sub.1(T.sub.0)=p.sub.2(T.sub.0)=0.

[0152] The three auxiliary data points may then be used with a single measured frequency-temperature pair as a four-point dataset on which the least squares fit is made, e.g. soon after the device 110 is first initialised.

[0153] As more data is collected by the system, and additional frequency-temperature pairs are added to the buffer, the auxiliary values may be removed from the training input to the model if appropriate. This may be done only after a condition is met, such as a minimum of ten measurements having been obtained, spanning an interval of at least 20° C. Then, for example, if, during operations, the device 110 records a frequency value at a temperature below -25° C., then the auxiliary data associated with T.sub.min may be removed from the active data points. Similarly, if the device 110 records a frequency value at a temperature above 85° C., then the auxiliary data associated with T.sub.max may be removed from the active data points. This may be especially beneficial in the case where γ = 0.5, where it can be difficult for the learning unit 109 to obtain a final solution properly.

[0154] Alternatively, as the model is updated with measured values, an average value of γ may be calculated using Equation (6) from the measured values, without including the auxiliary data points. This average value of γ may then be used, instead of an initial constant value, to calculate updated frequency offsets for the auxiliary data points at T.sub.min, T.sub.mid, and T.sub.max, using the formulae above, and these points can then be included with the measured data when fitting the polynomial using a least squares approach.

Gradient Descent

[0155] In some embodiments, updated parameters for a third-order polynomial model H(X.sub.N), e.g. as in Equation (1) above, are calculated by solving a least squares problem using a gradient descent process. This is an iterative process in which the minimum of a cost function is sequentially determined for over a number of iterations.

[0156] The calculated values of a, b, c, and d when the cost function is minimised correspond to the values of a, b, c, and d that most closely match the actual properties of the crystal.

[0157] The least squares function to be solved can be represented using a cost function given as

[00012]Cost=1M.Math.iMyiaTiT03+bTiT02+cTiT0+d2

where: [0158] M is the number of samples, indexed by i, that are used by the learning unit 109 to train the model; [0159] y.sub.i are the relative frequency errors, F.sub.err, generated by automatic frequency control unit 105a (the learning unit 109 may calculate these F.sub.err values from T.sub.i and the difference F.sub.est - F.sub.err output by the subtraction unit 115, or it may receive the values directly from the AFC unit 105a); [0160] T.sub.i are the measured crystal temperatures corresponding to the respective y.sub.i values; and [0161] T.sub.0 is a reference temperature for initial calibration data provided by the crystal manufacturer—e.g. T.sub.0 = 27.5° C. for the data in FIG. 5.

[0162] Minimising the mean squared error through gradient descent can work well as it is a convex-shaped function and thus always finds the global minimum (i.e. no local minima); it can also converge rapidly by strongly penalising large errors.

[0163] In some embodiments, the learning model is initialised with a, b, c, d values based on data provided by the resonator manufacturer. In the case of crystal units, the manufacturer typically provides an extreme variation range specification for the a, b, c, d coefficients, for the particular type of crystal (i.e. for the particular cut angle).

[0164] When starting for the very first time, the learning unit 109 may initialise a, b, c and d to be the mean average (i.e. the midpoint) of the extremes provided by the manufacturer. The extremes, or the averages, may have been written to a memory of the device 110 during production (e.g. in the fabrication plant).

[0165] In some embodiments, the value of d is calibrated during production and may be treated as a constant during the learning process performed by the learning unit 109. However, other embodiments may treat d as an unknown parameter, along with a, b and c.

[0166] When employing a gradient descent approach, the minimisation of the cost function (i.e. minimising the mean squared error) requires calculating the gradient of the cost function with respect to each of the coefficients a, b and c (and optionally d).

[0167] In some embodiments, the learning unit 109 buffers a plurality of temperature-offset sample pairs, acquired over time, and uses all of these when minimising the cost function. In other embodiments, just the single most-recent temperature-offset sample pair is used, resulting in a simpler implementation.

[0168] The gradient is calculated by considering the partial derivative of the cost function with respect to each of a, b, and c, using the current values of a, b and c, as follows:

[00013]a=2M.Math.iMTiT03yiacurrTiT03+bcurrTiT02+ccurrTiT0+d

[00014]b=2M.Math.iMTiT02yiacurrTiT03+bcurrTiT02+ccurrTiT0+d

[00015]c=2M.Math.iMTiT0yiacurrTiT03+bcurrTiT02+ccurrTiT0+d

[0169] The calculated gradients are used to determine the direction in which the values of the coefficients a, b, and c should be changed to minimise the error, with the magnitude of the change (i.e. the shift of value per iteration) determined by a parameter referred to the learning rate. The learning rate adjusts how much the coefficients are altered per iteration, and hence its value may be chosen to prevent the coefficients a, b, c, and d from growing too large too quickly. In some examples the learning rate is set equal to 0.0001.

[0170] Each time a new sample is obtained, new values of the coefficients a, b, and c are calculated from the current values as follows:

[00016]anew=acurrentlearningRate3a

[00017]bnew=bcurrentlearningRate2b

[00018]cnew=ccurrentlearningRatec

[0171] These calculations may be repeated a number of times for each new sample. Each iteration moves the cost function closer towards the minimum. In some embodiments, the number of iterations per sample is between 3 and 10, which is expected to give good performance in typical cases.

[0172] After progressively adjusting the values of a, b and c with each iteration, the resulting values of a, b and c are stored in memory as updated parameters for the model H.

[0173] In some embodiments, the updated value may be determined by using a plurality of buffered temperature-offset sample pairs in the gradient descent algorithm. The gradient descent then becomes a stochastic gradient descent because the calculated gradient will be an average gradient of the buffer samples. The buffered samples will ideally span a range of operating temperatures of the crystal 101. In some embodiments, the buffer has space for eight sample pairs; it may be filled in a first-in first-out fashion, or in a way that preserves a spread of samples over temperature, e.g. by dividing the full temperature range into a number of subranges and retaining the latest sample in each subrange.

[0174] When the device 110 is initialised for the very first time, the buffer will be empty. After a first sample pair has been collected, the gradient descent will be performed using just the one sample. As more samples are collected, all the available samples in the buffer are used, up to the maximum size of the buffer.

[0175] As explained above, in some alternative embodiments, the buffer may, on initialisation, be at least partly filled using a set of synthesised sample pairs, which may be calculated for predetermined temperature values from the average curves for the crystal type and/or the first one or more samples to be collected may be “mirrored” using a 180 degree rotation about the inflection point (e.g. 27.5 degrees in FIG. 5) to create a further set of synthesised sample pairs.

[0176] In some embodiments, the buffer may initially contain two pre-calculated sample pairs associated with the ‘extreme’ temperature subranges expected to be experienced by the radio device, for example at -60° C. and 120° C. The ‘extreme’ sample pairs may remain in the buffer until new data is recorded in similar temperature ranges, e.g. the sample pair associated with the low temperature extreme may be removed once data has been recorded at a temperature T < -20° C.

Gradient Descent With Momentum

[0177] In some embodiments, the updated model parameters are determined by implementing a gradient descent process with a momentum term. In this approach, exponentially weighted averaging is introduced to the calculation of the parameters by storing the previous value of the parameters, for example parameter a, in addition to its current value, and then calculating each new value of the parameters, e.g. a.sub.new in dependence on the current and previous values as follows:

[00019]anew=acurrentlearningRate3βaprevious+1βa

[0178] The value of the hyperparameter β is set between zero and one. A value of β=0.9 has been found to work well in some situations.

[0179] Implementing a gradient momentum term allows the gradient descent to push a.sub.new over difficult spots such as a local gradient of zero, and helps to stabilise the convergence process more generally.

[0180] Gradient momentum terms are implemented similarly for parameters b, c, to generate new values b.sub.new, c.sub.new.

Gradient Descent With Bounds

[0181] In some embodiments, the updated model parameters are determined by implementing maximum and minimum bounding values on the coefficients a, b and c (and optionally d if it is not constant) when using gradient descent as described above. The manufacturer of the crystal resonator 101 may provide minimum and maximum values of each of a, b, c, and d.

[0182] Constraining the values of the parameters to remain within such minimum and maximum values can ensure that the learned temperature-offset curves do not go outside the original specification during the learning process.

[0183] The learning unit 109 may thus apply the following additional rules during each iteration of the gradient descent algorithm:

[00020]ifanew>max_athenanew:=max_a;

[00021]ifanew<min_athenanew:=min_a

[0184] Similar rules can be applied to b and c.

[0185] Any of the embodiments described above may be adapted to additionally model one or more further variables, alongside temperature, such as atmospheric pressure or humidity.

[0186] It will be appreciated by those skilled in the art that the invention has been illustrated by describing one or more specific embodiments thereof, but is not limited to these embodiments; many variations and modifications are possible, within the scope of the accompanying claims.