METHOD FOR DEBOUNCING AN ELECTRICAL INPUT SIGNAL, AND DEBOUNCING MODULE

20200328735 ยท 2020-10-15

Assignee

Inventors

Cpc classification

International classification

Abstract

A method for debouncing an electrical input signal (x.sub.in) includes following steps: (1) an input signal (x.sub.in) is received and a present value of the input signal (x.sub.in) is ascertained; (2) ascertaining whether the present value of the input signal (x.sub.in) is above or below at least one predefined limit value (x.sub.G); (3) producing a debounce status variable (x.sub.E) having a defined initial value; (4) altering the value of the debounce status variable (x.sub.E) on the basis of at least whether the value of the input signal (x.sub.in) is above or below the at least one limit value (x.sub.G), (5) generating an output signal (x.sub.out) on the basis of whether the value of the debounce status variable (x.sub.E) corresponds to the minimum value (W.sub.min), to the maximum value (W.sub.max) or to a value between the minimum value (W.sub.min) and the maximum value (W.sub.max).

Claims

1. A method for debouncing an electrical input signal (x.sub.in), having the following steps: receiving the input signal (x.sub.in), ascertaining a present value of the input signal (x.sub.in), ascertaining whether the present value of the input signal (x.sub.in) is above or below at least one predefined limit value (x.sub.G); producing a debounce status variable (x.sub.E) having a defined initial value; altering the value of the debounce status variable (x.sub.E) on the basis of at least whether the value of the input signal (x.sub.in) is above or below the at least one limit value (x.sub.G), wherein the value of the debounce status variable (x.sub.E) is alterable between a minimum value (W.sub.min) and a maximum value (W.sub.max), and generating an output signal (x.sub.out) on the basis of whether the value of the debounce status variable (x.sub.E) corresponds to the minimum value (W.sub.min), to the maximum value (W.sub.max) or to a value between the minimum value (W.sub.min) and the maximum value (W.sub.max).

2. The method according to claim 1, wherein the output signal (x.sub.out) is a binary signal.

3. The method according to claim 1, wherein the value of the output signal (x.sub.out) is altered if the value of the debounce status variable (x.sub.E) reaches the minimum value (W.sub.min) or the maximum value (W.sub.max).

4. The method according to claim 2, wherein the present value of the output signal (x.sub.out) is maintained for as long as the value of the debounce status variable (x.sub.E) is between the minimum value (W.sub.min) and the maximum value (W.sub.max).

5. The method according claim 3, wherein the value of the debounce status variable (x.sub.E) is raised with a predefined first gradient if the ascertained present value of the input signal (x.sub.in) is above the at least one limit value (x.sub.G; x.sub.G1), and/or the value of the debounce status variable (x.sub.E) is lowered with a predefined second gradient if the ascertained present value of the input signal (x.sub.in) is below the at least one limit value (x.sub.G; x.sub.G2).

6. The method according to claim 5, wherein the first gradient and/or the second gradient are or is ascertained on the basis of how far the present value of the input signal (x.sub.in) is above or below the at least one limit value (x.sub.G; x.sub.G1, x.sub.G2).

7. The method according to claim 6, wherein the magnitude of the value of the first gradient and/or of the second gradient is greater the further away the present value of the input signal (x.sub.in) is from the at least one limit value x.sub.G; x.sub.G1, x.sub.G2).

8. The method according to claim 6, wherein the first gradient and/or the second gradient is ascertained on the basis of a characteristic curve, wherein the characteristic curve assigns a gradient to the value of the input signal (x.sub.in).

9. The method according to claim 7, wherein there is provision for at least one primary and one secondary first gradient and also at least one predetermined positive limit value (x.sub.P) above the at least one limit value (x.sub.G; x.sub.G1), wherein the value of the debounce status variable (x.sub.E) is raised with the primary first gradient if the ascertained present value of the input signal (x.sub.in) is below the at least one positive limit value (x.sub.P) but above the at least one limit value (x.sub.G; x.sub.G1) and wherein the value of the debounce status variable (x.sub.E) is raised with the secondary first gradient if the ascertained present value of the input signal is above the at least one positive limit value (x.sub.P); and/or in that there is provision for at least one primary and one secondary second gradient and also at least one predetermined negative limit value (x.sub.N) below the at least one limit value (x.sub.G; x.sub.G2), wherein the value of the debounce status variable (x.sub.E) is lowered with the primary second gradient if the ascertained present value of the input signal (x.sub.in) is above the at least one negative limit value (x.sub.N) but below the at least one limit value (x.sub.G; x.sub.G2) and wherein the value of the debounce status variable (x.sub.E) is lowered with the secondary second gradient if the ascertained present value of the input signal (x.sub.in) is below the at least one negative limit value (x.sub.N).

10. The method according to claim 8, wherein there is provision for a first predefined limit value (x.sub.G1) and a second predefined limit value (x.sub.G2), wherein the value of the debounce status variable (x.sub.E) is maintained for as long as the present value of the input signal is between the two limit values (x.sub.G1, x.sub.G2).

11. The method according to claim 10, wherein the value of the debounce status variable (x.sub.E) is raised with the first gradient if the ascertained present value of the input signal (x.sub.in) is above the greater of the two limit values (x.sub.G1, x.sub.G2) and/or the value of the debounce status variable (x.sub.E) is lowered with the second gradient if the ascertained present value of the input signal (x.sub.E) is below the smaller of the two limit values (x.sub.G1, x.sub.G2).

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Further advantages and properties of the invention are obtained from the description below and the accompanying drawings, to which reference is made and in which:

[0037] FIG. 1 schematically shows a block diagram of a debouncing module according to the invention;

[0038] FIG. 2 shows a graph of an electrical input signal plotted against time;

[0039] FIG. 3 shows (a) an enlarged detail from the electrical input signal of FIG. 2 and (b) a graph of a resulting output signal in the absence of debouncing for the input signal;

[0040] FIG. 4 schematically shows a flowchart for a method according to the invention for debouncing the electrical input signal;

[0041] FIG. 5 shows a graph of an output signal, debounced in accordance with the method according to the invention from FIG. 4; plotted again time; and

[0042] FIG. 6 shows a graph of the input signal plotted against time to illustrate further aspects of the method according to the invention.

DETAILED DESCRIPTION

[0043] FIG. 1 shows a debouncing module 10 that has a signal input 12 for receiving an electrical input signal x.sub.in(t), a signal output 14 for outputting an electrical output signal x.sub.out(t) and a signal processing unit 16.

[0044] The signal processing unit 16 is arranged in a manner connected downstream of the signal input 12 and is connected to the signal input 12 in signal-transmitting fashion. Further, the signal processing unit 16 is arranged in a manner connected upstream of the signal output 14 and is connected to the signal output 14 in signal-transmitting fashion.

[0045] Expressed in a general way, the signal processing unit 16 is designed to receive the electrical input signal x.sub.in via the signal input 12, to process the input signal x.sub.inand to generate the output signal x.sub.out on the basis of the input signal x.sub.in.

[0046] FIG. 2 shows an exemplary depiction of the input signal x.sub.in(t) in a manner plotted against time t. The input signal x.sub.in is a superimposition comprising an interference-free signal x.sub.in,id and interference, so that the value of the input signal x.sub.in at least intermittently differs from the value of the interference-free signal x.sub.in,id. This interference may be random, that is to say can have a Gaussian distribution. However, the interference can also have deterministic components.

[0047] In particular, the electrical input signal x.sub.in(t) is a measurement signal from a sensor or is an already further-processed measurement signal from a sensor. By way of example, the electrical input signal x.sub.in(t) is the signal from a torque sensor, from an angle position sensor, from a temperature sensor, from a voltage sensor, from a current sensors and/or from a force sensor.

[0048] The applicable sensor from which the input signal x.sub.in originates may be part of a steering system for a motor vehicle.

[0049] Accordingly, the debouncing module 10 may be part of a controller of a motor vehicle or of an applicable subsystem of a motor vehicle.

[0050] Further, the input signal x.sub.in is an analog signal or a digital signal, in particular a binary signal.

[0051] For many different applications, the signal processing unit 16 needs to ascertain whether a value of the interference-free signal x.sub.in,id is above or below a predefined limit value x.sub.G. It should be pointed out that the input signal x.sub.in in FIG. 2 is indicated in units of the limit value x.sub.G, which is why the value of the limit value x.sub.G is one.

[0052] The output signal x.sub.out is then a binary signal that is produced by the signal processing unit 16 with one or two possible different values, specifically depending on whether the value of the interference-free input signal x.sub.in,id is above or below the limit value x.sub.G. The two different possible values of the output signal x.sub.out are denoted by E and below.

[0053] If the input signal x.sub.in, as shown in FIG. 2, has high-frequency noise of non-negligible amplitude, it is difficult to determine whether the value of the interference-free signal x.sub.in,id is above or below the limit value x.sub.G.

[0054] This is illustrated once again in more detail in FIGS. 3(a) and (b). FIG. 3(a) shows an enlargement of the range surrounded by dots from FIG. 2 and FIG. 3(b) shows the applicable resulting value of the output signal x.sub.out.

[0055] For the interference-free input signal x.sub.in,id, an interference-free output signal x.sub.out,id is obtained that has a single, step-shaped transition from to E.

[0056] For the actual input signal x.sub.in, on the other hand, a greatly fluctuating output signal x.sub.out,r would be obtained without further processing of the input signal x.sub.in on account of the noise component.

[0057] To produce a stable output signal, the input signal x.sub.in is thus processed by the debouncing module 10, to be more precise by the signal processing unit 16.

[0058] Expressed in a general way, the debouncing module 10 is designed to debounce the input signal x.sub.in and to take the input signal x.sub.in as a basis for producing the output signal x.sub.out. The output signal x.sub.out is thus a binary signal having values E and that corresponds to the debounced input signal x.sub.in.

[0059] To be more precise, the debouncing module 10 is designed to perform the method for debouncing the electrical input signal x.sub.in, that is described below with reference to FIGS. 4 to 6.

[0060] First, the electrical input signal x.sub.in is received via the signal input 12 and forwarded to the signal processing unit 16 (step S1).

[0061] A present value of the input signal x.sub.in is then ascertained (step S2). At this juncture and below, the present value should be understood to mean a measurable signal parameter, for example a present amplitude or a present power of the input signal x.sub.in.

[0062] In step S2, the present value of the input signal x.sub.in is additionally compared with the limit value x.sub.G. This involves ascertaining whether the present value of the input signal x.sub.in is above or below the limit value x.sub.G.

[0063] Additionally, a debounce status variable x.sub.E is produced having a predefined initial value (step S3). The predefined initial value is in a predefined range bounded by a minimum value W.sub.min and a maximum value W.sub.max. In particular, W.sub.min is equal to zero and W.sub.max is equal to 1. Naturally, any other isolated range can also be used, however.

[0064] The initial value of the debounce status variable x.sub.E is determined on the basis of the present value of the input signal x.sub.in. To be more precise, the initial value is set equal to W.sub.min if the present value of the input signal x.sub.in is less than the limit value x.sub.G, and is set equal to W.sub.max if the present value of the input signal x.sub.in is greater than the limit value x.sub.G.

[0065] Alternatively, the initial value of the debounce status variable x.sub.E may also be prescribed, however, for example as zero or as one.

[0066] On the basis of the present value of the input signal x.sub.in, the value of the debounce status variable x.sub.E is altered (step S4). To be more precise, the value of the debounce status variable x.sub.E is raised with a predefined first gradient if the ascertained present value of the input signal x.sub.in is above the limit value x.sub.G. Analogously, the value of the debounce status variable x.sub.E is lowered with a second predefined gradient if the ascertained present value of the input signal x.sub.in is below the limit value x.sub.G.

[0067] The debounce status variable x.sub.E is always in the predefined range. It thus cannot become less than the minimum value W.sub.min or become greater than the maximum value W.sub.max.

[0068] At this juncture and below, predefined gradient means that the first gradient and/or the second gradient are already stipulated, that is to say constant, or are ascertained by the signal processing unit 16 on the basis of stipulated criteria.

[0069] In FIG. 5, the resulting debounce status variable x.sub.E(t) is plotted against time. The magnitude of the value of the first gradient and the magnitude of the value of the second gradient are equal in this case and independent of how far the present value of the input signal x.sub.in is above or below the limit value x.sub.G.

[0070] Alternatively, the first gradient and the second gradient, to be more precise the magnitudes thereof, may also be different from one another.

[0071] Additionally, the first and/or the second gradient may be dependent on how far away the present value of the input signal x.sub.in is from the limit value x.sub.G. The gradient of the debounce status variable is then thus a function of the distance of the present value of the input signal x.sub.in from the limit value x.sub.G, that is to say


m=f(x.sub.in(t)x.sub.G),

[0072] where m denotes the gradient. Expressed another way, the gradient of the debounce status variable x.sub.E is thus ascertained on the basis of a characteristic curve and/or another computation code, the characteristic curve and/or the computation curve being defined by the function f(x.sub.in(t)x.sub.G).

[0073] Preferably, f is a monotonously rising function having a zero crossing at x.sub.in(t)=x.sub.G, so that the magnitude of the gradient is greater the further away the present value of the input signal x.sub.in is from the limit value x.sub.G.

[0074] The output signal x.sub.out is produced on the basis of whether the value of the debounce status variable x.sub.E is equal to the minimum value W.sub.min, is equal to the maximum value W.sub.max or corresponds to a value between the minimum value W.sub.min and the maximum value W.sub.max (step S5).

[0075] As can be seen in FIG. 5, the value of the output signal x.sub.out remains unaltered for as long as the value of the debounce status variable x.sub.E is between the minimum value W.sub.min and the maximum value W.sub.max.

[0076] When the debounce status variable x.sub.E reaches the maximum value W.sub.max, however, which is the case at the time t.sub.1 in FIG. 5, the value of the output signal x.sub.out is changed to E.

[0077] Analogously, the value of the output signal x.sub.out is set to again, only when the value of the debounce status variable x.sub.E reaches the minimum value W.sub.min again.

[0078] In comparison with FIGS. 3 and 5, it can be seen that in this manner the input signal x.sub.in is debounced efficiently with a short delay.

[0079] FIG. 6 depicts a further graph of the input signal x.sub.in in a manner plotted against time, on the basis of which two further aspects, which can each be integrated into the method described above on their own or else in combination, are described below.

[0080] Unlike in the method described above, there is provision in this case not for a single limit value but rather for a first limit value x.sub.G1 and a second limit value x.sub.G2. The limit value x.sub.G is between the first limit value x.sub.G1 and the second limit value x.sub.G2.

[0081] While the present value of the input signal x.sub.in is between the first limit value x.sub.G1 and the second limit value x.sub.G2, the value of the debounce status variable x.sub.E remains unaltered.

[0082] Expressed in another way, the gradient of the debounce status variable x.sub.E is thus set to zero for as long as the present value of the input signal x.sub.in is between the first limit value x.sub.G1 and the second limit value x.sub.G2.

[0083] The first limit value x.sub.G1 and the second limit value x.sub.G2 thus define a dead band within which the debounce status variable x.sub.E does not change.

[0084] Otherwise, the method for debouncing the input signal x.sub.in proceeds analogously to that described above, wherein above the first limit value x.sub.G1 the value of the debounce status variable x.sub.E is raised and below the second limit value x.sub.G2 the value of the debounce status variable x.sub.E is lowered.

[0085] Alternatively or additionally, there is provision for a positive limit value x.sub.P and a negative limit value x.sub.N. The positive limit value x.sub.P is greater than the limit value x.sub.G or than the first limit value x.sub.G1, and the negative limit value x.sub.N is less than the limit value x.sub.G or than the second limit value x.sub.G2.

[0086] The text below merely describes the case portrayed in FIG. 6, that is to say the case with the first limit value x.sub.G1 and the second limit value x.sub.G2. However, the explanations that follow also apply to the case of the single limit value x.sub.G, apart from the dead band, which is then absent.

[0087] The multiple limit values x.sub.P, x.sub.N, x.sub.G1 and x.sub.G2 define five bands that each correspond to a fixed, predefined gradient of the debounce status variable.

[0088] To be more precise, the debounce status variable x.sub.E is raised with a constant primary first gradient if the present value of the input signal x.sub.in is between the first limit value x.sub.G1 and the positive limit value.

[0089] If the present value of the input signal x.sub.in is greater than the positive limit value x.sub.P, the debounce status variable x.sub.E is raised with a constant secondary first gradient that is greater than the primary first gradient.

[0090] If the present value of the input signal x.sub.in is between the negative limit value x.sub.N and the second limit value x.sub.G2, the present value of the debounce status variable x.sub.E is lowered with a constant primary second gradient.

[0091] If the present value of the input signal x.sub.in is less than the negative limit value x.sub.N, the debounce status variable x.sub.E is lowered with a constant secondary second gradient, the magnitude of which is greater than the magnitude of the primary second gradient.

[0092] Expressed in another way, the limit values x.sub.P, x.sub.N, x.sub.G1 and x.sub.G2 thus define the five bands within which the gradient of the debounce status variable x.sub.E is constant in each case, the gradient changing in the event of a transition between the bands, however.

[0093] Naturally, there may also be provision for more than five bands, for example by virtue of there being provision for multiple positive limit values and/or multiple negative limit values.

[0094] Preferably, the magnitude of the gradient of the debounce status variable x.sub.E increases with the distance from the limit value x.sub.G in this case too.