ZIGBEE SIMULATION AND IMPLEMENTION OF AUTOMATIC POWER LEVEL CONTROL FOR ZIGBEE (Jun-Hong Yang) (Prof. Ching-Kuen Lee) Thesis for Master of Science Graduate Institute of Communication Engineering Tatung University July 2009
ZigBee MATLAB/Simulink IEEE 802.15.4 IEEE 802.15.4 0dB 5dB 0dB 5dB 0dB 0.00028% Zigbex -5dBm -65dBm -3dBm -1dBm 137 ZigBee I
ABSTRECT ZigBee is a new protocol by wireless sensor network. It s characteristics include low transmission range, low data rate, low cost and low power consumption. There are many people to research about to reduce cost or power consumption, but we do not want the product that we can not ensure the message is correct by transmission even the cost is the lowest, so I use the name of method is automatic power level to increase t he correct of message by transmission. In this research MATLAB is use to simulation the IEEE 802.15.4 physical layer. The model of IEEE 802.15.4 physical layer include s spreader and modulation, that we can get the bit error rate by different Signal to Noise radio (SNR). The result show the bit error rate that we want at the SNR from 0dB to 5dB. Then use the method of automatic power level control to process the power level that the SNR not at 0dB to 5dB, the bit error rate is reduce to 0.00028 percent at least. Finally I complete the method by Zigbex, if the Received Signal Strength Indication (RSSI) small than -65dBm, then the power level up a step, and the result show it can reduce 137 times by transmission from a minute test. Keywords ZigBee power level SNR RSSI II
III
... I ABSTRECT II......III... IV... VI... VIII... 1 1.1...1 1.2... 2 ZigBee... 4 2.1 ZigBee... 4 2.2 ZigBee... 6 IEEE 802.15.4 ZigBee...9 3.1 IEEE 802.15.4...9 3.1.1 IEEE 802.15.4...10 3.1.2 IEEE 802.15.4...12 3.1.2.1...12 IV
3.1.2.2 / (CSMA/CA)...15 3.2 ZigBee... 17 3.2.1... 17 3.2.1.1...19 3.2.1.2 ZigBee... 19 3.2.1.3 ZigBee...23 3.2.2...25 3.2.2.1... 25 3.2.2.2 ZIGBEE...26 3.2.2.3... 26...27 4.1 MATLAB/Simulink...27 4.2 Zigbex... 29...32 5.1 MATLAB/Simulink...32 5.2 Zigbex...35...41... 43 V
2.1 ZigBee... 7 3.1 ZigBee/IEEE 802.15.4...9 3.2 3.3 3.4 3.5 3.6...11...13 (a) (b).14 (a) (b)...15 CSMA/CA...16 3.7 CSMA/CA.... 16 3.8 (a) (b) (c)... 17 3.9... 20 3.10......21 3.11... 22 3.12...22 3.13...23 4.1 4.2 ZigBee...27 MATLAB/Simulink...28 4.3 Zigbex...29 VI
4.4 Zigbex...30 4.5... 30 4.6 RSSI... 31 5.1... 32 5.2 5.3 5.4 250kbps...33...34 noise power 0.158watt...35 5.5....36 5.6 Zigbex... 37 5.7... 38 5.8...39 VII
3.1 IEEE 802.15.4...11 5.1 250kbps... 33 5.2 noise power 0.158watt...34 5.3... 36 5.4... 38 5.5... 39 VIII
1.1 ZigBee 2002 AA 2003 MIT [1] 1. 2. 1
3. 4. (topology) 5. (broadcast) (multicast) (multi-hop routing) 6. 1.2 2
[2]-[4] [5] 3
ZigBee IEEE 802.15 IEEE 802.15.4 IEEE (Physical Layer PHY) (Medium Access Control Layer MAC) ZigBee ZigBee 2.1 ZigBee ZigBee [6] 1. ZigBee 250kbps 40kbps 20kbps 4
250kbps 20kbps 2. ZigBee ZigBee ZigBee 6 ~ 24 3. ZigBee ZigBee 4. ZigBee 30ms 15ms 15ms ZigBee 5. ZigBee 100 5
100 37 6. ZigBee / (Carrier Sense Multiple Access with Collision Avoidance CSMA/CA) 7. ZigBee 256 65000 8. ZigBee (coordinator) (device) ZigBee ZigBee 2.2 ZigBee ZigBee 6
ZigBee ZigBee 2.1 2.1 ZigBee ZigBee Internet ZigBee 7
ZigBee ZigBee (GPS Global Positioning System) ZigBee GPS ZigBee PC 8
IEEE 802.15.4 ZigBee ZigBee IEEE 802.15.4 3.1 IEEE 802.15.4 ZigBee IEEE 802.15.4 ZigBee [7] 3.1 ZigBee/IEEE 802.15.4 3.1 IEEE 802.15.4 IEEE 802.15.4 IEEE 802.15 (Low Rate-Wireless Personal Area Network)[8] IEEE 802.15.4 (Full Function 9
Device) (Reduce Function Device) IEEE 802.15.4 3.1.1 IEEE 802.15.4 IEEE 802.15.4 1. 2. 3. 4. 5. 6. IEEE 802.15.4 868MHz 915MHz 2.4GHz 27 (Direct Sequence Spread Spectrum DSSS) 10
868/915MHz BPSK(Binary Phase Shift Keying) 2.4GHz OQPSK(Offset Quadrature Phase Shift Keying) 27 0 868MHz ~ 868.6MHz 20kbps 1 ~ 10 902MHz ~ 928MHz 40kbps 2.4GHz ~ 2.4835GHz 11 ~ 26 250kbps 3.1 3.2 3.1 IEEE 802.15.4 868MHz 915MHz 2.4GHz 1( 0) 10( 1 ~ 10) 16( 11 ~ 26) 20kbps 40kbps 250kbps BPSK OQPSK 3.2 11
868/915 MHz 1% (Packet Error Rate, PER) (Receiver sensitivity) -92 dbm 2.4 GHz -85 dbm -3 dbm(0.5 mw) 0 dbm(1 mw) 0 dbm 30 100 3.1.2 IEEE 802.15.4 IEEE 802.15.4 1. (beacon) 2. / 3. 4. 5. 6. 3.1.2.1 (Beacon enabled) (Non Beacon enabled) 12
(Superframe) 3.3 (Active portion) (Inactive portion) 16 (time slot) 3.3 / IEEE 802.15.4 1. 3.4 13
/ / 3.4 (a) (b) 2. 3.5 / / 14
3.5 (a) (b) 3. / 3.1.2.2 / (CSMA/CA) / 3.6 3.7 / 15
N? Y 3.6 CSMA/CA? N Y? Y N 3.7 CSMA/CA / 16
3.2 ZigBee ZigBee IEEE 802.15.4 ZigBee [9] 3.2.1 3.8 (a) (b) (c) ZigBee ZigBee (Star topology) (Tree topology) 17
(Mesh topology) 3.8 3.8 Zighee 1. (ZigBee coordinator) ZigBee IEEE 802.15.4 2. (ZigBee router) ZigBee 3. (ZigBee End Device) ZigBee IEEE 802.15.4 18
3.2.1.1 ZigBee 1. ZigBee 2. 3. 4. ZigBee ZigBee (Multihop) ZigBee IEEE 802.15.4 3.2.1.2 ZigBee ZigBee (packet) (frame structure) (PPDU PHY Protocol Data Unit) (beacon frame) 3.9 (data frame) 3.10 (acknowledgement frame) 19
3.11 (MAC frame) 3.12 1. (MAC header MHR) (frame control) (beacon sequence number) (source address information) (MAC service data unit MSDU) (MAC footer MFR) (frame check sequence FCS) 3.9 20
2. 3.10 3. IEEE 802.15.4 CSMA/CA (collision) IEEE 802.15.4 21
3.11 4. 3.12 22
PPDU SHR(Synchronization) PHR(PHY Header) PSDU(PHY Service Data Unit) 3.13 3.13 SHR preamble SFD preamble 32 0 SFD 8 11100101 PHR 8 0 7 PSDU PSDU 0 ~ 127bytes 3.2.1.3 ZigBee ZigBee (Route capacity) (Route discovery) (Neighbor table) (Routing table) (Route discovery table) 23
1. 2. 3. 4. ZigBee (Ad Hoc On-demand Distance Vector Routing Protocol AODV) (Link cost) (Route request) 24
(Route reply) 3.2.2 ZigBee (APS) (AF) ZIGBEE (ZDO) 3.2.2.1 ZigBee 1. 2. 3. 4. 64bit IEEE 16bit NWK 25
3.2.2.2 ZIGBEE 1. 2. 3. 3.2.2.3 1. 2. 26
MATLAB Simulink ZigBee [10]-[12] Zigbex 4.1 MATLAB/Simulink MATLAB M-file Simulink ZigBee 4.1 Signal in PN Multiplier BPSK/O-QPSK Modulator Noise (AWGN) Signal out PN Multiplier BPSK/O-QPSK Modulator 4.1 ZigBee 27
1. 4 2. 3. OQPSK 4. AWGN Channel(Additive White Gaussian Noise Channel) 5. OQPSK 6. 7. 4 8. Physical Layer 4.2 MATLAB/Simulink 4.2 MATLAB/Simulink 28
4.2 Zigbex Zigbex Zigbex (Radio Frequency Identification RFID) [13]-[15] Zigbex 10 ( Coordinator End Device) RFID Tiny OS NesC 4.3 Zigbex 4.3 Zigbex (Microprocessor) ZigBee RF ( 29
TI C2420) PCB ( ) (Temperature Sensor) (Humidity Sensor) (Photo Sensor) 4.4 4.4 Zigbex Zigbex (Received Signal Strength Indication RSSI) 4.5 4.5 30
4.5 node1 node2 node2 node1 4.6 4.6 RSSI 4.6 C2 4.1 dbm 4.1 (128 ( x 127) 1) ydbm (4.1) x C2 C2 16 10 194 y dbm 4.1 y -62 (128 (194 127) 1) 62dBm (4.2) C2-62dBm 31
MATLAB/Simulink ZigBee (pear to pear) Zigbex 5.1 MATLAB/Simulink 5.1 4.2 5.1 5.1 250kbps 5.2-5dB -5dB -5dB 5dB 20% 32
5.1 250kbps SNR noise power 0.158watt 0.168watt 0.178watt -15dB 45.02% 45.98% 46.82% -10dB 23.24% 24.41% 25.71% -5dB 4.31% 5.09% 5.76% 0dB 0.04% 0.05% 0.08 5dB 0% 0% 0% 5.2 250kbps 5.1 5dB 0% 33
5.3 IEEE 802.15.4 Physical Layer 0dB 5dB SNR>=0dB? N 2.8dB Y SNR<=5dB? N 2.8dB Y 5.3 2.8dB 5.1 noise power 0.158watt -15dB 0dB 2.8dB 5.2 0% 0.00028% 5.2 noise power 0.158watt SNR(dB) -15dB 1.8 db -10 db 1.2 db -5 db 0.6 db BER(%) 45.02% 0% 23.24% 0.00012% 4.31% 0.00028% 34
5.4 noise power 0.158watt 5.4-5dB 4.30972% -15dB 45.02% 5.2 Zigbex 0 0.5 3-5dBm -3dBm 35
-1dBm 5.3 5.3 (dbm) -5dBm -3dBm -1dBm 0m -11dBm -5 dbm -4 dbm 0.5m -47 dbm -47 dbm -41 dbm 1m -59 dbm -57 dbm -54 dbm 1.5m -64 dbm -62 dbm -56 dbm 2m -66 dbm -62 dbm -60 dbm 2.5m -68 dbm -63 dbm -63 dbm 3m -70 dbm -66 dbm -63 dbm 5.5 5.5 36
5.3 Zigbex Zigbex N >=-65dBm? Y 5.6 Zigbex -5dBm -65dBm -65dBm -3dBm -1dBm 5.6 5.4-65dBm 2.5 37
5.4 ( ) RSSI(dBm) ( ) RSSI(dBm) 0-11 1.6-62 0.1-41 1.7-62 0.2-45 1.8-65 0.3-45 1.9-65 0.4-46 2-65 0.5-50 2.1-62 0.6-53 2.2-64 0.7-53 2.3-61 0.8-54 2.4-61 0.9-55 2.5-63 1-55 2.6-64 1.1-62 2.7-68 1.2-64 2.8-69 1.3-55 2.9-70 1.4-56 3-70 1.5-60 5.7 38
5.5-50dBm 1-80dBm 1.02 5.5 RSSI(dBm) -80-70 -60-50 1.02 1.02 1.01 1 5.7 1.2 1.3 0.01 5.8 2.4GHz 250kbps 3.13 1088bit 229 13740 39
13740 1.01 13740 1 137.4 (5.1) 5.1 137 40
MATLAB ZigBee WSN 41
42
[1] ZigBee 119 2007 [2] J. S. Lee, Performance evaluation of IEEE 802.15.4 for low-rate wireless personal area networks, IEEE Transactions on Consumer Electronics, vol. 52, no. 3, pp. 742 749, Aug. 2006. [3] K. K. Lee, S. H. Kim and H. S. Park, Cluster label-based ZigBee routing protocol with high scalability, in Proc. Second International Conference on Systems and Networks Communications (ICSNC), Aug. 2007, Cap Esterel. [4] T. Kim, D. Kim, N. Park, S. E. Yoo and T. S. Lopez, "Shortcut tree routing in ZigBee networks," in Proc. IEEE International Sympos ium on Wireless Pervasive Computing, Feb. 2007, San Juan, Puerto Rico. [5] A. Viswanathan and T. E. Boult, Power conservation in ZigBee networks using temporal control, in Proc. IEEE International Symposium on Wireless Pervasive Computing, Feb. 2007, San Juan, Puerto Rico. [6] J. A. Gutierrez, M. Naeve, E. Callaway, M. Bourgeois, V. Mitter and B. Heile, IEEE 802.15.4; A Developing Standard for Low Power, Low Cost Wireless Personal Area Networks, IEEE Network, vol. 15, no. 5, pp 12-19, Sept. Oct. 2001. 43
[7] - 2007 1 [8] S. C. Ergen, ZigBee/IEEE 802.15.4 summary, ZigBee Alliance, Sept. 2004. [9] ZigBee Alliance, [Online]. Available: http://www.zigbee.org/en/index.asp [10], [Online]. Available: http://www.terasoft.com.tw/ [11] MATLAB 2004 9 [12] MATLAB/Simulink 2007 3 [13], [Online]. Available: http://www.ritii. com/ch/ [14], [Online]. Available: http://www.surewin.com.tw/ [15], [Online]. Available: http://www.dantec.com.tw/ 44