CN111505936B - Automatic safety setting method based on Gaussian process PID control parameter - Google Patents

Automatic safety setting method based on Gaussian process PID control parameter Download PDF

Info

Publication number
CN111505936B
CN111505936B CN202010520485.2A CN202010520485A CN111505936B CN 111505936 B CN111505936 B CN 111505936B CN 202010520485 A CN202010520485 A CN 202010520485A CN 111505936 B CN111505936 B CN 111505936B
Authority
CN
China
Prior art keywords
safety
function
parameters
control
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010520485.2A
Other languages
Chinese (zh)
Other versions
CN111505936A (en
Inventor
吴坚
陈国胜
李帅
杜志强
张晶华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jilin University
Original Assignee
Jilin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jilin University filed Critical Jilin University
Priority to CN202010520485.2A priority Critical patent/CN111505936B/en
Publication of CN111505936A publication Critical patent/CN111505936A/en
Application granted granted Critical
Publication of CN111505936B publication Critical patent/CN111505936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B11/00Automatic controllers
    • G05B11/01Automatic controllers electric
    • G05B11/36Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
    • G05B11/42Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/0205Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric not using a model or a simulator of the controlled system
    • G05B13/024Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric not using a model or a simulator of the controlled system in which a parameter or coefficient is automatically adjusted to optimise the performance

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention belongs to the technical field of automobiles, and particularly relates to an automatic safety setting method based on Gaussian process PID control parameters under the condition of ensuring safety. The invention adopts the cost function to evaluate the quality degree of the control effect, and designs the safety evaluation function to evaluate how far the current state is away from the dangerous state, thereby solving the domain range of the next function evaluation. And fitting the functional relationship between the controller parameters and the cost function by using a Gaussian process regression model, and fitting the relationship between the controller parameters and the safety evaluation function. And optimizing the cost function by using Bayesian optimization theorem to obtain the controller parameters which are required to be configured for the minimum value of the cost function. In this way, optimal values for the controller parameters can be determined safely and automatically.

Description

Automatic safety setting method based on Gaussian process PID control parameter
Technical Field
The invention belongs to the technical field of automobiles, and particularly relates to an automatic safety setting method based on Gaussian process PID control parameters under the condition of ensuring safety.
Background
With the development of automation technology in various industries, more and more repetitive operations are gradually replaced by automatic machines and automatic algorithms instead of manual operations. In the control field, adjusting control parameters is a very complicated matter, and the parameters need to be adjusted continuously, the experimental result is observed, and if the experimental result cannot meet the expectation, the work needs to be repeated. The repetitive work generally needs 5 to 10 times for a skilled operator, while for some unskilled operators, the number of repeated settings is several times that of the skilled operator, and furthermore, the unskilled calibration engineer has no much experience, and may manually debug some parameters causing unexpected situations of the machine. In this case, a great safety hazard may be caused.
In the control part of intelligent driving, longitudinal vehicle control has been a popular control topic, wherein an important application direction comprises Adaptive Cruise Control (ACC) of a vehicle, and the common longitudinal control uses a PID method to control the longitudinal acceleration. The traditional approach is to manually try out the individual parameters of the PID. This operation is repetitive and complex, requires a lot of manpower, and even causes danger if the parameters are misfitted. Many times, the parameter calibration results depend on the artificial feeling, and no specific quantitative index exists. Therefore, it is necessary to develop a calibration method capable of automatically calibrating parameters, and which is safe and effective.
Disclosure of Invention
The invention provides a method capable of safely and automatically setting PID control parameters, which can manually set a target function so that the finally calibrated PID parameters can meet the initially set ideal requirements. The scheme solves the problem of complex and repeated operation in the manual parameter trial and error control process, and avoids the occurrence of unstable system condition caused by the manual parameter trial and error process. The invention can also meet other control methods, such as PD control, PI control and other feedback control methods, and solves the problems existing in the manual fitting of each parameter of the PID.
The technical scheme of the invention is described as follows by combining the attached drawings:
an automatic safety setting method based on a Gaussian process PID control parameter comprises the following steps:
firstly, initializing a controller, namely, firstly giving a very conservative parameter to the controller, wherein the parameter is set by the controller, and only the controlled system can reach an expected ideal value;
step two, calculating the control quantity to be output according to the current vehicle state and the existing parameters of the controller and the calculation rule in the controller, and outputting the control quantity to the controlled object;
and step three, applying the control quantity to the controlled object, and outputting the state quantity at the next moment after the controlled object obtains the control quantity. The control quantity and the state quantity of the next moment are obtained;
inputting the obtained control quantity and state quantity into a cost function, and indirectly representing the performance of the parameters of the controllers by the cost function according to cost values calculated by the values;
inputting the obtained control quantity and state quantity into a safety evaluation function, calculating a safety value by the safety evaluation function according to the values, and then calculating the safety range of the parameters to be evaluated in the next step;
step six, performing Gaussian process fitting on the obtained controller parameters and the corresponding cost values to obtain a fitted functional relation between the cost values and the corresponding controller parameters;
step seven, performing Gaussian process fitting on the controller parameters and the corresponding safety values to obtain a fitting functional relation between the safety values and the corresponding controller parameters;
and step eight, a safety evaluation step, namely evaluating according to the safety function obtained in the previous step, setting the safety function to meet the Lipschitz condition, and evaluating the range of the safety value of the next step by utilizing a Lipschitz constant. The definition domain of the parameters evaluated next is within the range of the safety value, so that enough safety can be ensured;
step nine, optimizing the parameters of the controller according to the safety range obtained in the last step, obtaining the parameters which enable the cost function to be minimum in the safety range when the optimized controller parameters are still in the safety range, and inputting the parameters to the controller;
and step ten, after the controller reaches the parameters, repeating the step two until the error between the cost functions obtained by twice repeated calculation is smaller than a certain critical value. The test is stopped;
and step eleven, finishing parameter setting, stopping the test, and closing all the devices.
The specific method of the second step is as follows:
the controller calculates a control output quantity, and a calculation formula of the output quantity can be represented by the following formula:
Figure GDA0003231351380000031
in the formula (18), x is the actual current state quantity, xrefThe current ideal state quantity; in the adaptive cruise control, the state quantity is the current acceleration, and the ideal state quantity is the ideal acceleration; of course, in a complex control logic, the state quantity may also be a vector quantity, which is not limited to a scalar quantity; the control quantity u calculates the required control output quantity through PID according to the deviation between the current state quantity and the ideal state quantity, and u is the output driving force or braking force in the self-adaptive cruise control; here, the surface Kp、Ki、KdAll the parameters are set parameters; for simplicity, the required tuning parameters will be denoted by the symbol θ below:
θ=[Kp,Ki,Kd]T (2)
in equation (18), min (), max () function is to define the control amount u not to exceed the physical limit, and to make the finally solved control amount to be in a satisfied state.
The concrete method of the third step is as follows:
the controlled object executes the input quantity, and the equation of the longitudinal control of the vehicle can be expressed by Newton's law as follows:
Figure GDA0003231351380000032
in the formula (20), m represents the mass of the whole vehicle,
Figure GDA0003231351380000033
as acceleration, FuControl amount calculated for equation (18), FrThe sum of various resistances in the running process of the vehicle; the vehicle execution control input quantity generates a state quantity at the next moment after execution and is output to the cost function for calculation.
The concrete method of the fourth step is as follows:
the cost function calculates the deviation between the input quantity and the state quantity and the ideal value to obtain a cost function value, and one possible cost function is expressed as follows:
Figure GDA0003231351380000041
in the formula (21), Q is a quadratic positive definite matrix and represents a penalty coefficient of state quantity deviation; r represents the punishment degree of the control quantity; t isovRepresents the overshoot time of the PID control process; g represents a penalty coefficient for overshoot time; the proportion among the penalty coefficients determines which evaluation standard is more important; this parameter is adapted by the commissioning personnel.
The concrete method of the sixth step and the seventh step is as follows:
collected control parameters
Figure 1
Wherein, thetaiFor parameter matching selection in each calibration process, M is the data quantity stored by the calibration times, nθIs the dimension of the control parameter; with y representing the value of the safety function, the regression can be expressed as the following equation:
yi=g(θi)+ωi (5)
in the formula (22), i represents the ith sample point data, ωiThe noise is independent and identically distributed noise in the measurement process, the mean value is 0, and the standard deviation is sigmaiNoise is expressed throughout the process using vectors, namely:
ω=[ω1,...,ωn]T~N(0,∑ω) (6)
wherein:
Figure GDA0003231351380000043
the noise is generally caused by instrument measurement and external interference factors;
the prior of the gaussian process regression of the measured values can then be expressed as:
y~N(μ(Θ),KΘΘ2I) (8)
in the interest of simplicity, μ (Θ) is the mean of the measured values, and is given according to the priori knowledge of a debugger at the time of starting operation, and when the subsequent part of the experimental data exists, the mean is updated according to the obtained data; kΘΘAnd calculating the gram matrix of the data points by adopting a Gaussian kernel function:
Figure GDA0003231351380000044
l in the formula (26) represents the distance length between data points, if L is larger, the curve is smoother, and conversely, the curve is steeper; the gram matrix can then be expressed as:
Figure GDA0003231351380000051
when the new data value needs to be predicted at the parameter θ' is:
p(g(θ')|Θ,y)~N(μ',∑') (11)
wherein:
Figure GDA0003231351380000052
fitting a relational expression between the control parameters and the cost function and fitting a relational expression between the control parameters and the safety function through the Gaussian process regression;
the safety evaluation function calculates the current safety value and provides the adjustment range of the control parameter theta of the next step;
one possible security function is defined as follows:
e(θ)=(xmax-x)(x-xmin)(Ts-T) (13)
in the formula (30), xmaxRepresents the maximum value of the state quantity, xminRepresents the minimum value of the state quantity, TsRepresenting the maximum allowed overshoot time of the system.
The method of the step eight comprises the following steps:
according to the safety function definition, the control parameter θ can be guaranteed to be safe only in the definition domain where the safety function is greater than 0, and therefore it is assumed that the safety function satisfies the LipSchitz condition, that is:
|e(θ1)-e(θ2)|≤L|θ12| (14)
selecting a Lipschitz constant L which is constantly larger than the slope of the safety function to ensure that the above formula is satisfied, wherein the larger the constant is, the slower the convergence is;
the secure set can then be expressed as:
θ∈{θ|e(θ0)+L(θ-θ0)>0} (15)
in the third diagram, when theta ranges from (x)0,8]Within the range of (a), ensuring that e (theta) is constantly larger than 0, and ensuring the system safety; the selection range of the next sample point is thus chosen to be (x)0,8]Within.
The concrete method of the ninth step is as follows:
the optimization parameters of the controller utilize the selection range of the next parameter obtained in the safety evaluation, the cost function which is well fitted in the Gaussian process fitting is calculated, the point where the minimum value of the cost function is most probably located is found, and Bayesian optimization is adopted; the gain function uses the desired boost, EI, as follows:
Figure GDA0003231351380000061
in the formula (33), α (θ) is an expected value of the obtained function, and the larger the value, the smaller the value of the function at the point θ, gmin(theta) represents the minimum of the cost functions known so far, phi is the cumulative density function of the standard normal distribution,
Figure GDA0003231351380000062
is a probability density function of a standard normal distribution; μ (θ), σ (θ) are obtained from equation (29), and:
Figure GDA0003231351380000063
therefore, the obtained function value of theta at any point can be calculated, and further the next iterative calculation is carried out.
The invention has the beneficial effects that:
1) the method is automatic operation, and parameters with the lowest cost function are automatically optimized through a program, so that the data are not analyzed by spending labor.
2) The invention can enable a debugger to set the cost function according to the target required to be reached, and can meet the diversified design of the debugger
3) The safety function considered by the invention ensures that the safety performance can be ensured in the whole scene optimization process. Without the problem of failure caused by trial error in the traditional problem
4) The invention can enable the debugging to set the safety function by self, and can set different safety functions according to different scenes so as to meet the requirement of safe operation under each scene.
5) The Bayesian optimization is adopted in the optimization process, and compared with other algorithms such as traditional gradient descent and the like, the global optimal solution can be obtained more quickly without falling into the local optimal solution.
6) The Bayes optimization adopted by the invention, more specifically the expectation-Enhancement (EI) method, can find the minimum value of the cost function more quickly to reach the optimal solution.
7) The invention adopts the Gaussian process to fit the relationship between the controller parameters and the cost function and the safety function. Because the traditional method is used, the relation between the controller parameter and the cost function value is difficult to be given explicitly, and a more complex function relation can be fitted by utilizing a Gaussian process
8) The invention adopts the Gaussian process to fit the relationship between the controller parameters and the cost function and the safety function. Compared with the traditional method, the Gaussian process can be added with a priori, and the priori can be adapted by combining the experience of a debugger.
Drawings
FIG. 1 is a complete flow chart for safely adjusting vehicle control parameters in accordance with the present invention.
FIG. 2 is a diagram of a cost function and a control parameter K of the Gaussian process and Bayesian optimization thereofpA relational image.
FIG. 3 shows a diagram of K corresponding to FIG. 2 according to the present inventionpA security assessment function image.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the complex and complicated repeated work of the vehicle control parameter in the calibration process, for example, the Adaptive Cruise Control (ACC) needs to continuously and repeatedly debug the parameter value in the process of setting the control parameter PID. After adjusting the trend of a parameter analysis data curve, manually allocating the next value to be tested, and if the next value is not needed to be tested, allocating a set of dangerous control parameters.
The invention forms the core framework of the algorithm by the controller, the controlled object, the manually set cost function, the Gaussian process fitting, the safety evaluation function and the optimized controller parameter. In said frame. The controller receives the optimized new controller parameter configuration from the optimized controller parameter part, calculates new control quantity and inputs the new control quantity to the controlled object, and the controlled object obtains new vehicle state quantity at the next moment after executing corresponding control input. And inputting the vehicle state quantity and the control quantity into a preset cost function, and calculating a new cost value.
In order to evaluate the influence of the controller parameters on the change trend of the cost function value, a Gaussian process is adopted for fitting, the Gaussian process is a type of regression without parameters, a plurality of initially known priori knowledge can be given by using the Gaussian process, and the whole process is fitted according to the existing priori knowledge. The gaussian process can fit complex functional graphs. In the Gaussian process fitting, two types of functions are fitted together, one is a safety function, and the other is a cost function, and the independent variables of the functions are parameter values of the controller, such as K in PIDp,Ki,KdThese set parameters.
And the Gaussian process fitting is used for transferring the fitted function to a parameter part of the safety evaluation and optimization controller. Wherein passed to the security assessment is a security assessment function. The parameter part of the optimization controller is passed with the cost function which is well fitted. The safety evaluation function evaluates which parameters can ensure safety, and ensures that dangerous conditions can not occur. The evaluation function passes to the controller parameter range over which the optimized controller parameter portion can adjust. In the part of optimizing the parameters of the controller, a Bayesian optimization method is adopted, specifically, an expected lifting method (EI) is adopted to optimize the parameters of the controller, and a value which can minimize the cost function is found out from one controller parameter.
Referring to fig. 1, a method for automatic safety tuning based on gaussian process PID control parameters includes the following steps:
step one, initializing the controller, firstly giving the controller a very conservative parameter which is set by the controller, as long as the controlled system can reach the expected ideal value.
And step two, calculating the control quantity to be output according to the current vehicle state and the existing parameters of the controller and the calculation rule in the controller, and outputting the control quantity to the controlled object.
The controller calculates a control output quantity, and a calculation formula of the output quantity can be represented by the following formula:
Figure GDA0003231351380000081
in the formula (18), x is the actual current state quantity, xrefThe current ideal state quantity; in the adaptive cruise control, the state quantity is the current acceleration, and the ideal state quantity is the ideal acceleration; of course, in a complex control logic, the state quantity may also be a vector quantity, which is not limited to a scalar quantity; the control quantity u calculates the required control output quantity through PID according to the deviation between the current state quantity and the ideal state quantity, and u is the output driving force or braking force in the self-adaptive cruise control; here, the surface Kp、Ki、KdAll the parameters are set parameters; for simplicity, the required tuning parameters will be denoted by the symbol θ below:
θ=[Kp,Ki,Kd]T (19)
in equation (18), min (), max () function is to define the control amount u not to exceed the physical limit, and to make the finally solved control amount to be in a satisfied state.
And step three, applying the control quantity to the controlled object, and outputting the state quantity at the next moment after the controlled object obtains the control quantity. The control quantity and the state quantity at the next moment are obtained.
The controlled object executes the input quantity, and the equation of the longitudinal control of the vehicle can be expressed by Newton's law as follows:
Figure GDA0003231351380000091
in the formula (20), m represents the mass of the whole vehicle,
Figure GDA0003231351380000092
as acceleration, FuControl amount calculated for equation (18), FrThe sum of various resistances in the running process of the vehicle; the vehicle execution control input quantity generates a state quantity at the next moment after execution and is output to the cost function for calculation.
And step four, inputting the obtained control quantity and state quantity into a cost function, and indirectly representing the performance of the parameters of the controller by the cost function according to cost values calculated by the values.
The cost function calculates the deviation between the input quantity and the state quantity and the ideal value to obtain a cost function value, and one possible cost function is expressed as follows:
Figure GDA0003231351380000093
in the formula (21), Q is a quadratic positive definite matrix and represents a penalty coefficient of state quantity deviation; r represents the punishment degree of the control quantity; t isovRepresents the overshoot time of the PID control process; g represents a penalty coefficient for overshoot time; the size proportion among the penalty coefficients determines which evaluation standard is more important; this parameter can be adapted by the commissioning personnel.
And fifthly, inputting the obtained control quantity and state quantity into a safety evaluation function, calculating a safety value by the safety evaluation function according to the values, and then calculating the safety range of the parameters required to be evaluated in the next step.
And sixthly, performing Gaussian process fitting on the obtained controller parameters and the corresponding cost values to obtain a fitted functional relation between the cost values and the corresponding controller parameters.
And seventhly, performing Gaussian process fitting on the controller parameters and the corresponding safety values to obtain a fitting functional relation between the safety values and the corresponding controller parameters.
And fitting two functions together in the Gaussian process regression 4, wherein the independent variables of the two functions are parameters of the controller. Since the road resistance is difficult to calibrate and also varies from scene to scene, the influence of the controller parameters on the cost function is difficult to solve through the equation explicitly, so that a curve is obtained by adopting Gaussian process regression fitting.
Control parameters acquired during a previous data acquisition
Figure 100002_2
Wherein theta isiFor parameter matching selection in each calibration process, M is the data quantity stored by the calibration times, nθIs the dimension of the control parameter. With y representing the value of the safety function, the regression can be expressed as the following equation:
yi=g(θi)+ωi (22)
in the formula (22), i represents the ith sample point data, ωiThe noise is independent and identically distributed noise in the measurement process, the mean value is 0, and the standard deviation is sigmaiNoise is expressed throughout the process using vectors, namely:
ω=[ω1,...,ωn]T~N(0,∑ω) (23)
wherein:
Figure GDA0003231351380000102
noise is generally caused by instrumental measurements, external interference factors.
The prior of the gaussian process regression of the measured values can then be expressed as:
y~N(μ(Θ),KΘΘ2I) (25)
for simplicity, μ (Θ) is the mean of the measured values, and can be given according to the priori knowledge of the debugger at the start of the run, and when the subsequent part of the experimental data exists, the mean can be updated according to the obtained data. KΘΘAnd calculating the gram matrix of the data points by adopting a Gaussian kernel function:
Figure GDA0003231351380000103
l in equation (26) represents the distance length between data points, and if L is larger, the curve is smoother, and conversely, the curve is steeper. The gram matrix can then be expressed as:
Figure GDA0003231351380000111
when the new data value needs to be predicted at the parameter θ' is:
p(g(θ')|Θ,y)~N(μ',∑') (28)
wherein:
Figure GDA0003231351380000112
through the Gaussian process regression, the relational expression between the control parameters and the cost function can be fitted, and the relational expression between the control parameters and the safety function can be fitted. As shown in fig. 2, the fitting mean of gaussian process is the relationship between the control parameter θ and the cost function fitted by using the sampling points. Fig. 3 is a graph fitting a relation between the control parameter θ and the safety evaluation function using gaussian process regression.
The safety evaluation function calculates the current safety value and gives the adjustment range of the control parameter theta of the next step. One possible security function is defined as follows:
e(θ)=(xmax-x)(x-xmin)(Ts-T) (30)
in the formula (30), xmaxRepresents the maximum value of the state quantity, xminRepresents the minimum value of the state quantity, TsRepresenting the maximum allowed overshoot time of the system. Regression analysis was performed on the control parameter θ and the safety function value e using a gaussian process, and the resulting image is shown in fig. 3.
And step eight, a safety evaluation step, namely evaluating according to the safety function obtained in the previous step, assuming that the safety function meets the Lipschitz condition, and evaluating the range of the safety value of the next step by using a Lipschitz constant. The domain of the parameters to be evaluated next is then within the range of the safety value, ensuring sufficient safety.
According to the safety function definition, the control parameter θ can be guaranteed to be safe only in the definition domain where the safety function is greater than 0, and therefore it is assumed that the safety function satisfies the LipSchitz condition, that is:
|e(θ1)-e(θ2)|≤L|θ12| (31)
a relatively large Lipschitz constant L may be chosen to ensure that the above equation is satisfied, but a larger constant will result in slower convergence.
The secure set can then be expressed as:
θ∈{θ|e(θ0)+L(θ-θ0)>0} (32)
as in FIG. 3, it can be seen that when θ ranges from (x)0,8]Within the range of (A), the constant larger than 0 of e (theta) can be ensured, and the system safety can be ensured. The selection range of the next sample point is thus chosen to be (x)0,8]Within.
And step nine, optimizing the parameters of the controller according to the safety range obtained in the last step, obtaining the parameters which enable the cost function to be minimum in the safety range when the optimized parameters of the controller are still in the safety range, and inputting the parameters to the controller.
And (3) the optimized parameters 6 of the controller utilize the selection range of the next parameter obtained in the safety evaluation 5 to calculate the fitted cost function in the step (4), find the point where the minimum value of the cost function is most likely to be located, and adopt Bayesian optimization. Where the gain function takes the desired lift (EI), as follows:
Figure GDA0003231351380000121
in the formula (33), α (θ) is an expected value of the obtained function, and the larger the value, the smaller the value of the function at the point θ, gmin(θ) represents the minimum of the cost function known at present, and Φ is the normA cumulative density function of the quasi-normal distribution,
Figure GDA0003231351380000122
is a probability density function of a standard normal distribution. μ (θ), σ (θ) are obtained from equation (29), and:
Figure GDA0003231351380000123
therefore, the obtained function value of theta at any point can be calculated, and further the next iterative calculation is carried out. FIG. 2 is an exemplary acquisition function, with the next evaluation point being at the maximum of the acquisition function, and further, since at [0, x ]0]Within the range, the safety evaluation function is less than 0, so the coordinates of the evaluation point are selected to be (x)0,8]Within the range. The parameter theta required to be evaluated next time is obtainednew
And step ten, after the controller reaches the parameters, repeating the step two until the error between the cost functions obtained by twice repeated calculation is smaller than a certain critical value. The continuation of the test is stopped.
And step eleven, finishing parameter setting, stopping the test, and closing all the devices.
The invention quantifies the control performance by setting the cost function, and utilizes the Gaussian process regression to fit the cost function and the safety evaluation function. Firstly, the safety evaluation function is used for solving which areas are safe, then the Bayesian optimization method is used for optimizing the cost function, and the minimum value of the cost function in the safety range is found out. The optimization strategy can automatically and safely solve the problem of difficult calibration, reduce the operation of manually analyzing data and reduce the dangerous fault of manually setting data.

Claims (5)

1. An automatic safety setting method based on a Gaussian process PID control parameter is characterized by comprising the following steps:
firstly, initializing a controller, namely, firstly giving a very conservative parameter to the controller, wherein the parameter is set by the controller, and only a controlled system is required to reach an expected ideal value;
step two, calculating the control quantity to be output according to the current vehicle state and the existing parameters of the controller and the calculation rule in the controller, and outputting the control quantity to the controlled object;
step three, applying a control quantity to the controlled object, and outputting the state quantity at the next moment after the controlled object obtains the control quantity; the control quantity and the state quantity of the next moment are obtained;
inputting the obtained control quantity and state quantity into a cost function, wherein the cost value calculated by the cost function indirectly represents the performance of the parameters of the controllers;
inputting the obtained control quantity and state quantity into a safety evaluation function, calculating a safety value by the safety evaluation function according to the values, and then calculating the safety range of the parameters to be evaluated in the next step;
step six, performing Gaussian process fitting on the obtained controller parameters and the corresponding cost values to obtain a fitted functional relation between the cost values and the corresponding controller parameters;
step seven, performing Gaussian process fitting on the controller parameters and the corresponding safety values to obtain a fitting functional relation between the safety values and the corresponding controller parameters;
step eight, a safety evaluation step, namely evaluating according to a fitted functional relation between the safety value obtained in the previous step and the corresponding controller parameter, assuming that the safety function meets the Lipschitz condition, and evaluating the safety range of the next step by utilizing a Lipschitz constant; the definition domain of the parameters evaluated next is within the range of the safety value, so that enough safety can be ensured;
step nine, optimizing the parameters of the controller according to the safety range obtained in the last step, obtaining the parameters which enable the cost function to be minimum in the safety range when the optimized controller parameters are still in the safety range, and inputting the parameters to the controller;
step ten, after the controller obtains the parameters, repeating the step two until the error between the cost functions obtained by twice repeated calculation is smaller than a certain critical value; the test is stopped;
step eleven, finishing parameter setting, stopping the test, and closing all the devices;
the specific method of the second step is as follows:
the controller calculates a control output quantity, and a calculation formula of the output quantity is represented by the following formula:
Figure FDA0003231351370000021
in the formula (1), x is the actual current state quantity, xrefThe current ideal state quantity; in the adaptive cruise control, the state quantity is the current acceleration, and the ideal state quantity is the ideal acceleration; of course, in complex control logic, the state quantities are vectors or scalars; the control quantity u calculates the required control output quantity through PID according to the deviation between the current state quantity and the ideal state quantity, and u is the output driving force or braking force in the self-adaptive cruise control; here, the surface Kp、Ki、KdAll the parameters are set parameters; the required tuning parameters will be denoted by the symbol θ below:
θ=[Kp,Ki,Kd]T (2)
in the formula (1), the function min () and max () are used for limiting the controlled variable u not to exceed the physical limit, so that the finally solved controlled variable can reach the satisfied state;
the concrete method of the third step is as follows:
the controlled object executes the input quantity, and the equation of the longitudinal control of the vehicle is expressed by Newton's law as follows:
Figure FDA0003231351370000022
in the formula (3), m represents the mass of the whole vehicle,
Figure FDA0003231351370000023
as acceleration, FuControl quantity, F, calculated for equation (1)rThe sum of various resistances in the running process of the vehicle; and the vehicle execution control output quantity generates a state quantity at the next moment after execution and is output to the cost function for calculation.
2. The automatic safety setting method based on the Gaussian process PID control parameter according to claim 1, characterized in that the specific method of the fourth step is as follows:
calculating the deviation between the input quantity and the state quantity and the ideal value by the cost function to obtain a cost function value, wherein the cost function is expressed as follows:
Figure FDA0003231351370000024
in the formula (4), Q is a quadratic positive definite matrix and represents a penalty coefficient of state quantity deviation; r represents the punishment degree of the control quantity; t isovRepresents the overshoot time of the PID control process; g represents a penalty coefficient for overshoot time; the proportion among the penalty coefficients determines which evaluation standard is more important; this parameter is adapted by the commissioning personnel.
3. The automatic safety setting method based on the Gaussian process PID control parameter according to claim 1, characterized in that the specific method of the sixth step and the seventh step is as follows:
collected control parameters
Figure 2
Wherein, thetaiFor parameter matching selection in each calibration process, M is the data quantity stored by the calibration times, nθIs the dimension of the control parameter; with y representing the value of the safety function, the regression can be expressed as the following equation:
yi=g(θi)+ωi (5)
in the formula (5), i represents the ith sample point data, ωiThe noise is independent and identically distributed noise in the measurement process, the mean value is 0, and the standard deviation is sigmaiNoise is expressed throughout the process using vectors, namely:
ω=[ω1,...,ωn]T~N(0,∑ω) (6)
wherein:
Figure FDA0003231351370000032
the noise is generally caused by instrument measurement and external interference factors;
the prior of the gaussian process regression of the measured values is then expressed as:
y~N(μ(Θ),KΘΘ2I) (8)
mu (theta) is the mean value of the measured values, the mean value is given according to the prior knowledge of a debugger at the starting operation moment, and the mean value is updated according to the obtained data when the subsequent part of the experimental data exists; kΘΘAnd calculating the gram matrix of the data points by adopting a Gaussian kernel function:
Figure FDA0003231351370000033
l in the formula (9) represents the distance length between data points, if L is larger, the curve is smoother, and conversely, the curve is steeper; the gram matrix is then represented as:
Figure FDA0003231351370000041
when the new data value needs to be predicted at the parameter θ' is:
p(g(θ')|Θ,y)~N(μ',∑') (11)
wherein:
Figure FDA0003231351370000042
fitting a relational expression between the control parameters and the cost function and fitting a relational expression between the control parameters and the safety function through the Gaussian process regression;
the safety function calculates the current safety value and provides the adjustment range of the control parameter theta of the next step; the security function is defined as follows:
e(θ)=(xmax-x)(x-xmin)(Ts-T) (13)
in formula (13), xmaxRepresents the maximum value of the state quantity, xminRepresents the minimum value of the state quantity, TsRepresenting the maximum allowed overshoot time of the system.
4. The automatic safety tuning method based on the Gaussian process PID control parameter according to claim 3, characterized in that the method of the step eight is as follows:
according to the safety function definition, the control parameter θ can be guaranteed to be safe only in the definition domain where the safety function is greater than 0, and therefore it is assumed that the safety function satisfies the LipSchitz condition, that is:
|e(θ1)-e(θ2)|≤L|θ12| (14)
selecting a Lipschitz constant L which is constantly larger than the slope of the safety function to ensure that the above formula is satisfied, wherein the larger the constant is, the slower the convergence is;
the secure set is then represented as:
θ∈{θ|e(θ0)+L(θ-θ0)>0} (15)
when theta is in the range of (x)0,8]Within the range of (a), ensuring that e (theta) is constantly larger than 0, and ensuring the system safety; the selection range of the next sample point is thus chosen to be (x)0,8]Within.
5. The automatic safety setting method based on the Gaussian process PID control parameter according to claim 3, characterized in that the specific method of the ninth step is as follows:
the optimization parameters of the controller utilize the selection range of the next parameter obtained in the safety evaluation, the cost function which is well fitted in the Gaussian process fitting is calculated, the point where the minimum value of the cost function is most probably located is found, and Bayesian optimization is adopted; the gain function uses the desired boost, EI, as follows:
Figure FDA0003231351370000051
in the formula (16), α (θ) is an expected value of the obtained function, and the larger the value, the smaller the value of the function at the point θ, gmin(theta) represents the minimum of the cost functions known so far, phi is the cumulative density function of the standard normal distribution,
Figure FDA0003231351370000052
is a probability density function of a standard normal distribution; μ (θ), σ (θ) are obtained from equation (12), and:
Figure FDA0003231351370000053
therefore, the obtained function value of theta at any point is calculated, and further the next iterative calculation is carried out.
CN202010520485.2A 2020-06-09 2020-06-09 Automatic safety setting method based on Gaussian process PID control parameter Active CN111505936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010520485.2A CN111505936B (en) 2020-06-09 2020-06-09 Automatic safety setting method based on Gaussian process PID control parameter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010520485.2A CN111505936B (en) 2020-06-09 2020-06-09 Automatic safety setting method based on Gaussian process PID control parameter

Publications (2)

Publication Number Publication Date
CN111505936A CN111505936A (en) 2020-08-07
CN111505936B true CN111505936B (en) 2021-10-01

Family

ID=71875329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010520485.2A Active CN111505936B (en) 2020-06-09 2020-06-09 Automatic safety setting method based on Gaussian process PID control parameter

Country Status (1)

Country Link
CN (1) CN111505936B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115579091A (en) * 2022-11-09 2023-01-06 广东海洋大学 High-entropy alloy component design method based on machine learning and multi-performance collaborative optimization

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2530626A1 (en) * 2011-06-01 2012-12-05 BAE Systems Plc. Heterogeneous data fusion using Gaussian processes
CN105005196A (en) * 2015-05-14 2015-10-28 南京农业大学 Agricultural vehicle autonomous navigation steering control method
US9216745B2 (en) * 2013-09-16 2015-12-22 Disney Enterprises, Inc. Shared control of semi-autonomous vehicles including collision avoidance in multi-agent scenarios
WO2019076512A1 (en) * 2017-10-20 2019-04-25 Robert Bosch Gmbh Method and device for operating an actuator regulation system, computer program, and machine-readable storage medium
CN110941272A (en) * 2019-11-27 2020-03-31 深圳先进技术研究院 Automatic driving control method and device
CN111105037A (en) * 2018-10-25 2020-05-05 罗伯特·博世有限公司 Method for machine learning by a gaussian process

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6216083B1 (en) * 1998-10-22 2001-04-10 Yamaha Motor Co., Ltd. System for intelligent control of an engine based on soft computing
WO2017078823A2 (en) * 2015-08-13 2017-05-11 The Board Of Regents For Oklahoma State University Modular autopilot design and development featuring bayesian non-parametric adaptive control
KR102520280B1 (en) * 2018-02-16 2023-04-12 로베르트 보쉬 게엠베하 A method for devising an optimum control policy, training system, control system, computer program and machine-readable storage medium
CN108897212A (en) * 2018-10-16 2018-11-27 太原理工大学 Multivariable PID control strategy is realized in PLS frame based on Gaussian process model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2530626A1 (en) * 2011-06-01 2012-12-05 BAE Systems Plc. Heterogeneous data fusion using Gaussian processes
US9216745B2 (en) * 2013-09-16 2015-12-22 Disney Enterprises, Inc. Shared control of semi-autonomous vehicles including collision avoidance in multi-agent scenarios
CN105005196A (en) * 2015-05-14 2015-10-28 南京农业大学 Agricultural vehicle autonomous navigation steering control method
WO2019076512A1 (en) * 2017-10-20 2019-04-25 Robert Bosch Gmbh Method and device for operating an actuator regulation system, computer program, and machine-readable storage medium
CN111105037A (en) * 2018-10-25 2020-05-05 罗伯特·博世有限公司 Method for machine learning by a gaussian process
CN110941272A (en) * 2019-11-27 2020-03-31 深圳先进技术研究院 Automatic driving control method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Controller parameter optimization for complex industrial system with uncertainties;Heping Chen, Seth Bowels, Biao Zhang,Thomas Fuhlbrigge;《measurement and control》;20190113;全文 *
Efficient controller parameter tuning for a system with disturbance;Seth Bowels; Jing Xu; Heping Chen;《2015 IEEE International Conference on Robotics and Biomimetics (ROBIO)》;20151109;全文 *
智能汽车个性化辅助驾驶策略研究;蒋渊德;《中国博士学位论文全文数据库·工程科技Ⅱ辑》;20200215;全文 *

Also Published As

Publication number Publication date
CN111505936A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
US11604472B2 (en) Method for controlling vehicle speed for autonomous driving, electronic device, and computer-readable storage medium
JP5930655B2 (en) Ways to solve control problems
CN110471276B (en) Apparatus for creating model functions for physical systems
CN111505936B (en) Automatic safety setting method based on Gaussian process PID control parameter
CN106054851A (en) Method and system for testing a mechatronic system
WO2020244987A1 (en) Method and device for determining model parameters for a control strategy for a technical system with the aid of a bayesian optimisation method
US10409232B2 (en) Engineering tool and method for parameterizing a model-based predictive controller
EP1715352A2 (en) Method and apparatus for diagnosing failures in a mechatronic system
WO2023013212A1 (en) System and method for calibrating feedback controllers
CN113939775B (en) Method and device for determining a regulating strategy for a technical system
CN111491773A (en) Method for processing molding parameters of injection press
EP3850593B1 (en) Method for improving prediction relating to the production of a polymeric product
EP2592504B1 (en) Method for estimating resource consumption in the generation of a control device program code
DE202019103862U1 (en) Device for creating a strategy for a robot
Sename et al. Observer-based H∞ control for time-delay systems: a new LMI solution
DE102019210372A1 (en) Method, device and computer program for creating a strategy for a robot
CN111103797B (en) Software behavior adjusting method based on multi-variable control
WO2022135959A1 (en) Device for a robust classification and regression of time sequences
JP7176393B2 (en) Extruded tread rubber shape design method and extruded tread rubber shape design device
EP3506029B1 (en) Method and control system for controlling a real production process
CN110991765A (en) Monitoring method and device for prediction model of industrial production and electronic equipment
CN113281994A (en) Method and device for designing a control loop
US11977374B2 (en) System and method for calibrating feedback controllers
EP4311784A1 (en) Aircraft component selection
Saikalis et al. Hardware-in-the-loop real-time optimization of electronic controllers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant