Method for realizing fault identification and self-adaption of exhaust temperature sensor
Through the online least squares optimization support vector machine algorithm (OSLS-SVM) and wavelet transformation, combined with the error decision system, the problem of long response time for sensor fault diagnosis and adaptive control is solved, and the effect of fast response and efficient calculation is achieved.
Patent Information
- Application Number
- CN202411970574.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The prior art has a long response time in sensor fault diagnosis and adaptive control, and lacks online learning capabilities, resulting in inefficiency.
The support vector machine algorithm (OSLS-SVM) optimized by online least squares method is adopted, combined with wavelet transformation and error decision system, real-time data prediction and fault identification are realized.
It realizes the rapid response of sensors in fault diagnosis and adaptive control, and improves the system's computing efficiency and nonlinear regression performance.
Smart Images

Figure CN119884688A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of exhaust temperature sensor fault detection, and more specifically, 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, if the sensor is used for a long time or in a harsh environment, it will inevitably have many effects on the accuracy and performance of the sensor. Traditional methods such as using fault trees to analyze sensor failures and manually eliminating them by skilled workers take a long time. At the same time, some workers directly discard sensor data due to inaccurate judgments, resulting in the failure to measure the next moment's data. These factors greatly reduce the working efficiency of the sensor.
[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: collecting the main fuel supply, air intake, crankshaft speed, cylinder internal pressure and exhaust temperature of the engine; cleaning the collected data, then using wavelet transform to reduce data noise, and then normalizing the data and performing statistical analysis on the data to obtain preprocessed data;
[0007] Step 2. Construct the engine linear model, construct the discrete space state mathematical model of the engine according to 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;
[0008] Step 3. Construct an OSLS-SVM algorithm model. According to the LS-SVM nonlinear regression principle, construct an input-output regression model. The least squares method is used in the algorithm model to find the best fitting curve, so as to achieve the result that the estimated output value is close to the actual output value; at the same time, add an online learning algorithm to speed up the calculation efficiency of the entire OSLS-SVM algorithm model; train the OSLS-SVM algorithm model based on the preprocessed data obtained in step 1;
[0009] Step 4. Realize the prediction of real-time data, input the main fuel supply, intake volume, crankshaft speed, cylinder internal pressure and exhaust temperature of the engine collected in real time 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 for 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.
[0013] As a further improvement, in step 1, data collection is as follows:
[0014] The measurement of the main fuel supply volume adopts the DSP+FGPA hardware platform. The frequency signal output by the fuel flow sensor is processed by the signal conditioning circuit and then collected by the FPGA for frequency counting. The FPGA adopts a 30M crystal oscillator and uses the frequency counting method to count the input square wave signal. The count value is stored in the built-in data storage unit. The DSP obtains the count value result through the local bus access and performs algorithm processing.
[0015] Calculation of air intake,
[0016]
[0017] Among them, Q 进 Indicates the engine intake volume, Q 排 represents the engine displacement, n represents the engine speed per minute;
[0018] Crankshaft speed calculation,
[0019]
[0020] Wherein, 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 of the engine flywheel ring gear;
[0021] Calculation of internal cylinder pressure, compression process,
[0022]
[0023] Wherein, T1 is the temperature of the initial state, P1 is the pressure of the initial state, V1 is the volume of the initial state, T2 is the temperature after compression, P2 is the pressure after compression, V2 is the volume after compression, γ is the adiabatic index of air, γ = 1.4;
[0024] Combustion process,
[0025] T3=T2+ΔT(4)
[0026] Where ΔT is the temperature increase from combustion;
[0027] Expansion process,
[0028]
[0029] Exhaust process,
[0030]
[0031] 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.
[0032] Furthermore, in step 1, the data is preprocessed as follows:
[0033] Data cleaning: Check for missing values and outliers in the data set. Missing values can be filled by interpolation methods, and outliers can be deleted or replaced with nearby valid values.
[0034] Data denoising includes the following steps:
[0035] Step 11. Decompose the data, select the appropriate wavelet basis function ψ(t), determine the wavelet decomposition layer k, and for each layer j, calculate the wavelet coefficients:
[0036]
[0037] 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 to perform wavelet transform until the preset decomposition layer number k is reached;
[0038] 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 for soft thresholding and hard thresholding;
[0039] Soft thresholding,
[0040] c soft =sign(x)×max(|x|-λ,0)(8)
[0041] Hard thresholding,
[0042]
[0043] The soft and hard thresholding processes retain most of the information in the data and also preserve the sharp features of the signal;
[0044] Step 13: wavelet reconstruction, using the processed wavelet coefficients to perform wavelet reconstruction to obtain a denoised signal;
[0045]
[0046] Recombining the processed wavelet coefficients can remove most of the noise.
[0047] Furthermore, the engine linear model is constructed as follows:
[0048] 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 space state mathematical model of the engine is:
[0049]
[0050] Among them, H is the input matrix, G is the system matrix, and C is the output matrix;
[0051] The error decision system can adopt the following discrete incremental PID control rate:
[0052]
[0053] 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.
[0054] Furthermore, constructing the OSLS-SVM algorithm model includes the following steps:
[0055] Step 21. Construct the objective function and constraint function of OSLS-SVM for a 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:
[0056]
[0057] 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,
[0058] For OSLS-SVM, let the original soft margin distance be w (0) , the nonlinear regression approximation function is:
[0059]
[0060] The objective function and constraint functions of the nonlinear regression problem are as follows:
[0061]
[0062] formula is a vector x i The nonlinear kernel function K(x) mapped to a high-dimensional feature space 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;
[0063] When a new data block arrives, The objective function and constraint functions are as follows:
[0064]
[0065] in, is a spatial weight vector after adding a new data block, b (1) It is a deviation value after adding the data block;
[0066] 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 on the constraints of the constraint function, solve the problem of finding the optimal value of the objective function:
[0067]
[0068] For w in formula J (1) , b (1) 、e i and i Taking partial derivatives, we get the following formula:
[0069]
[0070] Eliminating the variables w and e, the output equation is:
[0071]
[0072] Combining formula (19) we get a recursive least squares algorithm. When it arrives, equation (19) can be written as:
[0073]
[0074] Among them, b (k+1) is the deviation value corresponding to the data added, 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;
[0075] Step 23. Parameter initialization: initializing the regularization parameter γ and the kernel function parameter σ. The initialization process uses the cross-validation method.
[0076] Step 24. Parameter iteration. The subsequent process only needs to iterate the parameter σ. The regularization parameter γ has been determined in the initial learning process of the data set D0.
[0077] Further, step 23 includes the following steps:
[0078] Step 231. Initialize the value range, γ∈[10,10000], σ∈[0.01,10];
[0079] Step 232. Construct a sequence within the value range of the parameters σ and γ respectively to obtain a two-dimensional grid space of the parameter vector [γ,σ] and a parameter vector group;
[0080] 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;
[0081] Step 234. If the learning accuracy does not meet the required requirements, then [γ,σ] 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.
[0082] Further, step 24 includes the following steps:
[0083] Step 241. Using the current σ k For the new data block D k+1 Make a prediction and calculate the error:
[0084]
[0085] Among them, E k+1 is the error of the k+1th data, is the actual data of the k+1th node, y i is the estimated data for the k+1th time;
[0086] 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, we need to reduce σ as much as possible. k , the formula is as follows:
[0087]
[0088] 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;
[0089] 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;
[0090]
[0091] Make boundary judgment for each updated individual position.
[0092] Furthermore, there will be a certain deviation between the predicted value and the actual output value of the sensor. The deviation formula is:
[0093] e(t)=y(t)-y out (t)(24)
[0094] Among them, y(t) is the actual output value of the sensor, y out (t) is the predicted value;
[0095] The deviation error range of the sensor is established offline, and then the deviation of each data is judged through online learning. If the residual is within the threshold range, it means that there is no sensor failure, 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σ].
[0096] Furthermore, step 243 and the parameters of equation (23) are applied to equation (20) to obtain k+1 outputs; then the k+1 output is compared with the actual output value of the sensor. If the obtained deviation is not within the threshold range of the fault judgment, it means that the sensor has a fault and the output signal of the sensor needs to be disconnected. The actual output value of the faulty sensor is replaced by the predicted value of the improved OSLS-SVM model for output.
[0097] Beneficial Effects
[0098] Compared with the prior art, the present invention has the following advantages:
[0099] 1. The present invention adopts the support vector machine algorithm optimized by the online least square method to efficiently process the single data or matrix data received in real time, thereby realizing the rapid response of the sensor in fault diagnosis and adaptive control.
[0100] 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
[0101] Figure 1 is a flow chart of the present invention;
[0102] 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;
[0103] Figure 3 This is the OSLS-SVM workflow diagram. DETAILED DESCRIPTION
[0104] The present invention will be further described below with reference to the specific embodiments in the accompanying drawings.
[0105] See also Figure 1 to Figure 3 A method for realizing exhaust temperature sensor fault identification and self-adaptation includes the following steps 1 to 6:
[0106] Step 1. Data collection and preprocessing. Collect the main fuel supply, intake volume, crankshaft speed, cylinder internal pressure and exhaust temperature of the engine. Specifically, the main fuel supply can be collected by the fuel flow sensor, the cylinder internal pressure can be collected by the in-cylinder pressure sensor, the intake volume can be collected by the air flow sensor, the crankshaft speed sensor can collect the crankshaft speed, and the exhaust temperature sensor can collect the exhaust temperature. Clean the collected data, then use wavelet transform to reduce data noise, normalize the data and perform statistical analysis on the data to obtain preprocessed data.
[0107] Step 2. Construct the engine linear model. Construct the discrete space state mathematical model of the engine 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.
[0108] Step 3. Construct an OSLS-SVM algorithm model. According to the LS-SVM nonlinear regression principle, construct an input-output regression model. The least squares method is used in the algorithm model to find the best fitting curve, so as to achieve the result that the estimated output value is close to the actual output value. At the same time, add an online learning algorithm to speed up the computational efficiency of the entire OSLS-SVM algorithm model. Train the OSLS-SVM algorithm model based on the preprocessed data obtained in step 1.
[0109] Step 4. Realize the prediction of real-time data. Input the main fuel supply, intake volume, crankshaft speed, cylinder internal pressure and exhaust temperature of the engine collected in real time into the trained OSLS-SVM algorithm model to obtain the predicted value of the exhaust temperature.
[0110] 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.
[0111] 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.
[0112] 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. By 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, it is fed back to the closed-loop feedback system.
[0113] Otherwise, the actual output value is output normally and fed back to the closed-loop feedback system.
[0114] Since the engine exhaust process is a process of high temperature, high pressure and complex gas content, the exhaust temperature sensor is very easy to be damaged in this environment, causing a deviation in the sensitivity of the sensor. The estimated output value is used for the actual output because this method can be used to realize the fault identification and adaptive diagnosis capabilities of the sensor when the exhaust temperature sensor fails. Once the sensor fails, it will automatically cut off the signal and replace the actual output with the model output to obtain real data, thereby ensuring that the exhaust temperature sensor can realize fault identification and adaptive capabilities.
[0115] In this embodiment, a four-stroke engine is taken as an example. In step 1, data collection is as follows:
[0116] (1) The measurement of the main fuel supply volume adopts the DSP+FGPA hardware platform. The frequency signal output by the fuel flow sensor is processed by the signal conditioning circuit and then collected by the FPGA for frequency counting. 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. The DSP obtains the count value result through the local bus access and performs algorithm processing.
[0117] (2) Calculation of air intake:
[0118]
[0119] Among them, Q 进 Indicates the engine intake volume, Q排 represents the engine displacement and n represents the engine speed per minute.
[0120] (3) Calculation of crankshaft speed:
[0121]
[0122] 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.
[0123] (3) Calculation of cylinder internal pressure includes four processes.
[0124] Compression process:
[0125]
[0126] Among them, 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.
[0127] Combustion process:
[0128] T3=T2+ΔT(4)
[0129] Where ΔT is the temperature increase due to combustion.
[0130] Expansion process:
[0131]
[0132] Exhaust process:
[0133]
[0134] 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.
[0135] In step 1, the data is preprocessed as follows:
[0136] (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.
[0137] (2) Data denoising, including the following steps 11 to 13:
[0138] 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:
[0139]
[0140] 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.
[0141] 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.
[0142] Soft thresholding:
[0143] c soft =sign(x)×max(|x|-λ,0)(8)
[0144] Hard thresholding:
[0145]
[0146] The soft and hard thresholding processes retain most of the information of the data and also preserve the sharp features of the signal.
[0147] Step 13. Wavelet reconstruction: Use the processed wavelet coefficients to perform wavelet reconstruction to obtain the denoised signal:
[0148]
[0149] Recombining the processed wavelet coefficients can remove most of the noise.
[0150] The construction of the engine linear model is as follows:
[0151] 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:
[0152]
[0153] Among them, H is the input matrix, G is the system matrix, and C is the output matrix.
[0154] The error decision system can adopt the following discrete incremental PID control rate:
[0155]
[0156] 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.
[0157] The LS-SVM algorithm reduces the quadratic programming problem of the SVM support vector machine based on the least squares method, and reduces 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 view of this defect of the traditional SVM algorithm, a recursive algorithm similar to the least squares 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.
[0158] Specifically, building the OSLS-SVM algorithm model includes the following steps 21 to 24:
[0159] Step 21. Construct the objective function and constraint function of OSLS-SVM for a 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:
[0160]
[0161] 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,
[0162] For OSLS-SVM, let the original soft margin distance be w (0), the nonlinear regression approximation function is:
[0163]
[0164] The objective function and constraint functions of the nonlinear regression problem are as follows:
[0165]
[0166] formula is a vector x i The nonlinear kernel function K(x) mapped to a high-dimensional feature space 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.
[0167] When a new data block arrives, The objective function and constraint functions are as follows:
[0168]
[0169] in, is a spatial weight vector after adding a new data block, b (1) It is a deviation value after adding the data block.
[0170] 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 on the constraints of the constraint function, solve the problem of finding the optimal value of the objective function:
[0171]
[0172] For w in formula J (1) , b (1) 、e i and i Taking partial derivatives, we get the following formula:
[0173]
[0174] Eliminating the variables w and e, the output equation is:
[0175]
[0176] Combining formula (19) we get a recursive least squares algorithm. When it arrives, equation (19) can be written as:
[0177]
[0178] Among them, b (k+1) is the deviation value corresponding to the data added, 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.
[0179] Step 23. Parameter initialization: Initialize the regularization parameter γ and the kernel function parameter σ. The initialization process uses the cross-validation method.
[0180] Step 23 includes the following steps 231 to 234:
[0181] Step 231. Initialize the value range, γ∈[10,10000], σ∈[0.01,10].
[0182] 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.
[0183] 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.
[0184] Step 234. If the learning accuracy does not meet the required requirements, then [γ,σ] 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.
[0185] Step 24. Parameter iteration. The subsequent process only needs to iterate the parameter σ. The regularization parameter γ has been determined in the initial learning process of the data set D0.
[0186] Step 24 includes the following steps 241 to 243:
[0187] Step 241. Using the current σ k For the new data block D k+1 Make a prediction and calculate the error:
[0188]
[0189] Among them, Ek+1 is the error of the k+1th data, is the actual data of the k+1th node, y i It is the estimated data of the k+1th time.
[0190] 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, we need to reduce σ as much as possible. k , the formula is as follows:
[0191]
[0192] 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.
[0193] 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;
[0194]
[0195] Make boundary judgment for each updated individual position.
[0196] Perform residual system construction.
[0197] There will be a certain deviation between the predicted value and the actual output value of the sensor. The deviation formula is:
[0198] e(t)=y(t)-y out (t)(24)
[0199] Among them, y(t) is the actual output value of the sensor, y out (t) is the predicted value.
[0200] The deviation error range of the sensor is established offline, and then the deviation of each data is judged through online learning. If the residual is within the threshold range, it means that there is no sensor failure, 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σ].
[0201] Output the predicted value.
[0202] Apply step 243 and the parameters of equation (23) to equation (20) to obtain k+1 outputs; then use this k+1th output to compare with the actual output value of the sensor. If the obtained deviation is not within the threshold range of the fault judgment, 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.
[0203] The above are only preferred embodiments 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, which 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 adaptation, characterized in that: The following steps are involved: Step 1. Data collection and preprocessing: collecting the engine's main fuel supply, intake volume, crankshaft speed, cylinder internal pressure, and exhaust temperature; The collected data is cleaned, and then wavelet transform is used to reduce data noise, and then the data is normalized and statistically analyzed to obtain preprocessed data; Step 2. Construct the linear model of the engine, construct the discrete space state mathematical model of the engine according to 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. According to the LS-SVM nonlinear regression principle, construct an input-output regression model. The least squares method is used in the algorithm model to find the best fitting curve, so as to achieve the result that the estimated output value is close to the actual output value; at the same time, add an online learning algorithm to speed up the calculation efficiency of the entire OSLS-SVM algorithm model; train the OSLS-SVM algorithm model based on the preprocessed data obtained in step 1; Step 4. Realize the prediction of real-time data, input the main fuel supply, intake volume, crankshaft speed, cylinder internal pressure and exhaust temperature of the engine collected in real time 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. 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; 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. A 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 measurement of the main fuel supply volume adopts the DSP+FGPA hardware platform. The frequency signal output by the fuel flow sensor is processed by the signal conditioning circuit and then collected by the FPGA for frequency counting. The FPGA adopts a 30M crystal oscillator and uses the frequency counting method to count the input square wave signal. The count value is stored in the built-in data storage unit. The DSP obtains the count value result through the local bus access and performs algorithm processing. Calculation of air intake, Among them, Q 进 Indicates the engine intake volume, Q 排 represents the engine displacement, n represents the engine speed per minute; Crankshaft speed calculation, Wherein, 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 of the engine flywheel ring gear; Calculation of internal cylinder pressure, compression process, Wherein, T1 is the temperature of the initial state, P1 is the pressure of the initial state, V1 is the volume of the initial state, T2 is the temperature after compression, P2 is the pressure after compression, V2 is the volume after compression, γ 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. A 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 data set. Missing values can be filled by interpolation methods, 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 wavelet decomposition layer k, and for each layer j, calculate the wavelet coefficients: 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 to perform 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 for 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 construction of the engine linear model is 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 space 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 a 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) mapped to a high-dimensional feature space 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 on 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 recursive least squares algorithm. When k≥0, equation (19) can be written as: Among them, b (k+1) is the deviation value corresponding to the data after adding, 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: initializing the regularization parameter γ and the kernel function parameter σ. The initialization process uses the cross-validation method. Step 24. Parameter iteration. The subsequent process only needs to iterate the parameter σ. The regularization parameter γ has been determined in the initial learning process of the data set D0.
6. A 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 the parameters σ and γ respectively to obtain a two-dimensional grid space of the parameter vector [γ,σ] 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, then [γ,σ] 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. A 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 the k+1th node, 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, we need 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 deviation error range of the sensor is established offline, and then the deviation of each data is judged through online learning. If the residual is within the threshold range, it means that there is no sensor failure, 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+1th output to compare with the actual output value of the sensor. If the obtained deviation is not within the threshold range of the fault judgment, 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.
Citation Information
Patent Citations
Aero-engine sensor fault diagnosis method based on multi-target fault detection observer and improved LSSVM
CN115859616A
Near real-time detection and classification of machine anomalies using machine learning and artificial intelligence
US20200285997A1