LINEARIZATION CIRCUIT AND METHOD FOR LINEARIZING A MEASUREMENT SIGNAL

20200021306 ยท 2020-01-16

    Inventors

    Cpc classification

    International classification

    Abstract

    A disclosed linearization circuit includes a reference component, a charging and discharging controller, and a comparator circuit. The reference component has a non-linear dependence on current or voltage. The charging and discharging controller is configured to control alternating charging and discharging of the reference component. A voltage associated with the reference component forms a reference signal. The charging and discharging are controlled such that the reference signal has a periodic time dependence. The reference signal and a measurement signal are received by the comparator circuit. The comparator circuit is configured to generate and output a square-wave signal based on a reference time point during a charge-discharge cycle, and based on a result of a comparison of the reference signal with the measurement signal, such that the square-wave signal represents a linearized output signal. This disclosure further relates to a corresponding method.

    Claims

    1. A linearization circuit configured to linearize a measurement signal (U.sub.d), the linearization circuit comprising: an input configured to receive the measurement signal (U.sub.d) and an output configured to provide a linearized output signal; a reference circuit component having a non-linear dependence on current or voltage, wherein a voltage across the reference circuit component or a voltage derived from a current flowing through the reference circuit component, forms a reference signal (U.sub.c) or an alternating component of a reference signal (U.sub.c); a charging and discharging controller configured to control alternating charging and discharging of the reference circuit component, wherein the charging and discharging are controlled so that the reference signal (U.sub.c) has a substantially periodic time dependence; and a comparator circuit having a first comparator input, a second comparator input, and a comparator output, wherein, the comparator circuit is configured to generate, and to provide to the comparator output, a square-wave signal (U.sub.a), when the reference signal (U.sub.c) is provided to the first comparator input and the measurement signal (U.sub.d) is provided to the second comparator input, the square-wave signal (U.sub.a) being generated based on a reference time during a charge-discharge cycle and a result of a comparison of the reference signal (U.sub.c) with the measurement signal (U.sub.d), such that the square-wave signal (U.sub.a) represents the linearized output signal.

    2. The linearization circuit of claim 1, wherein the comparator circuit further comprises a comparator and a flipflop, wherein the comparator is configured, to compare the signals received by the first and second comparator inputs, to generate a result of the comparison, and to provide the result of the comparison to the flipflop, and wherein the flipflop is configured to generate the square-wave signal (U.sub.a) and to provide the square-wave signal (U.sub.a) as output via the comparator output.

    3. The linearization circuit of claim 2, wherein the comparator is configured as a Schmitt trigger, such that the comparator is configured to output a low level when the reference signal (U.sub.c) is less than the measurement signal (U.sub.d), and to output a high level when the reference signal (U.sub.c) is greater than the measurement signal (U.sub.d).

    4. The linearization circuit of claim 2, wherein the flipflop is an RS flipflop having a set input (S) and a reset input (R), wherein the set input (S) is connected to the charging and discharging controller, and wherein the flipflop is configured with the charging and discharging controller such that the flipflop is set at the start of a charging process of the reference circuit component.

    5. The linearization circuit of claim 2, wherein the flipflop is a D flipflop having a data input (D), a clock input (CLK), and a reset input (R), wherein the data input (D) is on a high level and the clock input (CLK) is connected to the charging and discharging controller, and wherein the flipflop is configured with the charging and discharging controller such that the flipflop is set at the start of a charging process of the reference circuit component.

    6. The linearization circuit of claim 2, wherein the flipflop is either an RS flipflop having a set input (S) and a reset input (R), or the flipflop is a D flipflop having a data input (D), a clock input (CLK), and a reset input (R), wherein, when the flipflop is an RS flipflop: the set input (S) is connected to the charging and discharging controller; and the flipflop is configured with the charging and discharging controller such that the flipflop is set at the start of a charging process of the reference circuit component, wherein, when the flipflop is a D flipflop: the data input (D) is on a high level and the clock input (CLK) is connected to the charging and discharging controller; and the flipflop is configured with the charging and discharging controller such that the flipflop is set at the start of a charging process of the reference circuit component, and wherein the comparator and the flipflop are configured such that the result of the comparison provided by the comparator output is provided to a reset input (R) of the flipflop.

    7. The linearization circuit of claim 1, wherein the comparator circuit further comprises a comparator and an AND gate, wherein the comparator and the AND gate are configured such that: the comparator is configured to compare the signals received by the first and second comparator inputs; the comparator is configured to provide a result of the comparison to the AND gate, and the AND gate is configured to generate the square-wave signal (U.sub.a) and to provide the square-wave signal (U.sub.a) as output via the comparator output.

    8. The linearization circuit of claim 1, further comprising: a first resistor (R1); and a second resistor (R2), wherein the reference circuit component is configured to be charged via the first resistor (R1) and discharged via the second resistor (R2).

    9. The linearization circuit of claim 8, wherein the first and second resistors (R1, R2) are configured such that discharging the reference circuit component is faster than charging the reference circuit component.

    10. The linearization circuit of claim 8, wherein the first resistor (R1) is configured to be adjusted, or the linearization circuit further comprises an adjustable resistor that is connected in parallel or in series to the first resistor (R1).

    11. The linearization circuit of claim 1, further comprising: a switching device having at least one control input, wherein the at least one control input is connected to the charging and discharging controller, and wherein the switching device connects a terminal of the first resistor (R1) or a terminal of the second resistor (R2) to a terminal of the reference circuit component based on a control signal provided to the at least one control input.

    12. The linearization circuit of claim 1, wherein the reference circuit component further comprises a coil (L) or a capacitor (C).

    13. The linearization circuit of claim 12, wherein the capacitor (C) or the coil (L) has a temperature coefficient having a value that is less than approximately 10.sup.3/K.

    14. The linearization circuit of claim 1, further comprising: a low pass filter configured to receive the square-wave signal (U.sub.a), wherein the low pass filter is configured to generate a direct voltage (U.sub.a,dc) from the square-wave signal (U.sub.a).

    15. The linearization circuit of claim 1, further comprising: a microcontroller in which the charging and discharging controller and/or other parts of the linearization circuit are implemented.

    16. The linearization circuit of claim 1, wherein the reference circuit component is configured to be adjustable to thereby adjust charging and discharging behavior.

    17. A method of linearizing a measurement signal, the method comprising: receiving, by a linearization circuit, a measurement signal (U.sub.d), wherein the linearization circuit includes a reference circuit component, a charging and discharging controller, and a comparator circuit, the comparator circuit having a first comparator input and a second comparator input; alternating charging and discharging of the reference circuit component to thereby generate a reference signal (U.sub.c), which depends on a voltage provided to the reference circuit component, or the reference signal (U.sub.c) depending on a current flowing through the reference circuit component, wherein the charging and discharging of the reference circuit component is controlled such that the reference signal (U.sub.c) has a periodic time dependence; providing the reference signal (U.sub.c) to the first comparator input of the comparator circuit; providing the measurement signal (U.sub.d) to the second comparator input of the comparator circuit; generating, by the comparator circuit, a result of a comparison of the reference signal (U.sub.c) with the measurement signal (U.sub.d); generating a square-wave signal (U.sub.a) based on a reference time during a charge-discharge cycle and based on the result of the comparison of the reference signal (U.sub.c) with the measurement signal (U.sub.d); and providing the square-wave signal (U.sub.a) from the linearization circuit as a linearized output signal.

    18. The method according to claim 17, further comprising; using a start time of charging the reference circuit component as a reference time during a charge-discharge cycle.

    19. The method according to claim 18, further comprising: determining when the reference signal (U.sub.c) is greater than the measurement signal (U.sub.d); after charging the reference circuit component by the comparator circuit is started, outputting a first level until the reference signal (U.sub.c) is determined to be greater than the measurement signal (U.sub.d); and outputting a second level until a time of a subsequent start of charging the reference circuit component by the comparator circuit.

    Description

    [0053] There are various ways of advantageously developing and improving the rationale of this disclosure. We refer to the claims that are subordinate to the dependent claims and the explanation of various embodiments with reference to the figure. Designs and improvements of the teaching are described in conjunction with explaining an embodiment based on the drawing. Wherein:

    [0054] FIG. 1 shows a diagram of an exemplary curve of a reference signal which is constructed of a sequence of charge-discharge cycles of a capacitor;

    [0055] FIG. 2 shows a diagram with the reference signal according to FIG. 1 together with a measurement signal U.sub.d and a square-wave signal U.sub.a;

    [0056] FIG. 2a shows a diagram with the reference signal U.sub.c and the measurement signal U.sub.d together with the clock signal CLK, a signal on the reset input of a D flipflop, and a signal at the output Q of the D flipflop;

    [0057] FIG. 3 shows a diagram with an exemplary measurement signal;

    [0058] FIG. 4 shows a diagram with the linearization error of the measurement signal according to FIG. 3;

    [0059] FIG. 5 shows a diagram with the linearized output signal of the linearization circuit according to an embodiment, wherein the output signal is equalized by a low pass filter; and

    [0060] FIG. 6 shows a diagram with the linearization error of the linearized output signal;

    [0061] FIG. 7 shows an exemplary circuit for linearizing a measurement signal using a capacitor as reference component; and

    [0062] FIG. 8 shows an exemplary circuit for linearizing a measurement signal using a coil as reference component.

    [0063] FIG. 1 shows a diagram with a temporal progression of a reference signal which can be generated and used by a linearization circuit according to an embodiment. The diagram is a plot of a voltage U.sub.c over a time t. The reference signal is constructed by a sequence of charging and discharging phases of a capacitor of the linearization circuit. A temperature-stable capacitor (e.g., a C0G or NP0) is constantly charged and discharged. Said capacitor is charged via a temperature-stable first resistor and follows a typical capacitor charging curve. It is discharged via a second resistor in such a manner that discharging is faster than charging, such that the stable initial state is reached again very fast. The discharging resistorsecond resistordoes not have to meet any special precision or temperature-stability requirements.

    [0064] A charging phase 1 of the capacitor is followed by a discharging phase 2 of the capacitor or vice versa. After a period length T, a new charging phase and thus a new charge-discharge cycle is started, i.e. the charging and discharging of the capacitor is controlled such that a periodic reference signal with a period length T is generated. In the exemplary embodiment shown in FIG. 1, this period is approx. 0.8 ms. It is evident that the charging and discharging phases change after about half a period length. Not the entire discharging phase is needed for discharging the capacitor. This ensures that the capacitor is really discharged at the start of a new charging phase and thus at the start of a new charge-discharge cycle.

    [0065] The linearization circuit includes a comparator circuit which in the exemplary embodiment shown herein includes a comparator and a D flipflop. The comparator compares the reference signal U.sub.c with the measurement signal U.sub.d. The measurement signal U.sub.d is the already converted direct voltage which depends on a measured physical variable. The flipflop is set at the start of each charging phase, whereby its initial voltage U.sub.a is set to logic 1, i.e. takes a high level. If the reference signal U.sub.c becomes greater than the measurement signal U.sub.d, the comparator switches and sets the flipflop back to logic 0, i.e. to a low level.

    [0066] FIG. 2 shows, in addition to the reference signal U.sub.c according to FIG. 1, a time progression of a measurement signal U.sub.d and a square-wave signal U.sub.a, which is generated by the linearization circuit. It is assumed for the measurement signal U.sub.d shown that the physical variable which is represented by the measurement signal U.sub.d changes linearly. This implies that the measurement signal U.sub.d rises according to the characteristic curve of the sensor which generated this measurement signal.

    [0067] FIG. 2a shows the time progression of reference signal U.sub.c and measurement signal U.sub.d and the associated level states at a D flipflop. The clock signal controlsas described abovethe emergence of the curve U.sub.c in that a capacitor is charged when switching to high level and discharged again when switching to low level. At the same time, the clock signal is applied to the CLK input of the D flipflop. If the D input of the flipflop is always on logic 1 (high level), the output Q with the rising edge is set by the clock signal. The comparator constantly compares U.sub.d and U.sub.c. If U.sub.d is greater than U.sub.c, the output of the comparator jumps from 0 to 1. This output signal is fed to the R input of the flipflop and causes the flipflop to be reset. Output Q thus switches to logic 0 (low level). The duration of the high level at the Q output of the D flipflop also depends on a reference time and a result of a comparison of measurement signal and reference signal, and thus represents the linearized measurement signal.

    [0068] The characteristic curve of the sensor is completely shown in FIG. 3. The sensor is an eddy current measuring system, which determines the distance of a measured object from the measuring system. Accordingly, the measurement signal U.sub.d is plotted over the measured distance d in FIG. 3. It is visible that the sensitivity of the measurement system increases at a small measuring distance, and the characteristic curve therefore rises quickly. As the distance increases, sensitivity decreases, which is noticeable by a flatter characteristic curve. An exponential curve results for the measurement signal U.sub.d depending on the distance d. If the characteristic curve is completely traveled during a measurement (i.e. the distance from the start of the measuring range to the end of the measuring range is constantly increased), the exponentially rising curve U.sub.d shown in FIG. 2 is obtained as a time-dependent curve.

    [0069] To compensate for the flattening curve towards the end of the measuring range, the measurement signal U.sub.d is compared to an exponential alternating voltage U.sub.c, and a square-wave signal U.sub.a is generated. As the measurement signal flattens, the flipflop is reset later and later, which compensates for the flattening curve of the measurement signal by longer pulses. The pulse width (logic 1 of the flipflop) thus increases as the distance increases. Therefore the pulse width is a direct measure of the measure original variable, which has been linearized by the linearization circuit. If the square-wave signal is applied to a low pass filter, e.g. a simple RC element, a linear output voltage is obtained associated with the original output variable. Linearization thus takes place in that the voltage contributions to the characteristic curve are reduced in the range of high sensitivity (narrower pulse width) and increased in the range of low sensitivity (wider pulse width).

    [0070] This behavior is evident in FIG. 2. A pulse of the square-wave signal always starts with a charging phase. Accordingly, the square-wave signal U.sub.a jumps from a low level (about 0 V) to a high level (about 5 V) at the beginning of a charging phase (identifiable by the beginning rise of the reference signal U.sub.c). Thus the start of a charging phase forms a reference time during a charge-discharge cycle. The square-wave signal stays on a high level until the reference signal U.sub.c has the same size as the measurement signal U.sub.d. Then the square-wave signal U.sub.a drops to a low level and stays there until a new charge-discharge cycle is started. It is also clearly visible that the pulse width changes as the measurement signal increases.

    [0071] The success of the linearization circuit will now be viewed in detail based on FIGS. 4 to 6. FIG. 4 shows the linearization error in percent for the characteristic curve according to FIG. 3. It can be seen that the measurement signal U.sub.d clearly deviates from a linear characteristic curve. The characteristic curve deviates from a linear characteristic curve by more than 10%.

    [0072] FIG. 5 shows a characteristic curve linearized using a linearization circuit according to an embodiment. It is evident from FIG. 5 that the output voltage U.sub.a of the linearization circuit deviates little from a straight line. FIG. 6 illustrates this once again in the form of the linearization error of the linearized output signal. It can be seen that the linearization error is considerably reduced. Most values are in a band of approximately 0.5%. This is a very significant reduction compared to the approximately 20% in FIG. 4.

    [0073] FIG. 7 shows a first embodiment of a linearization circuit according to an embodiment, wherein this first embodiment uses a capacitor C as reference component. The capacitor C has a very small temperature coefficient and may be a NP0 capacitor. One terminal of the capacitor C is connected to the output of a switching device 3, while the second terminal is connected to ground potential. The switching device 3 includes a first input 4, a second input 5, and a control input 6, wherein the switching device connects either the first input 4 or the second input 5 to the output, depending on the signal at the control input 6. A first voltage source U1 is applied to the first input 4 across a first resistor R1. The first resistor R1 is configured as a temperature-stable resistor. The second input 5 is connected via a second resistor R2 to a second voltage source U2. The voltage of the first voltage source U1 is greater than the voltage of the second voltage source U2. In principle, it is also conceivable that the second voltage source U2 is not provided and the second input of the switching device is connected to ground via the resistor R2. The optional design is outlined by a dashed line next to the second voltage source U2.

    [0074] The control input 6 of the switching device 3 is connected to a clock-pulse generator 7, such that the clock-pulse generator 7 is used as a charging and discharging controller as defined by various embodiments. The output signal of the clock-pulse generator 7 is additionally inputted into the clock input CLK of a D flipflop 8, which forms a comparator circuit 10 together with a comparator 9. A high level is applied to the data input D of the flipflop 8. The reset input R is connected to the output of the comparator 9. A square-wave signal U.sub.a which represents the linearized measurement signal is output at the output Q of the flipflop 8. A first input 11 of the comparator 9 is connected to the capacitor C and the output of the switching device. The measurement signal U.sub.d is inputted into a second input 12 of the comparator 9. The output of the flipflop 9 may be connected to a low pass filter 13, which is outlined in dashed lines as an optional addition in FIG. 7 and formed by a resistor and a capacitor connected in series. An equalized linearized output signal U.sub.a,dc is applied to the interface of resistor and capacitor.

    [0075] When this circuit is in operation, the clock-pulse generator 7 ensures together with the switching device 3 that the capacitor C is constantly charged and discharged. Since the control signal has a periodic design, the voltage across the capacitor C also has a periodic curve, which substantially matches the curve shown in FIG. 1. The period length T is defined by the period length of the output signal of the clock-pulse generator 7. The voltage across the capacitor C in this circuit forms the reference signal U.sub.c. We make reference to our above explanations for further details of the operation of the circuit.

    [0076] FIG. 8 shows a second embodiment of a linearization circuit according to an embodiment, wherein this second embodiment uses a coil L as reference component. The comparator circuit 10, the clock-pulse generator 7, and the optional low pass filter 13 are connected as in the first embodiment. Just the generation of the reference signal differs significantly. A switching device 14, which may be configured as a normally closed or normally open contact, is inserted between a voltage source U1 and a first terminal of the coil L. The control input of the switching device 14 is connected to the output of the clock-pulse generator 7. A second resistor R2, whose second terminal is connected to ground, is in addition connected to the first terminal of the coil L. A first resistor R1, whose second terminal is connected to a second voltage source or (optionally) to ground, is connected to a second terminal 16 of the coil L. The voltage at the second terminal 16 of the coil L is inputted in the second input 12 of the comparator 9.

    [0077] When the circuit is in operation, the control signal at the control input of the switching device 14 ensures that the coil L is periodically charged and discharged. By closing the switching contact of the switching device 14, the first terminal 15 of the coil L is connected to the voltage source U1 and thus raised to a higher potential. This results in a current flowing through the coil L and the resistor R1, wherein the coil L is energized. After opening the switching contact of the switching device 14, the coil L is discharged via resistor R2 and resistor R1. This creates a voltage drop across the resistor R1, which drop is dependent on the current flow through the coil. This voltage drop is used to generate a reference signal. If a second voltage source U2 is provided, the voltage drop across the resistor R1 forms the alternating component of the reference signal. If optionally a connection to ground (instead of to the second voltage source U2) is provided, the voltage drop across the resistor R1 forms the reference signal. Otherwise, the circuit displays the behavior described above.

    [0078] Even though the preceding explanations refer to moving through the entire characteristic curve of the sensor system, a person skilled in the art will see that a stationary measurement signal can also be linearized by the circuit. It is also not absolutely necessary that the output signal U.sub.a is converted into a direct voltage by a low pass filter. Instead, the pulse width of the square-wave signal can also be analyzed directly, for example using a counter. The respective measured value would then be obtained in digital form right away.

    [0079] The circuit can be implemented using a microcontroller. The microcontroller can control clock generation, switching of the capacitor between charging and discharging phases, and optionally the flipflop. Furthermore, a DA converter, which may optionally be included in the microcontroller, can be used to adjust the circuit to real sensors by adjusting the resistance value of the temperature-stable first resistor using the DA converter, which is connected in parallel. This makes adjustment of real sensors controlled by the microcontroller fast and easy.

    [0080] It should be emphasized that, despite using a microcontroller, the resolution of the linearization circuit does not depend on digital components such as an AD converter or DA converter of the microcontroller. According to an embodiment, only analog components (comparator) may be used to perform a comparison of the signals U.sub.c and U.sub.d, such that the resolution is only limited by the noise of these components. As such, a simple and low-cost microcontroller can be used, since it only performs control tasks. The other components of the circuit are simple, passive components, which allows the implementation of a very low-cost, very easily digitally adjustable circuit with a high precision and resolution. Also, only very few temperature-stable components are needed, which has a further positive effect on the costs.

    [0081] For further advantageous embodiments of the device according to an embodiment and to avoid repetition, see the general part of the description above and the appended claims.

    [0082] Finally, it should be expressly noted that the exemplary embodiments of the linearization circuit according to embodiments described above are only used to explain the claimed teachings but do not limit these teachings to these exemplary embodiments.

    LIST OF REFERENCE SYMBOLS

    [0083] U.sub.a Square-wave signal [0084] U.sub.c Reference signal [0085] U.sub.d Measurement signal [0086] U.sub.a,dc Equalized square wave voltage U.sub.a [0087] 1 Charging phase [0088] 2 Discharging phase [0089] 3 Switching device [0090] 4 First input (of the switching device) [0091] 5 Second input (of the switching device) [0092] 6 Control input (of the switching device) [0093] 7 Clock-pulse generator [0094] 8 D flipflop [0095] 9 Comparator [0096] 10 Comparator circuit [0097] 11 First input (of the comparator) [0098] 12 Second input (of the comparator) [0099] 13 Low pass filter [0100] 14 Switching device [0101] 15 First terminal (of the coil) [0102] 16 Second terminal (of the coil)