Abstract:
A circuit for measuring the root-mean-square (RMS) value of an electrical signal. The output may be linear or logarithmic. The circuit uses devices with logarithmic voltage/ current characteristics (usually transistors), and allows the logarithmic devices to be connected directly together without intervening operational amplifiers. In its simplest form, the invention consists of a rectifier circuit, four transistors and a capacitor.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to electrical circuits which measure the root-mean-square (RMS) value of electrical signals. 
     The RMS value of an electrical signal is an important signal parameter because it represents the signal&#39;s power. 
     One type of apparatus for measuring a signal&#39;s RMS value which is well known in the prior art measures the heat dissipated by the signal in a resistive load, using some sort of temperature transducer. However, such apparatus have the disadvantages of long settling time for the measurements and limited dynamic range. 
     The most common type of prior art apparatus for measuring RMS values uses electrical circuits to perform a sequence of operations on the signal which is equivalent to the mathematical expression defining the RMS value. For example, the mathematical definition of RMS requires squaring the instantaneous value of a signal, then averaging this over time, then taking the square root of this average value. 
     In the prior art, the practically universal means for performing the squaring and square-rooting operations is by using the logarithmic voltage-current characteristic of semiconductor diodes and transistors. This technique relies on the principle that the product of two numbers may be obtained by computing the logarithm of each of the two numbers, summing the two results, and then taking the anti-logarithm of the sum. This technique is popular because logarithmic amplifiers and summers are much easier to design than multipliers. 
     The most common type of prior art RMS measuring circuit includes three separate sub-circuits in cascade which perform the squaring, averaging and square-rooting operations, respectively. One disadvantage of such circuits is that their means for summing the logarithms of signals depends on precision trimming of resistors or matching of logarithmic elements. For example, a prior art RMS circuit may include a sub-circuit for squaring a quantity; i.e., for raising that quantity to a power of two. However, unless certain critical components are precisely matched or trimmed, the sub-circuit&#39;s output will actually equal the quantity raised to a power not quite equal to two. The resulting errors, because of their nonlinearity, are almost impossible to correct. 
     Another disadvantage of such prior art circuits is their complexity; i.e., their large number of components. One obvious consequence of using a large number of components is high cost. Another is that, when fabricated on an integrated circuit chip, the circuit occupies a large area on the chip, thereby decreasing the yield of the fabrication process or preventing the inclusion of additional circuits on the chip to perform related functions. A further disadvantage of using a large number of components is that this usually restricts the frequency response of the circuit. 
     An RMS measuring circuit that overcomes most of the disadvantages of the foregoing type of circuit is disclosed in U.S. Pat. No. 3,743,949 to Engel et al. The disclosed circuit uses a combination of four bipolar transistors and a capacitor in place of the aforementioned separate sub-circuits for squaring, averaging and square-rooting. The disclosed circuit requires no calibration adjustments to minimize nonlinearities. It also has the advantage of requiring far fewer components than the previously described type of circuit. 
     Although it has the important advantages just described, the RMS measuring circuit disclosed by Engel et al. has various inherent shortcomings. One shortcoming is that the RMS measurement suffers nonlinear errors because a time-varying proportion of the input is diverted from the logarithm-computing transistors to the base of one of the antilog-computing transistors. Another shortcoming is that the disclosed means for maintaining a substantially constant voltage across the antilog-computing part of the circuit comprises a zener diode which undesirably increases the current drain from the power supply. Such current drain can significantly reduce battery life in a battery-powered portable instrument. A further shortcoming of the circuit disclosed by Engel is that the high frequency response is limited by the interelectrode capacitance of the transistors. 
     Another shortcoming is that the disclosed circuit does not provide measurement results in logarithmic units. Logarithmic RMS measurements, typically in units of &#34;decibels,&#34; are commonly preferred by engineers in the communications and acoustics fields. A further shortcoming of the disclosed circuit is that the output signal it provides has an alternating component that must be filtered out to obtain the desired RMS measurement result. 
     Various embodiments of the pesent invention overcome one or more of the above disadvantages. 
     SUMMARY OF THE INVENTION 
     The present invention is an improved RMS measuring circuit having one or more of the following features. 
     One feature is that the RMS measuring circuit provides an output signal not requiring any additional filtering or averaging and not requiring the use of an additional capacitor in the RMS circuit. 
     Another feature is that the RMS circuit provides a logarithmic output signal. 
     Another feature is that the RMS circuit includes an additional transistor for reducing errors caused by the diversion of input current from the logarithm-computing transistors to the antilog-computing transistors. 
    
    
     BRIEF DESCRIPTION OF DRAWINGS 
     FIG. 1 is a schematic diagram of a basic RMS measuring circuit similar to a prior art design. 
     FIG. 2 is a schematic diagram of an improved RMS circuit comprising an additional transistor 7. 
     FIG. 3 is a schematic diagram of a variation of the basic circuit in which transistors 1, 2 and 4 are replaced by diodes. 
     FIG. 4 is a schematic diagram of an improved RMS circuit which has a logarithmic output. 
     FIG. 5 is a schematic diagram of a variation of the embodiment of FIG. 4 in which the ground reference point is moved. 
     FIG. 6 is a schematic diagram of an embodiment which combines some of the features shown in FIGS. 2 and 5. 
     FIG. 7 is a schematic diagram of an improved RMS circuit having a linear output which needs no additional averaging. 
     FIG. 8 is a schematic diagram of an embodiment which combines some of the features shown in FIGS. 2 and 5. 
    
    
     DESCRIPTION OF PREFERRED EMBODIMENTS 
     The present invention comprises various improvements over a basic RMS measuring circuit disclosed in U.S. Pat. No. 3,743,949 to Engel et al. Since understanding the basic circuit is helpful in understanding the present invention, the basic circuit will be described first. 
     FIG. 1 is a schematic diagram of a basic RMS measuring circuit similar to that disclosed in the Engel et al. patent. In this embodiment, the average value of the output signal is proportional to the RMS value of the input signal. 
     In this embodiment, the input signal whose RMS value is to be measured is a voltage V I  connected between node 11 and ground. Rectifying means 6, connected to node 11, produces a current I 1  proportional to the absolute value of the input voltage V I . In other words, I 1  =G |V I  |, where G is a gain constant determined by the rectifying means 6. 
     In the circuit disclosed by Engel et al., rectifying means 6 is simply a conventional full wave bridge rectifier circuit. Such a rectifying means is especially suitable when the input signal is a current instead of a voltage. In the latter case, the preferred embodiment of rectifying means 6 is described in U.S. Pat. No. 3,840,813. It is the portion of the circuit illustrated in FIG. 2 thereof which consists of the components labeled 8 through 13 and 21. 
     The current I 1  divides into two current paths, one path through bipolar transistors 1 and 2, and another path into the base of bipolar transistor 3. If transistor 3 has a large current gain, its base current will be much less than the current I 2  through transistors 1 and 2. Therefore, I 2  approximately equals I 1 . 
     As is characteristic of all bipolar transistors, transistors 1 and 2 each have an emitter-base voltage equal to the logarithm of a quantity proportional to the emitter current I 2 . Because transistors 1 and 2 are connected in series, the total voltage drop across them equals two times the logarithm of a quantity proportional to the emitter current I 2 . 
     This total voltage is applied across the emitter-base junctions of bipolar transistors 3 and 4 connected in series, so that the total voltage is divided between these two transistors. The voltage drop across each transistor&#39;s emitter-base junction interrelates with that transistor&#39;s emitter current. Specifically, the emitter currents I 3  and I 4  of transistors 3 and 4, respectively, are proportional to the anti-logarithm of the emitter-base voltages of transistors 3 and 4, respectively. 
     Capacitor 5 affects the way the total voltage is divided between transistors 3 and 4, and thus affects their emitter currents, by bypassing the AC component of I 3  so that I 4  equals the time average of I 3 . The significance of this will be explained in the subsequent detailed discussion of the circuit&#39;s theory of operation. 
     The output signal is current I 0  which flows through output node 12. This output current is taken from the collector of transistor 3 and almost exactly equals that transistor&#39;s emitter current I 3 . 
     This output current I 0  may be converted to an output voltage V 0  by connecting a resistor 13 between output node 12 and ground. 
     To complete the above paths of current flow, a path of current flow must be provided between node 10 and ground. In the preferred embodiment, this is done by connecting between node 10 and ground a negative voltage source V cc . 
     To demonstrate how this circuit computes the RMS value of the input voltage V I , it is necessary to describe the circuit&#39;s operation in mathematical terms. 
     In this discussion, voltage V I  and currents I 1  through I 4  shall be defined as they were defined above. In addition, V 1  through V 4  shall be defined as the respective base-emitter voltages of the four transistors. 
     It is well known in the art that the emitter current I and base-emitter voltage V in a bipolar transistor are related as follows: 
     
         I=I.sub.s [exp(Vq/kT)-1]                                   (1) 
    
     where 
     I s  =the transistor&#39;s emitter-junction saturation current with the collector shorted to the base, 
     q=the charge of an electron, 
     k=Boltzmann&#39;s constant, 
     T=the transistor&#39;s absolute temperature. 
     To obtain the desired logarithmic relationship between V and I, it is necessary that the exponential term in equation (1) be much greater than the &#34;minus one&#34; term, so the latter term may be omitted. This will occur if V is at least a few times greater than (kT/q), the latter being only 25 mv at room temperature. This is equivalent to requiring that I&gt;&gt;I s . This requirement may be satisfied by selecting the gain constant G of the rectifying means 6. This simplifies eqn. (1) to 
     
         I=I.sub.s exp[V(q/kT)]                                     (2a) 
    
     Taking the logarithm of both sides 
     
         V=(kT/q)ln(I/I.sub.s)                                      (2b) 
    
     Eqn. (2b) now will be applied to the circuit of FIG. 1. First, use Kirchoff&#39;s voltage law that the sum of the voltages around a closed loop equals zero. 
     
         O=V.sub.1 +V.sub.2 -V.sub.3 -V.sub.4                       (3) 
    
     Now substitute eqn. (2b) into eqn. (3), remembering that I 2  is the emitter current of both transistors 1 and 2. 
     
         O=(k/q)[T.sub.1 ln(I.sub.2 /I.sub.s1)+T.sub.2 ln(I.sub.2 /I.sub.s2)-T.sub.3 ln(I.sub.3 /I.sub.s3)-T.sub.4 ln(I.sub.4 /I.sub.s4)] 
    
     Multiplying both sides by (q/k), and then exponentiating both sides: 
     
         1=(I.sub.2 /I.sub.s1)T.sub.1 (I.sub.2 /I.sub.s2)T.sub.2 (I.sub.s3 /I.sub.3)T.sub.3 (I.sub.s4 /I.sub.4)T.sub.4               (4) 
    
     If all four transistors are at the same temperature T, this simplifies to 
     
         (I.sub.2).sup.2 =rI.sub.3 I.sub.4                          (5a) 
    
     where r is the constant 
     
         (I.sub.s1 I.sub.s2)/(I.sub.s3 I.sub.s4)                    (5b) 
    
     Eqns. (4) and (5) demonstrate that maintaining all four transistors at the same temperature is critical to the accuracy of the squaring and square-rooting operations of the circuit. For example, if the four temperatures are unequal, I 2  may be raised to some power other than 2. 
     The simplest and best way to ensure this is to fabricate all four transistors in a single package, preferably on a single monolithic integrated circuit. 
     One advantage of this circuit is that it has no factors other than temperature which affect the accuracy of the squaring characteristic shown in eqn. (5a). 
     The circuit preferably has no discrete resistors whatsoever in the squaring and square-rooting circuit, and any mismatching among transistors merely changes the linear scale factor r in eqn. (5), which can easily be compensated for by a simple gain adjustment. 
     An important key to the operation of the circuit is the way capacitor 5 interrelates I 3  and I 4 . As will be seen, capacitor 5 contributes to each of the three steps of the RMS operation--squaring, averaging, and square-rooting. 
     First, apply Kirchoff&#39;s current law to the node to which capacitor 5 and transistors 3 and 4 are all connected, and then take the time average of both sides of the equation. Letting I c  denote the current through capacitor 5, and letting an overbar denote the time average of a signal, we have: 
     
         I.sub.3 =I.sub.4 +I.sub.c 
    
     
         I.sub.3 =I.sub.4 +I.sub.c                                  (6) 
    
     The voltage across capacitor 5 is proportional to the integral over all time of the current through the capacitor. Hence, the time average value of the current I c  through the capacitor in response to a steady-state input signal must, after some initial transients, become zero; otherwise, the capacitor&#39;s voltage would approach infinity. Therefore, I c  =0. This simplifies eqn. (6) to: 
     
         I.sub.3 =I.sub.4                                           (7) 
    
     If capacitor 5 is large enough, it will bypass almost all of the AC components of the current I 3 , leaving I 4  an essentially constant DC value. Equivalently, if capacitor 5 is large enough, the AC component of voltage V 4  will be negligible compared to the DC component. Since V 4  is essentially constant, I 4  must also be essentially constant. 
     Since I 4  is essentially constant, its value at all times equals its average value; i.e., 
     
         I.sub.4 =I.sub.4 
    
     Combining this with eqn. (7): 
     
         I.sub.4 =I.sub.4 =I.sub.3                                  (8) 
    
     Averaging both sides of eqn. (6a), and then applying eqn. (8): ##EQU1## 
     Taking the square root of both sides: ##EQU2## where RMS (I 2 ) denotes the RMS value of I 2 . 
     The final step is to relate I 2  and I 4  to the input and output signals V I  and I 0 , respectively. 
     The output current I 0  is the collector current of transistor 3, which substantially equals transistor 3&#39;s emitter current I 3  if transistor 3 has a large current gain. In other words, 
     
         I.sub.0 =I.sub.3                                           (10) 
    
     Substituting eqn. (10) into eqn. (8): 
     
         I.sub.4 =I.sub.3 =I.sub.0                                  (11) 
    
     The operation of the input circuit relies on two assumptions. The first is that transistor 3 has a large current gain so that its base current I B  is negligible relative to its emitter current I 3 . The second is that I 2  and I 3  are on the same order of magnitude, so that I B  is also negligible relative to I 2 . Since I 1  =I 2  +I B , this means that I 1  =I 2 . As stated earlier, I 1  =G V I . Therefore: 
     
         I.sub.2 =I.sub.1 =G V.sub.1                                (12) 
    
     Substituting eqns. (11) and (12) into eqn. (9): ##EQU3## 
     Equation (13) expresses the desired result that the average value of the output current I 0  is proportional to the RMS value of the input voltage V I . 
     If one wishes to obtain an output voltage V 0  instead of an output current, it suffices to connect a resistor 13 of value R between output node 12 and ground, so that V 0  =I 0  R, and ##EQU4## 
     Eqns. (13) and (14) indicate that the output signal I 0  or V 0  must be averaged in order to obtain the desired RMS value. In practice, this is no problem because the output signal is usually connected to a display device which inherently responds to the average value of the signal. The most commonly used display device, a D&#39;Arsonval meter, has this averaging characteristic. 
     The other commonly used display device is a digital display driven by an analog-to-digital (A/D) converter. The type of A/D converter most commonly used in manually operated measuring instruments is the dual-slope integrating type. This type of A/D inherently has the required characteristic of responding to the average value of the signal. 
     If the output signal is applied to a device which does not have the required averaging characteristic, the average value of the output signal may be obtained by applying it to an integrator or a low-pass filter, such as a capacitor, as would be obvious to one skilled in the art. 
     One advantage of the circuit is its freedom from component matching requirements. According to eqn. (5), the degree to which transistors 1 through 4 are mismatched only affects the value of r, which, according to eqns. (13) and (14), merely changes the linear scale factor of the output signal I o  or V o . If r is unknown or inconsistent, the circuit can be calibrated easily by adding a gain adjustment to the input or output, or by adjusting G or R. 
     On the other hand, if one prefers to eliminate the need for individual calibration, this may be accomplished by closely matching the emitter junction saturation currents I s  of transistors 1 through 4. Very close matching is feasible if all four transistors are fabricated on a single monolithic integrated circuit. According to eqn. (5b), this would ensure that r=1,  thereby eliminating r from eqns. (13) and (14). This would leave the linear scale factor dependent only on G and R, which may be determined by precision resistors, hence eliminating the need for individual calibration. 
     One feature of the present invention is a refinement which improves the accuracy of the basic RMS measuring circuit. As illustrated in FIG. 2, the refinement consists of transistor 7 and terminal 14, to which a positive voltage source V DD  may be connected. According to the discussion preceding eqn. (12), the accuracy of the RMS circuit is reduced to the extent I 2  is less than I 1  because part of I 1  supplies the base current I B  of transistor 3. To the extent this occurs, the resulting errors in I 2  will be nonlinear because I B  is not linearly proportional to I 1 , which makes the problem more serious than if I 2  differed from I 1  by only a proportionality constant. Although I B  is insignificant if transistor 3 has a very large current gain, if a transistor 7 is added as shown in FIG. 2, the effect of I B  on I 2  is further divided by the current gain of transistor 7. 
     It is obvious to one skilled in the art that, in any of the circuits discussed, all NPN transistors can be replaced with PNP transistors and all voltage and current polarities reversed. 
     It also is obvious that any of the transistors whose base and collector are connected together, such a transistor being referred to in the art as a diode-connected transistor, can be replaced with a semiconductor diode. For example, FIG. 3 illustrates a modification of the circuit of FIG. 1 in which transistors 1, 2 and 4 are replaced by semiconductor diodes 1a, 2a and 4a. 
     In some applications it is useful for an output signal to be a logarithmic, instead of linearly proportional, function of the RMS value of the input signal. According to the present invention, this may be accomplished by modifying any of the circuits shown in FIGS. 1, 2 and 3 to provide a logarithmic output signal equal to the voltage across capacitor 5. This merely requires connecting two output terminals to either side of the capacitor, so that the logarithmic output voltage appears across these two terminals. 
     For example, FIG. 4 shows the circuit obtained by adding this modification to the circuit shown in FIG. 3. The logarithmic output voltage V LOG  appears across terminals 16 and 17. 
     If I o  and V o  are not desired to be used, terminal 12 may be grounded, or else transistor 3&#39;s collector may be grounded directly and terminal 12 omitted. A further possible modification, as shown in FIG. 5, would be to redefine the ground reference point by substituting a ground connection for terminal 10 and connecting voltage source V cc  to terminal 12. This has the advantage of placing output terminal 17 at ground potential. 
     The circuits shown in FIGS. 1 and 2 can be modified similarly. If the circuit shown in FIG. 2 is modified in this manner, it is unnecessary for voltage sources V cc  and V DD  to be distinct. Terminals 12 and 14 may both connect to a single positive voltage source, as shown in FIG. 8. 
     If I o  and V o  are not desired to be used, an alternative to grounding transistor 3&#39;s collector is to connect it to transistor 3&#39;s base. This will not work in the circuits of FIG. 1, 3, 4 or 5 because transistor 3 is required to prevent I 3  from reducing I 2 . However, it will work in the circuit of FIG. 2 because transistor 7 therein prevents I 3  from reducing I 2 . FIG. 6 shows a modification of the circuit of FIG. 2 in which the collector and base of transistor 3 are connected together, and in which the ground reference point is moved to terminal 17 in the manner already discussed in connection with FIG. 5. 
     According to the present invention, these circuits with logarithmic output voltages can be converted to circuits with linear output currents by adding another transistor 8 whose base and emitter connect to terminals 16 and 17 across which appears the logarithmic output voltage, and whose collector connects to an output terminal 18 through which flows the output current I o . FIG. 7 illustrates the circuit obtained by applying these modifications to the circuit of FIG. 4. 
     The type of circuit just described has one important advantage over those shown in FIGS. 1 through 3. This type has an output current which already has been averaged by capacitor 5, and is therefore directly proportional to the RMS value of the input signal without requiring any additional averaging. This type of circuit is useful in applications in which the output current is connected to a display device which does not inherently perform the averaging function. (See the discussion following equation (14), above.) 
     Another feature of the present invention is that it can be implemented so that, in addition to measuring RMS values, it operates as a squaring circuit. Each of the circuits shown in FIGS. 1, 2 and 3 has this feature; i.e., each has a time-varying output signal I o  or V o  proportional to the square of the value of the input signal V I . This squaring operation may be verified by applying to eqn. (5a) the fact, from eqn. (8), that I 4  is essentially constant. This yields the result that I 3  is proportional to I 2  squared. Applying eqns. (10) and (12) to this result yields the stated relationship that I o  and V o  are proportional to V I  squared. 
     If the input signal is a sine wave, each of these circuits also acts as a frequency doubler, because squaring a sine wave produces a signal whose AC component is a sine wave at twice the frequency of the original sine wave.