Method and debouncing module for debouncing an electrical input signal
By introducing a dejitter state variable and adjusting its value according to the state of the input signal, the problem of large dejitter delay in the noise heavy signal in the prior art is solved, and a fast and low-latency signal dejitter effect is achieved.
Patent Information
- Application Number
- CN202010280839.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-04-11
- Filing Date
- 2020-04-10
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2040-04-10
AI Technical Summary
When the prior art deals with electrical signals with heavy noise, it is difficult to effectively dejitter, resulting in frequent jumps in the output signal near the limit value and a long delay.
By introducing a dejitter state variable, the value of the variable is adjusted according to the current value of the input signal being higher or lower than the limit value, and an output signal is generated based on its value. This method allows the input signal to be kept on one side of the limit value for a long enough time without having to be in this state continuously, thereby reducing the impact of high-frequency fluctuations.
Fast de-bumping of noise-heavy electrical signals is achieved, reducing delays and preventing high-frequency jumps of the output signal near the limit value.
Smart Images

Figure CN111817691B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for debouncing an electric input signal and a debouncing module. Background Art
[0002] The general electrical signal and the electrical signal from the sensor in particular can be described as comprising a superposition of an ideal interference-free signal and additional interference.
[0003] The interference usually has a randomly distributed component, which is described as additive white Gaussian noise, for example. Therefore, the electrical signal has a high-frequency interference superimposed on it. Therefore, the interference changes the electrical signal so that it differs from the ideal signal.
[0004] In many different situations, it is necessary to determine whether a non-interfering electrical signal is above or below a predefined limit value. This typically involves generating a binary output signal whose value depends on whether the non-interfering electrical signal is above or below a predefined limit value.
[0005] However, especially in the case of the immediate vicinity of the limit value, the above-mentioned interference causes the electrical signal to change between a range above the limit value and a range below the limit value at a very high frequency, and thus causes a jump. Therefore, it is difficult to determine whether the interference-free signal is above or below the limit value or exceeds the limit value. Accordingly, the value of the output signal generated within the limit range will jump back and forth between two possible values at a high frequency (this phenomenon is also called "switching").
[0006] The prior art discloses a method in which an electrical signal is debounced by changing the value of the output signal only when the electrical signal is continuously above or below a limit value within a predefined period of time. However, this method may result in long delays, especially in the case of noisy signals, because the electrical signal repeatedly exceeds the limit value (even if only briefly). Summary of the invention
[0007] It is therefore an object of the present invention to provide a method and a debouncing module for debouncing an electrical input signal, which method and the debouncing module allow even very noisy electrical signals to be debouncing with short delay times.
[0008] According to the invention, this object is achieved by a method for debouncing an electrical input signal, the method comprising the following steps:
[0009] - receiving said input signal;
[0010] - confirming the current value of the input signal;
[0011] - determining whether said current value of said input signal is above or below at least one predefined limit value;
[0012] - Generate debounce state variables with defined initial values;
[0013] - modifying the value of the debounce state variable based at least on whether the value of the input signal is above or below the at least one limit value, wherein the value of the debounce state variable can be modified between a minimum value and a maximum value; and
[0014] - generating an output signal based on whether the value of the debounce state variable corresponds to the minimum value, the maximum value, or a value between the minimum value and the maximum value.
[0015] The method according to the invention is based on the basic idea of introducing an additional variable, namely the debounce state variable, which is a measure of the probability that the actual value of the electrical input signal is above or below a limit value.
[0016] In contrast to the prior art, therefore, instead of resetting the timer each time the electrical input signal exceeds a limit value, the value of the debounce state variable is continuously adjusted.
[0017] Therefore, for the change of the value of the output signal, it is sufficient as long as the time that the current value of the input signal is on one side of the limit value is long enough as a whole within a specific period. Therefore, it is no longer necessary for the current value of the input signal to be continuously on one side of the limit value within a specific period.
[0018] The effects of short-term (ie, high-frequency) fluctuations are thereby reduced and the electrical signal is debounced with a shorter delay.
[0019] Preferably, the initial value of the debounce state variable is determined based on the current value of the input signal. More specifically, if the current value of the input signal is less than the limit value, the initial value is set equal to the minimum value, and if the current value of the input signal is greater than the limit value, the initial value is set equal to the maximum value. However, alternatively, the initial value of the debounce state variable may also be specified as, for example, a minimum value or a maximum value.
[0020] By way of example, the minimum value is equal to zero and the maximum value is equal to one. However, any other closed interval may of course also be used.
[0021] In particular, the electrical input signal is a measurement signal from a sensor or a further processed measurement signal from a sensor. By way of example, the electrical input signal is a signal from a torque sensor, from an angular position sensor, from a temperature sensor, from a voltage sensor, from a current sensor and / or from a force sensor. A suitable sensor from which the input signal originates may be part of a steering system of a motor vehicle.
[0022] According to one configuration of the invention, the output signal is a binary signal. The output signal thus has two possible values, which correspond to the interpretations "electrical input signal above a limit value" and "electrical input signal below a limit value".
[0023] Preferably, the value of the output signal is modified if the value of the debounce state variable reaches the minimum value or the maximum value. In this case, the minimum value corresponds to an interpretation that the electrical input signal is below a limit value, which is why, after reaching the minimum value, the output signal corresponding to this state is then output. Similarly, the maximum value corresponds to an interpretation that the electrical input signal is above a limit value, which is why, after reaching the maximum value, the output signal corresponding to this state is then output.
[0024] Another aspect of the invention provides that the current value of the output signal remains unchanged as long as the value of the debounce state variable is between the minimum value and the maximum value. In other words, the output signal is only modified when the debounce state variable reaches one of its two extreme values, i.e. the minimum value or the maximum value. This reliably prevents the value of the output signal from changing at high frequencies, in particular jumping back and forth at high frequencies.
[0025] According to another configuration of the present invention, if the confirmed current value of the input signal is higher than the at least one limit value, the value of the debounce state variable increases with a predefined first gradient, and / or if the confirmed current value of the input signal is lower than the at least one limit value, the value of the debounce state variable decreases with a predefined second gradient. The first gradient and the second gradient may be equal to or different from each other.
[0026] Here and hereinafter, the term "predefined gradient" means that the first gradient and / or the second gradient is at least prescribed (ie, is constant) or is confirmed by the signal processing unit based on prescribed criteria.
[0027] Preferably, the first gradient and / or the second gradient is determined based on how much the current value of the input signal is above or below the at least one limit value. Thus, values of the input signal that are far from the limit value are given greater weight, and thus it can be better indicated that the input signal is on a particular side of the limit value.
[0028] More preferably, the larger the value of the first gradient and / or the second gradient is, the further the current value of the input signal is from the at least one limit value. Therefore, if the current value of the input signal is further away from the limit value, the value of the debouncing state variable will change faster, resulting in further reducing the delay when debouncing the input signal.
[0029] According to another configuration of the present invention, the first gradient and / or the second gradient is determined based on a characteristic curve, wherein the characteristic curve assigns a certain gradient to the value of the input signal. In other words, the gradient of the debounce state variable is therefore a function of the distance of the current value of the input signal from the limit value, preferably a monotonically increasing function, in particular a strictly monotonically increasing function. In this case, the function can be continuous or discontinuous. For example, the characteristic curve can have a step-shaped mutation.
[0030] Another aspect of the present invention provides that at least one main first gradient and at least one secondary first gradient are provided and at least one predetermined positive limit value above the at least one limit value is also provided, wherein if the confirmed current value of the input signal is lower than the at least one positive limit value but higher than the at least one limit value, the value of the de-bouncing state variable increases with the main first gradient, and wherein, if the confirmed current value of the input signal is higher than the at least one positive limit value, the value of the de-bouncing state variable increases with the secondary first gradient; and / or at least one main second gradient and at least one secondary second gradient are provided and at least one predetermined negative limit value below the at least one limit value is also provided, wherein if the confirmed current value of the input signal is higher than the at least one negative limit value but lower than the at least one limit value, the value of the de-bouncing state variable decreases with the main second gradient, and wherein, if the confirmed current value of the input signal is lower than the at least one negative limit value, the value of the de-bouncing state variable decreases with the secondary second gradient.
[0031] In other words, at least one limit value, a positive limit value and a negative limit value define a plurality of zones, each zone corresponding to a predefined gradient of the debounce state variable. In particular, the gradient is constant within each zone, but different between each zone.
[0032] Second predefined limit values may be provided, wherein the value of the debounce state variable remains unchanged as long as the current value of the input signal is between the two limit values. Thus, the two limit values as such delimit a dead band within which the value of the debounce state variable does not change. In this way, the dead band may be implemented in a simple manner.
[0033] In particular, if the confirmed current value of the input signal is above the larger of the two limit values, the value of the debounce state variable increases with the first gradient, and / or if the confirmed current value of the input signal is below the smaller of the two limit values, the value of the debounce state variable decreases with the second gradient. Thus, at least one limit value is replaced by a dead band as it should be, wherein the value of the debounce state variable increases if the current value of the input signal is above the dead band, and the value of the debounce state variable decreases if the current value of the input signal is below the dead band.
[0034] According to the invention, the object is also achieved by a debouncing module, in particular a controller, the debouncing module having a signal input for receiving an input signal, a signal output for outputting an output signal, and a signal processing unit, wherein the signal processing unit is configured to perform the method as described above. With regard to advantages and features, reference is made to the above explanations on the method, which accordingly also apply to the debouncing module, and vice versa. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Further advantages and properties of the invention are obtained from the following description and the accompanying drawings, to which reference is made and in which:
[0036] - Figure 1 A block diagram of a debouncing module according to the present invention is schematically shown;
[0037] - Figure 2 showing a graph of an electrical input signal plotted against time;
[0038] - Figure 3 Shown (a) from Figure 2 (a) an amplified detail of an electrical input signal, and (b) a graph of the output signal obtained without debouncing the input signal;
[0039] - Figure 4 A flow chart of a method for debouncing an electrical input signal according to the present invention is schematically shown;
[0040] - Figure 5 shows the plotted against time according to the Figure 4 A graph of the output signal after debouncing of the inventive method; and
[0041] - Figure 6 A graph of an input signal plotted against time is shown to illustrate further aspects of the method according to the invention. DETAILED DESCRIPTION
[0042] Figure 1 The debouncing module 10 is shown. The debouncing module has a circuit for receiving an electrical input signal x.输入 (t) signal input terminal 12, used to output the electrical output signal x 输出 (t) signal output terminal 14, and signal processing unit 16.
[0043] The signal processing unit 16 is arranged in a manner connected downstream of the signal input terminal 12 and is connected to the signal input terminal 12 in a signal transmission manner. Further, the signal processing unit 16 is arranged in a manner connected upstream of the signal output terminal 14 and is connected to the signal output terminal 14 in a signal transmission manner.
[0044] Generally speaking, the signal processing unit 16 is designed to receive an electrical input signal x via the signal input terminal 12. 输入 , to process the input signal x 输入 And based on the input signal x 输入 Generate output signal x 输出 .
[0045] Figure 2 The input signal x is plotted against time t. 输入 An exemplary depiction of (t). Input signal x 输入 is the interference-free signal x 输入,无干扰 The superposition of the input signal x 输入 The value of will at least intermittently differ from the interference-free signal x 输入,无干扰 The interference may be random, i.e., may have a Gaussian distribution. However, the interference may also have a deterministic component.
[0046] In particular, the electrical input signal x 输入 (t) is the measurement signal from the sensor or a further processed measurement signal from the sensor. For example, the electrical input signal x 输入 (t) is a signal from a torque sensor, from an angular position sensor, from a temperature sensor, from a voltage sensor, from a current sensor and / or from a force sensor.
[0047] Input signal x 输入 The applicable sensor from which it is derived may be part of a steering system of a motor vehicle.
[0048] Thus, the debouncing module 10 may be part of a controller of a motor vehicle or an applicable subsystem of a motor vehicle.
[0049] Furthermore, the input signal x 输入 It is an analog signal or a digital signal, especially a binary signal.
[0050] For many different applications, the signal processing unit 16 needs to confirm that there is no interference signal x 输入,无干扰Is the value above or below the predefined limit x G It should be noted that Figure 2 The input signal x in 输入 With the limit value x G This is why the limit value x G For one reason.
[0051] Then, the output signal x 输出 is a binary signal, which is generated by the signal processing unit 16 and has one or two possible different values, depending on the interference-free input signal x 输入,无干扰 Is the value above or below the limit value x G The output signal x 输出 These two different possible values are hereinafter referred to as E and express.
[0052] If the input signal x 输入 (like Figure 2 As shown in the figure, the high-frequency noise with non-negligible amplitude makes it difficult to determine the interference-free signal x. 输入,无干扰 Is the value above or below the limit value x G .
[0053] This is Figure 3 (a) and again in detail in 3(b). Figure 3 (a) shows Figure 2 An enlarged view of the area enclosed by the points in Figure 3 (b) shows the output signal x 输出 The applicable result value of .
[0054] For a non-interfering input signal x 输入,无干扰 , we can get the interference-free output signal x 输出,无干扰 , the interference-free output signal has Single step transition to E.
[0055] On the other hand, for the actual input signal x 输入 , due to the noise component, without further processing the input signal x 输入 In this case, a large fluctuation in the output signal x will be obtained. 输出,r .
[0056] In order to generate a stable output signal, the input signal x 输入 It is therefore processed by the debouncing module 10 , more precisely by the signal processing unit 16 .
[0057] Generally speaking, the debouncing module 10 is designed to 输入 Debounce and convert the input signal x 输入 As the output signal x输出 Therefore, the output signal x 输出 is the input signal x after debounce 输入 The corresponding values of E and binary signal.
[0058] More specifically, the debounce module 10 is designed to perform the following Figures 4 to 6 Described for the electrical input signal x 输入 Method to eliminate jitter.
[0059] First, an electrical input signal x is received via the signal input terminal 12. 输入 And the electrical input signal is forwarded to the signal processing unit 16 (step S1).
[0060] Then confirm that the input signal x 输入 The current value of (step S2). At this time and in the following, "current value" should be understood to mean a measurable signal parameter, such as the input signal x 输入 The current amplitude or current power of
[0061] In step S2, the input signal x 输入 The current value and the limit value x G This involves confirming that the input signal x 输入 Is the current value of above or below the limit value x? G .
[0062] In addition, a debounce state variable x is generated with a predefined initial value E (Step S3). The predefined initial value is the minimum value W 最小 and the maximum value W 最大 In particular, W 最小 is equal to zero and W 最大 is equal to 1. However, of course any other closed interval can also be used.
[0063] Based on the input signal x 输入 The current value of determines the debounce state variable x E More precisely, if the input signal x 输入 The current value of is less than the limit value x G , then set the initial value equal to W 最小 , and if the input signal x 输入 The current value of is greater than the limit value x G , then set the initial value equal to W 最大 .
[0064] However, alternatively, the debounce state variable x E The initial value of is specified as, for example, zero or one.
[0065] Based on the input signal x 输入 The current value of the debounce state variable x is changed E More specifically, if the input signal x 输入 The confirmed current value is higher than the limit value x G , then the debounce state variable x is increased with a predefined first gradient E Similarly, if the input signal x 输入 The confirmed current value is lower than the limit value x G , then the debounce state variable x is reduced with a predefined second gradient E The value of .
[0066] Debounce state variable x E Therefore, the debounce state variable cannot be less than the minimum value W. 最小 Or greater than the maximum value W 最大 .
[0067] Here and in the following, “predefined gradient” means that the first gradient and / or the second gradient has been prescribed, ie is constant, or is confirmed by the signal processing unit 16 based on prescribed criteria.
[0068] exist Figure 5 The resulting debounced state variable x is plotted against time in E (t). In this case, the magnitude of the first gradient is equal to the magnitude of the second gradient and is consistent with the input signal x 输入 The current value of is above or below the limit value x G It doesn't matter how much.
[0069] Alternatively, the first gradient and the second gradient (or more precisely the magnitudes thereof) may also differ from one another.
[0070] In addition, the first gradient and / or the second gradient may depend on the input signal x 输入 The current value of is far from the limit value x G Therefore, the gradient of the debounced state variable is the input signal x 输入 The current value of is far from the limit value x G The function of the distance, that is,
[0071] m=f(x 输入 (t)-x G ),
[0072] Wherein, m represents the gradient. In other words, the debounce state variable x is thus determined based on the characteristic curve and / or another calculation code. E The characteristic curve and / or calculation curve is given by the function f(x 输入(t)-x G )definition.
[0073] Preferably, f is in x 输入 (t) = x G A monotonically rising function with a zero crossing point at the input signal x 输入 The current value of is far from the limit value x G The further away you are, the greater the magnitude of the gradient.
[0074] Based on the debounce state variable x E The value is equal to the minimum value W 最小 , equal to the maximum value W 最大 Still corresponds to the minimum value W 最小 With the maximum value W 最大 The output signal x is generated by 输出 (Step S5).
[0075] like Figure 5 It can be seen that as long as the debounce state variable x E The value is at the minimum value W 最小 With the maximum value W 最大 The output signal x 输出 The value remains unchanged.
[0076] However, when the debounce state variable x E Reach the maximum value W 最大 hour( Figure 5 The value of the output signal x 输出 Will change to E.
[0077] Similarly, only when the debounce state variable x E The value of W reaches the minimum value again 最小 When 输出 The value of
[0078] Will Figure 3 and Figure 5 By comparison, it can be seen that this approach enables efficient processing of the input signal x with short delay. 输入 De-bounce.
[0079] Figure 6 The input signal x is plotted against time. 输入 Another curve diagram of, on this basis, two other aspects are described below, each of which can be integrated into the above method alone or in combination.
[0080] Unlike the above method, in this case no single limit value is provided, but rather a first limit value x G1 and the second limit value x G2. Limit value x G At the first limit x G1 With the second limit value x G2 between.
[0081] When the input signal x 输入 The current value of the first limit value x G1 With the second limit value x G2 When the debounce state variable x E The value remains unchanged.
[0082] In other words, so as long as the input signal x 输入 The current value of the first limit value x G1 With the second limit value x G2 The debounce state variable x E The gradient of is set to zero.
[0083] Therefore, the first limit value x G1 and the second limit value x G2 Define a dead zone, in which the state variable x is debounced E Will not change.
[0084] Otherwise, it is used to adjust the input signal x 输入 The method for debouncing is similar to the above method, wherein the value above the first limit value x G1 When the debounce state variable x E The value of increases and falls below the second limit value x G2 When the debounce state variable x E The value of decreases.
[0085] Alternatively or additionally, a positive limit value x is provided P and negative limit x N . Positive limit value x P Greater than the limit value x G or greater than the first limit value x G1 , and the negative limit value x N Less than the limit value x G or less than the second limit value x G2 .
[0086] The following text only describes Figure 6 The situation depicted in the figure, that is, with the first limiting value x G1 and the second limit value x G2 However, the following explanation also applies to a single limit x G The difference is that there is no dead zone.
[0087] Multiple limit values x P 、x N 、x G1 and xG2 Five regions are defined, each region corresponding to a fixed predefined gradient of the debounce state variable.
[0088] More precisely, if the input signal x 输入 The current value of the first limit value x G1 and the positive limit value, the debounce state variable x E Increases with a constant main first gradient.
[0089] If the input signal x 输入 The current value of is greater than the positive limit value x P , then the debounce state variable x E Increase with a constant secondary first gradient that is greater than the primary first gradient.
[0090] If the input signal x 输入 The current value is at the negative limit x N With the second limit value x G2 The debounce state variable x E The current value of decreases with a constant primary-second gradient.
[0091] If the input signal x 输入 The current value of is less than the negative limit value x N , then the debounce state variable x E Decrease with a constant secondary second gradient, the magnitude of which is greater than the magnitude of the primary second gradient.
[0092] In other words, the limit value x P 、x N 、x G1 and x G2 Therefore, five regions are defined, within which the debounce state variable x E The gradient is constant in each case, however, if a transition occurs between zones, the gradient changes.
[0093] Of course, more than five zones can also be provided, for example by providing a plurality of positive limit values and / or a plurality of negative limit values.
[0094] Preferably, in this case, the debounce state variable x E The magnitude of the gradient also increases with the distance from the limit value x G increases with the distance.
Claims
1. A method for detecting an electrical input signal (x 输入 ) is a method for debouncing, the method comprising the following steps: - receiving the input signal (x 输入 ); - confirm the input signal (x 输入 )’s current value; - confirm the input signal (x 输入 ) is above or below at least one predefined limit value (x G ); - Generate a debounce state variable (x E ); - based at least on the input signal (x 输入 ) is higher or lower than at least one limit value (x G ) to change the debounce state variable (x E ), where The debounce state variable (x E ) can be at the minimum value (W 最小 ) and maximum value (W 最大 ) between; as well as -Based on the debounce state variable (x E ) corresponds to the minimum value (W 最小 ), the maximum value (W 最大 ) or the minimum value (W 最小 ) and the maximum value (W 最大 ) to generate the output signal (x 输出 ).
2. The method according to claim 1, characterized in that The output signal (x 输出 ) is a binary signal.
3. The method according to claim 1 or 2, characterized in that: If the debounce state variable (x E ) reaches the minimum value (W 最小 ) or the maximum value (W 最大 ), then change the output signal (x 输出 ) value.
4. The method according to claim 1 or 2, characterized in that: As long as the debounce state variable (x E ) is at the minimum value (W 最小 ) and the maximum value (W 最大 ), the output signal (x 输出 ) remains unchanged.
5. The method according to claim 1 or 2, characterized in that: If the input signal (x 输入 ) is higher than the at least one limit value (x G ), then the debounce state variable (x E ) increases with a predefined first gradient, and / or if the input signal (x 输入 ) is lower than the at least one limit value (x G ), then the debounce state variable (x E ) decreases with a predefined second gradient.
6. The method according to claim 5, characterized in that The first gradient and / or the second gradient is based on the input signal (x 输入 ) is higher or lower than at least one limit value (x G ) to confirm.
7. The method according to claim 6, characterized in that The input signal (x 输入 ) is far from the at least one limit value (x G ), the greater the value of the first gradient and / or the second gradient.
8. The method according to any one of claims 6 and 7, characterized in that The first gradient and / or the second gradient are determined based on a characteristic curve, wherein the characteristic curve assigns a certain gradient to the input signal (x 输入 ) value.
9. The method according to claim 1 or 2, characterized in that: At least one main first gradient and at least one secondary first gradient are provided and also above the at least one limit value (x G ) is a predetermined positive limit value (x P ), where if the input signal (x 输入 ) is lower than the at least one positive limit value (x P ) but is higher than at least one limit value (x G ), then the debounce state variable (x E ) increases with the main first gradient, and wherein, if the confirmed current value of the input signal is above the at least one positive limit value (x P ), then the debounce state variable (x E ) increases with the second first gradient; and / or characterised in that at least one main second gradient and at least one secondary second gradient are provided and that a value below said at least one limit value (x G ) is predetermined to have at least one negative limit value (x N ), where if the input signal (x 输入 ) is higher than the at least one negative limit value (x N ) but below at least one limit value (x G ), then the debounce state variable (x E ) is reduced with the main second gradient, and wherein, if the input signal (x 输入 ) is lower than the at least one negative limit value (x N ), then the debounce state variable (x E ) decreases at the said second gradient.
10. The method according to claim 1 or 2, characterized in that: Provide a first predefined limit value (x G1 ) and the second predefined limit value (x G2 ), wherein, as long as the current value of the input signal is between these two limit values, the debounce state variable (x E ) remains unchanged.
11. The method according to claim 5, characterized in that Provide a first predefined limit value (x G1 ) and the second predefined limit value (x G2 ), wherein, as long as the current value of the input signal is between these two limit values, the debounce state variable (x E ) remains unchanged. If the input signal (x 输入 ) is higher than the larger of the two limit values, then the debounce state variable (x E ) increases with the first gradient, and / or if the input signal (x E ) is lower than the smaller of the two limit values, the debounce state variable (x E ) decreases at the second gradient.
12. A de-jitter module (10), the de-jitter module having a function for receiving an input signal (x 输入 ) signal input terminal (12), for outputting an output signal (x 输出 ) a signal output terminal (14), and a signal processing unit (16), wherein: The signal processing unit (16) is configured to perform the method according to one of claims 1 to 11.
13. The de-jitter module according to claim 12, characterized in that: The debouncing module is a controller.
Citation Information
Patent Citations
Analog-to-digital converter with a decision circuit and an optimized decision threshold
CN1808908A
Input-controlled multiple threshold debounce system
US9680458B1