Patent Description:
Lock devices and key devices are evolving from the traditional pure mechanical locks. These days, there are wireless interfaces for electronic lock devices, e.g. by interacting with a mobile key device. For instance, Radio Frequency Identification (RFID) has been used as the wireless interface. When RFID is used, the user needs to present the mobile key device very close to a reader of the lock. However, in order to provide a more user-friendly solution, wireless interfaces with greater range are starting to be used. This allows the interaction between the mobile key device and the lock to occur without user interaction, e.g. with a mobile key device being located in a pocket or handbag. However, in such a situation, there is a risk that someone on the inside unlocks the lock device by simply walking by the lock device. In order to prevent this from happening, without introducing user interaction to open the lock device, there needs to be a way to determine the position of the mobile key device, e.g. to determine whether a mobile key device is on the inside or on the outside. In this way, automatic access control could be disabled for inside devices, preventing inadvertent unlocking.

When determining position of a mobile key device, one technology that can be used is called angle of arrival, which determines an incidence angle of the mobile key device based on measuring a signal received from the mobile key device using multiple antennas. The incidence angle can be calculated based on a phase difference between two samples from two respective antennas.

<CIT> discloses a method, device, computer program and computer program product for determining whether a portable key device is located in an active area in relation to a barrier. <CIT> discloses an arrival angle calculation device. <CIT> discloses direction finding systems.

However, when calculating the phase difference based on two samples, using an inverse tangent function is not reliable as the inverse tangent is only defined for a subset of all possible phase differences, leading to unreliable and inconclusive results.

One objective is to improve reliability in how phase differences between samples, used in angle of arrival calculations, are calculated.

According to a first aspect, it is provided a method for determining a position of a mobile key device. The method being performed by a position determiner and comprises the steps of: obtaining a first sample point comprising a first in-phase, I, value and a first quadrature, Q, value, and a second sample point, comprising a second I value and a second Q value, the first sample point indicating a signal received from the mobile key device using a first antenna and the second sample point indicating a signal received from the mobile key device using a second antenna; determining that a transformation condition is true by determining that the obtained first sample point is in the first quadrant and the obtained second sample point is in the second quadrant, that the obtained first sample point is in the second quadrant and the obtained second sample point is in the first quadrant, that the obtained first sample point is in the third quadrant and the obtained second sample point is in the fourth quadrant, or that the obtained first sample point is in the fourth quadrant and the obtained second sample point is in the third quadrant; transforming the first sample point and the second sample point according to the following: setting the I value of a first transformed sample point to the Q value of the obtained first sample point, setting the Q value of the first transformed sample point to the inverse of the I value of the obtained first sample point, -I, setting the I value of a second transformed sample point to the inverse of the Q value of the obtained second sample point, -Q, setting the Q value of the second transformed sample point to the I value of the obtained second sample point; determining the phase difference between the first sample point and the second sample point by applying an inverse tangent function based on the result of the transforming; and determining the position of the mobile key device based on the phase differences.

The step of obtaining may comprise obtaining multiple instances of the first sample point and calculating an average of the multiple instances of the first sample point for subsequent processing; and obtaining multiple instances of the second sample point and calculating an average of the multiple instances of the second sample point for subsequent processing.

The step of determining the phase difference may comprise determining the phase difference several times and averaging the several phase differences for subsequent processing.

According to a second aspect, it is provided a position determiner for determining a position of a mobile key device. The position determiner comprises: a processor; and a memory storing instructions that, when executed by the processor, cause the position determiner to: obtain a first sample point and a second sample point, each one of the sample points comprising an in-phase, I, value and a quadrature, Q, value, the first sample point indicating a signal received from the mobile key device using a first antenna and the second sample point indicating a signal received from the mobile key device using a second antenna; determine that a transformation condition is true by determining that the obtained first sample point is in the first quadrant and the obtained second sample point is in the second quadrant, that the obtained first sample point is in the second quadrant and the obtained second sample point is in the first quadrant, that the obtained first sample point is in the third quadrant and the obtained second sample point is in the fourth quadrant, or that the obtained first sample point is in the fourth quadrant and the obtained second sample point is in the third quadrant; transform the first sample point and the second sample point according to the following: setting the I value of a first transformed sample point to the Q value of the obtained first sample point, setting the Q value of the first transformed sample point to the inverse of the I value of the obtained first sample point, -I, setting the I value of a second transformed sample point to the inverse of the Q value of the obtained second sample point, -Q, setting the Q value of the second transformed sample point to the I value of the obtained second sample point; determine the phase difference between the first sample point and the second sample point by applying an inverse tangent function based on the result of the transforming; and determine the position of the mobile key device based on the phase difference.

The instructions to obtain may comprise instructions that, when executed by the processor, cause the position determiner to obtain multiple instances of the first sample point and calculate an average of the multiple instances of the first sample point for subsequent processing; and obtain multiple instances of the second sample point and calculate an average of the multiple instances of the second sample point for subsequent processing.

The instructions to determine the phase difference may comprise instructions that, when executed by the processor, cause the position determiner to determine the phase difference several times and averaging the several phase differences for subsequent processing.

According to a third aspect, it is provided a computer program for determining a position of a mobile key device. The computer program comprises computer program code which, when run on the processor of a position determiner causes the position determiner to: obtain a first sample point and a second sample point, each one of the sample points comprising an in-phase, I, value and a quadrature, Q, value, the first sample point indicating a signal received from the mobile key device using a first antenna and the second sample point indicating a signal received from the mobile key device using a second antenna; determine that a transformation condition is true by determining that the obtained first sample point is in the first quadrant and the obtained second sample point is in the second quadrant, that the obtained first sample point is in the second quadrant and the obtained second sample point is in the first quadrant, that the obtained first sample point is in the third quadrant and the obtained second sample point is in the fourth quadrant, or that the obtained first sample point is in the fourth quadrant and the obtained second sample point is in the third quadrant; transform the first sample point and the second sample point according to the following: setting the I value of a first transformed sample point to the Q value of the obtained first sample point, setting the Q value of the first transformed sample point to the inverse of the I value of the obtained first sample point, -I, setting the I value of a second transformed sample point to the inverse of the Q value of the obtained second sample point, -Q, setting the Q value of the second transformed sample point to the I value of the obtained second sample point; determine the phase difference between the first sample point and the second sample point by applying an inverse tangent function based on the result of the transforming; and determine the position of the mobile key device based on the phase difference.

<FIG> is a schematic diagram showing an environment in which embodiments presented herein can be applied.

Access to a physical space <NUM> is restricted by a physical barrier <NUM> which is selectively unlockable. For instance, the barrier <NUM> can be a door, gate, hatch, window, etc. In order to unlock the barrier <NUM>, an access control device <NUM> is provided. The access control device <NUM> is connected to a physical lock device <NUM>, which is controllable by the access control device <NUM> to be set in an unlocked state or locked state. The access control device <NUM> can be separate from the physical lock device <NUM> (as shown) or the access control device <NUM> can form part of the physical lock device <NUM> (not shown).

The access control device <NUM> communicates with a mobile key device <NUM> over a wireless interface using a plurality of antennas 5a-b. The mobile key device <NUM> is any suitable device portable by a user and which can be used for authentication over the wireless interface. The mobile key device <NUM> is typically carried or worn by the user and may be implemented as a mobile phone, a smartphone, a key fob, wearable device, smart phone case, RFID (Radio Frequency Identification) card, etc. In <FIG>, only two antennas 5a-b can be seen. However, there can be one or more antennas provided in connection with the access control device <NUM>.

Using wireless communication, the authenticity and authority of the mobile key device can be checked in an unlock procedure, e.g. using a challenge and response scheme, after which the access control device grants or denies access. Alternatively or additionally, the mobile key device can be used in the same way to, when granted, trigger the barrier to be opened e.g. using a door opener.

A position determiner <NUM> is connected to the access control device <NUM> or the antennas 5a-5b to obtain samples of signals received from the mobile key device <NUM>. In this way, a phase difference can be determined between the samples to thereby determine an angle of arrival of the signal from the mobile key device <NUM>. The angle of arrival can be used to determine, more or less accurately, a position of the mobile key device, e.g. to determine whether the mobile key device <NUM> is within an active area in relation to the barrier <NUM>. The active area is defined such that it is beneficiary to trigger access control when the mobile key device is located in the active area.

The position determiner <NUM> can be separate from the access control device <NUM> (as shown) or the position determiner <NUM> access control device <NUM> can form part of the access control device <NUM> (not shown), in which case the access control device <NUM> is a host device for the position determiner <NUM>.

Providing multiple antennas provides additional benefits. For instance, the antennas can be used for beam forming, multiple input/multiple output (MIMO) transmissions, redundancy between antennas, differential antennas, etc..

When access is granted, the access control device <NUM> sends an unlock signal to the lock device <NUM>, whereby the lock device <NUM> is set in an unlocked state. In this embodiment, this can e.g. imply a signal over a wire-based communication, e.g. using a serial interface (e.g. RS485, RS232), Universal Serial Bus (USB), Ethernet, or even a simple electric connection (e.g. to the lock device <NUM>), or alternatively a wireless interface. When the lock device <NUM> is in an unlocked state, the barrier <NUM> can be opened and when the lock device <NUM> is in a locked state, the barrier <NUM> cannot be opened. In this way, access to a closed space <NUM> is controlled by the access control device <NUM>. It is to be noted that the access control device <NUM> and/or the lock device <NUM> can be mounted in a fixed structure (e.g. wall, frame, etc.) by the physical barrier <NUM> (as shown) or in the physical barrier <NUM> (not shown).

<FIG> is a flow chart illustrating embodiments of methods for determining a position of a mobile key device. The method is performed in a position determiner. The flow chart will be explained with further reference to <FIG>, illustrating the samples in an IQ plane.

In an obtain samples <NUM> step, the position determiner obtains a first sample point S1 comprising a first in-phase (I) value I1 and a first quadrature (Q), value Q1. The position determiner further obtains a second sample point S2, comprising a second I value I2 and a second Q value Q2. The first sample point S1 indicates a signal received from the mobile key device using a first antenna and the second sample point indicates a signal received from the mobile key device using a second antenna. The samples are obtained directly or indirectly from the antennas.

Optionally, this comprises obtaining multiple instances of the first sample point S1 and calculating an average of the multiple instances of the first sample point S1 for subsequent processing; and obtaining multiple instances of the second sample point S2 and calculating an average of the multiple instances of the second sample point S2 for subsequent processing. This improves sample reliability which can otherwise vary, e.g. due to noise.

In a conditional transform step <NUM>, it is determined when a transformation condition is true. The transformation condition is determined to be true by determining that the obtained first sample point is in the first quadrant and the obtained second sample point is in the second quadrant, that the obtained first sample point is in the second quadrant and the obtained second sample point is in the first quadrant, that the obtained first sample point is in the third quadrant and the obtained second sample point is in the fourth quadrant, or that the obtained first sample point is in the fourth quadrant and the obtained second sample point is in the third quadrant.

In other words, the transformation condition is true when any one of the mentioned combination of locations of the first sample point and the second sample point is true.

When this transformation condition is determined to be true, the method proceeds to a transform step <NUM>. Otherwise, the method proceeds to a determine phase difference step <NUM>.

In the transform step <NUM>, the position determiner transforms (when the transformation condition is true as determined in step <NUM>) the first sample point S1 and the second sample point S2.

Optionally, the samples and/or the transformations are repeated many times and averaged to improve sample reliability.

In a quadrant based transformation embodiment, the transformation comprises transforming the obtained first sample point and the obtained second sample point according to the following:.

In this context, applying the inverse to a value is to be construed as multiplying by the constant -I, i.e. reversing the sign from plus to minus or vice versa.

In this case, the transformation condition is true when the obtained first sample point S1 is in the first quadrant and the obtained second sample point S2 is in the second quadrant, when the obtained first sample point S1 is in the second quadrant and the obtained second sample point S2 is in the first quadrant, when the obtained first sample point S1 is in the third quadrant and the obtained second sample point S2 is in the fourth quadrant, or when the obtained first sample point S1 is in the fourth quadrant and the obtained second sample point S2 is in the third quadrant.

When the obtained first sample point S1 and the obtained second sample point S2 do not (collectively) satisfy the transformation condition, the samples S1, S2 are not transformed.

This embodiment is applicable when the distance between the antennas is less than or equal to half a wavelength.

This embodiment can be summarised in Table <NUM> shown below.

For each row in Table <NUM>, the combination of values in the first two columns, S1 quadrant and S2 quadrant, indicates that that that particular combination of S1 quadrant and S2 quadrant implies that the transformation condition is true.

In an alternative unclaimed dot multiplication embodiment, the transformation comprises calculating a phase difference point S3 by dot multiplying, in a complex IQ plane, the first sample point S1 with the conjugate of the second sample point S2. The phase difference point S3 represents a phase difference between the first sample point S1 and the second sample point S2. This is expressed in formula (<NUM>): <MAT>.

In this unclaimed embodiment, the transformation condition is always true.

Optionally, the phase difference point S3 is calculated many times (from many respective instances of S1 and S2) and averaged to improve reliability. Alternatively, the phase difference point S3 can be calculated on values which have already been averaged, as described above.

This embodiment is applicable when the distance between the antennas is between half a wavelength and one wavelength. Nevertheless, it can also be used when the distance between the antennas is less than half a wavelength, even if the embodiment described below (quadrant-based transformation) can be more computationally effective and accurate for distances between the antennas being less than half a wavelength.

In the determine phase difference step <NUM>, the position determiner determines the phase difference between the first sample point S1 and the second sample point S2 by applying an inverse tangent function based on the result of the transforming. For instance, the inverse tangent function can be applied directly on the result of the transforming.

When the phase different point S3 has previously been determined, a four-quadrant arctangent function is applied on the phase difference point. For instance, arctan2 can be used, which is defined for four quadrants. As known in the art per se, arctan2 takes two quantities (e.g. in a complex number or as separate components) as input, compared to one quantity for arctan, to allow the determination of angle in all four quadrants. The I value I3 and the Q value Q3 of S3 then make up the two arguments as input for arctan2.

In the quadrant-based transformation embodiment, this step comprises applying an inverse tangent function, which can be a conventional two-quadrant inverse tangent function, e.g. arctan.

Optionally, the phase difference is calculated several times and averaged to improve reliability of phase difference determination. In other words, in such a case, the phase difference is determined several times and the several phase differences are averaged for subsequent processing.

In a determine position step <NUM>, the position determiner determines the position of the mobile key device based on the phase difference. The phase difference is used to determine an incidence angle to the two antennas. Optionally, the incidence angle is determined several times and averaged to reduce noisy determinations. The incidence angle can be used in itself to broadly determine where the mobile key device is, e.g. inside or outside the barrier. Alternatively, the previous steps are repeated for multiple pairs of antennas, to more accurately determine the position of the mobile key device.

<FIG> are schematic graphs illustrating the result of various phase difference calculations based on IQ samples obtained using the two antennas of <FIG>. These graphs illustrate the relationship between actual phase difference between two samples, a reference phase and a calculated phase difference, Ødiff. All values are in radians. The reference phase represents the phase of one of the samples, e.g. S1, and the actual phase difference represents the phase difference between the reference phase S1 and the other sample S2. If the calculated phase difference is correct, its value is equal to the actual phase difference, regardless of the value of the reference phase S1.

In <FIG>, the calculated phase difference is a traditional inverse tangent function, arctan, calculated according to: <MAT>.

The phase difference defines the angle in relation to the line intersecting the two antennas. As seen, there are several discontinuities in the graph, which occur when the calculated phase difference Ødiff incorrectly shifts between the actual phase difference and (x - the actual phase difference), where <NUM> ≤ x ≤ <NUM>π.

In <FIG>, the calculated phase difference is based on the quadrant-based transformation embodiment mentioned above. Here, the calculated phase difference is equal to the actual phase difference, regardless of the reference phase, when the actual phase difference is in the range of - π/<NUM> to π/<NUM>. In other words, the calculated phase difference is here ideal for the disclosed range, due to the distance between the antennas is small enough, less than (or equal to) half a wavelength.

In <FIG>, the calculated phase difference is based on the quadrant-based transformation embodiment mentioned above, but shown for a larger range of actual phase difference than shown in <FIG>. Now, the issues with this embodiment is shown when the actual phase difference is outside the range of - π/<NUM> to π/<NUM>, which, again, is due to that arctan is only unambiguously defined for - π/<NUM> to π/<NUM>.

In <FIG>, an unclaimed embodiment is illustrated where the calculated phase difference is based on the dot multiplication embodiment. This embodiment is based on four quadrant inverse tangent calculation, e.g. arctan2, whereby the calculated phase difference is equal to the actual phase difference, regardless of the reference phase, in the range of - π to π for the actual phase difference.

The unclaimed dot multiplication embodiment is thus ideal for a larger operating range of the actual phase difference, being more generally applicable for greater distances between the antennas. Greater distance between antennas may increase capability of separating signals and may improve accuracy. However, the quadrant-based transformation embodiment is less demanding computationally, and can thus be applied when the phase difference is known (or reasonably expected) to be within - π/<NUM> to π/<NUM>.

<FIG> is a schematic diagram illustrating components of the position determiner <NUM> of <FIG>. It is to be noted that one or more of the mentioned components can be shared with a host device, such as the access control device, when used. A processor <NUM> is provided using any combination of one or more of a suitable central processing unit (CPU), multiprocessor, microcontroller, digital signal processor (DSP), etc., capable of executing software instructions <NUM> stored in a memory <NUM>, which can thus be a computer program product. The processor <NUM> could alternatively be implemented using an application specific integrated circuit (ASIC), field programmable gate array (FPGA), etc. The processor <NUM> can be configured to execute the method described with reference to <FIG> above.

The position determiner further comprises an I/O interface <NUM> for communicating with external and/or internal entities. Optionally, the I/O interface <NUM> also includes a user interface.

Other components of the position determiner <NUM> are omitted in order not to obscure the concepts presented herein.

<FIG> shows one example of a computer program product <NUM> comprising computer readable means. On this computer readable means, a computer program <NUM> can be stored, which computer program can cause a processor to execute a method according to embodiments described herein. In this example, the computer program product is an optical disc, such as a CD (compact disc) or a DVD (digital versatile disc) or a Blu-Ray disc. As explained above, the computer program product could also be embodied in a memory of a device, such as the computer program product <NUM> of <FIG>. While the computer program <NUM> is here schematically shown as a track on the depicted optical disk, the computer program can be stored in any way which is suitable for the computer program product, such as a removable solid-state memory, e.g. a Universal Serial Bus (USB) drive.

Claim 1:
A method for determining a position of a mobile key device (<NUM>), the method being performed by a position determiner (<NUM>) and comprising the steps of:
obtaining (<NUM>) a first sample point (S1) comprising a first in-phase, I, value (I1) and a first quadrature, Q, value (Q1), and a second sample point (S2), comprising a second I value (I2) and a second Q value (Q2), the first sample point (S1) indicating a signal received from the mobile key device (<NUM>) using a first antenna (5a) and the second sample point indicating a signal received from the mobile key device using a second antenna (5b);
determining (<NUM>) that a transformation condition is true by determining that the obtained first sample point is in the first quadrant and the obtained second sample point is in the second quadrant, that the obtained first sample point is in the second quadrant and the obtained second sample point is in the first quadrant, that the obtained first sample point is in the third quadrant and the obtained second sample point is in the fourth quadrant, or that the obtained first sample point is in the fourth quadrant and the obtained second sample point is in the third quadrant;
transforming (<NUM>) the first sample point (S1) and the second sample point (S2) according to the following: setting the I value of a first transformed sample point to the Q value of the obtained first sample point, setting the Q value of the first transformed sample point to the inverse of the I value of the obtained first sample point, -I, setting the I value of a second transformed sample point to the inverse of the Q value of the obtained second sample point, -Q, setting the Q value of the second transformed sample point to the I value of the obtained second sample point;
determining (<NUM>) the phase difference between the first sample point (S1) and the second sample point (S2) by applying an inverse tangent function based on the result of the transforming; and
determining (<NUM>) the position of the mobile key device based on the phase differences.