A method for realizing exhaust temperature sensor fault identification and self-adaptation
Through the OSLS-SVM algorithm model, combined with data acquisition and preprocessing, rapid identification and adaptive control of sensor faults are achieved, solving the problem of time-consuming and inaccurate sensor fault diagnosis and improving the working efficiency and accuracy of the sensor.
Patent Information
- Application Number
- CN202411970574.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The existing sensor fault diagnosis method is time-consuming and inaccurate, resulting in sensor data loss and affecting the working efficiency of the sensor. In addition, the LS-SVM model cannot be learned online, which increases the learning time.
The OSLS-SVM algorithm model is adopted, combined with data acquisition, preprocessing, wavelet transform, error decision system and online learning algorithm to build an engine linear model to achieve rapid identification and adaptive control of sensor faults.
It achieves rapid response of sensors in fault diagnosis and adaptive control, improves the working efficiency and accuracy of sensors, reduces learning time, and enhances the adaptive ability of sensors.
Smart Images

Figure CN119884688B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of exhaust temperature sensor fault detection, and more particularly, to a method for realizing exhaust temperature sensor fault identification and self-adaptation. Background Art
[0002] With the advancement of science and technology, a large number of high-quality, high-precision, and high-performance sensors have been developed. However, prolonged use and harsh operating environments inevitably affect sensor accuracy and performance. Traditional methods such as fault tree analysis and manual troubleshooting by skilled workers are time-consuming. Furthermore, some workers may misjudge and discard sensor data, resulting in the failure to measure the next moment's data. These factors significantly reduce sensor efficiency.
[0003] The LS-SVM (Least Squares Support Vector Machine) model that has emerged in recent years has achieved good results in sensor fault diagnosis and adaptation, but its inability to learn online increases the learning time of the entire model. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art. The purpose of the present invention is to provide a method for realizing exhaust temperature sensor fault identification and adaptation, which can achieve rapid response of the sensor in fault diagnosis and adaptive control.
[0005] The technical solution of the present invention is: a method for realizing exhaust temperature sensor fault identification and self-adaptation, comprising the following steps:
[0006] Step 1. Data collection and preprocessing: Collect the engine's main fuel supply, intake volume, crankshaft speed, cylinder internal pressure, and exhaust temperature; clean the collected data, then use wavelet transform to reduce data noise, normalize the data, and perform statistical analysis to obtain preprocessed data;
[0007] Step 2. Build an engine linear model. Based on the input variables and state variables, build a discrete space state mathematical model of the engine, and add an error decision system. The discrete space state mathematical model is responsible for obtaining the actual exhaust temperature output value through closed-loop feedback of the input variables.
[0008] Step 3. Construct an OSLS-SVM algorithm model. Based on the LS-SVM nonlinear regression principle, an input-output regression model is constructed. The least squares method is used in the algorithm model to find the best fitting curve, so that the estimated output value is close to the actual output value. At the same time, an online learning algorithm is added to accelerate the computational efficiency of the entire OSLS-SVM algorithm model. The OSLS-SVM algorithm model is trained based on the preprocessed data obtained in step 1.
[0009] Step 4. Implement real-time data prediction by inputting the real-time collected engine fuel supply, intake air volume, crankshaft speed, cylinder internal pressure, and exhaust temperature into the trained OSLS-SVM algorithm model to obtain the predicted value of exhaust temperature.
[0010] Step 5. The error decision system judges the predicted value. When the predicted value is within the set threshold range, the predicted value is output as the final estimated output value; otherwise, the OSLS-SVM algorithm model is run intermittently until the final estimated output value is obtained and output;
[0011] Step 6. When the actual exhaust temperature output value deviates from the estimated output value, the feedback output sensor measurement value plays a decisive role in the closed-loop feedback system, and the faulty sensor is immediately isolated. The actual output value of the faulty sensor is replaced by the corresponding estimated output value for output, and fed back to the closed-loop feedback system at the same time.
[0012] As a further improvement, in step 1, data collection is as follows:
[0013] The main fuel supply volume is measured using a DSP+FGPA hardware platform. The frequency signal output by the fuel flow sensor is processed by the signal conditioning circuit and then counted by the FPGA. The FPGA uses a 30M crystal oscillator and counts the input square wave signal using the frequency counting method. The count value is stored in the built-in data storage unit, and the DSP accesses the count value through the local bus for algorithm processing.
[0014] Intake air volume calculation,
[0015]
[0016] Among them, Q 进 Indicates the engine intake volume, Q 排 represents the engine displacement, n represents the engine speed per minute;
[0017] Crankshaft speed calculation,
[0018]
[0019] Where n represents the crankshaft speed of the engine, f represents the signal frequency output by the crankshaft speed sensor, and p represents the number of teeth on the engine flywheel ring gear;
[0020] Calculation of cylinder internal pressure, compression process,
[0021]
[0022] Where T1 is the initial temperature, P1 is the initial pressure, V1 is the initial volume, T2 is the temperature after compression, P2 is the pressure after compression, V2 is the volume after compression, and γ is the adiabatic index of air, γ = 1.4;
[0023] combustion process,
[0024] T3=T2+ΔT(4)
[0025] Where ΔT is the temperature increase from combustion;
[0026] Expansion process,
[0027]
[0028] Exhaust process,
[0029]
[0030] Among them, T3 is the temperature after combustion, P3 is the pressure after combustion, V3 is the volume after combustion, T4 is the temperature after expansion, P4 is the pressure after expansion, and V4 is the volume after expansion.
[0031] Furthermore, in step 1, the data is preprocessed as follows:
[0032] Data cleaning: Check for missing values and outliers in the dataset. Missing values can be filled through interpolation, and outliers can be deleted or replaced with nearby valid values.
[0033] Data denoising includes the following steps:
[0034] Step 11. Decompose the data, select the appropriate wavelet basis function ψ(t), determine the number of wavelet decomposition layers k, and calculate the wavelet coefficients for each layer j:
[0035]
[0036] Where a is the scale parameter, b is the translation parameter, and f(t) is the original signal. At each layer of wavelet transform, a set of approximate coefficients and a set of detail coefficients are generated. Starting from the approximate coefficients and detail coefficients of the previous layer, the decomposition of the next layer takes the approximate coefficients and detail coefficients of the previous layer as input and continues the wavelet transform until the preset decomposition layer number k is reached.
[0037] Step 12. Threshold quantization: For each layer of wavelet coefficients, apply a threshold to suppress noise, using a global threshold Where N is the number of samples, and then a global threshold λ is applied to each wavelet coefficient to perform soft thresholding and hard thresholding;
[0038] Soft thresholding,
[0039] c soft =sign(x)×max(|x|-λ,0)(8)
[0040] Hard thresholding,
[0041]
[0042] The soft and hard thresholding processes retain most of the information in the data and also preserve the sharp features of the signal;
[0043] Step 13: Wavelet reconstruction, using the processed wavelet coefficients to perform wavelet reconstruction to obtain a denoised signal;
[0044]
[0045] Recombining the processed wavelet coefficients can remove most of the noise.
[0046] Furthermore, the engine linear model is constructed as follows:
[0047] For a four-stroke engine, a small perturbation discretization linear model is used at the steady-state point, where the state variable x = [Q 油 ,Q 进 ,n 曲 ,P] T , input variable u=[Q 油 ,Q 进 ] T , the output variable is temperature T, Δx=x-x0, Δu=u-u0, Δy=y-y0, then the discrete spatial state mathematical model of the engine is:
[0048]
[0049] Among them, H is the input matrix, G is the system matrix, and C is the output matrix;
[0050] The error decision system can adopt the following discrete incremental PID control rate:
[0051]
[0052] Where e(k) is the error, u1(k)=[Q 油 ,Q 进] is the control input at the current moment, u(k-1) is the control input at the previous moment, r(k)=[n 曲 ,P] is the reference input variable, K p is the proportional gain, K i is the integral gain, K d is the differential gain, e(k-1) and e(k-2) are the errors at the previous moment and the previous two moments respectively.
[0053] Furthermore, constructing the OSLS-SVM algorithm model includes the following steps:
[0054] Step 21. Construct the objective function and constraint function of OSLS-SVM for the given sample training set Among them, x j is the input data, y j is the output data; the LS-SVM nonlinear regression approximation function is:
[0055]
[0056] Among them, K(x j ,x i ) is the kernel function, K(x j ,x i ) is the input vector x j A nonlinear function that maps to a high-dimensional feature space,
[0057] For OSLS-SVM, let the original soft margin distance be w (0) , the nonlinear regression approximation function is:
[0058]
[0059] The objective function and constraint functions of the nonlinear regression problem are as follows:
[0060]
[0061] formula is a vector x i The nonlinear kernel function K(x j ,x i ); is the weight vector that determines this feature space; b (0) is the deviation value; J is an objective function for solving this nonlinear regression approximation function; γ is the regularization parameter;
[0062] When a new data block arrives, The objective function and constraint functions are as follows:
[0063]
[0064] in, is a spatial weight vector after adding a new data block, b (1) It is a deviation value after adding the data block;
[0065] Step 22. Construct the OSLS-SVM least squares recursive function, solve the optimal value problem according to Lagrangian, and add equation (16) to λ i Lagrange multipliers, built under the constraints of the constraint function, solve the problem of finding the optimal value of the objective function:
[0066]
[0067] For w in formula J, (1) 、b (1) 、e i and λ i Taking partial derivatives we get the following formula:
[0068]
[0069] Eliminating the variables w and e, the output equation is:
[0070]
[0071] Combining formula (19) we get a least squares algorithm similar to recursion. When it arrives, formula (19) can be written as:
[0072]
[0073] Among them, b (k+1) is the deviation value corresponding to the addition of data, b (k) is the deviation value of the previous data; yk +1 is the output value after adding data, y k is the output value of the last data;
[0074] Step 23. Parameter initialization: Initialize the regularization parameter γ and the kernel function parameter σ. The initialization process uses the cross-validation method.
[0075] Step 24. Parameter iteration: The subsequent process only requires iterating the parameter σ. The regularization parameter γ has been determined in the initial learning process of the dataset D0.
[0076] Furthermore, step 23 includes the following steps:
[0077] Step 231. Initialize the value range, γ∈[10,10000], σ∈[0.01,10];
[0078] Step 232: Construct a sequence within the value range of parameters σ and γ respectively to obtain a two-dimensional grid space of parameter vectors [γ, σ] and a parameter vector group;
[0079] Step 233. Input each parameter vector [γ,σ] into the OSLS-SVM model, use the first data set D0 for learning and output the learning error, and take the parameter vector [γ,σ] corresponding to the minimum error min is the optimal parameter pair;
[0080] Step 234. If the learning accuracy does not meet the required requirements, [γ,σ] min Build a new grid space as the center and select parameter values with similar values for learning. Specifically, [γ,σ] min The grid width is expanded by 0.01-5 times, the original grid data is replaced with the expanded data, and the parameters are continuously optimized until the maximum number of iterations is reached.
[0081] Furthermore, step 24 includes the following steps:
[0082] Step 241. Using the current σ k For the new data block D k+1 Make a prediction and calculate the error:
[0083]
[0084] Among them, E k+1 is the error of the k+1th data, is the actual data of k+1, y i is the estimated data for the k+1th time;
[0085] Step 242. Update parameter σ k , adjust σ according to the error of the new data block k If the error is high, you need to increase σ k To smooth the decision boundary, if the error is low, it is necessary to reduce σ as much as possible. k , the formula is as follows:
[0086]
[0087] Where β is a tuning parameter used to control σ k The update step size is usually between [0,1], E k is the error of the previous iteration;
[0088] Step 243: Threshold setting, set the value range of σ parameter to [σ min ,σ max ], where σ min and σ max are the lower and upper bounds of the parameter σ respectively, through the following discriminant formula;
[0089]
[0090] Make boundary judgment for each updated individual position.
[0091] Furthermore, there will be a certain deviation between the predicted value and the actual output value of the sensor. The deviation formula is:
[0092] e(t)=y(t)-y out (t)(24)
[0093] Among them, y(t) is the actual output value of the sensor, y out (t) is the predicted value;
[0094] The sensor's deviation error range is established offline, and then the deviation obtained for each data point is judged through online learning. If the residual is within the threshold range, it means that there is no sensor fault; otherwise, it means that the sensor is faulty. The threshold range is determined by the standard deviation of the deviation sequence obtained when the detection system is normal. Taking n times the standard deviation, the threshold range for fault judgment is: [μ-nσ,μ+nσ].
[0095] Furthermore, step 243 and the parameters of equation (23) are applied to equation (20) to obtain k+1 outputs. This k+1 output is then compared with the actual output value of the sensor. If the obtained deviation is not within the fault judgment threshold, it means that the sensor has failed. The output signal of this sensor needs to be disconnected, and the actual output value of the faulty sensor is replaced by the predicted value of the improved OSLS-SVM model.
[0096] Beneficial effects
[0097] Compared with the prior art, the present invention has the following advantages:
[0098] 1. The present invention adopts the support vector machine algorithm optimized by the online least squares method to efficiently process the single data or matrix data received in real time, thereby achieving rapid response of the sensor in fault diagnosis and adaptive control.
[0099] 2. The algorithm of the present invention does not require the traditional offline parameter learning and updating process for parameter selection, and can demonstrate excellent nonlinear regression performance on large-scale data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] Figure 1 is a flow chart of the present invention;
[0101] Figure 2 This is the structure diagram of the closed-loop simulation system for sensor fault diagnosis and adaptive reconstruction control of four-stroke engines;
[0102] Figure 3 Figure 2 is the OSLS-SVM workflow diagram. DETAILED DESCRIPTION
[0103] The present invention will be further described below with reference to the specific embodiments in the accompanying drawings.
[0104] See Figures 1 to 3 A method for realizing exhaust temperature sensor fault identification and adaptation includes the following steps 1 to 6:
[0105] Step 1. Data Collection and Preprocessing. The engine's main fuel supply, intake air volume, crankshaft speed, cylinder internal pressure, and exhaust temperature are collected. Specifically, the main fuel supply can be collected using a fuel flow sensor, cylinder internal pressure can be collected using an in-cylinder pressure sensor, intake air volume can be collected using an air flow sensor, crankshaft speed can be collected using a crankshaft speed sensor, and exhaust temperature can be collected using an exhaust temperature sensor. The collected data is cleaned, then noise is reduced using a wavelet transform. The data is then normalized and statistically analyzed to obtain preprocessed data.
[0106] Step 2. Build the engine linear model. Based on the input variables and state variables, a discrete spatial state mathematical model of the engine is constructed, and an error decision system is incorporated. The discrete spatial state mathematical model is responsible for converting the input variables into the actual exhaust temperature output value through closed-loop feedback.
[0107] Step 3. Build the OSLS-SVM algorithm model. Based on the principles of LS-SVM nonlinear regression, construct an input-output regression model. Least squares methods are used to find the optimal fitting curve, ensuring that the estimated output value approximates the actual output value. Simultaneously, an online learning algorithm is incorporated to accelerate the computational efficiency of the OSLS-SVM algorithm model. The OSLS-SVM algorithm model is trained using the preprocessed data obtained in Step 1.
[0108] Step 4. Realize the prediction of real-time data. Input the real-time collected engine main fuel supply, intake volume, crankshaft speed, cylinder internal pressure and exhaust temperature into the trained OSLS-SVM algorithm model to obtain the predicted value of exhaust temperature.
[0109] Step 5. The error decision system judges the predicted value. When the predicted value is within the set threshold range, the predicted value is output as the final estimated output value; otherwise, the OSLS-SVM algorithm model is run intermittently until the final estimated output value is obtained for output.
[0110] The estimated output value is a regression model established through the OSLS-SVM algorithm, and then the set input variable data is input. Through this model, an output data associated with the input data is obtained. The estimated output value meets the error threshold range of the error decision system. This fitting process is a learning process of the regression model.
[0111] Step 6. When the actual exhaust temperature output value deviates from the estimated output value, that is, when the difference between the actual exhaust temperature output value and the estimated output value is greater than the set threshold, it indicates that the sensor is faulty. Utilizing the decisive role of the feedback output sensor measurement value in the closed-loop feedback system, the faulty sensor is immediately isolated, and the corresponding estimated output value is used instead of the actual output value of the faulty sensor for output, and at the same time fed back to the closed-loop feedback system.
[0112] Otherwise, the actual output value is output normally and fed back to the closed-loop feedback system.
[0113] Because the engine exhaust process is characterized by high temperatures, high pressures, and complex gas content, exhaust temperature sensors are highly susceptible to damage in such environments, resulting in a shift in sensor sensitivity. Using an estimated output value as the actual output allows for fault identification and adaptive diagnostic capabilities in the event of an exhaust temperature sensor failure. If a sensor failure occurs, the signal is automatically cut off, and the model output replaces the actual output, resulting in real data. This ensures the exhaust temperature sensor's fault identification and adaptive diagnostic capabilities.
[0114] In this embodiment, a four-stroke engine is taken as an example. In step 1, data collection is as follows:
[0115] (1) The main fuel supply volume is measured using a DSP+FPGA hardware platform. The frequency signal output by the fuel flow sensor is processed by the signal conditioning circuit and then counted by the FPGA. The FPGA uses a 30M crystal oscillator and counts the input square wave signal using the frequency counting method. The count value is stored in the built-in data storage unit, and the DSP accesses the count value through the local bus and performs algorithm processing.
[0116] (2) Calculation of air intake:
[0117]
[0118] Among them, Q 进 Indicates the engine intake volume, Q排 represents the engine displacement, and n represents the engine speed per minute.
[0119] (3) Calculation of crankshaft speed:
[0120]
[0121] Among them, n represents the crankshaft speed of the engine, f represents the signal frequency output by the crankshaft speed sensor, and p represents the number of teeth on the engine flywheel ring gear.
[0122] (3) Calculation of cylinder internal pressure includes four processes.
[0123] Compression process:
[0124]
[0125] Wherein, T1 is the temperature in the initial state, P1 is the pressure in the initial state, V1 is the volume in the initial state, T2 is the temperature after compression, P2 is the pressure after compression, V2 is the volume after compression, and γ is the adiabatic index of air, γ = 1.4.
[0126] Combustion process:
[0127] T3=T2+ΔT(4)
[0128] where ΔT is the temperature increase due to combustion.
[0129] Expansion process:
[0130]
[0131] Exhaust process:
[0132]
[0133] Among them, T3 is the temperature after combustion, P3 is the pressure after combustion, V3 is the volume after combustion, T4 is the temperature after expansion, P4 is the pressure after expansion, and V4 is the volume after expansion.
[0134] In step 1, the data is preprocessed as follows:
[0135] (1) Data cleaning: Check missing values and outliers in the data set. Missing values can be filled by interpolation methods, and outliers can be deleted or replaced with adjacent valid values.
[0136] (2) Data denoising, including the following steps 11 to 13:
[0137] Step 11. Decompose the data, select the appropriate wavelet basis function ψ(t), determine the wavelet decomposition layer k, and for each layer j (from 1 to k), calculate the wavelet coefficients:
[0138]
[0139] Among them, a is the scale parameter, b is the translation parameter, and f(t) is the original signal; at each layer of wavelet transform, a set of approximate coefficients (low-frequency part) and a set of detail coefficients (high-frequency part) will be generated. Starting from the approximate coefficients and detail coefficients of the previous layer, the decomposition of the next layer will take the approximate coefficients and detail coefficients of the previous layer as input and continue the wavelet transform until the preset decomposition layer number k is reached.
[0140] Step 12. Threshold quantization: For each layer of wavelet coefficients, a threshold is applied to suppress noise. Here, a global threshold is used. Where N is the number of samples. Then a global threshold λ is applied to each wavelet coefficient to perform soft thresholding and hard thresholding.
[0141] Soft thresholding:
[0142] c soft =sign(x)×max(|x|-λ,0)(8)
[0143] Hard thresholding:
[0144]
[0145] The soft and hard thresholding processes retain most of the information in the data and also preserve the sharp features of the signal.
[0146] Step 13. Wavelet reconstruction: Use the processed wavelet coefficients to perform wavelet reconstruction to obtain the denoised signal:
[0147]
[0148] Recombining the processed wavelet coefficients can remove most of the noise.
[0149] The engine linear model is constructed as follows:
[0150] For a four-stroke engine, a small perturbation discretization linear model is used at the steady-state point, where the state variable x = [Q 油 ,Q 进 ,n 曲 ,P] T , input variable u=[Q 油 ,Q 进 ] T , the output variable is temperature T, Δx=x-x0, Δu=u-u0, Δy=y-y0. Then the discrete spatial state mathematical model of the engine is:
[0151]
[0152] Where H is the input matrix, G is the system matrix, and C is the output matrix.
[0153] The error decision system can adopt the following discrete incremental PID control rate:
[0154]
[0155] Where e(k) is the error, u1(k)=[Q 油 ,Q 进 ] is the control input at the current moment, u(k-1) is the control input at the previous moment, r(k)=[n 曲 ,P] is the reference input variable, K p is the proportional gain, K i is the integral gain, K d is the differential gain, e(k-1) and e(k-2) are the errors at the previous moment and the previous two moments respectively.
[0156] The LS-SVM algorithm reduces the quadratic programming problem of the SVM support vector machine based on the least squares method, reducing the calculation speed of the traditional SVM algorithm. However, due to its lack of online learning function, it can only mix the new data with the original data and train them uniformly. Therefore, in order to address this defect of the traditional SVM algorithm, a recursive algorithm similar to the least squares method is used to derive the iterative model of OSLS-SVM, and L2 regularization is used to prevent the model from overfitting. The main process is as follows Figure 3 shown.
[0157] Specifically, building the OSLS-SVM algorithm model includes the following steps 21 to 24:
[0158] Step 21. Construct the objective function and constraint function of OSLS-SVM for the given sample training set Among them, x j is the input data, y j is the output data; the LS-SVM nonlinear regression approximation function is:
[0159]
[0160] Among them, K(x j ,x i ) is the kernel function, K(x j ,x i ) is the input vector x j A nonlinear function that maps to a high-dimensional feature space,
[0161] For OSLS-SVM, let the original soft margin distance be w (0), the nonlinear regression approximation function is:
[0162]
[0163] The objective function and constraint functions of the nonlinear regression problem are as follows:
[0164]
[0165] formula is a vector x i The nonlinear kernel function K(x j ,x i ); is the weight vector that determines this feature space; b (0) is the deviation value; J is an objective function for solving this nonlinear regression approximation function; γ is the regularization parameter.
[0166] When a new data block arrives, The objective function and constraint functions are as follows:
[0167]
[0168] in, is a spatial weight vector after adding a new data block, b (1) It is a deviation value after adding the data block.
[0169] Step 22. Construct the OSLS-SVM least squares recursive function, solve the optimal value problem according to Lagrangian, and add equation (16) to λ i Lagrange multipliers, built under the constraints of the constraint function, solve the problem of finding the optimal value of the objective function:
[0170]
[0171] For w in formula J, (1) 、b (1) 、e i and λ i Taking partial derivatives we get the following formula:
[0172]
[0173] Eliminating the variables w and e, the output equation is:
[0174]
[0175] Combining formula (19) we get a least squares algorithm similar to recursion. When it arrives, formula (19) can be written as:
[0176]
[0177] Among them, b (k+1) is the deviation value corresponding to the addition of data, b (k) is the deviation value of the previous data; yk +1 is the output value after adding data, y k The output value of the previous data.
[0178] Step 23. Parameter initialization: Initialize the regularization parameter γ and the kernel function parameter σ. The initialization process uses the cross-validation method.
[0179] Step 23 includes the following steps 231 to 234:
[0180] Step 231. Initialize the value range, γ∈[10,10000], σ∈[0.01,10].
[0181] Step 232. Construct a sequence within the value range of parameters σ and γ respectively to obtain a two-dimensional grid space of parameter vectors [γ, σ] and a parameter vector group.
[0182] Step 233. Input each parameter vector [γ,σ] into the OSLS-SVM model, use the first data set D0 for learning and output the learning error, and take the parameter vector [γ,σ] corresponding to the minimum error min is the optimal parameter pair.
[0183] Step 234. If the learning accuracy does not meet the required requirements, [γ,σ] min Build a new grid space as the center and select parameter values with similar values for learning. Specifically, [γ,σ] min The grid width is expanded by 0.01-5 times, the original grid data is replaced with the expanded data, and so on, and the parameters are continuously optimized until the maximum number of iterations is reached.
[0184] Step 24. Parameter iteration: The subsequent process only requires iterating the parameter σ. The regularization parameter γ has been determined in the initial learning process of the dataset D0.
[0185] Step 24 includes the following steps 241 to 243:
[0186] Step 241. Using the current σ k For the new data block D k+1 Make a prediction and calculate the error:
[0187]
[0188] Among them, Ek+1 is the error of the k+1th data, is the actual data of k+1, y i is the estimated data for the k+1th time.
[0189] Step 242. Update parameter σ k , adjust σ according to the error of the new data block k If the error is high, you need to increase σ k To smooth the decision boundary, if the error is low, it is necessary to reduce σ as much as possible. k , the formula is as follows:
[0190]
[0191] Where β is a tuning parameter used to control σ k The update step size, β is usually between [0,1], E k is the error of the previous iteration.
[0192] Step 243: Threshold setting, set the value range of σ parameter to [σ min ,σ max ], where σ min and σ max are the lower and upper bounds of the parameter σ respectively, through the following discriminant formula;
[0193]
[0194] Make boundary judgment for each updated individual position.
[0195] Perform residual system construction.
[0196] There will be a certain deviation between the predicted value and the actual output value of the sensor. The deviation formula is:
[0197] e(t)=y(t)-y out (t)(24)
[0198] Among them, y(t) is the actual output value of the sensor, y out (t) is the predicted value.
[0199] The sensor's deviation error range is established offline, and then the deviation obtained for each data point is judged through online learning. If the residual is within the threshold range, it means that there is no sensor fault; otherwise, it means that the sensor is faulty. The threshold range is determined by the standard deviation of the deviation sequence obtained when the detection system is normal. Taking n times the standard deviation, the threshold range for fault judgment is: [μ-nσ,μ+nσ].
[0200] Output the predicted value.
[0201] Apply step 243 and the parameters of equation (23) to equation (20) to obtain k+1 outputs; then use this k+1 output to compare with the actual output value of the sensor. If the obtained deviation is not within the fault judgment threshold range, it means that the sensor has failed. It is necessary to disconnect the output signal of this sensor and use the improved OSLS-SVM model prediction value instead of the actual output value of the faulty sensor for output.
[0202] The above is only a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention. These will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A method for realizing exhaust temperature sensor fault identification and self-adaptation, characterized in that: The following steps are involved: Step 1. Data collection and preprocessing: collecting the engine's main fuel supply, intake air volume, crankshaft speed, cylinder internal pressure, and exhaust temperature; The collected data is cleaned, and then wavelet transform is used to reduce data noise. The data is then normalized and statistically analyzed to obtain preprocessed data. Step 2. Build the engine linear model, build the engine's discrete space state mathematical model based on the input variables and state variables, and add the error decision system; The discrete space state mathematical model is responsible for obtaining the actual exhaust temperature output value through closed-loop feedback of the input variables; Step 3. Construct an OSLS-SVM algorithm model. Based on the LS-SVM nonlinear regression principle, an input-output regression model is constructed. The least squares method is used in the algorithm model to find the best fitting curve, so that the estimated output value is close to the actual output value. At the same time, an online learning algorithm is added to accelerate the computational efficiency of the entire OSLS-SVM algorithm model. The OSLS-SVM algorithm model is trained based on the preprocessed data obtained in step 1. Step 4. Implement real-time data prediction by inputting the real-time collected engine fuel supply, intake air volume, crankshaft speed, cylinder internal pressure, and exhaust temperature into the trained OSLS-SVM algorithm model to obtain the predicted value of exhaust temperature. Step 5. The error decision system judges the predicted value. If the predicted value is within the set threshold range, the predicted value is output as the final estimated output value. Otherwise, the OSLS-SVM algorithm model continues to run until the final estimated output value is obtained and output. Step 6. When the actual exhaust temperature output value deviates from the estimated output value, the feedback output sensor measurement value plays a decisive role in the closed-loop feedback system, and the faulty sensor is immediately isolated. The actual output value of the faulty sensor is replaced by the corresponding estimated output value for output, and fed back to the closed-loop feedback system at the same time.
2. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 1, characterized in that: In step 1, data collection is as follows: The main fuel supply volume is measured using a DSP+FGPA hardware platform. The frequency signal output by the fuel flow sensor is processed by the signal conditioning circuit and then counted by the FPGA. The FPGA uses a 30M crystal oscillator and counts the input square wave signal using the frequency counting method. The count value is stored in the built-in data storage unit, and the DSP accesses the count value through the local bus for algorithm processing. Intake air volume calculation, Among them, Q 进 Indicates the engine intake volume, Q 排 represents the engine displacement, n represents the engine speed per minute; Crankshaft speed calculation, Where n represents the crankshaft speed of the engine, f represents the signal frequency output by the crankshaft speed sensor, and p represents the number of teeth on the engine flywheel ring gear; Calculation of cylinder internal pressure, compression process, Where T1 is the initial temperature, P1 is the initial pressure, V1 is the initial volume, T2 is the temperature after compression, P2 is the pressure after compression, V2 is the volume after compression, and γ is the adiabatic index of air, γ = 1.4; combustion process, T3=T2+ΔT(4) Where ΔT is the temperature increase from combustion; Expansion process, Exhaust process, Among them, T3 is the temperature after combustion, P3 is the pressure after combustion, V3 is the volume after combustion, T4 is the temperature after expansion, P4 is the pressure after expansion, and V4 is the volume after expansion.
3. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 2, characterized in that: In step 1, the data is preprocessed as follows: Data cleaning: Check for missing values and outliers in the dataset. Missing values can be filled through interpolation, and outliers can be deleted or replaced with nearby valid values. Data denoising includes the following steps: Step 11. Decompose the data, select the appropriate wavelet basis function ψ(t), determine the number of wavelet decomposition layers k, and calculate the wavelet coefficients for each layer j: Where a is the scale parameter, b is the translation parameter, and f(t) is the original signal. At each layer of wavelet transform, a set of approximate coefficients and a set of detail coefficients are generated. Starting from the approximate coefficients and detail coefficients of the previous layer, the decomposition of the next layer takes the approximate coefficients and detail coefficients of the previous layer as input and continues the wavelet transform until the preset decomposition layer number k is reached. Step 12. Threshold quantization: For each layer of wavelet coefficients, apply a threshold to suppress noise, using a global threshold Where N is the number of samples, and then a global threshold λ is applied to each wavelet coefficient to perform soft thresholding and hard thresholding; Soft thresholding, c soft =sign(x)×max(|x|-λ,0)(8) Hard thresholding, The soft and hard thresholding processes retain most of the information in the data and also preserve the sharp features of the signal; Step 13: Wavelet reconstruction, using the processed wavelet coefficients to perform wavelet reconstruction to obtain a denoised signal; Recombining the processed wavelet coefficients can remove most of the noise.
4. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 1, characterized in that: The engine linear model is constructed as follows: For a four-stroke engine, a small perturbation discretization linear model is used at the steady-state point, where the state variable x = [Q 油 ,Q 进 ,n 曲 ,P] T , input variable u=[Q 油 ,Q 进 ] T , the output variable is temperature T, Δx=x-x0, Δu=u-u0, Δy=y-y0, then the discrete spatial state mathematical model of the engine is: Among them, H is the input matrix, G is the system matrix, and C is the output matrix; The error decision system can adopt the following discrete incremental PID control rate: Where e(k) is the error, u1(k)=[Q 油 ,Q 进 ] is the control input at the current moment, u(k-1) is the control input at the previous moment, r(k)=[n 曲 ,P] is the reference input variable, K p is the proportional gain, K i is the integral gain, K d is the differential gain, e(k-1) and e(k-2) are the errors at the previous moment and the previous two moments respectively.
5. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 1, characterized in that: Building the OSLS-SVM algorithm model includes the following steps: Step 21. Construct the objective function and constraint function of OSLS-SVM for the given sample training set Among them, x j is the input data, y j is the output data; the LS-SVM nonlinear regression approximation function is: Among them, K(x j ,x i ) is the kernel function, K(x j ,x i ) is the input vector x j A nonlinear function that maps to a high-dimensional feature space, For OSLS-SVM, let the original soft margin distance be w (0) , the nonlinear regression approximation function is: The objective function and constraint functions of the nonlinear regression problem are as follows: formula is a vector x i The nonlinear kernel function K(x j ,x i ); is the weight vector that determines this feature space; b (0) is the deviation value; J is an objective function for solving this nonlinear regression approximation function; γ is the regularization parameter; When a new data block arrives, The objective function and constraint functions are as follows: in, is a spatial weight vector after adding a new data block, b (1) It is a deviation value after adding the data block; Step 22. Construct the OSLS-SVM least squares recursive function, solve the optimal value problem according to Lagrangian, and add equation (16) to λ i Lagrange multipliers, built under the constraints of the constraint function, solve the problem of finding the optimal value of the objective function: For w in formula J, (1) 、b (1) 、e i and λ i Taking partial derivatives we get the following formula: Eliminating the variables w and e, the output equation is: Combining formula (19) we get a least squares algorithm similar to recursion. When k≥0 arrives, equation (19) can be written as: Among them, b (k+1) is the deviation value corresponding to the addition of data, b (k) is the deviation value of the previous data; yk +1 is the output value after adding data, y k is the output value of the last data; Step 23. Parameter initialization: Initialize the regularization parameter γ and the kernel function parameter σ. The initialization process uses the cross-validation method. Step 24. Parameter iteration: The subsequent process only requires iterating the parameter σ. The regularization parameter γ has been determined in the initial learning process of the dataset D0.
6. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 5, characterized in that: Step 23 includes the following steps: Step 231. Initialize the value range, γ∈[10,10000], σ∈[0.01,10]; Step 232: Construct a sequence within the value range of parameters σ and γ respectively to obtain a two-dimensional grid space of parameter vectors [γ, σ] and a parameter vector group; Step 233. Input each parameter vector [γ,σ] into the OSLS-SVM model, use the first data set D0 for learning and output the learning error, and take the parameter vector [γ,σ] corresponding to the minimum error min is the optimal parameter pair; Step 234. If the learning accuracy does not meet the required requirements, [γ,σ] min Build a new grid space as the center and select parameter values with similar values for learning. Specifically, [γ,σ] min The grid width is expanded by 0.01-5 times, the original grid data is replaced with the expanded data, and the parameters are continuously optimized until the maximum number of iterations is reached.
7. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 6, characterized in that: Step 24 includes the following steps: Step 241. Using the current σ k For the new data block D k+1 Make a prediction and calculate the error: Among them, E k+1 is the error of the k+1th data, is the actual data of k+1, y i is the estimated data for the k+1th time; Step 242. Update parameter σ k , adjust σ according to the error of the new data block k If the error is high, you need to increase σ k To smooth the decision boundary, if the error is low, it is necessary to reduce σ as much as possible. k , the formula is as follows: Where β is a tuning parameter used to control σ k The update step size is usually between [0,1], E k is the error of the previous iteration; Step 243: Threshold setting, set the value range of σ parameter to [σ min ,σ max ], where σ min and σ max are the lower and upper bounds of the parameter σ respectively, through the following discriminant formula; Make boundary judgment for each updated individual position.
8. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 7, characterized in that: There will be a certain deviation between the predicted value and the actual output value of the sensor. The deviation formula is: e(t)=y(t)-y out (t)(24) Among them, y(t) is the actual output value of the sensor, y out (t) is the predicted value; The sensor's deviation error range is established offline, and then the deviation obtained for each data point is judged through online learning. If the residual is within the threshold range, it means that there is no sensor fault; otherwise, it means that the sensor is faulty. The threshold range is determined by the standard deviation of the deviation sequence obtained when the detection system is normal. Taking n times the standard deviation, the threshold range for fault judgment is: [μ-nσ,μ+nσ].
9. The method for realizing exhaust temperature sensor fault identification and adaptation according to claim 8, characterized in that: Apply step 243 and the parameters of equation (23) to equation (20) to obtain k+1 outputs; then use this k+1 output to compare with the actual output value of the sensor. If the obtained deviation is not within the fault judgment threshold range, it means that the sensor has failed. It is necessary to disconnect the output signal of this sensor and use the improved OSLS-SVM model prediction value instead of the actual output value of the faulty sensor for output.