High-precision comparator with flexible and adjustable hysteresis window

By controlling the threshold voltage signal of the hysteresis voltage generation circuit, the hysteresis window can be adjusted with high precision and flexibility, solving the adaptability problem of traditional hysteresis comparators in different scenarios, improving signal processing accuracy and anti-interference ability, and reducing design complexity and cost.

CN121036735APending Publication Date: 2025-11-28JIANGSU GTIC MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511027248.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Traditional hysteresis comparators have fixed or limited hysteresis windows, making it difficult to meet the needs of different scenarios. They are unable to capture weak signal changes in high-precision medical electrocardiogram monitoring or adapt to dynamic noise changes in noisy industrial environments.

Method used

By controlling the output VTN and VTP threshold voltage signals of the hysteresis voltage generation circuit with control signals, the clockwise and counterclockwise hysteresis curves can be freely switched. The design combines a bandgap reference circuit, a hysteresis voltage generation circuit, a data selector, and a core comparator. Combined with the logic operations of resistors and control switches, the hysteresis window can be made highly accurate and adjustable over a wide range.

Benefits of technology

It achieves high precision and flexible adjustment of the hysteresis window, improves the signal processing accuracy and response flexibility of the comparator in complex environments, enhances anti-interference capability, and reduces design complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121036735A_ABST
    Figure CN121036735A_ABST
Patent Text Reader

Abstract

The invention discloses a high-precision comparator with a flexible and adjustable hysteresis window. The high-precision comparator comprises a band-gap reference circuit, a hysteresis voltage generation circuit, a data selector and a core comparator, the output end of the band-gap reference circuit is electrically connected with the input end of the hysteresis voltage generation circuit, and the output end of the hysteresis voltage generation circuit is electrically connected with the data selector; the output end of the data selector is electrically connected with the negative input end of the core comparator, the positive input end of the core comparator inputs a VIN voltage signal to be compared, and the output end of the core comparator is electrically connected with the control end of the data selector; the control end of the hysteresis voltage generation circuit inputs a control signal, and the magnitude of a VTN threshold voltage signal and a VTP threshold voltage signal output by the hysteresis voltage generation circuit is controlled through the control signal. The data selector adjusts an output threshold voltage signal according to an output signal of the core comparator; and free switching of clockwise and anticlockwise hysteresis curves is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of comparators, in particular to a comparator with high-precision and flexible adjustable hysteresis window. BACKGROUND

[0002] In modern electronic systems, comparators are widely used in industrial control, medical equipment, communication systems and other fields as key components of signal processing. With the development of technology, higher requirements are put forward for the performance of comparators: on the one hand, fast data acquisition and real-time control scenarios require comparators to have fast response capability; on the other hand, in complex environments, small fluctuations such as noise and ripple may exist near the threshold of the input signal, and the comparator should have certain anti-interference ability to avoid frequent triggering and cause oscillation of the output result. Although the traditional hysteresis comparator improves the anti-interference ability through the double-threshold mechanism, the fixed or limited adjustable hysteresis window cannot meet the needs of different scenarios, and cannot simultaneously capture weak signal changes in weak signal high-precision scenarios such as medical electrocardiogram monitoring and adapt to dynamic changes of noise in strong noise industrial environments such as industrial automation. SUMMARY

[0003] The present application provides a comparator with high-precision and flexible adjustable hysteresis window, which controls the size of the output VTN threshold voltage signal and VTP threshold voltage signal of the hysteresis voltage generating circuit through the control signal, and realizes the free switching of the clockwise and counterclockwise hysteresis curves.

[0004] Technical scheme: In order to achieve the above-mentioned purpose, the present application provides a comparator with high-precision and flexible adjustable hysteresis window, which comprises a bandgap reference circuit, a hysteresis voltage generating circuit, a data selector and a core comparator; the output end of the bandgap reference circuit is electrically connected to the input end of the hysteresis voltage generating circuit, and the output end of the hysteresis voltage generating circuit is electrically connected to the data selector; the output end of the data selector is electrically connected to the negative input end of the core comparator, the positive input end of the core comparator inputs the VIN voltage signal to be compared, and the output end of the core comparator is electrically connected to the control end of the data selector; the control end of the hysteresis voltage generating circuit inputs the control signal, which controls the size of the output VTN threshold voltage signal and VTP threshold voltage signal of the hysteresis voltage generating circuit; the data selector adjusts the output threshold voltage signal according to the output signal of the core comparator.

[0005] Further, the hysteresis voltage generating circuit comprises a VTN voltage control circuit, a VTP voltage control circuit, a VTN voltage generating circuit and a VTP voltage generating circuit; the input end of the VTN voltage control circuit inputs a control signal VTN_SW, the output end of the VTN voltage control circuit is electrically connected to the control end of the VTN voltage generating circuit, the input end of the VTN voltage generating circuit is electrically connected to the output end of the bandgap reference circuit, and the output end of the VTN voltage generating circuit is electrically connected to the input end of the data selector; the input end of the VTP voltage control circuit inputs a control signal VTP_SW, the output end of the VTP voltage control circuit is electrically connected to the control end of the VTP voltage generating circuit, the input end of the VTP voltage generating circuit is electrically connected to the output end of the bandgap reference circuit, and the output end of the VTP voltage generating circuit is electrically connected to the input end of the data selector.

[0006] Further, the VTN voltage control circuit comprises a plurality of NOT NOT gate circuits and a plurality of AND AND gate circuits; the VTN voltage control circuit converts the control signal VTN_SW into a control signal for controlling the opening and closing of a plurality of control switches in the VTN voltage generating circuit through the logical operation of the plurality of NOT NOT gate circuits and the plurality of AND AND gate circuits; the number of the plurality of AND AND gate circuits is equal to the number of the plurality of control switches in the VTN voltage generating circuit.

[0007] The VTP voltage control circuit comprises a plurality of NOT NOT gate circuits and a plurality of AND AND gate circuits; the VTP voltage control circuit converts the control signal VTP_SW into a control signal for controlling the opening and closing of a plurality of control switches in the VTP voltage generating circuit through the logical operation of the plurality of NOT NOT gate circuits and the plurality of AND AND gate circuits; the number of the plurality of AND AND gate circuits is equal to the number of the plurality of control switches in the VTP voltage generating circuit.

[0008] Further, the VTN voltage generating circuit comprises a plurality of resistors and a plurality of control switches; the number of the plurality of resistors is equal to the number of the plurality of control switches; one end of a first resistor in the plurality of resistors serves as the input end of the VTN voltage generating circuit, the other end of the first resistor is electrically connected to one end of a second resistor in the plurality of resistors, the other end of the second resistor is electrically connected to one end of a third resistor in the plurality of resistors, and so on, until the other end of a penultimate resistor in the plurality of resistors is electrically connected to one end of a last resistor in the plurality of resistors, and the other end of the last resistor is grounded; one end of each resistor in the plurality of resistors is electrically connected to one end of a corresponding control switch, and the other end of the plurality of control switches are electrically connected to each other and serve as the output end of the VTN voltage generating circuit, outputting a VTN threshold voltage signal.

[0009] Further, the VTP voltage generating circuit comprises a plurality of resistors and a plurality of control switches; the number of the plurality of resistors is the same as the number of the plurality of control switches; one end of a first resistor in the plurality of resistors is an input end of the VTP voltage generating circuit, the other end of the first resistor is electrically connected to one end of a second resistor in the plurality of resistors, the other end of the second resistor is electrically connected to one end of a third resistor in the plurality of resistors, and the other end of the third resistor is electrically connected to one end of a last resistor in the plurality of resistors, and the other end of the last resistor is grounded; one end of each resistor in the plurality of resistors is electrically connected to one end of a corresponding control switch in the plurality of control switches, and the other end of each control switch in the plurality of control switches is electrically connected to each other and serves as an output end of the VTP voltage generating circuit to output a VTP threshold voltage signal.

[0010] Further, the hysteresis voltage generating circuit outputs the VTN threshold voltage signal and the VTP threshold voltage signal, and by adjusting the size relationship between the VTN threshold voltage signal and the VTP threshold voltage signal, the direction of the hysteresis curve can be dynamically selected according to the characteristics of the input signal; when the VTP threshold voltage signal is less than the VTN threshold voltage signal, the threshold voltage triggered when the input VIN voltage signal rises is higher than the threshold voltage triggered when the input VIN voltage signal falls, so that the clockwise hysteresis curve is realized; when the VTP threshold voltage signal is greater than the VTN threshold voltage signal, the threshold voltage triggered when the input VIN voltage signal falls is higher than the threshold voltage triggered when the input VIN voltage signal rises, so that the counterclockwise hysteresis curve is realized.

[0011] Further, the data selection circuit receives the VTN threshold voltage signal and the VTP threshold voltage signal output by the hysteresis voltage generating circuit; when the output signal of the core comparator is at a high level, the data selector outputs the VTN threshold voltage signal, and when the VIN voltage signal rises to the VTN threshold voltage signal, the output signal of the core comparator is converted from the high level to the low level to trigger the hysteresis window function; when the output signal of the core comparator is at a low level, the data selector outputs the VTP threshold voltage signal, and when the VIN voltage signal falls to the VTP threshold voltage signal, the output signal of the core comparator is converted from the low level to the high level to trigger the hysteresis window function.

[0012] Beneficial effects: a high-precision hysteresis window flexible comparator of the application, one is high-precision flexible sensitivity: the sensitivity of the hysteresis comparator is determined by the threshold voltage difference AVT = VTP - VTN, and the present application adopts a ten-grade precision voltage dividing mechanism for VREF, and the VTP threshold voltage signal and the VTN threshold voltage signal are accurately adjusted through a digital control signal, so that the high-precision and wide-range adjustable hysteresis window is realized; the sensitivity requirements of different scenes such as precision measurement and industrial control can be quickly completed parameter adaptation, which greatly improves the signal processing accuracy and response flexibility of the comparator in complex applications.

[0013] Two is the bidirectional adjustable hysteresis curve: break through the fixed curve mode of the traditional hysteresis comparator, realize the free switching of the clockwise and counterclockwise hysteresis curve by flexibly controlling the size relationship of VTP voltage signal and VTN voltage signal; according to the characteristics and interference characteristics of the input signal, the optimal hysteresis curve direction can be dynamically selected, which effectively improves the anti-interference ability and signal processing performance of the comparator.

[0014] Three is high integration and low cost design: the present application adopts a highly integrated circuit architecture, on the same hardware basis, only two groups of digital code words need to be inputted, the hysteresis curve direction switching and high-precision hysteresis window adjustment can be realized; through this circuit design, the circuit does not need to be rebuilt, which greatly reduces the design complexity and development cost, significantly improves the market competitiveness and application convenience of the product. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 It is a circuit diagram of the high-precision hysteresis window flexible comparator;

[0016] Figure 2 It is a circuit diagram of the VTN voltage control circuit in the hysteresis voltage generating circuit;

[0017] Figure 3 It is a circuit diagram of the VTP voltage control circuit in the hysteresis voltage generating circuit;

[0018] Figure 4 It is a circuit diagram of the VTN voltage generating circuit and the VTP voltage generating circuit;

[0019] Figure 5 It is an input and output waveform diagram of the clockwise hysteresis hysteresis comparator;

[0020] Figure 6 It is an input and output waveform diagram of the counterclockwise hysteresis hysteresis comparator. DETAILED DESCRIPTION

[0021] The application will be further described below in combination with the drawings.

[0022] AsFigure 1 As shown, a high-precision comparator with a flexibly adjustable hysteresis window includes a bandgap reference circuit 1, a hysteresis voltage generation circuit 2, a data selector 3, and a core comparator 4. The output of the bandgap reference circuit 1 is electrically connected to the input of the hysteresis voltage generation circuit 2, and the output of the hysteresis voltage generation circuit 2 is electrically connected to the data selector 3. The output of the data selector 3 is electrically connected to the negative input of the core comparator 4, the positive input of the core comparator 4 receives the VIN voltage signal to be compared, and the output of the core comparator 4 is electrically connected to the control terminal of the data selector 3. Simultaneously, the output of the core comparator 4 serves as the output of the entire hysteresis voltage comparator, i.e., the output of the high-precision comparator with a flexibly adjustable hysteresis window. The control terminal of the hysteresis voltage generation circuit 2 receives a control signal, which controls the magnitude of the output VTN and VTP threshold voltage signals of the hysteresis voltage generation circuit 2. The hysteresis voltage generation circuit 2 can flexibly adjust the threshold voltages according to the external control signal. The data selector 3 adjusts its output threshold voltage signal according to the output signal of the core comparator 4. The signal output by the core comparator 4 is used as the control signal input to the control terminal of the data selector 3. The control data selector 3 selects to output the VTN threshold voltage signal or the VTP threshold voltage signal, thereby achieving different hysteresis windows to match different voltage conversion directions.

[0023] like Figures 2-3 As shown, the hysteresis voltage generation circuit 2 includes a VTN voltage control circuit 21, a VTP voltage control circuit 22, a VTN voltage generation circuit 23, and a VTP voltage generation circuit 24. The input terminal of the VTN voltage control circuit 21 receives the control signal VTN_SW, and the output terminal of the VTN voltage control circuit 21 is electrically connected to the control terminal of the VTN voltage generation circuit 23. The input terminal of the VTN voltage generation circuit 23 is electrically connected to the output terminal of the bandgap reference circuit 1, and the output terminal of the VTN voltage generation circuit 23 is electrically connected to the input terminal of the data selector 3. The input terminal of the VTP voltage control circuit 22 receives the control signal VTP_SW, and the output terminal of the VTP voltage control circuit 22 is electrically connected to the control terminal of the VTP voltage generation circuit 24. The input terminal of the VTP voltage generation circuit 24 is electrically connected to the output terminal of the bandgap reference circuit 1, and the output terminal of the VTP voltage generation circuit 24 is electrically connected to the input terminal of the data selector 3.

[0024] like Figure 2As shown, the VTN voltage control circuit 21 includes a plurality of NOT NOT gate circuits and a plurality of AND AND gate circuits; the VTN voltage control circuit 21 converts the control signal VTN_SW into a control signal for controlling the opening and closing of a plurality of control switches in the VTN voltage generating circuit 23 through logical operation of the plurality of NOT NOT gate circuits and the plurality of AND AND gate circuits; the number of the plurality of AND AND gate circuits is equal to the number of the plurality of control switches in the VTN voltage generating circuit 23. The plurality of NOT NOT gate circuits can be eight NOT NOT gate circuits, including a NOT1 NOT gate circuit, a NOT2 NOT gate circuit, a NOT3 NOT gate circuit, a NOT4 NOT gate circuit, a NOT5 NOT gate circuit, a NOT6 NOT gate circuit, a NOT7 NOT gate circuit, and a NOT8 NOT gate circuit; the plurality of AND AND gate circuits can be ten AND AND gate circuits, including an AND0 AND gate circuit, an AND1 AND gate circuit, an AND2 AND gate circuit, an AND3 AND gate circuit, an AND4 AND gate circuit, an AND5 AND gate circuit, an AND6 AND gate circuit, an AND7 AND gate circuit, an AND8 AND gate circuit, and an AND9 AND gate circuit; each of the plurality of AND AND gate circuits includes four input terminals.

[0025] The input terminals of the NOT1 NOT gate circuit, the NOT3 NOT gate circuit, the NOT5 NOT gate circuit, and the NOT7 NOT gate circuit serve as input terminals of the VTN voltage control circuit 21 and input the control signal VTN_SW; the output terminal of the NOT1 NOT gate circuit is electrically connected to the input terminal of the NOT2 NOT gate circuit, one input terminal of the AND0 AND gate circuit, one input terminal of the AND2 AND gate circuit, one input terminal of the AND4 AND gate circuit, one input terminal of the AND6 AND gate circuit, and one input terminal of the AND8 AND gate circuit, respectively; the output terminal of the NOT2 NOT gate circuit is electrically connected to one input terminal of the AND1 AND gate circuit, one input terminal of the AND3 AND gate circuit, one input terminal of the AND5 AND gate circuit, one input terminal of the AND7 AND gate circuit, and one input terminal of the AND9 AND gate circuit, respectively.

[0026] The output terminal of the NOT3 NOT gate circuit is electrically connected to the input terminal of the NOT4 NOT gate circuit, one input terminal of the AND0 AND gate circuit, one input terminal of the AND1 AND gate circuit, one input terminal of the AND4 AND gate circuit, one input terminal of the AND5 AND gate circuit, one input terminal of the AND8 AND gate circuit, and one input terminal of the AND9 AND gate circuit, respectively; the output terminal of the NOT4 NOT gate circuit is electrically connected to one input terminal of the AND2 AND gate circuit, one input terminal of the AND3 AND gate circuit, one input terminal of the AND6 AND gate circuit, and one input terminal of the AND7 AND gate circuit, respectively.

[0027] The output end of the NOT5 NOT gate circuit is electrically connected with the input end of the NOT6 NOT gate circuit, one input end of the AND0 AND gate circuit, one input end of the AND1 AND gate circuit, one input end of the AND2 AND gate circuit, one input end of the AND3 AND gate circuit, one input end of the AND8 AND gate circuit and one input end of the AND9 AND gate circuit respectively; the output end of the NOT6 NOT gate circuit is electrically connected with one input end of the AND4 AND gate circuit, one input end of the AND5 AND gate circuit, one input end of the AND6 AND gate circuit and one input end of the AND7 AND gate circuit respectively.

[0028] The output end of the NOT7 NOT gate circuit is electrically connected with the input end of the NOT8 NOT gate circuit, one input end of the AND0 AND gate circuit, one input end of the AND1 AND gate circuit, one input end of the AND2 AND gate circuit, one input end of the AND3 AND gate circuit, one input end of the AND4 AND gate circuit, one input end of the AND5 AND gate circuit, one input end of the AND6 AND gate circuit and one input end of the AND7 AND gate circuit respectively; the output end of the NOT8 NOT gate circuit is electrically connected with one input end of the AND8 AND gate circuit and one input end of the AND9 AND gate circuit respectively.

[0029] As shown in Figure 3 The VTP voltage control circuit 22 includes a plurality of NOT NOT gate circuits and a plurality of AND AND gate circuits; the VTP voltage control circuit 22 converts the control signal VTP_SW into a control signal for controlling the opening and closing of a plurality of control switches in the VTP voltage generating circuit 24 through the logical operation of the plurality of NOT NOT gate circuits and the plurality of AND AND gate circuits; the number of the plurality of AND AND gate circuits is equal to the number of the plurality of control switches in the VTP voltage generating circuit 24. The plurality of NOT NOT gate circuits can be eight NOT NOT gate circuits, including a NOT11 NOT gate circuit, a NOT12 NOT gate circuit, a NOT13 NOT gate circuit, a NOT14 NOT gate circuit, a NOT15 NOT gate circuit, a NOT16 NOT gate circuit, a NOT17 NOT gate circuit and a NOT18 NOT gate circuit; the plurality of AND AND gate circuits can be ten AND AND gate circuits, including an AND10 AND gate circuit, an AND11 AND gate circuit, an AND12 AND gate circuit, an AND13 AND gate circuit, an AND14 AND gate circuit, an AND15 AND gate circuit, an AND16 AND gate circuit, an AND17 AND gate circuit, an AND18 AND gate circuit and an AND19 AND gate circuit; each of the plurality of AND AND gate circuits includes four input ends.

[0030] The input end of the NOT11 NOT gate circuit, the NOT13 NOT gate circuit, the NOT15 NOT gate circuit and the NOT17 NOT gate circuit is as the input end of the VTP voltage control circuit 22, and inputs a control signal VTP_SW; the output end of the NOT11 NOT gate circuit is electrically connected with the input end of the NOT12 NOT gate circuit, one input end of the AND10 AND gate circuit, one input end of the AND12 AND gate circuit, one input end of the AND14 AND gate circuit, one input end of the AND16 AND gate circuit and one input end of the AND18 AND gate circuit respectively; the output end of the NOT12 NOT gate circuit is electrically connected with one input end of the AND11 AND gate circuit, one input end of the AND13 AND gate circuit, one input end of the AND15 AND gate circuit, one input end of the AND17 AND gate circuit and one input end of the AND19 AND gate circuit respectively.

[0031] The output end of the NOT13 NOT gate circuit is electrically connected with the input end of the NOT14 NOT gate circuit, one input end of the AND10 AND gate circuit, one input end of the AND11 AND gate circuit, one input end of the AND14 AND gate circuit, one input end of the AND15 AND gate circuit, one input end of the AND18 AND gate circuit and one input end of the AND19 AND gate circuit respectively; the output end of the NOT14 NOT gate circuit is electrically connected with one input end of the AND12 AND gate circuit, one input end of the AND13 AND gate circuit, one input end of the AND16 AND gate circuit and one input end of the AND17 AND gate circuit respectively.

[0032] The output end of the NOT15 NOT gate circuit is electrically connected with the input end of the NOT16 NOT gate circuit, one input end of the AND10 AND gate circuit, one input end of the AND11 AND gate circuit, one input end of the AND12 AND gate circuit, one input end of the AND13 AND gate circuit, one input end of the AND18 AND gate circuit and one input end of the AND19 AND gate circuit respectively; the output end of the NOT16 NOT gate circuit is electrically connected with one input end of the AND14 AND gate circuit, one input end of the AND15 AND gate circuit, one input end of the AND16 AND gate circuit and one input end of the AND17 AND gate circuit respectively.

[0033] The output end of the NOT17 NOT gate circuit is electrically connected with the input end of a NOT18 NOT gate circuit, one input end of an AND10 AND gate circuit, one input end of an AND11 AND gate circuit, one input end of an AND12 AND gate circuit, one input end of an AND13 AND gate circuit, one input end of an AND14 AND gate circuit, one input end of an AND15 AND gate circuit, one input end of an AND16 AND gate circuit, and one input end of an AND17 AND gate circuit, respectively; and the output end of the NOT18 NOT gate circuit is electrically connected with one input end of an AND18 AND gate circuit and one input end of an AND19 AND gate circuit, respectively.

[0034] As shown in Figure 4 The VTN voltage generating circuit 23 includes a plurality of resistors and a plurality of control switches; the number of the plurality of resistors is the same as the number of the plurality of control switches; one end of a first resistor in the plurality of resistors is an input end of the VTN voltage generating circuit 23, the other end of the first resistor is electrically connected with one end of a second resistor in the plurality of resistors, the other end of the second resistor is electrically connected with one end of a third resistor in the plurality of resistors, and so on, until the other end of a penultimate resistor in the plurality of resistors is electrically connected with one end of a last resistor in the plurality of resistors, and the other end of the last resistor is grounded; one end of each resistor in the plurality of resistors is electrically connected with one end of a corresponding control switch in the plurality of control switches, and the other end of each control switch is electrically connected with each other and serves as an output end of the VTN voltage generating circuit 23, outputting a VTN voltage signal. The plurality of resistors can be ten resistors, including R1 resistor to R10 resistor; the plurality of control switches can be ten control switches, including Y0-control switch to Y9-control switch; and the plurality of resistors and the plurality of control switches are in one-to-one correspondence.

[0035] One end of resistor R1 serves as the input terminal of the VTN voltage generating circuit 23. The other end of resistor R1 is electrically connected to one end of resistor R2, the other end of resistor R2 is electrically connected to one end of resistor R3, the other end of resistor R3 is electrically connected to one end of resistor R4, the other end of resistor R4 is electrically connected to one end of resistor R5, the other end of resistor R5 is electrically connected to one end of resistor R6, the other end of resistor R6 is electrically connected to one end of resistor R7, the other end of resistor R7 is electrically connected to one end of resistor R8, the other end of resistor R8 is electrically connected to one end of resistor R9, the other end of resistor R9 is electrically connected to one end of resistor R10, and the other end of resistor R10 is grounded. One end of resistor R1 is electrically connected to one end of the Y0-control switch, and one end of resistor R2 is electrically connected to... One end of the Y1-control switch and one end of the R3 resistor are electrically connected to one end of the Y2-control switch, one end of the R4 resistor is electrically connected to one end of the Y3-control switch, one end of the R5 resistor is electrically connected to one end of the Y4-control switch, one end of the R6 resistor is electrically connected to one end of the Y5-control switch, one end of the R7 resistor is electrically connected to one end of the Y6-control switch, one end of the R8 resistor is electrically connected to one end of the Y7-control switch, one end of the R9 resistor is electrically connected to one end of the Y8-control switch, and one end of the R10 resistor is electrically connected to one end of the Y9-control switch; the other ends of the Y0-control switches to the Y9-control switches are all electrically connected and serve as the output terminals of the VTN voltage generation circuit 23, outputting the VTN threshold voltage signal, which is the lower threshold voltage signal.

[0036] like Figure 4 As shown, the VTP voltage generating circuit 24 includes several resistors and several control switches; the number of resistors is the same as the number of control switches; one end of the first resistor serves as the input terminal of the VTP voltage generating circuit 24, the other end of the first resistor is electrically connected to one end of the second resistor, the other end of the second resistor is electrically connected to one end of the third resistor, and so on, until the other end of the second-to-last resistor is electrically connected to one end of the last resistor, and the other end of the last resistor is grounded; one end of each resistor is electrically connected to one end of its corresponding control switch, and the other ends of all control switches are electrically connected to each other, serving as the output terminal of the VTP voltage generating circuit 24 to output a VTP voltage signal. The number of resistors can be ten, including resistors R11 to R20; the number of control switches can be ten, including control switches Y0+ to Y9+; the resistors and control switches correspond one-to-one.

[0037] One end of the R11 resistor is connected to the input end of the VTP voltage generating circuit 24, the other end of the R11 resistor is connected to one end of the R12 resistor, the other end of the R12 resistor is connected to one end of the R13 resistor, the other end of the R13 resistor is connected to one end of the R14 resistor, the other end of the R14 resistor is connected to one end of the R15 resistor, the other end of the R15 resistor is connected to one end of the R16 resistor, the other end of the R16 resistor is connected to one end of the R17 resistor, the other end of the R17 resistor is connected to one end of the R18 resistor, the other end of the R18 resistor is connected to one end of the R19 resistor, the other end of the R19 resistor is connected to one end of the R20 resistor, and the other end of the R20 resistor is grounded; one end of the R11 resistor is connected to one end of the Y0+ control switch, one end of the R12 resistor is connected to one end of the Y1+ control switch, one end of the R13 resistor is connected to one end of the Y2+ control switch, one end of the R14 resistor is connected to one end of the Y3+ control switch, one end of the R15 resistor is connected to one end of the Y4+ control switch, one end of the R16 resistor is connected to one end of the Y5+ control switch, one end of the R17 resistor is connected to one end of the Y6+ control switch, one end of the R18 resistor is connected to one end of the Y7+ control switch, one end of the R19 resistor is connected to one end of the Y8+ control switch, and one end of the R20 resistor is connected to one end of the Y9+ control switch; the other ends of the Y0+ control switch to the Y9+ control switch are electrically connected and serve as the output end of the VTP voltage generating circuit 24, outputting the VTP threshold voltage signal, i.e., the upper threshold voltage signal.

[0038] The bandgap reference circuit 1 generates the VREF reference voltage, and the control end of the hysteresis voltage generating circuit 2 inputs the digital control signals VTP_SW<3:0> and VTN_SW<3:0>; the control signal VTP_SW<3:0> and the control signal VTN_SW<3:0> are 4-bit digital control signals; taking the VTN voltage control circuit as an example, as shown in Table 1 below, the VTN voltage control circuit of the hysteresis voltage generating circuit 2 converts the 4-bit binary digital control signal VTN_SW<3:0> into a decimal control signal.

[0039] Table 1 Digital control signal conversion table in the VTN voltage control circuit

[0040]

[0041] The VTP voltage control circuit converts the 4-bit binary digital control signal into a decimal control signal, and then controls the hysteresis voltage generation circuit 2 to generate the VTN threshold voltage signal and the VTP threshold voltage signal through the VTN voltage generation circuit and the VTP voltage generation circuit according to the resistance and the opening and closing of the control switch in the respective circuits. According to Ohm's law, the accurate VTN threshold voltage signal and the VTP threshold voltage signal can be obtained. The calculation process is as follows:

[0042]

[0043]

[0044] In the formula, R is the resistance value of the resistors in the VTN voltage generation circuit and the VTP voltage generation circuit, and the resistance values of the resistors in the VTN voltage generation circuit and the VTP voltage generation circuit are the same. VREF is the reference voltage output by the bandgap reference voltage 1. The accuracy of the upper threshold voltage and the lower threshold voltage is determined by the VREF reference voltage and the relative accuracy of the resistors in the VTN voltage generation circuit and the VTP voltage generation circuit. In the conventional CMOS process, the relative accuracy of the resistors is much higher than their absolute accuracy due to the influence of doping concentration, photolithography error, and process fluctuation. Based on this, a high-precision threshold voltage can be generated.

[0045] As shown in Figures 5-6 , it is the input-output characteristic curve of the hysteresis comparator. The input-output characteristic presents a unique hysteresis curve shape. The output state determination mechanism of the hysteresis comparator not only depends on the input signal state, but also is closely related to the current output state. Specifically, when the output signal of the core comparator 4 is in a high state, only when the input signal of the negative input end of the core comparator changes to the VTN threshold voltage signal and the VIN voltage to be compared rises above the VTN threshold voltage signal, the output state of the core comparator will flip and switch to a low state. When the output signal of the core comparator 4 is in a low state, only when the input signal of the negative input end of the core comparator changes to the VTP threshold voltage signal and the VIN voltage to be compared drops below the VTP threshold voltage signal, the output state of the core comparator will flip and switch to a high state. Based on the above characteristics, the high-precision hysteresis window flexible comparator has significant anti-interference and anti-noise capability. In actual application, if the amplitude of a certain interference signal or glitch is less than the difference between the VTP threshold voltage and the VTN threshold voltage, the interference signal will not trigger the unexpected flip of the output state, thereby effectively ensuring the stability and reliability of the output signal.

[0046] The data selection circuit 3 receives the VTN threshold voltage signal and the VTP threshold voltage signal output by the hysteresis voltage generation circuit 2. When the output signal of the core comparator 4 is high, the data selector 3 outputs the VTN threshold voltage signal. When the VIN voltage signal to be compared input to the positive input terminal of the core comparator 4 rises to or exceeds the VTN threshold voltage signal, the output signal of the core comparator 4 transitions from high to low, triggering the hysteresis window function. When the output signal of the core comparator 4 is low, the data selector 3 outputs the VTP threshold voltage signal. When the VIN voltage signal to be compared input to the positive input terminal of the core comparator 4 falls to or falls below the VTP threshold voltage signal, the output signal of the core comparator 4 transitions from low to high, triggering the hysteresis window function.

[0047] When the output signal of core comparator 4 is high, the output of core comparator will not switch from high to low when the VIN voltage signal to be compared drops to the VTN threshold voltage signal; when the output signal of core comparator 4 is low, the output of core comparator will not switch from low to high when the VIN voltage signal to be compared rises to the VTP threshold voltage signal.

[0048] like Figures 5-6 As shown, clockwise and counterclockwise hysteresis curves are achieved by controlling the magnitude relationship between the VTN and VTP voltage signals. The hysteresis voltage generation circuit 2 outputs VTN and VTP voltage signals. By adjusting the magnitude relationship between the VTN and VTP voltage signals, the direction of the hysteresis curve can be dynamically selected according to the characteristics of the input signal. When the core comparator output is high, the MUX data selector outputs the VTN threshold voltage signal, making the falling edge threshold voltage the VTN threshold voltage signal. When the core comparator output is low, the MUX data selector outputs VT... The P threshold voltage signal enables the rising edge threshold voltage to be the VTP threshold voltage signal. When the VTP threshold voltage signal is less than the VTN threshold voltage signal, the threshold voltage triggered when the input VIN comparison voltage signal rises is higher than the threshold voltage triggered when the input VIN comparison voltage signal falls, thus achieving a clockwise hysteresis curve. When the VTP threshold voltage signal is greater than the VTN threshold voltage signal, the threshold voltage triggered when the input VIN comparison voltage signal falls is higher than the threshold voltage triggered when the input VIN comparison voltage signal rises, thus achieving a counterclockwise hysteresis curve. By adjusting the magnitude relationship between the VTP and VTN threshold voltage signals, the direction of the hysteresis curve can be dynamically selected according to the characteristics of the input signal, achieving a clockwise or counterclockwise hysteresis curve direction, optimizing anti-interference capability. This effectively improves the adaptability and anti-interference capability of the hysteresis comparator under different operating conditions, meeting the urgent needs of modern electronic systems for high-precision, flexible, and adjustable signal processing.

[0049] The foregoing is considered as illustrative of the principles of the application. Numerous modifications and changes will readily occur to those skilled in the art, which modifications and changes are to be understood as intended to be comprehended within the scope of the application as set forth in the claims that follow.

Claims

1. A high-precision comparator with a flexibly adjustable hysteresis window, characterized in that: The circuit includes a bandgap reference circuit (1), a hysteresis voltage generation circuit (2), a data selector (3), and a core comparator (4). The output of the bandgap reference circuit (1) is electrically connected to the input of the hysteresis voltage generation circuit (2), and the output of the hysteresis voltage generation circuit (2) is electrically connected to the data selector (3). The output of the data selector (3) is electrically connected to the negative input of the core comparator (4), and the positive input of the core comparator (4) is input with the VIN voltage signal to be compared. The output of the core comparator (4) is electrically connected to the control terminal of the data selector (3). The control terminal of the hysteresis voltage generation circuit (2) is input with a control signal, which controls the magnitude of the output VTN threshold voltage signal and VTP threshold voltage signal of the hysteresis voltage generation circuit (2). The data selector (3) adjusts the output threshold voltage signal according to the output signal of the core comparator (4).

2. The high-precision comparator with a flexibly adjustable hysteresis window according to claim 1, characterized in that: The hysteresis voltage generation circuit includes a VTN voltage control circuit (21), a VTP voltage control circuit (22), a VTN voltage generation circuit (23), and a VTP voltage generation circuit (24). The input terminal of the VTN voltage control circuit (21) receives the control signal VTN_SW, and the output terminal of the VTN voltage control circuit (21) is electrically connected to the control terminal of the VTN voltage generation circuit (23). The input terminal of the VTN voltage generation circuit (23) is electrically connected to the output terminal of the bandgap reference circuit (1), and the output terminal of the VTN voltage generation circuit (23) is electrically connected to the input terminal of the data selector (3). The input terminal of the VTP voltage control circuit (22) receives the control signal VTP_SW, and the output terminal of the VTP voltage control circuit (22) is electrically connected to the control terminal of the VTP voltage generation circuit (24). The input terminal of the VTP voltage generation circuit (24) is electrically connected to the output terminal of the bandgap reference circuit (1), and the output terminal of the VTP voltage generation circuit (24) is electrically connected to the input terminal of the data selector (3).

3. A high-precision comparator with a flexibly adjustable hysteresis window according to claim 2, characterized in that: The VTN voltage control circuit (21) includes several NOT gates and several AND gates; the VTN voltage control circuit (21) converts the control signal VTN_SW into a control signal that controls the opening and closing of several control switches in the VTN voltage generating circuit (23) through the logical operations of several NOT gates and several AND gates; the number of several AND gates is equal to the number of several control switches in the VTN voltage generating circuit (23); The VTP voltage control circuit (22) includes several NOT gates and several AND gates; the VTP voltage control circuit (22) converts the control signal VTP_SW into a control signal that controls the opening and closing of several control switches in the VTP voltage generating circuit (24) through the logical operation of several NOT gates and several AND gates; the number of several AND gates is equal to the number of several control switches in the VTP voltage generating circuit (24).

4. A high-precision comparator with a flexibly adjustable hysteresis window according to claim 2, characterized in that: The VTN voltage generating circuit (23) includes several resistors and several control switches; the number of resistors is the same as the number of control switches; one end of the first resistor among the resistors serves as the input terminal of the VTN voltage generating circuit (23), the other end of the first resistor among the resistors is electrically connected to one end of the second resistor among the resistors, the other end of the second resistor among the resistors is electrically connected to one end of the third resistor among the resistors, until the other end of the second to last resistor among the resistors is electrically connected to one end of the last resistor among the resistors, and the other end of the last resistor among the resistors is grounded; one end of each resistor among the resistors is electrically connected to one end of the control switch corresponding to each resistor, and the other ends of the control switches are all electrically connected to each other and serve as the output terminal of the VTN voltage generating circuit (23) to output the VTN threshold voltage signal.

5. A high-precision comparator with a flexibly adjustable hysteresis window according to claim 1, characterized in that: The VTP voltage generating circuit (24) includes several resistors and several control switches; the number of resistors is the same as the number of control switches; one end of the first resistor among the resistors serves as the input terminal of the VTP voltage generating circuit (24), the other end of the first resistor among the resistors is electrically connected to one end of the second resistor among the resistors, the other end of the second resistor among the resistors is electrically connected to one end of the third resistor among the resistors, until the other end of the second to last resistor among the resistors is electrically connected to one end of the last resistor among the resistors, and the other end of the last resistor among the resistors is grounded; one end of each resistor among the resistors is electrically connected to one end of the control switch corresponding to each resistor, and the other ends of the control switches are all electrically connected to each other and serve as the output terminal of the VTP voltage generating circuit (24), outputting the VTP threshold voltage signal.

6. A high-precision comparator with a flexibly adjustable hysteresis window according to claim 1, characterized in that: The hysteresis voltage generation circuit (2) outputs VTN threshold voltage signal and VTP threshold voltage signal. By adjusting the magnitude relationship between VTN threshold voltage signal and VTP threshold voltage signal, the direction of the hysteresis curve can be dynamically selected according to the characteristics of the input signal. When the VTP threshold voltage signal is less than the VTN threshold voltage signal, the threshold voltage triggered when the input VIN comparison voltage signal rises is higher than the threshold voltage triggered when the input VIN comparison voltage signal falls, thus achieving a clockwise hysteresis curve. When the VTP threshold voltage signal is greater than the VTN threshold voltage signal, the threshold voltage triggered when the input VIN comparison voltage signal drops is higher than the threshold voltage triggered when the input VIN comparison voltage signal rises, thus realizing a counterclockwise hysteresis curve.

7. A high-precision comparator with a flexibly adjustable hysteresis window according to claim 1, characterized in that: The data selection circuit (3) receives the VTN threshold voltage signal and the VTP threshold voltage signal output by the hysteresis voltage generation circuit (2). When the output signal of the core comparator (4) is high, the data selector (3) outputs the VTN threshold voltage signal, and when the VIN voltage signal to be compared rises to the VTN threshold voltage signal, the output signal of the core comparator (4) is switched from high to low to trigger the hysteresis window function. When the output signal of the core comparator (4) is low, the data selector (3) outputs the VTP threshold voltage signal, and when the VIN voltage signal to be compared falls to the VTP threshold voltage signal, the output signal of the core comparator (4) is switched from low to high to trigger the hysteresis window function.