VENTILADOR DDA

10
Example for DecentralizedDataAggregation SungHan Sim This application is for data acquisition and processing based on a decentralized hierarchical sensor network. This application supports multiple sensor clusters, in which data processing is conducted independently to other clusters. The output of DecentralizedDataAggregation is either correlation or random decrement function estimated in each local sensor community. This document describes an example for a dynamic testing to provide a clear picture how DecentralizedDataAggregation incorporated with Imote2 sensors can be used. 1. Description of Testing Test bed This example testing utilizes a box fan (see Figure 1) that can be easily prepared and provides substantial vibration as well. The adjustable speed control allows three different vibration levels. Figure 1. Imote2 sensors on the box fan Sensor nodes and sensor groups Four Imote2 sensors are attached to the box fan as shown in Figure 1. There are three types of Imote2 nodes according to their role in the sensor network. Gateway node: Herein, Node 116 is the gateway node that is the interface between the user and the sensor network. The gateway node is connected to the base station via the USBminiB cable (see Figure 2). The gateway node conveys the user input to the sensor network and retrieves the sensor data and the correlation function. Cluster head: The cluster heads, which are Node 40 and 86, interact between the gateway node and leaf nodes. The cluster head shares the received commands from the gateway node with 86 88 83 40 88 86 83 40

Transcript of VENTILADOR DDA

Page 1: VENTILADOR DDA

Example for DecentralizedDataAggregation   Sung‐Han Sim 

This  application  is  for  data  acquisition  and  processing  based  on  a  decentralized  hierarchical  sensor network.    This  application  supports multiple  sensor  clusters,  in which  data  processing  is  conducted independently  to other  clusters. The output of DecentralizedDataAggregation  is either  correlation or random decrement function estimated in each local sensor community.   

This  document  describes  an  example  for  a  dynamic  testing  to  provide  a  clear  picture  how DecentralizedDataAggregation incorporated with Imote2 sensors can be used. 

1. Description of Testing 

Test bed 

This example testing utilizes a box fan (see Figure 1) that can be easily prepared and provides substantial vibration as well. The adjustable speed control allows three different vibration levels. 

 

Figure 1. Imote2 sensors on the box fan 

 

Sensor nodes and sensor groups 

Four Imote2 sensors are attached to the box fan as shown in Figure 1. There are three types of Imote2 nodes according to their role in the sensor network. 

• Gateway node: Herein, Node 116 is the gateway node that is the interface between the user and the sensor network.  The gateway node is connected to the base station via the USB‐miniB cable (see Figure 2).   The gateway node conveys the user  input to the sensor network and retrieves the sensor data and the correlation function. 

• Cluster head: The cluster heads, which are Node 40 and 86, interact between the gateway node and  leaf nodes.   The cluster head shares the received commands from the gateway node with 

86 

88 

83

40

88

86 83 

40

Page 2: VENTILADOR DDA

the  leaf  nodes  in  its  sensor  group,  and  also  serves  as  the  reference  when  calculating  the correlation function in each group. 

• Leaf node: The  leaf node receives commands and reference from the cluster head to calculate the correlation function that is sent back to the cluster head.   

To fully illustrate the decentralized network feature implemented in DecentralizedDataAggregation, the sensors are divided into two local sensor groups. 

• Sensor group 1: Node 40 and 83 • Sensor group 2: Node 86, 83 and 88 

Nodes 40 and 86 (with underlines in the above) are the cluster heads in each group.  

 

 Figure 2. Gateway node connected to the base station 

 

Parameters 

The selected parameters  for  this example are  the same as  the default parameters except  the sensing channels, which are all three (x, y, and z) channels. 

• NFFT = 1024 • number of averages = 20 • number of overlaps = 512 • window option = 3 (Hanning window) • filter = 0 (no filter is used.) • normalize = 1 • sampling rate = 280 • cutoff frequency = 100 (because the filter is disabled, this cutoff frequency is not applied). • reference channel = 3 • channel mask = 123 (All three channels are used). • save data = 1 (Time history records are retrieved). • save CFE = 1 (Correlation functions are retrieved). 

 

Page 3: VENTILADOR DDA

Running the Application 

Prepare the testing as follows. 

• Compile the DecentralizedDataAggregation application • Download the compiled binary file to each imote2 sensors including the gateway node and each 

sensor node • Enter  autocomm  –d  COMx  in  the  Cygwin window  and  press  the  ENTER  key  until  the  BluSH 

prompt is shown. 

More detailed information for the above procedure can be found in README.TXT in the directory where this document is located. 

Once  the BluSH prompt  is available,  input  the  following commands  to collect  the correlation/random decrement functions. 

 

1. Set up sensor topology 

BluSH>  SetDDASensorTopology  <group  1  nodeId>  <group  1  nodeId>  ...  <group  1 nodeId> 0 <group 2 nodeId> <group 2 nodeId> ... <group 2 nodeId> 0 ... 

or 

BluSH>  SetDDASensorTopology  <group  1  nodeId>  <group  1  nodeId>  ...  <group  1 nodeId> 

BluSH>  SetDDASensorTopology  <group  2  nodeId>  <group  2  nodeId>  ...  <group  2 nodeId> 

... 

 

*The  local sensor groups are separated by 0.   The first nodes of each group are the cluster heads, and the rest of them are leaf nodes.   

    

2. Use  either  SetDDANExTParameters  or  SetDDARDTParameters  to  provide  appropriate  sensing and  data  processing  parameters.    SetDDANExTParameters  and  SetDDARDTParameters  result  in correlation and random decrement functions, respectively.  

BluSH>  SetDDANExTParametres  <nfft>  <navg>  <overlap>  <window>  <filter> <normalize>  <samplingRate>  <cutoff>  <refChannel>  <channelMask>  <save  data?> <save cf?> 

• nfft: number of FFT points • navg: number of averaging windows • overlap: number of overlapping points between two consecutive spectral windows • window: specifies the spectral window 

o 1 = Welch window o 2 = Hamming window o 3 = Hanning window 

• filter: specifies if the low pass filter is applied. Use 1 to apply or 0 not to apply 

Page 4: VENTILADOR DDA

• normalize:  specifies  if  the  mean  value  of  sensor  signal  is  subtracted  to  remove  the  DC component. Use 1 to subtract or 0 not to subtract 

• samplingRate: sampling frequency in Hz • cutoff: cutoff frequency for the low pass filter • refChannel: the reference channel used in estimating correlation functions • channelMask: specifies sensing channels. (e.g., 1 for channel 1, 12 for channels 1 and 2, and 123 

for channels 1, 2, and 3) • save data?: use 1 to collect raw sensor data at the base station, or 0 not to collect • save cf?: use 1 to collect the estimated correlation function, or 0 not to collect 

    

BluSH>  SetDDARDTParameters  <data  length>  <RDF  length>  <trig  level  a>  <trig level b> <sampling rate> <ref ch> <ch mask> <save data?> <save rdf?> 

• data length: number of sensor data in a channel • RDF length: length of a random decrement function • trig level a: lower limit of triggering interval • trig level b: upper limit of triggering interval • sampling rate: sampling frequency in Hz • ref ch: the reference channel used in estimating correlation functions • ch mask: specifies sensing channels. (e.g., 1 for channel 1, 12 for channels 1 and 2, and 123 for 

channels 1, 2, and 3) • save data?: use 1 to collect raw sensor data at the base station, or 0 not to collect • save rdf?: use 1 to collect the estimated random decrement functions, or 0 not to collect 

 

3. Run DecentralizedDataAggregation 

BluSH> StartDDA 

 

Example for correlation function estimation 

 BluSH> SetDDASensorTopology 40 83 0 86 83 88  BluSH> SetDDANExTParameters 1024 20 512 3 0 1 280 100 3 123 1 1  BluSH> StartDDA  

Example for random decrement estimation 

 BluSH> SetDDASensorTopology 40 83 0 86 83 88  BluSH> SetDDARDTParameters 10000 500 512 1 2 280 3 123 1 1  BluSH> StartDDA  

Page 5: VENTILADOR DDA

Troubleshooting 

The following problems are often reported. 

• Sensing failure (The blue LED shall be turned off if sensing is successful). o Check if the batteries are fully charged. o Check if the sensor board is securely connected to the Imote2 (see Figure 3). o Too many USB‐connected Imote2’s may result in a sensing failure. 

• The application does not proceed after sensing. o Check if the batteries are fully charged. 

• A cluster head in two sensor groups will prevent the application from properly working. o A  cluster  head  should  belong  to  one  group.  It  should  NOT  be  shared with multiple 

groups. 

If any unknown failure persists, please report the problem. 

 

(a) Securely connected  (b) Loosely connected 

Figure 3. Connection between the Imote2 and sensor board 

 

2. Results 

As  previously  specified,  sensor  data  and  correlation  functions  are  collected  to  the  gateway  node.  Figures  4,  5,  and  6  show  the  sensor  data  for  each  speed.  Figures  7,  8,  and  9  show  the  correlation functions  for Node  83  for  each  speed,  and  compare  correlation  functions  from  Imote2  sensors  and MATLAB, which are shown to be identical. 

 

3. Conclusion 

DecentralizedDataAggregation  is  tested with  the box  fan. Four  imote2  in  two  local sensor groups are used.  The  testing  is  repeated  for  three  different  fan  speeds,  and  the  sensor  data  and  correlation functions are collected. Comparing with correlation  functions calculated on MATLAB using  the  sensor data, the DecentralizedDataAggregation application successfully estimates the correlation function. The box fan example illustrated in this document is expected to be easily repeated by the users. 

 

   

Page 6: VENTILADOR DDA

 Figure 4. Sensor data: low speed. 

 Figure 5. Sensor data: medium speed. 

0 5 10 15 20 25 30 35-100

-50

0

50

100

Nod

e 40

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-100

-50

0

50

100

0 5 10 15 20 25 30 35-100

-50

0

50

100

Nod

e 83

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-100

-50

0

50

100

0 5 10 15 20 25 30 35-200

-100

0

100

200

Nod

e 86

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-100

-50

0

50

100

150

0 5 10 15 20 25 30 35-200

-100

0

100

200

Nod

e 88

Time (sec)15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5

-100

-50

0

50

100

150

Time (sec)

0 5 10 15 20 25 30 35-400

-200

0

200

400

Nod

e 40

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-400

-200

0

200

400

0 5 10 15 20 25 30 35-400

-200

0

200

400

Nod

e 83

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-400

-200

0

200

400

0 5 10 15 20 25 30 35-500

0

500

Nod

e 86

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-400

-200

0

200

400

0 5 10 15 20 25 30 35-500

0

500

Nod

e 88

Time (sec)15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5

-400

-200

0

200

400

Time (sec)

Page 7: VENTILADOR DDA

 Figure 6. Sensor data: high speed. 

   

0 5 10 15 20 25 30 35-400

-200

0

200

400

Nod

e 40

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-400

-200

0

200

400

0 5 10 15 20 25 30 35-400

-200

0

200

400

Nod

e 83

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-400

-200

0

200

400

0 5 10 15 20 25 30 35-400

-200

0

200

400

600

Nod

e 86

15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5-400

-200

0

200

400

0 5 10 15 20 25 30 35-400

-200

0

200

400

600

Nod

e 88

Time (sec)15 15.05 15.1 15.15 15.2 15.25 15.3 15.35 15.4 15.45 15.5

-400

-200

0

200

400

Time (sec)

Page 8: VENTILADOR DDA

 (a) Sensor group 1 

 (b) Sensor group 2 

Figure 7. Correlation function for Node 83: low speed 

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-500

0

500

x di

rect

ion

Correlation Function for Node 83 in Group 1

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1000

-500

0

500

1000

1500

y di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1000

-500

0

500

1000

z di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-300

-200

-100

0

100

200

x di

rect

ion

Correlation Function for Node 83 in Group 2

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1500

-1000

-500

0

500

1000

1500

y di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1500

-1000

-500

0

500

1000

1500

z di

rect

ion

Page 9: VENTILADOR DDA

 (a) Sensor group 1 

 (b) Sensor group 2 

Figure 8. Correlation function for Node 83: medium speed 

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-5000

0

5000

x di

rect

ion

Correlation Function for Node 83 in Group 1

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-4

-2

0

2

4

6x 104

y di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-6000

-4000

-2000

0

2000

4000

6000

8000

z di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1000

-500

0

500

1000

1500

x di

rect

ion

Correlation Function for Node 83 in Group 2

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1.5

-1

-0.5

0

0.5

1

1.5x 104

y di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1

-0.5

0

0.5

1x 104

z di

rect

ion

Page 10: VENTILADOR DDA

 (a) Sensor group 1 

 (b) Sensor group 2 

Figure 9. Correlation function for Node 83: high speed 

 

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-3000

-2000

-1000

0

1000

2000

3000

x di

rect

ion

Correlation Function for Node 83 in Group 1

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-3

-2

-1

0

1

2

3

4x 104

y di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-6000

-4000

-2000

0

2000

4000

6000

z di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-1000

-500

0

500

1000

x di

rect

ion

Correlation Function for Node 83 in Group 2

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-5000

0

5000

y di

rect

ion

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-2000

-1000

0

1000

2000

z di

rect

ion