how to get a table of energy of individual sensor node vs time?
1 view (last 30 days)
Show older comments
BLESSINA PREETHI
on 25 Jul 2022
Commented: Walter Roberson
on 17 Oct 2023
If i deploy 100 nodes in a RoI how can i get the energy level of each and every node in every second?
5 Comments
Walter Roberson
on 16 Oct 2023
Is this a simulation question, or do you have 100 different physical sensor devices ? If you have physical sensor devices, how do they communicate with each other and with the host collecting the data? If they are communicating through some radio-based method, then are their individual signals strong enough to communicate with a single data collection node or do you need to relay signals from node to node?
Accepted Answer
Arun
on 17 Oct 2023
Hey Blessina,
Based on you reply to the comment, I understand that you are encountering challenges in consolidating the data from 100 nodes into a table.
I am providing a sample code snippet that you can use with your data for creating the table that you need.
% Random data for sample that represent Sensor nodes data
% Taking more values than the simulation seconds to give example
% I am using 2-D matrix similarly a vector can be used or combine vectors to
% make a 2-D matrix.
sampleData=ones(1000,100); % dummy data for the Sensors data.
for i=1:100
sampleData(:,i)=rand(1,1000)'; %complement to get a column vector
end
%assumptions
noOfNodes=100;
SimDuration=200; %assuming the duration to be 200 seconds
%creating table using the data
PowerdataTable=table;
time=(1:SimDuration)';
PowerdataTable=addvars(PowerdataTable,time);
%add nodes data to the table
for i=1:noOfNodes
PowerdataTable=addvars(PowerdataTable,sampleData(1:5:1000,i));%taking every 5th value as sampling frequency in the recorded sampleData is 200 ms.
end
%output table
Pow
I Hope this helps you with your issues.
1 Comment
Walter Roberson
on 17 Oct 2023
I read the question quite differently. It looks to me as if the question is about how to read out 100 different device sensors each second.
I further suspect that this is a situation with wireless sensors and needing to relay data between nodes, such as forming clusters with the cluster heads gathering information from the other devices within the cluster and the cluster heads send the accumulated data to host. But I do not know if it is a situation with the sensors moving.
More Answers (0)
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!