Systems and methods for calibrating power measurements in an electrosurgical generator

09918775 ยท 2018-03-20

Assignee

Inventors

Cpc classification

International classification

Abstract

The disclosed electrosurgical systems and methods accurately determine the power actually applied to a load by using equalizers to calibrate the power measurements. The electrosurgical systems include an electrosurgical generator and an electrosurgical instrument coupled to the electrosurgical generator through an electrosurgical cable. The electrosurgical generator includes an electrical energy source, voltage and current detectors, equalizers that estimate the voltage and current applied to a load, and a power calculation unit that calculates estimated power based upon the estimated voltage and current. The methods of calibrating an electrosurgical generator involve applying a resistive element across output terminals of the electrosurgical generator, applying a test signal to the resistive element, measuring the magnitude and phase angle of voltage and current components of the test signal within the electrosurgical generator, estimating the magnitude and phase angle of the voltage and current at the resistive element using equalizers, and determining gain correction factors and minimum phase angles for the equalizers.

Claims

1. An electrosurgical generator comprising: an electrical energy source; an output stage coupled to the electrical energy source and configured to generate an electrosurgical signal based on electrical energy output by the electrical energy source; a voltage detector coupled to the output stage and configured to detect a voltage at an output of the output stage; a current detector coupled to the output stage and configured to detect a current at the output of the output stage; an equalizer configured to estimate voltage and current applied to a load based on the detected voltage and current; and a power calculation unit configured to calculate power applied to the load based on the estimated voltage and current, wherein the equalizer includes a gain element and an all-pass filter and is configured to minimize an error between the calculated power and a power based on the detected voltage and current.

2. The electrosurgical generator according to claim 1, wherein the equalizer includes: a voltage equalizer configured to estimate the voltage applied to the load; and a current equalizer configured to estimate the current applied to the load.

3. The electrosurgical generator according to claim 1, wherein the equalizer is a parametric equalizer.

4. The electrosurgical generator according to claim 3, wherein the parametric equalizer is one of a shelving boost filter, a shelving cut filter, or a peak filter.

5. The electrosurgical generator according to claim 1, wherein the power calculation unit is configured to calculate actual power applied to the load.

6. The electrosurgical generator according to claim 1, further comprising analog-to-digital converters electrically coupled to the current and voltage detectors.

7. The electrosurgical generator according to claim 1, further comprising a digital signal processor, which includes the equalizer and the power calculation unit.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) Various embodiments of the present disclosure are described with reference to the accompanying drawings wherein:

(2) FIG. 1 is an illustration of an electrosurgical system in accordance with embodiments of the present disclosure;

(3) FIG. 2 is a block diagram of the electrosurgical generator of FIG. 1 coupled to a medical instrument in accordance with embodiments of the present disclosure;

(4) FIG. 3 is a block diagram of the equalizer of FIG. 2 in accordance with an embodiment of the present disclosure;

(5) FIG. 4 is a block diagram of the equalizer of FIG. 2 in accordance with another embodiment of the present disclosure;

(6) FIG. 5 is a block diagram of the equalizer of FIG. 2 that includes a fractional delay line filter block in accordance with another embodiment of the present disclosure;

(7) FIGS. 6A and 6B are block diagrams of the fractional delay line block of FIG. 5 in accordance with embodiments of the present disclosure;

(8) FIGS. 7A-7C are block diagrams of equalizers in accordance with other embodiments of the present disclosure;

(9) FIG. 8 is a block diagram of an equalizer in the form of a digital comb filter in accordance with other embodiments of the present disclosure;

(10) FIG. 9 is a block diagram of the electrosurgical generator of FIG. 1 coupled to a test accessory in accordance with embodiments of the present disclosure; and

(11) FIG. 10 is a flow diagram of a method of calibrating power measurements in an electrosurgical generator in accordance with other embodiments of the present disclosure.

DETAILED DESCRIPTION

(12) FIG. 1 illustrates a bipolar and monopolar electrosurgical system 100 in accordance with embodiments of the present disclosure. The electrosurgical system 100 includes an electrosurgical generator 102 that measures and calculates the power delivered to a load through an electrosurgical instrument. The electrosurgical generator 102 performs monopolar and bipolar electrosurgical procedures, including vessel sealing procedures. The electrosurgical generator 102 may include a plurality of outputs (e.g., terminals 104 and 106) for interfacing with various electrosurgical instruments (e.g., a monopolar active electrode 108, a return pad 110, bipolar electrosurgical forceps 112, and a footswitch (not shown)). The electrosurgical generator 102 also includes electronic circuitry that generates radio frequency power for various electrosurgical modes (e.g., cutting, coagulating, or ablating) and procedures (e.g., monopolar, bipolar, or vessel sealing).

(13) The electrosurgical system 100 includes a monopolar electrosurgical instrument 114 having one or more electrodes 108 for treating tissue of a patient (e.g., an electrosurgical cutting probe or ablation electrodes). Electrosurgical energy, e.g., radio frequency (RF) current, is supplied to the instrument 114 by the electrosurgical generator 102 via a supply line 116, which is connected to an active terminal 104 of the electrosurgical generator 102, allowing the instrument 114 to coagulate, seal, ablate and/or otherwise treat tissue. The electrosurgical current returns from the tissue via a return line 118 of the return pad 110 to a return terminal 106 of the electrosurgical generator 102. The active terminal 104 and the return terminal 106 may include connectors (not explicitly shown) configured to interface with plugs (also not explicitly shown) disposed at the end of the supply line 116 of the instrument 114 and at the end of the return line 118 of the return pad 110.

(14) The electrosurgical system 100 includes return electrodes 120 and 122 within return pad 110 that are arranged to minimize the risk of tissue damage by maximizing the overall contact area with the patient's tissue. In addition, the electrosurgical generator 102 and the return pad 110 may be configured to monitor tissue-to-patient contact to insure that sufficient contact exists between the return pad 110 and the patient to minimize the risk of tissue damage.

(15) The electrosurgical system 100 also includes a bipolar electrosurgical forceps instrument 112 having two or more electrodes (e.g., electrodes 124, 126) for treating tissue of a patient. The instrument 112 includes opposing jaw members 134, 136. The first jaw member 134 includes an active electrode 124 and the second jaw member 136 includes a return electrode 126. The active electrode 124 and the return electrode 126 are connectable to the electrosurgical generator 102 through cable 128, which includes a supply line 130 and a return line 132. The supply line 130 is connectable to the active terminal 104 and the return line 132 is connectable to the return terminal 106. The instrument 112 connects to the active terminal 104 and the return terminal 106 of the electrosurgical generator 102 through a plug (not explicitly shown) disposed at the end of the cable 128.

(16) The electrosurgical generator 102 may be any suitable type of generator (e.g., electrosurgical or microwave) and may include a plurality of connectors to accommodate various types of electrosurgical instruments (e.g., instrument 114 and electrosurgical forceps 112). The electrosurgical generator 102 may also be configured to operate in a variety of modes, such as ablation, monopolar cutting, bipolar coagulation, and other modes. The electrosurgical generator 102 may include a switching mechanism (e.g., relays) to switch the supply of RF energy between the connectors. For example, when the instrument 114 is connected to the electrosurgical generator 102, the switching mechanism switches the supply of RF energy to only the monopolar plug. The active terminal 104 and the return terminal 106 may be coupled to a plurality of connectors (e.g., inputs and outputs) of the electrosurgical generator 102 to power a variety of instruments.

(17) The electrosurgical generator 102 includes suitable input controls (e.g., buttons, activators, switches, or touch screens) for controlling the electrosurgical generator 102. In addition, the electrosurgical generator 102 may include one or more display screens for providing the user with a variety of output information (e.g., intensity settings and treatment complete indicators). The controls allow the user to adjust parameters of the RF electrical energy (e.g., the power or the waveform) so that they are suitable for a particular task (e.g., coagulating, tissue sealing, or cutting). The instruments 112 and 114 may also include a plurality of input controls that may be redundant with certain input controls of the electrosurgical generator 102. Placing the input controls at the instruments 112 and 114 allow for easier and faster modification of RF energy parameters during the surgical procedure without requiring interaction with the electrosurgical generator 102.

(18) FIG. 2 is a block diagram of the electrosurgical generator 102 of FIG. 1 and a corresponding medical instrument 201 in accordance with embodiments of the present disclosure. The electrosurgical generator 102 includes a controller 200, a high voltage power supply 202, and a radio frequency output stage 204. The controller 200 includes a microprocessor 206 and a memory 209. The microprocessor may be any suitable microcontroller, microprocessor (e.g., Harvard or Von Neumann architectures), PLD, PLA, or other suitable digital logic. Memory 209 may be volatile, non-volatile, solid state, magnetic, or other suitable storage memory.

(19) Controller 200 may also include various circuitry (e.g., amplifiers or buffers) that serves as an interface between the microprocessor 206 and other circuitry within the electrosurgical generator 102. Controller 200 receives various feedback signals that are analyzed by the microprocessor 206 to provide control signals based on the feedback signals. The control signals from controller 200 control the HVPS 202 and the RF output stage 204 to provide electrosurgical energy to tissue, represented by a load 210 (Z.sub.load).

(20) The HVPS 202 includes an energy conversion circuit 208, which converts AC from an AC source or direct current (DC) from a DC source at a first energy level into DC at a second different energy level. The energy conversion circuit 208 supplies the DC power at the second different energy level to the RF output stage 204 based on control signals from the controller 200. The RF output stage 204 inverts the DC power output from the energy conversion circuit 208 to produce a high-frequency alternating current (e.g., RF AC), which is applied to the load 210. For example, the RF output stage 204 may generate a high-frequency alternating current using push-pull transistors coupled to a primary side of a step-up transformer (not shown).

(21) The electrosurgical generator 102 and controller 200 include circuitry that determines and controls the power actually applied to the load 210 (Z.sub.load). The average power at the load 210 may be calculated according to the equation:
P.sub.avg=V.sub.rms.Math.I.sub.rm.Math.cos .sub.VI,
where P.sub.avg is the average power in watts, V.sub.rms is the root-mean-square value of the sinusoidal load voltage V.sub.load, I.sub.rms is the root-mean-square value of the sinusoidal load current I.sub.load, and .sub.VI is the phase angle between the load voltage V.sub.load and the load current I.sub.load.

(22) Alternatively, the average power may be calculated according to the equation:

(23) P avg = 1 T t 1 - T t 1 v ( t ) .Math. i ( t ) d t ,
where T is the averaging time constant, v(t) is the load voltage as a function of time, and i(t) is the load current as a function of time. The controller 200 uses the calculated average power at the load as feedback to control the energy conversion circuit 208 so that the average power at the load is equal to a power level set by the user to achieve a desired tissue effect.

(24) As shown in FIG. 2, electrosurgical generators typically include a voltage sensor 211 and a current sensor 212 coupled to the output of the RF output stage 204 to sense a voltage and a current for the average power calculations. The voltage sensor 211 measures the voltage across the output leads of the RF output stage 204 and provides an analog signal representing the measured voltage to an analog-to-digital converter (ADC) 215. ADC 215 converts the analog signal to a digital signal. The current sensor 212 measures the current on the output lead of the RF output stage 204 that is connected to the output terminal 104 of the electrosurgical generator 102. The current sensor 212 provides an analog signal representing the measured current to an ADC 215, which converts the analog signal to a digital signal.

(25) In some electrosurgical generators, the digital voltage and current signals are used to calculate the average power at the load. However, processing delays associated with the measurement circuitry (i.e., the sensors 211, 212 and ADCs 215) and electrical parasitic components in the cable 205 and in the measurement circuitry may introduce errors into the voltage and current measurements. Because of errors in the measurements, the magnitude of the measured voltage may not be equal to the magnitude of the voltage actually applied to the load 210, and/or the magnitude of the measured current may not be equal to the magnitude of the current actually applied to the load 210, and/or the phase difference between the measured voltage and current may not be equal to the phase difference between the voltage and current actually applied to the load 210. As a result, the average power calculated based on the magnitudes of the voltage and current and their phase difference may not be equal to the average power actually applied to the load 210.

(26) The systems and methods according to embodiments of the present disclosure minimize these measurement errors by introducing equalizers to equalize the power measurements made in the electrosurgical generator 102 to the actual power applied to the load 210. As shown in FIG. 2, the electrosurgical generator 102 incorporates equalizers 221 (e.g., filters or algorithms). A first equalizer 221 is coupled in series with the voltage sensor 211 and a corresponding ADC 215 and a second equalizer 221 is coupled in series with the current sensor 212 and a corresponding ADC 215.

(27) The equalizers 221 are implemented in a digital signal processor (DSP) 220 of the controller 200. The equalizers 221 receive measurements from the sensors 211, 212 and generate an estimated load voltage {circumflex over (V)}.sub.load and an estimated load current .sub.load. The DSP 220 also implements an average estimated power calculator 225 that calculates the average estimated power at the load {circumflex over (P)}.sub.avg based on the estimated load voltage {circumflex over (V)}.sub.load and the estimated load current .sub.load. The average estimated power calculator 225 includes a multiplier 224 that multiplies the estimated load voltage {circumflex over (V)}.sub.load by the estimated load current .sub.load and an integrator 226 that integrates the output from the multiplier 224 to obtain the average estimated power at the load {circumflex over (P)}.sub.avg.

(28) The DSP 220 communicates the calculated average estimated power at the load {circumflex over (P)}.sub.avg to the microprocessor 206, which uses the average estimated power at the load {circumflex over (P)}.sub.avg to control the energy conversion circuit 208. For example, the microprocessor 206 may execute a Proportional-Integral-Derivative (PID) control algorithm based on the average estimated power at the load {circumflex over (P)}.sub.avg and a desired power level, which may be selected by a user, to determine the amount of electric current that should be supplied by the energy conversion circuit 208 to achieve and maintain the desired power level.

(29) FIG. 3 is a block diagram of an equalizer 221 that uses a least means squares (LMS) finite impulse response (FIR) adaptive filter according to an embodiment of the present disclosure. The equalizer 221 includes an LMS filter 302, an LMS weight adaptation unit 304, a desired response input unit 306, and an average estimated power ({circumflex over (P)}.sub.avg) calculator 308. The equalizer may be implemented using a polyphase structure, such as the polyphase structure shown in FIG. 6B. The LMS filter 302 filters a digital input value x.sub.k (e.g., a digital value representing the measured voltage or the measured current) based upon a weight vector W.sub.k+1 to produce a filtered output value y.sub.k. The weight vector W.sub.k+1 is produced by the LMS weight adaptation unit 304 based upon the filtered output value y.sub.k and a desired response d.sub.k.

(30) The desired response d.sub.k for the LMS adaptation unit 304 may be a pre-computed pseudo-filter, or time sequence. The desired response d.sub.k may have an idealized magnitude and phase versus frequency response of a converged adaptive filter in the electrosurgical system. For instance, if the converged output current from the system matches the pre-measured magnitude and phase values at one or more frequencies, then this information is used to construct a sequence d.sub.k and/or the pseudo-filter.

(31) A desired response sequence d.sub.k may be constructed during a calibration process for the electrosurgical generator 102. For a single frequency f.sub.1, the calibration process first involves using the RF Output Stage 204 to generate the following test signal:
x(t)=A.sub.1 sin(2f.sub.1t).
where the amplitude A.sub.1 is a measured or known value. The test signal is applied to a resistive load (e.g., the test resistor 910 of FIG. 9), which is chosen to provide minimal phase shift for a nominal voltage and current. The desired response unit 306 then generates a desired response sequence d.sub.k.

(32) The desired response sequence d.sub.k is formed by sampling a sinusoidal calibration signal d(t) having a known amplitude of excitation or the same amplitude as the test signal x(t) (i.e., A.sub.1), but delayed according to a measured or known phase .sub.1 between the input of the ADCs 215 and the output y.sub.k of the adaptive filter (i.e., the combination of the LMS filter 302 and the LMS adaptation unit 304). In other words, the phase .sub.1 represents the delays introduced by the ADCs 215 and other electronic or digital components disposed between the RF Output Stage 204 and the output y.sub.k of the LMS filter 302. Such a calibration signal may be expressed as follows:
d(t)=A.sub.1 sin(2f.sub.1t+.sub.1).

(33) For multiple frequencies f.sub.n, where n=1, . . . , N, the calibration process involves using the RF Output Stage 204 to generate the following series of test signals:
x.sub.n(t)=A.sub.n sin(2f.sub.nt),
where n=1, . . . , N and the amplitudes A.sub.n are measured or known values. The series of test signals are summed together and applied to a resistive load (e.g., the test resistor 910 of FIG. 9).

(34) The desired response sequence d.sub.k for multiple frequencies is formed by sampling the sum of multiple sinusoidal calibration signals given by the expression:
d.sub.n(t)=A.sub.n sin(2f.sub.nt+.sub.n),
where n=1, . . . , N. The calibration signals d.sub.n(t) have known amplitudes of excitation or the same amplitudes as the respective test signals x.sub.n(t) (i.e., A.sub.n), but are delayed according to measured or known phases .sub.n between the input of the ADCs 215 and the output y.sub.k of the adaptive filter (i.e., the combination of the LMS filter 302 and the LMS adaptation unit 304).

(35) At the end of adaptation, the estimated phases or delays of the voltage and current will be equal to or approximately equal to each other at desired frequencies of interest, leaving only a difference between the measured phases or delays of the voltage current. Also, the magnitudes of the measured voltage and current will be identical to or approximately identical to the respective magnitudes of the estimated voltage and current.

(36) FIG. 4 is a detailed block diagram of an equalizer 221 that uses an LMS filter according to other embodiments of the present disclosure. The LMS filter 302, which may be a finite impulse response (FIR) filter, includes a series of time shifting units 402a-402n and a series of weighting units 404a-404n coupled to the digital input signal x.sub.k. During operation, the updated weight vector W.sub.k+1 is fed from the LMS adaptation unit 304 to the LMS filter 302 and becomes the current weight vector W.sub.k, which includes weight values w.sub.0k, w.sub.1k, . . . , w.sub.Lk. The first weighting unit 404a multiplies the digital input signal x.sub.k by the first weight value w.sub.0k of the current weight vector W.sub.k. The time-shifting units 402b-n time shift the digital input signal x.sub.k to obtain time-shifted digital input signals x.sub.k1, x.sub.k2, . . . , x.sub.kL. The digital input signal x.sub.k and the time-shifted digital input signals x.sub.k1, x.sub.k1, . . . , x.sub.kL together form a digital input vector X.sub.k.

(37) As shown in FIG. 4, the weighting units 404b-n are connected to respective outputs of the time-shifting units 402b-n. In this configuration, the weighting units 404b-n multiply the time-shifted digital input signals x.sub.k1, x.sub.k1, . . . , x.sub.kL of the digital input vector X.sub.k by respective weight values w.sub.1k, . . . , w.sub.Lk of the current weight vector W.sub.k. The results of time-shifting and weighting the digital input signal x.sub.k are added together by an adder 406 to obtain the digital output signal y.sub.k.

(38) The digital output signal y.sub.k is fed back to the LMS weight adaptation unit 304, in which the digital output signal y.sub.k is subtracted from the desired response d.sub.k by a subtractor 408 to obtain a digital error signal e.sub.k. The LMS weight adaptation unit 304 includes an update computation unit 410 that uses the digital error signal e.sub.k, the input vector X.sub.k, and the weight vector W.sub.k to compute an updated weight vector W.sub.k+1 according to the following LMS update equation:
W.sub.k+1=W.sub.k+2e.sub.kX.sub.k,
where is chosen by the designer and is bounded by:

(39) 0 < < 1 ( L + 1 ) ( Signal Power of X _ k ) .

(40) The advantage of an equalizer 221 using the LMS filter 302 is that it can accurately equalize the voltage and current measurements at all frequencies of interest. The LMS filter may be trained when the generator is calibrated. The LMS filter 302 may also be trained periodically throughout the life of the electrosurgical generator 102. In some embodiments, once the LMS filter 302 is trained, the LMS weight adaptation unit 304 does not adapt the weight vector W.sub.k+1, but keeps it fixed.

(41) FIG. 5 is an equalizer 221 according to another embodiment of the present disclosure. The equalizer 221 compensates for the gain and phase (in terms of delay) at a single frequency. The equalizer 221 includes a gain unit 502 and a fractional delay line 504. The gain unit 502 amplifies an input signal x(n) according to a gain correction factor K.sub.CF, which is determined from a calibration procedure described below. During the calibration procedure, the gain correction factor K.sub.CF is adjusted until the magnitude of the signal output from block 504 matches a test signal (e.g., a measured or known reference signal) input to the voltage sensor 211 and the current sensor 212 of FIG. 2. This is similar to the results of the LMS adaptation at a single frequency described above.

(42) The amplified input signal is then applied to the fractional delay line 504, which may be expressed as z.sup.t.sup.CF, where t.sub.CF is the time-delay correction factor. The time-delay correction factor t.sub.CF may be determined through a calibration procedure where the nominal phase or delay differences through the voltage sensor 211 and the current sensor 212 are matched or made equal to a measured or known reference value. The fractional delay line 504 may combine an interpolation stage with a decimation stage to arrive at fractional sample delay times. The fractional delay line 504 feeds an output signal y(n) to the average estimated power calculator 225 of FIG. 2.

(43) The calibration procedure for determining the gain correction factor K.sub.CF may involve using a test accessory 905 together with the electrosurgical generator 102 of FIG. 2, as illustrated in the block diagram FIG. 9. The test accessory 905 includes a test resistance 910 (R.sub.test) that represents a load, a voltage reference meter 901 for measuring the voltage across the test resistance 910, and a current reference meter 902 for measuring the current passing through the test resistance 910. The test accessory 905 may include connectors that allow the test accessory 905 to be removed from or connected to the terminals 104, 106 of the electrosurgical generator 102. In other embodiments, the test accessory 905 may be integrated into the electrosurgical generator 102.

(44) The test accessory 905 is used to calibrate the sensors 211, 212 and equalizers 221, 222 for magnitude and phase at one or more frequencies. The calibration process first involves applying the test resistance R.sub.test of the test accessory 905 across the output terminals 104, 106. The value of the test resistance R.sub.test is selected to provide minimal phase shift for a nominal voltage and current. Then, the RF Output Stage 204 generates one or more test signals at desired frequencies .sub.d. Next, a reference voltage magnitude v and a phase angle .sub.v are measured at each of the desired frequencies .sub.d using the voltage reference meter 201. Also, a reference current magnitude i and phase angle .sub.i are measured at each of the desired frequencies .sub.d using the current reference meter 202. At the same time, the voltage sensor 211, the current sensor 212, the ADCs 215, and the equalizers 221 produce an estimated voltage magnitude {circumflex over (v)} and phase angle {circumflex over ()}.sub.v and an estimated current magnitude and phase angle {circumflex over ()}.sub.i at each of the desired frequencies .sub.d of the test signals.

(45) For each desired frequency .sub.d, the gain correction factors for the voltage and current equalizers K.sub.EQ.sub._.sub.V(.sub.d) and K.sub.EQ.sub._.sub.I(.sub.d) are calculated according to the following equations:

(46) K EQ _ V ( d ) = .Math. v ^ .Math. .Math. v .Math. ( d ) and K EQ _ I ( d ) = .Math. i ^ .Math. .Math. i .Math. ( d ) .
Then, for each desired frequency .sub.d, the minimum phases of the equalizers .sub.EQ.sub._.sub.V(.sub.d) and .sub.EQ.sub._.sub.I(.sub.d) are determined such that {circumflex over ()}.sub.v={circumflex over ()}.sub.i and .sub.v.sub.i={circumflex over ()}.sub.v{circumflex over ()}.sub.i. It is desirable to achieve minimum phase or delay because the voltage and current measurements are in a closed loop and excessive phase or delay reduces the phase margin or bandwidth of the closed loop.

(47) FIG. 10 is a flow diagram of a general method of calibrating an electrosurgical generator according to embodiments of the present disclosure. After starting in step 1001, a resistive element having appropriate characteristics is selected in step 1002. In step 1004, the resistive element is applied across the output terminals of the electrosurgical generator. In step 1006, a test signal is generated at a desired frequency, and, in step 1008, the test signal is applied to the resistive element.

(48) In step 1008, first magnitude values and first phase angle values of voltage and current components of the test signal are measured at the output terminals. In step 1010, second magnitude values and second phase angle values for the voltage and current components of the test signal are estimated using a first equalizer for the voltage component (e.g., the equalizer 221 of FIG. 2) and a second equalizer for the current component (e.g., the equalizer 221 of FIG. 2). In step 1012, gain correction factors, e.g., K.sub.EQ.sub._.sub.V(.sub.d) and K.sub.EQ.sub._.sub.I(.sub.d), for the first and second equalizers are determined based upon the measured and estimated magnitudes of the voltage and current components of the test signal. Finally, before the calibration process ends (step 1015), the minimum phase angle for the first and second equalizers is determined in step 1014 based on the measured and estimated phase angles of the voltage and current components of the test signal obtained in steps 1008 and 1010. The minimum phase angle information may be used to determine the time-delay correction factor t.sub.CF.

(49) The fractional delay line 504 of FIG. 5 may be implemented with a multi-rate structure. FIG. 6A is a diagram of a multi-rate structure 600a for obtaining a fractional fixed delay of l/M samples. The input signal x(n), which has been sampled at the sample frequency F.sub.s, is applied to an interpolator 602. The interpolator 602 up-samples the input signal x(n) by a factor of M(F.sub.s.Math.L) to obtain an up-sampled or interpolated signal v(m). The up-sampled signal v(m) is then filtered by a digital lowpass filter 604 to remove the images (i.e., the extra copies of the basic spectrum) created by the interpolator 602. The resulting filtered signal u(m) is then delayed by l samples by a delay unit 606. Finally, the output w(n) from the delay unit 606 is down-sampled by a factor of M by the decimator 608 to obtain an equalized output signal y(n) at the original sample frequency F.sub.s.

(50) FIG. 6B is a diagram of an efficient polyphase implementation 600b of the multi-rate structure of FIG. 6A. This implementation includes a series of transversal FIR filters 612a-612n that filter the input signal x(n). The transversal FIR filters 612a-612n are given by the following difference equation:
p.sub.r(n)=h.sub.Lowpass(nM+r),0r(M1).
The delay of l is implemented as the initial position of the commutator switch (l selector) 614 corresponding to the sample at n=0.

(51) FIGS. 7A-7C are diagrams of equalizers 221 that combine a simple gain with an all-pass delay filter. The all-pass delay may be either a first-order or second-order all-pass filter. The all-pass filter may be better at modeling the group delay across a relatively narrow bandwidth of interest than a simple gain combined with a fractional delay, which may be good at a single frequency, but may not be better than the LMS adaptive filter in magnitude and phase across a broad band of frequencies.

(52) In the Laplacian s-domain, a first-order all-pass filter, which may be used to change delay or phase but not magnitude, is represented by the following transfer function:

(53) A ( s ) = s - 0 s + 0 .
The magnitude of the first-order all-pass transfer function is:

(54) .Math. A ( s ) .Math. = .Math. H ( s ) .Math. = .Math. s - 0 .Math. .Math. s + 0 .Math. = 0 2 + c 2 0 2 + c 2 = 1
and the phase (in radians) is:

(55) ( c ) = - 2 tan - 1 ( c 0 ) ,
where the phase angle is 0 degrees when .sub.c=0, 90 degrees when .sub.c=.sub.0, and 180 degrees when .sub.c>>.sub.0. By fixing .sub.c, the phase (.sub.c) is set by .sub.0. The group delay of the first-order all-pass transfer function is given by:

(56) T gd = 2 0 0 2 + c 2 .

(57) The first-order all-pass filter is implemented in the digital domain. There are many ways to implement the first-order all-pass filter. One method is to apply the bilinear transform by replacing the Laplacian variable s with

(58) 2 T ( 1 - z - 1 1 + z - 1 ) ,
where T is the sample period. Then, the digital all-pass transfer function becomes

(59) H ( z ) = 1 - k 1 z - 1 k 1 - z - 1 , where k 1 = 1 + T 2 0 1 - T 2 0 .
This digital all-pass transfer function may be implemented by the following difference equation:

(60) 0 y ( n ) = 1 k 1 .Math. x ( n ) - k 1 .Math. x ( n - 1 ) + 1 k 1 .Math. y ( n - 1 )

(61) Another method to implement a first-order all-pass filter is to use a simple feedforward/feedback digital comb filter having the following transfer function:

(62) H ( z ) = a - z - M 1 + a .Math. z - M ,
where a is a constant and M is an arbitrary integer delay and M0. This transfer function may be implemented by the following difference equation:
y(n)=a.Math.x(n)+x(nM)a.Math.y(nM).

(63) FIG. 8 shows a digital circuit that implements the feedforward/feedback digital comb filter. The digital circuit includes first and second adders 801, 803, first and second multipliers 802, 804, constant blocks 811, 812, and a delay block 815, which provides a delay of M samples. The second multiplier 804 multiplies the output of the delay block 815 by a constant a. The first adder 801 adds the output from the second multiplier 804 to the input x(n) and provides the result to the delay block 815. The first multiplier 802 multiplies the output from the first adder 801 by a constant a. The second adder 802 adds the output of the first multiplier 802 to the output of the delay block 815 to produce the output y(n).

(64) Another type of filter that combines an all-pass delay with a gain is a shelving filter. The shelving filter can be used to perform weighting of certain frequencies while passing other frequencies. The shelving filter can be useful in emphasizing the signal band of interest. A first-order parametric shelving filter transfer function is given by

(65) H ( s ) + 1 2 [ 1 + A ( s ) ] + V 0 2 [ 1 - A ( s ) ] ,
where A(s) is the first-order all-pass transfer function described above.

(66) To implement a digital shelving filter, the first-order transfer function H(s), which is in the s-domain, is converted to the z-domain. The transfer function H(s) may be converted to the z-domain using the bilinear transform to obtain the following transfer function:

(67) H ( z ) + 1 2 [ 1 + A ( z ) ] + V 0 2 [ 1 - A ( z ) ] , where A ( z ) = - ( a + z - 1 ) 1 + a z - 1 ,

(68) a = tan ( c T 2 ) - V 0 tan ( c T 2 ) + V 0
for a frequency response that provides a cut, and

(69) a = tan ( c T 2 ) - 1 tan ( c T 2 ) + 1
for a frequency response that provides a boost.

(70) The frequency response of the transfer function that provides a cut attenuates a range of frequencies and passes (i.e., applies a gain of 1 to) an adjacent range of frequencies. On the other hand, the frequency response of the transfer function that provides a boost amplifies a range of frequencies and passes an adjacent range of frequencies. The response of the shelving filter may be modified by independently controlling the cutoff/center frequency .sub.c and the gain V.sub.0.

(71) The shelving filter transfer function H(z) may be implemented with the equalizer structures shown in FIGS. 7A-7C. As shown in FIG. 7A, the equalizer 221 includes an all-pass delay filter 711 (A(z)), an adder 721, and a subtractor 722. The all-pass delay filter 711 filters the input signal x(n) to obtain a filtered signal. The all-pass delay filter A(z) 711 may be implemented as a difference equation that is computed with a digital signal processor. The adder 721 adds the filtered signal to the input signal x(n) and the subtractor 722 subtracts the filtered signal from the input signal x(n).

(72) The equalizer 221 of FIG. 7A also includes a first multiplier 723, a second multiplier 724, and an adder 725 coupled together. The first multiplier 723 multiplies the output from the adder 721 by a first gain 731 of 0.5 (or a 1-bit shift to the right) and the second multiplier 724 multiplies the output from the subtractor 722 by a second gain 732 of V.sub.0/2, where V.sub.0 is the gain of the all-pass filter when the frequency is zero. Finally, the adder 725 adds the outputs from the first multiplier 723 and the second multiplier 724 to obtain the output signal y(n).

(73) FIG. 7B is an equalizer 221 according to another embodiment of the present disclosure. The equalizer 221 of FIG. 7B includes the same components and connections as the equalizer 221 of FIG. 7A except that the components and connections of the equalizer 221 of FIG. 7B are arranged differently. FIG. 7C is an equalizer 221 according to yet another embodiment of the present disclosure. The input signal x(n) is filtered by the all-pass delay filter 711 and then multiplied by the gain (1V.sub.0)/2 (733) using the first multiplier 723. The input signal x(n) is multiplied by the gain (1+V.sub.0)/2 (734) using the second multiplier 724. Then, the adder 725 adds the results of the first and second multipliers together to obtain an equalized output signal y(n).

(74) Another embodiment of the equalizer 221 may use a peak filter to boost or cut any desired frequency. A second-order peak filter may be implemented with the equalizers 221 of FIGS. 7A-7C, where the all-pass transfer function in the Z-domain is given by:

(75) A ( z ) = z - 2 + d ( 1 + a BC ) z - 1 + a BC 1 + d ( 1 + a BC ) z - 1 + a BC z - 2 , where d = - cos ( C ) , V 0 = H ( e C ) , a B = 1 - tan ( b T 2 ) 1 + tan ( b T 2 ) , and a C = V 0 - tan ( b T 2 ) V 0 + tan ( b T 2 ) .
The center frequency f.sub.c of the peak filter is determined by the parameter d, the bandwidth f.sub.b is determined by the parameters a.sub.B and a.sub.C, and the gain is determined by the parameter V.sub.0.

(76) Using the equalizers 221 of FIGS. 7A-7C, power measurements may be calibrated in a manner similar to the examples described above by first determining the desired gain and phase. The desired gain is determined based upon the difference between the measured ratio of gains and an ideal or reference ratio of gains and the desired phase is determined based upon the difference between the measured phase and an ideal or reference phase. Then, it is determined whether the gain represents a cut (e.g., V.sub.0<0) or a boost (e.g., V.sub.0>0). Finally, the digital all-pass transfer function A(z) having appropriate parameters is substituted into the equalizers 221 of FIGS. 7A-7C.

(77) Although the illustrative embodiments of the present disclosure have been described herein with reference to the accompanying drawings, it is to be understood that the disclosure is not limited to those precise embodiments, and that various other changes and modifications may be effected therein by one skilled in the art without departing from the scope or spirit of the disclosure.