INTRODUCTION
Synchronous generator excitation control is one of the most important measures
to enhance power system stability and to guarantee the quality of electrical
power it provides. The main control function of the excitation system which
is presented by Weedy and Cory (1999) is to adjust the
field voltage with respect to the variation of the terminal voltage. It must
be able to respond quickly to a disturbance enhancing the transient stability
and the small signal stability. The excitation system controls the generated
EMF of the generator and therefore controls not only the output voltage but
the power factor and current magnitude as well.
Classical methods that make use of linear models for designing controllers
are valid only on small variation around an operating point. A number of new
control theories and methods have been introduced to design high performance
excitation controllers to deal with the problem of transient stability for nonlinear
synchronous generator models. Among them the Lyapunov method which is described
by Machowski et al. (1998) and Salem
et al. (2003), singular perturbation methods, feedback linearization
and sliding mode control presented by Loukianov et al.
(2004) and Jiang and Wu (2002), linear optimal control
presented by Wen et al. (1998), the adaptive
control method associated with neuron technique presented by Werner
et al. (2003), the fuzzy logic control theory presented by Hassan
et al. (1994) and the nonlinear controller along with an observer
are the most commonly used ones. Damm (2004) calculate
stability function with non linear controller. LeonMorales
et al. (2001), calculate stability function with robust controller.
A model of the synchronous machine with full degrees is given in this work
which is presented by Krause et al. (1986), for
a transient stability investigation. The mathematical modeling of this system
is described in this paper and then this system is transferred into transfer
function Simulation result (time response) obtains from this transfer function.
For the implementation of the virtual laboratory LabVIEW, a product of National
Instruments Inc. will be used. Clark (2005) showed it
is a flexible, generalpurpose graphical programming tool intended for a broad
spectrum of applications.
This study attempt to present a digital fast simulator intended to probe dynamic
state of excitation system in a typical power system using Simulink software
to implement network and generator transient equations. NI LabVIEW will also
provide an instant communication from Simulator to Excitation Cubicle. The considered
synchronous machine has a rated power capacity of 200 MVA and rated voltage
of 15.75 kV.
Mathematical modeling of synchronous machine: The mathematical description
of the synchronous machine is obtained if a certain transformation of variables
is performed. Park's transformation is simply transforming all stator quantities
from common phase a, b and c into equivalent dq axis. Krause
et al. (1986), has presented below relations.
where as,
Following equation is the generator linkage flux equations in the rotor frame of reference are described in Perunit. The machine equation in the rotor frame of reference becomes:
where as:
Now to calculate currents:
Electrical torque value will be calculated by:
Rotor speed equations have been written as:
and finally Rotor angle:
Simulation setup: Owing to the fact that MATLAB  Simulink is one of the best mathematical software equipped to deal with every advanced equations, all dynamic equations of synchronous machine was modeled in Simulink environment.
Being exceptionally flexible, LabVIEW^{TM} was chosen to establish an external bridge from Simulator to exciter. It is also the upper level software and human interface. All Charts and graphs were placed in its environment and that is beside data storing in TDM and TDMS databases, server client communications, implication of Governor and preset test programs.
Last but not least to make a SLI communication between Simulink and LabVIEW^{TM}, C++ has been used to materialize bilateral communication among MATLAB – Simulink and LabVIEW^{TM}.
There is also a server client possibility through Local Ethernet Network which has been equipped simulator with a chance to be controlled remotely or even be paired with another simulator (Fig. 1).
Real data setup: Real data has been gathered from an Iranian operational gas power plant located in north of Persian Gulf. Generator's model is a 200 MVA AnsaldoEnergia with two poles, rotating 3000 RPM 50 Hz and studied Exciter were provided by Siemens Corps.
Functional tests of generator are secondary phase of commissioning. General concepts in these tests are based on IEC 600341 and IEC 14611 standards. A normal procedure contains a vast number of tests but, some of the most important ones have been demonstrated here to prove the exactitude of the Simulator's values in comparison with the real data of an online gas generator.
Real and simulated data result
AVR: Automatic Voltage Regulation is one of the most important functions
of any exciter, aimed to keep the generator’s voltage close to its current
setpoint level. In this mode, U_{g} setpoint will be monitored by
Static Excitation Equipment. Exciter will use rotor’s current to incline
or decline E_{f} and as a result minimum deviation of U_{g}
will be maintained automatically. This test has been applied in site by 3% increase
in U_{g} setpoint. Outcome has been shown in Fig. 2.

Fig. 1: 
Schematic diagram of simulator in labview 

Fig. 2: 
Three percent increase in U_{g} setpoint in AVR 

Fig. 3: 
The 0.5% increases in U_{g} setpoint in AVR (Software) 
As it was expected, by an increase in U_{g} setpoint, I_{f}Excitation current– Stepped up instantly. This action led to an increase in generator’s terminal voltage and an enlargement in amount of Q, the Reactive power. To perform this test in Network and Generator Simulator, it is needed to run the software while exciter is in AVR mode.

Fig. 4: 
The 3% U_{g} step response 

Fig. 5: 
The 3% U_{g} step response (Software) 
When simulator passed the transient moments and became stable, U_{g} Setpoint can be increased either by DCS toolkit, or directly in exciter’s controller. It depends on whether you are in remote or local mode. Outcome of this test has been displayed in Fig. 3. These graphs are illustrating 0.5% increase in generator voltage terminals. Take into the account that there is no I_{f} displayed in Fig. 3 and that’s because using simulator comes with the privilege of omitting field current. During normal operation in site, current injection in rotor by exciter may vary from 200 to 1440 ampere as a 200MVA AnsaldoEnergia synchronous generator had been coupled to the turbine. In factory by simulating this situation, using following Equations,
Simulink part of Simulator will convert the exciter voltage to E_{f}.
U_{g} step response (Field voltage regulation): Step response analyses are a common exciter test to investigate dynamic responses of the equipment. Exciter reactions during this test will provide required data for tuning PID values in exciter controller. This will lead us to gain optimum level of speed and accuracy in normal operation. To have this function examined, a sudden decline in U_{g} setpoint will be sent to exciter, while system reactions will be recorded in a fast recorder.
After some seconds by inclining U_{g} Setpoint, it will go back to its previous value. Figure 4 illustrates mentioned test result in field.
Almost similar action will be measured to test the field voltage regulation in the factory using Network and Generator simulator. 3% up step in U_{g} setpoint value will lead to system natural reactions displayed in Fig. 5.
As it was expected increasing U_{g} setpoint will be followed by an increase in exciter’s voltage and inevitably generated reactive power level. By declining 3% of U_{g} setpoint and returning to preset value, all other factors will also go back to their original levels.
Reactive power control function: Another task which a synchronous generator is obligated to fulfill is QControl. In this mode, Exciter should keep reactive power rate close to an arbitrary setpoint.
It should be emphasized that keeping Q rate almost stable in a weak network is often accompanied with steep variation in excitation current and as a result an oscillation of generator voltage. This is not a welcome behavior because this process can easily lead to a load rejection on condition that the generator or exciter’s voltage restraint passes.
Q setpoint can be either positive or negative and as far as U_{g} is in range and no restraint has been passed generator can be either capacitance or inductance. Figure 6 shows a mild increase and decrease in reactive power setpoint by operator in field.
Just like real situation, in test field aided by supplementary DCS toolkit,
Reactive power control mode has been selected and Q setpoint was increased
to 150 MWar.

Fig. 6: 
Q control function of excitation system in P=60 MW 

Fig. 7: 
Q control function of exciter in P=60 MW (Software) 

Fig. 8: 
Testing under excitation limit in 60 MW 
Figure 7 is a snap shot showing Qcontrol function of simulator
in test field.
Limitations
Under and over excitation limits: A set of limitations will be set
for every power generation machine to keep it in an optimum work condition.
When excitation current decreases, inevitably there will be a decline in amount
of reactive power. This will also increase load angle δ and instability
will come along if δ value goes beyond π/2; hence, to prevent a misfortunate
event an underexcitation limit has been adjusted in every Exciter. In most
exciters this limit such has been set on level of negative reactive power level
and when Q gets close to its limit level, Excitation systems will try to push
it back to the work area in which load angle is δ_{min} < δ_{ss}.

Fig. 9: 
Testing under excitation limit in 60 MW (Software) 

Fig. 10: 
Testing over excitation limit in 60 MW 
Provided that despite exciters reaction, reactive power passes defined limit,
there will be a load rejection (Disconnection from grid) either by exciter or
protection relays. Because of destructive nature of this phenomenon, in real
test, setpoints will be moved to larger value to test this limitation. Figure
8 displays a moment in which by displacing machine’ s limit from 60
to 36 Mwar under excitation limit activated.

Fig. 11: 
Testing over excitation limit in 60 MW (Software) 

Fig. 12: 
Stator current limiting in 140 MW 
When in simulating environment there will be no danger to play with generator
setpoints. And as AnsaldoEnergia generator supplier suggested to enable under
excitation limit in 60 Mwar, this value has been set in Exciter.
As it has been shown in Fig. 9, to activate this limitation, U_{g} setpoint has been declined to 0.92 PU but before reaching to that level, under excitation limit was activated and by increasing E_{f}, reactive power has been forced back to safe work area.
Upper limit level of excitation current is totally dependent on the generator’s
structure and its nominal power. As a result of exciter’s current accretion,
beside reactive power, generator current will also increase. Normally as current
flows in stator, its temperature will get intensified. Figure
10 provides exciter behaviors in time of changing overexcitation limit
level from 200 to 36 Mwar in real situation.

Fig. 13: 
Stator current limiting in 60 MW (Software) 

Fig. 14: 
Generator symmetrical fault in 64 MW for 90 m sec 
In most exciters, over excitation limit is not an instant alarm and it usually
takes some seconds to get activated.
Figure 11 is over excitation limit test in Network and Generator simulator. U_{g} Setpoint has been set to 1.02 PU or 16014 KV while network voltage was 0.994 PU. As it has been shown in the figure after some seconds over Excitation limit has been activated and by decreasing E_{f} reactive power has been plunged back to its green zone.
Stator current limiting: Just like over excitation, when a high level
of active power is producing, there will be a high amount of current through
generator’s stator windings which inevitably same rule of maximum level
of current and stator winding over heating should be applied. In case of reaching
to restrictions, it is excitation’s duty to decrease I_{g} and
bring generator back to safe zone. Most excitation systems will command Turbine’s
Governor to decline active power while reducing their own DC current (I_{f}).
Figure 12 and 13 are real and simulated
charts of this limitation. It’s obvious that in both Fig.
12 and 13 P and E_{f} has been scaled down after
stator current limit activation.
Balanced three phase fault analysis: Study of faults is crucially important in designing and analysis of generators behaviors. In real operation of a 200 MVA Synchronous generator it’s almost impossible to conduct such a test  in 64 MW  and record fault values such as terminal voltage and generator current. By using simulator you can apply almost every kind of fault in test field and then investigate possible reactions of different exciter logics. Having the privilege of experiencing such events with an accurate simulator, valuable information will be gained to help engineers to not only grow a sophisticated insight out of machine and exciter but also adjusting the protection relays and intensify the level of safety. For instance, analysis of three phase symmetrical fault will help us to choose the best phase relays for a specific generator and measure exciter’s agility in facing such a fault. In this paper we intend to briefly point out a symmetrical three phase fault. This kind of fault is a rare one yet, the most sever and destructive fault which may occur on a generator’s bas bars.
A time adjustable three phase balanced fault has been implemented in the software which by clicking and activating it, V_{t} will get grounded for defined milliseconds. Figure 14 is an instant V_{t} fault for 90 m sec which were simulated in factory’s test field.
CONCLUSION
The aim of this study is to introduce a rich modeling of Synchronous machine and network connected to a real excitation system. Simulator setup assists engineers on stability studies and to use computer simulation as a tool for conducting generator’s transient and control studies. Next to having an actual system to experiment on, simulation is often chosen by engineers to study transient and control performance or to test conceptual designs and conduct pernicious tests.
This study tries to demonstrate the advantages of using MATLAB and LabVIEW for analyzing steady state power system stability and its capabilities for simulating transients in power systems.
ACKNOWLEDGMENT
Authors would like to acknowledge the active participation and financial support
of the MAPNA Electrical and Control Engineering and manufacturing company.