end to end delay or latency

8 ビュー (過去 30 日間)
rem ng
rem ng 2019 年 5 月 21 日
コメント済み: Walter Roberson 2022 年 2 月 14 日
can anyone help me what matlab code has to be used to find out end to end delay packet transmission or latency from source node to destination node? or related matlab code?
  1 件のコメント
Mahal Wasique
Mahal Wasique 2021 年 7 月 10 日
rem ng can you provide me the code if you have it?

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

回答 (3 件)

Vol kan
Vol kan 2019 年 8 月 31 日
Dear Rem,
Have you solved your problem?
If yes, could you please kindly share your codes in here?
Best
  2 件のコメント
rem ng
rem ng 2019 年 9 月 1 日
not yet @ Vol kan
meh mehz
meh mehz 2020 年 8 月 13 日
Hey if you solve it can you share the answer @rem ng

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


Walter Roberson
Walter Roberson 2019 年 8 月 31 日
In order to calculate the end-to-end time, you need a pair of timestamps -- the time that the packet is queued for transmission, and the time that the packet is dequeued and becomes ready for consumption.
If somehow you had a single datascope hooked up to the source and recipient nodes, you could potentially measure the times for physical nodes. However, that situation does not typically occur. At best you might have a scope attached to the source physical node and a different scope attached to the destination physical node, and then to accurately measure latency, you are at the mercy of the accuracy of the synchronization of times between the two scopes -- which turns out to be amazingly hard to synchronize accurately. It is a "Keeps physicists up at night worrying that humans have made serious mistakes in understanding fundamental reality" hard problem.
As you are talking about MATLAB code, then you are probably taking about simulated networks. In that case, just attach some metadata to each simulated packet giving the simulated time that the packet was simulated transmitted, and when the packet is simulated received, inject the simulated reception time. And then subtract.
  4 件のコメント
Kok Siong Yap
Kok Siong Yap 2021 年 6 月 20 日
Hi Walter,
Do you have a simple matlab code regarding attachment of metadata as you mention?
As you are talking about MATLAB code, then you are probably taking about simulated networks. In that case, just attach some metadata to each simulated packet giving the simulated time that the packet was simulated transmitted, and when the packet is simulated received, inject the simulated reception time. And then subtract.
Walter Roberson
Walter Roberson 2021 年 6 月 21 日
%transmitting side
[packet_to_transmit, NODEINFO(SOURCE)] = build_packet(NODEINFO(SOURCE), DEST, Protocol, SourcePort, DestPort, payload);
outidx = numel(NODES(SOURCE).OutQueue)+1;
NODES(SOURCE).OutQueue(outidx).packet = packet_to_transmit;
NODES(SOURCE).OutQueue(outidx).xmit_time = SIMULATION_TIME;
%when packet reaches the head of the virtual send queue for the node
PACKET_INFO = NODES(SOURCE).OutQueue(outidx);
PACKET_INFO.source = SOURCE;
PACKET_INFO.outidx = outidx;
%transmission is noisy
PACKET_INFO = CorruptPacket(PACKET_INFO);
%receiving side
inidx = numel(NODES(DEST).InQueue) + 1;
NODES(DEST).InQueue(inidx).packet = PACKET_INFO.packet;
NODES(DEST).InQueue(inidx).xmit_time = PACKET_INFO.xmit_time;
NODES(DEST).InQueue(inidx).receive_time = SIMULATION_TIME;
NODES(PACKET_INFO.source).OutQueue(PACKET_INFO.outidx) = []; %it moved from output queue to input queue
Here, variables in all capitals represent values that live in the simulation software, that represent global knowledge of everything that is happening.
NODES in the above excerpt is only used to hold the packets.
NODEINFO in the above is intended to represent each nodes' knowledge about its neighbours, and to include information such as TCP sequence numbers. It is output as well as input from the build_packet process because starting a new conversation can involve allocating resources, and continuing a conversation can involve changing state.
Ideally, the information in NODES should be confined to only the information needed because the simulation software is "god" to the simulation, and anything being simulated as the nodes knowing should be elsewhere. Indeed, where I show the queues as being part of NODES, they should instead be part of NODEINFO ("per-node info"), but NODES might be used to keep global statistists. For example the above sequence on the receiver side should continue with validating the packet and increasing any global received-payload total for the node... with it being valid to instead keep the received-payload-total per-node and and have the simulation controller fish through the per-node information to get the values.

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


Zahid Ullah Khan
Zahid Ullah Khan 2022 年 2 月 14 日
someone help me to do matlab code of end-to-end delay in underwater wireless communication networks my email is engr.zahidkhan09@gmail.com
  1 件のコメント
Walter Roberson
Walter Roberson 2022 年 2 月 14 日
"help me" can mean many different things. Are you looking for someone you can give your ideas to, and the person tells you whether they sound reasonable? Are you looking for someone to research papers on the topic for you and give you the references? Are you looking for someone who can look over the code you have so-far and help you debug the code you have so far? Are you looking for a tutor? Are you looking for someone to write the code for you with the intention that you would hand in the code as-if you had written it yourself? Are you looking for someone to give you an example implementation that you would study for ideas and then write your own version?

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

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by