The present invention relates to a method for correcting the drift of the signal from a pressure sensor. It is particularly useful for the pressure sensors that measure the pressure in a cylinder of an internal combustion engine.
The pressure prevailing in the combustion chamber of a diesel engine cylinder is measured by a pressure sensor located, for example, in a glouplug. The curve giving the pressure as a function of time during a cycle of the engine (intake, compression, combustion, exhaust) exhibits a basic signal that is ideally rectilinear and centered on zero, on which pressure spikes are periodically overlaid. This type of sensor is usually provided with a piezoelectric sensitive element.
Given the operating environment of this sensor, it is exposed to temperature and pressure variations. In particular, the temperature variations create pyroelectricity in the piezoelectric sensitive element of the sensor, which modifies the value of the pressure signal that it delivers. The appearance of the curve giving the pressure as a function of time at the output of the sensor is therefore different from the curve of the real pressure prevailing in the cylinder. More specifically:
Thus, the basic signal can be likened to a straight line, the equation of which is of the type y=A×x+B, on which signal pressure spikes are periodically overlaid. This basic signal therefore has to be processed in order to provide the engine computer with real and reliable pressure measurements, correctly recentered on zero (or on a predefined constant value) and without temporal drift.
A processing algorithm for this signal must correct the signal supplied by the sensor, that is to say that it must therefore make it possible to:
The signal can be processed either during the acquisition of the signal and directly by the sensor, or after the acquisition of the signal by an external microprocessor. The latter solution presents the advantage of performing the processing once the signal is acquired, with computation means and the necessary time available in an engine control computer. This does, however, present the disadvantage of permanently overloading the memory size of the computer.
The direct processing by the pressure sensor presents numerous constraints: it must be rapid, accurate and limited in memory size used, since it is incorporated in the sensor which does not have a powerful built-in computer provided with a large memory. It is known from the prior art that the direct processing of the signal can be done by estimation, according to the least squares method, of a linear model over a sliding window of points containing N points.
The major drawback in such a processing is the large memory size that is then needed for the calculations. Simplifications and approximations can be made to reduce it, which then causes calculation accuracy and stability problems.
Other methods for processing the signal can be envisaged, such as the use of a Kalman filter for example. This filter relies on a recursive method for error correction between a signal and its prediction attenuated by a gain. The prediction of the signal is calculated on the basis of the signal filtered and corrected at the preceding measurement instant. However, applying such a method to a pressure signal that includes spikes at regular intervals presents the following drawbacks:
The present invention proposes to determine the values of the slope A and of the constant B as well as the pressure spikes in a reliable manner without requiring a significant calculation memory size.
These aims of the invention are achieved by means of a method for correcting the drift of the signal (Sb) from a pressure sensor measuring the pressure in a cylindee of an internal combustion engine, the signal being comparable to a succession of points forming a basic signal (Sa) represented by a straight line of equation y=A×x+B, of slope A and of constant B, on which signal are overlaid pressure spikes, said correction method comprising the following steps:
Preferentially, the spike start standard deviation threshold is equivalent to the last minimum value of the filtered and maximized standard deviation, multiplied by a spike start coefficient.
In a complementary manner, the end of the spike is determined at a point according to at least one of the following two criteria:
Advantageously, the spike end standard deviation threshold is equivalent to the last maximum value of the filtered and maximized standard deviation, multiplied by a spike end coefficient.
In another embodiment, during the step II:
In a supplementary embodiment, during the step III, the straight line, determined during the step II, is subtracted from the signal obtained from the sensor.
According to the invention, the slope gain of the rapid Kalman filter is greater than the slope gain of the slow Kalman filter and the constant gain of the rapid Kalman filter is greater than the constant gain of the slow Kalman filter.
Judiciously, the slope gain of the rapid Kalman filter is less than the constant gain of the rapid Kalman filter and the slope gain of the slow Kalman filter is less than the constant gain of the slow Kalman filter.
The invention also relates to any device for correcting a signal, the signal possibly being a pressure signal, implementing the method exhibiting any one of the preceding characteristics.
Thus, the invention applies to any pressure signal sensor comprising the device for correcting a pressure signal according to the invention.
And the invention also relates to any electronic computer comprising the device for correcting a pressure signal according to the invention.
Other features and advantages of the invention will become apparent from reading the following description, given as a nonlimiting example, and from examining the appended drawings in which:
a is a schematic representation of a curve of real pressure in a cylinder of an internal combustion engine over time, during a compression,
b is a schematic representation of a curve of pressure in a cylinder of an internal combustion engine over time, during a compression, as delivered by the pressure sensor,
a is a schematic representation of the application of a Kalman filter to a signal, without correction,
b is a schematic representation of the application of a Kalman filter to a signal, with correction,
a is a schematic representation of the application of a rapid Kalman filter to a pressure signal, according to the invention,
b is a schematic representation of the application of a slow Kalman filter to a pressure signal, according to the invention,
A curve giving the variation of the real pressure Sr prevailing in the combustion chamber of a cylinder as a function of time is represented in
b represents the noisy signal Sb as measured and supplied by the pressure sensor.
More specifically:
Thus, the basic signal Sa can be likened to a straight line for which the equation is of the type y=A×x+B, on which signal pressure spikes are periodically overlaid.
The correction of the measured signal Sb is therefore necessary in order to obtain the signal which is representative of the real pressure Sr prevailing in the cylinder. For this, processing of the signal subtracts, from each point of the signal measured and supplied by the sensor Sb, the straight line y=A×x+B representing the drift of the signal, that is to say Sa, in order to retrieve the signal not affected by noise and without drift Sr.
a and 2b illustrate the application of a Kalman filter to a signal of the type y=A×x+B, in which x represents the measurement instant t, in order to determine the slope A and the constant B. By applying this equation for each measurement instant n and by assuming that the slope A remains constant and that it is the same between the points n−1 and n, the following reference module is obtained (
A(n)=A(n−1)
The constant B at point n can then be calculated from the slope and from the constant at the point n−1, by considering the time interval dt between the points n−1 and n:
B(n)=B(n−1)+A(n−1)×dt
The prediction of the signal at the point n+1 is equivalent to:
y_pred(n+1)=B(n)+A(n)×dt (1)
y_pred(n+1) therefore represents the prediction of the signal at the point n+1 as a function of the parameters B and A determined at the point n.
The purpose of the Kalman filter is to compare, at the point n, this prediction with the measured real value y_meas(n) of the noise-affected signal Sb supplied by the sensor, and then to correct the slope, A(n), and the constant at the point n, B(n), so that the value of the predicted signal approaches the value of the signal Sb measured by the sensor.
Thus, the prediction error eps at the point n is therefore equivalent to:
eps(n)=y_meas(n)−y_pred(n) (2)
If this error is non-zero, the slope A(n) and the point n is not equal to the slope A(n−1) at the point n−1, (see
This correction is done using a gain Ka which represents the attenuation of the desired correction relative to the measured error.
A(n)=A(n−1)+Ka×eps(n) (3)
Similarly, a correction, equivalent to a portion of the measured prediction error, is applied to the constant B with a gain Kb, which gives:
B(n)=B(n−1)+A(n−1)×dt+Kb×eps(n) (4)
The values of the gains Ka and Kb are between 0 and 1. In the application of the Kalman filter, the adjustment of the gains Ka and Kb makes it possible to obtain a correction of the predicted value that is more or less dynamic relative to the value measured by the sensor. Thus, the higher Ka and Kb are, that is to say the closer to 1, the more dynamic the correction is and the more it approaches the measured value. On the other hand, the lower Ka and Kb are, that is to say the closer to 0, the slower the correction is and the more it remains distant from the measured value.
The duly corrected parameters A and B are used in the prediction formula (1) for the next point applied at n+1 (
The invention proposes using this method on the pressure signal in order to reliably determine therefrom the pressure spikes, the slope A and the constant B:
Obviously, the steps I and II run simultaneously and the correction made in the step III is then immediate.
The values of the gains KaR, KbR, KaL and KbL are between 0 and 1 and preferably the slope gains are less than the respective constant gains.
By applying the equations (1), (2), (3), (4) for each of the filters, the following equations are therefore obtained, for the fast filter:
epsR(n)=y(n)−y_predR(n)
A
R(n)=AR(n−1)+KaR×epsR(n)
B
R(n)=BR(n−1)+AR(n−1)×dt+KbR×epsR(n)
y_predR(n+1)=BR(n)+AR(n)×dt
and for the slow filter:
epsL(n)=y(n)−y— predR(n)
A
L(n)=AL(n−1)+KaL×epsL(n)
B
L(n)=BL(n−1)+AL(n−1)×dt+KbL×epsL(n)
y_predL(n+1)=BL(n)+AL(n)×dt
It should be noted that the parameters A(n), B(n), eps(n) and y_pred(n) are specific to each of the filters, since the latter do not provide the same level of correction. As illustrated in
According to the invention, and as illustrated in the graphs annotated 4a and 4b of
A pressure spike of the noise-affected signal Sb is represented by a pressure rise, a stabilization, then a fall. Consequently, for a pressure spike, the prediction error epsR is a signal comprising two spikes, one positive representing the rise of the pressure spike, and a negative spike representing the fall (see
However, the presence of a background noise in, before or after the pressure spike also generates as spike (positive or negative) of the prediction error epsR signal. Consequently, this signal is a succession of positive and negative spikes. Determining the duration of the pressure spike as a whole via this prediction error signal is therefore impossible.
During the step I, the invention proposes the following additional steps in order to nevertheless detect the pressure spike as a whole:
eps_sigma_filt(n)=(1−Kys)×eps_sigma_filt(n−1)+Kys×epsR(n)2 (5)
Then, in order to ensure that the start of a spike is detected rapidly, this filter is applied only once the spike has passed, which amounts to producing a signal consisting:
To produce this signal, the maximum of these two values over the duration of the spike is taken.
There is therefore obtained a maximized filtered signal eps_sigma equivalent to:
eps_sigma(n)=MAX└eps_sigma_filt(n), epsR(n)2┘ (6)
The maximized filtered standard deviation eps_sigma is, over the duration of the pressure spike, a positive signal that does not return through zero (
Thus, to detect the start of a pressure spike, at least one of the following two conditions is applied:
The spike start standard deviation threshold eps_sigma_S1 is chosen such that it has for its value the last minimum value of eps_sigma, that is to say, the value of eps_sigma at the start of the pressure spike eps_sigma_min (see
That is to say: eps_sigma_S1=eps_sigma_min×delta2_up
with eps_sigma_min(n)=MIN[eps_sigma(n), eps_sigma_min(n−1)]
Similarly, for the detection of the end of a spike, at least one of the following two conditions is applied:
The spike end standard deviation threshold eps_sigma_S2 is chosen such that it has for its value the last maximum value of eps_sigma, that is to say, the value of eps_sigma at the top of the pressure spike eps_sigma_max (see
That is to say eps_sigma_S2=eps_sigma_max×delta2_down with eps_sigma_max(n)=MAX[eps_sigma(n); eps_sigma_max(n−1)]
For any point n, it is therefore possible to determine whether or not it belongs to a pressure spike.
Generally, the spike start coefficient value delta2_up is between 0 and 10, the value of the spike end coefficient delta2_down is between 0 and 1, and the values of the spike start threshold delta1_up and spike end threshold delta1_down are between 0 and 5 volts.
Consequently, for each point n, if a spike is detected at this point, then the value of this point y_predR(n) cannot be selected for the estimation of the slope A and of the constant B, but, on the other hand, if a spike is not detected at this point, then the value of this point can be selected for the correct estimation of the slope A and of the constant B.
During the step II, the determination of the slope A and of the constant B according to the invention is performed via the slow Kalman filter. In practice:
epsL(n)=y(n)−y_predL(n)
A
L(n)=AL(n−1)+KaL×epsL(n)
B
L(n)=BL(n−1)+AL(n−1)×dt+KbL×epsL(n)
y_predL(n+1)=BL(n)+AL(n)×dt
Kalman filter, the value of this point y_predR(n) is replaced by the value of the point predicted by the slow Kalman filter y_predL(n). The pressure spike is thus replaced by a signal of constant slope, that is to say by a straight line. This prediction is necessary in order for the determination of the slope AL and of the constant BL not to be distorted by the presence of the pressure spike.
In order to improve the accuracy of the values of the slope AL and of the constant BL, this step II may have variants. In practice, when the start of a spike is detected, the value of y_predR(n) can be replaced by the value predicted by the slow Kalman filter at the point n−2, that is to say y_predL(n−2). This is in order for the small start-of-spike increase not to overestimate the value of AL and of BL.
Similarly, in order to avoid underestimating the values of AL and BL at the end of the spike, the value of y_predR(n) is replaced by the value predicted by the slow
Kalman filter at the point n−1, that is to say y_predL(n−1).
During the last step III, the duly determined straight line y_predL(n+1)=AL(n)×t+BL(n), representing the basic signal Sa, is subtracted from the signal provided by the sensor in order to reconstruct the true curve of pressure prevailing in the combustion chamber, that is to say comprising a rectilinear basic signal recentered on zero.
The various steps in processing the signal according to the invention are illustrated in
a represents the signal measured by the sensor, comprising two pressure spikes and a drift of the basic signal of the type: y=A×t+B.
b and 5c illustrate the processing of the signal during the step I:
The step II is illustrated in
e represents the detection region D of the two spikes, and also the basic signal y_predL duly determined by the performance of the step III.
The invention therefore makes it possible to determine the slope A, the constant B and the pressure spikes reliably, without requiring significant memory size since the method is recursive of order 1 and predictive, from a point n to a point n+1, and does not require management and storage over a long window of a number of points to apply the conventional least squares formulae. This method can, consequently, be incorporated in a cylinder pressure sensor or in an engine computer.
Obviously, the invention is not limited to the embodiment described and represented, which has been given solely as an example and may, for example, be applied to any measurement signal which includes spikes.
Sa: Basic signal
Sb: Signal supplied by the sensor
Sr: Real signal
Number | Date | Country | Kind |
---|---|---|---|
0806463 | Nov 2008 | FR | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP09/07825 | 11/2/2009 | WO | 00 | 7/15/2011 |