Predictive Algorithm for Duffing Demodulation System by Kalman Gain Zhang Yang, Rui Guo-sheng, Wang Lin and Sun Wen-jun Electronic Information Engineering Department of Naval Aeronautical and Astronautical University, Yantai,China Abstract—Generally, traditional identification algorithm of identification algorithm which is based on phase diagrams, the Duffing oscillator bases on the transitions of phase diagram, predictive algorithm with the Kalman gain can reduce at least which often needs a large number of cumulative inputs to 50% of the input samples. transform the system from chaos to the large-scale periodic state,which limits the applications of Duffing oscillator.A new II. THEORETICAL ANALYSIS algorithm based on Kalman gain is proposed in the paper to predict state transitions of the Duffing oscillator before the A. The state equations of Duffing system transitions in the phase diagram.By the establishment of Duffing Duffing oscillator is a useful chaotic system, whose state state equations and setting the control condition of measurement changes greatly when the system input changes slightly equations,Kalman gain of Extend Kalman Filter (EKF) which are used to estimate the Duffing system can effectively predict around its threshold. Especially Duffing oscillator is sensitive the state changes of the Duffing oscillator, experiments of to the periodic signal with the similar frequency and has demodulations of communication signals show that the predictive immunity to noise and other signals, so Duffing oscillator is algorithm can not only reduce at least 50% input points to often used to detect periodic weak-signals. identify the phase transitions of oscillator, but also the As a kind of the most important periodic signal, cosine demodulation accuracy is obviously improved. signal is set as the cycle driving motivation of Duffing system in the paper. Generally, Duffing equation can be expressed as Index Terms—Prediction, Kalman gain, Duffing oscillator, (1), Extend Kalman Filter 3 I. INTRODUCTION x +−+kx  ax bx =γ cos()ω t (1) S one of the most classic chaotic system,Duffing oscilla- Within (1), k denotes the coefficient, usually takes Ator is widely used in weak-signal detections and weak- k=0.5,-ax+bx3denotes the linear restoring term, usually takes signal communications by its sensitivity to the periodic signal a=b=1, ω denotes the of the signal; γ and immunity to the strong noise. denotes the amplitude of the cycle driving motivation. x is The traditional detection principle of weak signals by the derivative of x, and x is the second derivative of x. Duffing oscillator mainly bases on the phase diagram [1~3], If intermediate variables is introduced, yx=  , (1) can be when the diagram transforms from chaos to the large-scale periodic state, it’s tend to believe that the weak signal is transformed into (2), introduced. According to this principle,many identification ⎪⎧xy = methods are proposed in recent years,such as Lyapunov ⎨ (2)  3 Characteristic exponents method,Kolmogorov entropy method, ⎩⎪ yyxx=−0.5 + − +γ cos()ωt Dimension method[3~5],etc.These methods can achieve So, Duffing oscillator can be regarded as a two-dimensional, the quantitative identifications of signal,but identifications are . still restricted with the phase diagram,if the transitions of (2) can be written as the form of linear, as (3), diagram don’t take place,these methods fail. ⎡⎤xx ⎡⎤01⎡⎤ ⎡⎤0 In the paper, Duffing oscillator is regarded as a nonlinear =⋅+γ ⋅ (3) ⎢⎥ ⎢⎥2 ⎢⎥ ⎢⎥ dynamic system [6~7], whose equation of state is established by ⎣⎦yy ⎣⎦10.5−−x ⎣⎦ ⎣⎦cos()ωt Euler-maruyama (EM) algorithm [8].Meanwhile, by setting So, the Jacobian form of system can be written as (4), suitable measurement equations, EKF (Extended Kalman Fn=⎧ yn [9] ⎪ x ( ) ( ) Filter) algorithm is used for the recursive estimation of the ⎨ (4) Fn=−10 xn2 ⋅ xn −.5 ⋅ yn Duffing system.It is verified that the Kalman gain can achieve ⎩⎪ y ()() () () () the prediction of the Duffing oscillator system when the Duffing oscillator can be expressed as the following state control condition of the measurement equation is selected equation form with the Euler-maruyama (EM) equation, i.e.: appropriately. In other words, the Kalman gain of the system can predict the phase transition of Duffing Oscillator with the state equations of its system. Compared with the traditional ⎪⎧xn()()+=1 xn +⋅⋅ω h yn( ) + vn( ) ⎨ (5) yn+=−1 1 0.5 ⋅⋅⋅ωωh yn +⋅⋅ h⎡⎤ xn − x3 n +⋅⋅⋅ γω hcos h ⋅ω n ⎩⎪ ( ) ( ) ()⎣⎦ () () (())

978-1-4673-5225-3/14/$31.00 ©2014 IEEE

Here h is the simulation step, whose value should be selected '1− KkXX(1)(1)(1)(1+ =+ Pk kHk XX + S k +) (12) as small as possible to ensure a more accurate approximation Similarly KY can be got as (18), to the Duffing system model, and v(n) is set the Gaussian '1− white noise with zero mean and Q variance. KkYY(1)(1)(1)(1+ =+ Pk kHk YY + S k +) (13) 、 B. Selection of the nonlinear filter for Duffing system K X KY are the optimal gain matrix. Namely the trace ⎡ ⎤ EKF algorithm can linearize the nonlinear system by the tr⎣ PX ( k++11 k )⎦ is the smallest. state Jacobian.Compared with other nonlinear filtering algori- 3) State update and covariance update thms, it has a lower , so it’s facilitate for real-time Just as (19), (20), computing which is important for Duffing identifications. ˆˆ ⎪⎧X (1k++= k 1)(1) Xkk + + KzkXX [(1)(1) +− zkˆ X + k]

⎨ ˆˆ C. Filter process ⎩⎪Ykk(1++=+ 1)(1) YkkKzk +YY [(1)(1)] +− zkkˆ Y + State update (14) ⎧ ' 1) Step prediction of state ⎪PkXXX( ++=11 k) Pk( + 1 k) − KSkX() + 1 KX (15) Substitute Xkkˆ (),Ykkˆ()into Duffing system, get (6), ⎨ ' ⎩⎪PkYYY()++=11 k Pk() + 1 k − KSkY() + 1 KY ⎛⎞⎛Xkˆ (1)+ k Xkkˆ ()⎞ And then, the above steps are repeated until the cycle points ⎜⎟⎜= f ⎟ (6) ⎜⎟⎜Ykˆˆ(1)+ k Ykk ()⎟ of Duffing run out. ⎝⎠⎝⎠ The derivation of Kalman gain for prediction Also, get the Jacobians of the state by (3), as (7), Kalman gain reflect the relationship between the equation ⎧ ˆ of measurement and the equation of state, once Duffing ⎪FkX ()= Ykk() ⎨ (7) oscillator is regarded as a nonlinear filtering equation of state, Fk=−1()()0.5( XkkXkkˆ 2 ⋅ˆˆ − ⋅ Ykk) ⎩⎪ Y () () by setting an appropriate control condition of measurement 2) Step prediction of covariance equation, Kalman gain can effectively predict the state For the linearization errors of EKF estimation,the cova- transitions of Duffing oscillator according to the changes of riance of system can be written as: Kalman gain. The derivations of Kalman gain of the Duffing ' system can be got as follows: ⎪⎧PXXXX(1)kkFkPkkFkQ+= ()()()+ ⎨ (8) By (11),(12),(15),it can be obtained, P (1)()()()kkFkPkkFkQ+= ' + ⎩⎪ YYYY PkkKXX( ) =( kR)⋅ (16)

Within (8), Q is the covariance of the state noise. In (12), let HX (k+1) satisfies Measurement update HkX ( +=11) (17) 1) Measurement values and covariance The measurement values and covariances are got based on So, −1 the measurement equations (9), KkXX( +1(1)() =+⋅+ Pk kSk X1) (18) Zˆˆˆ(1)(1,(1),(1)khkXkkYkk+= +'' + + ) (9) By (7), (8), it can be obtained, 2 To simplify the calculation, the measurement equations PXX(1)kkYkPkkQ+ =() ()+ (19) are chosen as (10), And by (7), (8), (11), Sk(1)+ =+ YkPkkQR2 () () + (20) ⎧Xk( ) =+ Xk( ) Wk( ) XX ⎨ (10) By (16) ~ (20) and the control condition of measurement Y=X, ⎩Yk()=+ Yk () Wk () the recursive form of (12) can be expressed as (21), 2 Here W(k) is the measurement noise with zero mean and R X (kK)⋅⋅+X ( kRQ) KkX ()+=1 2 (21) covariance, and the control condition of the measurement X ()kK⋅⋅++X () kRQR equation is Y(k)=X(k).According to (10), the Jacobians of the To achieve the prediction of the system phase ,the cross- measurement are HX=HY=1. correlation between the Kalman gain of X direction and values So the measurement covariance can be got from (11), of Y direction needs to be taken in the recursions, then the new expression of gain for the prediction of Duffing system can be ⎧ ' ⎪SkXXXX(1)()(1)()+= HkPk + kHk + R got as (22), ⎨ (11) Sk(1)()(1)()+= HkPk + kHk' + R ⎡⎤2 ⎩⎪ YYYY Yk()⋅⋅⋅+⎣⎦ X () k Kk () R Q Kk()+=1 2 (22) Within (11), HX, HY are the Jacobians of the state, R is the X ()kKkRQR⋅⋅++ () covariance of the measurement noise. So, combining (5) with (22), the new system for the detection 2) Calculation of Kalman gain by Duffing system is achieved. Kalman gain of the Duffing system can be obtained by the relationship between the state covariance and the measurement covariance,

III. THE EXPERIMENT OF PREDICTION 2 2

1 1 A. The entironment of simulations

Y 0 0Y The Duffing oscillator is set as the identified system equation of state, whose inside cycle driving motivation is the -1 -1 cosine singnal of angular frequence ω. -2 X -2 X The frequency of samples is f=1000, the initial number of -2 -1 0 1 2 -2 -1 0 1 2 4 samples is 4 × 10 , the angular frequency is set ω=1.The (a) Inputs of 4×104 times (b) Inputs of 2×104 times critical periodic driving motivation of system is determined to Figure 4 Critical states of the different inputs be 0.8305 by experiments. The system noise of simulations V (k) and the measurement noise of simulations W (k) are set 2 Gaussian white noise of zero mean. The initial position of 1 system is set [X0, Y0] = [0, 0], and the initial Kalman gain is set K=0.5. K 0

B. The simulations of system states for identifications -1 0 0.5 1 1.5 2 2.5 4 If the driving motivation γ<0.83, Duffing oscillator lies in x 10 4 the chaotic state by inputs of 4×10 times as (a) of Figure Figure 5 The values of Kalman gain for prediction under critical state 2.But when the times for inputs are less than 4×104 times,it’s At last,when γ>0.83, system transforms from a chaotic state difficult to identify the transitions of state by phase diagrams. to a large-scale periodic state,just as shown in Figure 6 (a),and it’s also difficult to identify the system state from

2 2 figure 6 (b).

2 2 1 1

1 1 Y Y 0 0 Y 0 Y 0 -1 -1

-1 -1 -2 X -2 X -2 -1 0 1 2 -2 -1 0 1 2 -2 X -2 X (a) Inputs of 4×104 times (b) Inputs of 2×104 times -2 -1 0 1 2 -2 -1 0 1 2 Figure 2 Chaos states of the different inputs 4 4 4 (a) Inputs of 4×10 times (b) Inputs of 2×10 times As in (b) of Figure 2, with inputs of 2×10 times, Duffing Figure 6 Periodic states of the different inputs oscillator can’t really enter the chaotic state. The predictive The Kalman gain by inputs of 2×104 times show a new algorithm by Kalman gain provides a solution for identifi- character as in Figure 7.It’s obvious that the pulses whose cation.Figure 3 is the values of Kalman gain calculated by (22) absolute values are greater than 1 present in the data of 4 under inputs of 2×10 times,it is an undulating wave whose Kalman gain. absolute value is less than 1.

10 1 0

0.5 K -10 K -20 0 -30 0 0.5 1 1.5 2 2.5 -0.5 4 0 0.5 1 1.5 2 2.5 x 10 4 x 10 Figure 7 The values of Kalman gain for prediction under periodic state Figure 3 The values of Kalman gain for prediction under chaos state The recursive form of Kalman gain reflects the energy With the increase of γ,when γ=0.83,the system enters the accumulated in the system, from the simulations above, a critical state as (a) of Figure 4.Samely,it’s hard to identify the predictive algorithm by Kalman gain is offered, which focus system state by the phase diagram if the cycle times are less on the pulses present with the transitions of system 4 than 4×10 .Figure 4(b) is the corresponding phase diagram states.When a pulse whose absolute value is greater than 1 4 with inputs of 2×10 times. appears in the data of Kalman gain, it shows that the system Figure 5 shows the predictive feature of Kalman gain under state transforms from chaos to the large-scale periodic state. 4 inputs of 2×10 times,it can be seen that a pulse whose Experiments show that the predictive effect is good by no less absolute value around 1 appears from the wave,which than 2×104 times inputs, so it can effectively reduce 50% indicates the transition of the system state.

input points for identifications. detection of weak signal in power line and BPSK C. The simulations of demodulations for BPSK demodulations. Compared with the detection by the Lypunov Duffing system can be built for the demodulations of BPSK identification, predictive algorithm can detect weak signals signals at the receiving end, specific steps are as in Figure 8: more quickly because it reduce at least 50% inputs for phase The method by the method [10] is a transition, and meanwhile ensure the accuracy of detection. traditional method for Duffing detections, which is compared Simulations prove that the predictive algorithm is effective. the calculated values with zero for detections. In the paper, 40 this method is used as one of the state detection methods for the BPSK demodulations. 20 On the other hand, we can achieve the prediction of the phase transition, which is by the predictive methods with 0

Kalman gain, namely the phase transition of Duffing oscillator -20 can be predicted when the number of samples does not meet noise with Signals original required points, meanwhile can effectively reduce the -40 sampling points. The algorithm with Kalman gain offered in 0 0.1 0.2 0.3 0.4 0.5 Time(s) the paper can achieve the prediction of phase transitions of Figure 9 Modulated signals with noise Duffing system when the suitable threshold is set.As the 0 analysis in this section, we can choose 1 as the threshold for 10 predictions. -1 10

-2 10

-3 10

BER Lypunov detection -4 10 Kalman prediction

-5 10

-6 10

-7 10 -20 -15 -10 -5 0 5 SNR Figure 10 BER comparisons under different SNR conditions V. REFERENCES [1] Xie Tao, Wei Xue ye. A new Method of Intermittent Chaotic Signal Figure 8 Flow chart of Bit error probability simulations Identification Based on Poincaré Map [J]. Journal of Electronics & In each SNR condition,108 binary codes have been adopted Information Technology, 2008, 30(9):2166-2169. 3 [2] Li Yue, Bao-Jun Yang. Introduction chaotic oscillator test [M]. Beijing: for 10 times Monte Carlo simulations. In the simulations, the Electronic Industry Press, 2004:49 - 55. frequency of driving motivation is set equal to f=2kHz, the [3] Li Sh L,Yin Ch Q,Shang Q F,eta1.A method of identifying chaotic modulated signals with white noise are shown in Figure 9 to nature based on image recognition[J].Proceedings of the CSEE, be demodulated. 2003,23(10):47-50. Figure 10 shows the BER of demodulations which is [4] LiU Z R.Perturbation criteria for chaos [M]. Shanghai Scientific and Technological Education Publishing House,1994. calculated by (22),it can be seen that by only 50% samples, [5] Wang G Y,He S L.A quantitative study on detection and estimation the Duffing demodulations by predictive algorithm are more of weak signals by using chaotic Duffing oscillators [J].IEEE Trans.On accurate than by traditional algorithm. CAS-I,2003,50(7):945-953. [6] Yang H Y Ye H,Wang G Z.Study on Lyapunov exponent and Floq- IV. CONCLUSION uet exponent of Duffing oscillator [J].Journal of Scientific Instrument, Duffing oscillator is widely used to detect the weak signal, 2008,29 (5) :927-932. but meanwhile restricted with its computational complexity, [7] P. Koukoulas and N. Kalouptsidis, “Nonlinear system identification using Gaussian inputs,” IEEE Trans. Signal Process., 1995, 43(8) : which often needs a large number of inputs to stimulate its 1831–1841. phase transition. It is of great significance to research the [8] E Buckwar.Introduction to the numerical analysis of stochastic delay quick identification algorithm under a low sampling rate for differential equations [J] J.Comp.App.Math (S0377-0427), 2000, engineering applications, such as rapid fault detections, high 125(1) :297-307. [9] Pantaleon, C, Souto, A. Comments on "An aperiodic phenomenon of the bit rate communication under extremely low SNR.A extended Kalman filter in filtering noisy chaotic signals”. Signal predictive algorithm is offered in the paper to predict the Processing, IEEE Transactions on 2005, 53(1): 383-384. phase transition by Kalman gain. Combined with the state [10] Zhang B,LI Y,eta1.An algorithm based on Lyapunov exponents to model of Duffing and the recursive equation of Kalman gain, determine the threshold of chaotic detection for weak signal [J].Progress in Geophysics,2003,18(4):748-751. the phase transition of Duffing oscillator can be predicted in advance. And then the predictive algorithm is used for the