DGTL_RMS3 Digital RMS Meter (3-Phase)

Description

This subroutine provides an RMS quantity for a 3-phase, input voltage waveform by interpolated sampling.  This subroutine operates in the same manner as that described for the [DGTL_RMS] Digital RMS Meter (1-Phase).  The difference here is that the 3-phase voltage signal is converted to an equivalent 1-phase signal according to the following equation:

 

 

Where,

 

 

The output RMS signal is then determined in the same manner as described for the [DGTL_RMS] Digital RMS Meter (1-Phase).

 

 

Subroutine Author(s):

O. Nayak

Nayak Corporation, 2002

 

Argument List

 

      SUBROUTINE DGTL_RMS3(NSAMI,SS,NA,NB,NC,FREQ,SCALE,INIT,OUTPUT)

 

Inputs:

 

Argument

Type

Dimension

Description

 

 

 

 

NSAMI

INTEGER

1

The number of samples to be taken per cycle of fundamental frequency input FREQ.  This input affects the number of storage locations used by this subroutine (see below).

SS

INTEGER

1

EMTDC subsystem number.

NA,NB,NC

INTEGER

1

EMTDC node numbers representing the phases A, B and C at the measured bus point.

FREQ

REAL

1

The fundamental frequency of the input 3-phase voltage based on NA,NB and NC [Hz].

SCALE

REAL

1

A constant to scale the output value (ex. a per-unitizing base).  This value is multiplied directly to the OUTPUT signal internally.

INIT

REAL

1

Initial output value (optional).  The subroutine populates the entire buffer with this value at TIMEZERO [kV, L-L, RMS]

 

Outputs:

 

Argument

Type

Dimension

Description

 

 

 

 

OUTPUT

REAL

1

Output RMS signal.  If SCALE = 1.0, then this output will be in the same unit as the INPUT signal

Storage

This function requires the following storage allocations per call (see #STORAGE Script Directive and STORx Arrays for more details):

 

#STORAGE INTEGER:2 REAL:<?>   *See Note Below*

 

Address

Description

 

 

NSTORI + 0

The present sample number

NSTORI + 1

The adjusted number of samples per cycle (normally equal to NSAMI).   See the Description above for more details.

NSTORF + 0

Sample period = 1 / FREQ*NSAMI.  Minimum is the simulation time step DELT [s].

NSTORF + 1

The time at which to take the next sample [s]

NSTORF + 2

Input from last time step

NSTORF + 3

Output from last time step

NSTORF + 4...4+NSAMI

Buffered input array.  Note that the quantities stored here are the squares of the inputs at each sample point.

 

NOTE:  The total number of REAL storage locations used is:  REAL = 4 + <value of NSAMI>.  It may actually be less than this, but this depends on what the subroutine decides is a valid number of samples, taking into account the input FREQ and the simulation time step DELT.  Using the value of NSAMI is a safe choice.  You may monitor the actual number of samples by accessing NSTORI + ? as indicated above.