Professional Documents
Culture Documents
Abstract
At PSS®E-31, a new feature called “Elementary Blocks” was introduced for handling of various transfer
functions in PSS®E dynamic models. This article shows the comparison of the conventional and the
elementary block method of creating PSS®E dynamic models.
General
Transfer functions are commonly used in dynamic models and are usually presented in the block
diagrams of the various PSS®E dynamic simulation models. In general, these block diagrams describe
complex models in terms of simpler (first or second order) transfer functions. The following transfer
functions are commonly encountered:
Integrator
U (s ) 1 Y (s ) INT_MODE1
INT_MODE2
sTI INT_MODE3
U (s ) 1 Y (s ) NWINT_MODE3
sTI
VRmin
U (s ) Y (s ) NWLAG_MODE3
K
1 + sT
VRmin
Washout U (s ) sK Y (s ) WSHOUT_MODE1
WSHOUT_MODE2
1 + sT WSHOUT_MODE3
Lead-lag LDLG_MODE1
1 + sT1 LDLG_MODE2
K
1 + sT2 LDLG_MODE3
Vmin
Proportional-integral (PI)
U (s ) Y (s ) PI_MODE1
controller K PI_MODE2
KP + I
s PI_MODE3
U (s ) Y (s ) NWPI_MODE3
K
KP + I
s
VRmin
Proportional-integral-derivative
U (s ) Y (s ) PID_MODE1
(PID) controller K sK D PID_MODE2
KP + I +
s 1 + sTD PID_MODE3
VRmin
Page 2
Power Technology July 2008
One common approach in handling the transfer function blocks is to write the state equations. In PSS®E
implementation, the dynamic models calculate the derivative of the states (called DSTATE), which are
then used to calculate the state variables (called STATE in PSS®E) using the Modified Euler integration
method.
The computation of DSTATEs involves writing the appropriate equations. Since there could be several
ways of formulating the STATE equations, the expressions for initializing the STATE variables and the
equations involved in obtaining the DSTATE could also vary. In addition, implementation of non-windup
limits could also prove to be tricky.
In order to provide for an easy and a consistent method of handling of transfer function STATE and
DSTATE equations along with the associated non-windup limits, the concept of ‘Elementary Blocks’ was
introduced in PSS®E-31. Simply stated, the elementary blocks are simply a library of functions (provided
with PSS®E) that can be invoked in dynamic models to initialize the model STATE, for the calculation of
DSTATE, to impose non-windup limits (if any), and to calculate the transfer block output.
The description given below shows an AVR model implementation as it is done conventionally compared
with the ‘Elementary Block’ method of achieving the same end. Since the ‘Elementary Block’ method
applies only to the PSS®E simulation MODEs (i.e., MODE 1, 2 & 3), the relevant code for these three
MODEs only are presented below.
Page 3
Power Technology July 2008
VR
VMAX
+
EC 1 – KA E FD
1 + sTR ES VE 1 + sTA
+
VMIN
VS
Figure 1 - Simplified AVR (DEMOEX)
The various steps involved in writing a PSS®E model DEMOEX are as follows:
1. Identify the CONs,
TR = CON(J)
KA = CON(J+1)
TA = CON(J+2)
VRMAX = CON(J+3)
VRMIN = CON(J+4)
ES = STATE(K)
EFD = STATE(K+1)
3. At initialization (MODE = 1), we need to calculate input of each block from the known
outputs and inputs. In case of DEMOEX, the known output is EFD and the known input is EC
(in PSS®E this is ECOMP),
STATE(K+1) = EFD
STATE(K) = EC
VR = STATE(K+1)/KA + STATE(K)
In the above, IERR is the error code (for various values of IERR, see PSS®E -31 Program
Application Guide, volume II, chapter on “Elementary Blocks for Handling Transfer Functions in
PSS Dynamic Models”).
Page 4
Power Technology July 2008
4. For calculating the derivatives (in MODE=2), one needs to establish the first differential
equation for each state,
Using the elementary blocks, in MODE=2, using the appropriate function, we will provide input to
get the block output as follows:
Comparison Table
The comparison table below illustrates the differences between the conventional method versus the
’Elementary Blocks’ approach
Page 5
Conventional Using Elementary Blocks
Page 6
IF (MODE.EQ. 1) THEN IF (MODE.EQ. 1) THEN
STATE(K+1) = EFD(I) VE = NWLAG_MODE1(KA,TA,VRMAX,VRMIN,EFD(I),K+1,IERR)
STATE(K) = ECOMP(I) ES = ECOMP(I)
VR = STATE(K+1)/KA + STATE(K) VOUT = LAG_MODE1(1.0,TR,ES,K,IERR)
Power Technology
VR = VE + ES –VS
RETURN RETURN
ENDIF ENDIF
RETURN
ENDIF RETURN
ENDIF
Conclusion
Siemens PTI has implemented functions to handle the PSS®E calculations associated with some
elementary transfer functions often used as building blocks of complex dynamic models in PSS®E. These
functions provide a simplification in the process of writing new models for PSS®E and also ensure a
consistent definition of these transfer functions and, more important, the application of non-windup limits.
Several new models in PSS®E have already been implemented using these elementary block functions,
including the new models associated with the IEEE Std. 421.5 (2005) – IEEE Recommended Practice for
Excitation System Models for Power System Stability Studies.
Siemens PTI considers that these functions are very useful and has made them accessible (via the
INCLUDE of COMON4.INS) for users writing new PSS®E dynamic models. Please refer to the PSS®E -31
Program Application Guide – Vol. II – Chapter 22 for detailed documentation about these functions.
The use of the elementary blocks would greatly simplify the process of writing PSS®E dynamic models,
and in addition, the application of non-windup limits would be consistent with the IEEE recommendations.
Page 7