Abstract:
A numerical comparator employs numerical techniques based upon the behavior of the cylinder unit to compare phasors in real time. In one application, the torque signal generated by the numerical comparator, M k+1 , is employed to determine whether a fault has occurred in a transmission line. Another application involves employing the output M k+1  to determine the direction of power flow in the transmission line. In yet another application, the output M k+1  is used to determine whether a voltage or current has exceeded a predetermined threshold. In yet another application, time dependent waveforms of positive and negative symmetrical sequence components are digitally produced.

Description:
RELATED APPLICATIONS 
     This is a continuation of application Ser. No. 08/453,236, filed May 30, 1995, now abandoned, which is a division of Ser. No. 08/326,720, filed Oct. 20, 1994, now entitled: A Process and Apparatus for Comparing in Real Time Phase Differences Between Phasors, and now U.S. Pat. No. 5,576,618, issued on Nov. 19, 1996. 
    
    
     FIELD OF THE INVENTION 
     The present invention relates generally to a numerical comparator for comparing two phasor quantities in real time, and more particularly to a numerical comparator for use in protective relaying. 
     BACKGROUND OF THE INVENTION 
     Protective relaying generally involves the performance of one or more of the following functions in connection with a protected power or energy system: (a) monitoring the system to ascertain whether it is in a normal or abnormal state; (b) metering, which involves measuring certain electrical quantities; (c) protection, which typically involves tripping a circuit breaker in response to the detection of a short-circuit condition; and (d) alarming, which provides a warning of some impending problem. In connection with these and other ancillary functions, such as fault detection, detection of power flow direction, over-current detection, etc., the protective relaying system must compare phasor quantities (voltages and currents). Generally, the faster such a comparison can be made, the better. 
     Prior to the present invention, protective relays compared phasor quantities using frequency domain techniques such as the Fourier transform. A primary goal of the present invention is to provide methods and apparatus for comparing phasor quantities in real time. 
     SUMMARY OF THE INVENTION 
     The present invention employs numerical techniques, based upon the behavior of the cylinder unit (described below), to compare phasors in real time. The time-dependent procedures disclosed in this specification compare phasors faster than any previously known method. 
     According to the present invention, a real-time process or apparatus for comparing two phasors, represented by waveforms referred to herein as &#34;S1&#34;, &#34;S2&#34;, comprises the steps of or means for obtaining a sample (S1 k ) of the instantaneous magnitude of a first phasor at a first instant of time, and obtaining a sample (S2 k ) of the instantaneous magnitude of a second phasor at the first instant of time; subsequently, obtaining a sample (S1 k+1 ) of the instantaneous magnitude of the first phasor at a second instant of time, and obtaining a sample (S2 k+1 ) of the instantaneous magnitude of the second phasor at the second instant of time; and then obtaining derived quantities B1 k , B2 k , B1 k+1  and B2 k+1  from S1 k , S1 k+1 , S2 k , S2 k+1  ; multiplying B1 k  by B2 k+1  and multiplying B2 k  by B1 k+1  to produce a first product B1 k  B2 k+1  and a second product B2 k  B1 k+1  ; summing the first and second products to produce a sum; and, finally, scaling the sum to produce a result (M k+1 ) indicative of a phase difference, if any, between the first and second phasors. The scaling step preferably comprises multiplying the sum by a predetermined number proportional to the sampling period. 
     The B1 and B2 waveforms are derived from the two inputs to the numerical comparator disclosed herein. These input waveforms are referred as &#34;S1&#34; and &#34;S2&#34;. The relationship between S1 and B1 involves the sampled values S1 k  and S1 k-1 . The relationship between S2 and B2 involves the sampled values S2 k  and S2 k-1 . In the embodiment of the invention described below, these relationships are: ##EQU1## where &#34;RB&#34; and &#34;LB&#34; represent constants set to make the unit more efficient. The same is true for S2 and B2, i.e., FK1 and FK2 are combined with S2 k  and S2 k-1  as shown above for S1. 
     In preferred embodiments of the invention, the waveforms S1(t) and S2(t) are voltages, currents or a combination of voltages and currents that oscillate sinusoidally. 
     In one preferred application of this invention, the result M k+1  is employed to determine whether a fault has occurred in a transmission line. For example, the result can be employed to detect a phase-to-phase fault in a three phase transmission line. In this case, S1(t) and S2(t) are preferably obtained from the phase-to-phase voltages and the phase currents. 
     In another preferred application, the result is employed to detect a phase-to-ground fault in a three-phase transmission line system. In this embodiment of the invention, S1(t) and S2(t) are preferably obtained from the phase-to-ground voltages and the phase currents. 
     Another preferred application of this invention involves employing the result M k+1  to determine the direction of power flow in the transmission line. A transmission line can take the form of a set of three conductors going from point &#34;A&#34; to point &#34;B&#34;. If a device performing the directional function is positioned at point A, the power flow direction (from A to B or from B to A) should be indicated by the directional device. Typically, there are two types of directional units in use--phase and ground. Several types of directional unit are disclosed herein. The phase directional unit utilizes phase-to-phase voltages and phase currents. The ground directional units are the zero sequence polarized ground directional unit, the negative sequence polarized ground directional unit, and the current polarized ground directional unit. In all these units, the position of the input phasors, S1 and S2, phase-wise, with respect to each other, determines whether the power flow direction is &#34;forward&#34; or &#34;reverse.&#34; 
     In yet another application of the present invention, voltages and/or currents are sampled and the result M k+1  is used to determine whether a voltage or current has exceeded a predetermined threshold. 
     In addition, a predetermined constant (MC) can be subtracted from the result M k , and the difference M k  -MC can be employed to obtain a signal (θ k ) indicative of the energy contained in S1 and S2. It should be noted that the present invention provides the protective relaying art a means to compare the phase relationship between S1 and S2 as well as the energy content of the two combined signals. No other numerical method known in the industry has inherently demonstrated the capacity of determining its operation depending on the energy content of the S1 and S2 inputs. This characteristic is necessary in protective relaying applications in which the operating time is inversely related to the energy content. That is, the relationship between the operating time and the energy content of the input signals is inversely related. Methods such as Fourier filtering, widely used in the industry, do not provide any signs of inverseness. The operating speed is totally independent of the energy content of the inputs. 
     In sum, the inputs S1 and S2 to the numerical comparator will determine the characteristics of the unit to be obtained. There are numerous applications for the numerical comparator disclosed herein, including the protective relaying applications described above and others. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 schematically depicts the power system inputs for protective relaying applications and/or numerical comparator applications. 
     FIG. 2A schematically depicts a cylinder unit with inputs S1 and S2. 
     FIG. 2B depicts the expected torque vs. phase angle (between S1 and S2) characteristics of a cylinder unit. 
     FIG. 3A is a block diagram of a numerical comparator in accordance with the present invention. This embodiment of the invention computes M k+1  in real time, wherein M k+1  is analogous to the torque of a cylinder unit. 
     FIG. 3B depicts the phasor characteristics of the numerical comparator depicted in FIG. 3A. FIG. 3B depicts the phasor characteristics of the cylinder unit depicted in FIG. 2A, which are analogous to the phasor characteristics of the numerical comparator and its output M. 
     FIG. 4A depicts a circuit that simulates equations that define the inputs to a numerical comparator-based phase-to-phase distance unit in accordance with the present invention. 
     FIG. 4B is a block diagram of one embodiment of a phase-to-phase distance unit using the delay operator &#34;d&#34;. 
     FIG. 4C depicts a circuit that simulates equations that define the inputs to a numerical comparator based phase-to-ground distance unit in accordance with the present invention. 
     FIG. 4D is a block diagram of one embodiment of a phase-to-ground unit in accordance with the present invention. 
     FIG. 5A depicts the required characteristic of a directional unit on the R-X plane. The directional units described in this specification exhibit this characteristic. 
     FIG. 5B illustrates the idealized cylinder unit and the relationship between M (torque) and θ (angle). 
     FIGS. 5C to 5F depict the processing performed by the numerical comparator directional units in accordance with the present invention. 
     FIG. 6A depicts an analog symmetrical filter components. 
     FIGS. 6B and 6C schematically depict illustrative embodiments of symmetrical components filters in accordance with the present invention. FIG. 6B depicts a Clarke component-based symmetrical components filter. FIG. 6C depicts a direct phase shift symmetrical components filter. 
     FIG. 7 schematically depicts one embodiment of an over-current unit (which can use voltage inputs as well as current inputs) and its implementation along with a trip comparator in accordance with the present invention. (Note that many units derived with the numerical comparator will use the trip comparator, which is a decision making processor.) 
     FIG. 8A depicts the mechanical system analog for the trip comparator. 
     FIG. 8B schematically depicts one embodiment of a numerical trip comparator in accordance with the present invention. 
     FIG. 9 schematically depicts the functionality of the trip comparator. 
     FIG. 10 is an exemplary graph of the output of the trip comparator. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     A. Brief Overview 
     Protective relaying is a science concerned with protecting electrical equipment drawing voltages and currents from a power system. The protective relaying system requires certain inputs from a transmission line 10, which includes three phase conductors A, B, C. FIG. 1 illustrates the traditional way of obtaining the required inputs. As shown, voltage inputs VA, VB, VC are obtained by voltage transformers 12 and current inputs IA, IB, IC are obtained by current transformers 14. The quantities available for the protective relaying apparatus 16 are the phase voltages VA, VB, VC; the zero sequence voltage 3V0=VA+VB+VC; the phase currents IA, IB, IC; and the zero sequence current 3I0=IA+IB+IC. 
     B. Real-Time Phase Comparator Modeled After Cylinder Unit 
     A comparator is a device used in protective relays to compare two phasor quantities in phase and/or magnitude. The cylinder unit 18, schematically depicted in FIG. 2A, is a well-known type of comparator used in electro-mechanical relays. Two outstanding characteristics of the cylinder unit are its insensitivity to DC offset and speed of operation. 
     When two voltages S1 and S2 are applied to the cylinder unit 18, flux densities B1 and B2 are produced. These flux densities are vectors distributed on the surface of the rotating cylinder. If B1 and B2 are time-dependent, currents are induced in the cylinder, and these currents are proportional to the rate of change of B1 and B2, represented as dB1/dt and dB2/dt, and the angle theta (θ), which is the phase difference between S1 and S2. These cylinder currents are directed toward the positive Z axis (i.e., perpendicular to the plane of FIG. 1). Using the vector force equation (below), the force vector field around the surface of the cylinder can be found: 
     
         F=(I×B)l 
    
     The torque on the Z axis is the quantity of interest. This torque can be calculated by summing the torque components. 
     
         M=Σ r×F 
    
     The torque expressed in terms of flux densities B1, B2 is: ##EQU2## where, σ=electric conductivity (mhos/m) 
     π=3.1415 
     r=cylinder radius 
     l=cylinder length 
     T=cylinder thickness. 
     If two time varying voltages S1(t) and S2(t) are applied to the cylinder unit 18, a time varying flux density B(t) will be produced. The flux density B(t) will have components B1(t) and B2(t) related to S1(t) and S2(t) as: ##EQU3## where N1 and N2 are the number of turns of the S1 and S2 input windings. 
     It should be mentioned that these equations do not contain any loss mechanism. The following relationships do contain losses and can be used to relate the S (inputs) and B terms. ##EQU4## where LB and RB are constants that can be determined to make the model more efficient. 
     If S1(t) and S2(t) are sine waves, such as 
     S1(t)=Sin (ωt) 
     S2(t)=Sin (ω+δ), 
     the torque in P.U. (per unit) terms will be: 
     M=0 when δ=0 
     M=-1 when δ=90° 
     M=0 when δ=180° 
     M=1 when δ=270° 
     as depicted in FIG. 2B. 
     To apply the above equations to protective relays based on microprocessors and/or microcontrollers, they can be discretized using the trapezoidal rule: ##EQU5## and the torque can be expressed as: 
     
         M.sub.k =B2.sub.k B1.sub.k-1 -B1.sub.k B2.sub.k-1 
    
     where: 
     k+1=actual sample 
     k=previous sample 
     Δt=sampling period. 
     FIG. 3A is a block diagram of a numerical comparator circuit or system 20 for computing M k . In the system of FIG. 3A, &#34;d&#34; denotes a delay unit; &#34;Σ&#34; denotes a summing unit; &#34;π&#34; denotes a multiplier; and &#34;FK1&#34;, &#34;FK2&#34; are amplifiers. The output M k  of the system 20 represents the real time torque M k  of a comparator having the phasor characteristics depicted in FIG. 3B, which illustrates the operating characteristics of the numerical comparator 20. Having S1 as the reference, a phase difference of 0° to negative 180° indicates operation of the unit. A phase difference of 0° to positive 180° indicates no-operation or restraint of the unit. 
     This procedure can be employed in distance relays, pilot wire relays, directional relays, over-current relays, over/under voltage relays, etc., where a real-time comparison of two phasor quantities is desired. In specific applications of this invention, mechanical influences to the model, such as a restraining spring force, friction force, and/or bias force, can be included as necessary. 
     C. Distance Unit for Fault Detection 
     A procedure for obtaining distance units employing a numerical comparator is described next. 
     Protective relaying concerns the detection of faults in power apparatus. In transmission line relaying, distance relays are used to detect several types of faults in the transmission line. These devices detect faults in transmission lines up to certain reaches or distances. In general, these devices measure the impedance, which is proportional to the distance from the relay location to the fault (hence the name &#34;distance unit&#34;). The digital/numerical distance units derived by this procedure detect faults faster than prior art fault detectors, but otherwise behave like known electromechanical distance units. The numerical methods disclosed herein are less vulnerable to transients and noise than any other time domain method. This is due to the analogy to the cylinder unit, which has shown to operate well under transients. 
     1. Phase-to-Phase Unit 
     To detect phase-to-phase faults, the inputs to the numerical comparator are: 
     
         S1=VA-VB-(IA-IB) 
    
     
         S2=VC-VB-(IC-IB) 
    
     The circuit depicted in FIG. 4A simulates these equations. Therefore, S1(t) and S2(t) may be derived from the phase-to-phase voltages and currents as follows: ##EQU6## 
     If we make the equations discrete and apply them to the cylinder unit model derived above, we obtain: ##EQU7## which are the inputs to the numerical comparator (also called the &#34;torque generator&#34;) derived above. S1 k  and S2 k  are then used to obtain B1 k , B2 k  and M k  as described above. 
     The above equations are discrete realizations of a phase-to-phase distance unit that will detect all types of faults involving two phases and some phase-to-phase-to-ground faults. 
     FIG. 4B is a block diagram of one implementation of the above equations for a phase-to-phase distance unit. Notice that the delta currents Iab and Icb are sampled, delayed and combined with the sampled and delayed delta voltages Vab and Vcb. The combination for each are the inputs to a numerical comparator 20a, which is like the numerical comparator 20 described above. The output of the numerical comparator is coupled to a clipping unit denoted &#34;MM&#34;, which forms part of a trip comparator 30 (described below). The equations for B1 and B2 are implemented and the cross multiplication of B1 k  times B2 k+1  and B1 k+1  times B2 k  is employed to obtain the M k  term. The amplifiers are labelled &#34;A00&#34;, &#34;B00&#34;, &#34;CC&#34;, &#34;EE&#34;, &#34;FF&#34;, &#34;FK1&#34;, and &#34;FK2&#34; in accordance with their gains, as set forth in the following list: 
     A00=Rc+Lc/Δt 
     B00=Lc/Δt 
     CC=Δt 2  /l 
     EE=1/(1+Δt 2  KC/l+Δt KD/l) 
     FF=2+Δt KD/l 
     FK1=(2 LB-Δt RB)/Δt 
     FK2=Δt/(Δt RB+2 LB). 
     (Note that CC, EE and FF are related to the trip comparator). 
     2. Phase-to-Ground Unit 
     The inputs to a well known means for detecting phase-to-ground faults are: 
     
         S1=VA-(IA-K0I0)Zc 
    
     
         S2=VC-VB 
    
     where ##EQU8## 
     The circuit schematically depicted in FIG. 4C simulates the above equations. If these equations are made discrete and are applied to the numerical comparator equations, we obtain: ##EQU9## which are the inputs to the numerical comparator derived above. 
     FIG. 4D is a block diagram of one embodiment of a phase-to-ground unit in accordance with the present invention. The currents and voltages shown are sampled and combined in the adders as shown, and then input to the numerical comparator 20b. The B1 and B2 terms are then cross multiplied and M k  is obtained and fed to the trip comparator 30 (described below). The amplifiers are labelled &#34;A01&#34;, &#34;B01&#34;, &#34;C01&#34;, &#34;E01&#34;, &#34;CC&#34;, &#34;EE&#34;, and &#34;FF&#34; in accordance with their gains, as set forth in the following list: 
     A01=Rc+Lc/Δt 
     B01=Lc/Δt 
     C01=(Kr Rc-Kl Xc)/3+(Kr Xc+Kl RC)/3ω Δt 
     E01=(Kr Xc+Kl RC)/3ω Δt 
     CC=1/(1+Δt KC/l+Δt KD/l) 
     EE=Δt 2  /l 
     FF=2+Δt KD/l. 
     In sum, a general procedure for obtaining impedance units (distance units) has been described. The units obtained are high speed since they require only three sampling periods (k-1, k, k+1) to obtain a trip criterion, regardless of the sampling frequency. Finally, many other distance units can be obtained by the procedure disclosed herein. The above-described distance units, the phase-to-phase distance unit and the ground distance unit (also referred as the quadrature polarized ground distance unit), are just two examples of the different principles used in protective relaying to obtain distance units. The procedure described above can produce any type of distance unit now used in industry requiring the comparison of two phasor quantities. 
     D. Directional Unit 
     Directional units are devices required in protective relaying to indicate the direction of power flow. Ground directional units derived from the numerical comparator disclosed above are fast, making them ideal for protective relaying applications and in combination with distance units derived from the numerical comparator. FIG. 5A illustrates the characteristics of such directional units on the R-X plane. In this example, the forward direction indicates that power is flowing into the transmission line. The reverse direction indicates that power is flowing from the transmission line. 
     Directional units come in two categories, phase directional units and ground directional units. Phase directional units operate under all conditions. Ground directional units operate only when there is an unbalance in the power system. The following directional units have been developed: 
     1. Negative Sequence Polarized Directional Unit 
     Using the output of a numerical symmetrical components filter, the following equations are used to implement a negative sequence polarized directional unit: 
     
         B1.sub.k =FK2 (V2.sub.k +2 V2.sub.k-1 +V2.sub.k-2 -FK1 B1.sub.k-1) 
    
     
         B2.sub.k =FK2 (I2.sub.k +2 I2.sub.k-1 +I2.sub.k-2 -FK1 B2.sub.k-1) 
    
     
         M.sub.k =B2.sub.k B1.sub.k-1 -B1.sub.k B2.sub.k-1 
    
     In the above equations, V2 and I2 are outputs of the numerical symmetrical components filter, an example which is described below. 
     2. Zero Sequence Polarized Directional Unit 
     The following equations can be used to implement a zero sequence polarized ground directional unit: 
     
         B1.sub.k =FK2 (3V0.sub.k +2·3V0.sub.k-1 +3V0.sub.k-2 -FK1 B1.sub.k-1 
    
     
         B2.sub.k =FK2 (AA 3I0.sub.k +AB 3I0.sub.k-1 +BB 3I0.sub.k-2 -FK1 B2.sub.k-1) 
    
     
         M.sub.k =B2.sub.k B1.sub.k-1 -B1.sub.k B2.sub.k-1 
    
     where: ##EQU10## 
     In the above equations, 3V0=VA+VB+VC and 3I0=IA+IB+IC. 
     3. Current Polarized Ground Directional Unit 
     If Ipol(t) is an input from a grounding point in the power system, a ground directional unit can be implemented with the following equations: ##EQU11## 
     4. Phase Directional Unit 
     A phase directional unit can be implemented with the following equations: 
     
         B1.sub.k =FK2(-VCB.sub.K -2 VCB.sub.K-1 -VCB.sub.K-2 -FK1B1.sub.K-1) 
    
     
         B2.sub.2 =FK2(AA IA.sub.K +ABIA.sub.K-1 +BBIAK-2-FK1 B2.sub.K-1) 
    
     
         M.sub.k =B1.sub.k-1 B2.sub.k -B2.sub.k-1 B1.sub.k 
    
     where: ##EQU12## and VCB is the delta voltage (VC-VB). 
     Other directional units can be implemented with the numerical comparator disclosed above. The above equations determine the &#34;torque&#34; of the unit, which can be combined with a numerical trip comparator. 
     FIGS. 5C to 5F depict the processing performed for the directional units. 
     FIG. 5C illustrates the data flow for the negative sequence polarized ground directional unit, which comprises a numerical comparator 20c and a trip comparator 30. The V2 and I2 inputs to the numerical comparator 20c are derived from a symmetrical components filter. The implementation of the equations of the negative sequence polarized ground directional units combines the samples of V2 and I2 to produce the B1 and B2 terms that are cross multiplied to obtain the M k  term, which is fed to the trip comparator 30. The amplifiers labelled &#34;CC&#34;, &#34;EE&#34;, &#34;FF&#34;, &#34;FK1&#34;, and &#34;FK2&#34; have the following gains: 
     CC=1/(1+Δt 2  KC/l+Δt KD/l) 
     EE=Δt 2  /l 
     FF=2+Δt KD/l 
     FK1=(2 LB-Δt RB)/Δt 
     FK2=Δt/(Δt RB+2 LB). 
     FIG. 5D illustrates the data flow of the zero sequence polarized ground directional unit. The 3V0 and 3I0 terms are derived from the actual power system samples (3V0=VA+VB+VC and 3I0=IA+IB+IC). The implementation of the equations of the zero sequence polarized ground directional unit combines the samples of 3V0 and 3I0 to produce the B1 and B2 terms that are input to the numerical comparator 20d and cross multiplied to obtain the M k  term fed to the trip comparator 30. The amplifiers labelled &#34;AA55&#34;, &#34;BB55&#34; and &#34;AB55&#34; have the following gains: 
     AA55=sqrt(3)/4-1/(4π f Δt) 
     BB55=sqrt(3)/4+1/(4π f Δt) 
     AB55=AA55+BB55. 
     FIG. 5E illustrates the data flow of the current polarized ground directional unit comprising a numerical comparator 20e and a trip comparator 30. The 3I0 term input to the numerical comparator is derived from the actual power system samples (3I0=IA+IB+IC) and the Ipol samples are the actual samples of a current obtained from a suitable grounding point of the power system. The implementation of the equations of the current polarized ground directional unit combines the samples of 3I0 and Ipol to produce the B1 and B2 terms that are cross multiplied to obtain the M k  term fed to the trip comparator. 
     FIG. 5F illustrates the data flow of the phase directional unit (phase A) comprising a numerical comparator 20f and a trip comparator 30. The VCB term input to the numerical comparator is VC-VB, where VC and VB are the actual samples from the C and B phases. IA is the phase A current. This implementation of the equations of the phase directional unit combines the samples of VCB and IA to produce B1 and B2 terms that are cross multiplied to obtain the M k  term fed to the trip comparator. The amplifiers labelled &#34;AA52&#34;, &#34;BB52&#34; and &#34;AB52&#34; have the following gains: 
     AA52=1/4+sqrt(3)/(4π f Δt) 
     BB52=1/4+sqrt(3)/(4π f Δt) 
     AB52=AA52+BB52. 
     The above-described procedures are exemplary procedures for directional units. Those skilled in this art will recognize that other directional units can be obtained with the invention disclosed herein. 
     E. Symmetrical Components Filter 
     Symmetrical component quantities are required for fast and reliable relaying of different parts of the power system. The procedures described below provide the symmetrical components in a time-dependent manner. These procedures are required employed in fast directional units and/or distance units. Three procedures will now be described. 
     1. Simulation of Existing Analog Filter 
     FIG. 6A depicts an analog filter. The positive and negative sequence components in discrete form are given by the following equations: ##EQU13## Constants C1, R1, C2 and R2 can be fine-tuned to obtain the corresponding optimized equations. There will be a set of R1, C1, R2 and C2 constants that produce the smallest error and the correct phase shift. 
     2. Direct Phase Shift 
     The symmetrical component equations are: 
     
         I1=1/3 (I.sub.A +a IB+a.sup.2 IC) 
    
     
         I2=1/3 (IA+a.sup.2 IB+a IC) 
    
     These equations can be implemented by using the phase shifting identities, ##EQU14## Therefore, in discrete form: ##EQU15## 
     3. Clarke Components Derivation 
     By definition, the Clarke components are: ##EQU16## It follows that: 
     
         3I1=1/2 (Iα+jIβ) 
    
     
         3I2=1/2 (Iα-jIβ) 
    
     Using the operator: ##EQU17## it follows that: ##EQU18## Making the equations discrete: ##EQU19## This implementation is the simplest. However, a further step to &#34;align&#34; the time with respect to the derivatives can be performed to reduce errors and increase the accuracy of the method: ##EQU20## 
     FIGS. 6B and 6C schematically depict illustrative embodiments of symmetrical components filters in accordance with procedures 3 (Clarke components) and 2 (Direct phase shift), respectively. 
     FIG. 6B illustrates the combination of IA, IB and IC samples to obtain the Iα and Iβ components and later manipulate them, according to the above equations, to obtain the I1 and I2 (positive and negative) components of the currents. The same process could be performed for voltages to obtain the positive and negative sequence components of the voltages. The amplifiers labelled &#34;A&#34; and &#34;B&#34; have the following gains: 
     A=1/4 
     B=1/(4π f Δt). 
     FIG. 6C illustrates the combination of IA, IB and IC samples, using the direct phase shift equivalent (the A and B constants), to obtain the I1 and I2 components of the currents. The same procedure could be followed to obtain the positive and negative sequence components of voltages. In this embodiment, amplifiers &#34;A&#34; and &#34;B&#34; have the following gains: 
     A=-1/2 
     B=sqrt(3)/(4π f Δt). 
     F. Over-Current Unit 
     The over-current unit disclosed below employs a numerical algorithm that is fast and unaffected by DC offsets. It can be used as a level detector for voltage or current. 
     To implement a single input over-current unit, one of the numerical comparator inputs should be phase-shifted. 
     Using this criterion, the following equations can be employed to provide an over-current unit free of the effects of DC offset. This unit is extremely fast. 
     
         B1.sub.k =FK2 (IA.sub.k +IA.sub.k-1 -FK1 B1.sub.k-1) 
    
     
         B2.sub.k =FK2 (IA.sub.k +2IA.sub.k-1 +IA.sub.k-2 -FK1 B2.sub.k-1) 
    
     
         M.sub.k =B1.sub.k-1 B2.sub.k -B2.sub.k-1 B1.sub.k 
    
     This output &#34;torque&#34; (M k ) can be fed into the numerical trip comparator and the opposing torque constant, MC, can be adjusted for the trip level. In the above equations, IA could be a current, voltage, or any other power system quantity (such as a symmetrical component). 
     FIG. 7 schematically depicts one embodiment of an over-current unit 20g and its implementation in accordance with the present invention. The inputs to the numerical comparator, in this embodiment, are derived as shown from the single quantity IA. The samples are combined to obtain the B1 and B2 quantities, as expressed in the above equations. The output, M k , can be used to feed the numerical trip comparator 30 described below. Amplifiers &#34;FK1&#34; and &#34;FK2&#34; have the following gains: 
     FK1=(2 LB-Δt RB)/Δt 
     FK2=Δt/(Δt RB+2 LB) 
     RB=1.0 
     LB=0.001. 
     G. Trip Comparator 
     The procedure described next can be used in the implementation of a numerical trip comparator relay unit. The numerical trip comparator is a complement of all the embodiments described above. The trip comparator makes the trip decision. In other words, it decides when to indicate the operation of the unit to which it is connected. 
     A numerical model of the travel of an electro-mechanical cylinder unit contact should resemble the electromechanical operation of the cylinder unit. The numerical comparator depicted in FIG. 3A was employed to develop the numerical trip comparator disclosed herein. 
     In FIG. 8A: 
     θ=the angle of travel, 
     θ T  =the trip angle, 
     M=the electro-mechanical torque, 
     MS=the opposing spring (force) torque, 
     MC=the constant opposing torque, 
     I=the moment of inertia of the cylinder. 
     The electromechanical equation for the model is: ##EQU21## If the equation is discretized, θ k  can be expressed as: ##EQU22## In the numerical trip comparator, the following conditions are applied: 1. If (M k  -MC)&lt;0, then the next θ k  is zero. 
     2. If θ k  &gt;θ T , then the next θ k  is set to θ T , and a trip is issued. 
     FIG. 8B schematically depicts one embodiment of a numerical trip comparator 30 in accordance with the present invention. The trip comparator receives as input the torque M k  (generated in any of the above-described units) and, as shown in the FIG. 8B, it is limited to -MM&lt;M k  &lt;+MM and then the opposing bias torque MC is subtracted from M k . The rest of the circuitry implements the above equations. The output θ k  is later compared to θ T  for a trip, as mentioned in condition 2. The gains of amplifiers &#34;CC&#34;, &#34;EE&#34;, and &#34;FF&#34; are disclosed above. 
     Referring now to FIGS. 9 and 10, which illustrate the operation of the trip comparator, this unit issues a logic &#34;0&#34; (false) if the unit has not operated and issues a logic &#34;1&#34; (true) if the unit has operated. The variable &#34;0&#34; is the input to the block and is compared to upper and lower limits. It should be mentioned that FIG. 10 illustrates typical limits; however, other limits can be used. 
     If the instantaneous value of 0 is greater than 0.6 (in this example a logic &#34;1&#34; (true) is issued to the protective relaying logic in the microprocessor-based apparatus. If it is less than 0.6, a logic &#34;0&#34; (false) is issued to the protective relaying logic in the microprocessor-based apparatus. The limits of the variable are from 0 to 1 in this example. 
     Those skilled in the art will appreciate that the present invention can be embodied in apparatus and processes not exactly like those described hereinabove. The numerical trip comparator is used in protective relaying to implement numerically the function(s) of a phase comparator. The cylinder unit in electromechanical relays is the building block of many different units used in protective relaying, including distance units, directional units, over/undercurrent units, over/undervoltage units, pilot wire and other specialized applications. The numerical comparator is another phase comparator unit that can be used to develop relaying units like the ones discussed above. 
     The development of the numerical comparator algorithms described above resulted from the analysis of the behavior or the cylinder unit, but the equations have been modified. They are not an exact model of the cylinder unit. Indeed, the flexibility of the equations, factors, multiplier, ranges, etc., which are the equations to be implemented in microprocessor based apparatus, allow the designer to accommodate the behavior of the unit with more flexibility than an actual cylinder unit.