Software Models For Relays
Software Models For Relays
2, APRIL 2001
I. INTRODUCTION
Considering the importance of the subject of relay modeling, effects, such as contact condition and electrical loading, will
the IEEE Power System Relaying Committee formed a Working vary from relay to relay or from application to application and
Group and assigned it the task of are therefore extremely difficult to model accurately. It is im-
• reviewing the present state of the art of this area, and portant to balance the amount of effort required to develop and
• recommending guidelines for further work in this area. validate a model with the amount of effort required to test the
relay directly to investigate certain effects.
This paper is the result of the work done by the Working Group
The vast majority of models in current use employ algorithms
and represents the views of its members. The paper provides
based on phasor values.
some background information relevant to relay modeling. It then
describes the types of relay model which are in common use.
These include generic models and detailed models. The infor-
III. PHASOR MODELS
mation required for building a relay model and validating it are
then given. Finally, summaries of the current uses and future The fundamental frequency simulations and models are
uses of relay models are included. helpful for many applications. Phasor-based models can be
used, among others, for the following purposes.
1) Time graded overcurrent curves (Fig. 1).
II. BACKGROUND INFORMATION 2) The level setting of an instantaneous relay.
3) The characteristic of a directional overcurrent relay rep-
Relay engineers are familiar with the traditional method for resented by current and voltage phasors plotted on the
setting overcurrent time graded protection systems. A “Software complex plane.
model” for such a relay takes the form of equations which rep- 4) The characteristic of a power relay plotted on the PQ
resent the set of time-current curves shown in Fig. 1. This model plane.
in graphical form is available from the manufacturer and can be 5) The characteristic of a percentage restrained differential
easily validated using a relay test set. The user would input the relay plotted as differential current versus restraint
rms fault current in multiples of tap setting and the time dial set- current.
ting to find the operating time of the relay. Although the above listed phasor models are often plotted on
While the model of Fig. 1 is widely used for relay application paper, they can be developed into software models by translating
and setting studies, a considerable amount of information cannot their characteristics into equations in a computer program. The
be determined from it. For instance the response of the relay to use of a software phasor model to represent relay characteris-
the following effects cannot be readily determined: tics is helpful to investigate the change in characteristics with
1) Change in fault current after the relay has started to op- changes in other parameters. For example, the minimum oper-
erate (such as in the case of an evolving fault). ating current of a directional function may vary with the mag-
2) Transient DC offset, when it is significant. For example, at nitude of the polarizing voltage.
high multiples of pickup, if the time dial setting is small, The phasor models of “instantaneous” relays do not give any
the operating time of the relay can be in the same region indication of time response. In time delayed relays, where time
as the time constant of the transient DC component. is one of the measured quantities (as with a time overcurrent
3) Harmonics and off nominal frequency currents. relay) it is usually fairly simple to model the time response. The
4) In the case of electromechanical relays, disk inertia and dynamic model of a time overcurrent relay [2] is one example
contact bounce and wipe. of such a model. Although the dynamic model is simple, it is
Additional models of varying degrees of complexity are re- very important to ensure that it accurately represents the perfor-
quired to investigate the various concerns listed above. The sim- mance of the actual relay. In particular, any integrating action
plest model, which represents the transient behavior of a time over time, such as is provided by an induction disk or its elec-
overcurrent relay, is provided in reference [9]. A transient model tronic equivalent, must be considered in model development [9].
of a time overcurrent relay calculates the degree of progress to- The primary limitation of most phasor models is their
ward the trip level at each instant in time for the specific current inability to handle time-related consequences affecting funda-
at that time. The progress toward trip (or reset) is obtained by mental frequency phasors. These time related consequences
integrating the relay current over the period of interest to deter- include the effects of DC offset, nonlinearities of CTs and
mine relay response. This type of model is useful for investi- CVTs, and protective relay memory circuits losing stored
gating the effect of changing magnitudes of current as noted in voltage or current data. Other effects are listed in Section IV.
item 1 above. In spite of their limitations in representing time response,
The dynamic model used in Reference [2] determines the re- software phasor models do provide an important benefit which
sponse to the fundamental frequency (phasor) currents only. A is common to all models. They provide the ability to observe
more complex model is required to investigate the effects noted (usually by means of graphical plots) the boundary of relay op-
in items 2 to 4 above. The more complex model would include eration on the same diagram as the actual (steady state) parame-
models of filters and response of the relay over the full fre- ters which are calculated by the relay. The ability to observe the
quency spectrum of interest. The most complex model of all margin between the boundary of operation and the calculated
would be required to determine the effects of the electromechan- parameters is very helpful in developing reliable protection ap-
ical components noted in item 4 above. Some of the significant plications and settings.
240 IEEE TRANSACTIONS ON POWER DELIVERY, VOL. 16, NO. 2, APRIL 2001
makes the measured impedance fairly resistive until the MOV time simulator. This is not an option available to most relay
bypasses at about 60 ms into the fault. The integrator on the engineers.
block average phase comparator does not develop an upward
trend until 11.3 ms when the impedance trajectory comes in- C. Hardware Modeling
side the mho characteristic. Thereafter, it ramps up slowly as the
The algorithms in a digital relay can be translated from ma-
measured impedance remains close to the operating boundary.
chine code into whatever language is being used in the model.
Once the bypass closes at 60 ms (at the cusp inside the char-
As explained previously, modeling the analog parts of any relay
acteristic) the ramp builds up rapidly to its upper level. This is
requires care although the front end of digital relays can be dealt
consistent with the fact that the impedance has now moved into
with in a fairly straightforward manner in all but a few cases
the middle of the characteristic. The operating time for the phase
where the auxiliary transducers may saturate.
comparator is around 40 ms but this may not be precise if the
There are issues of timing, dynamic range and number of bits
model is not exact. However, this has provided some insight into
in digital hardware which should be examined [15], [26].
what the relay was doing other than just seeing a trip signal at
Current and Voltage Acquisition System Characteristics: A
around 40 ms. This insight indicates that some form of polar-
number of characteristics pertaining to the analog acquisition
ization which increases the transient resistive reach for forward
system are important when trying to set up a model for a relay.
faults (see Fig. 2) would speed up the operating time of the phase
They are:
comparator.
Generic models are easy to set up, give considerable insight • the maximum value of measurable instantaneous voltage
into the operation of the relay type but may not be suitable for and current and
marginal cases and precise timing. They may not have detailed • the least value of the measurable instantaneous voltage
logic provided in specific implementation of the generic prin- and current often also called the resolution of the mea-
ciple in a specific relay. This logic is often applied to make spe- suring system.
cific functions interact with other functions to make a protection The ratio of the above two quantities determines the dynamic
system. Because of this limitation, generic models find best use range of the relay with respect to voltages and currents.
for checking specific functions, rather than complete systems There exist situations where a relay’s simulation could be af-
which are made up of numerous interacting functions. Also, fected by an improper simulation of the characteristics of the
because of this limitation, they are less useful (than detailed data acquisition system. Two examples are as follows.
models) for investigating unexpected relay operations where 1) The model is used in a study in which the maximum value
model specific details are often important of fault current is more than the maximum current which
can be measured by the data acquisition system and the
B. Detailed Models saturation of this system is not modeled.
2) The model is used to implement thresholds which are
Detailed models preserve all of the advantages of being below the combined accuracy of the analog acquisi-
able to examine the internal operation of any function. The tion system and the analog-to-digital converters. An
detailed models are more useful (than generic models) for example of this situation is the implementation of the
checking the performance of complete systems because all anti-motoring function in a generator in which the power
logic is represented. Unfortunately, detailed models are not thresholds used are exceedingly low.
as readily available as the generic models because they may A relay model may, therefore, perform differently than the real
include trade secrets of the manufacturers. The manufacturers relay if the errors, nonlinearities and dynamic range issues are
may be prepared to provide such models as “black boxes” with not dealt with properly.
specific, fixed interfaces, e.g., in MATLAB. Numbers Representation Issue: Ideally, numbers at different
A manufacturer is in a position to design a fairly accurate stages of processing (both hardware and software) should be
model particularly for the new digital relays. (As explained in represented in a model as in the real world. This constraint is
Section V the software model may precede the hardware de- not always easy to meet.
sign.) The analog front end is the only part which requires trans- The numbers provided by analog-to-digital acquisition
lation into software form although there may be some timing systems are integers. Digital processing inside the relay could
and numerical issues with regard to completion of specific cal- however be either in integer or floating point form. The main
culations in the digital hardware (see Section IV-C) source of error however is the quantizing of numbers due to the
Where the algorithms and hardware are known in detail very resolution of the acquisition system. The processing of numbers
precise performance can be achieved in the model. Reference in the integer form could introduce substantial errors if the
[14] presents a comparison of the trajectories of the transient bit-size of the word is small. Processing in the floating-point
values of calculated by a relay and calculated by the model format has a limited impact on the overall accuracy.
of the same relay. The model was a Fortran subroutine running
in an EMTP (EMTDC). Precise timing is available from such a
V. INFORMATION REQUIRED FOR MODELS
model if required for use in off-line studies involving accurate
models of other high speed controllers to examine any interac- The development of a software model is relatively simple for
tive effects. The alternative to such an off-line study would be digital relays provided sufficient information on the algorithms
to have the actual relay and other controllers linked to a real is available. For static and electromechanical relays, and indeed
MCLAREN et al.: SOFTWARE MODELS FOR RELAYS 243
for the analog sections of digital relays, the detailed modeling 1) Basic Characteristics of the Digital System: A number of
problem is nontrivial. Electro-mechanical relays are particularly characteristics are common, although not necessarily identical,
difficult to model because detailed knowledge of the mechanical to all digital systems. The following items are described in the
design is needed. In such a case, it might be impractical to de- manufacturer’s data sheet.
velop a sufficiently detailed model. Nature and Cut-Off Frequency of the Anti-Aliasing
As a general rule, to be able to develop the model of a digital Filter: Ideally the anti-aliasing filter should be defined by its
relay, the manufacturer should provide information concerning transfer function. If it belongs to a well-documented category
the basic principles which are used by the relay while processing of filters, it could be defined in general terms, for instance
data generated by acquiring the signals and making decisions. “fourth order Butterworth filter with a cut-off frequency of
Most designs of modern relays are based on the simulation 480 Hz.” If the electronic schematic of the filter and parameters
of the relays using packages like MATLAB. These simulation of the components are available, its transfer function can be
tools are used by the manufacturer at the development level computed by analyzing the diagram.
to assess the reliability and soundness of the algorithms using Primary Sampling Rate and Relay’s Sampling
voltage and current waveforms of faults simulated on programs Rate: Many of the newest generation of relays use an
like an EMTP. Once that step in the development process has over-sampling technique. The high sampling rate is used
turned out successfully, the simulation software is converted to for oscillography. An analog anti-aliasing filter precedes
the machine language of the relay’s microprocessor. If such a the sampling of signals. The data used by the relay in its
procedure has been followed, and it is most likely to be the case algorithms is obtained after decimation of the data acquired
in modern designs, the relay equations in the simulation package at high sampling frequency. The decimation process includes
constitute the software model of the relay. The manufacturer a second digital anti-aliasing filter implemented in software.
could make such a model available for use by the engineers of The digital transfer function of this anti-aliasing filter is
the utilities and consultants. Such a model will only allow eval- also needed. The high sampling rate would typically be
uation of the functionality of the protection algorithms in dif- 64 samples per cycle and the relay algorithm might use 16 or
ferent fault situations for different networks. Evaluation of the 8 samples per cycle.
model is not a proper test for testing the relay itself. For instance For most digital relays at present in service both rates are
a faulty chip in the relay will not be detected when evaluating the same. This means that we end up with a single sampling
the model. Nor will any real time effects due to the time the frequency and a single analog anti-aliasing filter.
hardware needs to run the coded algorithms come to light. 2) Phasor Estimation Algorithm: Most digital relays
To model a relay properly, all the elements or ingredients estimate amplitudes and phase angles of phasors using digital
which determine the dynamics of the relay in the transient state filters.
have to be properly simulated. Therefore, all the information re- Algorithms for estimating phasors is one of the most doc-
quired to allow an engineer to model these elements should be umented topics in the field of digital protection [16], [23]. In
available from the manufacturer. spite of the wide range of potential candidates for that purpose,
a limited number of algorithms have been used in commercial
A. Conventional Sources of Information applications. The full-cycle Fourier filter and the so-called Co-
Conventional sources of information on the technology of sine filter are the most common and have become de-facto stan-
digital relays consist of the following documents: dards in the industry [22].
Given the extensive amount of documentation available to the
1) Papers in general, textbooks on relaying and digital re-
relay engineer on the filtering algorithms, a manufacturer would
lays and IEEE special publications [16]–[18], [23], [24].
only have to point to the filtering system used by its name. For
Most relaying principles belong to the public domain and
instance characterizing a filter as “a full-cycle recursive Fourier
in most industrial products, so-called proprietary infor-
filter” tells all about the filter’s nature and reconstruction for a
mation is usually minimal.
model is straightforward.
2) Papers written by the designers of relays or manufacturers
3) Additional Functions: Most modern digital line relays
representatives. The quality and the amount of informa-
use a technique of frequency tracking, the purpose of which is
tion found in these papers depends very much upon the
to render the relay insensitive to frequency excursions. In line
will of the manufacturer to reveal or to hide the basic facts
relaying, frequency tracking has a direct impact on the memory
of relays [19]–[21].
voltage used in the polarization of a mho element. In most
3) Patents taken out by the manufacturer, if any. This is very
cases the frequency tracking is achieved with a phase locked
often the most detailed source of information.
loop circuit implemented in analog hardware.
4) The relay manuals published by the manufacturer. Most
A number of additional functions like directional elements,
of the time the “logic diagram of a protection scheme” is
detection of power-swing, computation of sequence quantities,
available in these manuals.
phase selection logic etc. would normally need to be modeled.
5) Direct contacts with the manufacturer.
The same principles apply to these functions: basic description
of their algorithms should be obtained.
B. Useful Information Algorithms Based on Something Other than Pha-
Information on the following topics will be useful when sors: Although the use of phasor evaluation has become an
trying to develop the model of a relay. almost standard practice in line relays, other algorithms exist.
244 IEEE TRANSACTIONS ON POWER DELIVERY, VOL. 16, NO. 2, APRIL 2001
relay models, generic or specific, in the studies. Systems engi- [5] Z. Peng, M. S. Li, G. V. Wu, T. C. Cheng, and T. S. Ning, “A dynamic
neers are interested in the interaction between the system and state space model of a MHO distance relay,” IEEE Trans. on Power Ap-
paratus and Systems, vol. PAS-104, no. 12, pp. 3558–3564, 1985.
its control apparatus (the relay is one such controller) and relay [6] T. S. Sidhu, M. Hfuda, and M.S. Sachdev, “Generating relay models for
engineers need to look beyond the response of the first relay op- protection studies,” IEEE Computer Applications in Power, vol. 11, no.
eration. The behavior of control apparatus for FACTS devices 4, pp. 33–38, Oct. 1998.
[7] “IEEE Committee report ‘relay performance testing’,”, IEEE Special
or other fast acting controllers is influenced by the timing of Publication no. 96 TP 115-0, 1996.
fault clearing and, where appropriate, reclosing, and such events [8] J. B. Mooney, D. Hau, F. Plumptre, and C. Henville, “Computer models
must be properly modeled in the study. There is little point in simplify relay application studies,” in Western Protective Relay Confer-
ence, Spokane, Oct. 1993.
having an accurate model for the FACTS controller without an [9] Standard for Time Overcurrent Relay Characteristics, ANSI/IEEE Stan-
equally good model of the relay, recloser and breaker. In ad- dard C37.112 1997.
dition, with operating margins being cut to the minimum, we [10] R. J. Marttila, “Directionnal characteristics of distance relay Mho ele-
ments—Part I: A new method of analysis,” IEEE Trans. on PAS, vol.
are seeing more “downstream” effects of system disturbances PAS-100, no. 1, Jan. 1981.
which take place after the first correct protection operation, e.g., [11] , “Evaluation and testing of line protections for series compensated
the mal-operation of relays on a parallel line following the cor- transmission lines,” in IEE DPSP 97 Proceedings, IEE Conference Pub-
lication No. 434.
rect opening of the breakers on the adjacent line. To deal with [12] L. P. Cavero, “Computer aided evaluation and application of distance
such situations requires interactive testing with real time simu- relays,” in IEE DPSP 93 Proceedings, IEE Conference Publication no.
lators and relays, or off-line studies including accurate models. 368.
[13] J. R. Lucas and P. G. McLaren, “Some problems in relaying series
Even when a real time simulator is being used to test a single compensated lines,” in Proceedings of IEEE CCECE Conference, Sept.
relay or controller in interactive mode the other relays and con- 1990, p. 1.1.1.
trollers must be modeled on the simulator to allow complete [14] P. G. McLaren, E. N. Dirks, R. P. Jayasinghe, G. W. Swift, and Z. Zhang,
“Using a real time digital simulator to develop an accurate model of a
system testing. digital relay,” in Proceedings of ICDS ’95, College Station, TX, USA.
[15] T. S. Sidhu, M. S. Sachdev, and H. C. Wood, “A computer-aided design
tool for developing digital controllers and relays,” IEEE Trans. on In-
dustry Applications, vol. 28, no. 6, pp. 1376–1383, Nov./Dec. 1992.
IX. CONCLUSION [16] A. G. Phadke and J. S. Thorp, Computer Relaying for Power Systems:
Research Study Press Ltd., John Wiley & Sons Inc., 1988.
Software phasor type models are already in widespread use [17] V. Cook, Analysis of Distance Protection: Research Study Press Ltd.,
by relay engineers. Software transient models, generic or de- John Wiley & Sons Inc., 1985.
[18] M. S. Sachdev (Coordinator), “Computer relaying,” IEEE Tutorial
tailed, are increasingly being used by Utilities to examine diffi- Course Text, Publication no. 79 EH0148-7-PWR, 1979.
cult application issues. The information on which such models [19] F. Engler, O. E. Lanz, M. Haggli, and G. Bacchini, “Transient signals
is based is either available from manufacturers, from manufac- and their processing in ultra high-speed directional relay for EHV/UHV
transmission line protection,” IEEE Trans. on Power Apparatus and Sys-
turers leaflets or patents, or from technical papers describing the tems, vol. PAS-104, pp. 1463–1473, June 1985.
relay performance. Software models must be validated against [20] E. O. Schweitzer and J. Roberts III, “Distance relay element design,” in
the performance of the actual relay and the relay engineer must 19th Annual Western Protective Relay Conference, Spokane, WA, Oct.
20–22, 1992.
be careful to use the model only in situations where any assump- [21] D. Hart, D. Novosel, F. Calero, E. Udren, and L. Yang, “Development of
tions on which the model is based, are applicable. a numerical comparator for protective relaying—Part II,” IEEE Trans.
on Power Delivery, vol. 11, no. 3, pp. 1274–1284, July 1996.
[22] G. Benmouyal, “Removal of DC-offset in current waveform using digital
mimic filtering,” IEEE Trans. on Power Delivery, vol. 10, no. 2, pp.
REFERENCES 621–628, Apr. 1995.
[23] “Microprocessor relays and protection systems,” IEEE Tutorial Course
[1] J. Singh, M. S. Sachdev, R. J. Fleming, and A. E. Krause, “Digital IDTM Text, Publication No 88EHO269-1-PWR.
overcurrent relays,” in Proceedings of IEE 1980 DPSP Conference, IEE [24] “Advancements in microprocessor based protection and communica-
Publication no. 185, pp. 84–87. tion,” IEEE Tutorial Course Text, Publication no. 97TP120-0, 1997.
[2] E. O. Schweitzer and A. Aliaga, “Digital programmable time-parameter [25] M. S. Sachdev, M. Nagpal, and T. Adu, “Interactive software for evalu-
relay offers versatility and accuracy,” IEEE Trans. on Power Apparatus ating and teaching digital relaying algorithms,” IEEE Trans. on Power
and Systems, vol. PAS-89, no. 1, pp. 152–157, Jan./Feb. 1980. Systems, vol. 5, no. 1, pp. 346–352, Feb. 1990.
[3] W. O. Kennedy, B. J. Gruell, C. H. Shih, and L. Yee, “Five years ex- [26] H. C. Wood, M. S. Sachdev, and T. S. Sidhu, “Tools for computer
perience with a new method of testing cross and quadrature polarized aided development of microprocessor based power system relays,” in
relays—Part I: Results and observations,” IEEE Trans. on Power De- Proceedings of the IEEE IAS 1987 Conference, 1987, Publication no.
livery, vol. 3, no. 3, pp. 880–886, July 1988. 87CH2499-2, pp. 1733–1737.
[4] , “Five years experience with a new method of testing cross and [27] M. Kesunovic and Q. Chen, “A novel approach for interactive protective
quadrature polarized relays—Part II: Three case studies,” IEEE Trans. system simulation,” IEEE Trans. on Power Systems, vol. 12, no. 2, pp.
on Power Delivery, vol. 3, no. 3, pp. 887–893, July 1988. 668–694, Apr. 1997.