Help with understanding Quantisation noise - Page 1
Forum section: electronics / rf-microwave

author: mio83
author_rank: Regular Contributor
timestamp: June 19, 2020, 08:16:12 am
content: Hello everybody!I have a 8-bits SDR, the HackRF.I have recently been playing around trying to measure the sensitivity of it as a receiver in a specific frequency (21.4Mhz).By generating (with a signal generator) a signal at -121dbm, the HackRF can still receive it and produce the audio tone (>10db above the noise level).So the HackRF can (at least in the sense described above) receive S1 (i.e., -121dbm) signals.However, discussing this on reddit, one user pointed out that in "practice" the sensitivity would be much worse because the HackRF has a 8-bit ADC.In particular, they said that a 8-bit SDR cannot receive signals 45-50db below a stronger signal nearby (nearby here means within the same band-pass window, which in the case of the HackRF is 1.75Mhz).This comment made sense to me, because of the math here (https://en.wikipedia.org/wiki/Quantization_(signal_processing)).In particular, the equation:Code:SQNR = B* 6.02where B is the number of bits, so in the case of the HackRF (B=8bits) the SQNR is approx 48-50db.So to test this, I have generated a signal S0 which is the sum of two signals S1 and S2 where:S1 = an intermitted sine wave at 21.4Mhz (precisely a 0.25Hz square wave AM modulated at 21.4Mhz) having -121dmb of powerS2 = a sine wave at 21.45Mhz having -65dbm of powerSo the two signals are very close (50Khz) and S1 is more than 50db down than S2.Still I was very surprised to discover that the HackRF can still copy with no problems the S1 signal, and the outputed audio tone is >10db above noise floor.The full experiment is available here:Question:Can someone help me understanding why/how the HackRF can still receive the signal?Specifically, I would be interested in finding a lab test setup to "measure" and verify the SQNR = B* 6.02.Clearly the experiment (S0=S1+S2) I made is not showing this, for reasons I still don't understand.thanks a lot in advance!DISCLAIMER:This, for me, is just a fun exercise to learn about RF. Some people in reddit answered with "the HackRF is a crappy receiver, not a real rig" etc...In this post I am only searching for technical suggestions to verify that theory meets physical reality. I don't care about which radio is best.

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: June 19, 2020, 08:45:55 am
content: I have an idea why this is but don't have the time to fully dive into this; I'll summarize and if it is not clear I'll write it out in more detail later.I think it has to do with how you look and consider SNR. The SNR of the ADC given by your equation is 'the entire noise power over the band versus the entire signal power in the band'. That is not what you are looking at, because you are actually looking at a smaller band: Your single tone has a bandwidth of (in theory) 0 Hz. The quantization noise is spread out over the entire ADC band. If you now only look at a narrow band around your tone (which your ears automatically do) you can still make out the tone.There is also I think something about the tone being information-less - because it is perfectly predictable (it is a single sine-wave), over time you 'average' out the noise. I imagine as soon as you put a bit of modulation on your tone, you are going to lose it right in the noise.

author: paul002
author_rank: Regular Contributor
timestamp: June 19, 2020, 09:25:50 am
content: I think it is all about dynamic range and bandwith presented to the ADC. If the strong signal clips the ADC you will not be able to copy the weaker signal. The MAX5864 datasheet shows a dynamic range of 69 dbc. 121 - 65 = 56 dbc should be possible. This is just my thought. Maybe the HackRF does not have a lot of bits but a reasonble RF concept. That does not generate a lot of other noise. In the book "Communications Receivers DSP, Software Radios, and Design By Ulrich L. Rohde And Jerry C. Whitaker" there is a nice explanation on this at page 653, 654. (you can find pdf on internet )

author: radiolistener
author_rank: Super Contributor
timestamp: June 19, 2020, 05:54:46 pm
content: Quote from: mio83 on June 19, 2020, 08:16:12 amYou're forgot to mention for which bandwidth it can see -121 dBm signal. This is very important thing.When you talking about sensitivity you're needs to specify bandwidth. With no information about bandwidth, your sensitivity value is useless.Quote from: mio83 on June 19, 2020, 08:16:12 amyes, this is true, HackRF has 8 bit ADC, it means that it's theoretical SNR = N * 6.02 + 1.76 = 8 * 6.02 + 1.76 = 49.92 dB.But you forgot that these 49.92 dB is for 20 MHz sample rate, it means 20 / 2 = 10 MHz bandwidthWhen you apply digital filter to reduce bandwidth to 500 Hz, you will get processing gain 10 MHz / 500 Hz = 20000.Gain 20000 = 10 * log10(20000) = 43.01 dB.So, if you use 500 Hz filter with your HackRF, you will get total SNR = 49.92 dB + 43.01 dB = 92.93 dB.It means that theoretical dynamic range of HackRF at 500 Hz bandwidth will be about 92.93 dB or a little worse due to ADC limitations. So, for 500 Hz bandwidth your HackRF will have noise floor at about -92.93 dB.Now you're needs to add your amplifier gain on the ADC input in order to get sensitivity.If you can hear -121 dbm signal with 10 dB above noise floor, it means that MDS sensitivity is -121-10 = -131 dBm.If you're doing it with with 500 Hz filter, it means that SNR = 92.93 dB, so the gain on ADC input is about 131 - 92.93 = 38.07 dB.In reality there is also some additional noise. So, you're needs to calibrate your HackRF for specific bandwidth and then measure it's sensitivity.But note, if you change filter bandwidth, processing gain will be changed, so noise floor also will be changed and your receiver sensitivity will be different. This is why it is important to specify bandwidth for your sensitivity value.Quote from: mio83 on June 19, 2020, 08:16:12 amBecause your HackRF ADC works with 10 MHz bandwidth (20 MHz sample rate). When you apply filter, for example 500 Hz, it works like get 10 million points and produce average to get just 500 points. Average operation (filtering) will reduce noise level, but also it reduces bandwidth. This is known as "process gain".For example if you select LSB/USB modulation with 2500 Hz bandwidth, it means process gain 10 MHz / 2500 Hz = 4000.In decibels it will be 10 * log10(4000) = 36.02 dB.In order to get total dynamic range you're needs to add dynamic range of your ADC at full speed (20 MHz sample rate).ADC SNR = N * 6.02 + 1.76for 8 bit ADC it will beSNR = 8 * 6.02 + 1.76 = 49.92 dBSo, the total SNR for 2500 Hz bandwidth will be:SNR = 49.92 dB + 36.02 dB = 85.94 dB.You're also needs to add gain offset for your ADC 0 dB level in order to get theoretical sensitivity.For example, if you put -50 dBm signal from sig gen and see -10 dB level at 2500 Hz bandwidth, it means that gain offset is 40 dB (50-10=40). In such case your HackRF theoretical sensitivity for 2500 Hz bandwidth will be:MDS = -49.92 dB - 36.02 dB - 40 dB = -125.94 dBmIn reality you will see a little worse noise floor, at about -120 dBm or something like that. This is due to self-noise of ADC and input amplifier.Quote from: mio83 on June 19, 2020, 08:16:12 amYes, this is true, HackRF is crappy receiver. But you can use it to listen some strong station when there is no powerful interference. For example you can listen AM broadcast and strong ham stations. Things will get worse if you try to listen for a weak station with powerful interference sources. HackRF will be flooded with interference and you will see just a noise

author: mio83
author_rank: Regular Contributor
timestamp: June 19, 2020, 09:36:48 pm
content: Thank everybody for the answers. In particular radiolistener, your answer is fantastically instructive.Lots to think about and learn.thanks again!

author: radiolistener
author_rank: Super Contributor
timestamp: June 19, 2020, 10:37:58 pm
content: by the way original SNR formula is:SNR = 20*log10(2^N) + 20*log10( sqrt(3/2) )20*log10(2^N) = N * 20*log10(2) = N * 6.0220*log10( sqrt(3/2) ) = 1.76