elementary block method

7
Power Technology Issue 102 SIEMENS Power Transmission and Distribution Comparison of Conventional and “Elementary Block” Method of Handling Transfer Function Blocks in PSS ® E Dynamic Models Jay Senthil Senior Staff Software Engineer Siemens PTI [email protected] Leonardo G. Lima Senior Staff Consultant Siemens PTI [email protected] Sallehhudin Yusof President Advanced Power Solutions [email protected] 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: BLOCK TRANSFER FUNCTION PSS ® E ‘ELEMENTARY BLOCK’ FUNCTION NAMES Integrator I sT 1 () s U ( ) s Y INT_MODE1 INT_MODE2 INT_MODE3 Integrator with non-windup limit I sT 1 max R V min R V () s U ( ) s Y NWINT_MODE1 NWINT_MODE2 NWINT_MODE3 First order (lag) filter sT K + 1 () s U ( ) s Y LAG_MODE1 LAG_MODE2 LAG_MODE3

Upload: boris-miranda

Post on 27-Mar-2015

109 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Elementary Block Method

Power Technology Issue 102

SIEMENS Power Transmission and Distribution

Comparison of Conventional and “Elementary Block” Method of Handling Transfer Function Blocks in PSS®E Dynamic Models

Jay Senthil Senior Staff Software Engineer Siemens PTI [email protected]

Leonardo G. Lima

Senior Staff Consultant Siemens PTI

[email protected]

Sallehhudin Yusof President

Advanced Power Solutions [email protected]

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:

BLOCK TRANSFER FUNCTION PSS®E ‘ELEMENTARY BLOCK’ FUNCTION NAMES

Integrator

IsT1( )sU ( )sY

INT_MODE1 INT_MODE2 INT_MODE3

Integrator with non-windup limit

IsT1

maxRV

minRV

( )sU ( )sY

NWINT_MODE1 NWINT_MODE2 NWINT_MODE3

First order (lag) filter

sTK+1

( )sU ( )sY

LAG_MODE1 LAG_MODE2 LAG_MODE3

Page 2: Elementary Block Method

Power Technology July 2008

Page 2

First order (lag) filter with non-windup limit

sTK+1

maxRV

minRV

( )sU ( )sY

NWLAG_MODE1 NWLAG_MODE2 NWLAG_MODE3

Washout

sTsK+1

( )sU ( )sY

WSHOUT_MODE1 WSHOUT_MODE2 WSHOUT_MODE3

Lead-lag

2

1

11sTsTK

++

LDLG_MODE1 LDLG_MODE2 LDLG_MODE3

Lead-lag with non-windup limit maxV

minV

2

1

11sTsTK

++

NWLDLG_MODE1 NWLDLG_MODE2 NWLDLG_MODE3

Proportional-integral (PI) controller

sKK I

P +( )sU ( )sY

PI_MODE1 PI_MODE2 PI_MODE3

Proportional-integral (PI) controller with non-windup limit

sKK I

P +

maxRV

minRV

( )sU ( )sY

NWPI_MODE1 NWPI_MODE2 NWPI_MODE3

Proportional-integral-derivative (PID) controller

D

DIP sT

sKsKK

+++

1( )sU ( )sY

PID_MODE1 PID_MODE2 PID_MODE3

Proportional-integral-derivative (PID) controller with non-windup limit

D

DIP sT

sKsKK

+++

1

maxRV

minRV

( )sU ( )sY

NWPID_MODE1 NWPID_MODE2 NWPID_MODE3

Page 3: Elementary Block Method

Power Technology July 2008

Page 3

Second order transfer function

FEsDsCBsAs

++++

2

2( )sU ( )sY

ORD2_MODE1 ORD2_MODE2 ORD2_MODE3

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 4: Elementary Block Method

Power Technology July 2008

Page 4

Comparison of Conventional and Elementary blocks The AVR model used for illustrating the use of ‘Elementary Block’ is shown in Figure 1.

A

A

sTK+1

+

+–

EV

MINV

MAXV

SE

RV

RsT+11

SV

CE FDE

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)

2. Identify the states, 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), Conventionally we would write, EFD/VE = KA, and VE = EFD/KA Since at the start ES = EC VR = VE + ES -VS

STATE(K+1) = EFD STATE(K) = EC VR = STATE(K+1)/KA + STATE(K) Using elementary block, VE = NWLAG_MODE1( KA, TA, VRMAX, VRMIN, EFD, K+1, IERR ) ES = EC VINP = LAG_MODE1( 1.0, TR, ES, K, IERR ) VR = VE + ES -VS

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 5: Elementary Block Method

Power Technology July 2008

Page 5

4. For calculating the derivatives (in MODE=2), one needs to establish the first differential equation for each state, Using conventional method (where ‘s’ is the Laplace operator), s ES = (EC – ES)/TR , or DSTATE(K) = (EC – STATE(K))/CON(J) VE = VR + VS - ES , or VE = VR + VS – STATE(K) s EFD = (KA x VE – EFD)/ TA, or DSTATE(K+1) = (KA*VE – STATE(K+1))/CON(J+2) We need to apply non-windup limit IF (STATE(K+1) .GE. VRMAX .AND. DSTATE(K+1) .GT. 0.0) THEN DSTATE(K+1) = 0.0 ELSEIF (STATE(K+1) .LE. VRMIN .AND. DSTATE(K+1) .LT. 0.0) THEN DSTATE(K+1) = 0.0 ENDIF Using the elementary blocks, in MODE=2, using the appropriate function, we will provide input to get the block output as follows: ES = LAG_MODE2(1.0, TR, EC, K) VE = VR + VS - ES VOUT = NWLAG_MODE2(KA, TA, VRMAX, VRMIN, VE, K+1)

5. In MODE=3, we will calculate the outputs or states, Based on conventional method, we would write, EFD = STATE(K+1) Using the elementary block, we will need to write, ES = LAG_MODE3(1.0,TR,EC,K) VE = VR + VS - ES VOUT = NWLAG_MODE3(KA, TA, VRMAX, VRMIN, VE, K+1) EFD=VOUT

Comparison Table The comparison table below illustrates the differences between the conventional method versus the ’Elementary Blocks’ approach

Page 6: Elementary Block Method

Power Technology July 2008

Page 6

C

onve

ntio

nal

Usi

ng E

lem

enta

ry B

lock

s IF (MODE.EQ. 1) THEN

STATE(K+1) = EFD(I)

STATE(K) = ECOMP(I)

VR = STATE(K+1)/KA + STATE(K)

RETURN

ENDIF

IF (MODE.EQ. 1) THEN

VE = NWLAG_MODE1(KA,TA,VRMAX,VRMIN,EFD(I),K+1,IERR)

ES = ECOMP(I)

VOUT = LAG_MODE1(1.0,TR,ES,K,IERR)

VR = VE + ES –VS

RETURN

ENDIF

IF (MODE .EQ. 2) THEN

DSTATE(K) = (ECOMP(I) – STATE(K))/CON(J)

VE = VR + VS – STATE(K)

DSTATE(K+1) = (KA*VE – STATE(K+1))/CON(J+2)

IF(STATE(K+1).GE.VRMAX.AND.DSTATE(K+1).GT.0.0) THEN

DSTATE(K+1) = 0.0

ELSEIF(STATE(K+1).LE.VRMIN.AND.DSTATE(K+1).LT.0.0) THEN

DSTATE(K+1) = 0.0

ENDIF

RETURN

ENDIF

IF (MODE.EQ.2) THEN

ES = LAG_MODE2(1.0,TR,ECOMP(I),K)

VE = VR + VS - ES

VOUT = NWLAG_MODE2(KA,TA,VRMAX,VRMIN,VE,K+1)

RETURN

ENDIF

IF (MODE.EQ. 3) THEN

EFD(I) = STATE(K+1)

RETURN

ENDIF

IF (MODE.EQ.3) THEN

ES = LAG_MODE3(1.0,TR,ECOMP(I),K)

VE = VR + VS - ES

EFD(I) = NWLAG_MODE3(KA,TA,VRMAX,VRMIN,VE,K+1)

RETURN

ENDIF

Page 7: Elementary Block Method

Power Technology July 2008

Page 7

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.