2
$\begingroup$

I was given Matlab code to process a signal file. I do not have any details as to the ADC specs or the code's author. The variable, cxSamps (complex double), contains the signal's IQ data read from the entire file.

I see this line of code:

cxSamps  = cxSamps / mean( abs(cxSamps ) );

The comment says that this boosting of the cxSamps is to estimate a coarse AGC and that it is applied to the entire cxSamps. It reduces the dynamic range in order to help distinguish energy bursts from the noise.

Can you please explain:

  1. how boosting the signal reduces the dynamic range?
  2. how this improves identifying bursts in the noise?

Before:

mean( abs(cxSamps ) ) = 0.0052
min( abs(cxSamps) ) = 1.056e-06
max( abs(cxSamps) ) = 0.0343
20*log10( 0.0343 / 1.056e-06 ) = 90.231

After:

mean( abs(cxSamps ) ) = 1 (no surprise)
min( abs(cxSamps) ) = 2.03e-04
max( abs(cxSamps) ) = 6.5877
20*log10( 6.5877/ 2.03e-04) = 90.226

I reviewed this: Ref: Compute dynamic range in a linear quantization system

EDIT
I believe the above Before and After calculations now have no bearing on my question since I now realize that the dynamic range is just a function of the ADC number of bits.

$\endgroup$

1 Answer 1

1
$\begingroup$

1) How boosting the signal reduces the dynamic range?

I don't think the comment is correctly describing what is happening. Just scaling the entire data set by a constant value, in this case mean(abs(cxSamps)), shouldn't change the dynamic range as the largest and smallest values will be scaled by the same amount.

In the question you are taking the ratio of the largest value to the smallest to compute the dynamic range. This seems to be correct, however you are not getting the same value for both cases as I would expect. I believe this is due to round-off error in that you are not using enough digits (just what is in the print out) to make the computation. I suspect if more precision was used the dynamic range would be the same in both cases.

2) How this improves identifying bursts in the noise?

Not seeing the rest of the processing I can only speculate. Often what is done in detection problems is that the signal is normalized in some way, oftentimes by the estimated noise level, such that a fixed threshold can be used to decide if any particular sample is one of interest. (see Constant false alarm rate) Here is looks like the normalization is to the average absolute value of the entire data set.

$\endgroup$
2
  • $\begingroup$ I realize now that the dynamic range is just a function of the ADC number of bits. I believe you are correct that the smallest quantized value will be scaled the same as the largest. The burst detection threshold is dynamically computed using a histogram technique, but then uses 3/4 of half the cumulative sum peak to get the threshold. (This turns out not to be very robust for other files. Believe the author should have avoided the cumulative sum.) $\endgroup$
    – PaulH
    Commented Jun 12, 2023 at 15:01
  • $\begingroup$ I edited my question to include the point that dynamic range is just a function of the ADC number of bits. $\endgroup$
    – PaulH
    Commented Jun 12, 2023 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.