# Threshold Estimation from a Linear FM Pulse Position Modulated signal

I have a signal chain to detect multi channel LFM (Linear Fm - Hann window being applied as shaping filter for the pulses) pulses as shown in picture below. (Numbers in the picture is in Hz., for instance start frequency of channel-1 LFM is 39400 Hz).

As you may see I have one linear chirp signals per channel sweeping 300 Hz in 60 msec with different start frequencies (meaning, if you look at the block diagram channel-1's LFM pulse starts at 39400 and sweeps all the way up to 39700 then channel 2's LFM pulse LFM pulse starts at 39800 and sweeps all the way up to 40100. This is a multichannel system so 16 channels can be active anytime simultaneously.

This signal is going through a Analog to Digital Converter Circuit with a sampling rate of 500 kHz. I have no control on this circuit. I can only play with back-end DSP algorithms which are depicted with blue block in the picture.

So ADC board mentioned above, the does a complex filtering and down samples the signal by 4 then another complex filter and down samples the signal by 2. So when I receive the signal from ADC board it comes through UDP with 8192 samples in each transfer with the sampling rate of 62.5 KHz (8192 real and 8192 imaginary symbols).

As you can see I am applying band-pass filter for each channel to achieve better channel separation. and this block is followed by another down-sampler. After the match filters (which are also designed with considering this decimation by 16), I am getting peaks at where match filter "matches". Now I need to find "the potential peak locations and their amplitudes" to feed it to my peak detector algorithm. Eventually I should be able to calculate the time difference between 2 LFM pulses on each single channel to decode the information carried by these pulses.(Pulse Position Modulation).

I want to be able to estimate the "noise level" so that I can place a threshold to determine potential peak candidates. I should have used another word for the noise floor since this is using purely time domain signal. Anyways, I want to calculate the "floor level" and then estimate a threshold that will be half way up through from the estimated "floor" (With the measurements we are confident that half way up would be Enough).

So far I am working on a method that does the following:

th = mean(movmedian(20*log10(inputsignal),3));

I was hoping to get rid of peaks with moving average filter and mean value of this remaining signal should give me a coarse value close to "floor level". I am not sure about how big the median window should be?

Can someone comment on a new method or the one I am applying now?