how to find the sample space of two or more peaks within a power delay profile
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
giancarlo maldonado cardenas
am 8 Okt. 2021
Bearbeitet: giancarlo maldonado cardenas
am 13 Jul. 2022
I have a signal of 1536 samples, as you can see in the image, I have a first ray of power that exceeds the threshold, if we count there are 4 samples until the next ray that exceeds the threshold, I wanted to know if it is possible to program a script that Say there is a ray of power exceeding the threshold, we are going to find if in the next 5 samples there is another ray exceeding the threshold. now if for example in sample 1000 I have another ray exceeding the threshold, the algorithm would have to search in the next 5 samples if there is another ray exceeding the threshold. Thank you so much
4 Kommentare
Mathieu NOE
am 12 Okt. 2021
ok
I'm up for the task , if you have some data file Ican play with
still It's not 100% clear for me which peaks you want to extract. I have more or less understood that maybe that was a 5th ray after the first one (#8 in your plot) that you wanted to identify - or find if tere is one in the five samples after #8
canyou please clarify ?
Akzeptierte Antwort
Mathieu NOE
am 13 Okt. 2021
hello again
this would be my suggestion to pic the two highest peaks inside each data bins , which are distant at least by 4 samples
the selected data appears are red diamonds in the 5th plot
threshold = 0.108599522476302;
% sort bins in ascending order
bins = sort(bins);
% search inside a buffer between two bins values
for ci = 1: numel(bins)-1
%select data inside bin
ind = (ceil(max(bins(ci),1)):floor(bins(ci+1)));
data = pdp(ind);
figure(ci)
hold on
stem(ind,data,'k','filled');
yline(threshold,'-.r','threshold','LineWidth',1);
xline(bins(ci),'--k');
xline(bins(ci+1),'--k');
% search for values above threshold
ind_val_ab_th = find(data>threshold);
if ~isempty(ind_val_ab_th)
val_ab_th = data(ind_val_ab_th);
% sort and pick 2 highest peaks
[val_ab_th,b] = sort(val_ab_th,'descend');
ind_val_ab_th = ind_val_ab_th(b);
ind_val_ab_th = ind_val_ab_th(1:2);
val_ab_th = val_ab_th(1:2);
% check x distance between the two selected points
x_dist = abs(ind_val_ab_th(1) - ind_val_ab_th(2));
if x_dist>4
plot(ind(ind_val_ab_th),val_ab_th,'dr');
end
end
end
13 Kommentare
Mathieu NOE
am 2 Nov. 2021
Hi Giancarlo
I'm gald I could be of some help here
You can always contact me via my author's page on this forum
have a good day !
giancarlo maldonado cardenas
am 8 Jul. 2022
Bearbeitet: giancarlo maldonado cardenas
am 13 Jul. 2022
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Detection, Range and Doppler Estimation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!