how to get a table of energy of individual sensor node vs time?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
BLESSINA PREETHI
el 25 de Jul. de 2022
Comentada: Walter Roberson
el 17 de Oct. de 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 comentarios
Walter Roberson
el 16 de Oct. de 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?
Respuesta aceptada
Arun
el 17 de Oct. de 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 comentario
Walter Roberson
el 17 de Oct. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!