Method of receiver window widening and autodrift calculation using packet timestamping
11777862 · 2023-10-03
Assignee
Inventors
Cpc classification
H04W52/0216
ELECTRICITY
Y02D30/70
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
H04L47/27
ELECTRICITY
H04W52/0293
ELECTRICITY
International classification
Abstract
Disclosed is a method of operating a low power wireless receiver in which a radio is periodically operable for receive intervals with sleep intervals therebetween and comprising a sleep clock having a sleep clock accuracy. A first transmission or packet is received. Based on a start moment of the first received packet, and an expected interval between packets, a nominal start moment is determined to start the radio for a packet window until a nominal end moment, for receiving a second packet; the packet window duration is extended in dependence on an estimated drift based on the SCA to provide a widened window. A start moment of a second received packet is measured within the widened window. An actual drift is calculated, from the start moment of the second packet; and an actual start moment and an actual window duration is determined, for receiving a third packet, based on the actual drift.
Claims
1. A method of operating a wireless receiver having a mode in which a radio is configured to periodically operate in a receive mode during receive intervals with a sleep interval (Tsleep) between receive intervals, the radio comprising a sleep clock having a sleep clock accuracy (SCA), the method comprising: receiving a first packet having one of a start moment and a synchronization time reference; from an expected interval between packets (Tinterval) and the one of the start moment and the synchronization time reference, determining a nominal start moment to start the radio for a packet window (Window) until a nominal end moment for receiving a second packet; extending a packet window duration in dependence on an estimated drift (drift_set) based on the SCA to provide a widened window; receiving the second packet; measuring a start moment of the second received packet within the widened window to determine a first offset (Delta_time1) from the expected interval between packets (Tinterval) and the one of the start moment and the synchronization time reference; calculating, from the start moment of the second packet, an actual drift (drift_real); determining, based on the actual drift, an actual start moment to start the radio and an actual window duration for receiving a third packet; determining a nominal start moment to start the radio for a packet window (Window) until a nominal end moment for receiving the third packet; extending the actual window duration for receiving the third packet in dependence on the estimated drift (drift_set) based on the SCA to provide a third packet widened window; receiving the third packet; measuring a start moment of the received third packet within the third packet widened window to determine a second offset (Delta_time2); calculating, from the start moment of the third packet, an updated actual drift (drift_real) by dividing a difference between the second offset (Delta_time2) and the first offset (Delta_time 1) by the expected interval between packets (Tinterval); and determining an actual start moment to start the radio and an actual window duration for receiving a fourth packet based on the updated actual drift.
2. The method of claim 1, wherein the actual window duration for receiving the third packet is extended from the packet window by a predetermined margin (Tmargin).
3. The method of claim 2, wherein the actual start moment to start the radio for receiving the third packet is earlier, by a predetermined margin, than a start moment determined based on the actual drift, and the actual window duration for receiving the third packet is extended from the packet window by twice the predetermined margin.
4. The method of claim 3, wherein the actual moment to start the radio for receiving the third packet (Trxen3) is determined relative to an actual arrival moment of the second packet (Tarrive2) by:
Trxen3=Tarrive2+Tinterval+(Tsleep*drift_real)−Tmargin.
5. The method of claim 3, wherein the actual window duration for receiving the third packet (Window_real) is determined by:
Window_real=Window+2*Tmargin.
6. The method of claim 3, wherein the third packet is not received, the method further comprising determining, for receiving a subsequent (N+2)th packet, an actual start moment Trxen(N) to start the radio, based on N times the expected interval between packets less N times the actual drift and N times the predetermined margin, according to:
Trxen(N)=Tarrive2+N*(Tinterval+(Tsleep*drift_real)−Tmargin).
7. The method of claim 6, the method further comprising determining, for receiving the (N+2)th packet, and an actual window duration of
Window_real=Window+2*N*Tmargin.
8. The method according to claim 1, further comprising, to start the radio, waking up the radio at a moment which precedes the start moment by pre-determined warm-up interval.
9. The method of claim 8, wherein the expected internal between packets, Tinterval, is variable; wherein the expected interval between the second and third packet is given by Tinterval2, and wherein the actual moment to start the radio for receiving the third packet is determined relative to an actual arrival moment of the second packet, Tarrive2, by:
Trxen3=Tarrive2+Tinterval2+(Tsleep2*drift_real)−Tmargin.
10. The method of claim 9, wherein the actual window duration, Window_real, is determined by:
Window_real=Window+2*Tmargin.
11. A wireless receiver comprising: a sleep clock having a sleep clock accuracy (SCA); a radio configured to periodically operate in a receive mode during a receive interval and to have sleep intervals (Tsleep) between receive intervals; a calculation engine configured to: determine, based on a start moment of a first received packet and an expected interval between packets (Tinterval), a nominal start moment to start the radio for a packet window (Window) until a nominal end moment for receiving a second packet; determine a widened window by extending the packet window duration in dependence on an estimated drift (drift_set) based on the SCA; and a clock circuit configured to measure a start moment of the second received packet within the widened window and a start moment of a third received packet within a third packet widened window; wherein the calculation engine is further configured to: determine a first offset (Delta_time1) from the start moment of the first received packet and the expected interval between packets (Tinterval); calculate, from the start moment of the second packet, an actual drift (drift_real); determine, based on the actual drift, an actual start moment to start the radio and an actual window duration for receiving the third packet; determine a nominal start moment to start the radio for a packet window (Window) until a nominal end moment for receiving the third packet; extend the actual window duration for receiving the third packet in dependence on the estimated drift (drift_set) based on the SCA to provide the third packet widened window; measure a start moment of the received third packet within the third packet widened window to determine a second offset (Delta_time2); calculate, from the start moment of the third packet, an updated actual drift (drift_real) by dividing a difference between the second offset (Delta_time2) and the first offset (Delta_time 1) by the expected interval between packets (Tinterval); and determine an actual start moment to start the radio and an actual window duration for receiving a fourth packet based on the updated actual drift.
12. The wireless receiver of claim 11, wherein the actual window duration for receiving the third packet is extended from the packet window by a predetermined margin (Tmargin).
13. The wireless receiver of claim 11, wherein the actual start moment to start the radio for receiving the third packet is earlier, by a predetermined margin, than that based on the actual drift, and wherein the actual window duration is extended from the packet window by twice the predetermined margin.
14. A non-transitory computer-readable medium storing machine instructions which, when executed by at least one processor, cause the at least one processor to: receive a first packet having one of a start moment and a synchronization time reference; determine, from an expected interval between packets (Tinterval) and the one of the start moment and the synchronization time reference, a nominal start moment to start a radio for a packet window (Window) until a nominal end moment for receiving a second packet; extend a packet window duration in dependence on an estimated drift (drift_set) based on a sleep clock accuracy (SCA) of a sleep clock in the radio to provide a widened window; receive the second packet; measure a start moment of the second received packet within the widened window to determine a first offset (Delta_time1) from the expected interval between packets (Tinterval) and the one of the start moment and the synchronization time reference; calculate, from the start moment of the second packet, an actual drift (drift_real); determine, based on the actual drift, an actual start moment to start the radio and an actual window duration for receiving a third packet; determine a nominal start moment to start the radio for a packet window (Window) until a nominal end moment for receiving the third packet; extend the actual window duration for receiving the third packet in dependence on the estimated drift (drift_set) based on the SCA to provide a third packet widened window; receive the third packet; measure a start moment of the received third packet within the third packet widened window to determine a second offset (Delta_time2); calculate, from the start moment of the third packet, an updated actual drift (drift_real) by dividing a difference between the second offset (Delta_time2) and the first offset (Delta_time 1) by the expected interval between packets (Tinterval); and determine an actual start moment to start the radio and an actual window duration for receiving a fourth packet based on the updated actual drift.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1) Embodiments will be described, by way of example only, with reference to the drawings, in which
(2)
(3)
(4)
(5)
(6)
(7)
(8) It should be noted that the Figures are diagrammatic and not drawn to scale. Relative dimensions and proportions of parts of these Figures have been shown exaggerated or reduced in size, for the sake of clarity and convenience in the drawings. The same reference signs are generally used to refer to corresponding or similar features in 20 modified and different embodiments
DETAILED DESCRIPTION OF EMBODIMENTS
(9)
(10)
(11) The periods of time for which the responder 230 is awake in order to receive packets is also shown. Note that the responder is initially awake and available to receive the first packet, at moment A shown at 231. Since it knows the number of clock cycles N corresponding to Tinterval1, the responder can then go to sleep in order to save power provided it is awake at the end of an interval Tsleep, where Tsleep=Tinterval1−Window (window being the width, or duration of the window.). However, as shown at 231, if the sleep clock of the responder is running slow, relative to the sleep clock of the initiator, the responder will not be woken up ready to receive the second transmitted packet 222 until a later time, as shown at 232. In that case, which corresponds to a positive “sleep clock accuracy” or SCA, the responder would miss the second transmission. In order to avoid this, the responder is woken up early in order to ensure that it is ready to receive the second packets even if its clock is running slow. The sleep clock must awake the responder up early enough to accommodate the “worst case” drift between the two clocks. As shown in
(12) The situation is even worse for receipt of a third packet 223: in order to ensure the packet is received, the responder must be awake for even longer (since it should be woken up at a time which a duration T12 prior to the expected arrival—and typically, for example for Wake On Radio, T12 will be twice T1) and remain on for a equivalent time T12 beyond the expected or nominal time for receipt.
(13) Before considering how the window widening may be optimised according to the present disclosure, the reader is directed towards
(14)
(15) Turning now to
(16) First considering the responder configured as the receiver RX 440, in order to ensure that the second packet is received, the window during which the receiver is operable is widened by bringing forward its start time by period T1 446, and extending the operable time by a further period T1 448. As a result the receive window is widened by a factor of two times T1, symmetrically about the expected receive time which is shown as the packet window 442. The extent to which the window must be widened clearly depends on the expected mismatch between the sleep clock of the initiator and the sleep clock of the responder. When multiplied by the number of clock cycles between packets—that is to say the number of clock cycles in Tinterval, the mismatch between the clocks translates to a “drift” in the relative timings. In order to be sure that the window is open when the packet actually arrives, a worst-case scenario should be considered when 5 estimating the drift. The estimation provides a value for T1 of drift_set.
(17) The present inventors have appreciated that once the second packet is received, it is possible to timestamp this arrival time, according to the responders clock, and this provides information on the actual mismatch between the clocks, and an associated drift_real, which can be used for optimising the window widening for subsequent packets. This is (partly) illustrated in the plot 450 of
(18) As already mentioned, the value of drift_real may be estimated from the actual arrival of the second packet, and in particular, the difference between the moment of actual arrival and the expected arrival according to:
T2=drift_real*Tsleep, where
Tsleep=Tinterval−(packet duration), And since packet duration is small:
Tsleep≈Tinterval, so
drift_real=T2/Tsleep≈T2/Tinterval.
(19) Before turning to
(20) Secondly, the time-stamping process of the time arrival of the packet should be considered. In general, and in particular for present purposes, the timestamp of a packet refers to the moment at which the start of the packet is received, shown as TS 390 in
(21) Turning now to
(22) Turning now to the responder in receive mode, at 530 is shown the expected or nominal time for the responder to receive the second packet, at 532, the packet having a width in the figure corresponding to a duration “Window”. Again as discussed above, the nominal window is preceded by a warmup period 534. In this illustrative example, the responder clock is running slow relative to the initiator clock such that the interval Tinterval1(resp) is greater than the interval Tinterval1(init), measured against either a notional absolute clock or the initiator's clock. Also shown is the nominal period nominal window in which the responder would expect to receive the third packet, based on its clock, that is to say, after a period Tinterval2(resp).
(23) At both 540 and 550 are shown the responder having been woken up in time to receive the second packet, taking into account the worst-case estimated drift between the clocks. As discussed above, the responder is woken up in time to allow for a drift of drift_set—that is to say the responder is woken up such that it is ready to receive, at a time which is an interval or duration T1 prior to the expected received time where T1 equals drift_set. The responder is then awake for a total time corresponding to the packet window plus twice the drift_set interval T1, as shown at 549. Again as discussed above, the command to wake up precedes the time at which the responder needs to be able to receive by a warmup period shown at 544. Although the responder is ready to receive atom moments which is T1 prior to the expected arrival time, in fact the packet start to arrive at a moment which is, as shown at 540, prior to the expected arrival by an interval T2, less than T2. The responder timestamp the arrival of the packets as described above, and uses this information in order to optimise the operating window for receiving the third packet. 540 shows the idealised case: from the value of T2, determined from the time difference expected (or nominal) start of the packet window and the actual timestamp, the responder now knows the relative drift between the clocks over the interval Tinterval1. As a result, it can precisely calculate the planned arrival time of the third packet: in the event that the time between packets, Tinterval1 and Tinterval2, are the 35 same, it merely subtracts the measured drift from the expected packet arrival time to derive the planned arrival time; in the alternative case where intervals between packets are variable, it calculates the expected drift during the second interval Tinterval2 based on the ratio of intervals Tinterval2 and Tinterval1, multiplied by the measured drift during interval T1. For the ideal case, the window is now perfectly aligned with the planned 5 arrival time from the initiator of the third packet 523.
(24) However, again as discussed above, in real practical situations, the drift may vary over time either because of changes affecting the initiator's clock or the responder's clock, for instance because of changes in the operating conditions, such as temperature, power source stability or operating voltage etc. The responder must be able to accommodate this variability in drift. In order to do so, the responder applies a margin of error Tmargin, shown in
(25) Turning now to
T62=T2×(1+(Tinterval2/Tinterval1).
(26) In this instance, the radio is turned on according to the “worst case” drift situation (using drift_set as discussed above) for both the second and third (which, in this case, may be considered as a “further”) packet, leading to a significantly longer operating period for receiving the third or further packet. This is shown in the lowermost plot showing the radios being turned on and ready to operate at a moment which is ahead of the expected arrival time of the packet by an interval T1 446 for the second packet, and an interval T61 646 for the third or further packet. In the case that the packets are expected to be evenly spaced (such that Tinterval1(init)=Tinterval2(init), it is trivial to show that T 61 should be twice T1. Furthermore, the skilled person will appreciate that for non-constants intervals between packets, the—additional—early actual arrival of the second packet will be proportionate scale with the time interval. That is to say, the magnitude of interval 656 is:
T61=T1×(1+(Tinterval2/Tinterval1).
(27) In real-world situations, it may be more convenient to measure a value of “Delta time”, shown as Delta_time1 602 for the first packet and Delta_time 2 604 for the second packet in
(28) So, referring again to
Delta_time=Tdly+(adjust_set−adjust_real),
where Tdly is an offset resulting from one or both of the warm-up time and the duration “A” of the sfd and preamble in the packet. So,
Delta_time=Tdly+Tsleep*(drift_set−drift_real).
Apply this for a “first-to second” interval and a “first to third (or further)” group of two intervals gives:
Delta_time1=Tdly+Tsleep1*(drift_set−drift_real)
Delta_time2=Tdly+Tsleep2*(drift_set−drift_real)5
and subtracting the two removes any offset due to Tdly:
Delta_time2−Delta_time1=(Tsleep2−Tsleep1)*(drift_set−drift_real),
From which it follows that:
drift_real=drift_set−(Delta_time2−Delta_time1)/(Tsleep2−sleep1),
which approximates to:
drift_real=drift_set−(Delta_time2−Delta_time1)/(Tinterval).
(29) Thus, in such embodiments, the method includes measuring a start moment of the received second packet within the widened window to determine a first offset, Delta_time1; from the respective start moment or synchronization time reference, and an expected interval between packets, Tinterval, determining a nominal start moment to start the radio for a packet window, Window, until a nominal end moment, for receiving a further packet immediately subsequent the second packet, and extending a further packet window duration in dependence on an estimated drift, drift_set, based on the SCA to provide a further packet widened window; measuring a start moment of the received further packet within the further packet widened window to determine a second offset, Delta_time2; wherein calculating, from the start moment of the second packet, an actual drift, drift_real comprises dividing the difference, between the second offset and the first offset, Delta_time2−Delta_time1, by the expect interval between packets, Tinterval; and determining an actual start moment to start the radio and an actual window duration, for receiving a subsequent packet, based on the actual drift.
(30) The skilled person will be aware that in real world applications, it is possible to miss packets. Packets may be missed or skipped for instance due to interference such as an obstacle temporarily obstructing the responder from the transmitter, or other reasons. Practical implementations need to be able to accommodate missed or skipped packets. Missed or skipped packets fall into two categories: the first case is where the responder fails to receive the second packet. In this instance the responder has no information on which to optimise the packet widening, and the window for the third packet should be broadened widened at both its start and finish by two times drift_set (for an expected third packet) three times drift_set for expected fourth packet in the event that both the second and third packets are missed or skipped, and so on. This is no improvement on conventional window widening. However in the instance that the second packet has been received such that the responder has been able to calculate the drift_real to optimise the packet widening for the third packet, then should this packet be missed or skipped, then the window start and finish need be widened for the expected fourth packet only by twice Tmargin, and (in the event that the third and fourth packet are both skipped or missed) by three times Tmargin for the fifth packet. Since the widening is symmetrical and on both sides of the window, the total window widening in the event of skipping N packets can readily be shown to be: 2×(N+1)×Tmargin.
(31) Of course, the skilled person will be aware that if too many packets are skipped, it may be possible that a timing error or other event has occurred. In this event it may be appropriate to reset the responder. The responder may thus be programmed to undergo a reset in the event that a predetermined number of packets are skipped or missed. In other words, after a predetermined duration, should know packet have been received, it may be appropriate to reset the responder. Put another way, communication between two wireless nodes may have failed If a large number of back-to-back packets are missed. This failure condition might be forced using a timeout feature or by maintaining a count of the missed packet reception slots, i.e., a failure is indicated if the number of missed packet (“Missed_Number”) reaches to a predetermined number. In such a case, it might be unreliable to try to continue the auto-drift tracking as discussed above. Based on the chosen failure criterion, a fail_interrupt could be generated, which could wake-up the MCU or Host processor to reset the responder's Radio. The predetermined count of missed packets to generate a timeout may be implemented as a programmable register, which can be chosen based on the characteristics (such as ambient conditions or application requirements) of a wireless deployment. “Missed_Number” could be implemented as an internal register which increases by 1 when a packet is missed, and is reset to 0 when a packet is successfully received.
(32) The skilled person will appreciate that, and it should be noted that the drift calculation may be implemented in hardware, or it may be implemented in software using computation resources available in a connected microprocessor unit, MCU (i.e., MCU+radio). This also readily facilitates the case of time-slotted mode, since in this case the expected duration for each time-slot is different and may need to handled accordingly, which could easily become quite complex to implement in hardware.
(33) In such as case, for instance, may be implemented as follows: the hardware stores the relevant data (packet timestamps, etc.) in the registers and informs the software to perform calculations through radio generated interrupts. the software performs the drift calculations and stores the calculation result in the hardware drift register. the hardware obtains the calculated value of drift from the register and applies it to the next slot.
(34) Software calculation offers advantages of is improved flexibility and potentially better accuracy (due to floating point calculations). Conversely, the radio would need to wake up the CPU, which might have a power penalty. The selection of, and boundaries between, hardware and software will clearly be implementation-specific.
(35) In order to aid the understanding of the present disclosure, in the above discussion of
(36) From the above description, the skilled person will appreciate that optimising the window widening for the responder may be carried out using relatively low-level processing. Processes discussed herein may therefore be appropriate for use in a link layer, or MAC, implementation within the radio transceiver; they may also be appropriate for use in applications in which it is undesired to switch on a processor such as an MCU external to the radio to calculate the window widening. An example would be a processor-less scheduled autonomous low-level communication engine, such as NXP's Wake on Radio (WOR) engine, which only wakes the link layer, or higher levels layers of communication stack upon a successful communication.
(37) From reading the present disclosure, other variations and modifications will be apparent to the skilled person. Such variations and modifications may involve equivalent and other features which are already known in the art of low power networks, and which may be used instead of, or in addition to, features already described herein.
(38) Although the appended claims are directed to particular combinations of features, it should be understood that the scope of the disclosure of the present invention also includes any novel feature or any novel combination of features disclosed herein either explicitly or implicitly or any generalisation thereof, whether or not it relates to the same invention as presently claimed in any claim and whether or not it mitigates any or all of the same technical problems as does the present invention.
(39) Features which are described in the context of separate embodiments may also be provided in combination in a single embodiment. Conversely, various features which are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable sub-combination. The applicant hereby gives notice that new claims may be formulated to such features and/or combinations of such features during the prosecution of the present application or of any further application derived therefrom.
(40) For the sake of completeness it is also stated that the term “comprising” does not exclude other elements or steps, the term “a” or “an” does not exclude a plurality, a single processor or other unit may fulfil the functions of several means recited in the claims and reference signs in the claims shall not be construed as limiting the scope of the claims.