A method for constructing a PID parameter self-tuning model of a nitrogen-oxygen sensor for a vehicle

By combining fuzzy neural networks and genetic algorithms to optimize PID parameters, a self-tuning model for PID parameters of automotive nitrogen oxide sensors was constructed, solving the problem of poor parameter adjustment in traditional methods and achieving high-precision and fast control effects.

CN115963718BActive Publication Date: 2025-11-04HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211473175.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-11-04
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

In the existing technology, the PID control parameters of domestically produced automotive nitrogen oxide sensors are difficult to adjust precisely, resulting in poor control performance. Furthermore, traditional methods such as BP neural networks are prone to getting stuck in local optima and gradient vanishing, making it difficult to achieve stable control with high precision and high response speed.

Method used

By combining fuzzy neural networks and genetic algorithms, the initial structure of PID parameters is optimized through an iterative process of coarse and fine tuning. The network parameters are then updated using a loss function and backpropagation to construct a self-tuning model for the PID parameters of an automotive nitrogen oxide sensor.

Benefits of technology

Stable and high-precision control of the nitrogen and oxygen sensor pump unit was achieved, avoiding local optima and gradient vanishing, simplifying the algorithm and improving the control effect, making it suitable for engineering practice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115963718B_ABST
    Figure CN115963718B_ABST
Patent Text Reader

Abstract

The application belongs to the field of automobile exhaust sensing detection, and particularly relates to a construction method of a PID parameter self-tuning model of a nitrogen oxygen sensor for vehicles, comprising: for a three-chamber nitrogen oxygen sensor, a fuzzy neural network is combined with a genetic algorithm to optimize a structure initial value problem existing in the network itself, a reasonable structure initial value can be given to the fuzzy neural network, local optimization and gradient disappearance of the network are avoided, in addition, the combination is specifically divided into coarse adjustment and fine adjustment, the coarse adjustment only updates initial structure parameters through the genetic algorithm, the fine adjustment continues to update parameters through back propagation on the basis of the initial structure parameters after coarse optimization of the genetic algorithm, compared with updating parameters through back propagation while using the genetic algorithm, time consumption of the optimization process can be reduced, the algorithm can be simplified, and application and transplantation in engineering practice are more convenient. Therefore, the application can be used for accurately and quickly obtaining PID parameters, and realizing high-precision control of the nitrogen oxygen sensor.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of automobile exhaust sensing detection, and more particularly to a construction method of a PID parameter self-tuning model of a vehicle nitrogen oxide sensor. BACKGROUND

[0002] From the national five, national six and the latest exhaust emission standards in Europe, it can be seen that the world gradually increases the detection of emissions, and the detection of nitrogen oxides is increasingly stringent. In recent years, the domestic high-performance vehicle nitrogen oxide sensor has made great progress in manufacturing, but the control effect of the sensor in actual application is not good, and the overall performance of the sensor needs to be improved.

[0003] From the principle of the domestic vehicle three-chamber nitrogen oxide sensor, it can be known that the chambers in the ceramic chip are mutually conductive, and the relationship between the variables is not independent. When one input in the control loop changes, in addition to the adjustment of its own control loop, the control of other chambers will also be affected. For this coupled nonlinear system, the inverse system method is usually used, based on the controlled object model, the integral inverse system model of the controlled object is obtained by a certain method, the object is compensated to a system with linear transfer relationship, and then the diagonal matrix method, state variable method and inverse Nyquist matrix method of linear system are used to realize decoupling. Finally, a control strategy is established for each controlled variable. However, this decoupling control process is not only complex in theory, but also difficult to apply to actual controller design.

[0004] Therefore, for this three-chamber coupled nitrogen oxide sensor, the current actual control method still uses the traditional three-way PID. The traditional PID control has been widely used in industrial control due to its simple algorithm, high reliability and easy implementation, but for the three-chamber coupled nitrogen oxide sensor nonlinear system, the parameters of the PID control are mostly obtained by experience in engineering, which is difficult to guarantee high precision and high response speed, and the overall control effect is not good. In addition, there are also BP neural networks for PID self-tuning for this sensor, but the selection of the initial structure parameters of the network is ignored, which easily makes the network fall into local optimum and gradient disappearance, and the control effect is unstable. SUMMARY

[0005] In view of the defects and improvement needs of the prior art, the application provides a construction method of a PID parameter self-tuning model of a vehicle nitrogen oxide sensor, which aims to find the initial structure parameters of the neural network for PID parameter tuning to avoid the problems of local optimum and gradient disappearance of the neural network, and to realize stable and high-precision control of the pump unit of the vehicle nitrogen oxide sensor.

[0006] To achieve the above object, according to one aspect of the present application, a method for constructing a PID parameter self-tuning model of a vehicle nitrogen oxide sensor is provided, comprising:

[0007] S1, encoding and randomly assigning initial structure parameters of a fuzzy neural network to initialize a population of a genetic algorithm;

[0008] S2, decoding each individual in the population to establish a corresponding fuzzy neural network; controlling each fuzzy neural network to iteratively perform fuzzy reasoning, calculating the fitness value of the population individual corresponding to the fuzzy neural network based on the loss function value after each iteration of fuzzy reasoning; according to the fitness value of each population individual, selection, crossover and mutation of the genetic algorithm are performed to obtain the next generation population; wherein the input of the fuzzy neural network is the deviation of each check quantity of the vehicle nitrogen oxide sensor from the corresponding theoretical value, and the output is the PID parameter, which is used to input a PID controller to calculate the control quantity of the vehicle nitrogen oxide sensor, and the vehicle nitrogen oxide sensor detects nitrogen oxide under the control of the control quantity, and the loss function is the weighted sum of the deviation of each check quantity of the vehicle nitrogen oxide sensor from the corresponding theoretical value;

[0009] S3, repeating S2 until the genetic algorithm termination condition is reached to obtain a population after rough optimization by the genetic algorithm, which contains an individual, and decoding the individual to obtain a fuzzy neural network;

[0010] S4, controlling the fuzzy neural network finally obtained in S3 to iteratively perform fuzzy reasoning, and updating the network initial structure parameters after each iteration using the loss function until the iteration termination condition is reached to obtain the network initial structure parameters after fine optimization, and the construction of the PID parameter self-tuning model of the vehicle nitrogen oxide sensor is completed.

[0011] Further, the vehicle nitrogen oxide sensor is a three-chamber nitrogen oxide sensor, and the loss function used is:

[0012]

[0013] Wherein, L is the loss function value, k1, k2, k3, k4, k5, k6 are the weight values of each term, and satisfy k1+k2+k3+k4+k5+k6=1, E Ip1 is the deviation of the second chamber pump current I p1 theoretical value and actual value, E V1 is the deviation of the Nernst voltage V1 on the second chamber pump unit between the theoretical value and the actual value, E V2 is the deviation of the Nernst voltage V2 on the third chamber pump unit between the theoretical value and the actual value, is the change rate of E Ip1 is the change rate of E V1 ​​For E V2 The initial value of each actual value is 0 in the first iteration, And The initial value of each actual value is 1, and in subsequent iterations, the actual value is obtained by inputting the PID parameter output by the fuzzy neural network after the current iteration into the PID controller, and the PID controller calculates the input voltage of the vehicle nitrogen oxide sensor to measure the output V1 and V2 are the corresponding actual values for calculating the loss function value.

[0014] Further, the value of k1 is greater than the values of k2, k3, k4, k5 and k6.

[0015] Further, the fitness value of each population individual is calculated by taking the average of the sum of squares of the loss function values of the corresponding fuzzy neural network after each iteration of fuzzy reasoning as the fitness value of the population individual.

[0016] Further, the number of iterations of fuzzy reasoning performed by each fuzzy neural network in step S2 is the same as the number of iterations of fuzzy reasoning performed by the fuzzy neural network in step S4.

[0017] The beneficial effect is that the same number of iterations can ensure that the model object of each optimization of the genetic algorithm is the same, which helps to find the optimal value.

[0018] The application also provides a vehicle nitrogen oxide sensor PID parameter self-tuning method, comprising: controlling a vehicle nitrogen oxide sensor PID parameter self-tuning model constructed by the construction method of a vehicle nitrogen oxide sensor PID parameter self-tuning model, iteratively performing fuzzy reasoning, updating the structure parameters using the loss function after each iteration, until the iteration termination condition is reached, obtaining the optimized PID parameters, and completing the vehicle nitrogen oxide sensor PID parameter self-tuning.

[0019] Wherein, the input of the vehicle nitrogen oxide sensor PID parameter self-tuning model is the deviation of each inspection value of the vehicle nitrogen oxide sensor from the corresponding theoretical value, and the output is the PID parameter, which is used to input the PID controller to calculate the control amount of the vehicle nitrogen oxide sensor, the vehicle nitrogen oxide sensor performs vehicle nitrogen oxide detection under the control of the control amount, and the loss function is the weighted sum of the deviations of each inspection value of the vehicle nitrogen oxide sensor from the corresponding theoretical value.

[0020] Further, the number of iterations of fuzzy reasoning is the same as the number of iterations of fuzzy reasoning performed by the fuzzy neural network in the construction method.

[0021] The beneficial effect is that the same number of iterations ensures that the optimal value found by the genetic algorithm is applied to the same model structure.

[0022] The application further provides a control method of the nitrogen oxygen sensor pump unit for vehicles, which adopts the PID parameters obtained by the self-tuning method of the PID parameters of the nitrogen oxygen sensor for vehicles to control the nitrogen oxygen sensor pump unit for vehicles.

[0023] The application further provides a computer readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls a device where the storage medium is located to perform the construction method of the self-tuning model of the PID parameters of the nitrogen oxygen sensor for vehicles, the control method of the nitrogen oxygen sensor pump unit for vehicles and / or the control method of the nitrogen oxygen sensor pump unit for vehicles.

[0024] Overall, the above technical solutions conceived by the application can achieve the following beneficial effects:

[0025] (1) The application adopts the combination of fuzzy neural network and genetic algorithm to optimize the structure initial value problem existing in the network itself, which can give the fuzzy neural network a reasonable structure initial value w, sigma and c, and avoid the local optimum and gradient disappearance of the network. In addition, the specific combination method is divided into coarse adjustment and fine adjustment. The coarse adjustment process is to update the initial structure parameters by combining the genetic algorithm with the fuzzy neural network containing only forward propagation, multiple combination iterations, to obtain the initial structure parameters after coarse optimization. The fine adjustment process is to continue to update the parameters by back propagation based on the initial structure parameters after coarse optimization, multiple back propagation iterations, to obtain the final structure initial parameters. Compared with the one-step optimization of updating the parameters by back propagation while using the genetic algorithm and the method of first optimizing the genetic algorithm alone and then adding it to the fuzzy neural network, this specific combination method not only allows the optimal parameters found by the genetic algorithm each time to adapt to the fuzzy neural network, but also quickly finds the optimal value in the initial structure parameters adapted to the fuzzy neural network, reduces the time consumption of the optimization process, and simplifies the algorithm, making it more convenient to apply and transplant in engineering practice. Therefore, the method of the application can be used to accurately and quickly self-tune to obtain the optimal parameters of PID adjustment, and realize stable and high-precision control of the nitrogen oxygen sensor pump unit. Therefore, the method of the application can be used to accurately and quickly obtain the optimal parameters of PID adjustment, and realize stable and high-precision control of the nitrogen oxygen sensor pump unit.

[0026] (2) According to the nitrogen oxygen sensor principle of the three-chamber mutual coupling of the nitrogen oxygen sensor for vehicles, the bias change rate is added to the loss function of the back propagation, which relieves the wear of the sensor device caused by the too large change of the PID parameters. At the same time, the selection strategy of the parameter weight in the loss function is given, which improves the control effect. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 A flow chart of a construction method of a PID parameter self-tuning model of a vehicle nitrogen oxide sensor is provided for an embodiment of the present application.

[0028] Figure 2 A schematic diagram of a vehicle nitrogen oxide sensor system is provided for an embodiment of the present application.

[0029] Figure 3 A flow chart of a genetic algorithm is provided for an embodiment of the present application.

[0030] Figure 4 A flow chart of a fuzzy neural network control of a vehicle nitrogen oxide sensor is provided for an embodiment of the present application.

[0031] Figure 5 An internal structure diagram of a fuzzy neural network is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0033] Embodiment one

[0034] A construction method of a PID parameter self-tuning model of a vehicle nitrogen oxide sensor, as shown in Figure 1 , comprises:

[0035] S1, the initial structure parameters of the fuzzy neural network are encoded and randomly assigned to initialize the population of the genetic algorithm;

[0036] S2, decode each individual in the population, establish the corresponding fuzzy neural network; control each fuzzy neural network to iteratively perform fuzzy reasoning, calculate the fitness value of the population individual corresponding to the fuzzy neural network based on the loss function value after each iteration of fuzzy reasoning; according to the fitness value of each population individual, selection, crossover and mutation of the genetic algorithm are carried out to obtain the next generation population; wherein the input of the fuzzy neural network is the deviation of each check quantity of the vehicle nitrogen oxide sensor and the corresponding theoretical value, and the output is the PID parameter, which is used to input the PID controller to calculate the control quantity of the vehicle nitrogen oxide sensor, the vehicle nitrogen oxide sensor detects the vehicle nitrogen oxide under the control of the control quantity, and the loss function is the weighted sum of the deviation of each check quantity of the vehicle nitrogen oxide sensor and the corresponding theoretical value;

[0037] S3, repeat S2 until the genetic algorithm termination condition is reached, and obtain a population after rough optimization by the genetic algorithm, the population containing an individual, and the individual is decoded to obtain a fuzzy neural network;

[0038] S4, control the fuzzy neural network finally obtained in S3 to iteratively perform fuzzy reasoning, update the initial structure parameters of the network after each iteration using a loss function, until an iteration termination condition is reached, obtain the initial structure parameters of the network after fine optimization, and complete construction of the PID parameter self-tuning model of the vehicle nitrogen oxygen sensor.

[0039] The present application is aimed at a three-chamber nitrogen oxygen sensor, and a fuzzy neural network combined with a genetic algorithm is used to optimize the initial structure of the network, so that a reasonable initial structure w, sigma and c of the fuzzy neural network is obtained, the local optimum and gradient disappearance of the network are avoided, and the initial structure parameters are updated by the genetic algorithm in the rough adjustment, and the initial structure parameters are further updated by back propagation in the fine adjustment. Compared with the one-step optimization by the genetic algorithm and back propagation, and the method of first optimizing the initial structure parameters by the genetic algorithm and then adding the initial structure parameters to the fuzzy neural network, the present application can adapt the optimal parameters found by the genetic algorithm to the fuzzy neural network, find the optimal value in the initial structure parameters of the fuzzy neural network more quickly, reduce the time consumption of the optimization process, simplify the algorithm, and be more convenient for application and transplantation in engineering practice. Therefore, the present application can be used to accurately and quickly obtain the optimal parameters of the PID regulation, and realize high-precision control of the pump unit of the nitrogen oxygen sensor.

[0040] Figure 2 The nitrogen oxygen sensor is shown in the schematic diagram, and as shown in the diagram, V p0 , V p1 , V p2 are the pump voltages of the first chamber, the second chamber and the third chamber respectively. p1 is the pump current of the second chamber. p0 V1 and V2 are the Nernst voltages on the pump units of the second chamber and the third chamber. In the control process of the nitrogen oxygen sensor, preferably, the pump voltage V p1Stable at 25 μA, the current size indicates that most of the oxygen in the exhaust gas has been pumped out in the first chamber. In this way, the atmosphere can be stably diffused into the second chamber; preferably, the pump voltage V is adjusted p1 , enabling the Nernst voltage V1 to be stabilized at 430 mV, which indicates that the oxygen content is extremely low at this time, and nitrogen oxides begin to decompose; preferably, the pump voltage V is adjusted p2 , enabling the Nernst voltage V2 to be stabilized at 440 mV, which indicates that the oxygen content is further reduced, and oxygen for decomposing nitrogen oxides in the third chamber is pumped out. The method of this embodiment can be used for a nitrogen oxide sensor with a PID control strategy, and in actual control, a set of optimal PID parameters (such as in Embodiment 2) are adaptively and accurately and quickly given, i.e., K P , K i , K d , and the PID parameters are used to control the nitrogen oxide sensor V1 and V2 are kept at the values of stable operation (such as in Embodiment 3).

[0041] Specifically, for coarse adjustment, first, the initial values w, σ, and c of the fuzzy neural network structure to be optimized are encoded, and the genes of each individual are randomly assigned values, and the population is initialized. Then, a separate fuzzy neural network is established for the individual, and the w, σ, and c decoded from the individual are applied to the fuzzy neural network. Then, the deviation of the collected value of the automotive nitrogen oxide sensor from the theoretical value is input into the network for fuzzy reasoning. After fuzzy reasoning by the fuzzy neural network, a set of PID parameter values are obtained, and the parameter values are input into the PID controller to output the voltage V p0 , V p1 , V p2 , where V p0 is the pump voltage applied to the first pump unit, V p1 is the pump voltage applied to the second pump unit, and V p2 is the pump voltage applied to the second pump unit. By measuring the actual working I p0 , V1, and V2 of the sensor, and then comparing them with the theoretical values V1 = 430 mV and V2 = 440 mV, the deviation of the collected value of the automotive nitrogen oxide sensor from the theoretical value is updated. The updated values are used to calculate the error on the one hand, and on the other hand, these values are the input values for the next fuzzy reasoning. After the number of iterations of the network is reached, the fitness values of the population individuals corresponding to the fuzzy neural network are calculated based on the loss function values after each iteration of fuzzy reasoning, and preferably, the fitness calculation formula is the average of the sum of the squares of the loss function values. Then, each individual is selected, crossed, and mutated according to the fitness, to obtain the next generation population, and then the genetic algorithm is iterated until the iteration of the genetic algorithm is completed, and a set of initial values w, σ, and c of the fuzzy neural network structure for coarse adjustment are output.

[0042] Figure 3 This is a flowchart of a genetic algorithm. The algorithm inputs w, σ, and c are parameters of a fuzzy neural network. The inputs are encoded into genes, and each individual (chromosome) composed of the encoding is considered a solution. Several individuals form a population. Initially, individual encodings are randomly generated. During each round of reproduction, each individual is evaluated. Individuals with high fitness are more likely to be inherited, and selection, crossover, and mutation occur during the genetic process. For the selection phenomenon, a roulette wheel selection method is preferred. Let the fitness function of individual x be F(x), and the population size be N. Then the probability that an individual has been passed on to the next generation is: The aforementioned crossover phenomenon, preferably, involves obtaining the crossover probability based on fitness and the number of iterations. Where f' is the maximum fitness value among the individuals to be crossed, f max f is the maximum fitness value in the population. avg The average fitness value of the population. Preferably, the mutation probability is obtained based on the fitness value and the number of iterations. Where f is the fitness value of the mutated individual. Through continuous iteration in this way, the population gradually evolves, eventually approaching the global optimum, and thus obtaining suitable initial values ​​for the fuzzy neural network structure.

[0043] For fine-tuning, a fuzzy neural network is established based on the initial values ​​w, σ, and c of coarse-tuning. Then, the same fuzzy inference is performed, and the error is calculated using the loss function. However, backpropagation is then added. Through backpropagation, w, σ, and c can be continuously updated in the simulation. After reaching the required number of simulation steps, the optimal w, σ, and c can be output. At this point, the number of simulation steps should be consistent with the number of simulation steps for coarse-tuning.

[0044] Then, the optimal output w, σ, and c can be used as the initial structural parameters to construct a fuzzy neural network. Finally, the constructed fuzzy neural network is used to realize the self-tuning process of PID, as in Example 2.

[0045] like Figure 4 The diagram illustrates the control flow of the nitrogen and oxygen sensor and the role of this embodiment in the control process. set Indicate I p1 The theoretical values ​​of V1 and V2, i.e., I p1 The voltage is 25 μA, V1 is 430 mV, and V2 is 440 mV. out for The actual output values ​​of V1 and V2 are measured and then negatively fed back to the input to obtain the deviation E. Ip1 E V1 E V2 and the rate of change of deviation The diagram is simply represented by E and E.C E, E C are sent to the fuzzy neural network, and the optimal PID parameter values, i.e., k p , k i , and k d , are output after training and iteration. The three parameters are used by the PID controller to calculate the voltage actually required to be applied to the sensor and to act on the sensor.

[0046] In this embodiment, a genetic algorithm is added before the fuzzy neural network. Through coarse adjustment and fine adjustment, a reasonable initial structure value is given to the fuzzy neural network, so that the fuzzy neural network can determine better PID parameters, and the problems of local optimization and gradient disappearance of the neural network are avoided.

[0047] Preferably, the nitrogen oxygen sensor for vehicles is a three-chamber nitrogen oxygen sensor, and the loss function used is:

[0048]

[0049] wherein L is the loss function value, k1, k2, k3, k4, k5, and k6 are weight values of each term, and satisfy k1+k2+k3+k4+k5+k6=1, E Ip1 is the deviation of the second chamber pump current theoretical value and the actual value, E V1 is the deviation of the Nernst voltage V1 theoretical value and the actual value on the second chamber pump unit, E V2 is the deviation of the Nernst voltage V2 theoretical value and the actual value on the third chamber pump unit, is the deviation of the second chamber pump current rate, is the deviation rate of the Nernst voltage V1 on the second chamber pump unit, is the deviation rate of the Nernst voltage V2 on the third chamber pump unit; in the first iteration, each actual value is 0, and the initial value of each actual value is 1. In subsequent iterations, the actual values are obtained as follows: the PID parameters output by the fuzzy neural network after the current iteration are input into the PID controller, the input voltage for inputting the nitrogen oxygen sensor for vehicles is calculated by the PID controller, and the output V1 and V2 of the nitrogen oxygen sensor for vehicles are measured as the corresponding actual values for calculating the loss function value.

[0050] That is, the loss function considers the deviations E Ip1 , E V1 , and E V2 ​During the iteration process, it is easy for the control quantity to change too much and lack transition, which can cause significant wear and tear on the device in practical applications. Therefore, the rate of change of the deviation should be controlled. That was also taken into consideration.

[0051] The specific input to the fuzzy neural network is E. Ip1 E V1 E V2 , The fuzzy neural network, based on the Mamdani model, combines a neural network with a fuzzy control algorithm. The forward propagation process of this network is equivalent to the computation process of the fuzzy algorithm, while the backpropagation process enables the fuzzy control to achieve adaptive learning capabilities, ultimately realizing parameter adaptation for PID control. The forward propagation requires a total of five layers: an input layer, a membership function layer, a fuzzy inference layer, a membership normalization layer, and an output layer. In this network, let I be the input of each layer, O be the output of each layer, and v... (k) Let k be the induced local domain, where k = 2, 3, 4, 5, and ω is the connection weight between the fourth and fifth layers.

[0052] The input layer is the first layer. Each neuron in this layer is directly connected to the input variable, and it serves to pass the input to the next layer. Let the input vector be X = [x1, x2, x3, x4, x5, x6]. T x1 is E Ip1 x2 is E V1 x3 is E V2 x4 is x5 is x6 is Where E Ip1 For the second chamber current The deviation between theoretical and actual values, E V1 E represents the deviation between the theoretical and actual values ​​of the second chamber voltage V1. V2 The deviation between the theoretical and actual values ​​of the third chamber voltage V2. For the second chamber current rate of change of deviation The rate of change of the voltage deviation V1 in the second chamber. E is the rate of change of the voltage deviation V2 in the third chamber, where E Ip1 E V1 E V2 The initial value V1, V2, The initial value of each is 1.

[0053]

[0054]

[0055] The membership function layer is the second layer, each neuron of which represents a fuzzy subset. In order to facilitate derivation, the neuron's excitation function adopts a Gaussian function, i.e. a membership function, and the fuzzification is completed in this layer to calculate the membership degree of each fuzzy subset corresponding to the linguistic variable. The input of this layer is:

[0056]

[0057] The induced local domain is:

[0058]

[0059] c ij and σ ij respectively represent the center and width of the membership function of the jth fuzzy set of the ith input variable, and are also the parameters to be updated in the network training process. The output of this layer is:

[0060]

[0061] The fuzzy reasoning layer is the third layer, each neuron of which represents a fuzzy rule. The antecedent is matched based on the Mamdani model to calculate the membership degree of each rule. Let α l be the membership degree of the corresponding rule, the input, induced local domain and output of this layer are:

[0062]

[0063]

[0064]

[0065] The membership degree normalization layer is the fourth layer, which normalizes the membership degree of each rule. Let m be the total number of fuzzy rules, be the normalized membership degree value. The input, induced local domain and output of this layer are:

[0066]

[0067]

[0068]

[0069] The output layer is the fifth layer, which realizes defuzzification calculation, and its output is the parameters K p , K i and K d required for PID regulation. w is the parameter to be updated in the network training process, and the input, induced local domain and output of this layer are:

[0070]

[0071]

[0072]

[0073] The backpropagation part calculates the local gradient layer by layer using a defined loss function, and then uses gradient descent to correct the parameter weights.

[0074] The aforementioned layer-by-layer calculation of local gradients is characterized by updating parameters. Taking the fifth layer as an example, let the gradient be... The calculation formula is:

[0075]

[0076] The parameter update formula is as follows:

[0077]

[0078]

[0079]

[0080] Where λ is the momentum factor, used to increase the learning speed. Using the above method, the inputs are the deviation and the rate of change of the deviation, and the outputs are the PID parameters, K. P K i K d .

[0081] like Figure 5 The diagram shows the internal structure of a fuzzy neural network, which has a total of five layers. The first layer is the input layer, with the input variable being E. Ip1 E V1 E V2 , The diagram is simply represented by x1…x n E Ip1 E V1 E V2 The initial value V1, V2, The initial values ​​of all are 1; the second layer is the membership function layer, and the output of this layer is... It represents the output of the i-th input variable after the m1-th fuzzy set operation; the third layer is the fuzzy inference layer, and the output of this layer is α. l This represents the membership degree of the corresponding rule on the l-th neuron; the fourth layer is the membership degree normalization layer, and its output is... It represents the normalized membership value on the l-th neuron; the fifth layer is the output layer, and its output is the three parameters k of the PID.p , k i , k d , wherein w rm is the coefficient of the rth neuron to the mth output neuron, which is updated during the back propagation process.

[0082] Preferably, because the change of k1 can reflect the control effect of the first pump unit, the second pump unit, in order to realize the priority control of the first pump unit, the value of k1 is greater than the values of k2, k3, k4, k5 and k6.

[0083] Embodiment two

[0084] A PID parameter self-tuning method of a vehicle nitrogen oxygen sensor, comprising: controlling a PID parameter self-tuning model of a vehicle nitrogen oxygen sensor constructed by a construction method of a PID parameter self-tuning model of a vehicle nitrogen oxygen sensor as described in embodiment one, iteratively executing fuzzy reasoning, updating the structure parameters after each iteration using a loss function, until the iteration termination condition is reached, obtaining the optimized PID parameters, and completing the PID parameter self-tuning of the vehicle nitrogen oxygen sensor;

[0085] Wherein, the input of the PID parameter self-tuning model of the vehicle nitrogen oxygen sensor is the deviation of each inspection quantity of the vehicle nitrogen oxygen sensor from the corresponding theoretical value, and the output is the PID parameter, which is used to input the PID controller to calculate the control quantity of the vehicle nitrogen oxygen sensor, and the vehicle nitrogen oxygen sensor detects vehicle nitrogen oxide under the control of the control quantity, and the loss function is the weighted sum of the deviation of each inspection quantity of the vehicle nitrogen oxygen sensor from the corresponding theoretical value.

[0086] As Figure 2 can be seen, the vehicle nitrogen oxygen sensor is a three-chamber coupled nitrogen oxygen sensor, and the model obtained in embodiment one is used in the three-chamber coupled nitrogen oxygen sensor in this embodiment, so that the PID parameter value of the optimal working state of the nitrogen oxygen sensor is accurately and quickly obtained, and the problems of complex decoupling control and difficulty in applying to actual controllers are avoided.

[0087] The related technical solutions are the same as those in embodiment one, and will not be repeated here.

[0088] Embodiment three

[0089] A control method of a pump unit of a vehicle nitrogen oxygen sensor, which uses the PID parameters obtained by the PID parameter self-tuning method of a vehicle nitrogen oxygen sensor as described in embodiment two to control the pump unit of the vehicle nitrogen oxygen sensor.

[0090] The related technical solutions are the same as those in embodiment one, and will not be repeated here.

[0091] Embodiment four

[0092] A computer readable storage medium comprising a stored computer program which, when executed by a processor, controls a device in which the storage medium is located to perform the method of constructing a PID parameter self-tuning model of a vehicle nitrogen oxide sensor according to embodiment one, the method of controlling a pump unit of a vehicle nitrogen oxide sensor according to embodiment two, and / or the method of controlling a pump unit of a vehicle nitrogen oxide sensor according to embodiment three.

[0093] The related technical solutions are the same as those of embodiments one, two and three, and will not be described again here.

[0094] Those skilled in the art will easily understand that the above description is only the preferred embodiments of the present application and is not intended to limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for constructing a self-tuning model for PID parameters of a vehicle nitrogen oxide sensor, characterized in that, include: S1. Encode and randomly assign values ​​to the initial structural parameters of the fuzzy neural network to initialize the population for the genetic algorithm; S2. Decode each individual in the population and establish a corresponding fuzzy neural network; control each fuzzy neural network to iteratively execute fuzzy inference, and calculate the fitness value of the individual in the population corresponding to the fuzzy neural network based on the loss function value after each iteration of fuzzy inference; according to the fitness values ​​of each individual in the population, perform selection, crossover and mutation using a genetic algorithm to obtain the next generation population; wherein, the input of the fuzzy neural network is the deviation between each inspection quantity of the vehicle nitrogen oxide sensor and the corresponding theoretical value, and the output is PID parameters, which are used to input the PID controller to calculate the control quantity of the vehicle nitrogen oxide sensor, the vehicle nitrogen oxide sensor performs vehicle nitrogen oxide detection under the control of the control quantity, and the loss function is the weighted sum of the deviations between each inspection quantity of the vehicle nitrogen oxide sensor and the corresponding theoretical value; S3. Repeat S2 until the termination condition of the genetic algorithm is met, and obtain the population after coarse optimization by the genetic algorithm. The population contains one individual. Decode the individual to obtain the fuzzy neural network. S4 controls the fuzzy neural network obtained in S3 to iteratively perform fuzzy inference. After each iteration, the loss function is used to update the initial structure parameters of the network until the iteration termination condition is reached, and the initial structure parameters of the network after fine optimization are obtained, thus completing the construction of the self-tuning model of the PID parameters of the vehicle nitrogen oxygen sensor.

2. The construction method according to claim 1, characterized in that, The automotive nitrogen oxide sensor is a three-chamber nitrogen oxide sensor, and the loss function used is: Where L is the loss function value, k1, k2, k3, k4, k5, and k6 are the weights of each term, and satisfy k1+k2+k3+k4+k5+k6=1, E Ip1 For the second chamber pump current I p1 The deviation between theoretical and actual values, E V1 E represents the deviation between the theoretical and actual values ​​of the Nernst voltage V1 on the second chamber pump unit. V2 The deviation between the theoretical and actual values ​​of the Nernst voltage V2 on the third chamber pump unit. For E Ip1 rate of change, For E V1 rate of change, For E V2 The rate of change; in the first iteration, all actual values ​​are 0. and The initial values ​​are all 1. In subsequent iterations, the actual values ​​are obtained as follows: the PID parameters output by the fuzzy neural network after the current iteration are input to the PID controller. The PID controller calculates the input voltage used to input the vehicle nitrogen-oxygen sensor, and measures the output of the vehicle nitrogen-oxygen sensor. V1 and V2 are the corresponding actual values ​​used to calculate the loss function value.

3. The construction method according to claim 2, characterized in that, The value of k1 is greater than the values ​​of k2, k3, k4, k5, and k6.

4. The construction method according to claim 1, characterized in that, The fitness value of each individual in the population is calculated as follows: the average of the sum of the squares of the loss function values ​​of the fuzzy neural network corresponding to the individual in each iteration of fuzzy inference is taken as the fitness value of the individual in the population.

5. The construction method according to claim 1, characterized in that, The number of iterations for fuzzy inference performed by each fuzzy neural network in step S2 is the same as the number of iterations for fuzzy inference performed by the fuzzy neural network in step S4.

6. A method for self-tuning PID parameters of a vehicle nitrogen oxide sensor, characterized in that, include: The self-tuning model of PID parameters of vehicle nitrogen oxygen sensor constructed by the construction method of the self-tuning model of PID parameters of vehicle nitrogen oxygen sensor as described in any one of claims 1 to 5 is controlled by iteratively executing fuzzy inference, and updating the structural parameters with a loss function after each iteration until the iteration termination condition is reached, so as to obtain the optimized PID parameters and complete the self-tuning of PID parameters of vehicle nitrogen oxygen sensor. The input of the self-tuning model for the PID parameters of the vehicle nitrogen oxide sensor is the deviation between each checked quantity of the vehicle nitrogen oxide sensor and its corresponding theoretical value. The output is the PID parameters, which are used to input the PID controller to calculate the control quantity of the vehicle nitrogen oxide sensor. Under the control of the control quantity, the vehicle nitrogen oxide sensor performs vehicle nitrogen oxide detection. The loss function is the weighted sum of the deviations between each checked quantity of the vehicle nitrogen oxide sensor and its corresponding theoretical value.

7. The method for self-tuning PID parameters of a vehicle nitrogen oxide sensor according to claim 6, characterized in that, The number of iterations for performing fuzzy inference is the same as the number of iterations for performing fuzzy inference in the fuzzy neural network in the construction method.

8. A control method for a vehicle nitrogen oxide sensor pump unit, characterized in that, The PID parameters obtained by self-tuning using the PID parameter self-tuning method for automotive nitrogen oxide sensor as described in claim 6 or 7 are used to control the automotive nitrogen oxide sensor pump unit.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed by a processor, it controls the device where the storage medium is located to perform a method for constructing a self-tuning model of PID parameters for an automotive nitrogen oxide sensor as described in any one of claims 1 to 5, a control method for an automotive nitrogen oxide sensor pump unit as described in claim 6 or 7, and / or a control method for an automotive nitrogen oxide sensor pump unit as described in claim 8.