this is John BG email@example.com
1.- Calibrate first the noise in absence of signals, and then look for signals.
In the lab it's easy, on the field, it may be easy, or complicated, depending upon different factors.
2.- So with your code, you can first measure the noise, set a threshold, and then decide that whatever peaks above the thresholds are signals and whatever below is just noise.
3.- Your sampling has to be fast enough to avoid missing short signals that may go unnoticed between 2 consecutive samples.
With thresholds, inevitably, come BER curves, because noise is random, so although noise has an average amplitude, the instantaneous noise varies in such a way that it may be lower than the threshold, and a short signal below the threshold may then take place, short enough and low enough to again go unnoticed. Because the threshold is never placed right on the noise, there's always certain overhead that must be added.
4.- How do you plant to catch overlapping or too close signals?
If 2 signals are too close, again you need enough frequency resolution to resolve them.
What if 2 different signals are right on the same frequency?
I mention this because in your code you go for a single plot of the spectrum, that I guess it's going to be the amplitude, but the phase may also be useful precisely to discern overlapping signals.
5.- Probability detection over distance.
This is an example
of UWB radar with known pulse shape, and scenario studied in advance:
As mentioned above, field tests have been carried out, to calibrate without 'signals' or 'targets' and then the probability of detection can be evaluated.
6.- In this example Irfan shows us some MATLAB code to simulate probability error over EbN0
7.- As shown in Agilent's (now Keysight) LTE documentation,
an additional way to validate a carrier to is measure
CCDF, because you may classify a carrier as above noise threshold, but it may still be an interference no carrying meaningful data?
EVM, the constellations of LTE must not be deformed beyond a very low percentage