Analog switch based first order compensation circuit
Patent Information
- Application Number
- CN202522246680.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2035-10-23
AI Technical Summary
上述常规手段难以对传感器输出曲线的偏移情况进行有效补偿,无法精准地使输出恢复到理论输出状态,尤其是在外界磁场干扰导致传感器输出出现复杂偏移时,这些常规手段的局限性就更加明显
通过比较器实时监测输入信号Vi与电压U1的关系,形成了依据输入信号Vi与电压U1的大小关系动态切换补偿路径的电路架构,实现了当输入电压Vi≥U1时通过差值放大叠加补偿,Vi<U1时直接输出原始信号的效果,可以对输出曲线偏移情况进行补偿,使其恢复理论输出;并且该方案采用全模拟硬件电路实现无延时补偿,对输入信号前端电路无冲击,不会造成前端电路异常。
Smart Images

Figure CN224720431U_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of slope compensation technology, and in particular to a first-order compensation circuit based on an analog switch. Background Technology
[0002] In the field of analog switches, with the continuous development of electronic technology, analog switches have been widely used in various electronic devices, playing a crucial role in signal processing and control. Analog switches can realize functions such as signal switching and selection, and are indispensable in many fields such as sensors, communication equipment, and measuring instruments. Their application enhances the flexibility and functionality of electronic devices, enabling them to better adapt to different working scenarios and needs, and driving technological progress and product upgrades in related industries. In the field of analog switches, to solve the problem of sensor output signal offset (such as…),… Figure 1 External interference can alter the slope of the sensor's output curve when the output voltage U1 is 5.7V. Several common methods exist to address this. One approach involves optimizing the hardware circuit design, such as adjusting the parameters of resistors and capacitors, to change the circuit's electrical characteristics and thus compensate for the signal. Another method is to replace the sensor with one that offers more stable performance to reduce the impact of external factors on the output signal, or to employ shielding measures to reduce the influence of external magnetic fields and other interference sources on the sensor.
[0003] However, existing technologies have significant drawbacks. The aforementioned conventional methods are insufficient to effectively compensate for deviations in the sensor output curve and cannot accurately restore the output to its theoretical state. This limitation becomes even more pronounced when external magnetic field interference causes complex shifts in the sensor output. Summary of the Invention
[0004] This application provides a first-order compensation circuit based on an analog switch, which achieves accurate compensation for sensor output curve offset, restoring its theoretical output.
[0005] The above-mentioned objective of this application is achieved through the following technical solution: This application provides a first-order compensation circuit based on an analog switch, comprising: an analog switch module, a comparator, a subtractor, a first amplifier module, a second amplifier module, and a summing module. The output voltage Vi of the sensor is input to the input terminals of the comparator, the subtractor, and the first amplifier module, respectively. The output terminal of the comparator is electrically connected to the control terminal of the analog switch module. The output terminal of the subtractor is electrically connected to the input terminal of the analog switch module. The output terminal of the analog switch module is electrically connected to the input terminal of the second amplifier module. The output terminals of the first and second amplifier modules are electrically connected to the input terminal of the summing module, respectively. The summing module outputs a voltage Vo. The output voltage of the subtractor is Uby, and Uby = Vi - U1, where U1 is the voltage at the compensation point corresponding to the change in the slope of the sensor output curve. When the comparator compares Vi < U1, the analog switch module is not turned on, so that the voltage Vo output by the summing module is Vi; When the comparator compares Vi≥U1, the analog switch module is turned on, so that the voltage Vo output by the summing module is k*Uby+Vi, where k is a compensation parameter.
[0006] By adopting the above technical solution, a circuit architecture is formed that dynamically switches the compensation path based on the magnitude relationship between the input signal Vi and the voltage U1 through a comparator. This achieves the effect of differential amplification and superposition compensation when the input voltage Vi ≥ U1, and direct output of the original signal when Vi < U1. This can compensate for output curve deviations and restore the theoretical output. This solution uses fully analog hardware circuitry to achieve zero-delay compensation, has no impact on the input signal front-end circuit, and will not cause abnormalities in the front-end circuit.
[0007] Furthermore, the compensation factor for each offset point on the sensor output curve is K. ' K ' =ΔU ' / ΔU, where ΔU is the difference between the voltage at that point and the voltage U1. ' The voltage at this point is the difference between the theoretical output voltage and the voltage at that point; the compensation parameter k is the average value of the compensation factor at each offset point.
[0008] By adopting the above technical solution, there are multiple offset points after the compensation point corresponding to voltage U1 on the sensor output curve. Selecting some of these offset points and calculating the corresponding compensation multiples, and then averaging the multiple compensation multiples, a more accurate compensation reference k can be obtained, thereby outputting a more accurate voltage Vo.
[0009] Furthermore, when the comparator compares Vi < U1, the comparator outputs a low level, causing the analog switch module to be off; when the comparator compares Vi ≥ U1, the comparator outputs a high level, causing the analog switch module to be on.
[0010] By adopting the above technical solution, the relationship between the input signal Vi and the voltage U1 is monitored in real time by a comparator. When Vi reaches U1, the analog switch is activated to introduce the difference signal Uby into the compensation channel, thus achieving linear compensation for the slope offset segment.
[0011] Furthermore, the first amplifier module and the second amplifier module each include an inverse amplifier.
[0012] Furthermore, the summing module is a reverse summer.
[0013] By adopting the above technical solution, the output terminals of the first inverse proportional amplifier and the second inverse proportional amplifier are respectively connected to the input terminal of the inverse summing module, forming a circuit architecture that dynamically switches the compensation path according to the relationship between the input signal and the compensation point voltage U1. This achieves the effect of compensation through difference amplification and superposition when the input voltage Vi≥U1, and direct output of the original input signal Vi when Vi<U1.
[0014] Furthermore, it also includes a compensation point voltage adjustment module, which inputs voltage U1 to the comparator and the subtractor respectively, and the compensation point voltage adjustment module can adjust the magnitude of voltage U1.
[0015] By adopting the above technical solution, the compensation point voltage adjustment module can adjust the magnitude of voltage U1, thereby adapting to the slope compensation of the output curve for different compensation point voltages.
[0016] Furthermore, the analog switch module includes a CD4053BM chip, the by pin of the CD4053BM chip is electrically connected to the output of the subtractor, the B pin of the CD4053BM chip is electrically connected to the output of the comparator, and the bx orby pin of the CD4053BM chip is electrically connected to the input of the second amplifier module.
[0017] By adopting the above technical solution, when the comparator compares Vi < U1, the comparator outputs a low level to the B pin of the CD4053BM chip, making the CD4053BM chip non-conductive, thereby making the voltage Vo = Vi output by the summing module; when the comparator compares Vi ≥ U1, the comparator outputs a high level to the B pin of the CD4053BM chip, making the CD4053BM chip conductive, and the bx or by pin of the CD4053BM chip outputs a compensation amount. After being superimposed by the summing module, the compensated voltage Vo = k*Uby + Vi is output.
[0018] In summary, this application includes at least the following beneficial technical effects: By using a comparator to monitor the relationship between the input signal Vi and the voltage U1 in real time, a circuit architecture is formed that dynamically switches the compensation path based on the magnitude relationship between the input signal Vi and the voltage U1. This achieves the effect of compensation through differential amplification and superposition when the input voltage Vi ≥ U1, and direct output of the original signal when Vi < U1. It can compensate for the deviation of the output curve and restore it to the theoretical output. Furthermore, this scheme uses a fully analog hardware circuit to achieve zero-delay compensation, which has no impact on the input signal front-end circuit and will not cause abnormalities in the front-end circuit. Attached Figure Description
[0019] Figure 1 This is a schematic block diagram of a first-order compensation circuit based on an analog switch, according to an embodiment of this application. Figure 2 This is a schematic diagram of a first-order compensation circuit based on an analog switch, according to an embodiment of this application. Detailed Implementation
[0020] The following embodiments will help those skilled in the art to further understand the function of this application, but do not limit this application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of this application. These all fall within the protection scope of this application.
[0021] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.
[0022] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0023] Example 1 Reference Figure 1 and Figure 2This application provides a first-order compensation circuit based on an analog switch, comprising: an analog switch module 10, a comparator 11, a subtractor 12, a first amplifier module 21, a second amplifier module 22, and a summing module 23. The sensor's output voltage Vi is input to the input terminals of the comparator 11, the subtractor 12, and the first amplifier module 21, respectively. The output terminal of the comparator 11 is electrically connected to the control terminal of the analog switch module 10. The output terminal of the subtractor 12 is electrically connected to the input terminal of the analog switch module 10. The output terminal of the analog switch module 10 is electrically connected to the input terminal of the second amplifier module 22. The output terminals of the first amplifier module 21 and the second amplifier module 22 are electrically connected to the input terminals of the summing module 23, respectively. The summing module 23 outputs a voltage Vo. The voltage at the output terminal of the subtractor 12 is Uby, and Uby = Vi - U1, where U1 is the voltage at the compensation point corresponding to the change in the slope of the sensor output curve. When comparator 11 compares Vi < U1, analog switch module 10 is not turned on, so that the voltage Vo output by summing module 23 is Vi; When comparator 11 compares Vi≥U1, analog switch module 10 is turned on, so that the voltage Vo output by summing module 23 is k*Uby+Vi, where k is the compensation parameter.
[0024] This involves using comparator 11 to monitor the relationship between the input signal Vi and the voltage U1 in real time. This results in a circuit architecture that dynamically switches the compensation path based on the magnitude of the relationship between Vi and U1. This achieves the effect of differential amplification and superposition compensation when the input voltage Vi ≥ U1, and direct output of the original signal when Vi < U1. This can compensate for output curve deviations and restore the theoretical output. Furthermore, this scheme uses fully analog hardware circuitry to achieve zero-delay compensation, causing no impact on the input signal front-end circuitry and preventing front-end circuit malfunctions.
[0025] Specifically, the compensation factor for each offset point on the sensor output curve is K. ' K ' =ΔU ' / ΔU, where ΔU is the difference between the voltage at that point and the voltage U1. ' The voltage at this point is the difference between the theoretical output voltage and the voltage at that point. The compensation parameter k is the average of the compensation factors at each offset point, i.e., k = AVERAGE(k1:ky), where k1 is the compensation factor at the first offset point and ky is the compensation factor at the y-th offset point. On the sensor output curve, there are multiple offset points after the compensation point corresponding to voltage U1. Selecting some of these offset points (for example, selecting y, where y is an integer greater than 1), calculating the corresponding compensation factors, and then averaging the multiple compensation factors yields a more accurate compensation reference k, thus outputting a more accurate voltage Vo.
[0026] Specifically, the analog switch module 10 includes a CD4053BM chip. The by pin of the CD4053BM chip is electrically connected to the output of the subtractor 12, the B pin of the CD4053BM chip is electrically connected to the output of the comparator 11, and the bxor by pin of the CD4053BM chip is electrically connected to the input of the second amplifier module 22. When the comparator 11 compares Vi < U1, the comparator 11 outputs a low level to the B pin of the CD4053BM chip, making the CD4053BM chip non-conducting, thus making the voltage Vo = Vi output by the summing module 23. When the comparator 11 compares Vi ≥ U1, the comparator 11 outputs a high level to the B pin of the CD4053BM chip, making the CD4053BM chip conduct, and the bx or by pin of the CD4053BM chip outputs a voltage Ubxorby. After being superimposed by the summing module 23, the compensated voltage Vo = k*Uby + Vi is output. That is, the relationship between the input signal Vi and the voltage U1 is monitored in real time by the comparator 11. When Vi reaches U1, the analog switch is activated to introduce the difference signal Uby into the compensation channel, and finally linear compensation for the slope offset segment is achieved.
[0027] Specifically, such as Figure 2 The first amplifier module 21 includes an inverse proportional amplifier IC3A, resistors R17 and R18, and the second amplifier module 22 includes an inverse proportional amplifier IC1A, resistors R24 and R29, and a variable resistor OFS2. The summing module 23 is an inverting summer. The amplification ratio K can be adjusted by adjusting the variable resistor OFS2, where K = (R24 + OFS2) / R29 (OFS2 is between 0 and 2000Ω), so that the output voltage U2 of the second amplifier module 22 is -K * Ubxorby. The first amplifier module 21 can output voltage U3 = (-R18 / R17) * Vi = -Vi. The output voltage Vo of the inverting summer is -(U2 + U3).
[0028] That is, the output terminals of the first and second inverse proportional amplifiers are respectively connected to the input terminals of the inverse summing module 23, forming a circuit architecture that dynamically switches the compensation path according to the relationship between the input signal and the compensation point voltage U1. This achieves the effect of compensation through differential amplification and superposition when the input voltage Vi≥U1, and direct output of the original input signal Vi when Vi<U1.
[0029] In some embodiments, a compensation point voltage adjustment module 30 is also included. This module inputs voltage U1 to both the comparator 11 and the subtractor 12, and is capable of adjusting the magnitude of voltage U1. For example... Figure 2The compensation point voltage adjustment module 30 includes an amplifier IC2A and a variable resistor OFS1. By adjusting the variable resistor OFS1, the output voltage U1 of the amplifier IC2A can be adjusted, thereby adapting to the slope compensation of the output curve for different compensation point voltages. For example, the output curve of some sensors begins to shift when U1 = 5.7V, at which point the compensation point voltage adjustment module 30 needs to output a voltage of 5.7V; the output curve of some sensors begins to shift when U1 = 6V, at which point the compensation point voltage adjustment module 30 needs to output a voltage of 6V.
[0030] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A first-order compensation circuit based on analog switches, characterized in that, include: The system comprises an analog switch module (10), a comparator (11), a subtractor (12), a first amplifier module (21), a second amplifier module (22), and a summing module (23). The sensor's output voltage Vi is input to the input terminals of the comparator (11), the subtractor (12), and the first amplifier module (21), respectively. The output terminal of the comparator (11) is electrically connected to the control terminal of the analog switch module (10), and the output terminal of the subtractor (12) is connected to the control terminal of the analog switch module (10). The input terminals are electrically connected, the output terminal of the analog switch module (10) is electrically connected to the input terminal of the second amplifier module (22), the output terminals of the first amplifier module (21) and the second amplifier module (22) are respectively electrically connected to the input terminal of the summing module (23), the summing module (23) outputs voltage Vo; the output voltage of the subtractor (12) is Uby, and Uby = Vi - U1, where U1 is the voltage of the compensation point corresponding to the change of the slope of the sensor output curve; When the comparator (11) compares Vi < U1, the analog switch module (10) is not turned on, so that the voltage Vo output by the summing module (23) is Vi; When the comparator (11) compares Vi≥U1, the analog switch module (10) is turned on, so that the voltage Vo output by the summing module (23) is k*Uby+Vi, where k is a compensation parameter.
2. The first-order compensation circuit based on analog switches according to claim 1, characterized in that: The compensation factor for each offset point on the sensor output curve is K. ′ K ′ =ΔU ′ / ΔU, where ΔU is the difference between the voltage at that point and the voltage U1. ′ The voltage at this point is the difference between the theoretical output voltage and the voltage at that point; the compensation parameter k is the average value of the compensation multiple at each offset point.
3. The first-order compensation circuit based on analog switches according to claim 1, characterized in that: When the comparator (11) compares Vi < U1, the comparator (11) outputs a low level, causing the analog switch module (10) to be off; when the comparator (11) compares Vi ≥ U1, the comparator (11) outputs a high level, causing the analog switch module (10) to be on.
4. The first-order compensation circuit based on analog switches according to claim 1, characterized in that: The first amplifier module (21) and the second amplifier module (22) each include an inverse amplifier.
5. The first-order compensation circuit based on analog switches according to claim 4, characterized in that: The summation module (23) is a reverse summer.
6. The first-order compensation circuit based on analog switches according to claim 1, characterized in that: It also includes a compensation point voltage adjustment module (30), which inputs voltage U1 to the comparator (11) and the subtractor (12) respectively, and the compensation point voltage adjustment module (30) can adjust the magnitude of voltage U1.
7. The first-order compensation circuit based on analog switches according to claim 1, characterized in that: The analog switch module (10) includes a CD4053BM chip. The by pin of the CD4053BM chip is electrically connected to the output of the subtractor (12). The B pin of the CD4053BM chip is electrically connected to the output of the comparator (11). The bx or by pin of the CD4053BM chip is electrically connected to the input of the second amplifier module (22).