This invention relates to determining the Doppler shift of a received audio chirp signal.
The increasing popularity of home entertainment systems is leading to higher expectations from the domestic market regarding the functionality, quality and adaptability of the associated speaker systems.
Surround sound systems are popular for use in the home to provide a more immersive experience than is provided by outputting sound from a single speaker alone.
A microphone may be located in the surround sound system which receives audio codes from the speaker system. The microphone may be incorporated inside, for example, the listener's mobile phone or a games controller. The audio codes may relate to meta data which is being transmitted to the microphone device. The microphone device samples the received audio code and correlates those received audio code samples against replica audio codes in order to decode the received audio code. If either the speaker which transmitted the audio code or the microphone device which received the audio code is moving during the communication, then the received audio code is Doppler shifted relative to the transmitted audio code. This causes an apparent change in sample rate, which leads to the samples of the received audio code no longer being aligned with those of the replica audio code, and hence the correlation of the received audio code and its matching replica audio code is degraded.
Thus, there is a need for a technique of improving the ability to accurately decode Doppler shifted audio codes when the Doppler shift is unknown to the receiver.
According to a first aspect, there is provided a method of determining Doppler shift of a received audio chirp signal, the received audio chirp signal having a receive frequency profile Doppler shifted relative to a transmit frequency profile that the received audio chirp signal was transmitted with, the method comprising: correlating the received audio chirp signal with a replica audio chirp signal to form a correlation output; identifying a relative alignment of the received audio chirp signal and the replica audio chirp signal to be that at which the received audio chirp signal and the replica audio chirp signal are most highly correlated; and determining the Doppler shift to be that corresponding to the identified relative alignment.
The received audio chirp signal comprises a Zadoff-Chu code, and the replica audio chirp signal comprises a Zadoff-Chu code.
The method may comprise: storing a model profile, the model profile associating a Doppler shift with each relative alignment between a received audio chirp signal and a replica audio chirp signal; and determining the Doppler shift based on the model profile.
Suitably, the received audio chirp signal has a gradient and a number of samples N, the method comprising: identifying the relative alignment of the received audio chirp signal and the replica audio chirp signal to be the correlation peak index of the largest correlation peak in the correlation output; and determining the Doppler shift by multiplying the correlation peak index by the gradient modulo N.
Suitably, the received audio chirp signal has a gradient and a number of samples N, the method comprising: identifying the relative alignment of the received audio chirp signal and the replica audio chirp signal by: identifying a primary group of correlation peak indices comprising the largest correlation peak in the correlation output; identifying neighbouring groups of correlation peak indices adjacent to the primary group of correlation peak indices; determining a fractional Doppler shift from the magnitude of the largest correlation peak in the primary group and the magnitudes of the largest correlation peaks in the neighbouring groups; determining an integer Doppler shift by multiplying the correlation peak index of the largest correlation peak in the primary group by the gradient modulo N; and determining the Doppler shift by adding the fractional Doppler shift to the integer Doppler shift.
The replica audio chirp signal may have the transmit frequency profile. Alternatively, the replica audio chirp signal may have a frequency profile shifted from the transmit frequency profile.
Suitably, the method comprises: correlating the received audio chirp signal with a plurality of replica audio chirp signals, each replica audio chirp signal having a frequency profile shifted from the other replica audio chirp signals; identifying the replica audio chirp signal with which the received audio chirp signal is most highly correlated; identifying the relative alignment of the received audio chirp signal and the identified replica audio chirp signal which are most highly correlated; and determining the Doppler shift to be the Doppler shift corresponding to the identified replica audio chirp signal and the identified relative alignment.
The method may further comprise, prior to receiving the received audio chirp signal: receiving a non-Doppler shifted calibration chirp signal; correlating the non-Doppler shifted calibration chirp signal with a replica chirp signal to form a calibration correlation output; adjusting the timing with which subsequent chirp signals are sampled based on the calibration correlation output such that if a subsequent chirp signal is not Doppler-shifted, then when that subsequent chirp signal is correlated against a replica chirp signal the largest correlation peak of that correlation is at a known correlation peak index.
Suitably, the method further comprises detecting movement of a transmitter relative to a receiver from the Doppler shift.
Suitably, the method further comprises: storing instructions associated with movements; comparing the detected movement of the transmitter to the movements in the store, thereby identifying a corresponding instruction; and performing the identified instruction.
Performing the identified instruction may comprise modifying a parameter of the receiver. Performing the identified instruction may comprise modifying the volume at which the receiver plays out audio signals.
Suitably, the received audio chirp signal comprises a chirp identifier which identifies the device which transmitted the received audio chirp signal.
The method may further comprise correcting a subsequently received audio chirp signal for the determined Doppler shift to form a Doppler-corrected subsequently received audio chirp signal.
The method may further comprise determining the distance between the device which transmitted the subsequently received audio chirp signal and the device which received the subsequently received audio chirp signal using the Doppler-corrected subsequently received audio chirp signal.
According to a second aspect, there is provided chirp device configured to determine the Doppler shift of a received audio chirp signal, the received audio chirp signal having a receive frequency profile Doppler shifted relative to a transmit frequency profile that the received audio chirp signal was transmitted with, the chirp device configured to: correlate the received audio chirp signal with a replica audio chirp signal to form a correlation output; identify a relative alignment of the received audio chirp signal and the replica audio chirp signal to be that at which the received audio chirp signal and the replica audio chirp signal are most highly correlated; and determine the Doppler shift to be that corresponding to the identified relative alignment.
The present invention will now be described by way of example with reference to the accompanying drawings. In the drawings:
The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art. The general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
Suitably, long correlating codes are used to communicate meta-data in an audio application, such as in the speaker system of
An example of a long correlating code which is unlikely to be detected by people is a 511 sample M-sequence. Consider a speaker transmitting an audio signal comprising an M-sequence audio code. The audio signal is received by a microphone. When either the microphone or the speaker is moved parallel to a straight line connecting the two, the audio signal received at the microphone is Doppler shifted relative to the audio signal transmitted by the speaker. This has the effect of scaling all the frequency components of the received audio code. If the movement is so as to cause the microphone/speaker to become closer to each other, then the frequency components in the audio code are increased. If the movement is so as to cause the microphone/speaker to become further apart, then the frequency components in the audio code are decreased. This causes a misalignment between the received audio code samples and the corresponding samples of the replica audio code that the receiver correlates the received audio code samples with.
It can be envisaged that the movement may be caused by a user holding a device into which the microphone is incorporated, and moving it. For example, the user may be holding a games controller which incorporates the microphone. As another example, the user may be walking holding their mobile phone which incorporates the microphone. Average walking pace is about 1.5 m/s. Movement of a games controller may be significantly faster, for example 5 m/s.
Consider a movement of just 0.34 m/s, which is considerably slower than may be expected in the applications above. If the microphone is moved at a rate of 0.34 m/s towards the speaker, then the effective sample rate of the audio signal comprising the audio code is scaled by 1-0.34/340, which is a change of about 0.1%. This has the effect of scaling all the frequencies in the audio code by 1.001. The frequency offset caused by the Doppler shift is not fixed across the bandwidth of the signal. The frequency offset is frequency dependent. The frequency offset is greater for higher frequencies. For example, for an audio code that spans 5 kHz to 15 kHz, the lower parts of the frequency spectrum of the audio code are increased by ˜5 Hz, whereas the upper parts of the frequency spectrum of the audio code are increased by ˜15 Hz.
Since the Doppler shift causes the audio code to be subjected to a frequency offset which is proportional to the frequency components in the code, a simple frequency adjustment to the replica audio code cannot be made which would cause the adjusted replica audio code to correlate well with the Doppler shifted received audio code, and hence thereby enable the Doppler shifted M-sequence audio code to be better detected.
Another example of a long correlating code which is unlikely to be detected by people is a Gold code. Gold codes are sensitive to Doppler shift in the same manner described above for M-sequences. As with M-sequences, correlating a received audio code with Doppler shifted replica audio gold codes does not enable accurate detection of similarly affected received audio codes.
A further example of a long correlating code which is unlikely to be detected by people is a chirp code. An exemplary chirp code is a Zadoff-Chu code. The following describes an example of how a chirp code may be used to construct an audible code. The transmitted audio signal is sampled at Ft Hz and contains a chirp code comprising N samples in a bandwidth of B Hz, with a centre frequency of Fc Hz, where
This is illustrated in
This chirp code is processed into order to construct a real valued signal in a band-pass part of the audio spectrum. The chirp code is first oversampled, for example using interpolation. The following equation defines a linearly interpolated chirp code, Wig(m) which has been linearly oversampled by a factor K to give a sequence of M=KN samples.
Other techniques are possible. For example, spline interpolation may be used to oversample the chirp code. The chirp code may also be constructed through the frequency domain and integrated to get phase.
The interpolated chirp code is them mixed up to the transmit frequency Fc, for example by multiplication by a complex exponential. The real part of the mixed up signal is then taken. This process creates an audio chirp code, Wag(m) which is suitable for transmission:
Wag(m) is an audio chirp code having the properties shown in
The transmitted audio chirp signal becomes Doppler shifted as described above if there is relative movement of the transmitter and receiver in the direction of each other. Consider that the receiver moves at a velocity of vm m/s in the direction of the transmitter. The analogue to digital converter in the receiver samples the received analogue waveform at the same rate as the transmitter, because they are synchronised. Hence, the receiver collects samples Rx(m) from the ADC according to:
where m is the sample index, T is the receiver sample period, Fr is the receive sample rate, and
The fraction term
is the Doppler shift, ds, and can be expressed as a percentage. As mentioned above the receiver samples the received signal at a sample rate Fr which is the same as the transmitter sampling rate Ft. The digital sequence Rx(m) contains a band limited code. This is mixed down to centre the code at DC, for example by multiplication with a complex exponential. It is then low pass filtered. The low pass filter has a pass bandwidth which is equal to the code bandwidth. This results in a complex signal, Rxc(m) given by:
The code bandwidth
Rxc(m) contains the audio code and also any other background noise in the code's spectral band, and is oversampled by the factor K. Since the signal has been low pass filtered, it can be decimated by K to give Rxd(n) given by:
Rx
d(n)=Rxc(Kn)|n=0 . . . N−1 (equation 6)
The processed signal Rxd(n) is suitable for being correlated against the replica chirp code. The replica chirp code can be represented by Wg(n). The processed received audio chirp signal Rxd(n) may be correlated against the replica chirp code Wg(n) using fast fourier transforms (FFT). This results in a correlator output Co(b) given by:
Co=|iFFT(FFT(Rxd).conj(FFT(Wg)))| (equation 7)
where Co is the correlator output array and b is the correlator bin or index value and is circular, so that Co(b+kN)=Co(b),k∈.
If the received audio chirp code is time aligned with the replica chirp code such that the first received sample of the audio chirp code is at n=0, and the received audio chirp code is not Doppler shifted relative to the transmitted audio chirp code, and there is no significant background noise, then Co(0) will have the maximum correlation peak and the other correlator bins will contain lower values.
The magnitude of the correlator response Co(n) from a Zadoff-Chu code, of length N and gradient g, sampled at Fs Hz, that has been frequency shifted by
is given by:
For integer values of f, g and n this expression is zero except when f+gn=0(mod N). Hence, n is a peak at npk:
n
pk
=−g
−1
f(mod N) (equation 9)
Where “−1” here means reciprocal inverse.
An audio chirp code (for example length 521) that is centred at Fc Hz (for example 10 kHz), and subject to an absolute Doppler shift ds of less than approximately 1%, can be approximated to be a chirp that has been frequency shifted by ds. Fc Hz. Hence, from equation 9, and assuming that the modulo N can be managed, the Doppler shift can be approximated to be:
Where, from the previous discussion,
Fs, Fc, N and g are all known to the receiver. Thus, by identifying the location npk of the maximum correlation peak, the Doppler shift is determined according to equation 10.
Equation 9 is defined in terms of integers and so npk and g−1 are integers and
is a constant. Hence, equation 9 suggests that as the frequency term f changes by integer amounts, the Doppler shift changes in steps and the peak in the correlator output moves in steps of g−1 bins. In practice, non-integer values off and larger values of ds may cause two or more neighbouring groups of peaks to occur centred near to bins that are multiples of g−1. For example, groups of peaks may be found around bins (G−1).g−1,G.g−1 and (G+1).g−1. Where G is the group number and is a small integer compared to N, for example G<√N, and group G contains the largest magnitude correlator peak. By suitable selection of the gradient g the groups of peaks do not overlap, which allows large magnitude peaks to be unambiguously associated with a particular group. In practice, the largest peak in a group may not be at the centre of the group and its index value in the correlator output may not be a small multiple of g−1. For example, if the largest and true peak was expected at correlator index G.g−1, the actual largest peak could be anywhere in a range of index values either side of G.g−1. For example from index G.g−1−K to G.g−1+K. For the example under consideration a suitable value for K is 6. Alternatively, a range of suitable relative index values R can be determined experimentally. The group G is defined in terms of its relative index values and contains the index G.g−1. The group number G, that contains the largest overall correlator peak, determines the integer part of Doppler shift.
The fractional part of the Doppler shift F can be estimated from the magnitudes of the correlator peaks in the groups G−1, G and G+1. For example, linear interpolation can be used to obtain the fractional part using equation 11.
Where Pp is the maximum correlator peak value and R is an array of relative index values that define the group as described above. The overall estimate for the fractional Doppler shift ds is given by equation 12.
As the Doppler shift moves beyond 1% more correlation peaks are observed. Suitably, training profiles are stored, each of which maps a set of correlation peaks to a value of ds. Each training profile may comprise any combination of the following parameters: number of correlation peaks, correlation peak indices of the correlation peaks, magnitude of the correlation peaks, phase of the correlation peaks. The observed correlation response is compared to the training profiles. The training profile that matches the observed correlation response with least error determines the best estimate of ds.
Unlike
In order to accurately detect a received audio chirp code having a Doppler shift greater than 1%, the received audio chirp code can be correlated with each of a set of replica audio chirp codes. Each replica audio chirp code is already Doppler-shifted relative to the transmitted audio chirp code by a set amount. For example, one replica audio chirp code may be shifted by 1% from the transmitted audio chirp code, the next replica audio chirp code may be shifted by 1.5% from the transmitted audio chirp code, and so on.
Reference is now made to
Replica chirp generator 702 generates a replica audio chirp code to correlate with the received audio chirp code. The replica chirp generator 702 may do this by extracting the replica audio chirp code from the replica chirp store 703. Correlator 704 correlates the received audio chirp code and the replica audio chirp code. It does this by multiplying the received audio chirp code with the conjugate of the replica audio chirp code. The correlator 704 may correlate the received audio chirp code with the replica audio chirp code using a fast fourier transform method according to equation 7. Alternatively, the correlator 704 may correlate the received audio chirp code with the replica audio chirp code utilising a circular shift register and a set of complex multipliers. For each successive correlation, the circular shift register shifts the audio chirp code by one sample, and the set of complex multipliers multiply each of the audio chirp code samples by a corresponding sample of the replica audio chirp code. The resulting set of correlation samples are added to form the correlation output.
Suitably, the output of correlator 704 is input to integrator 705. Integrator 705 is a complex integrator. In the case that a plurality of audio chirps have been received which are all identical, the integrator 705 coherently integrates the correlator outputs of each of the identical chirps. The output of the integrator 705 is input to an absolute value unit 706. The absolute value unit outputs the magnitude of the complex coherent integration. Peak detector 707 then identifies the maximum correlation peaks in the correlation response. The peak detector 707 outputs the correlation bin index of the maximum correlation peak in the correlation response. Doppler shift detector 708 determines the Doppler shift of the received audio chirp signal from the correlator bin index of the maximum correlation peak in the correlation response. The Doppler shift detector 708 may do this with reference to profile store 709. Profile store 709 stores a correspondence between maximum correlation peak bin index and Doppler shift. Suitably, the correspondences stored in the profile store 709 are predetermined For example, the correspondences may have been determined from simulation, for example as shown in
At step 802, a relative alignment of the received audio chirp signal and the replica audio chirp signal at which the received audio chirp signal and the replica audio chirp signal are most highly correlated is identified. If the received audio chirp signal and the replica audio chirp signal are time aligned and the received audio chirp signal is not Doppler shifted, then the highest correlation peak is at correlation peak index 0. This is Co(0) in equation 7. Identification of the correlation peak index of the maximum magnitude correlation peak is indicative of a relative alignment between the received audio chirp signal and the replica audio chirp signal.
At step 803, the Doppler shift of the received audio chirp signal is determined. This may be determined with reference to the model profile store 709 as discussed above. In this case, the model profile store stores a Doppler shift corresponding to each correlation peak index for the case that the received audio chirp signal and the replica audio chirp signal are time aligned. Thus, the correlation peak index of the maximum magnitude correlation peak identified at step 802 is looked up in the model profile store, and the associated Doppler shift is determined to be the Doppler shift of the received audio chirp signal. Alternatively, the Doppler shift is determined by diving the correlation peak index by the gradient of the received audio chirp signal, in accordance with equation 10.
Suitably, the received audio chirp signal and the replica audio chirp signal are time-aligned prior to the correlation of step 801. This enables the Doppler shift to be determined independently of whether the received audio chirp signal and replica audio chirp signal are time-aligned. For example, this may be achieved by, prior to the received audio chirp signal being transmitted, transmitting a calibration chirp signal. At this time, the transmitter and receiver are not time-synchronised with respect to the chirp signals. The calibration chirp signal is transmitted and received without any relative movement of the transmitter and receiver towards or away from each other. In other words, the received calibration chirp signal is not Doppler shifted. The calibration chirp signal is correlated with a replica audio chirp signal as described above to form a correlation output. The correlation peak index of the maximum amplitude correlation peak would be at correlation peak index 0 if the calibration chirp signal and the replica audio chirp signal were time aligned. The actual correlation peak index of the maximum amplitude correlation peak is used to alter the start sample time of the subsequently received audio chirp signal, such that the received audio chirp signal and the replica audio chirp signal are time-aligned during correlation. Thus, if the correlation peak index of the maximum correlation peak of the correlation performed with the subsequently received audio chirp signal is not at correlation peak index 0, then that is because the received audio chirp signal is Doppler shifted relative to the transmitted audio chirp signal.
As described above, the received audio chirp signal may be correlated with each of a set of replica audio chirp signals. Each of the set of replica audio chirp signals has a different Doppler shift relative to the transmitted audio chirp signal. In this case, the replica audio chirp signal with which the received audio chirp signal is most highly correlated is identified. In other words, the correlation response having the correlation peak with the maximum amplitude is identified. The relative alignment of the received audio chirp signal and the identified replica audio chirp signal is identified. In other words, the correlation peak index of the correlation peak with the maximum amplitude is identified. The Doppler shift corresponding to that relative alignment is then determined to be the Doppler shift of the received audio chirp signal.
The steps of the method of
In an exemplary implementation, the received audio chirp signal is a received audio Zadoff-Chu chirp signal and the replica audio chirp signal(s) is a replica audio Zadoff-Chu chirp signal.
The determined Doppler shift provides a measure of the speed of relative motion of the transmitter and receiver in the direction of each other.
Relative movement of the transmitter and receiver of the audio chirp signal can be detected from the measured Doppler shift. Actions may then be taken in response to the measured Doppler shift. Consider, for example, a speaker system implementation such as that illustrated in
As an example, the identified instruction may comprise modifying a parameter of the speaker. For example, the identified instruction may comprise modifying the volume at which the speaker plays out audio signals. Thus, if the speaker determines the mobile device to be moving towards it (due to a positive Doppler shift), then the speaker may respond by increasing the volume of the speaker. Conversely, if the speaker determines the mobile device to be moving away from it (due to a negative Doppler shift), then the speaker may respond by decreasing the volume of the speaker. Alternatively, if the speaker determines the mobile device to be moving towards it (due to a positive Doppler shift), then the speaker may respond by decreasing the volume of the speaker. Conversely, if the speaker determines the mobile device to be moving away from it (due to a negative Doppler shift), then the speaker may respond by increasing the volume of the speaker. The faster the mobile device is moved (i.e. the greater the magnitude of the Doppler shift), the greater the volume change implemented by the speaker.
The audio chirp signal may comprise a device identifier. The device identifier may be an identity of the device which sent the audio chirp signal. Alternatively, the device identifier may be an identity of the device which the audio chirp signal is addressed to. In the example above, the device identifier may identify the speaker whose volume is to change according to the gesture made by the mobile device. The device identity may be conveyed by a property of the audio chirp signal. For example, the device identity may be conveyed by the gradient of the audio chirp signal. The device identity may be conveyed by a sequence of gradients of the constituent chirps of an audio chirp signal. By including a device identifier, simultaneous unambiguous transmission of audio chirp signals may occur in the speaker system.
The speaker system may be a wireless speaker system which communicates according to Bluetooth wireless protocols.
In a further example, a speaker of the speaker system may transmit an audio chirp signal which is received by a microphone device. The speakers of the speaker system are stationary and their locations known. A user gestures to the speaker system by moving the microphone device. The audio chirp signal received by the microphone device is Doppler shifted by virtue of the microphone device's movement. The microphone device determines the Doppler shift of that audio chirp signal as described above. The microphone device may receive audio chirp signals from other speakers of the speaker system. The speakers may all send their audio chirp signals concurrently if each audio chirp signal includes a device identifier which identifies the speaker which transmitted it. Alternatively, the speakers may send their audio chirp signals one at a time, in an order known to the microphone device. In either case, the microphone device is able to identify which audio chirp signal, and hence which Doppler shift, is associated with which speaker. Each speaker sends a plurality of audio chirp signals. 3D gestures made by the microphone device can then be determined from the Doppler shifts of each of the received audio chirp signals and the known locations of the speakers.
The above paragraph describes the microphone device as carrying out the analysis of the received audio chirp signals. Alternatively, this analysis may partially or wholly be carried out by another device.
In another example, the determined Doppler shift between a transmitter and a receiver may be used to improve subsequent communications between those two devices. For example, the receiver may correct a subsequently received audio chirp signal for the determined Doppler shift. The parameters of that subsequently received audio chirp signal are then able to more accurately be determined This is useful, for example, if that subsequently received audio chirp signal is used in a location determining process. This is because the distance to the transmitter can be more accurately determined from a Doppler-corrected signal than from a Doppler-affected signal.
Reference is now made to
Computing-based device 900 comprises a processor 901 for processing computer executable instructions configured to control the operation of the device in order to perform the Doppler shift determination method. The computer executable instructions can be provided using any non-transient computer-readable media such as memory 902. Further software that can be provided at the computer-based device 900 includes correlation logic 903 which implements step 801 of
The applicant draws attention to the fact that the present invention may include any feature or combination of features disclosed herein either implicitly or explicitly or any generalisation thereof, without limitation to the scope of any of the present claims. 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.