Bluetooth Signal elongation
Sometimes when measuring – how we found the issue
Bluetooth signal elongation? One would expect, if you transfer a signal, the signal you receive equals the signal that was sent.
When we were developing and testing a new algorithm we were just using our usual setup. It happens to be a system connected only via wires, as for usual testing the many times of connecting wireless is just uncomfortable. However, at one point, we were quite at the end of our testing, we used the changed the test setup with one Bluetooth connection. Continuing with our tests, it happened that we suddenly had many problems. Many tests just failed. Digging deeper and deeper into the algorithm looking for the failure, we could not find any.
It was until by chance we changed again to the wired connection that we realized. Now it was obvious, something changes between wire and Bluetooth. Looking for the problem, we thought about the usual suspects. Interruptions or cutoffs. But, this time, we did not find any of those that could cause the problem. After some time, also we did not believe it from the beginning, we saw the signal being elongated. The signal that we recorded was longer than the signal that we played.
What? Are we back in times when the battery of the cassette player was low? What would make the replay slow down?
About the Intension to treat the whole audio system as a black box
We treat an audio system completely as a black box, as we send a signal into it and record with a microphone what comes out of it. It is like streaming a piece of music, sending it from the iPhone to a wireless speaker and listening to it. The listening part in our case is the microphone. Our intention is to identify measurements that matter in terms of predicting the sound quality that we can hear from a system.
Beside others we measure time differences for different frequency groups. For this we also look into tests using bursts. Now, obviously if the signal is elongated, it effects those two elements, at least. Bluetooth signal elongation would affect the timing in a recording. Bluetooth signal elongation would also affect the frequency in a recording.
The issue bluetooth signal elongation
I don’t know the cause of the issue, but what we see is, the signal length difference of the replayed signal and the recorded signal. The first assumption, it might be due to cutoffs or interrupts was wrong, it seemed to be an elongation, a slowdown of the playback. The second and also wrong assumption was, that it would be an about equal elongation cross the whole signal length.
Looking into the issue deeper reveals, it is a bigger elongation at the beginning of the signal. Better to say after the start of the playback. We identified also, after pausing and restart of the signal, it again starts with a long elongation. Then, during playing the signal the elongation decreases. In the first seconds the elongation is bigger and over playback time it reduces to zero. Here are some pictures taken from one of the measured elongations of an average Bluetooth speaker.
The first picture shows a quite simplistic test signal. Every second there is a burst of a single frequency. The same burst every second over and over again.
A signal with 48000Hz sample rate with a burst exactly every second has obviously 48000 samples from one burst start to the next burst start. A constant distance between each burst of 48000 samples.
The second picture shows the first 4 burst of a recording laying over each other by distracting 48000 samples each time to move all four together.
It is quite difficult to see that they actually come close together, but not exactly.
The third picture is a zoom into the recorded and moves together bursts on the start of the bursts. Here you can see they have a difference between about 82 down to 63 samples. If the signal wouldn’t be elongated, the four bursts would be exactly at the same position. Which the later bursts in the signal actually are, in the same measurement, after the signal plays for some longer.
The measured differences between the first four bursts in that sample measurement are 48082, 48072, 48063 samples, instead of 48000 samples.
Where bluetooth signal elongation appeared and where not
We built the App to be used with Bluetooth, airplay, wire, or even, for the new version of the App, with an offline signal. With wireless connections we experience lots of delaying effects, because the system needs time to process between the start of the replay and the moment you first hear something. Also, cutoff effects, which causes the first part of the signal being cutoff, i.e. you can’t hear this.
While using wired connection, we never experienced some of those issues. With Bluetooth only, we experienced the signal elongation. Using the new offline option in the new app version showed the same effect. Offline in that case is the transmission of the test signal not by the app but using a file played from a different system, e.g. from a streaming computer. Now that again offers the options to transmit via wire or via Bluetooth. Using Bluetooth, it reveals the same elongation effect.
Would bluetooth signal elongation effect the sound
I mean, who cares the first part of a music piece only, just the first few seconds and only a minor effect, right?
However, elongation in that way, slows down the playback. A bid like with cassette players in the 80’ when their battery life came to an end. Slowing down the playback increases the playback time for a piece of music. In case a frequency of let’s say 1000Hz is played for one second, there are one thousand full sinus waves in that second played. If the signal playback would be slowed down to two seconds, the thousand waves would be played in two seconds. But that means we hear only 500 waves per second. This is a frequency of 500Hz. That means we hear 500Hz instead of 1000Hz.
Would we hear that, maybe, we had systems that slowed down and speeded up again.
Can you hear that? We repeated it over and over and had good laughs about it, when we tested some of the audio systems. Yes, it is a bid like the hurdy-gurdy, the modern version, the Bluetooth version of the hurdy-gurdy like in the old times when we gave our cassettes a good whack to reduce “wow and flutter”.