DISTRIBUTED WIRELESS NETWORK FREQUENCY SYNCHRONIZATION UNDER UPDATING ERROR NOISE WITH KALMAN FILTER A Thesis by Mahesh Rachuri Bachelor of Technology in Electronics and Communication, Geethanjali College of Engineering and Technology, JNTU, Hyderabad, 2010 Submitted to the Department of Electrical Engineering and Computer Science and the faculty of the Graduate School of Wichita State University in partial fulfillment of the requirements for the degree of Master of Science July 2013 © Copyright 2013 by Mahesh Rachuri All Rights Reserved Note that this thesis work is protected by copyright, with all rights reserved. Only the author and advisor Dr. Hyuck M. Kwon have the legal right to publish, produce, sell, or distribute this work. Author or advisor permission is needed for others to directly quote significant amounts of information in their own work or to summarize substantial amounts of information in their own work. Limited amounts of information cited, paraphrased, or summarized from the work may be used with proper citation of where to find the original work. DISTRIBUTED WIRELESS NETWORK FREQUENCY SYNCHRONIZATION UNDER UPDATING ERROR NOISE WITH KALMAN FILTER The following faculty members have examined the final copy of this thesis for form and content, and recommend that it be accepted in partial fulfillment of the requirement for the degree of Master of Science with a major in Electrical Engineering. _________________________________________ Hyuck M. Kwon, Committee Chair _________________________________________ Animesh Chakravarthy, Committee Member _________________________________________ Xiaomi Hu, Committee Member iii DEDICATION To my family members and all my teachers iv ACKNOWLEDGEMENTS I would like to express my regards to my committee chair, Dr. Hyuck M. Kwon, who has the attitude of encouraging his students: he continually and convincingly conveyed a spirit of motivation in regard to my research. Without his guidance and persistent help this thesis would not have been possible. I also thank my committee members, Dr. Animesh Chakravarthy and Dr. Xiaomi Hu, who also helped me with this thesis. I would like to thank all my colleagues Kanghee, Jessie, Wenhao, Youvaraj, Kenny, Raju, Sai Mithil, Sangku, Prashanth, Kim, Shuang, and others in the Wireless Research Development group (WiRed group) for their support and encouragement throughout my research. I thank the Department of Management Information System (MIS) for providing me funding through a graduate Research Assistantship position. I thank the assistant manager, Molly, Dr. Richard LeCompte, Dr. Khawaja Saeed, and Dr. David Xu from the FREDs department. Furthermore, thanks go to Dr. Achita (Mi) Muthitacharoen, for her continuous support and encouragement. I would like to thank Siddarth, Yaswanth, Pramod, Mouninder, Sujeeth for their support. Finally, I thank my entire family members, friends and my relatives, especially my mother for her encouragement and support during my research. v ABSTRACT Frequency synchronization in a distributed wireless network is a challenging issue in recent times. Some frequency synchronization techniques are used in the distributed wireless network. However, due to the presence of noise, the simultaneous synchronization of all nodes to a common frequency is difficult, therefore an alternative solution for distributed network frequency synchronization using the Kalman filter is studied in this thesis. This thesis will show that existing frequency synchronization techniques in the wireless network fail in a noisy environment, and that the proposed scheme can be effective to suppress updating error noise using the Kalman filter. In particular, the proposed method can reduce the negative effects of updating error noise even if it is of high power (e.g., 50 dB). The effectiveness of the proposed algorithm over the existing algorithm will be verified by simulation results. vi TABLE OF CONTENTS Chapter 1. Page INTRODUCTION ...............................................................................................................1 1.1 1.2 1.3 1.4 Motivation and Objective .......................................................................................1 Literature Survey .....................................................................................................2 Main Idea behind Thesis ..........................................................................................2 Summary of Thesis ..................................................................................................3 2. SIGNAL MODEL................................................................................................................4 3. EXISTING FREQUENCY SYNCHRONIZATION ALGORITHM ..................................8 3.1 4. PROPOSED KALMAN FILTER FREQUENCY SYNCHRONIZATION ALGORITHM…..................................................................................................................8 4.1 4.2 4.3 5. Existing System Model and Its Block Diagram .....................................................10 System Model with Noise and Its Block Diagram.................................................11 Kalman Filter Implementation for Existing System Model ...................................12 SIMULATION RESULTS ................................................................................................17 5.1 5.2 5.3 5.4 5.5 5.6 6. Synchronization Algorithm ......................................................................................8 Convergence Rate of Frequency Vector for 4-Four Nodes .................................18 Convergence Rate of Frequency Vector for 4-Four Nodes at Varying Distances 19 Effect of Noise in Frequency Vector ....................................................................19 Standard Deviation of Frequency Vector ..............................................................20 Standard Deviation of Frequency Vector with Noise ...........................................20 Estimated Frequency Vector of Convergence .....................................................21 5.7 Standard Deviation of Estimated Frequency Vector 22 CONCLUSION ..................................................................................................................23 LIST OF REFERENCES ...............................................................................................................24 APPENDIX……………………………………………………………………………………… 26 vii LIST OF TABLES Table 1. Page Kalman Filter Algorithm 16 viii LIST OF FIGURES Figure Page [ ] of the k-th node at n-th time slot...................................4 1. Sketch of frequency vector 2. Transmitting section in distributed network…...…………………………………………5 3 Rectangular pulse .................................................................................................................6 4. Raised cosine pulse. .............................................................................................................6 5. Received section in distributed network ..............................................................................7 6. Block diagram of existing system model ...........................................................................11 7. Simplified block diagram of existing model. .....................................................................11 8. Block diagram of system model with noise .......................................................................12 9. Kalman filter block diagram to existing model. ...............................................................15 10. Kalman filter time and measurement cycle……………………………………………...16 11. Simple network topology ...................................................................................................17 12. Convergence rate of frequency vector for 4-four nodes ....................................................18 13. Convergence rate of frequency vector for 4-four nodes at varying distance .....................19 14. Convergence rate of frequency vectors versus n with measurement noise of 50 dB ........19 15. Standard deviation of frequency vectors............................................................................20 16. Standard deviation of frequency vector with measurement noise .....................................21 17. Convergence of frequency vector with implementation of Kalman filter .........................21 18. Estimated frequency vector standard deviation with implementation of Kalman filter ....22 ix LIST OF ABBREVIATIONS DFLLs Distributed Frequency Locked Loops FFL Frequency Locked Loops Gbps Giga bits per Second KF Kalman Filter MIMO Multiple-Input Multiple-Output MISO Multiple-Input Single-Output RC Raised Cosine SNR Signal-to-Noise Ratio x CHAPTER 1 INTRODUCTION 1.1 Motivation and Objective A future wireless communication network (5th Generation Technology) is envisioned to achieve a data rate in thousands of gigabits per second (Gbps), which is about 1,000 times more than current systems [1]. Many candidates are being proposed for future wireless networks. A few of the potential candidates for next generation networks are massive multiple-input multipleoutput (MIMO) systems [2-5], interference alignment [6-8], network coding, lattice coding [911], two way relay network, and polar codes. All most of all these candidates assume to be perfectly synchronized. But when there is synchronization error in the network, the performance will be degraded. This thesis deals with the application of the Kalman filter (KF) in a wireless sensor network to reduce noise in its frequency synchronization. The introduction of noise in the received signal can affect convergence rate as well as standard deviation. To counter this issue linear quadratic filters are used, one of which is the Kalman filter. 1.2 Literature Survey Distributed network synchronization is a widely investigated topic in the area of wired geographic networks but not wireless networks. A typical assumption is that all transmitting signals are synchronous so as to enable simple signal modeling and receiver structures. However synchronization error can cause performance degradation when employing MIMO or space time Coding, thus a new design is recommended for effective synchronization. Network synchronization is based on the exchange of baseband waveforms. For frequency synchronization, the carrier is synchronized in a packet-based cooperative communication 1 system. Each node controls the frequency of the local oscillator by its frequency locked loops (FLLs). Distributed frequency locked loops (DFLLs) achieve frequency synchronization for a large number of nodes without the need of an external master clock. DFLLs are capable of measuring from the superposition of transmitted packets. Each node at a detector output causes the network link quality and convergence property depending on network connectivity. This thesis uses the synchronization technique of several researchers [12-17]. Also used is the consensus algorithm [18], a powerful tool for global synchronization in a distributed network. 1.3 Main Idea behind Thesis To overcome one of the main issues in distributed wireless networks, which is the frequency synchronization among the nodes present in network, the algorithm in the work of Varanese et al. [12, 15] was examined using a simulation of the algorithm in a noisy environment. As result, it was observed that the algorithm completely failed. The purpose of this thesis is to propose a new scheme that uses the Kalman filter to reduce noise effects on the distributed wireless network frequency synchronization process. 1.4 Main Contribution of Thesis This thesis does the following: Revises the algorithm in the work of Varanese et al. [12, 15] and proposes a new distributed network frequency synchronization algorithm to eliminate noise using the Kalman filter. Compares the proposed algorithm with the Varanese et al. algorithm [12, 15] to show the effectiveness of the proposed algorithm. 2 1.5 Summary of Thesis This thesis is organized as follows: Chapter 2 deals with the signal model and data transmission within the nodes. Chapter 3 describes the frequency synchronization algorithm given by Varanese et al. algorithm [12, 15]. Chapter 4 describes the proposed algorithm. Chapter 5 provides simulation results to evaluate the effectiveness of the proposed algorithm. Finally the thesis is concluded in Chapter 6. 3 CHAPTER 2 SIGNAL MODEL Consider a wireless sensor network composed of K nodes, where the k-th node local frequency is . Assume that each node shares a common time, which divides the time axis into time slots, or observation intervals of duration seconds. A sketch of the frequency vector of the k-th node during n-time slots is shown in Figure 1, where during the first time slot, the k-th node transmit’s the carrier frequency a [0] and, similarly, the n-th time slot as [ ]. Figure1. Sketch of frequency vector [ ] of k-th node at n-th time slot. The k-th node at the n-th time slot transmits the band-limited signal modulated by a sinusoid at the current local carrier frequency [ ]. The modulated signal contains the information regarding the frequency of node k. Assume that each node acts both a transmitter and receiver simultaneously, i.e., full duplex capabilities. For this reason, the transmitting node transmits the frequency information to all the remaining nodes in the network, while other nodes receive the frequency information from all nodes. Figure 2 shows the data transmission in a distributed network. For illustration purposes, consider the k-th node as a transmitting node and the remaining nodes as receiving nodes. 4 Transmitting node 3 Transmitting node 4 Transmitting node 2 Transmitting node 1 Receiving node k Transmitting node 5 Transmitting node (k-1) Figure 2. Transmitting Section in distributed network. The transmitted signal of k-th node during n-th time slot is modeled as = ∑"# ! ; where − [ ] − [ ] Ф [ ] is the Nyquist pulse with pulse width of 1/2Ts, where Ts is the pulse period, (1) [ ] is [ ] andФ [n] are due to the residual frame the time delay, andФ [n] is the phase. The asynchronism and switching delays. The T0 is the observation window and L=T0/Ts is the number of samples per . The Nyquist pulse g(t) may be a rectangular as shown in Figure 3. Nyquist pulses are used for waveform shaping. A sinc or a raise cosine, as shown in Figure 4, satisfies the condition for no inter symbol interference. 5 Figure 3: Rectangular pulse. The rectangular filter is written a = $−1, 0, − τ 2 < < τ 2 ) *ℎ , - The raised cosine filter with parameter α is written as =. 34 5 34 5 /012 6 7. :34 6 5 ;:4 ; 5 89/2 ! 7 (2a) where T is the symbol-period. 1 alpha=0 alpha=0.5 alpha=1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -10 -8 -6 -4 -2 0 2 4 6 Figure 4.Raised CosinePulse. 6 8 10 In the distributed network, every node acts as a transmitter as well as a receiver. For illustration purpose, assume the k-th node as a receiving node and the remaining nodes as transmitting nodes, as shown in Figure 5. The received signal at the k-th node is down converted to a baseband signal through local frequency reference , , filtered by the matched filter. As a result the received signal after demodulation is < where ℎ ,> = Dℎ ,> D E ,? ; = ∑>C |ℎ ,> [ ]| ?[ ] [ ] "@A ∅ ,? [ ] . (3) is the channel coefficient between the k-th and i-th nodes. The energy of a channel is inversely proportional to the geometric distance between the two nodes according to the power law|ℎ ,> | = F G ,> , where α is the path loss component. The overall phase between the i-th and k-th nodes is ∅ ,> , which is uniformly distributed between [-π, π]. Receiving node 1 Receiving node 1 Receiving node k-1 Receiving node 4 Transmitti ng node k Receiving node 2 Receiving node 3 Figure 5. Received section in distributed network. 7 CHAPTER 3 EXISTING SYSTEM MODEL 3.1 Synchronization Algorithm Consider a distributed network composed of k-nodes. Here the node may be sensor or base station or mobile station. The network reaches frequency synchronization if all nodes converge to the same common frequency . Let > ! ∗ = ∗ = I ∗ = J ∗ …= (4) . [ ]be the difference between carrier frequency at the i-th and k-th nodes, where , is the local carrier frequency reference, i.e., > [ ] = >[ ] − , . (5) It is assumed that the geometric connectivity model is where a link between node i and node k exists, and that the corresponding weight is MN, O . The convergence rate of the frequency vector depends on the link connectivity between nodes. As the link distance between nodes increases the connectivity between them decreases which leads to slow convergence at the common frequency. As the distance between them decreases, the link power between them increases which leads to strong connectivity. Each node calculates the weighted sum of frequency offsets due to superposition of all frequencies from the remaining nodes. The error frequency offsets is calculated as ēQ [ ] = ∑?T R ,> ? [ ] ∑?T R ,? S[ ] . The channel between a pair of nodes is modeled as having time-invariant scalar gain ℎ |ℎ ,> | U ,? [ ] (6) ,> = and V ,> [ ]is the channel phase between the k-th and i-th nodes. The energy of the channel is inversely proportional to the distance between the nodes. The |hk,i|2 is proportional 8 to F G ,> , where α is the path loss component. Generally, the path loss component varies from 2 to 4. It is assumed that each node updates the local frequency using errorē [ ] as where [ + 1] = [ ] + Xē [ ]. (7) [ ] is the k-th node local frequency in the n-th time slot and ϵ is the step size. For the directed graph to strongly connect, the step size has to be in the range of (0, 1). The error ē [ ] for the sampling interval Ts and L odd becomes ē [ ]= _`a ; \ ] Z YZ[∑bcd @A ; ^\ ∗ ] Z ! @A ; ^ \ J _`a ; |\ @A ∑bcd Z@A ; ] Z ! @A ; ^| \ ∗ ] Z ! @A ; ^e . (8) The standard deviation of the frequency vector for the k different values from k=1 to 4 is calculated by E gξ [n]i = j1/4E[∑JQ#! Q [n] 9 − 1/4 ∑JQ#! Q [n] ]. (9) CHAPTER 4 PROPOSED KALMAN FILTER FREQUENCY SYNCHRONIZATION ALGORITHM 4.1 Existing System Model The k-th node can update the local frequency using error ē [ ] as [ + 1] = [ ] + Xē [ ]. This equation represents the first order discrete time where (10) [ ]the k-th node local frequency is and ϵ is the step size. This equation represents the update rule shown in equation (7). Let m [ ] be the required frequency output:-. m[ ]= [ ]. (11) Equations (10) and (11) can be modeled using control system concepts. By comparing the above these equations with the generalized state equation and output equation, the state equation can be written as +1 =n and the ouput equation can be written as < =q + op , (12) + rp . (13) Comparing equations (10) and (11) with the generalized state equation, the state variable the frequency vector [ ], control input p is is the frequency offset error vector ē[ ] , the state coefficient matrix A=1, and the ouput coefficient matrix B=ϵ (step size). Figure 6 shows a block diagram representation of the state and output equations of the system model in equations (10) to (13). 10 Figure 6. Block diagram of existing system model. The simplified block diagram for the state equation and output equation is shown in Figure 7. INTEGRATOR + + Figure 7. Simplified block diagram of existing model. 4.2 System Model with Noise Due to the high switching speed from one time slot to another time slot, noise, which is a random Gassuian in nature, will be genarated due to the instablity of the clock, As a result, the frequency for the next time slot can change. Due to noise, slow convergence or divergence of the frequency vector can occur, thus making the sytem synchronise very slowly. Fortunately, noise can be reduced using a linear quadratic filter. One of these filters is the Kalman filter, its main advantage is being that it can act as an observer that can estimate frequency. Due to the robust 11 nature, it can function well, even in high noise. The modified state and output equations including noise can be written as [ + 1] = m[ ] = [ ] + ē [ ] + * [ ]+s (14) (15) where wk and vk are the state noise and measurement noise respectively, which are independent and normal Gaussian. Figure 8 shows a block diagram of the system model with noise. Updating error noise (Measurement noise) INTEGRATOR + + Figure 8. Block diagram of system model with noise. 4.3 Kalman Filter Application to Existing System Model This section deals with application of the Kalman filter for the existing system model in the work of Varnese et al. [12, 15]. The KF is a very powerful tool that can be used to estimate prior, current and forthcoming states. The KF acts as an observer that can estimate the state that is governed by a linear stochastic differential equation such as ! =n 12 + op + * . (16) and the measurement equation is given by < # t +s . (17) where wk and vk are independent normal Gaussians with zero mean and variance as Q, R, respectively: u * ~w 0, x u s (18) ~w 0, y . (19) A priori and a posteriori estimate error for the standard state equation are defined as = where z −z = (20) −z . is the a priori state estimate and z is the a posteriori state estimate. The a priori error covariance matrix is given by auto correlation of u = {[ @ u = {[ @ as ] The posteriori error covariance matrix is given by autocorrelation of ]. (21) (22) as (23) The Kalman filter algorithm consists of two equations: • Time Update Equation • Measurement Update Equation. The time update equation shift forwards the current state and error covariance estimates to obtain the a priori estimates for the next time step. The measurement update equation is responsible for 13 feedback, i.e., incorporating a new measurement into the a priori estimate to refine the a posteriori estimate. The time update equation for the KF is given by z ! = n z + op u = nu @ !n (24) + x. (25) The measurement update for the KF is given by | = u t @ tu t @ + y ! z = z + } < − tz u = ~−} t u . (26) (27) (28) The system model of the proposed algorithm with the updating noise is given by [ + 1] = [ ]+ē [ ] m [ ] = t [ ] + s [ ]. (29) (30) By comparing equations (16) and (17) with equations (29) and (30), respectively, said that state matrix A=1, output matrix B=1, measurement matrix H=1 and wk =0 because it is a scalar system. The input p[ ] is fed to both the state and the observer. The observer estimates the frequency vector • [ ] based on the actual frequency vector [ ] and the Kalman gain G. The Kalman gain G depends on the a priori estimate covariance u equation (25) and measurement noise R. The a priori estimate covariance is updated with Kalman gain G for the next time slot. This cycle is recursive in nature. Figure 9 shows a block diagram of the Kalman filter with the existing distributed frequency synchronization model. The first two moments of state are given 14 as equations (31) and (32), where equation (31) represents first moment or mean of • [ ], and equation (32) and (33) represents second moment of u[ ] = {[ u [ ] = {[ {€ [ ]• = • [ ] [ ]− • [ ] [ ]− • [ ] [ ]or variance. [ ] − • [ ] @] [ ] − • [ ] @] . + + + + Figure 9. Kalman filter block diagram for exisiting system model. 15 [ ]O. ., (31) (32) (33) The Kalman filter algorithm is summarized in Table 1: TABLE 1 KALMAN FILTER ALGORITHM Time Update 1. Project the state ahead [ ]:- • [ + 1] = • [ ] + Xē [ ] 2. Project the error covariance ahead u [ + 1] 1. Compute the Kalman filter gain| : u [ + 1] = u[ ] + x forx = 0 u [ + 1] = u[ ] Measurement Update |[ ] = u[ ] u [ ] + y R=10 …> †/! ! since A =1 and Update the estimate with measurement y[n] 2. • [ ] = • [ ] + |[ ]]m [ ] − • [ ]^ u[ ] = 1 − |[ ] u [ ] Figure 10 shows the Kalman filter time and measurement cycle, which indicating the recursive nature between the time update and the measurement update. Time Update Measurement update Figure 10. Kalman filter time and measurement cycle. 16 CHAPTER 5 SIMULATION RESULTS In order to demonstrate the efficiency of the proposed algorithm, it is simulated using the Matlab, and the results are presented for the network topology shown in Figure 11. Consider a simple topology composed of two clusters, which are connected to each other with distance D and each cluster contains two nodes connected by distance d. The channel between nodes is modeled asℎ ,> =F G ,> , where α is the path loss component andF ,> is the distance between the k-th node and the i-th node. The Figure 11 shows that four nodes are connected in the rectangular topology. 1 3 2 4 d D Figure 11. Simple network topology. The simulation environment is as follows: • Each node initial frequency f[0]=f0+[0.15 0.05 -0.05 -0.15]T , respectively • Path loss component: α = 1.5 • Window size: L = 3 • D/d = 1.2 • • Step size ϵ = 0.15 Measurement noise: R = 50 dB 17 5.1 Convergence Rate of Frequency Vector for 4 Four Nodes Figure 12 shows the convergence rate of the frequency vectors for the simple rectangular network topology previously shown in Figure 11, with initial frequency vector f[0]=f0+[0.15 0.05 -0.05 -0.15]T , respectively. It can be seen that all the four nodes converge to a common = 0. This was simulated this by considering the zero updating error noise i.e., in an frequency noiseless environment. 0.15 f1 f2 f3 f4 0.1 0.05 0 -0.05 -0.1 -0.15 -0.2 0 50 100 150 200 250 300 350 400 Figure 12. Convergence rate of frequency vector for 4-four nodes. 5.2 Convergence Rate of Frequency Vector for 4 Nodes at Varying Distances Figure 13 shows the convergence rate of frequency vectors for the simple topology shown in Figure 11, with initial frequency vector f[0]=f0+[0.15 0.05 -0.05 -0.15]T and D/d=n varies as n. From Figure13, It can be seen that the frequencies of all four nodes diverges as the distance among nodes increases. r[ ] = r[ ] + 0.1 F[ ] = F[ ] + 0.1. 18 1.25 1.2 f1 1.15 f2 f3 f4 1.1 1.05 1 0.95 0.9 0.85 0.8 0 10 20 30 40 50 60 70 80 90 100 Figure 13. Convergence rate of frequency vector for 4 nodes with time varying distance. 5.3 Effect of Noise in Frequency Vector Figure 14 shows that the frequency vector does not converge under an updating error noise environment where the updating error noise is assumed to be R= 50 dB. 8000 f1 f2 f3 f4 6000 4000 2000 0 -2000 -4000 -6000 -8000 0 50 100 150 200 250 300 350 400 Figure 14. Convergence rate of frequency vectors verses n with measurement noise of 50 dB. 19 5.4 Standard Deviation of Frequency Vector Figure 15 shows that the standard deviation of the frequency vector for the ideal case which is in noiseless environment i.e., without updating the error noise. The standard deviation decreases and approaches zero as the number of time slots increases and remains constant after some time slots. x 104 2 1 0 0 50 100 150 200 250 300 350 400 Figure 15. Standard deviation of frequency vector. 5.5 Standard Deviation of Frequency Vector with Noise Measurement Noise=50 dB Figure 16 show that the standard deviation of the frequency vector does not converge due to the presence of the updating error noise. It can be seen that the standard deviation of the frequency vector increases as the time slot increases, which is not required for synchronization. 20 20 18 16 14 12 10 8 6 4 2 0 0 50 100 150 200 250 300 350 400 Figure 16. Standard deviation of frequency vector with measurement noise. 5.6 Estimated Frequency Vector Convergence Figure 17 shows that, applying the Kalman filter to the existing model all the nodes in the distributed wireless sensor network converge to a common frequency. 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 -0.2 0 50 100 150 200 250 300 350 400 Figure 17. Convergence of frequency vector with implementation of Kalman filter. 21 5.7 Estimated Frequency Vector Mean Deviation Figure 18 shows that the standard deviation of the frequency vector due to updating the error noise decreases as the time slots increases with application of the Kalman filter. It can also be seen that the standard deviation of the estimated frequency vector approaches zero and remains constant. 0.9988 -0.999 0.9992 0.9994 0.9996 0.9998 -1 0 50 100 150 200 250 300 350 400 Figure 18. Standard deviation of frequency vector with implementation of Kalman filter. 22 CHAPTER 6 CONCLUSION This thesis presented a Kalman filter application for the distributed wireless sensor network frequency synchronization, and provided simulation results for a rectangular network topology as an example. This approach provides acceptable performance for different measurement noise. For programming convenience, only a four-node scenario was considered, but this could be extended easily to a scenario with a greater number of nodes. Furthermore this approach of synchronization is stable for different types of network topologies and can be used under different measurement noise environment. It was observed that the proposed frequency synchronization scheme with the Kalman filter works effectively even under time varying node topology and not negligible measurement noise environments, where as the existing method completely fails. 23 REFERENCES 24 LIST OF REFERENCES [1] Fumiyuki Adachi, Kazuki Takeda, Tetsuya Yamamoto, Ryusuke Matsukawa, and Shinya Kumagai, “Recent Advances in Single-Carrier Distributed Antenna Network,” Special Issue Paper, published November 3, 2011, in Wiley Online Library (wileyonlinelibrary.com), DOI: 10.1002/wcm.1212. [2] F. Rusek, D. Persson, B. K. Lau, E. G. Larsson, T. L. Marzetta, O. Edfors, and F. Tufvesson, “Scaling up MIMO: Opportunities and Challenges with Large Arrays,” arXiv:1201.3210, 2011. [3] H. Q. Ngo, E. G. Larsson, and T. Marzetta, “Energy and Spectral Efficiency of Very Large Multiuser MIMO Systems,” arXiv:1112.3810, 2011. [4] S. K. Mohammed and E. G. Larsson, “Per-Antenna Constant Envelope Precoding for Large Multi-User MIMO Systems,” arXiv:1201.1634v1, 2011. [5] C. Studer and E. G. Larsson, “PAR-Aware Large-Scale Multi-User MIMO-OFDM Downlink,” arXiv:1202.4034, 2012. [6] Viveck R. Cadambe and Syed Ali Jafar, “Interference Alignment and Degrees of Freedom of the K-User Interference Channel,” IEEE Transactions on Information Theory, vol. 54, no. 8, pp. 3425–3441, August 2008. [7] Abinesh Ramakrishnan, Abhik Das, Hamed Maleki, Athina Markopoulou, Syed Jafar, and Sriram Vishwanath, “Network Coding for Three Unicast Sessions: Interference Alignment Approaches,” Forty-Eighth Annual Allerton Conference, Allerton House, UIUC, Illinois, USA, September 29– October 1, 2010. [8] Krishna Gomadam, Viveck R. Cadambe, and Syed A. Jafar, “A Distributed Numerical Approach to Interference Alignment and Applications to Wireless Interference Networks,” IEEE Transactions on Information Theory, vol. 57, no. 6, pp. 3309–3322, June 2011. [9] Uri Erez and Ram Zamir, “Achieving 1/2log(1 + SNR) on the AWGN Channel with Lattice Encoding and Decoding,” IEEE Transactions on Information Theory, vol. 50, no. 10, pp. 2293–2313, October 2004. [10] Ram Zamir, Shlomo Shamai (Shitz), and Uri Erez, “Nested Linear/Lattice Codes for Structured Multiterminal Binning,” IEEE Transactions on Information Theory, vol. 48, no. 6, pp. 1250–1276, June 2002. [11] Uri Erez, Shlomo Shamai (Shitz), and Ram Zamir, “Capacity and Lattice Strategies for Canceling Known Interference,” IEEE Transactions on Information Theory, vol. 51, no. 11, pp. 3820–3833, November 2005. 25 List of References (continued) [12] N. Varanese, U. Spagnolini, and Y. Bar-Ness, “Distributed Frequency-Locked Loops for Wireless Networks”. IEEE Transactions on Communication, vol.59, no.12, pp.34403451, December 2011. [13] O. Simeone and U. Spagnolini, “Distributed Time Synchronization in Wireless Sensor Networks with Coupled Discrete-Time Oscillators,” EURASIP Journal on Wireless Communications and Networking, vol. 2007, article ID 57054, 13 pages, DOI:10.1155/2007/57054. [14] F. Sivrikaya and B. Yener, “Time Synchronization in Sensor Networks: A Survey,” IEEE Network, vol. 18, no. 4, pp. 45–50, 2004. [15] N. Varanese, O. Simeone, U. Spagnolini, and Y. Bar-Ness, “Distributed Frequency Locked Loops for Wireless Networks”. Proceedings of IEEE 10th International Symposium on Spread Spectrum Technique and Applications, (ISSSTA 2008), Bologna Italy, pp.400-404, August 25-28, 2008. [16] William C. Lindsey, Farzad Ghazvinian, Walter C. Hagmann, and Khaled Dessouky, “Network Synchronization,” Proceedings of the IEEE, vol. 73, no. 10, pp. 1445–1467, October 1985. [17] O. Simeone and U. Spagnolini, “Distributed Time Synchronization in Wireless Sensor Networks with Coupled Discrete-Time Oscillators,” EURASIP Journal on Wireless Communications and Networking, vol. 2007, article ID 57054, 13 pages, DOI:10.1155/2007/57054. [18] Guanghui Wen, Zhongkui Li, Zhisheng Duan, and Guanrong Chen, “Distributed Consensus Control for Linear Multi-Agent Systems with Discontinuous Observations,” International Journal of Control, vol. 86, no. 1, pp. 95–106, January 2013. 26 APPENDIX 27 APPENDIX MATLAB CODE clc; clear all; %Sampling period Ts=1; fs=1/Ts; %Number of Nodes K=4; %cluster 1 v1={1,2}; %cluster 2 v2={3,4}; %nominal frequency f0 is L f0=0; %initial frequency of each clock f(1:1:4,1) =f0+[0.15 0.05 -0.05 -0.15]'*(1/Ts); %step Size st=0.15; %relative distance relativedis=1.2; %assuming distance between clusters and its own node D=1.2; d=1; D_d=sqrt(D^2+d^2); %Calculating hk,i %at node1 h12=d^(-3/2); h13=D^(-3/2); h14=D_d^(-3/2); %at node2 h21=d^(-3/2); h23=D_d^(-3/2); h24=D^(-3/2); %at node3 h31=D^(-3/2); h32=D_d^(-3/2); h34=d^(-3/2); %at node4 h41=D_d^(-3/2); h42=D^(-3/2); h43=d^(-3/2); %noise parameters vk Q = 0; noise=10; R = 10^(noise/10); N=400; for L=3; for n=1:1:N %initialising error e1(n)=0; e2(n)=0; e3(n)=0; 28 APPENDIX (Continued) e4(n)=0; e_1(n)=0; e_2(n)=0; e_3(n)=0; e_4(n)=0; % calculating received signal m1=0:1:(L-3)/2 ; M=zeros(1,size(m1,2)); m=1:1:size(M,2); l1=0:1:L; l2=zeros(1,size(l1,2)); l=1:1:size(l2,2); for l=1:1:size(l2,2); y1(l1(l)+1,n)=abs(h12)*exp(1i*2*pi*(f(2,n)f(1,n))*l1(l)*Ts)+abs(h13)*exp(1i*2*pi*(f(3,n)f(1,n))*l1(l)*Ts)+abs(h14)*exp(1i*2*pi*(f(4,n)-f(1,n))*l1(l)*Ts); y2(l1(l)+1,n)=abs(h21)*exp(1i*2*pi*(f(1,n)f(2,n))*l1(l)*Ts)+abs(h23)*exp(1i*2*pi*(f(3,n)f(2,n))*l1(l)*Ts)+abs(h24)*exp(1i*2*pi*(f(4,n)-f(2,n))*l1(l)*Ts); y3(l1(l)+1,n)=abs(h31)*exp(1i*2*pi*(f(1,n)f(3,n))*l1(l)*Ts)+abs(h32)*exp(1i*2*pi*(f(2,n)f(3,n))*l1(l)*Ts)+abs(h34)*exp(1i*2*pi*(f(4,n)-f(3,n))*l1(l)*Ts); y4(l1(l)+1,n)=abs(h41)*exp(1i*2*pi*(f(1,n)f(4,n))*l1(l)*Ts)+abs(h42)*exp(1i*2*pi*(f(2,n)f(4,n))*l1(l)*Ts)+abs(h43)*exp(1i*2*pi*(f(3,n)-f(4,n))*l1(l)*Ts); end for m=1:1:size(M,2) e1(n)=e1(n)+imag(y1((2*m1(m)+3)*Ts,n).*conj(y1((2*m1(m)+2)*Ts,n))y1((2*m1(m)+1)*Ts,n).*conj(y1((2*m1(m)+2)*Ts,n)))/(2*pi); e2(n)=e2(n)+imag(y2((2*m1(m)+3)*Ts,n).*conj(y2((2*m1(m)+2)*Ts,n))y2((2*m1(m)+1)*Ts,n).*conj(y2((2*m1(m)+2)*Ts,n)))/(2*pi); e3(n)=e3(n)+imag(y3((2*m1(m)+3)*Ts,n).*conj(y3((2*m1(m)+2)*Ts,n))y3((2*m1(m)+1)*Ts,n).*conj(y3((2*m1(m)+2)*Ts,n)))/(2*pi); e4(n)=e4(n)+imag(y4((2*m1(m)+3)*Ts,n).*conj(y4((2*m1(m)+2)*Ts,n))y4((2*m1(m)+1)*Ts,n).*conj(y4((2*m1(m)+2)*Ts,n)))/(2*pi); e_1(n)=e_1(n)+2*Ts*abs(y1(2*m1(m)+2,n))^2; e_2(n)=e_2(n)+2*Ts*abs(y2(2*m1(m)+2,n))^2; e_3(n)=e_3(n)+2*Ts*abs(y3(2*m1(m)+2,n))^2; e_4(n)=e_4(n)+2*Ts*abs(y4(2*m1(m)+2,n))^2; e_11(n)=e1(n)/e_1(n); e_22(n)=e2(n)/e_2(n); e_33(n)=e3(n)/e_3(n); e_44(n)=e4(n)/e_4(n); end f(1,n+1)=f(1,n)+st*e_11(n); f(2,n+1)=f(2,n)+st*e_22(n); f(3,n+1)=f(3,n)+st*e_33(n); 29 APPENDIX (Continued) f(4,n+1)=f(4,n)+st*e_44(n); end for n=1:1:N lamda(n)=1/4*(f(1,n)+f(2,n)+f(3,n)+f(4,n)); Dev(n)=sqrt(1/4*((f(1,n)-lamda(n))^2+(f(2,n)-lamda(n))^2+(f(3,n)lamda(n))^2+(f(4,n)-lamda(n))^2)); std_dev(l,n) = Dev(n); end end for n = 1:1:N std_dev_vec(n) = sum(std_dev(:,n))/N; end figure % subplot(6,1,1) plot(1:1:N,std_dev_vec); hold on figure % subplot(6,1,2) plot((1:1:N),f(1,1:1:N),(1:1:N),f(2,1:1:N),(1:1:N),f(3,1:1:N),(1:1:N),f(4,1:1 :N)) hold on for L=3; for n=1:1:N %initialising e1(n)=0; e2(n)=0; e3(n)=0; e4(n)=0; e_1(n)=0; e_2(n)=0; e_3(n)=0; e_4(n)=0; error % calculating received signal m1=0:1:(L-3)/2 ; M=zeros(1,size(m1,2)); m=1:1:size(M,2); l1=0:1:L; l2=zeros(1,size(l1,2)); l=1:1:size(l2,2); for l=1:1:size(l2,2); y1(l1(l)+1,n)=abs(h12)*exp(1i*2*pi*(f(2,n)f(1,n))*l1(l)*Ts)+abs(h13)*exp(1i*2*pi*(f(3,n)f(1,n))*l1(l)*Ts)+abs(h14)*exp(1i*2*pi*(f(4,n)-f(1,n))*l1(l)*Ts); y2(l1(l)+1,n)=abs(h21)*exp(1i*2*pi*(f(1,n)f(2,n))*l1(l)*Ts)+abs(h23)*exp(1i*2*pi*(f(3,n)f(2,n))*l1(l)*Ts)+abs(h24)*exp(1i*2*pi*(f(4,n)-f(2,n))*l1(l)*Ts); 30 APPENDIX (Continued) y3(l1(l)+1,n)=abs(h31)*exp(1i*2*pi*(f(1,n)f(3,n))*l1(l)*Ts)+abs(h32)*exp(1i*2*pi*(f(2,n)f(3,n))*l1(l)*Ts)+abs(h34)*exp(1i*2*pi*(f(4,n)-f(3,n))*l1(l)*Ts); y4(l1(l)+1,n)=abs(h41)*exp(1i*2*pi*(f(1,n)f(4,n))*l1(l)*Ts)+abs(h42)*exp(1i*2*pi*(f(2,n)f(4,n))*l1(l)*Ts)+abs(h43)*exp(1i*2*pi*(f(3,n)-f(4,n))*l1(l)*Ts); end for m=1:1:size(M,2) e1(n)=e1(n)+imag(y1((2*m1(m)+3)*Ts,n).*conj(y1((2*m1(m)+2)*Ts,n))y1((2*m1(m)+1)*Ts,n).*conj(y1((2*m1(m)+2)*Ts,n)))/(2*pi); e2(n)=e2(n)+imag(y2((2*m1(m)+3)*Ts,n).*conj(y2((2*m1(m)+2)*Ts,n))y2((2*m1(m)+1)*Ts,n).*conj(y2((2*m1(m)+2)*Ts,n)))/(2*pi); e3(n)=e3(n)+imag(y3((2*m1(m)+3)*Ts,n).*conj(y3((2*m1(m)+2)*Ts,n))y3((2*m1(m)+1)*Ts,n).*conj(y3((2*m1(m)+2)*Ts,n)))/(2*pi); e4(n)=e4(n)+imag(y4((2*m1(m)+3)*Ts,n).*conj(y4((2*m1(m)+2)*Ts,n))y4((2*m1(m)+1)*Ts,n).*conj(y4((2*m1(m)+2)*Ts,n)))/(2*pi); e_1(n)=e_1(n)+2*Ts*abs(y1(2*m1(m)+2,n))^2; e_2(n)=e_2(n)+2*Ts*abs(y2(2*m1(m)+2,n))^2; e_3(n)=e_3(n)+2*Ts*abs(y3(2*m1(m)+2,n))^2; e_4(n)=e_4(n)+2*Ts*abs(y4(2*m1(m)+2,n))^2; e_11(n)=e1(n)/e_1(n); e_22(n)=e2(n)/e_2(n); e_33(n)=e3(n)/e_3(n); e_44(n)=e4(n)/e_4(n); end f(1,n+1)=f(1,n)+st*e_11(n)+sqrt(R)*randn; f(2,n+1)=f(2,n)+st*e_22(n)+sqrt(R)*randn; f(3,n+1)=f(3,n)+st*e_33(n)+sqrt(R)*randn; f(4,n+1)=f(4,n)+st*e_44(n)+sqrt(R)*randn; end for n=1:1:N lamda(n)=1/4*(f(1,n)+f(2,n)+f(3,n)+f(4,n)); Dev1(n)=sqrt(1/4*((f(1,n)-lamda(n))^2+(f(2,n)-lamda(n))^2+(f(3,n)lamda(n))^2+(f(4,n)-lamda(n))^2)); std_dev_noisy(l,n)= Dev1(n); end end for n = 1:1:N std_dev_vec_noisy(n) = sum(std_dev_noisy(:,n))/N; end % subplot(6,1,3) figure plot(1:1:N,std_dev_vec_noisy); hold on % subplot(6,1,4) 31 APPENDIX (Continued) figure plot((1:1:N),f(1,1:1:N),(1:1:N),f(2,1:1:N),(1:1:N),f(3,1:1:N),(1:1:N),f(4,1:1 :N)) hold on % Applying Kalman Filter %INITIAL ESTIMATES OF X_HAT(1) AND P_MINUS(1) A = 1;B=1;H = 1; v = normrnd(0,R,[1,N]); f_hat(1,1) = 0.1; f_h*at(2,1) = 0.4; f_hat(3,1) = 0.6; f_hat(4,1) = 0.8; f_hat_minus(1,1) f_hat_minus(2,1) f_hat_minus(3,1) f_hat_minus(4,1) P1_minus(1) P2_minus(1) P3_minus(1) P4_minus(1) = = = = = = = = f(1,1); f(2,1); f(3,1); f(4,1); R; R; R; R; L1(1) = P1_minus(1)/(P1_minus(1)+ R); f_hat(1,1) = f_hat_minus(1,1) + L1(1)*(f(1,1)-f_hat_minus(1,1)); P1(1) = (1 - L1(1))*P1_minus(1); L2(1) = P2_minus(1)/(P2_minus(1)+ R); f_hat(2,1) = f_hat_minus(2,1) + L2(1)*(f(2,1)-f_hat_minus(2,1)); P2(1) = (1 - L2(1))*P2_minus(1); L3(1) = P3_minus(1)/(P3_minus(1)+ R); f_hat(3,1) = f_hat_minus(3,1) + L3(1)*(f(3,1)-f_hat_minus(3,1)); P3(1) = (1 - L3(1))*P3_minus(1); L4(1) = P3_minus(1)/(P3_minus(1)+ R); f_hat(4,1) = f_hat_minus(4,1) + L4(1)*(f(4,1)-f_hat_minus(4,1)); P4(1) = (1 - L4(1))*P4_minus(1); for L=3; for n= 1:1:N-1 %initialising error e1(n)=0; e2(n)=0; e3(n)=0; e4(n)=0; e_1(n)=0; e_2(n)=0; e_3(n)=0; 32 APPENDIX (Continued) e_4(n)=0; % calculating received signal m1=0:1:(L-3)/2 ; M=zeros(1,size(m1,2)); m=1:1:size(M,2); l1=0:1:L; l2=zeros(1,size(l1,2)); l=1:1:size(l2,2); for l=1:1:size(l2,2); y1(l1(l)+1,n)=abs(h12)*exp(1i*2*pi*(f(2,n)f(1,n))*l1(l)*Ts)+abs(h13)*exp(1i*2*pi*(f(3,n)f(1,n))*l1(l)*Ts)+abs(h14)*exp(1i*2*pi*(f(4,n)-f(1,n))*l1(l)*Ts); y2(l1(l)+1,n)=abs(h21)*exp(1i*2*pi*(f(1,n)f(2,n))*l1(l)*Ts)+abs(h23)*exp(1i*2*pi*(f(3,n)f(2,n))*l1(l)*Ts)+abs(h24)*exp(1i*2*pi*(f(4,n)-f(2,n))*l1(l)*Ts); y3(l1(l)+1,n)=abs(h31)*exp(1i*2*pi*(f(1,n)f(3,n))*l1(l)*Ts)+abs(h32)*exp(1i*2*pi*(f(2,n)f(3,n))*l1(l)*Ts)+abs(h34)*exp(1i*2*pi*(f(4,n)-f(3,n))*l1(l)*Ts); y4(l1(l)+1,n)=abs(h41)*exp(1i*2*pi*(f(1,n)f(4,n))*l1(l)*Ts)+abs(h42)*exp(1i*2*pi*(f(2,n)f(4,n))*l1(l)*Ts)+abs(h43)*exp(1i*2*pi*(f(3,n)-f(4,n))*l1(l)*Ts); for m=1:1:size(M,2) e1(n)=e1(n)+imag(y1((2*m1(m)+3)*Ts,n).*conj(y1((2*m1(m)+2)*Ts,n))y1((2*m1(m)+1)*Ts,n).*conj(y1((2*m1(m)+2)*Ts,n)))/(2*pi); e2(n)=e2(n)+imag(y2((2*m1(m)+3)*Ts,n).*conj(y2((2*m1(m)+2)*Ts,n))y2((2*m1(m)+1)*Ts,n).*conj(y2((2*m1(m)+2)*Ts,n)))/(2*pi); e3(n)=e3(n)+imag(y3((2*m1(m)+3)*Ts,n).*conj(y3((2*m1(m)+2)*Ts,n))y3((2*m1(m)+1)*Ts,n).*conj(y3((2*m1(m)+2)*Ts,n)))/(2*pi); e4(n)=e4(n)+imag(y4((2*m1(m)+3)*Ts,n).*conj(y4((2*m1(m)+2)*Ts,n))y4((2*m1(m)+1)*Ts,n).*conj(y4((2*m1(m)+2)*Ts,n)))/(2*pi); e_1(n)=e_1(n)+2*Ts*abs(y1(2*m1(m)+2,n))^2; e_2(n)=e_2(n)+2*Ts*abs(y2(2*m1(m)+2,n))^2; e_3(n)=e_3(n)+2*Ts*abs(y3(2*m1(m)+2,n))^2; e_4(n)=e_4(n)+2*Ts*abs(y4(2*m1(m)+2,n))^2; e_11(n)=e1(n)/e_1(n); e_22(n)=e2(n)/e_2(n); e_33(n)=e3(n)/e_3(n); e_44(n)=e4(n)/e_4(n); end f(1,n+1)=f(1,n)+st*e_11(n); f(2,n+1)=f(2,n)+st*e_22(n); f(3,n+1)=f(3,n)+st*e_33(n); f(4,n+1)=f(4,n)+st*e_44(n); f_hat_minus(1,n+1) f_hat_minus(2,n+1) f_hat_minus(3,n+1) f_hat_minus(4,n+1) = = = = f_hat(1,n) f_hat(2,n) f_hat(3,n) f_hat(4,n) + + + + st*e_11(n) st*e_22(n) st*e_33(n) st*e_44(n) 33 ; ; ; ; APPENDIX (Continued) P1_minus(n+1) =P1(n); L1(n+1) = P1(n)/(P1(n) + R); P2_minus(n+1) =P2(n); L2(n+1) = P2(n)/(P2(n) + R); P3_minus(n+1) = P3(n); L3(n+1) = P3(n)/(P3(n) + R); P4_minus(n+1) = P4(n); L4(n+1) = P4(n)/(P4(n) + R); f_hat(1,n+1) f_hat(2,n+1) f_hat(3,n+1) f_hat(4,n+1) = = = = f_hat_minus(1,n+1) f_hat_minus(2,n+1) f_hat_minus(3,n+1) f_hat_minus(4,n+1) P1(n+1) P2(n+1) P3(n+1) P4(n+1) - L1(n+1))*P1(n); L2(n+1))*P2(n); L3(n+1))*P3(n); L4(n+1))*P4(n); = = = = (1 (1 (1 (1 + + + + L1(n+1)*(f(1,n+1) L2(n+1)*(f(2,n+1) L3(n+1)*(f(3,n+1) L4(n+1)*(f(4,n+1) - f_hat_minus(1,n+1)); f_hat_minus(2,n+1)); f_hat_minus(3,n+1)); f_hat_minus(4,n+1)); f_hat(1,n+1)=(f_hat_minus(1,n+1)+f_hat(1,n+1))/4; f_hat(2,n+1)=(f_hat_minus(2,n+1)+f_hat(2,n+1))/4; f_hat(3,n+1)=(f_hat_minus(3,n+1)+f_hat(3,n+1))/4; f_hat(4,n+1)=(f_hat_minus(4,n+1)+f_hat(4,n+1))/4; E = 0.25*(f_hat(1,n) + f_hat(2,n) + f_hat(3,n) + f_hat(4,n)); zeta = sqrt(0.25*((f_hat(1,n) - E)^2 + (f_hat(2,n) - E)^2 + (f_hat(3,n) E)^2 + (f_hat(4,n) - E)^2)); std_dev_kalman(l,n) = zeta; end end end for n = 1:1:N-1 std_dev_vec_kalman(n) = sum(std_dev_kalman(:,n))/N-1; end figure % subplot(6,1,5) plot(1:1:N-1,std_dev_vec_kalman); hold on figure % subplot(6,1,6) plot((1:1:N-1),f_hat(1,1:1:N-1),(1:1:N-1),f_hat(2,1:1:N-1),(1:1:N1),f_hat(3,1:1:N-1),(1:1:N-1),f_hat(4,1:1:N-1)) hold on 34
© Copyright 2025 Paperzz