Nâng cao hiệu quả truyền dữ liệu trong mạng cảm biến không dây dựa trên tương quan dữ liệu Nâng cao hiệu quả truyền dữ liệu trong mạng cảm biến không dây dựa trên tương quan dữ liệu Nâng cao hiệu quả truyền dữ liệu trong mạng cảm biến không dây dựa trên tương quan dữ liệu luận văn tốt nghiệp,luận văn thạc sĩ, luận văn cao học, luận văn đại học, luận án tiến sĩ, đồ án tốt nghiệp luận văn tốt nghiệp,luận văn thạc sĩ, luận văn cao học, luận văn đại học, luận án tiến sĩ, đồ án tốt nghiệp
MINISTRY OF EDUCATION AND TRAINING HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY Nguyen Thi Thanh Nga EFFICIENT DATA COMMUNICATION FOR WIRELESS SENSOR NETWORK BASED ON DATA CORRELATION Major: Computer Engineering Code No.: 9480106 COMPUTER ENGINEERING DISSERTATION SUPERVISORS: Dr Nguyen Kim Khanh Assoc Prof Ngo Hong Son Hanoi - 2019 COMMITMENT I assure that this is my own research All the data and results in the dissertation are completely true, were agreed to use in this dissertation by co-authors This research hasn’t been published by other authors than me Hanoi, 11th February 2019 ON BEHALF OF SUPERVISORS AUTHOR Dr Nguyen Kim Khanh Nguyen Thi Thanh Nga ACKNOWLEDGMENTS This Ph.D thesis has been carried out at the Department of Computer Engineering, School of Information and Communication Technology, Hanoi University of Science and Technology The research has been completed under supervisions of Dr Nguyen Kim Khanh and Associate Prof Dr Ngo Hong Son Firstly, I would like to express my sincere gratitude to my advisors Dr Nguyen Kim Khanh and Associate Prof Dr Ngo Hong Son for their continuous support of my Ph.D study and related research, for their patience, motivation, and immense knowledge Their valuable guidance, unceasing encouragement and supports have helped me during all the time of research and writing out of this thesis Besides my advisors, I would like to thank all my colleagues in the Department of Computer Engineering for their insightful comments, encouragement and for the hard questions which incented me to widen my research from various perspectives I would like to express my appreciation to Prof Dr Trinh Van Loan for his time and patient helping me to correct the whole thesis as well as value comments during the process of pursuing my doctorate degree I want to thank all my colleagues in the School of Information and Communication Technology, for their supports and helps in my work I gratefully acknowledge the receipt of grants from 911 project of Ministry of Education and Training which enabled me to carry out this research Finally, I would like to thank my family, my sisters, my father and mother, my husband and two children for their endless love, encouraging and unconditional supporting me continuously and throughout writing this thesis Nguyen Thi Thanh Nga TABLE OF CONTENT COMMITMENT ACKNOWLEDGMENTS TABLE OF CONTENT LIST OF ABBREVIATIONS LIST OF SYMBOLS LIST OF FIGURES LIST OF TABLES 12 PREFACE 14 INTRODUCTION 17 Overviews 17 Energy conservation in WSNs 20 1.2.1 Radio optimization 20 1.2.2 Sleep/wake-up schemes 21 1.2.3 Energy efficient routing 21 1.2.4 Data reduction 22 1.2.5 Charging solution 23 Data correlation and energy conservation in WSNs 24 Problem statements and contributions 25 CORRELATION IN WIRELESS SENSOR NETWORK 26 Correlation model survey 26 Information entropy theory 32 2.2.1 Overview 32 2.2.2 Entropy concept 33 2.2.3 Joint entropy 33 Correlation and entropy 34 2.3.1 Correlation of two variables 34 2.3.1.1 Mutual information 34 2.3.1.2 Entropy correlation coefficient 35 2.3.2 Correlation of more than two variables 37 Conclusions 39 ENTROPY CORRELATION BASED CLUSTERING 40 Joint entropy estimation 40 3.1.1 Determining the upper bound of joint entropy 40 3.1.2 Determining the lower bound of joint entropy 43 3.1.3 Validating entropy estimation 45 Correlation region and correlation clustering algorithm 48 3.2.1 Estimated joint entropy and correlation 48 3.2.2 Correlation region definition 51 3.2.3 Correlation clustering algorithm 53 3.2.4 Validation 55 Conclusions 57 ENTROPY CORRELATION BASED DATA AGGREGATIONS 58 Compression aggregation 58 4.1.1 Comparison of compression schemes 58 4.1.2 Compression based routing scheme in a correlated region 61 4.1.2.1 1-D analysis 62 4.1.2.2 2-D analysis 66 4.1.2.3 General topology model analysis 70 4.1.3 Optimal routing scheme in correlation networks 72 Representative aggregation 73 4.2.1 Distortion function 73 4.2.2 Number of representative nodes 74 4.2.3 Representative node selection 77 4.2.4 Practical validation 78 Conclusions 81 5 ENTROPY CORRELATION BASED DATA AGGREGATION PROTOCOL (ECODA) 83 Network model 83 Radio model 84 Outline of ECODA 85 5.3.1 Set-up phase 86 5.3.2 Steady-state phase 88 Performance evaluation 88 5.4.1 Simulation models 88 5.4.1.1 Simulation parameters 89 5.4.1.2 Simulation setups 90 5.4.1.3 Dissipated energy calculation 91 5.4.2 Simulation results and discussions 93 5.4.2.1 Compression aggregation-based routing protocol 93 5.4.2.2 Representative aggregation-based routing protocol 98 5.4.3 Evaluations and comparison 101 5.4.3.1 The case of ECODA with compression aggregation 102 5.4.3.2 The case of ECODA with representative aggregation 107 Conclusions 108 CONCLUSIONS AND FUTURE STUDY 110 Summary of Contributions 110 Limitations 111 Future work 112 PUBLICATION LIST 113 REFERENCES 114 APPENDIX 126 LIST OF ABBREVIATIONS Abbreviation Meaning BS Base Station CDR Compression Driven Routing CH Cluster Head DSC Distributed Source Coding ECODA Entropy COrrelation clustering for Data Aggregation JE Joint Entropy LEACH-C Low Energy Adaptive Clustering Hierarchy- Centralized MAC Media Access Control MEMS Micro Electro Mechanical Systems QoS Quality of Service RDC Routing Driven Compression SPT Shortest Path Tree VLSI Very Large-Scale Integration WSN(s) Wireless Sensor Network(s) 1-D One-Dimensional 2-D Two-Dimensional LIST OF SYMBOLS Symbol Meaning D Distortion function e Error between real and estimated joint entropy E Energy Es Bit-hop dissipated energy ECDR Dissipated energy in case of Compression Driven Routing EDSC Dissipated energy in case of Distributed Source Coding ERDC Dissipated energy in case of Routing Driven Compression ETx Transmitted dissipation energy ERx Received dissipation energy H(Xi) Entropy of variable Xi H(X,Y) Joint entropy of two variables X and Y H(X1, …, Xn) Joint entropy of n variables X1, … , Xn H0 Base entropy Hmax Upper bound of entropy value Hmin Lower bound of entropy value I(X,Y) Mutual information between X and Y Minimum function max Maximum function H Entropy variation range Correlation coefficient 0 Entropy correlation level max Upper bound of entropy correlation coefficient min Lower bound of entropy correlation coefficient LIST OF FIGURES Figure 1.1 Wireless Sensor Network 17 Figure 1.2 Wireless Sensor Network Applications 18 Figure 2.1 The layout of sensor nodes in an environment with two different conditions area 31 Figure 2.2 The relations between entropies, joint entropy, and mutual information 34 Figure 2.3 Relation between correlation and joint entropy 38 Figure 3.1 Joint entropy calculation principle 43 Figure 3.2 Sensor layout in Intel Berkeley Research Lab 46 Figure 3.3 Practical, upper bound and lower bound joint entropy (JE) of subsets of the dataset 47 Figure 3.4 Estimated joint entropy with different values of entropy correlation coefficients using upper bound function (with Hmax = 2[bits]) 49 Figure 3.5 Estimated joint entropy (by upper bound) and practical joint entropy of dataset 50 Figure 3.6 Correlation-based clustering algorithm 53 Figure 3.7 Temperature data measured at 11 nodes in the dataset 54 Figure 3.8 Derivative of estimated joint entropy and calculated the joint entropy of the selected group 56 Figure 4.1 Routing paths for three schemes: (a) DSC, (b) RDC, and (c) CDR [122] 60 Figure 4.2 Energy consumptions for the DSC, RDC and CDR schemes respectively to entropy correlation coefficients 61 Figure 4.3 Routing pattern of 1-D network 62 Figure 4.4 Total bit-hop cost Es that corresponds to cluster size with different values of entropy correlation coefficient in the case of 1-D with compression along SPT to the cluster head 64 Figure 4.5 Total bit-hop cost Es that corresponds to cluster size with different values of entropy correlation coefficient in the case of 1-D with compression at the cluster head only 65 Figure 4.6 Routing pattern of the 2-D network [122] 66 Figure 4.7 Total bit-hop cost Es that corresponds to cluster size with different values of entropy correlation coefficient in the case of 2-D with compression along SPT to the cluster head 68 Figure 4.8 Total bit-hop cost Es that corresponds to cluster size with different values of entropy correlation coefficient in the case of 2-D with compression at the cluster head only 69 Figure 4.9 Illustration of clustering for a general topology model 70 Figure 4.10 Total transmission cost that corresponds to cluster size with different values of entropy correlation coefficient with compression along SPT to the cluster head 71 Figure 4.11 Total transmission cost respectively to cluster size with different values of entropy correlation coefficient with compression at the cluster head only 72 Figure 4.12 The relation between distortion and the number of representative nodes with N = 10 75 Figure 4.13 The relation between distortion and the number of representative nodes with N = 15 75 Figure 4.14 The relation between distortion and the number of representative nodes with N = 20 76 Figure 4.15 Maximizing obtained information based representative node selection algorithm 78 Figure 5.1 Radio energy dissipation model 84 Figure 5.2 Time scheduling for one round 86 Figure 5.3 Sensor node distribution in the 200mx200m sensing area 89 Figure 5.4 Routing path of compression-based routing protocol 90 Figure 5.5 Total energy in each round in case of compression along SPT to the CH 94 Figure 5.6 Number of alive nodes in each round in case of compression along SPT to the CH 95 Figure 5.7 Total energy in each round in case of compression at the CH only 97 Figure 5.8 Number of alive nodes in each round in case of compression at the CH only 98 10 𝑠−1 𝐸1𝑖𝑛 𝑏 𝑏 𝑏 = 𝐻0 ∑ 𝑘𝑖 − 𝐻0 𝑘𝑠−1 + 𝐻0 ( (𝑠 − 2) + 1) 2 𝑖=1 𝑏 𝑏 𝑏 = 𝐸𝑖𝑛 + 𝐻0 ( (𝑠 − − 𝑘𝑠−1 ) + − ) 2 𝑏 𝑏 𝑏 ⇒ 𝐸1𝑖𝑛 = 𝐻0 ( (𝑠 − − 𝑘𝑠−1 ) + − )⁄(1 − ) 2 𝑏 (𝑠 − − 𝑘𝑠−1 ) + 1) 𝐻0 𝐸1𝑖𝑛 = ( 2−𝑏 In addition, 𝐸1𝑒𝑥 = 𝑃 𝐻𝑠 = 𝑃 𝑘𝑠 𝐻0 Therefore, 𝑁 𝐸𝑠 (𝜌0 ) = (𝐸1𝑖𝑛 + 𝐸1𝑒𝑥 ) 𝑠 𝑁 𝑏 (𝑠 − − 𝑘𝑠−1 ) + + 𝑃𝑘𝑠 ) 𝐻0 𝐸𝑠 (𝜌0 ) = ( 𝑠 2−𝑏 (A2.1) (A2.2) (A2.3) Moreover, 𝑏 (𝑘𝑠−1 + 1) ⟹ 𝑘𝑠−1 = 𝑘𝑠 − 𝑏 Substitute (A2.4) into (A2.3) we obtain 𝑁 𝑏 (𝑠 − − ( 𝑘𝑠 − 1)) + + 𝑃𝑘𝑠 ) 𝐻0 𝐸𝑠 (𝜌0 ) = ( 𝑠 2−𝑏 𝑏 𝑁 𝑏 𝑠 )𝑘 )𝐻 𝐸𝑠 (𝜌0 ) = ( + + (𝑃 − 𝑠 2−𝑏 2−𝑏 𝑠 A3 Proof of equation (4.7) 𝑘𝑠 = 𝑠−1 𝐸1𝑖𝑛 = ∑ 𝑖 𝐻𝑖 = 𝑖=1 𝑠 (𝑠 − 1) 𝐻0 (A2.4) (A2.5) (A3.1) In addition, 𝐸1𝑒𝑥 = 𝑃 𝐻𝑠 = 𝑃 𝑘𝑠 𝐻0 (A3.2) Therefore, 𝑁 (𝐸 + 𝐸1𝑒𝑥 ) 𝑠 1𝑖𝑛 𝑁 𝑠 (𝑠 − 1) = ( 𝐻0 + 𝑃 𝑘𝑠 𝐻0 ) 𝑠 𝑠 − 𝑃 𝑘𝑠 ) 𝐻0 = 𝑁( + 𝑠 A4 Proof of equation (4.10) 𝐸𝑠 (𝜌0 ) = 𝑠−1 𝐸2𝑖𝑛 𝑛 = ( ) ∑(2(𝑠 − 𝑖)𝐻𝑖 + 𝐻𝑖 ) 𝑠 𝑖=1 127 (A3.3) 𝑠−1 𝐸2𝑖𝑛 𝑛 = ( ) (∑(2(𝑠 − 𝑖)𝑘𝑖 + 𝑘𝑖 )) 𝐻0 , 𝑠 (A4.1) 𝑖=1 where 𝑏 𝑖 ( ) −1 𝑏 𝑖−1 𝑘𝑖 = ( + ( ) − 1) 𝐻0 ; 𝑏 −1 2 𝑏 𝑖 ( ) −1 𝑏 𝑖 −1 𝑘𝑖 = ( +( ) − 1) 𝐻0 , 𝑏 −1 with 𝑏 = − 𝜌0 In addition, 𝑛 −1 𝑠 𝑛 𝐸2𝑒𝑥 = 𝑠 (∑ ( − 𝑖) 𝑖 + 𝑖 ) 𝐻𝑠𝑠 𝑠 𝑖=1 (A4.2) 𝑛 −1 𝑠 𝑛 = 𝑠 (∑ ( − 𝑖) 𝑖 + 𝑖 ) 𝑘𝑠𝑠 𝐻0 , 𝑠 𝑖=1 where 𝑘𝑠𝑠 with 𝑏 = − 𝜌0 We have 𝑏 𝑠 ( ) −1 𝑏 𝑠 −1 = +( ) − 1, 𝑏 −1 𝑛 −1 𝑠 𝑛 ∑ ( − 𝑖) 𝑖 + 𝑖 𝑠 𝑖=1 𝑛 −1 𝑠 𝑛 −1 𝑠 𝑛 = ∑ 𝑖 − ∑ 𝑖2 𝑠 𝑖=1 𝑖=1 𝑛 𝑛 𝑛 𝑛 𝑛 = ( ) ( − 1) − ( − 1) ( ) (2 − 1) 𝑠 𝑠 𝑠 𝑠 𝑠 𝑛 𝑛 𝑛 = ( − 1) (4 + 1) 6𝑠 𝑠 𝑠 Then, 𝐸2𝑒𝑥 = 𝑛 𝑛 𝑛 ( − 1) (4 + 1) 𝐻𝑠𝑠 𝑠 𝑠 128 = 𝑛 𝑛 𝑛 ( − 1) (4 + 1) 𝑘𝑠𝑠 𝐻0 𝑠 𝑠 Finally, 𝐸𝑠 (𝜌0 ) = 𝐸2𝑖𝑛 + 𝐸2𝑒𝑥 𝑠−1 𝑛 𝑛 𝑛 𝑛 𝐸𝑠 (𝜌0 ) = ( ) (∑(2(𝑠 − 𝑖)𝑘𝑖 + 𝑘𝑖 )) 𝐻0 + ( − 1) (4 + 1) 𝑘𝑠𝑠 𝐻0 𝑠 𝑠 𝑠 𝑠−1 𝑖=1 𝑛 𝑛 𝑛 𝑛 𝐸𝑠 (𝜌0 ) = [( ) ∑(2(𝑠 − 𝑖)𝑘𝑖 + 𝑘𝑖 ) + ( − 1) (4 + 1) 𝑘𝑠𝑠 ] 𝐻0 , 𝑠 𝑠 𝑠 (A4.3) 𝑖=1 where 𝑏 𝑖 ( ) −1 𝑏 𝑖−1 𝑘𝑖 = ( + ( ) − 1) 𝐻0 ; 𝑏 −1 2 𝑏 𝑖 ( ) −1 𝑏 𝑖 −1 𝑘𝑖 = ( +( ) − 1) 𝐻0 ; 𝑏 −1 2 𝑘𝑠𝑠 𝑏 𝑠 ( ) −1 𝑏 𝑠 −1 =( +( ) − 1) 𝐻0 , 𝑏 −1 with 𝑏 = − 𝜌0 A5 Proof of equation (4.14) 𝑠−1 𝐸2𝑖𝑛 𝑛 = ( ) (∑ 2(𝑠 − 𝑖)𝑖 + 𝑖 ) 𝐻0 𝑠 𝑖=1 𝑠−1 𝑠−1 𝑖=1 2( 𝑖=1 𝑛 = ( ) (2𝑠 ∑ 𝑖 − ∑ 𝑖 ) 𝐻0 𝑠 𝑛 2𝑠 𝑠 − 1) 𝑠(𝑠 − 1)(2𝑠 − 1) ) 𝐻0 =( ) ( − 𝑠 𝑛 𝑠(𝑠 − 1)(4𝑠 + 1) =( ) 𝐻0 𝑠 𝑛2 𝐸2𝑖𝑛 = (𝑠 − 1)(4𝑠 + 1)𝐻0 6𝑠 In addition, 𝑛 −1 𝑠 𝑛 𝐸2𝑒𝑥 = 𝑠 (∑ ( − 𝑖) 𝑖 + 𝑖 ) 𝐻𝑠𝑠 𝑠 𝑖=1 129 (A5.1) 𝑛 𝑛 𝑛 ( − 1) (4 + 1) 𝐻𝑠𝑠 𝑠 𝑠 𝑛 𝑛 𝑛 = ( − 1) (4 + 1) 𝑘𝑠𝑠 𝐻0 𝑠 𝑠 = 𝐸2𝑒𝑥 Then, 𝐸𝑠 (𝜌0 ) = 𝐸2𝑖𝑛 + 𝐸2𝑒𝑥 𝑛2 𝑛 𝑛 𝑛 = (𝑠 − 1)(4𝑠 + 1)𝐻0 + ( − 1) (4 + 1) 𝑘𝑠𝑠 𝐻0 6𝑠 𝑠 𝑠 𝑛2 𝑛 𝑛 𝑛 𝐸𝑠 (𝜌0 ) = [ (𝑠 − 1)(4𝑠 + 1) + ( − 1) (4 + 1) 𝑘𝑠𝑠 ] 𝐻0 6𝑠 𝑠 𝑠 where 𝑏 𝑠 ( ) −1 𝑏 𝑠 −1 𝑘𝑠𝑠 = ( +( ) − 1) 𝐻0 , 𝑏 −1 with 𝑏 = − 𝜌0 B1 Create the simulated network: network_create.m %% NTTNGA@2017 clear; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%init%%%%%%%%%%%%%%%%%%%%%%%%%% xmax=200;%x dimension; ymax=200;%y dimension; numdead=0; pkToBS=0; %no of packet data received at base station energyDis=0; %energy dissipated p=0.05; % for LEACH-C %position of bs bs.x=100; bs.y=275; %no of nodes numNode=400; %energy parameters: unit is j eelec=50*0.000000001; efs=10*0.000000000001; emp=0.0013*0.000000000001; eda=5*0.000000001; edead=201000*0.000000001; %energy limit InitE = 0.25; %packet length: unit is bits pkl=4000; %set position of nodes figure (1); for i=1:1:numNode Or_node(i).x=rand(1,1)*xmax; Or_node(i).y=rand(1,1)*ymax; Or_node(i).rch=0; %check if node is ch in this round Or_node(i).isch=0; %check if node is ch Or_node(i).dead=0; %0 is alive 130 (A5.2) (A5.3) Or_node(i).energy=InitE; %initial energy for each node Or_node(i).cluster=0; % node(i) is not in any cluster %draw Bs figure (1); plot(Or_node(i).x,Or_node(i).y,'o'); hold on; end %draw Bs figure (1); title('Original Simulation Network'); hold on; plot(bs.x,bs.y,'ro'); B2 LEACH-C simulation: leach.m %%NTTNGA@2017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%init%%%%%%%%%%%%%%%%%%%%%%%%%% clear; load('workspace12032018.mat'); %results of running %network_create.m file is saved to this mat file numdead = 0; pkToBS = 0; %no of packet data received at base station rho = 0.1; cc = 1-rho/2; %%%%%%%%%%%%%%%%%set position of nodes figure (1); for i=1:1:numNode node(i).x = Or_node(i).x; node(i).y = Or_node(i).y; node(i).rch = 0; %check if node is ch in this round node(i).isch = 0%check if node is ch node(i).dead = 0; node(i).energy = InitE; %initial energy for each node node(i).cluster = 0;% node(i) is not in any cluster hold on; end figure (1); %title('LEACH'); hold on; plot(bs.x,bs.y,'ro'); Lstatistics.energy(1)=InitE*numNode; Round = 1600; LenergyDis = zeros(1,Round); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for r=1:1:Round for i=1:1:numNode node(i).isch=0; end numdead=0; for i=1:1:numNode %count dead nodes if(node(i).energyk) NoCluster = k; else NoCluster = Lstatistics.alive(r); end %select cluster heads while (cluster< NoCluster) for i=1:1:numNode if(node(i).dead==0) Limit = p/(1-p*mod(r,round(1/p))); noderand=rand; %set random value for each node if(node(i).isch==0) if (noderand =(j1-1)*ymax/k1) && (node(i).y=(j2-1)*xmax/k2) && (node(i).x=(j3-1)*ymax/k3) && (node(i).y=(j4-1)*xmax/k4) && (node(i).x0) node(Gindex(j)).gch = j; c(j).x=node(Gindex(j)).x; %position of group head c(j).y=node(Gindex(j)).y; end end %choose the cluster head is the closest to base station among group heads for z = 1:1:cz minDisC(z)=1000; CHindex(z) = 0; for i=1:1:numNode if (node(i).dead == 0) if ((node(i).cluster == z)&&(node(i).gch>0)) dtocenterC = sqrt((node(i).xbs.x)^2+(node(i).y-bs.y)^2); if (dtocenterC < minDisC(z)) CHindex(z) = i; minDisC(z)= dtocenterC; end end end end if (CHindex(z)>0) node(CHindex(z)).rch = z; d(z).x=node(CHindex(z)).x; %position of cluster head d(z).y=node(CHindex(z)).y; end end %%%%%%%%%%%%%%% %calculate dissipation energy Gdata = zeros(1,cz); for i=1:1:numNode if (node(i).dead==0) %energy dissipated for non-ch and non-gh if ((node(i).rch==0)&&(node(i).gch==0)) dtogh=sqrt((node(i).x- c(node(i).group).x)^2 + (node(i).y- c(node(i).group).y)^2); node(i).energy = node(i).energy (pkl*eelec+pkl*efs*(dtogh*dtogh)+pkl*eda); end %energy dissipated for non-ch but gh 136 if ((node(i).rch==0)&&(node(i).gch>0)) dtoch=sqrt((node(i).x- d(node(i).cluster).x)^2 + (node(i).y- d(node(i).cluster).y)^2); Ng = c(node(i).gch).nodes; pkC = ((cc^Ng-1)/(cc-1)+cc^(Ng-1)-1)*pkl; Gdata(node(i).cluster) = Gdata(node(i).cluster) + pkC; node(i).energy=node(i).energy-(pkl*eelec*(Ng1)+pkl*eda*Ng+pkC*eelec+pkC*emp*(dtoch*dtoch)); end %energy dissipated for CH if ((node(i).gch > 0)&&(node(i).rch > 0)) dtobs=sqrt((node(i).x- bs.x)^2 + (node(i).ybs.y)^2); Ng = c(node(i).gch).nodes; pkC = Ng*pkl; Gd = Gdata(node(i).rch); Sd = Gd+pkC; N = d(node(i).rch).nodes; pkN = ((cc^N-1)/(cc-1)+cc^(N-1)-1)*pkl; node(i).energy=node(i).energy-(Gd*eelec+(Ng1)*pkl*eelec+Sd*eda+pkN*eelec+pkN*emp*(dtobs*dtobs*dtobs*dtobs)); end end if (node(i).energy>edead) CenergyDis(r)=CenergyDis(r)+node(i).energy; if (r==1) figure (1); plot(node(i).x,node(i).y,'b*'); end end end Cstatistics.energy(r)=CenergyDis(r); end r=1:Round; figure (2); hold on plot(r,Cstatistics.dead); xlabel('Rounds'); ylabel('Dead nodes'); title('Number dead nodes per round'); figure (3); hold on plot(r,Cstatistics.alive); xlabel('Rounds'); ylabel('Alive nodes'); title('Number alive nodes per round'); figure (4); hold on xlabel('Rounds'); ylabel('Energy'); title('Total Expenditute Energy'); plot(r,Cstatistics.energy); 137 B4 Compression based scheme simulation: representative.m %%NTTNGA@2017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%init%%%%%%%%%%%%%%%%%%%%%%%%%% clear; load('workspace12032018.mat'); %results of running %network_create.m file is saved to this mat file numdead = 0; pkToBS = 0; %no of packet data received at base station rho = 0.6; cc = 1-rho/2; %%%%%%%%%%%%%%%%%set position of nodes figure (1); for i=1:1:numNode node(i).x = Or_node(i).x; node(i).y = Or_node(i).y; node(i).rch = 0; %check if node is ch in this round node(i).isch = 0; %check if node is ch node(i).dead = 0; %0 is alive node(i).energy = InitE; %initial energy for each node node(i).cluster = 0;% node(i) is not in any cluster node(i).sleep = 0; %check if node is sleep node figure (1); plot(node(i).x,node(i).y,'o'); hold on; end figure (1); hold on; plot(bs.x,bs.y,'ro'); Round = 5000; CenergyDis = zeros(1,Round); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for r=1:1:Round numdead=0; for i=1:1:numNode %count dead nodes if(node(i).energy=(j1-1)*ymax/k1) && (node(i).y=(j2-1)*xmax/k2) && (node(i).x=TotalE(j)/c(j).nodes)) dtocenter = sqrt((node(i).xTotalX(j))^2+(node(i).y-TotalY(j))^2); if (dtocenter < minDis(j)) CHindex(j) = i; minDis(j)= dtocenter; end end end end if (CHindex(j)>0) 139 node(CHindex(j)).isch = 1; node(CHindex(j)).rch = j; c(j).x=node(CHindex(j)).x; %position of ch c(j).y=node(CHindex(j)).y; end end %choose the sleep nodes for j = 1:1:k if (c(j).nodes > N_rep) for l=1:1:c(j).nodes-N_rep minE(j)=0.25; Sleepindex(j) = 0; for i=1:1:numNode if ((node(i).dead == 0)&&(node(i).sleep == 0)) if ((node(i).cluster == j)&&(node(i).energy0) node(Sleepindex(j)).sleep = 1; end end end end %%%%%%%%%%%%%%% %calculate dissipation energy for i=1:1:numNode %non-ch select CH if ((node(i).dead==0)&&(node(i).sleep == 0)) if (node(i).rch==0) dtoch=sqrt((node(i).x- c(node(i).cluster).x)^2 + (node(i).y- c(node(i).cluster).y)^2); %energy dissipated for non-ch node(i).energy = node(i).energy(pkl*eelec+pkl*efs*(dtoch*dtoch)+pkl*eda); end %energy dissipated for CH if(node(i).rch > 0) dtobs=sqrt((node(i).x- bs.x)^2 + (node(i).ybs.y)^2); if (c(node(i).cluster).nodes > N_rep) N = N_rep; else N = c(node(i).cluster).nodes; end pkC = N*pkl;%((cc^N-1)/(cc-1)+cc^(N-1)-1)*pkl; node(i).energy=node(i).energy-(pkl*eelec*(N1)+0*pkl*eda*N+pkC*eelec+pkC*emp*(dtobs*dtobs*dtobs*dtobs)); end end if (node(i).energy>=0) CenergyDis(r)=CenergyDis(r)+node(i).energy; end 140 end Cstatistics.energy(r)=CenergyDis(r); end r=1:Round; figure (2); hold on plot(r,Cstatistics.dead); figure (3); hold on plot(r,Cstatistics.alive); figure (4); hold on plot(r,Cstatistics.energy); 141 ... sensors will record information about a single event in the sensing field, i.e these sensed data strongly depends on each other For example, temperature sensors in the same room record the same... correlation environment can be divided into groups called correlation regions where measured data strongly depends on each other By clustering sensor nodes into correlation regions, data aggregation... be pointed out Correlation model survey Correlation is represented for the relationships between quantitative variables or categorical variables In other words, it’s a measure of how things are