ultra-wideband (uwb) pt. 1 - how it works

today i'd like talk about a magical technology known as ultra-wideband!

i've been working on a positioning system using ultra-wideband tech for the past few months now, but its been hard to find good resources on learning how these waves work, so i was inspired to make some posts myself, and learn along the way.

what is ultra-wideband?

ultra-wideband(uwb) is a radio technology that emits pulses at nanosecond levels to determine the distance between two objects:

its most commonly used in positioning systems, for example, apples airtags use it at close range.

frequencies

a natural starting place for how these waves work is frequencies.

sound, radio, light, everything around us has a frequency.

a frequency defines how often something happens over a period of time. or, a rate of repetition.

in our case, its how quickly the electromagnetic wave goes up and down. a higher frequency, means it goes up and down quicker, a lower one means it goes up and down slower.

  • there are also a number of

see the sine wave here:

we call one loop where a wave goes up and down(or vice versa), a "cycle".

in the simulation above, that means one cycle happens every 0.125 nanoseconds. play around with the frequency to see how it changes.

now there's a problem with the 8 GHz oscillation above: every wiggle is the same height. this means a receiver would not be able to distinguish the time the pulse arrived. every nanosecond it is off creates ~30cm of errors.

  • "was it at the start of the 2ns? the end?"

if we want to modify the wiggle shape, we can add waveforms from other frequencies:

now, you can see how the two oscillations add up. sometimes they end up greater than their parts, and sometimes they are less. we have variation in the wave!

  • the y axis here represents the strength of the electromagnetic wave

play with the time slider to see how the waves completely cancel out at t = ~ 1.6ns, turning the amplitude to zero.

now, if you haven't already, move the slider all the way to t = 5.

that shape that looks like a fish, is what we call a "pulse" - the rise and fall of the outline of all the cycles inside.

now we have variation in the pulse, which helps the receiver determine what part of the pulse it started listening to.

now play around with the value of freq2. you will notice that as the value gets further from freq1,

we have learned that adding frequencies together lets us adjust the shape and duration of the pulse!

time domain and frequency domain

we can visualize all these different frequencies that make up a pulse overtime with whats called the frequency domain:

in this example its easy to look at the time domain function, and determine the frequency. however, as combinations get more complex, its helpful to get a clear picture of what frequencies are being used.

the x axis in the frequency domain signifies the added up to form the pulse, while the y axis is called the height. the y axis signifies the relative strength of each frequency in the pulse.

the frequency domain is calculated using a fourier transform. the fourier simply compares our waveform with an infinite number of test frequencies, and calculates the strength of each, letting us decompose the waveform into frequencies. ill go into more detail in a future post!

  • if you are curious, i highly recommend this better explained article for building intuition on the fourier.

in this example, the wave is only composed of two frequencies: 7.85 GHz and 8.15 GHz. we call the gap between these two frequencies the "bandwidth" - bandwidth represents the range that the frequencies take up. in this case its 300 MHz.

as you drag the slider around, its clear there is an inverse relationship between the time it takes for one pulse to complete and the bandwidth.

this is defined with an equation:

k=time∗bandwidthk = time * bandwidth

(in our example here, k is a constant.)

we can solve for 3.33ns:

  • bw = k/time
  • bw = 1 / 3.33ns
  • bw = ~300 Million = 300 MHz

in this example the bandwidth here is 300 MHz, which means the length of one pulse is ~3.33 ns.

now. as i mentioned above, the waveform we are working with right now exists throughout all of time. in the real world, we want to emit a waveform for a set amount of time.

finite time

to start with a simpler example, take the 8 GHz wave we looked at above again:

any single pure frequency is a rate of repetition. for this rate of repetition to be constant, it needs to occur throughout all of time.

that means that if we clip a single 8 GHz frequency to only 2ns, the frequency used to create the wave is no longer a single 8 GHz wave, since we lose the infinite repetition.

after we take the fourier of the clipped waveform, this is the result:

if we cut a wave oscillating at an 8 GHz frequency, inside that time, the local oscillation rate is still 8 GHz.

but, if we perform fourier transform to get frequency domain, it spreads out. this is because the frequency domain is made up of infinite waves that don't stop. we have to consider all of time when calculating it.

in this case, values are zero outside the 2ns pulse, so we need to determine what frequencies can be used to cancel out amplitudes. this creates a broader frequency band. even though the frequencies technically stretch out for all of infinity, we measure this bandwidth by taking the of them.

when we take the half power, we get a bandwidth of 443 MHz(8.22-7.78).

by cutting the signal to 2ns, we now have a wider bandwidth since we need additional frequencies to cancel out

now, we have proven intuitively:

  1. that the relationship between the time domain and the frequency domain is inverted
  2. why, even if you take an infinite frequency and cut it, the resulting frequencies composed inside change.

ultra-wideband waveform

now that we have covered time domain vs frequency domain, lets convert this into the proper channel and bandwidth regulation for ultra-wideband - an 8 GHz wave with a 500 MHz bandwidth.

  • (technically, its 7.99 GHz, and a 499.2 MHz bandwidth, but for simplicities sake, we will continue with the 8 GHz wave)

creating the ultra-wideband pulse

since ultra-wideband pulses are 2ns wide, to create the right shape we just need to add a wave together:

so now we have created the right shape of the pulse for UWB. with a frequency of 7.75 and 8.25 added up, they create a bandwidth of 500 MHz, which results in a 2ns pulse.

but we still have a problem: the pulse still emits across all infinity.

ultra-wideband boards only transmit waves in 2ns slots, so we can't just have the pulse continuing on forever.

to fix this, we add a ~infinite number of frequencies to cancel out everything except one 2ns range:

here we combine a bunch of infinite frequencies between 7 and 9GHz so we only get a 2ns pulse.

but, this is a symbiotic relationship.

we can also say "transmit the pulse for 2ns, and get the frequencies above".

you may be wondering, if we take a waveform like the one above with 7.75 and 8.25, and trim it, why does the frequency domain change at all? isnt it just the same shape?

as explained above, frequencies extend across all of time. we cant tell a frequency to turn on and off. so, here we need to add other frequencies to cancel out other parts in time domain where it is not shown.

it can no longer be just those two frequencies, since we have decided to only emit for 2ns.

how we measure pulse length

you may have noticed that the entire pulse is ~4ns, not 2ns.

in the time domain we measure the length of the pulse at half height. this is what makes it 2ns instead of 4.

similar to half power, we need to use half height to measure the duration of the pulse because otherwise there is no start or end. a smooth pulse fades in and out, but never truly stop.


now, above we are working with an infinite number of frequencies, which lets us perfectly start and stop the waveform. while this is mathematically possible, it is not practical. the chip can't transmit every frequency.

what the antenna actually transmits

as mentioned above, ultra-wideband waves operate on channel 9, which is a 7987.2 MHz oscillation (~8 GHz) and has a bandwidth of 499.2 MHz.

so the real waveform for one ultra-wideband pulse looks like this:

this is an approximation, we aren't able to easily see how the actual wave is formed

x(t)=11+π/4⋅cos⁡(1.5πu)+sin⁡(0.5πu)2u1−(2u)2⏟amplitude⋅cos⁡(2π⋅7.9872⋅(t−3))⏟carrierx(t) = \underbrace{\frac{1}{1 + \pi/4}\cdot\frac{\cos(1.5\pi u) + \dfrac{\sin(0.5\pi u)}{2u}}{1 - (2u)^2}}_{\text{amplitude}} \cdot \underbrace{\cos\big(2\pi \cdot 7.9872 \cdot (t - 3)\big)}_{\text{carrier}} u=t−3Tp,Tp=1499.2 MHz≈2.003 ns,t in nsu = \frac{t - 3}{T_p}, \qquad T_p = \frac{1}{499.2\text{ MHz}} \approx 2.003\text{ ns}, \qquad t \text{ in ns}

(dont worry too much about this equation for now if you don't understand it, we will come back later.)

this is the closest representation of the frequency we can get mathematically. in reality, we cannot perfectly represent what happens in the physical world.

while the chip can turn the wave on/off within 2ns, it doesn't. if this happened, sudden jumps at the start/end would spread the waveforms energy into frequencies much further from the pulses peak(in this case, ~8 GHz) and break the .

instead, we need the chip to make a smooth on/off ramp for the signal.

to achieve this, we use a generator on the chip. it gets turned on, and transmits a smoother waveform, whose "half power" part is 2ns wide, but continues to fade out after. see the graph above

  • what we see here is an approximation, qorvo(and other chipmakers) don't publish how long the real wave actually takes to go from trigger to peak.

above is the frequency we actually transmit in the air. if you look past the larger pulse, you'll notice there are still some faint wiggles after. due to physics, the antenna still transmits smaller waves, after the generator fires, eventually dropping below the noise floor after ~10ns.

envelope

while the receiver could technically read the combined wave above, theres two problems:

  1. it would need to read 16 billion measurements a second
    1. (2 measurements per wiggle to figure out wave direction)
  2. the pulse is buried in noise
    1. oftentimes the pulse is weaker than background noise. the receiver can find it using a .

so instead, the receiver computes the "envelope" of the actual oscillation:

by , we get the measurements down to 500 million(500MHz bandwidth) a second. this is the rate the receiver measures while its on.

  • since the raw bandwidth is 250 MHz, we measure twice per cycle. this means we
  • measure once every 2 nanoseconds, which is 500 MHz.

now, this singular pulse, can be flipped upside down. the chip just multiplies the normal pulse by -1, and every wiggle from the antenna comes out mirrored.

the receiver then interprets each pulse as either a -1 or a 1, which is a part of how we send data to the receiver. we will go into the details of this in a later post!

what a wave looks like in the air

id be remiss if we didn't cover one last thing.

now, as mentioned above, one benefit of ultra-wideband is that a pulse can be sent at a much faster rate relative to .

but there is another equally important one for our use case.

its common for waves to bounce off of walls and other objects, creating a copy of the same wave called a "reflection".

when this happens, there is risk that the real wave and its reflections overlap when they reach the receiver. this could make it difficult for a receiver to distinguish when the real wave arrived:

at 100 MHz, a much larger delay is needed for a clean measurement. at 500 MHz, even at a 1.5ns delay, we get the correct arrival.

this is because ultra-wideband waves are much shorter relative to 100 MHz:

since a receiver only listens for a short period of time for the wave, when its only 60cm, theres much less risk of overlap.

summary

so, now we have a full intuition of how ultra-wideband works.

we learned that a waveform is made up of many oscillations of varying amplitudes.

we also learned the inverse relationship between the time domain and the frequency domain. ultra-wideband is "ultra wide" because it transmits a 2ns pulse, which is made up of a wider bandwidth(499.2 MHz).

the ultra-wideband standard specs are 499.2 MHz bandwidth, 7.987 GHz and 2.003ns.

the power of ultra-wideband is that the pulses can be sent much faster(due to larger bandwidth) and more reliably(minimizing bounce off of object, since the waves are shorter).

truly magical tech!

pt 2 detailing the dl-tdoa protocol coming soon!

thank you to will kelly, and walter min for reading earlier drafts of this post.

if you are curious, this is the obsidian plugin i used for the expandable explanations

ps: if you have any thoughts on this topic, or feedback on how i could have communicated something clearer email me - youfoundaaron@gmail.com