Method for estimating operating state of free piston linear generator system based on time series prediction and feature selection
Patent Information
- Application Number
- CN202310774522.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-06-28
AI Technical Summary
针对自由活塞直线发电系统运行状态估计的研究,传统方法依据左、右两侧气缸能否达到着火条件,判定其处于何种运行状态,由于监测变量单一,不能有效地反应运行特点
[0076]本发明采用的以上技术方案,与现有技术相比,具有的优点是:1)本发明基于虚拟原位校准方法实时重构和在线修补出自由活塞直线发电系统中多种类型传感器某一或同时发生的数据缺失,能够保证预估值的准确性,且填补效率高,实现了历史数据的准确性和数据库的完整性;2)本发明基于ReliefF的特征选择方法,得出自由活塞直线发电系统关键运行特征,降低数据维度,节省SVM分类器模式识别的响应时间;3)本发明将自由活塞直线发电系统与SVM分类器、LSTM神经网络相结合,能有效识别和预测自由活塞直线发电系统运行状态。
Smart Images

Figure CN116822203B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of free piston linear power generation system technology, and specifically to a method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection. Background Technology
[0002] Faced with the dual pressures of increased automobile production and stricter emission standards, the automotive industry has entered a period of intense reform. Against this backdrop, researchers have proposed a free-piston linear generator system for range-extended electric vehicles (REEVs). The advantages of REEVs lie in the fact that the power generation unit, composed of an internal combustion engine and a generator, automatically and intermittently generates electricity under system control, operating at optimal fuel consumption (maximum energy efficiency), to power the vehicle's driving, auxiliary equipment, and battery. Compared to traditional gasoline vehicles, REEVs have emissions that meet the China VI emission standards, reducing emissions by more than 50% compared to gasoline vehicles of the same tonnage. Compared to pure electric vehicles of the same weight, REEVs can operate continuously for longer periods, without mileage limitations or battery depletion issues. Furthermore, their batteries are more reliable and have a longer lifespan, making them extremely promising for future applications.
[0003] The free-piston linear generator system plays a crucial role in the powertrain of a range-extended electric vehicle. It couples a linear motor and a free-piston engine, using the combustion of the linear internal combustion engine to drive the linear motor and generate and output electrical energy. The operation of the free-piston linear generator system mainly includes: a driven combustion process, a switching process, and a stable power generation process. During the driven combustion phase, the motor operates in electric motor mode, providing a constant motor force in the same direction as the piston's movement, driving the piston to reciprocate and thus starting the internal combustion engine. During the switching phase, under normal conditions, the motor switches from electric motor mode to generator mode, entering the stable power generation process. However, in actual operation, misfires, stalling, and incomplete combustion may occur, requiring the system to switch from stable power generation mode to driven combustion mode. During the stable power generation phase, the motor operates in generator mode, using the reciprocating motion of the motor rotor to cut magnetic lines of force to generate electrical energy.
[0004] To ensure the stable and continuous operation of the free-piston linear generator system and the smooth switching between the driven combustion mode and the stable power generation mode, it is necessary to predict the system's next operating mode and adjust it in a timely manner. Traditional methods for estimating the operating state of free-piston linear generator systems rely on whether the left and right cylinders can reach the ignition conditions to determine their operating state. However, due to the single monitoring variable, this approach cannot effectively reflect the operational characteristics. Therefore, collecting multi-dimensional operational data can effectively compensate for the shortcomings of traditional methods for estimating the operating state of free-piston linear generator systems. Summary of the Invention
[0005] The purpose of this invention is to combine a free piston linear generator system with an SVM classifier and an LSTM neural network to provide a time-series prediction and feature selection method for estimating the operating state of a free piston linear generator system. This method uses multiple operating state data as multiple dimensional variables of the input data and outputs the specific operating state, thereby realizing the identification and prediction of the operating state of the free piston linear generator system.
[0006] To achieve the above objectives, this application proposes a method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection, comprising:
[0007] Thermodynamic and kinematic parameters are acquired through a sensor module, and these parameters are labeled.
[0008] Gaussian filtering was used to preprocess the thermodynamic and kinematic parameters;
[0009] Eliminating systematic errors and repairing missing data based on virtual in-situ calibration methods;
[0010] Thermodynamic and kinematic features are extracted using the ReliefF algorithm, and key thermodynamic and kinematic features are used to train an SVM classifier.
[0011] The time-series prediction based on the Long Short-Term Memory (LSTM) network is used to obtain the prediction data. The prediction data is then input into a trained SVM classifier to obtain the operating status of the free piston linear power generation system.
[0012] Furthermore, the sensor module includes a throttle position sensor, a displacement sensor, an air-fuel ratio sensor, an intake / exhaust temperature sensor, an air flow meter, an in-cylinder pressure sensor, an intake / exhaust pressure sensor, and a scavenging box pressure sensor, used to acquire thermodynamic and kinematic parameters, specifically including the throttle opening K that drives the combustion process. st1 Piston displacement X tst1 Air-fuel ratio (AFR) st1 Intake air temperature T inst1 Exhaust temperature T outst1 Airflow Q st1 Cylinder pressure P st1 Intake pressure P inst1 Exhaust pressure P outst1 and scavenging chamber pressure P sst1 , labeled as dataset S t1 Throttle opening K during the switching process tsw1 Piston displacement X sw1 Air-fuel ratio (AFR) sw1 Intake air temperature T insw1Exhaust temperature T outsw1 Airflow Q sw1 Cylinder pressure P sw1 Intake pressure P insw1 Exhaust pressure P outsw1 and scavenging chamber pressure P ssw1 , labeled as dataset S w1 Throttle opening K during stable power generation process tge1 Piston displacement X ge1 Air-fuel ratio (AFR) ge1 Intake air temperature T inge1 Exhaust temperature T outge1 Airflow Q ge1 Cylinder pressure P ge1 Intake pressure P inge1 Exhaust pressure P outge1 and scavenging chamber pressure P sge1 , labeled as dataset G e1 .
[0013] Furthermore, Gaussian filtering is used to preprocess the thermodynamic and kinematic parameters. Specifically, assuming the piston displacement sensor receives n sampled values (x1, x2, x3, ..., x...),... n It follows a normal distribution, and the sampled values approximately follow (μ, δ). 2 The probability density function is a Gaussian distribution, as shown in equation (1):
[0014]
[0015] in:
[0016]
[0017]
[0018] The interval probability of F(x) is: P(|x i -μ|<δ)=2Φ(1)-1, the arithmetic mean of the sampled values selected from the high probability interval is:
[0019]
[0020] The piston displacement data after Gaussian filtering optimization is denoted as dataset S. t2 S w2 G e2 .
[0021] Furthermore, based on the virtual in-situ calibration method, system errors are eliminated and missing data is repaired. Specifically, the operating conditions of the free piston linear power generation system are divided into three calibration regions: startup, switching, and power generation. This ensures that the sensors to be calibrated within each calibration region form a closed loop in the mathematical model; where K... tst2 X st2 AFR st2 T inst2 T outst2 Q st2 P st2 P inst2 P outst2 and P sst2 For the first calibration area; K tsw2 X sw2 AFR sw2 T insw2 T outsw2 Q sw2 P sw2 P insw2 P outsw2 and P ssw2 For the second calibration area; K tge2 X ge2 AFR ge2 T inge2 T outge2 Q ge2 P ge2 P inge2 P outge2 and P sge2 This is the third calibration area; calibrate each of these three calibration areas sequentially.
[0022] Establish multiple sets of periodic quasi-steady-state measurements of various sensors in the free piston linear power generation system: Perform periodic quasi-steady-state processing on the data of three operating conditions: drag combustion, state switching, and stable power generation, and align the time stamps; For different operating states of each sensor, select 3-5 times the total number of data from each sensor for each operating state to obtain multiple sets of periodic quasi-steady-state data;
[0023] Establish the correction function, reference function, and target function for the sensor to be calibrated;
[0024] The offset constant of each sensor for each region requiring calibration is obtained based on Bayesian inference and the Monte Carlo Markov chain method.
[0025] The sensor is corrected using the obtained sensor offset constant.
[0026] Furthermore, the correction function, reference function, and target function of the sensor to be calibrated are established, specifically as follows:
[0027] The correction of the sensor measurements is achieved by adding an offset constant; the specific formula is as follows:
[0028] Sensor measurement correction function: I c =g(I,x1,x2,…,x) k (5) Cylinder pressure during startup: P 1c =P1+x1(6)
[0029] In equation (5), g(x) is the correction function, I is the original measurement value of the sensor, and x k I is the offset constant for the k-th measurement value. c P is the corrected value after modification; in equation (6) 1c P1 is the correction value for the cylinder pressure during startup, P1 is the sensor measurement value of the cylinder pressure during startup, and x1 is the offset constant of the sensor for the cylinder pressure during startup.
[0030] Sensor measurement reference function: I b =f(I c,1 ,I c,2 ,…,I c,i (7)
[0031] In equation (7), f(x) is the reference function representing the free piston linear power generation system, I c,i Here, I represents the correction value for the sensor, i is the number of sensors, and I is the value for the sensor. b This is the reference value for the sensor;
[0032] An autoencoder is used to find a set of parameters θ = {W, W', b, b'} that minimizes the reconstruction loss between the correction value and the reference value of the sensor in the free piston linear power generation system. The autoencoder is implemented by an AE neural network, which includes an input layer, a hidden layer, and an output layer. The part from the input layer to the hidden layer is called the encoder, which is represented by equation (8). The part from the hidden layer to the output layer is called the decoder, which is represented by equation (9).
[0033] h = z(WI) b +b) (8)
[0034] I c =g(W′h+b′) (9)
[0035] In the formula I b Given the input sample data, W and W' are weight matrices, b and b' are bias values, z and g are activation functions, h is the encoded output, and I... c For the decoded output, the objective function of its AE is defined as follows:
[0036]
[0037] In the formula I bi Let I be the reference value for the i-th sensor. ci The correction value of the i-th sensor, where N is the number of reference outputs in the objective function;
[0038] For each region requiring calibration, an objective function is established. By minimizing the objective function for data repair—that is, minimizing the difference between the corrected value and the reference value—the sensor is calibrated. The formula is as follows:
[0039]
[0040] In the formula, D(x) is the objective function for data repair.
[0041] Furthermore, based on Bayesian inference and the Monte Carlo Markov chain method, the offset constant for each sensor in each region requiring calibration is obtained, specifically:
[0042] Multiple sets of periodic quasi-steady-state data are substituted into the objective function;
[0043] Calibration based on Bayes' theorem: A relatively accurate posterior distribution is obtained through the prior distribution and likelihood function of the data. Bayes' theorem is then used to calculate the data collected by the sensor in the free piston linear generator system. When the objective function D(x) is minimized, i.e., the likelihood function reaches its maximum value, and the posterior distribution has the highest probability, an accurate offset constant is obtained, thus completing the sensor calibration. The specific formula is as follows:
[0044] Bayes' theorem:
[0045] Likelihood function:
[0046] In the formula, x is the sensor offset constant, π(x) is the prior distribution of the sensor offset constant, and σ is the variance of the sensor's reference value.
[0047] The median μ of a series of offset constants obtained through sampling that minimize the objective function is defined as the sensor offset constant x. The sensor is then corrected using a correction function.
[0048] I c =I+x c (14)
[0049] In the formula, I represents the sensor's measured value, and x... c It is an offset constant;
[0050] The dataset after removing systematic errors using the virtual in-situ calibration method is denoted as dataset S. t3 S w3 Ge3 .
[0051] Furthermore, thermodynamic and kinematic features are extracted using the ReliefF algorithm, specifically:
[0052] Set dataset S t3 S w3 G e3 The feature weights of all subsets are 0;
[0053] A sample R is randomly drawn from the training set;
[0054] Find the k nearest neighbor samples H of sample R in the set of similar samples. j (j=1,2,…k), find the k nearest neighbor samples M from the different class sets of sample R. j (C);
[0055] Update the weights W[A] for each sensor parameter using the following formula:
[0056] (15)
[0057] Where: m represents the number of sample samplings; M j (C) represents the j-th nearest neighbor sample in different class C; P(C) represents the proportion of target samples of class C to the total number of samples; (class(R) i )) represents R i The category to which it belongs; function diff(A,R) i ,R j ) for sample instance R i and R j Regarding the distance between certain features A:
[0058] (16)
[0059] Repeat the above steps, selecting different samples each time, to obtain the weight of each feature;
[0060] The top N dimensions of data with the largest weights are selected as the feature subset for training the SVM classifier. This feature subset is denoted as S. t4 S w4 G e4 .
[0061] As a further step, the SVM classifier construction steps are as follows:
[0062] For the training set Z = (x, y) = ((x1, y1), (x2, y2), ... (x n ,y n )), For categorical data, yi ∈{+1,-1,0} represents the data category label; when the decision function output value is +1, the system is in drag combustion mode; when the decision function output value is -1, the system is in switching mode; when the decision function output value is 0, the system is in stable power generation mode.
[0063] To achieve data classification, a feature space F is defined, where the data is determined by a kernel function. Generated through inner product, This is a nonlinear mapping function used to map input spatial data to a high-dimensional feature space; a hyperplane is constructed in the feature space F. The hyperplane divides the feature data into three classes and finds a hyperplane decision function f(x,ω)=sign(h(x,ω)) such that the output of the hyperplane decision function satisfies equation (17):
[0064]
[0065] In the formula: ω,b are the hyperplane coefficients; p=(1,2,…l); l is the total number of sample data; l1 is the total number of sample data in the drag combustion mode; l2 is the total number of sample data in the switching mode; l-l1-l2 is the total number of sample data in the stable power generation mode;
[0066] To ensure that the optimal classification hyperplane is maximized by maximizing the distance to the nearest sample point, the problem is transformed into an optimization problem of quadratic programming form under specific constraints, namely:
[0067]
[0068] The constraints are:
[0069]
[0070] In the formula: slack variable < ξ i ,φ i ,φ i * >≥0;l 12 =l1+l2; C>0, D>0, are weighting parameters for balancing classification errors; to avoid overlap between classes when the slack variables are zero, the balance coefficient δ≤1 is usually taken;
[0071] The SVM classifier is used to obtain the pattern recognition model of the free piston linear power generation system, which includes the drag combustion model, the switching model and the stable power generation model.
[0072] As a further step, the construction steps based on the Long Short-Term Memory (LSTM) network are as follows:
[0073] The LSTM neural network stores four states, namely the current value and the previous value of the output, the current value and the previous value of the memory state vector; the hidden layer of the LSTM neural network includes a forget gate to determine the forgetting ratio of the information in the previous memory unit, a proportional input gate to determine the current information input to the memory unit, a proportional output gate to determine the information input to the hidden layer, and a memory unit, as shown in Equation (20).
[0074]
[0075] In the formula, x t m t K t KK t P t R t S t Let W represent the network's input variables at time t, the parameter states of the hidden layers, the parameter states of the memory units during network transmission, the parameter states of the intermediate temporary memory units during network transmission, the input gate, the output gate, and the forget gate, respectively. sigmoid and tanh are the activation functions; xf With W hf These are the weight matrices from the input layer and hidden layer to the forget gate, respectively; W xi With W hi These are the input layer and hidden layer weight matrices to the input gate, respectively; W xo With W ho These are the weight matrices from the input layer and hidden layer to the output gate, respectively; W xc With W hc These are the weight matrices from the input layer and hidden layer to the memory unit, respectively; b f b i b o With b c These are the bias vectors for the four states of the network.
[0076] Compared with existing technologies, the above technical solutions adopted in this invention have the following advantages: 1) Based on the virtual in-situ calibration method, this invention reconstructs and repairs data missing from multiple types of sensors in a free piston linear power generation system in real time, ensuring the accuracy of the predicted values and achieving high filling efficiency, thus realizing the accuracy of historical data and the integrity of the database; 2) Based on the ReliefF feature selection method, this invention derives the key operating characteristics of the free piston linear power generation system, reducing data dimensionality and saving the response time of SVM classifier pattern recognition; 3) This invention combines the free piston linear power generation system with SVM classifier and LSTM neural network, which can effectively identify and predict the operating status of the free piston linear power generation system. Attached Figure Description
[0077] Figure 1 The flowchart shows the operating state estimation method for a free piston linear power generation system based on time-series prediction and feature selection.
[0078] Figure 2 This is a diagram of the self-encoder structure.
[0079] Figure 3 This is a structural diagram of the hidden layer neurons in an LSTM neural network. Specific implementation methods
[0080] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit the application; that is, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0081] like Figure 1 As shown, this embodiment provides a method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection, including:
[0082] S1. Acquire thermodynamic and kinematic parameters through the sensor module, and label the thermodynamic and kinematic parameters;
[0083] Specifically, the operation of a free-piston linear generator system is related to multiple types of parameters, and the processing of parameter data is coupled with Internet of Things (IoT) technology. Structurally, the IoT can be divided into three layers: the sensing layer, the network transmission layer, and the application layer. The sensing layer includes end-point sensors to collect information from the free-piston linear generator system; the network transmission layer uses the internet to transmit, route, and control information; and the application layer includes data analysis, data processing, feature extraction, pattern recognition, and pattern prediction. The sensor modules of this system include a throttle position sensor, a displacement sensor, an air-fuel ratio sensor, an intake / exhaust temperature sensor, an air flow meter, an in-cylinder pressure sensor, an intake / exhaust pressure sensor, and a scavenging box pressure sensor. Thermodynamic and kinematic parameters need to be obtained from the sensors, specifically including the throttle opening K that drives the combustion process. st1 Piston displacement X tst1 Air-fuel ratio (AFR) st1 Intake air temperature T inst1 Exhaust temperature T outst1 Airflow Q st1 Cylinder pressure P st1 Intake pressure P inst1 Exhaust pressure P outst1 and scavenging chamber pressure P sst1 , labeled as dataset S t1 Throttle opening K during the switching process tsw1Piston displacement X sw1 Air-fuel ratio (AFR) sw1 Intake air temperature T insw1 Exhaust temperature T outsw1 Airflow Q sw1 Cylinder pressure P sw1 Intake pressure P insw1 Exhaust pressure P outsw1 and scavenging chamber pressure P ssw1 , labeled as dataset S w1 Throttle opening K during stable power generation process tge1 Piston displacement X ge1 Air-fuel ratio (AFR) ge1 Intake air temperature T inge1 Exhaust temperature T outge1 Airflow Q ge1 Cylinder pressure P ge1 Intake pressure P inge1 Exhaust pressure P outge1 and scavenging chamber pressure P sge1 , labeled as dataset G e1 .
[0084] S2. Gaussian filtering is used to preprocess the thermodynamic and kinematic parameters;
[0085] Specifically, Gaussian filtering can effectively suppress noise and eliminate incoherent signals. The data is filtered using Gaussian filtering, and the arithmetic mean of its effective values is calculated.
[0086] Data set G during the stable power generation phase e1 Neutron Dataset X ge1 For example, the piston displacement sensor receives n sampled values (x1, x2, x3, ..., x...). n The sampled values approximately follow a normal distribution (μ, δ). 2 The probability density function is a Gaussian distribution, as shown in equation (1):
[0087]
[0088] in:
[0089]
[0090]
[0091] The interval probability of F(x) is: P(|x i -μ|<δ)=2Φ(1)-1=0.683, the arithmetic mean of the sampled values selected from the high probability interval is:
[0092]
[0093] The piston displacement data was optimized using Gaussian filtering to eliminate noise fluctuations. The dataset after Gaussian filtering is denoted as dataset S. t2 S w2 G e2 , used in step S3.
[0094] S3. Eliminate system errors and repair missing data based on virtual in-situ calibration method;
[0095] S3.1. The operating conditions of the free piston linear power generation system are divided into three local calibration regions: the startup process, the switching process, and the power generation process. This ensures that the sensors to be calibrated within each calibration region form a closed loop in the mathematical model, increasing the accuracy of the free piston linear power generation system calibration. Wherein, K tst2 X st2 AFR st2 T inst2 T outst2 Q st2 P st2 P inst2 P outst2 and P sst2 For the first calibration area; K tsw2 X sw2 AFR sw2 T insw2 T outsw2 Q sw2 P sw2 P insw2 P outsw2 and P ssw2 For the second calibration area; K tge2 X ge2 AFR ge2 T inge2 T outge2 Q ge2 P ge2 P inge2 P outge2 and P sge2 This is the third calibration area; calibrate each of these three calibration areas sequentially.
[0096] S3.2 Establish multiple sets of periodic quasi-steady-state measurement values for each sensor in the free piston linear power generation system:
[0097] 1) Perform periodic quasi-steady-state processing on the data from the three operating conditions of drag combustion, state switching, and stable power generation, and align the time tags;
[0098] 2) For each sensor's different operating states, select 3-5 times the total number of data points for each operating state to obtain multiple sets of periodic quasi-steady-state data required by this calibration method;
[0099] S3.3 Establish the correction function, reference function, and target function of the sensor to be calibrated;
[0100] 1) The purpose of establishing the correction function is to eliminate the deviation between the sensor measurement value and the true value. This is achieved by increasing an offset constant to correct the sensor measurement value. The specific formula is as follows:
[0101] Sensor measurement correction function: I c =g(I,x1,x2,…,x) k (5)
[0102] For example, the cylinder pressure during startup: P 1c =P1+x1 (6)
[0103] In equation (5), g(x) is the correction function, I is the original measurement value of the sensor, and x k I is the offset constant for the k-th measurement value. c This is the corrected value after adjustment; in formula (6), P 1c P1 is the correction value for the cylinder pressure during startup, P1 is the sensor measurement value of the cylinder pressure during startup, and x1 is the offset constant of the sensor for the cylinder pressure during startup.
[0104] 2) Due to the large number of sensors in the free piston linear generator system, the error of each sensor cannot be known before calibration. Therefore, a reference function for each parameter needs to be established. The reference value of each parameter is then used in subsequent calibration steps. The specific formula is as follows:
[0105] Sensor measurement reference function: I b =f(I c,1 ,I c,2 ,…,I c,i (7)
[0106] In equation (7), f(x) is the reference function representing the free piston linear power generation system, I c,i Here, I represents the correction value for the sensor, i is the number of sensors, and I is the value for the sensor. b This is the reference value for the sensor;
[0107] 3) Using an autoencoder (AE), a set of parameters θ = {W, W', b, b'} is found to minimize the reconstruction loss between the correction value (input data) and the reference value (output data) of the sensor in the free piston linear generator system, thereby uncovering the important representation structure of the correction value. The autoencoder is implemented through an AE neural network, which includes an input layer, a hidden layer, and an output layer. The part from the input layer to the hidden layer is called the encoder, which is represented by equation (8); the part from the hidden layer to the output layer is called the decoder, which is represented by equation (9).
[0108] h = z(WI) b +b) (8)
[0109] I c =g(W′h+b′) (9)
[0110] In the formula, x represents the input sample data, W and W' are weight matrices, b and b' are bias values, f and g are activation functions, h is the encoded output, and I... c For decoding output. Each training sample I bi All are projected onto the implicit representation h i Then it is mapped to the reconstructed data I ci In this invention, the model parameters are obtained by minimizing the mean square error. The objective function of AE is defined as follows:
[0111]
[0112] In the formula I bi Let I be the reference value for the i-th sensor. ci The correction value of the i-th sensor, where N is the number of reference outputs in the objective function;
[0113] 4) Establish an objective function for each region requiring calibration. The sensor is calibrated by minimizing the objective function for data restoration, i.e., minimizing the difference between the corrected value and the reference value. The formula is as follows:
[0114]
[0115] In the formula, D(x) is the objective function for data repair;
[0116] S3.4. Obtain the sensor offset constant for each region requiring calibration based on Bayesian inference and Monte Carlo Markov chain method;
[0117] 1) Substitute the data: Substitute the multiple sets of periodic quasi-steady-state measurement values from step S3.2 into the objective function of step S3.3;
[0118] 2) Calibration is performed based on Bayes' theorem. A relatively accurate posterior distribution is obtained through the prior distribution and likelihood function of the data. Bayes' theorem is then used to calculate the data collected by the sensors in the free piston linear generator system. When the objective function D(x) is minimized, i.e., the likelihood function reaches its maximum value, and the posterior distribution has the highest probability, an accurate offset constant is obtained, completing the sensor calibration. The specific formula is as follows:
[0119] Bayes' theorem:
[0120] Likelihood function:
[0121] In the formula, x is the sensor offset constant, and π(x) is the prior distribution of the sensor offset constant. The default mean of the prior distribution is 0.
[0122] S3.5. Use the obtained offset constant of each sensor to complete the correction of the sensor;
[0123] The median μ of a series of offset constants that can minimize the objective function, obtained by sampling through step S3.4, is defined as the sensor offset constant x. The sensor can be corrected by the correction function.
[0124] I c =I+x c (14)
[0125] In the formula, I represents the sensor's measured value, and x... c This is an offset constant.
[0126] The dataset after removing systematic errors using the virtual in-situ calibration method is denoted as dataset S. t3 S w3 G e3 , used in step S4.
[0127] S4. Extract thermodynamic and kinematic features using the ReliefF algorithm, and use the key thermodynamic and kinematic features to train the SVM classifier.
[0128] Specifically, in a free-piston linear power generation system, the ReliefF algorithm is used to remove attributes with the least correlation, extracting key thermodynamic and kinematic features. The specific steps are as follows:
[0129] S4.1, set S t3 S w3 G e3 The feature weights of all subsets are 0;
[0130] S4.2. Randomly select a sample R from the training set, for example, the piston displacement x during the drag combustion process.st3 ;
[0131] S4.3 Find the k nearest neighbor samples H of sample R in the set of similar samples of sample R. j (j=1,2,…k), find the k nearest neighbor samples M from the different class sets of sample R. j (C); for example, from dataset S t3 Find the 5 nearest neighbors in the sample, let's say they are K. tst3 X st3 AFR st3 T inst3 T outst3 From dataset S w3 Find the 5 nearest neighbors in the sample, let's say they are K. tsw3 X sw3 AFR sw3 T insw3 T outsw3 From dataset G e3 Find the 5 nearest neighbors in the hypothesis K. tge3 X ge3 AFR ge3 T inge3 T outge3 ;
[0132] S4.4 Update the weight W[A] of each feature. The weight update formula is as follows:
[0133] (15)
[0134] Where: m represents the number of sample samplings; M j (C) represents the j-th nearest neighbor sample in different class C; P(C) represents the proportion of target samples of class C to the total number of samples; (class(R) i )) represents R i The category to which it belongs; function diff(A,R) i ,R j ) is used to calculate sample instance R i and R j Regarding the distance between certain features A:
[0135] (16)
[0136] For a certain feature A, the distance diff(A,R) between two samples of the same type on A is: i H j The smaller the value, or the smaller the distance diff(A,R) between two samples of different classes on A, the better. i M jThe larger (C) is, the larger w[A] is, and the more beneficial feature A is for classifying the operating state of the free piston linear generator system. Repeat step S4, selecting different samples each time in S4.2, to calculate the weight of each feature. The free piston linear generator system includes 10 features such as throttle opening, piston displacement, and fuel-air ratio. The top 5 dimensions with the largest weights are selected as the feature subset for training the SVM classifier. This feature subset is denoted as S. t4 S w4 G e4 80% of the data is randomly divided into a training set and 20% of the data is used for the test set, which is then used in step S5.
[0137] S5. The predicted data is obtained by time series prediction based on the Long Short-Term Memory Network (LSTM). The predicted data is then input into the trained SVM classifier to obtain the operating status of the free piston linear power generation system.
[0138] Specifically, an SVM classifier is trained based on the key thermodynamic and kinematic characteristics of the free piston linear power generation system extracted by S4, establishing a drag combustion model, a switching model, and a stable power generation model. Based on these three models, when the operational data collected by the sensors is input into the SVM classifier, the SVM classifier can determine the operating status of the free piston linear power generation system; when predictive data is input into the SVM classifier, the SVM classifier can predict the operating status of the free piston linear power generation system and make timely adjustments.
[0139] The specific steps for building an SVM classifier are as follows:
[0140] S5.1, For the training set Z = (x, y) = ((x1, y1), (x2, y2), ... (x n ,y n )), For categorical data, y i ∈{+1,-1,0} represents the data category label. For example, Z=((S t4 ,+1),(S wt4 ,-1),(G e4 ,0)), where S t4 This is a key operating characteristic of the drag combustion mode, S w4 It is a key operational feature for switching modes, G e4 This is a key operating characteristic of the stable power generation mode. When the decision function output value is +1, the free piston linear power generation system is in the drag combustion mode; when the decision function output value is -1, the system is in the switching mode; when the decision function output value is 0, the system is in the stable power generation mode.
[0141] S5.2 To achieve data classification, a feature space F is defined, where the data is determined by a kernel function. Generated through inner product, This is a nonlinear mapping function that maps input spatial data to a high-dimensional feature space. This is achieved by constructing a hyperplane in the feature space F. The hyperplane divides the feature data into three classes and finds a hyperplane decision function f(x,ω)=sign(h(x,ω)) such that the output of the hyperplane decision function satisfies equation (17):
[0142]
[0143] Where: p = (1,2,…l); l is the total number of sample data; l1 is the total number of sample data for the drag combustion mode after S4 processing; l2 is the total number of sample data for the switching mode after S4 processing; l-l1-l2 is the total number of sample data for the stable power generation mode after S4 processing.
[0144] S5.3. To ensure the hyperplane has correct and effective data classification capabilities, the optimal classification hyperplane must be maximally distanced from the nearest sample point. This problem ultimately transforms into a quadratic programming optimization problem under specific constraints, namely:
[0145]
[0146] The constraints are:
[0147]
[0148] Where: slack variable l 12 = l1+l2; ω,b are the coefficients under the hyperplane; C>0,D>O are the weighting parameters for balancing classification errors.
[0149] The training data is input into the SVM classification model for classification learning to obtain the pattern recognition model of the free piston linear power generation system. Finally, the remaining test set data is used to test the prediction effect of the prediction model and optimize parameters such as kernel function and kernel scale to establish the final SVM operation state classification model of the free piston linear power generation system, which specifically includes the drag combustion model, the switching model and the stable power generation model.
[0150] S6. The predicted data is obtained by time series prediction based on the Long Short-Term Memory Network (LSTM). The predicted data is then input into the trained SVM classifier to obtain the operating status of the free piston linear power generation system.
[0151] Specifically, free-piston linear generator systems face complex and variable operating environments in actual operation, and their operating parameters often exhibit strong nonlinear and stochastic characteristics, making them difficult to predict using conventional methods. LSTM neural networks possess strong time-series data prediction performance and nonlinear processing capabilities; the construction steps of an LSTM neural network model are as follows:
[0152] S6.1, The LSTM neural network can store four states, namely the current value and the previous value of the output, the current value and the previous value of the memory state vector. The hidden layer of the LSTM neural network includes a forget gate to determine the forgetting ratio of the information in the previous memory unit, a proportional input gate to determine the input ratio of the current information into the memory unit, a proportional output gate to determine the input ratio of the information into the hidden layer, and a memory unit; as shown in Equation (20);
[0153]
[0154] In the formula, x t m t K t KK t P t R t S t Let W represent the network's input variables at time t, the parameter states of the hidden layers, the parameter states of the memory units during network transmission, the parameter states of the intermediate temporary memory units during network transmission, the input gate, the output gate, and the forget gate, respectively. sigmoid and tanh are the activation functions; xf With W hf These are the weight matrices from the input layer and hidden layer to the forget gate, respectively; W xi With W hi These are the input layer and hidden layer weight matrices to the input gate, respectively; W xo With W ho These are the weight matrices from the input layer and hidden layer to the output gate, respectively; W xc With W hc These are the weight matrices from the input layer and hidden layer to the memory unit, respectively; b f b i b o With b c These are the bias vectors for the four states of the network;
[0155] S6.2 Taking the establishment of an LSTM neural network model under a stable power generation mode as an example, the time series value of the stable power generation mode itself is used as the input of the LSTM neural network model, and the running data of the stable power generation mode at the next time step is used as the output. Then, the LSTM model parameters are initialized, and the grid search method is used to optimize the time step, hidden layer nodes, learning rate, and batch size parameters of the LSTM neural network model; then the training of the LSTM model begins.
[0156] After the LSTM neural network model is established in S6.3, when the sensor collects new operating parameter data and it is preprocessed, the LSTM neural network model can generate predicted data of the system operating parameters. The predicted data is then fed into the trained SVM classifier to predict the operating status of the free piston linear power generation system.
[0157] Long Short-Term Memory (LSTM) networks are a special variant of RNNs with a "gate" structure. The logic control of the gate units determines whether data is updated or discarded. This overcomes the shortcomings of RNNs, such as excessive influence of weights and easy gradient vanishing and exploding. The LSTM network can converge better and faster, and can effectively improve prediction accuracy.
[0158] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
Claims
1. A method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection, characterized in that, include: Thermodynamic and kinematic parameters are acquired through a sensor module, and these parameters are labeled. Gaussian filtering was used to preprocess the thermodynamic and kinematic parameters; Eliminating systematic errors and repairing missing data based on virtual in-situ calibration methods; Thermodynamic and kinematic features are extracted using the ReliefF algorithm, and key thermodynamic and kinematic features are used to train an SVM classifier. The time-series prediction based on the Long Short-Term Memory (LSTM) network is used to obtain the prediction data. The prediction data is then input into a trained SVM classifier to obtain the operating status of the free piston linear power generation system. The sensor module includes a throttle position sensor, a displacement sensor, an air-fuel ratio sensor, an intake / exhaust temperature sensor, an air flow meter, an in-cylinder pressure sensor, an intake / exhaust pressure sensor, and a scavenging box pressure sensor, used to acquire thermodynamic and kinematic parameters, specifically including the throttle opening that drives the combustion process. K st1 Piston displacement X tst1 fuel air-fuel ratio AFR st1 Intake air temperature T inst1 Exhaust temperature T outst1 airflow Q st1 Cylinder pressure P st1 Intake pressure P inst1 Exhaust pressure P outst1 and scavenging chamber pressure P sst1 , marked as dataset S t1 Throttle opening during the switching process K tsw1 Piston displacement X sw1 fuel air-fuel ratio AFR sw1 Intake air temperature T insw1 Exhaust temperature T outsw1 airflow Q sw1 Cylinder pressure P sw1 Intake pressure P insw1 Exhaust pressure P outsw1 and scavenging chamber pressure P ssw1 , marked as dataset S w1 Throttle opening during stable power generation process K tge1 Piston displacement X ge1 fuel air-fuel ratio AFR ge1 Intake air temperature T inge1 Exhaust temperature T outge1 airflow Q ge1 Cylinder pressure P ge1 Intake pressure P inge1 Exhaust pressure P outge1 and scavenging chamber pressure P sge1 , marked as dataset G e1 ; The dataset after Gaussian filtering is denoted as dataset. S t2 , S w2 , G e2 ; The virtual in-situ calibration method is used to eliminate system errors and repair missing data. Specifically, the working conditions of the free piston linear power generation system are divided into three calibration regions: the drag combustion process, the switching process, and the stable power generation process. This ensures that the sensors to be calibrated in each calibration region form a closed loop in the mathematical model. in, K tst2 , X st2 , AFR st2 , T inst2 , T outst2 , Q st2 , P st2 , P inst2 , P outst2 and P sst2 This is the first calibration area; K tsw2 , X sw2 , AFR sw2 , T insw2 , T outsw2 , Q sw2 , P sw2 , P insw2 , P outsw2 and P ssw2 This is the second calibration area; K tge2 , X ge2 , AFR ge2 , T inge2 , T outge2 , Q ge2 , P ge2 , P inge2 , P outge2 and P sge2 This is the third calibration area; calibrate each of these three calibration areas sequentially. Establish multiple sets of periodic quasi-steady-state measurements of various sensors in the free piston linear power generation system: Perform periodic quasi-steady-state processing on the data of three operating conditions: drag combustion, state switching, and stable power generation, and align the time stamps; For different operating states of each sensor, select 3-5 times the total number of data from each sensor for each operating state to obtain multiple sets of periodic quasi-steady-state data; Establish the correction function, reference function, and target function for the sensor to be calibrated; The offset constant of each sensor for each region requiring calibration is obtained based on Bayesian inference and the Monte Carlo Markov chain method. The sensor is corrected using the obtained sensor offset constant.
2. The method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection as described in claim 1, characterized in that, Establish the correction function, reference function, and target function of the sensor to be calibrated, specifically as follows: The sensor measurement values are corrected by adding an offset constant; the specific formula is as follows: Sensor measurement value correction function: (5) Driving the cylinder pressure during combustion: (6) In formula (5) g(x) For correction functions, I These are the original measurements from the sensor. x k For the first k The offset constant of each measurement value I c This is the corrected value after adjustment; In formula (6) P 1c To adjust the cylinder pressure during the combustion process, P 1 The sensor readings are used to measure the cylinder pressure during the combustion process. x 1 The offset constant of the sensor that drives the cylinder pressure during the combustion process; Sensor measurement reference function: I b =f(I c1 ,I c2 ,…,I cn (7) In formula (7) f(x) The reference function representing the free piston linear power generation system, x This is the sensor's offset constant. I ci This is the correction value for the sensor. n For the number of sensors, I b This is the reference value for the sensor; Find a set of parameters using an autoencoder To minimize the reconstruction loss between the correction value and the reference value of the sensor in the free piston linear power generation system, the self-encoder is implemented through an AE neural network, which includes an input layer, a hidden layer, and an output layer. The part from the input layer to the hidden layer is called the encoder, which is represented by equation (8); the part from the hidden layer to the output layer is called the decoder, which is represented by equation (9). (8) (9) In the formula I b For the input sample data, W and The weight matrix, b and For the bias value, z and g For activation function, h For encoded output, For the decoded output, the objective function of AE is defined as follows: (10) In the formula I bi For the first The reference value of each sensor, No. i The correction value output by each decoder. N The number of baseline outputs in the objective function; For each region requiring calibration, an objective function is established. By minimizing the objective function for data repair—that is, minimizing the difference between the corrected value and the reference value—the sensor is calibrated. The formula is as follows: (11) In the formula D(x) The objective function for data repair.
3. The method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection according to claim 2, characterized in that, The sensor offset constant for each region requiring calibration is obtained based on Bayesian inference and the Monte Carlo Markov chain method, specifically: Multiple sets of periodic quasi-steady-state data are substituted into the objective function; Calibration based on Bayes' theorem: The posterior distribution is obtained through the prior distribution and likelihood function of the data. Bayes' theorem is then used to calculate the data information collected by the sensors in the free piston linear generator system; when the objective function... D(x) When the value of is at its minimum, that is, when the likelihood function reaches its maximum value, the posterior distribution has the highest probability; at this point, the accurate offset constant is obtained, and the sensor calibration is completed; the specific formula is as follows: Bayes' theorem: (12) Likelihood function: (13) In the formula x This is the sensor's offset constant. The prior distribution of the sensor offset constant; The variance of the sensor's reference value; The median of a series of offset constants obtained through sampling that minimize the objective function is defined as the sensor offset constant. x The sensor is corrected using a correction function. (14) in the formula I The sensor's measured value; The dataset after removing systematic errors using the virtual in-situ calibration method is denoted as dataset . S t3 , S w3 , G e3 .
4. The method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection according to claim 3, characterized in that, Thermodynamic and kinematic features are extracted using the ReliefF algorithm, specifically: Set dataset S t3 , S w3 , G e3 The feature weights of all subsets are 0. A sample is randomly drawn from the training set. R ; In the sample R Find the same type of sample set R of K Nearest neighbor samples j=1,2,…,K, from the sample R Find different types of samples K Nearest neighbor samples M j (C) ; Update the weights of each sensor parameter. The weight update formula is: (15) in: m Indicates the number of times the sample was taken; M j (C) Indicate different categories C The first in j The nearest neighbor samples; P(C) express C The proportion of the target class samples to the total number of samples; class(R i ) express R i Category; Function diff(A,R i ,R j ) For sample instances R i and R j Regarding a certain feature A Distance between: (16) Repeat the above steps, selecting different samples each time, to obtain the weight of each feature; The top N1 dimensions of data with the largest weights are selected as the feature subset for training the SVM classifier. This feature subset is denoted as... S t4 , S w4 , G e4 .
5. The method for estimating the operating state of a free piston linear power generation system based on time-series prediction and feature selection according to claim 1, characterized in that, The construction steps based on the Long Short-Term Memory (LSTM) network are as follows: The LSTM neural network stores four states, namely the current value and the previous value of the output, the current value and the previous value of the memory state vector; the hidden layer of the LSTM neural network includes a forget gate to determine the forgetting ratio of the information in the previous memory unit, an input gate to determine the ratio of the current information input into the memory unit, an output gate to determine the ratio of information input into the hidden layer, and a memory unit, as shown in Equation (20); (20) In the formula, x t , m t , K t , KK t , P t , R t , S t Let represent the input variables of the network at time t, the parameter states of the hidden layers of the network, the parameter states of the memory units during network transmission, the parameter states of the intermediate temporary memory units during network transmission, the input gate, the output gate, and the forget gate, respectively. sigmoid and tanh are activation functions. W xf and W hf These are the weight matrices from the input layer and the hidden layer to the forget gate, respectively. W xi and W hi These are the weight matrices from the input layer and the hidden layer to the input gate, respectively. W xo and W ho These are the weight matrices from the input layer and the hidden layer to the output gate, respectively. W xc and W hc These are the weight matrices from the input layer and the hidden layer to the memory unit, respectively. b f , b i , b o and b c These are the bias vectors for the four states of the network.