how to find the sample space of two or more peaks within a power delay profile

3 ビュー (過去 30 日間)
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 件のコメント
Mathieu NOE
Mathieu NOE 2021 年 10 月 12 日
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 ?
giancarlo maldonado cardenas
giancarlo maldonado cardenas 2021 年 10 月 12 日
hello thank you very much for answering, I will explain better.
I am simulating the LTE random access procedure, which consists of 4 steps, in this procedure two or more user computers can choose the same preamble and in step 3 there is a collision because the base station did not detect that two or more user computers they chose the same preamble this is called (multiplicity).
the base station (eNB) periodically reports 64 preambles to the user equipments (UE).
**********************
attached files.
power delay profile.m -> is a vector of 1536 samples and is divided into 64 bins (vertical lines) that simulate the 64 preambles. The peaks show the arrival of the user equipment (UE) towards the base station in a certain time, X axis.
bins.m -> each bin is divided into 24 samples, 24 * 64 = 1536.
This simulates the 64 preambles, therefore in the power delay profile graph the peaks show that there are 2 users who chose the 60 preamble out of the 64 available and transmitted the same preamble, therefore they are within the same bin 60.
Simulation scenario: place a user very close to the base station and another one further away from the base station, then they arrive at the base station at different times.
So far my algorithm manages to detect or identify that two users chose and transmitted the same preamble because they are within the same BIN, and if the peak exceeds a threshold.
Now I need to code an algorithm that identifies that if these peaks that are within the same BIN are separated by at least 4 or 5 or 6 samples, that will be a variable that I choose, for example samplevariable = 5;
So we know that the power delay profile is divided into 64 BINS and each BIN is divided into 24 samples.
************************
algorithm to encode.
Now in the graph of the power delay profile, we can see that there are two users within the same BIN and remembering that each BIN has 24 samples. The first user, that is, the first ray arrives in sample 116 of the 1536 existing samples, then the algorithm would have to start from that point, and say I am going to check if from sample 116, 4 or 5 or 6 samples later there is another peak that exceeds the threshold, we can see in the graph that 5 samples later, that is, in sample 121 there is another peak that exceeds the threshold, then the algorithm would have to recognize as another user and detect the multiplicity of users, which is when two or more users transmit in the same BIN. Now suppose that in another BIN we have the same scenario, for example we have a peak that exceeds the threshold and this peak is located in sample 1000 again the algorithm would start the verification from that point, from sample 1000, 4 or 5 or 6 more samples ahead there is another peak that exceeds the threshold, we are going to suppose that if then the algorithm would consider that there is another user transmitting in the same BIN, and it would show a message "there are two or more users transmitting in the same BIN (multiplicity of users)"
************************
********************
plot the graph
threshold = 0.108599522476302
figure
stem(pdp,'k');xline (bins,'--k');hold on; yline(threshold,'-.r','threshold','LineWidth',1);title('Power profile delay'); legend('PDP','Umbral','Detección','Bin'); grid on
********************

サインインしてコメントする。

採用された回答

Mathieu NOE
Mathieu NOE 2021 年 10 月 13 日
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 件のコメント
Mathieu NOE
Mathieu NOE 2021 年 11 月 2 日
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
giancarlo maldonado cardenas 2022 年 7 月 8 日
編集済み: giancarlo maldonado cardenas 2022 年 7 月 13 日
threshold=0.0212261677163254;

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDetection, Range and Doppler Estimation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by