140 likes | 318 Views
SIS Project 2011. Energy-aware strategies for environmental monitoring with the MICAz. Cordier David & Fäh Isabelle – SIE Bachelor 6. TA : Adrian Arfire. Outline. 1 - Goal of the Project 2 - Material & Installation 3 - Method & Strategy 4 – Implementation 5 - Experiments & Results
E N D
SIS Project 2011 Energy-aware strategies for environmental monitoring with the MICAz Cordier David & Fäh Isabelle – SIE Bachelor 6 TA : Adrian Arfire
Outline 1 - Goal of the Project 2 - Material & Installation 3 - Method & Strategy 4 – Implementation 5 - Experiments & Results 6 – Conclusion 7 – References
1 - Goal of the project Implementing an adaptive method for light measurement Saving energy Keep enough data to be consistent Test different scenarios
2 – Material & Installation 2.1 – Material • 2 MICAz mote; • 4 AA batteries ; • 2 USB serial cable; • 2 MIB510 interface board ; • 2 MTS300CA sensor board ; • A camera to take these beautiful pictures ;
2 – Material & Installation 2.2 – Installation And all together : The two MICAz Ready to be used !
3 - Method & Strategy 3.1 – Method Discrete event method Threshold method Intermittent method Illustration of intermittent method 3.2 – Strategy • Control test • Step scenario • Smooth scenario • Fast smooth scenario
4 - Implementation 4.1 – C code // Event called when a new reading is done event void Read.readDone(error_t result, uint16_t data) { message_t new_msg; DataMsg *data_msg; // YOU CAN DECLARE LOCAL VARIABLES HERE if (result == SUCCESS){ call Sounder.beep(10); // build message payload data_msg = (DataMsg*)(call Packet.getPayload(&new_msg, sizeof(DataMsg))); data_msg->value = data; data_msg->time = tstamp; call Packet.setPayloadLength(&new_msg, sizeof(DataMsg)); call AMPacket.setType(&new_msg, AM_DATAMSG); call MessageQueue.enqueue(new_msg); post send_next_message(); // YOUR CODE STARTS HERE // you need to implement a method for deciding on the sampling interval dt if (data<300) { dt=1000; } else { dt=100; } // YOUR CODE ENDS HERE call Timer.startPeriodic(dt); } } The threshold value is changed here The time step can be modified here
4 - Implementation 4.2 – Matlab code function [outu, outa, Ainterp, M] = readLog(logFile, logFile2) log = load(logFile); out = log(:,2:3); log2 = load(logFile2); out2 = log2(:,2:3); plot(out(:,1)/1000,out(:,2),'.r'); hold on; plot(out2(:,1)/1000,out2(:,2),'o'); xlabel('Time [s]'); ylabel('Light sensor value'); title('Logged Signal'); xlim([0 30]); x=([0:0.1:30]); plot(x,300,'k'); Ainterp=interp1(out2(:,1), out2(:,2), out(:,1)); plot(out(:,1)/1000, Ainterp, 'k') legend('uniform method', 'adaptive method','location','best') plot(out(:,1)/1000,out(:,2),'r'); for i=1:length(out) if out(i,1)<=30000 outu(i,:)=out(i,:); end end for j=1:length(out2) if out2(j,1)<=30000 outa(j,:)=out2(j,:); end end long_u=length(outu); long_a=length(outa); th=300; alpha=0.5; beta=0.5; t=30; Edet=0; Etot=0; for k=1:long_a if outa(k,2)>th Edet=Edet+1; end end for l=1:long_u if outu(l,2)>th Etot=Etot+1; end end M=alpha*0.5*((Edet/Etot)+1)+beta*(1-long_a/(long_u*t)); return Extracting the data from the logFile containing the measurements Plotting the data for both curves and the threshold in the given range of time This value is the threshold (changes depending on the scenario) At this point, we keep only the values comprised in the time limit (30 seconds) Here, we count the number of event detected by the two methods Finally, we can calculate the performance metrics
5 – Experiments & Results 5.1 – Step scenario • dt = 1000 ms • Threshold = 100 • dt = 200 ms • Threshold = 300
5 – Experiments & Results 5.2 – Smooth scenario • dt = 500 ms • Threshold = 300 • dt = 500 ms • Threshold = 100
5 – Experiments & Results 5.3 – Fast smooth scenario • dt = 1000 ms • Threshold = 100 • dt = 1000 ms • Threshold = 300
5 – Experiments & Results 5.4 – Performance metrics dt Threshold α, β : coefficients that set the importance of each term (their sum needs to be equal to 1) S : the number of measurements taken by the node whose performance we evaluate T : the duration of the experiment Fmax : the maximum sampling frequency (this should be equal to the fixed sampling frequency of the uniform strategy in your case) : the number of events reported : the total number of events : the number of false positives reported Mean of the performance metrics for each case In red, the step scenario ; In orange, the smooth scenario ; In yellow, the fast smooth scenario.
6 - Conclusion • Project with real implication • Small implementation but significant results • Best parameters depends on the task • Some errors due to the MICAz • Further tests to be done for more accurate results Note : no arrow was mistreated during the preparation of this presentation
7 - References • C. M. Cianci, Distributed intelligent algorithms for robotic sensor networks monitoring discontinuous anisotropic environmental fields, Lausanne, 2009, pp.51-52,73-94. • A Djafari Marbini, L. E. Sacks, Adaptive Sampling Mechanisms in Sensor Networks, University College London, 2003.