Artif Life Robotics (2010) 15:473–477 DOI 10.1007/s10015-010-0848-x
© ISAROB 2010
ORIGINAL ARTICLE Wen-Bin Lin · Huann-Keng Chiang · Kuang-Rong Shih Chien-An Chen
Implementation of a robust complex extended Kalman filter with LabVIEW for detection in a distorted signal
Received: June 8, 2010 / Accepted: June 23, 2010
Abstract This article proposes the PC-based LabVIEW as the software to develop the algorithm of the robust complex extended Kalman filter (RCEKF) to detect the parameters of the voltage signal in power systems. The hardware used is a sample-and-hold card and a data acquisition (DAQ) card to extract the data from an outside system to the PC, and the program will compute the amplitude, frequency, and phase of the voltage signal with RCEKF. To validate the performance of RCEKF, the voltage signal from a function generator was applied to check the feasibility of the algorithm. This application was also used in the Taiwan Power Company (TPC) secondary substation in Sijhou, Taiwan. Key words Complex Kalman filter · Robust algorithm · Voltage distorted signal · LabVIEW
1 Introduction The parameters of a voltage signal include amplitude, phase angle, and frequency. The accuracy of estimations of the parameters is a very important issue for the running of a power system. A literature review1,2 showed that the types
W.-B. Lin Graduate School of Engineering Science and Technology, National Yunlin University of Science and Technology, Yunlin, Taiwan H.-K. Chiang (*) Department of Electrical Engineering, National Yunlin University of Science and Technology, Douliou, Yunlin 640, Taiwan e-mail:
[email protected] K.-R. Shih Department of Electrical Engineering, National Formosa University, Yunlin, Taiwan C.-A. Chen Electronic Vehicle and System Verification Group R & D Division, Automotive Research and Testing Center, Changhua, Taiwan This work was presented in part at the 15th International Symposium on Artificial Life and Robotics, Oita, Japan, February 4–6, 2010
of state variables used with the extended Kalman filter are the real type and the complex type in the application of signals estimation generally. However, in practical applications, the former method will result in only an estimated value if the signal is out of order. The pitch of the measured value and the estimated value will increase gradually throughout the tracking time. Therefore, in order to avoid these drawbacks, the complex extended Kalman filter was proposed,3 and was applied in the estimation of voltage distortion signal parameters. The complex extended Kalman filter is considered only in the linear part of the equation during the filtering process. When the parameter is not normal, the nonlinear part of the equation will sometimes have a great influence. According to Huang and Shih,4 if there is an unusual signal in the system, the variation in quantity will result in errors between the estimated value and the optimal value. This condition will cause a variable state which does not lead to the optimal solution, and it will not be possible to estimate the parameter exactly. In order to solve this problem, Huang and Shih4 proposed a robust calculation method modeling the extended Kalman filter. This can be a state estimation application of a power system, and results in a reasonably effective simulation. However, the robust calculation method is composed of an exponential function with innate characteristics, i.e., exp(−|yk − Hx˜k|). The meaning of this application is that the greater the difference between the measured value and the estimated value, the less effective the estimation filtering. Here we propose this robust calculation approach with a complex extended Kalman filter in signal estimation in order to improve the performance. In the literature,3–14 signal estimation is only applied at the simulation stage, but this approach is seldom used in practical measurements. Therefore, no individual algorithm is of use in practical verification tasks. The PC-based LabVIEW15–19 is often applied in power systems. Therefore we used the graphic control software of LabVIEW to finalize a program using the robust complex extended Kalman filter. This program is used in practical measurements as follows. Firstly, the sine wave is given by
474
the function generator. Secondly, the voltage signal of the Sijhou secondary substation of the TPC in Changhua County is given. These facts can be used to verify the practicality of the algorithm in measurements in a real situation. This article is organized as follows. Section 1 has given a brief introduction. Section 2 describes the models and algorithms used in the proposed robust complex Kalman filter. Section 3 reports some practical measurements used to verify the algorithm proposed in Sect. 2. Finally, in Sect. 4, we draw some specific conclusions, and indicate our future research direction.
will be a mistake in the calculation of the measurement value function under normal conditions. Therefore, when the measurement value happens to become distorted, the absolute value of the innovation vector will increase. This outcome will result in the value of the exponential function being reduced, and this can help to decrease the weight value. It can also reduce the effect of the distorted measurement value on estimations. Figure 1 shows the software LabVIEW used to edit the equation of the robust complex extended Kalman filter.
2 Mathematics of the robust complex extended Kalman filter
3 Numerical simulation and result
Step 1. Input the time-changing signal measurement value yk, the initial value of the state variable xˆ0, the initial value of the error covariance P0, and the measured value of the error covariance R0. Step 2. Begin to track at time k = 0. Step 3. State estimates x k = Ax k −1
(1)
Step 4. ∂ ( Axk ) ∂xk
(2)
Mk +1 k = Fk Pk k Fk*T
(3)
Fk =
Step 5. Measurement error covariance Rk = Wk−1 Wk = Wk e
(4) − yk − Hxˆ k −1
(5)
where, e−|yk−Hxˆk−1| is a complex robust exponential function. If it is a real style, the robust exponential function is e−|yk−h(xˆk−1)|. Step 6. The calculation of Kalman is now shown. Kk = Pk H *T [ HPk H *T + Rk ]
−1
(6)
Step 7. State filtering xˆ k = x k −1 + Kk ( yk − Hx k −1 ) (7) Then renew Pk. Step 8. To judge the time-value k, we have to depend on whether or not there is a larger setting time. If the timevalue is less than this value, then progress to trace the next time point. If that time point is larger than this value, then tracking has ended. The robust complex extended Kalman filter is a means of using Wk in step 5 to control the Kalman gain value. It can restrain any inexact measurement values or unusual parameters which would change the effect of the total estimation procedure. When some unusual measurement occurs, it is clear that the measurement value yk has changed significantly. However, the prediction of the state variable has not detected the unusual measurement value, and there
We have applied the program of the robust complex extended Kalman filter on a LabVIEW base. We have verified its use for practical measurements in the following three situations. Firstly, it gave the sine wave by the function generator. Secondly, it gave the voltage signal of the Sijhou secondary substation of the TPC in Changhua County. The function generator supplies the signal in sine wave form in the first instance. This signal can alter the magnitude of the amplitude and the frequency. We propose a sine wave form test signal frequency of 60 Hz, and an amplitude of 1 V. The parameters are modulated by the knob of the function generator. The voltage signal measurement of the Sijhou secondary substation of the TPC in Changhua County is in the condition given by Eq. 2. Some different application results of signal measurements are given below. Situation 1: The measurement that the function generator supplies as a sine wave form signal. 1. Signal amplitude change Figure 2 shows that the function generator supplies the signal in a sine wave form. The frequency of this signal is 59.99 Hz, and the amplitude is 1.05 V. Its amplitude is 0.625 V from 0.97 s to 1.1 s after the variation. Figure 3 shows that the function generator supplies the sine wave form from 0.6 s to 1.6 s. Figure 4 shows the amplitude estimation diagram for our proposed method. The value of the estimated amplitude is 1.041 V at 0.6 s before the variation, and the relative error is 0.86%. The estimated value is 0.624 V at 1.8 s, and the relative error is 0.16%. The response time of the estimate is 0.7 s. 2. Signal frequency change Figure 5 shows that the function generator supplies the sine wave form. The frequency of this signal is 60.04 Hz, and the amplitude is 1.05 V. Its frequency variation is from 1.19 s to 1.40 s. Figure 6 shows that the function generator supplies the sine wave form from 0.7 s to 1.7 s. Figure 7 shows the frequency estimation diagram of our proposed method. The frequency estimation oscillates suddenly during changes in frequency, but then it reverts to the signal frequency. The frequency estimation value is 60.032 Hz at 1 s before the frequency variation in Fig. 7, which is close to the value in
475 Fig. 1. Program equation of the robust complex extended Kalman filter
Amplitude (V)
1.1 0.8 0.5 0.6 Fig. 2. Wave form of the function generator on an oscilloscope display
1.0
Time(Sec.)
1.6
Fig. 4. Amplitude estimation diagram of our proposed method
Amplitude (V)
1.5 0
-1.5 0.6
1.0
Time (sec.)
1.6
Fig. 3. Signal wave form of the function generator displayed from 0.6 s to 1.6 s
Fig. 5. Wave form of the function generator on an oscilloscope display
476
70
Frequency (f)
0 1.5
0.8
1.2 Time (sec.)
1.6
62
Frequency (f)
50 0.0
Fig. 6. Signal wave form of the function generator measured from 0.7 s to 1.7 s
0.2 Time (sec.)
0.5
Fig. 9. Frequency estimation diagram of our proposed method
180
58 54
60
Amplitude (V)
Amplitude (V)
1.5
160
0.8
1.2 Time (sec.)
1.6
Fig. 7. Frequency estimation diagram of our proposed method
140 0.0
0.2 Time (sec.)
0.5
Fig. 10. Amplitude estimation diagram of our proposed method
Sijhou S / S 620
610 69 kV BUS
760
770 25 MVA 3 MT
750
-100 -150 0.0
25 MVA
25 MVA 2MTA
2MTB TIE2
.. .
Phase angle (degree)
0
TIE1 CB
0.2 Time (sec.)
0.5
Fig. 11. Phase angle estimation diagram of our proposed method
1MT 11.4 kV BUS PT 6600/115 V
Measuring point Fig. 8. Single line diagram of the Sijhou secondary substation
Fig. 6. Figure 6 displays a value of 60.04 Hz for the function generator frequency. The relative error between Fig. 7 and Fig. 6 is 0.13%. After the frequency variation, the estimated frequency value is 57.06 Hz at 1.6 s. The signal frequency of the function generator is 57 Hz at 1.6 s. Therefore, there is a 0.06 Hz error at 1.6 s. Situation 2: The voltage signal measurement at the Sijhou secondary substation of the TPC in Changhua County. We took practical measurements at the Sijhou secondary substation of the TPC in Changhua County. We measured an 11.4 kV BUS (single phase 66 KV) voltage signal at the substation by means of PT (6600/115 V) conversion. The measured point is shown in Fig. 8. Figures 9–11 are the
estimation diagrams of one phase frequency, amplitude, and phase angle measurement. The estimated value of the frequency is 60.21 Hz. The estimated value of the amplitude is 160.2 V. The voltage scale shown in the oscilloscope is that of an amplitude of 160 V after conversion. The estimated values and the oscilloscope display values are very similar. The estimated value of the phase angle is approximately −129.5°.
4 Conclusions Only simulations of software signal parameters appear in the literature. We have proposed the use of the LabVIEW software edited by means of the program of the robust complex extended Kalman filter. We can use the state variables of the system to trace the estimated parameters of amplitude, frequency, and phase angle. Thus, we can detect whether or not the signal is distorted. We proved the feasibility of the structure that can trace the signal parameters by means of measuring the sine wave form of the function generator by practical measurements at the Sijhou secondary substation of the TPC in Changhua County.
477 Acknowledgment This work was supported by the National Science Council in Taiwan, Republic of China, through grant NSC98-2221E-224-070.
References 1. Tadeusz L, Jacek R (1977) Real-time determination of power system frequency. IEEE Trans Instrum Measurement 46(4):877–881 2. Nishiyama K (1997) A nonlinear filter for estimating a sinusoidal signal and its parameters in white noise: on the case of a single sinusoid. IEEE Trans Signal Proc 45:970–981 3. Dash PK, Panda RK, Panda G (2000) An extended complex Kalman filter for frequency measurement of distorted signals. IEEE Trans Instrum Measurement 49(4):746–753 4. Huang SJ, Shih KR (2002) Dynamic state-estimation scheme including nonlinear measurement-function considerations. IEE Proceedings: Generation, Transmission and Distribution 149(6): 673–678 5. Ferreira IM, Maciel Barbosa FP (1994) A square root filter algorithm for dynamic state estimation of electric power systems. Electrotechnical Conference 3:877–880 6. Xia Q, Rao M, Ying Y, et al (1992) A new state estimation algorithm-adaptive fading Kalman filter. IEEE Proceedings of the 31st Conference on Decision and Control, pp 1216–1221 7. Hargrave PJ (1989) A tutorial introduction to Kalman filtering. IEE Colloquium on Kalman Filter: Introduction, Application and Future Developments, pp 1–6 8. Mandal JK, Sinha AK, Roy L (1995) Incorporating nonlinearities of measurement function in power system dynamic state estima-
9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19.
tion. IEE Proceedings: Generation, Transmission and Distribution 142(3):289–296 Irving MR, Macqueen CN (1998) Robust algorithm for load estimation in distribution networks. IEE Proceedings: Generation, Transmission and Distribution 145(5):499–504 Beides HM, Heydt GT (1991) Dynamic state estimation of power system harmonics using Kalman filter methodology. IEEE Trans Power Delivery 6:1663–1670 Durgaprasad G, Thakur SS (1998) Roust dynamic state estimation of power system based on m-estimation and realistic modeling of system dynamics. IEEE Trans Power Syst 13(4):1331–1336 Liu YZ, Chen S (2001) A wavelet-based model for on-line tracking of power system harmonics using Kalman filtering. IEEE Power Engineering Society Summer Meeting 2:1237–1242 Routray A, Pradhan AK, Rao KP (2002) A novel Kalman filter for frequency estimation of distorted signals in power systems. IEEE Trans Instrum Measurement 51(3):469–479 Dash PK, Pradhan AK, Panda G (1999) Frequency estimation of distorted power system signals using extended complex Kalman filter. IEEE Trans Power Delivery 14(3):761–766 Johnson GW, Richard J (2001) LabVIEW graphical programming practical applications in instrumentation and control. 3rd edn. McGraw-Hill, New York Johnson GW (1998) LabVIEW power programming. McGrawHill, New York Jamal R, Pichlik H (1999) LabVIEW applications and solutions. Prentice Hall PTR, Upper Saddle River National Instruments (2003) LabVIEW measurements manual. National Instruments National Instruments (1994) SC-2040 user manual. National Instruments