Abstract:
A network including a plurality of wireless communication devices capable of operating according to a wireless protocol that imposes no common timebase at the network level, the plurality of devices comprising: an initiator device configured to detect an event and in response transmit an event message having a payload comprising a time field; and a set of appliance devices configured to receive and automatically retransmit messages received from others of the devices, each appliance device being associated with an appliance supplementary to its wireless communication function and being configured to, on receiving an event message comprising a time field, cause their respective associated appliance to perform a function at a time indicated by the content of the time field in the received message.

Description:
TECHNICAL FIELD 
       [0001]    This invention relates to mitigating the effect of latency in a distributed network. 
       BACKGROUND OF THE INVENTION 
       [0002]      FIG. 1  shows a distributed network. The network comprises a number of devices  1 . Each device can communicate wirelessly with the other devices that are in effective range of it. In this example the network is a mesh network. The devices can cooperate to propagate signals (data) between them. For example, if device  1   a  transmits a signal, that signal can be received by devices  1   b  and  1   c  which are within range of device  1   a.  Devices  1   b  and  1   c  can then relay the signal received from device  1   a  so that it can be received by device  1   d  which is out of range of device  1   a . The coverage area of device  1   a  is illustrated at  2   a  and the coverage area of device  1   c  is illustrated at  2   c.  This method of communication allows devices to communicate even though they are out of direct range of each other. However, it often has the consequence that, the time taken for the data to propagate from an initiating device to another device can be longer than if the data were conveyed in a single hop. Thus latency may be increased over a network in which data is conveyed in a single hop Furthermore, when the number of hops needed for the signal to reach its destination is unknown, or may vary depending on propagation conditions or timing considerations, then the latency from the source to the destination may be unpredictable. 
         [0003]    One example of a situation in which the latency can be unpredictable arises when the devices do not receive continually. For example, if the devices receive on a ⅓ duty cycle then (ignoring other propagation issues) there is roughly a 33% chance that a packet signal transmitted by one device will be received by another device that is in range Consequently, in order for a signal to propagate from device  1   a  to device  1   d  it may end up going via more than two hops, or there may be retransmissions of the signal at one or more stages in the propagation chain. These effects can increase latency and make it more unpredictable. 
         [0004]    It may be that in addition to performing their communication function the devices are cooperating to provide some service. For example, device  1   a  may be integrated with a light switch  3  and devices  1   b  and  1   d  may be integrated with light fittings  4 . The signal transmitted by device  1   a  may signify that the light fittings are to turn on or off. If the light fittings respond to the on/off signal immediately it is received at the respective device then spatially distributed light fittings will turn on or off at slightly different times. If the light fittings are installed along a visually apparent path this may result in an obvious ripple effect as the light fittings change state in turn along that path. If the light fittings are installed over an area then they may give the impression of fading one by one. These effects may be desirable in some environments. However, in other environments it may be desirable for all the light fittings to change state simultaneously so as to mimic the behaviour of light fittings controlled by a traditional wired light switch. 
         [0005]    Similar considerations can arise when appliances other than light fittings are associated with the wireless devices. 
         [0006]    If the wireless devices operate using a wireless protocol that imposes a common timebase at or below the network layer then that timebase may be used to help synchronise the operation of the associated appliances. However, it may be that the wireless protocol imposes no common timebase at or below the network layer: as, for example in Bluetooth Low Energy. Indeed, it may be desirable for the protocol to impose no common network layer timebase. In order for a wireless communication device to operate with a protocol that uses a network level timebase the device must maintain a local clock. Maintaining an accurate local clock consumes more energy, and so it is desirable to minimise the time when an accurate local clock is active, even if a lower accuracy clock might be running continuously. That is of little concern if the wireless communication device is connected to a mains electric supply, as might be expected if it is associated with a light fitting. However, it may be that the range of the wireless communication devices is insufficient for mains-powered devices to communicate directly with each other. In addition, mains access points may be sparsely distributed, prohibiting direct communication between nodes and thus requiring additional nodes to be deployed that use batteries as power sources. In some environments it may even be desirable for all the nodes to be are battery powered. Mains-powered devices may have to communicate via other low-powered devices that are in the vicinity. Using a protocol that does not impose a common network timebase, or at least an accurate common network timebase, can reduce the power consumed by those devices and make it more likely that signals can be conveyed in an adventitious way between the appliances. 
         [0007]    There is a need for a way of synchronising the operation of appliances in a system such as the one described above. 
       SUMMARY OF THE INVENTION 
       [0008]    According to one aspect of the present invention there is provided a network including a plurality of wireless communication devices capable of operating according to a wireless protocol that imposes no common timebase at the network level the plurality of devices comprising: an initiator device configured to detect an event and in response transmit an event message having a payload comprising a time field; and a set of appliance devices configured to receive and automatically retransmit messages received from others of the devices, each appliance device being associated with an appliance supplementary to its wireless communication function and being configured to, on receiving an event message comprising a time field, cause their respective associated appliance to perform a function at a time indicated by the content of the time field in the received message. 
         [0009]    Each event message may comprise one or more other data fields and each appliance device may be configured to cause its respective associated appliance to perform a function only if those other fields in the received message meet one or more predefined criteria. 
         [0010]    One or more of the appliance devices may comprise a clock, and each of those appliance devices may be configured to, on receiving an event message, perform the steps of: determining a time when it is to retransmit the event message (which may be as soon as possible); form a new time value by subtracting from the time signified by the time field in the received event message the difference as indicated by the dock between the time when that appliance device received the event message and the time when it is to retransmit the event message; and retransmit the event message with its time field signifying the new time value. The step of retransmitting the message may happen promptly after the message has been received. The step of determining the time may comprises determining the time at which that retransmission has been designated to take place. 
         [0011]    The clock may be normally stopped and each of those appliance devices may be configured to, on receiving an event message, perform the step of starting the clock. 
         [0012]    Those appliance devices may be configured to cause their respective associated appliance to perform a function at a time indicated by the content of the time field in the received message as measured by their respective clock. 
         [0013]    One or more of the appliance devices may be configured for reading the time from a clock source external to the respective appliance device, and each of those appliance device may be configured to cause their respective associated appliance to perform a function at a time indicated by the external clock. 
         [0014]    Those appliance devices may be configured to access the external clock by receiving wireless signals from the clock. 
         [0015]    The devices may be configured to communicate time accessed from an external clock using time differences for adjusting their local time definition. 
         [0016]    The wireless communication devices may operate according to the Bluetooth Low Energy protocol. 
         [0017]    The initiator device may configured to detect the operation of a user interface device and in response transmit the event message. 
         [0018]    The appliances may be lighting appliances. 
         [0019]    At least some of the appliance devices may be sited at locations that are out of range of transmissions from the initiator device. 
         [0020]    The network may be a mesh network. 
         [0021]    The network may be an ad-hoc network. 
         [0022]    The network may comprise a set of devices configured to receive and automatically retransmit messages received from other of the devices; each message having a payload comprising a time field; re-transmission of the message being based on previous encounter of message, message content and/or processing of the time field; and 
         [0023]    According to a second aspect of the present invention there is provided a wireless communication device configured to receive and automatically retransmit messages received from other devices by means of a wireless protocol that imposes no common timebase at the network level, the wireless communication device being associated with an appliance supplementary to its wireless communication function and being configured to, on receiving an event message comprising a time field, cause its respective associated appliance to perform a function at a time indicated by the content of the time field in the received message. 
         [0024]    The wireless communication device may be configured to determine whether to retransmit received messages in dependence on one or more of: an indication of a maximum hop count contained in the received message, a determination that the device had received the same message before; and inspection of the time field in the message. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0025]    The present invention will now be described by way of example with reference to the drawings. In the drawings: 
           [0026]      FIG. 1  shows a distributed network; 
           [0027]      FIG. 2  illustrates a distributed lighting system installed in a house; and 
           [0028]      FIG. 3  illustrates a wireless communications device. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0029]      FIG. 2  shows a house having a distributed lighting system. The system comprises a light switch unit  10  and light fittings  11 ,  12 ,  13 ,  14 . Light switch unit  10  is integrated with a wireless communication device  15 . Light fittings  11  to  14  are integrated with respective wireless communication devices  16 ,  17 ,  18 ,  19 . The house has a mains electrical supply which powers the light fittings  11  to  14  and their respective wireless communication devices  16  to  19 . Light switch unit  10  and its wireless communication device  15  are powered by a local battery  21 . 
         [0030]    The house contains other items of equipment that contain other wireless communication devices. For example, there is a tablet computer  22  which contains a wireless communication device  23 , and a mobile phone  24  which contains a wireless communication device  25 . Computer  22  and phone  24  are powered by batteries  26  and  27  respectively. 
         [0031]    Wireless communication devices  15  to  19 ,  23  and  25  operate according to the same wireless communication protocol. That could be a relatively short-range protocol. For example the effective range of each device could be less than 25 m. That characteristic can permit the devices to use less power for transmitting and/or receiving than would be expected in a longer range protocol. The protocol could be one that imposes no common timebase at or below the transport level, or below the application or presentation levels. That characteristic can reduce the devices&#39; power consumption by reducing their for need accurate clocks running continuously. In one example, the devices could operate according to the Bluetooth protocol, specifically the Bluetooth Low Energy protocol. The devices could use other protocols, for instance IEEE 802.11. 
         [0032]      FIG. 3  shows the architecture of one of the wireless communication devices. The other wireless communication devices are analogous. The device of  FIG. 3  comprises an antenna  40 . a radio frequency front end  41  and a baseband processor  42 . The baseband processor comprises a microprocessor  43  and a non-volatile memory  44 . The non-volatile memory  44  stores in non-transitory form program code  47  that is executable by the microprocessor to cause the baseband processor to implement the communication protocol. The device also comprises a clock  45 , which can be turned on or off by the micorprocessor  43  in order to save power, and an external wired connection  46  for sensing external events (e.g. the operation of an associated user interface device such as a switch) or issuing control signals to associated appliances (e.g. light fittings). 
         [0033]    The RF front end  41  and the baseband processor could be implemented on one or more integrated circuits. 
         [0034]    Devices  15  to  19  are configured cooperatively in order that the light fittings  11  to  14  know to respond to signals from the light switch  10 . This may be done by the devices  15  to  19  storing a common identification code in their respective non-volatile memories. The identification code may be stored in the light switch when it is manufactured, and stored in the light fittings at the time they are installed in the house. They may be stored in the light fittings by means of another device such as mobile phone  24  communicating with the wireless device of the light switch to read its identification code, and then communicating with the wireless devices of the light fittings to cause them to store that same identification code. 
         [0035]    The process by which a signal is passed from the light switch to the light fittings will now be described. 
         [0036]    The light switch is connected by a wired link to its local wireless communication device  11 . When a user operates the light switch that fact is signalled to the baseband processor of device  11  over that wired link. The baseband processor responds to that signal by transmitting a wireless switching signal using its wireless protocol. The switching signal comprises a data payload of the following form:
       [ SWITCH ID, COMMAND, TIME FIELD, EVENT ID]
 
where:
       SWITCH ID is the identification code of the switch, which could be a long number and is unique to that switch.   COMMAND is an instruction to the target device. For instance, it may signify whether the switch is being turned on or off, or a colour change, or any operations applicable to lighting or whatever other appliance may be being used.   TIME FIELD is a field carrying timing data whose significance will be described in detail below.   EVENT ID is a field indicating the serial number of the event from the switch. This value is stored in the non-volatile memory of device  11  and incremented each time the switch is operated. The combination of SWITCH ID and EVENT ID allows the event indicated by the message to be uniquely identified.   
 
         [0042]    Any devices that are in range of device  11  may receive the switching signal. When another device receives the switching signal it performs the following functions;
   1. It establishes whether it should relay the signal, and if so it relays the signal.   2. It establishes whether the signal is one on which its associated appliance is intended to act, and if so it controls the appliance accordingly.   
 
         [0045]    Each stores in its non-volatile memory a history list  48  containing, for each recent switching signal if received, of the SWITCH ID and EVENT ID of that signal. The list could, for example, contain entries corresponding to the 1024 most recently received signals. To perform step 1 the device that received the signal checks whether any single entry in the list contains the SWITCH ID and EVENT ID of the newly received signal. If an entry does contain that pair of IDs then that signifies that the device is already aware of the switching event corresponding to that signal, in that case it does not relay the signal. Otherwise it adds the SWITCH ID and EVENT ID of the newly received signal to the list (in doing so it may remove the oldest entry from the list) and then relays the switching signal. To relay the switching signal it transmits itself another switching signal whose payload contains the same SWITCH ID, COMMAND and EVENT ID as the recently received signal. The content of the TIME FIELD of the re-transmitted signal will be described below. A device may also decide whether to retransmit a message in dependence on the TIME FIELD. For instance, if the TIME FIELD is to express a target time and the device can establish that time has expired, re-transmission can be omitted. 
         [0046]    The payload may contain a HOP COUNT field which indicates the remaining number of hops over which the message may be retransmitted. When the switching message is initiated the HOP COUNT can be set to a number that is appropriate to the network where it is being used, for example 10 or 30. Then each time a device receives a switching message and determines to retransmit it that device can decrement the HOP COUNT value (e.g. by one) and use the decremented hop count value in each message it retransmits. Then when a device receives a switching message with a HOP COUNT of zero it can determine not to retransmit the message, in that way the HOP COUNT field can help to avoid flooding of the network. 
         [0047]    To perform step 2 the device compares the SWITCH ID contained in the received signal with the identification code stored in its non-volatile memory. If the received SWITCH ID matches the stored identification code then the received signal is one on which the associated appliance is intended to act. If the two do not match then the received signal is not one on which the associated appliance is intended to act. If the appliance is intended to act on the signal then the baseband processor of the device implements that action in a way that will be described below. Step 2 could be omitted if in step 1 it is determined that the device matches the SWITCH ID and EVENT ID in its history list, since then the device will already have determined to action the switching signal. 
         [0048]    The result of this is that the switching signal transmitted by the device  11  associated with the light switch will be propagated by the devices that are in range of device  11 . In the example of  FIG. 2  that is only devices  16  and  25 . Those devices retransmit the signal to devices in range of them. In the example of  FIG. 2  that is device  19 , which is in range of device  25  and devices  17  and  23 , which are in range of device  17 . Then devices  19 ,  17  and  23  perform the same set of steps, resulting in the signal being transmitted to device  18 , which is in range of device  23 . When device  17  retransmits the switching signal its retransmission will be received by device  16 . However, the signal then received by device  16  will contain a SWITCH ID and EVENT ID that are in the history list of device  16 , so device  16  will not retransmit the signal. The use of the history list thus prevents the network being flooded with redundant packets. 
         [0049]    It may be that the devices are active to receive for only part of the time, in order to save power, if that is the case then a device that transmits a signal may retransmit that signal a number of times, at appropriate intervals, to achieve a high probability that all nearby devices will receive the signal even though they only receive intermittently. Having a device relay the signal multiple times may be desirable in other situations too. 
         [0050]    The way in which the devices cause their associated appliances to action the signals will now be described. 
         [0051]    In a first example of the use of the TIME FIELD, the TIME FIELD signifies a delay from when the signal containing the TIME FIELD was transmitted to the time when the switching signal is to be actioned by appliances. Each time the switching signal is retransmitted by a device the baseband processor of that device re-computes the TIME FIELD to be included in the signal it transmits, so that it signifies the same time for the signal to be actioned as in the received signal that gave rise to the retransmission. When a signal is received by a relaying device the baseband processor of that relaying device either observes the time indicated by its local clock or, if its local clock was previously turned off, it starts its local clock running. Then at the point when the baseband processor of the relaying device comes to relay the switching signal it notes the time given by its local clock, determines the interval since it received the corresponding signal, reduces the TIME FIELD value in the corresponding signal as received by the determined interval, and uses that reduced time field value in the signal it relays. In an alternative mechanism the delay between reception and transmission could be known—for example if it is dictated by the device architecture or the timing constraints of the protocol in question. In that case the retransmitting device need not use a clock to re-compute the TIME FIELD: it could simply subtract a predetermined value from the TIME FIELD of the signal as received in order to form the TIME FIELD for retransmission. The predetermined value in that case represents a predetermined estimate of the fixed time between reception and transmission. 
         [0052]    For example, the TIME FIELD may signify a time in milliseconds. The first switching signal sent by the device  11  associated with switch  10  may have a time field of 5000, signifying that the switching event commanded by the signal is to take place 5 seconds after the first switching signal was transmitted. That signal may be received by device  12 , whose baseband processor then starts its focal clock running. At some later time the baseband processor of device  12  is about to relay the switching signal received from device  11 . It observes that the value of its local clock indicates a time of 435 ms. It reduces the TIME FIELD value of 5000 in the signal as received by the delay of 435 ms to give a new TIME FIELD value of 4565, and it includes that value as the TIME FIELD in the payload of its relayed signal. 
         [0053]    When other devices relay signals they behave similarly. In this way, the device can all estimate a common time to the designated switching time without them having to maintain a common timebase when a switching operation is not in progress. 
         [0054]    When a device has to transmit more than once the signal it is relaying, for example to increase the probability of it being received by another device, it re-computes the TIME FIELD each time it transmits the signal. The object is that each time the switching signal is transmitted (including when it is retransmitted) the TIME FIELD represents the interval between the time of transmission and a set point in time when the switching action is to be implemented. 
         [0055]    When the baseband processor of a device identifies that a switching signal is intended to be actioned by its associated appliance (see step 2 described above) it waits until the time designated in the TIME FIELD of a signal as received has elapsed since the signal was received. At that point it signals its associated appliance to turn on or off as designated by the COMMAND field in the received signal. 
         [0056]    The baseband processor of a device that received the switching signal can turn off its local clock (if it is not needed for any other purpose):
   (a) if the signal is not to be actioned by an appliance local to that device, when it has finished relaying the signal (with any retransmissions); or   (b) if the signal is to be actioned by an appliance local to that device, when it has signalled the local appliance to action the signal.   
 
         [0059]    In a second example of the use of the TIME FIELD, the TIME FIELD signifies a time in a commonly accessible timebase at which the switching signal is to be actioned by appliances. That timebase could be a timebase held in or local to the wireless devices, for example if they each have or have access to a continually running clock. Alternatively it could be a timebase defined by a broadcast signal that can be received by all the devices, such as a time signal transmitted at a higher power than the signals transmitted by the wireless devices themselves. In this example, the TIME FIELD could signify a time of day, for instance 10:24 and 3.546 seconds. In this example the TIME FIELD is forwarded unmodified by each device. When the switching signal comes to be actioned by the baseband processor of one of the devices, the baseband processor actions the signal when it determines that the time indicated by the TIME FIELD has been reached. To implement this example the baseband processor may have access to data from another wired or wireless protocol. For example, the timebase against which the time signified by the TIME FIELD is assessed could be received from the internet using network time protocol (NTP), from a satellite positioning protocol such as GPS, Galileo, or from a ground-based wireless broadcast signal such as a digital television (DTV) signal or a longwave/shortwave lime reference such as MSF. The timebase could be distributed between the application layers of the devices by signals transmitted wirelessly between the devices. Alternatively, the timebase can also be transmitted via node re-transmission, using an approach akin to the TIME FIELD re-computation exposed in first example. 
         [0060]    In an alternative embodiment a mechanism similar to that described above can be used, but with a coarse common time reference being maintained over multiple devices by some or all of those devices periodically transmitting their local opinions of the value of that coarse common time reference (CCTR). 
         [0061]    The CCTR might be a 32-bit approximately-microsecond value which wraps around every 1 hour 11 minutes, or a millisecond counter, or similar. The CCTR is not used by at the network layer or below for synchronisation of the transport protocol, only for short-term synch of devices. 
         [0062]    An update protocol could involve a device A transmits an indication of its estimate of the CCTR. When that transmission is received by a device B, device  8  may compare the received CCTR indication with its local CCTR estimate, and may adjust its local value in some manner to bring it closer to the received value. For example, B may adjust its local CCTR value by a small amount towards the received value. As multiple devices share their CCTR values a consensus CCTR will be established between the devices even though individual clocks may drift differently over time. 
         [0063]    The devices may be configured not to forward the CCTR-carrying messages. This may be done by setting the TIME FIELD value of the CCTR messages to zero. 
         [0064]    Traffic can be limited by setting a predetermined maximum frequency at which a device can send CCTR update messages. Alternatively the original CCTR value could be used as a UID and send along with the modified value when such a message is forwarded. 
         [0065]    It may turn out that the CCTR rate though nominally at a level of, for instance, microseconds might deviate from UTC by some amount. However, it will be common to the devices in a particular mesh, so good enough to synchronise devices to all turn on their associated appliances at once. 
         [0066]    If all stations possess a CCTR the TIME VALUE field a can refer to a certain CCTR value. 
         [0067]    in all the above examples the signal is actioned at a time signified by the TIME FIELD 
         [0068]    The payload may include other data. The payload may be encrypted, in which case the devices receiving it may decrypt it to read it, and re-encrypt any payloads they wish to transmit. 
         [0069]    Instead of responding to a switch, the initiating device could respond to another user interface device such as a touch screen, or to a sensor such as a proximity sensor, temperature sensor, motion sensor etc. 
         [0070]    The system described above can be used with appliances other than light switches and/or lighting appliances. For example, the instrument that initiates the signalling could be an alarm controller and the appliances that action the signal could be alarm sounders. In another example the instrument that initiates the signalling could be a signage controller and the appliances that action the signal could be signs. The signals&#39; payloads could contain additional data representing information to be displayed on the signs. In another example the instrument that initiates the signal could be an authenticator such as a card reader, keypad or biometric reader and the appliances that action the signal could be locks. The messages referred to above as switching messages may be considered more generically to foe event messages. 
         [0071]    The devices that first transmit and relay the switching signals can be pre-configured to cooperate with each other for retransmission. Alternatively they could be configured by default to relay signals of the type described above. Hence the devices could form an ad-hoc network. 
         [0072]    The devices could form a mesh network. The devices could be configured to forward some or all messages they receive. The devices could be configured to forward only messages received from some other devices. That can help to avoid excessive network traffic and/or power consumption. All the devices could be peers in that they have identical roles at a network level. 
         [0073]    In one example the system described above can be used to arrange that light units are switched on or off at the same time by a switch, when the switch and the light units are equipped with Bluetooth Low Energy devices configured to operate as a mesh network. 
         [0074]    The operations described above for the baseband processor could be carried out by other devices. For example, there could be a dedicated processor for implementing the protocol described above, or some of the operations could be carried out by the baseband processor and some by another processing entity. 
         [0075]    The applicant hereby discloses in isolation each individual feature described herein and any combination of two or more such features, to the extent that such features or combinations are capable of being carried out based on the present specification as a whole in the light of the common general knowledge of a person skilled in the art, irrespective of whether such features or combinations of features solve any problems disclosed herein, and without limitation to the scope of the claims. The applicant indicates that aspects of the present invention may consist of any such individual feature or combination of features. In view of the foregoing description it will be evident to a person skilled in the art that various modifications may be made within the scope of the invention.