Copyright 2002 IFAC 5th Triennial World Congre, Barcelona, Spain REAL-TIME IMPLEMENTATION OF A NEURO- FOR SYNCHRONOUS GENERATOR M. M. Salem** A. M. Zaki** O. P. Malik* *The Univerity of Calgary, Canada **Electronic Reearch Intitute, Cairo, Egypt maalem32@hotmail.com Abtract: A imple neuro-controlle r for a ynchronou generator i preented in thi paper. The controller perform the function of the terminal voltage control. By repreenting the propoed neuro-controller in -domain, it parameter to enure ytem tability can be obtained analytically. Reult of imulation tudie on a non-linear eventh order generator model with the neuro-controller uing calculated parameter are given. Real- implementation and experimental verification of the neuro-controller a an automatic voltage regulator for a phyical model of a ingle-machine infinite-bu power ytem i decribed. Reult of experimental tudie demontrate the effectivene of thi imple neuro-controller. Copyright 2002 IFAC Keyword: Neural Control, power Sytem control.. INTRODUCTION The artificial neural network (ANN) technology ha matured enough to be applied uccefully in many control field. However, it ucce will eventually depend on it ability to remove a major obtacle, i.e. the lake of a firm theory. There i no general theory available to ait the developer to deign neural network (El- Sharkawi and Niebur, 996). Becaue of the abence of a model, there i no complete theoretical bai to relate the ANN parameter to the characteritic of a ytem being controlled. A a firt tep toward a olution for many problem that face practical application of neural network in control field, an -domain model of a imple neuro-controller i developed in thi paper. Uing thi model, tability analyi of the propoed neuro-controller i preented. Training of the propoed neuro-controller i on-line by the back propagation (BP) algorithm uing a modified error function. By repreenting the neuro-controller learning equation in the -domain, the controller parameter can be determined analytically. Uing the calculated parameter, application of the neurocontroller a a field excitation controller for a ynchronou generator are illutrated by imulation tudie and experimental verification. 2. NEURO-CONTROLLER STRUCTURE The overall control ytem with the propoed neurocontroller coniting of one neuron i hown in Fig.. The neuro-controller ue a linear hard limit activation function and a modified error feedback function. 2. Training Proce The neuro-controller ue a imple procedure to update it weight on-line. There i no need for any off-line training. There i no need for parameter identification or reference model. The neuro-controller i trained directly, in an on-line mode, from the ytem output and there i no need to determine the tate of the ytem. The neurocontroller ue the ampled value of the ytem output to compute the error uing the modified error function. Thi error i back propagated through the ingle neuron to update it weight. Then the output of the neuro-controller i computed which i equal to the neuron weight. The neuro-controller output can be derived a: u ( t) = W ( t) () W ( t ) = W ( t ) + η * WCT ( t ) (2) WCT i the neuron weight correction term baed on the modified error function. W (t), u(t), η are neuron weight, neuron output and the learning rate repectively. 3. MODEL IN -DOMAIN Baed on equation () and (2), the neuro-controller model in -domain can be derived a preented in the appendix. The derived model i hown in Fig. 2.
4. APPLICATION TO A SINGLE-MACHINE INFINITE-BUS POWER SYSTEM 4. Simplified Linear Model Firt a implified linear model of a ynchronou machine i ued. Thi model, a hown in Fig. 3, decribe the relation between the generator field voltage and terminal voltage in open loop (DeMello and Concordia, 969). The neuro-controller a an automatic voltage regulator () with the implified machine model i hown in Fig. 4. The propoed modified feedback function in thi cae i: f() = + k v (3) The cloed loop tranfer function i: V t () / T do Vref () = η 2 + ηk (4) v + ( ) + η / T do T do Thi equation repreent a econd order ytem. Auming that k v = 0 (unity feedback), the ytem repone to a 0.03pu tep change in reference input for two value of η i hown in Fig. 5 ( η =2 and η =0). A hown in Fig. 5, the overall ytem behave a a table econd order ytem. But a η increae, the ytem i more ocillatory. Thi i an expected reult even for a complicated tructure neural network (Salem, et al, 2000a). A mentioned in (Salem, et al, 2000b), while uing thi function (k v = 0) by the BP algorithm to train a neurocontroller on-line, the controller ha no information about the ytem output movement toward it target value. To improve the performance of a neuro-controller which i trained on-line by the BP algorithm, a modified function wa introduced in (Salem, et al, 2000a). The effect of the modified function on the neuro-controller performance baed on analytical tudie i decribed below. Fig. Overall control ytem with imple neuro-controller Fig. 2 Neuro-controller model in -domain Fig. 3 Simplified linear model of machine on open circuit Fig. 4 Neuro-controller a an Terminal voltage deviation p u 0.04 0.03 0.02 0.0 0.00 η=2 η=0 0 2 4 6 8 0 2 4 6 Fig. 5 Neuro -controller performance uing unity feedback function Auming that the neuro-controller ue the propoed feedback function f(), equation (3), in it training, a critically damped repone to a tep change in reference input can be obtained for (Ogata, 990): k 2 η T v= do η (5) For η = 500, T do = 5.67, then k v = 0.2 for a critically damped repone. Thi critically damped repone i hown in Fig. 6 for a 0.03pu tep change in reference input. Alo, other value for η and k v for a critically damped repone can be obtained. Thee value are: η = 00, k v = 0.47, η = 0, k v =.4
The ytem repone correponding to thee value i alo hown in Fig. 6. It i clear from thi figure that a η increae the repone i better. So, the propoed value for η and k v are: η = 500, k v = 0.2. It i well known that the implified linear model of the ynchronou generator i different from no-load to load condition. The block diagram hown in Fig. 7 can approximately repreent thi implified linear model under load condition (Anderon and Fouad, 977). Uing approximate value for k 3 and k 6 (k 3 =0.3, k 6 =0.5 (Anderon and Fouad, 977)), ytem repone to a 0.03pu tep change in reference input i hown in Fig.8.. In thi cae the neuro- controller ue the propoed value for η and k v. It can be een that even though the repone in thi cae i lightly under damped, it i till cloe to the critically damped repone a hown in Fig. 8. Then it may be concluded that the neuro controller performance i almot the ame in the two cae, which i an expected reult for an adaptive controller. Conidering that the neurocontroller i an adaptive controller, one can depend on it parameter ( η and k v ) obtained baed on a implified linear model to ue them in a highly non-linear model. Application of thi neuro-controller with it propoed parameter ( η =500, k v =0.2) to control a ynchronou generator repreented by a non-linear model i preented in the following tudie. 4.2 Synchronou Generator Non-Linear Model A nonlinear eventh-order model i ued to imulate the dynamic behavior of the generating unit connected to a contant voltage bu through two parallel tranmiion line (Shamollahi and Malik, 997). A computer program i ued to imulate in domain the generator non-linear model with the neuro-controller repreented by the -domain model. The tep in thi program i m. With the generating unit operating at 0.7pu power and 0.85 power factor lag, a tudy wa conducted to how how the modified function parameter affect the ytem performance. In cae of k v = 0, the ytem repone to a 0.03pu tep change in reference voltage i hown in Fig. 9 for different value of η. A it i clear from thi figure, thi controller i not uitable to control the generator terminal voltage. In cae of k v = 0.2, ytem repone to a 0.03pu tep increae in reference voltage at followed by a 0.pu tep increae in reference torque at 5 i hown in Fig. 0 for different value of η. It i een from Fig. 0(a) that the terminal voltage repone i excellent and it i le enitive to the variation of η. It alo demontrate that the parameter obtained baed on a implified linear model can be ued for the non-linear model a well. Fig. 7 Machine implified linear model on load Terminal voltage deviation pu 0.035 0.030 0.025 0.020 0.05 0.00 0.005 0.000 0 2 4 6 8 0 LOAD NO LOAD Fig. 8 Neuro-controller performance under load and no load condition Terminal voltage deviation pu 0.030 0.025 0.020 0.05 0.00 0.005 0.000 η=0 η=00 η=500 0 2 4 6 8 0 Fig. 6 Neuro-controller performance uing modified error function.7 η=0..6.5.4.3.2 η= 0 2 4 6 8 0 2 4 6 Fig. 9 Neuro -controller performance uing unity feedback function
With the function f() = +k v, the neuro-controller i deigned to control the generator terminal voltage only. It can be een from Fig. 0(b) that the ytem till need a upplementary ignal to enhance tability. A propoed in (Salem, et al, 2000b), including an additional term in f() baed on the generator peed deviation can enhance ytem tability. 5. REAL-TIME IMPLEMENTATIONS 5. Power Sytem Phyical Model Schematic diagram of the phyical model of a inglemachine infinite-bu power ytem available in the Power Sytem Reearch Laboratory at the Univerity of Calgary i hown in Fig.. It conit of a 3-phae 3kVA, 220V ynchronou micro-alternator driven by a 220V, 30A dc motor. The generator i connected to a contant voltage bu through two parallel tranmiion line. The lumped element phyical model of the tranmiion line imulate the performance of a 500kV, 300km long double circuit tranmiion line, which conit of ix Π ection. A ytem of 3 three-phae Circuit Breaker controlled by a ROM baed logic circuit i ued. Of the three et of breaker, two et are ued at the end of the tranmiion line and the third i ued to apply a three-phae to ground hort circuit at any ditance. The contact open and cloe timing can be programmed. (a) (b) Power angle rad.55.50.45.40.35.30.25.20 η=00 η=500 η=900.5 0 2 4 6 8 0 Terminal voltage repone 0.56 0.54 0.52 0.50 0.48 0.46 0.44 0 2 4 6 8 0 Power angle repone η=00 η=500 η=900 A Time Contant Regulator (TCR) i ued to change the effective field contant of the generator in order to emulate a large generating unit. Three phae ac voltage at the generator terminal are tepped down, rectified and filtered with a cut-off frequency of 8Hz to obtain the dc terminal voltage (V t ) feedback ignal. The neurocontroller i implemented on a DSP board baed on the TMS320C30 DSP chip. The terminal voltage (V t ) ignal i ued in the error function to train the neuro-controller on-line and compute the required field control ignal, which i fed to the TCR. 5.2 Hardware Implementation The neuro-controller i developed on a DSP board upplied by SPECTRUM Signal Proceing Inc. It contain a Texa Intrument TMS320C30 DSP chip. The chip i a 32-bit floating-point device with a peed of 6.7 million intruction per econd. It performance i further enhanced through it large on-chip memorie, concurrent DMA controller, two external interface port. Two 200kHz, 6-bit analog I/O channel on board, coupled with direct acce to all erial and parallel I/O channel of DSP chip, provide the exterior input-output function. The 32-bit on-chip r i programmed by oftware to a reolution of 20 n. The board i mounted inide a PC, which i equipped with correponding development and debugging tool. The terminal voltage V t feedback ignal i fed to DSP board through the A/D channel. Thi input ignal goe through a filter, which limit the noie and provide antialiaing protection. The filtered ignal i then tored in a buffer. The DSP chip read the buffer and compute the control ignal V c. The computed V c i fed to the D/A channel that filter the ignal for moothing before ending it out. The output ignal goe through an amplifier circuit to provide the required field control ignal to the TCR. 5.3 Software Implementation The oftware conit of two module, the PC module and the DSP module. The PC module i a C program running on an 80386 microcomputer. The main function of the PC module i to down load the DSP program into the DSP board, initialize the communication between the PC and DSP program, and tore DSP input/output data in a file for further analyi. The DSP module i a C program running on the DSP board. Thi program contain a main function and an interrupt routine. Uing oftware initial value for the reference voltage, the feedback of the terminal voltage and the controller output, the main function train the neuro-controller for a number of iteration to obtain a table initial value for the controller output. Fig. 0 Neuro-controller performance a an
performance clearly for better comparion, the and commercial plot are intentionally off-et in. Fig. Sytem model to m (the ampling period). It then enable the interrupt flag to make the DSP ready to receive the r interrupt ignal. The r produce repetitive interrupt ignal according to the count in it regiter. Thi interrupt ignal erve in two way. Firt, it initiate A/D and D/A converion, and econd, it direct the DSP to execute the interrupt routine. The interrupt routine read V t through the A/D and calculate the error function, update the neuro-controller weight, and calculate the control output ignal V c. Thi ignal goe through an amplifier to the TCR. 5.4 Experimental Reult The performance of the neuro- () wa invetigated by a number of experimental tet for a variety of operating condition and diturbance. Reult of a repreentative et of thee tet are preented in the following ection. In thee tet, the ampling rate i m with a learning rate ( ç ) of 500. Performance of the neuro-controller ha been compared with a commercial. Thi commercial i implemented on a Programmable Logic Controller (PLC) to control the terminal voltage of the generating unit. It i programmed uing a function block programming language called FUPLA. Three phae voltage and current at the generator terminal are tepped down to form ix input ignal to the. The PLC-baed compute the required field control ignal which i fed to the TCR. 5.5 Voltage Reference Step Change With the generating unit operating at 0.34 pu power, 0.9 pf lead and terminal voltage of.04 pu, a 0.05 tep increae in voltage reference i applied at 0. At 20, the change in input reference voltage i removed and the ytem return to it original operating condition. A hown in Fig. 2, the ytem repone with the, which i trained on-line, i very good. Alo, the ha mall effect on the active power while changing the terminal voltage. It i alo clear from thi figure that the control ignal i table and change moothly with a dramatic effect on the ytem performance. To how the To further tet the performance of the, the operating condition i changed to 0.7pu power, 0.94 power factor lag and.07pu terminal voltage. The ame diturbance of 0.05pu tep change in input reference voltage i applied with the ame timing. Sytem repone to thi diturbance with and the commercial are hown in Fig. 3. Although the operating condition i much different, the till provide very good performance for the generator terminal voltage. 5.6 Three-Phae Short Circuit Tet With the ytem operating at 0.8pu power and a 0.9 power factor lag, a tranient tet wa conducted to tet the performance of the in repone to a diturbance. In thi tet a three-phae to ground hort circuit wa applied at one third of one tranmiion line, and the fault wa cleared 00m later by diconnecting the line. The diconnected line i uccefully reconnected after. The ame diturbance wa applied after 0 in cae of. It can be een from Fig. 4 that the can retain the ytem tability and keep the ytem operating at a table Control ignal V Active power deviation p u.0.09.08.07.06.05.04.03 4.0 3.5 3.0 2.5 2.0.5.0 0.0 0.05 0.00-0.05 5 0 5 20 25 5 0 5 20 25-0.0 5 0 5 20 25 Fig. 2 Sytem repone to 0.05pu tep diturbance in voltage reference, P=0.34, pf=0.9 lead.
.3.2..0.09.08.07.06 5 0 5 20 25 Fig. 3 Sytem repone to 0.05pu tep diturbance in voltage reference, P=0.7, pf=0.94 lag..4.2.0 0.8 0.6 0.4 0.2 0.0 5 0 5 20 25 Fig. 4 Sytem repone to a three-phae to ground fault P=0.8pu, pf=0.93 lag. Coure, Chapter 7 and 2, IEEE Power Engineering Society Special Publ., no. 96TP2-0. Ogata, K., (990). Modern Control Engineering. Second Edition. Salem, M. M., A. M. Zaki, O. A. Mahgoub, E. Abu El- Zahab, and O. P. Malik, (2000). Generating Unit Excitation Neuro-Controller. Proceeding, IFAC Sympoium on Power Plant and Power Sytem Control, 25-28 April 2000, Bruel, Belgium, pp. 97-02. Salem, M. M., A. M. Zaki, O. A. Mahgoub, E. Abu El- Zahab, and O. P. Malik, (2000). On-Line Trained Neuro-Controller with a Modified Error Function. Proceeding, Canadian Conference on Electrical and Computer Engineering, May 5-7, 2000, Halifax, pp. 83-87. Salem, M. M., A. M. Zaki, O. A. Mahgoub, E. Abu El- Zahab, and O. P. Malik, (2000). Experimental Verification of a Generating Unit Excitation Neuro- Controller. Proceeding, IEEE Power Engineering Society, Winter Meeting 2000, Jan. 22-27, 2000, Singapore. Shamollahi, P. and O. P. Malik, (997). An Adaptive Power Sytem Stabilizer Uing On-Line Trained Neural Network. IEEE Tran., Energy Converion, Vol. 2, No. 4, December 997, pp. 382-387. 6. CONCLUSIONS A neuro-controller with a imple tructure for a ynchronou generator i preented in thi paper. The neuro-controller i trained on-line baed on a modified function. The neuro-controller conit of one neuron, one weight, hard limit activation function, and a contant input. Baed on thi imple tructure, the neuro-controller i repreented in -domain. Having the neuro-controller in -domain, it tability analyi with a implified generator linear model i preented. The neuro-controller parameter are obtained analytically to enure ytem tability. The neuro-controller parameter, which are calculated baed on a implified linear model, can be ued for a non-linear model. The neuro-controller i ued to function a an for a ingle-machine infinite-bu power ytem. Reult how that the neuro-controller act a an adaptive controller. The neuro-controller i implemented in a real- digital control environment. 7. REFERENCES Anderon, P. M. and A. A. Fouad, (977). Power Sytem Control and Stability, Iowa State Univerity Pre. Ame, Iowa. DeMello, F. P. and Concordia, C. (969 ). Concept of Synchronou Machine Stability a Affected by Excitation Control. IEEE Tran., Power Apparatu and Sytem, Vol. PAS-88, No. 4, April, pp. 36-329. El-Sharkawi, M. A. and Niebur, D. (Editor), (996). A Tutorial Coure on Artificial Neural Network with Application to Power Sytem. IEEE Tutorial 8. APPENDIX Baed on eqn. () and (2), the neuro-controller model in -domain can be obtained. In domain, (2) can be written a: W ( t ) W ( t t ) = η * WCT ( t ) (6) Dividing (6) by t : W ( t) W ( t t) η = error( t) (7) t t Uing the differential form, (7) can be written a: dw ( t ) = η * WCT ( ) (8) dt t where η = η t Repreenting (8) in -domain: W ( ) = η * WCT ( ) (9) From () and (9): η U ( ) * WCT ( ) = (0) Equation (0) can be repreented a hown in Fig. 6 The general form of the weight correction term i: WCT ( ) = R( ) C ( ) f ( ) () R(): reference input C():ytem output f() : feedback function Complete model of the propoed neuro-controller in - domain i hown in Fig. 2, where G() repreent the controlled ytem.