Analog subtractor with absolute value of output voltage
By using a comparator circuit composed of an integrated operational amplifier and electronic switches, and by using a gating gate to select the input signal, the problem of the subtractor's output voltage being an absolute value is solved, and the output voltage is made positive under a single power supply, thus avoiding the influence of the diode's forward voltage drop.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies struggle to achieve an absolute output voltage for a subtractor under single-power supply conditions, and traditional methods suffer from voltage amplitude reduction due to diode forward voltage drop.
A comparator circuit composed of an integrated operational amplifier and an electronic switch is used to select the input signal using the "highest gating gate" and the "lowest gating gate". Combined with the non-inverting and inverting input terminals of the operational amplifier, the absolute value subtractor is realized by controlling the resistor through the electronic switch, thus avoiding the forward voltage drop of the diode.
This ensures that the subtractor output voltage is always positive, avoiding the forward voltage drop of the diode and improving the accuracy and reliability of the voltage amplitude.
Smart Images

Figure CN121785556A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a technology for an operational amplifier-based arithmetic unit, and more particularly to a subtractor design technology, wherein the output voltage of the subtractor is always positive, that is, the output voltage is an absolute value. Background Technology
[0002] The application of integrated operational amplifiers is primarily reflected in their ability to form various operational circuits. In operational circuits, the input voltage is used as the independent variable and the output voltage is used as a function. When the input voltage changes, the output voltage will change according to certain mathematical laws. That is, the output voltage reflects the result of a certain operation on the input voltage. Common operations include proportional, addition and subtraction, integral, differential, logarithmic, exponential and other basic operational circuits.
[0003] Analysis of the proportional and summation circuits shows that the output voltage has the same polarity as the voltage at the non-inverting input and the opposite polarity to the voltage at the inverting input. Therefore, if multiple signals are applied to the two inputs simultaneously, addition and subtraction operations can be performed.
[0004] If the circuit has only two inputs V a and V b And since they act on the inverting and non-inverting input terminals respectively, and the parameters are symmetrical, the circuit realizes the proportional operation of the differential input signal, that is, the subtraction operation.
[0005] Whether it's addition or subtraction, or even simple subtraction, it all conforms to the rules of mathematical operations, meaning the output voltage value can be positive or negative.
[0006] Therefore, in addition and subtraction operations, if it is desired to operate under a single power supply (positive voltage), regardless of (V) a -V b ) or (V) b -V a The output voltage is always positive, that is, (V a -V b The magnitude or absolute value of ) cannot be achieved by simply relying on the above-mentioned addition or subtraction circuit.
[0007] Of course, the output (positive or negative) of the addition or subtraction circuit can be obtained by using a DC voltage polarity automatic protection circuit (or a battery reverse connection protection circuit). Simply put, first, four rectifier diodes are connected to form a full rectifier bridge. Then, according to the AC power connection method, the AC input terminal is connected to the output of the subtraction circuit, and the DC output terminal is the absolute value of the subtraction circuit output value.
[0008] The drawback of obtaining the absolute value using this method is that, due to the presence of the diode's forward voltage drop (turn-on voltage), the absolute value voltage is lower than the subtractor's output voltage by the turn-on voltage of one diode, which is inconsistent with the original design intent.
[0009] In fact, it can be designed like this: using a "maximum value gating gate" to select the two inputs V. a and V b The correction input is selected to the non-inverting input of the integrated operational amplifier, while the "lowest value gating gate" selects the smallest of the two inputs and sends it to the inverting input of the integrated operational amplifier. Thus, the subtractor output is V. a and V b Subtracting the smaller one from the larger one yields the absolute value of the subtractor's output voltage, which is always positive. Summary of the Invention
[0010] The technical problem to be solved by the present invention is to provide a simple and reliable analog subtractor design technology, the output of which is always positive.
[0011] To achieve the above objectives, the present invention includes input signals Va and Vb, operational amplifier A1, electronic switch K1, electronic switch K2, operational amplifier A2, input resistor circuit for the non-inverting input terminal of operational amplifier A2, input resistor circuit for the inverting input terminal of operational amplifier A2, negative feedback resistor circuit for operational amplifier A2, compensation resistor circuit for the non-inverting input terminal of operational amplifier A2, and output signal Vo. Resistors R1 and R3 constitute the input resistor circuit for the non-inverting input terminal of operational amplifier A2, and resistors R2 and R4 constitute the input resistor circuit for the inverting input terminal of operational amplifier A2. The input signal Va is connected to the non-inverting input of operational amplifier A2 via electronic switch K1 and resistor R1. Simultaneously, the input signal Va is connected to the inverting input of operational amplifier A2 via resistor R2. The input signal Vb is connected to the inverting input of operational amplifier A2 via electronic switch K2 and resistor R4. Simultaneously, the input signal Vb is connected to the non-inverting input of operational amplifier A2 via resistor R3. Operational amplifier A1 forms a comparator circuit. The input signal Va is connected to... The non-inverting input terminal of operational amplifier A1 is connected to the inverting input terminal of operational amplifier A1. If the input signal Va is greater than the input signal Vb, operational amplifier A1 outputs a high level, and electronic switches K1 and K2 are activated. Resistors R1, R2, R3, and R4, along with the negative feedback resistor Rf of operational amplifier A2, the non-inverting input compensation resistor R of operational amplifier A2, and operational amplifier A2, constitute an addition / subtraction operation circuit. This addition / subtraction operation circuit outputs the output signal Vo. =Va-Vb is a positive value. If the input signal Vb is greater than the input signal Va, the operational amplifier A1 outputs a low level, and the electronic switches K1 and K2 are disconnected. Resistors R2, R3, the negative feedback resistor circuit Rf of the operational amplifier A2, the non-inverting input compensation resistor circuit R of the operational amplifier A2, and the operational amplifier A2 constitute a differential proportional operation circuit. The differential proportional operation circuit outputs the output signal Vo=Vb-Va as a positive value, realizing an analog subtractor with an absolute output voltage.
[0012] The non-inverting input compensation resistor circuit of the operational amplifier A2 is composed of a resistor R, and the non-inverting input of the operational amplifier A2 is connected to the working ground through the resistor R.
[0013] The negative feedback resistor circuit of the operational amplifier A2 is composed of a resistor Rf. The output terminal of the operational amplifier A2 is connected to the inverting input terminal of the operational amplifier A2 through the resistor Rf, and the value of Rf is equal to the value of the compensation resistor R of the non-inverting input terminal of the operational amplifier A2.
[0014] The input resistor circuit at the non-inverting input terminal of the operational amplifier A2 has a resistor R1 whose resistance is equal to half the value of the compensation resistor R at the non-inverting input terminal of the operational amplifier A2, i.e., R1 = 1 / 2R; and a resistor R3 whose resistance is equal to the value of the compensation resistor R at the non-inverting input terminal of the operational amplifier A2, i.e., R3 = R.
[0015] The inverting input terminal of the operational amplifier A2 has an input resistor circuit where the resistance value of resistor R4 is equal to half the value of the non-inverting input terminal compensation resistor R of the operational amplifier A2, i.e., R4 = 1 / 2R; the resistance value of resistor R2 is equal to the value of the non-inverting input terminal compensation resistor R of the operational amplifier A2, i.e., R2 = R.
[0016] The output terminal of the operational amplifier A1 is simultaneously connected to the control terminals of the electronic switches K1 and K2. Attached Figure Description
[0017] Appendix Figure 1 Appendix Figure 2 Appendix Figure 3 Appendix Figure 4 Appendix Figure 5 Appendix Figure 6 This document is provided to provide a further understanding of the invention and forms part of this application. Figure 1 This is a circuit diagram for addition and subtraction operations; attached. Figure 2 This is the equivalent circuit diagram when each signal at the inverting input terminal is applied; attached. Figure 3 This is the equivalent circuit when each signal at the non-inverting input terminal is applied; Appendix Figure 4 It is a differential proportional operational circuit (subtractor); attached Figure 5 It is an absolute value subtractor based on the "highest gating gate and lowest gating gate"; Appendix Figure 6 It is an absolute value subtractor based on the "addition and subtraction operation" circuit. Detailed Implementation
[0018] The embodiments of the present invention are further described below with reference to the accompanying drawings. First, a brief introduction to the addition and subtraction circuit will help in understanding the basic working principle of the absolute value subtractor in this design. Figure 1 For a four-input addition and subtraction circuit, the circuits representing the effects of each signal at the inverting input and the non-inverting input are as follows: Figure 2 and Figure 3 As shown.
[0019] Figure 2 The circuit shown is an inverting summation circuit.
[0020] Therefore, the output voltage is
[0021] Figure 3 The circuit shown is a non-inverting summation circuit.
[0022] like R 1∥ R 2∥ R f = R 3∥ R 4∥ R5, then the output voltage is
[0023] Therefore, the output voltage when all input signals are applied simultaneously is (1) If the circuit has only two inputs and the parameters are symmetrical, such as Figure 4 As shown, then (2) As can be seen from the above formulas (1) and (2), the output value of both addition / subtraction circuits and differential proportional circuits (subtractors) can be either positive or negative. In particular, for differential proportional circuits (subtractors), the output polarity is determined by the two input signals. u I1 and u I2 The connection relationship with integrated operational amplifier A can be fixed as long as the connection relationship is fixed. u I1 and u I2 If the corrected signal is connected to the non-inverting input of operational amplifier A, and the smaller of the two signals is connected to the inverting input of operational amplifier A, then the output of the above subtractor will always be positive, thus perfectly realizing the design of the absolute value analog subtractor.
[0024] Absolute value subtractor based on "highest and lowest gates" This absolute value subtractor based on the "highest gate and lowest gate" is like... Figure 5 As shown, this design is actually similar to the design described above where the output of the traditional subtractor is obtained by a "DC voltage polarity automatic protection circuit". The only difference is that the rectifier bridge is placed at the front end of the traditional subtractor. Compared with the structure where the full bridge is at the back end, this design is more in line with the definition of an absolute value subtractor. The "full bridge + subtractor" as a whole is still an absolute value subtractor, while the definition of "subtractor + full bridge" as an absolute value subtractor is not very consistent, because its final output is not the subtractor output.
[0025] Figure 5 In this circuit, the inverting input resistor R1, the non-inverting input resistor R2, the negative feedback resistor Rf, the compensation resistor R, and the integrated operational amplifier IC1 constitute a traditional differential proportional operational circuit (subtractor). Without other circuits, the output of this subtractor can be positive or negative, and it is not an absolute value subtractor.
[0026] Four rectifier diodes D1~D4 form a circuit structure resembling a full-bridge rectifier. Based on the unidirectional conductivity and clamping characteristics of diodes, D1 and D4 form a so-called "maximum value gating gate," which can select the two differential inputs V. a and V b The larger (corrected) signal is selected and connected to the non-inverting input of op-amp IC1 through resistor R2; D2 and D3 form a so-called "lowest value gating gate", which selects V a and V b The smallest signal is selected and connected to the inverting input of operational amplifier IC1 through resistor R1. Thus, according to the above formula (2), the output of the traditional subtractor IC1 is V. a and V b The larger one minus V a and V b The smaller one.
[0027] There's a question that might not be clear to everyone regarding the above introduction: exactly... Figure 5 The circuit can obtain V through the "maximum value gating gate" circuit. a and V b The larger value, or V obtained through the "lowest value gating gate" circuit. a and V b The smaller the value, because in the various operational circuits based on operational amplifiers that everyone often learns about, low-frequency small-signal input circuits are usually composed of resistor circuits, for example... Figure 1 , Figure 2 , Figure 3 Since these operational circuits are all linear circuits, the superposition theorem can be used to perform the above operations, just like the calculations in Formula 1 and Formula 2 above, which are quite complex.
[0028] However, if the input resistor is replaced with a unidirectional diode, such as... Figure 5 The diodes D1, D2, D3, and D4 are non-linear electronic devices; their operating curves are non-linear. Figure 5 Circuit calculations cannot utilize the superposition theorem, but their calculations are actually quite simple. For example, suppose signal V... a >V b Since the voltage drop after the diode is turned on is 0.7V (this value varies depending on the model), then the signal V a The potential formed at point P by the forward diode D1 acting alone is V. a -0.7, at this time, the forward voltage drop of diode D4 is V. b -(V) a -0.7) = V b -V a +0.7, because V a >Vb Therefore, the forward voltage of diode D4 actually does not exceed its turn-on voltage U. on Therefore, diode D4 is cut off, and the voltage at point P is V. a -0.7.
[0029] Conversely, regarding signal V b >V a As described above, the voltage at point P is V. b -0.7 yields V a and V b Larger value in As for the functions of diodes D2 and D4, their working principles are similar and will not be elaborated further. We can obtain V... a and V b The smaller value in the range.
[0030] so, Figure 5 The absolute value subtractor shown has added "highest gating gate and lowest gating gate" and its output is always positive, thus realizing the design of the absolute value subtractor.
[0031] but Figure 5 The absolute value subtractor still has a problem: regardless of the type of diode, there is a forward voltage drop. The forward voltage drop of a diode is the voltage drop across the diode under a specified forward current. It is the lowest forward voltage at which the diode can conduct. The forward voltage drop of a small-current silicon diode is about 0.6 to 0.8 V under medium current levels; that of a germanium diode is about 0.2 to 0.3 V; and the forward voltage drop of a high-power silicon diode often reaches 1 V.
[0032] If the forward voltage drop of the diode is 0.7V, and the differential voltage V a >V b Then V P =V a -0.7, V Q =V b +0.7, according to the above formula (2), such as Figure 5 The output voltage of the absolute value subtractor can be obtained from the parameters of each component.
[0033] Conversely, if V b >V a ,but
[0034] so, Figure 5 The subtractor shown cannot be called a "true" absolute subtractor because its output voltage drops by 1.4V compared to a conventional subtractor.
[0035] Absolute value subtractor based on "addition and subtraction" circuit Known Figure 5 The drawback of diodes is the existence of forward voltage drop. One can imagine replacing diodes with electronic switches such as CD4066 as components of the "highest selector or lowest selector gate," thus solving the diode's forward voltage drop drawback. The circuit would then look like this: Figure 6 As shown.
[0036] In the diagram, operational amplifiers A1 and A2 both belong to integrated operational amplifier IC1 (ALD2701), which is a dual low-power rail-to-rail CMOS operational amplifier; analog electronic switches K1 and K2 belong to IC2 (CD4066).
[0037] Figure 6 The absolute subtractor shown uses a selection circuit consisting of a voltage comparator (op-amp A1) and two electronic switches (4066) instead of a selection circuit. Figure 5 The "highest and lowest gating gates" are controlled by the output of a voltage comparator, which controls the opening and closing of the electronic switch. A high-level output from the comparator closes the electronic switch; otherwise, it opens. This relates to the traditional subtractor section A2 and... Figure 5 similar.
[0038] As can be seen, due to the presence of input resistors R1, R2, R3, and R4, Figure 6 absolute value subtractor and Figure 1 The addition and subtraction circuits are similar, and the calculation process of the output voltage is similar to that of formula (1). Note that the parameters of each component in the figure are very important and must be made according to the values shown in the figure. Otherwise, the ideal absolute value subtractor cannot be realized. The calculation method of the subtractor output voltage is analyzed as follows.
[0039] If the two input voltages V a >V b When comparator A1 outputs a high level, electronic switches K1 and K2 close. Since the input resistors are all linear components, the output voltage V... O Just like Figure 1 As shown, using the methods of inverse summation and in-phase summation, V is first calculated. O1 and V O2 Finally, V O =V O1 +V O2 V O1 and V O2 The calculation is as follows Figure 1 The details shown will not be repeated here.
[0040] Figure 6 In the formula, substitute the values of R2, R4, and Rf into the expression. R 2∥ R 4∥ R fThe result is R ∥ R / 2∥ R Similarly, substitute the values of R3, R1, and R into the formula. R 3∥ R 1∥ R The result is R ∥ R / 2∥ R Therefore R 2∥ R 4∥ R f = R 3∥ R 1∥ R Therefore, V can be directly calculated using formula (1) and by substituting the parameters shown in the diagram. O (3) Conversely, if the input voltage V b >V a When comparator A1 outputs a low level, electronic switches K1 and K2 are open, and the circuit of resistors R1 and R4 can be disregarded. Finally... Figure 6 The circuit has only two inputs, and the parameters are symmetrical, then... Figure 6 The absolute value subtractor in the circuit is simpler, and... Figure 4 Similar to the differential proportional operation circuit (subtractor), the output value V of the subtractor can be directly obtained according to formula (2). O (4) Based on formulas (3) and (4), it can be concluded that by using an analog electronic switch controlled by the operational amplifier comparator circuit A1 to replace the original diode, and by improving the differential proportional operation circuit to an addition and subtraction operation circuit, the expected design of the absolute value subtractor is successfully realized, and the cost is low.
[0041] Furthermore, since the comparator A1 has excellent common-mode input voltage range and output swing, it is particularly suitable for battery-powered circuits. If the comparator uses a high-speed op-amp or a dedicated comparator, a certain degree of hysteresis may be required to avoid oscillation at the switching point.
[0042] The above embodiments are only used to illustrate and not limit the technical solutions of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention without departing from the spirit and scope of the present invention. Any modifications or partial substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An analog subtractor with an absolute output voltage, characterized in that: The subtractor includes input signals Va and Vb, operational amplifier A1, electronic switch K1, electronic switch K2, operational amplifier A2, input resistor circuits for the non-inverting and inverting input terminals of operational amplifier A2, negative feedback resistor circuits for operational amplifier A2, compensation resistor circuits for the non-inverting input terminal of operational amplifier A2, and output signal Vo. Resistors R1 and R3 constitute the input resistor circuit for the non-inverting input terminal of operational amplifier A2, and resistors R2 and R4 constitute the input resistor circuit for the inverting input terminal of operational amplifier A2. The input signal Va is connected to the non-inverting input of operational amplifier A2 via electronic switch K1 and resistor R1. Simultaneously, the input signal Va is connected to the inverting input of operational amplifier A2 via resistor R2. The input signal Vb is connected to the inverting input of operational amplifier A2 via electronic switch K2 and resistor R4. Simultaneously, the input signal Vb is connected to the non-inverting input of operational amplifier A2 via resistor R3. Operational amplifier A1 forms a comparator circuit, and the input signal Va is connected to operational amplifier A2. The non-inverting input terminal of operational amplifier A1 is connected to the inverting input terminal of operational amplifier A1. If the input signal Va is greater than the input signal Vb, operational amplifier A1 outputs a high level, and electronic switches K1 and K2 are activated. Resistors R1, R2, R3, R4, the negative feedback resistor circuit Rf of operational amplifier A2, the non-inverting input compensation resistor circuit R of operational amplifier A2, and operational amplifier A2 constitute an addition / subtraction operation circuit. This addition / subtraction operation circuit outputs the output signal Vo = V If a-Vb is a positive value, and the input signal Vb is greater than the input signal Va, the operational amplifier A1 outputs a low level, and the electronic switches K1 and K2 are disconnected. Resistors R2 and R3, as well as the negative feedback resistor circuit Rf of the operational amplifier A2, the non-inverting input compensation resistor circuit R of the operational amplifier A2, and the operational amplifier A2 constitute a differential proportional operation circuit. The differential proportional operation circuit outputs a positive output signal Vo=Vb-Va, realizing an analog subtractor with an absolute output voltage.
2. The analog subtractor with an absolute output voltage according to claim 1, characterized in that: The non-inverting input compensation resistor circuit of the operational amplifier A2 is composed of a resistor R, and the non-inverting input of the operational amplifier A2 is connected to the working ground through the resistor R.
3. The analog subtractor with an absolute output voltage according to claim 1, characterized in that: The negative feedback resistor circuit of the operational amplifier A2 is composed of a resistor Rf. The output terminal of the operational amplifier A2 is connected to the inverting input terminal of the operational amplifier A2 through the resistor Rf, and the value of Rf is equal to the value of the compensation resistor R of the non-inverting input terminal of the operational amplifier A2.
4. An analog subtractor with an absolute output voltage according to claim 1, characterized in that: The input resistor circuit at the non-inverting input terminal of the operational amplifier A2 has a resistor R1 whose resistance is equal to half the value of the compensation resistor R at the non-inverting input terminal of the operational amplifier A2, i.e., R1 = 1 / 2R; and a resistor R3 whose resistance is equal to the value of the compensation resistor R at the non-inverting input terminal of the operational amplifier A2, i.e., R3 = R.
5. An analog subtractor with an absolute output voltage according to claim 1, characterized in that: The inverting input terminal of the operational amplifier A2 has an input resistor circuit where the resistance value of resistor R4 is equal to half the value of the non-inverting input terminal compensation resistor R of the operational amplifier A2, i.e., R4 = 1 / 2R; the resistance value of resistor R2 is equal to the value of the non-inverting input terminal compensation resistor R of the operational amplifier A2, i.e., R2 = R.
6. An analog subtractor with an absolute output voltage according to claim 1, characterized in that: The output terminal of the operational amplifier A1 is simultaneously connected to the control terminals of the electronic switches K1 and K2.