Disclosure of Invention
The invention aims to provide a steering fault-tolerant control method and device for an automatic driving vehicle with dynamic safety constraint and a storage medium.
The aim of the invention can be achieved by the following technical scheme:
an autonomous vehicle steering fault tolerant control method with dynamic safety constraints, comprising:
S1, acquiring information of an obstacle and a real-time vehicle state, wherein the vehicle state comprises a vehicle position and a vehicle course angle;
S2, calculating the distance between the vehicle and each obstacle, taking the obstacle closest to the vehicle as a first obstacle, and generating a trigger function value based on the distance between the first obstacle and the vehicle and a trigger function, wherein the trigger function is a continuous function with the value of 0to 1 for quick switching, and when the distance between the first obstacle and the vehicle is smaller than the safety distance, the value of the trigger function is 1;
Step S3, based on the trigger function value, correcting the acquired original vehicle error by combining the obstacle function to obtain a corrected vehicle error, and ensuring that the vehicle is in a safety constraint, wherein the vehicle error comprises a vehicle transverse error and a vehicle course angle error;
and S4, carrying out vehicle steering fault-tolerant control based on the corrected vehicle tracking error and the radial basis function neural network.
The trigger function is:
Wherein Λl (d) is a trigger function, d is the distance between the first obstacle and the vehicle, dsv is a safety distance, e is a natural base number, m is a system order, and mu is a trigger parameter.
The original vehicle error acquisition process comprises the following steps:
acquiring a reference track, and extracting a reference position in the reference track based on the reference track and the vehicle position;
Acquiring a reference course angle of the reference position in a reference track;
and obtaining an original vehicle position error based on the reference position and the vehicle position, and obtaining an original vehicle course angle error based on the reference course angle and the vehicle course angle.
The corrected vehicle error is:
θl(e1l)=e1lΛl(d)
Wherein ζl is the corrected vehicle error, Qfl is the upper limit of the safety constraint, Qgl is the lower limit of the safety constraint, e1l is the original vehicle error, θl(e1l) is the triggering auxiliary variable, Λl (d) is the triggering function, l is 1 and represents the vehicle position, and 2 is the vehicle course angle.
The step S4 includes:
s4-1, generating a virtual control variable based on the corrected vehicle error;
s4-2, obtaining a derivative of the corrected vehicle error based on the virtual control variable;
and S4-3, generating a control signal based on the corrected vehicle error and the derivative thereof.
The mathematical expression of the virtual control variable is as follows:
z1=[ξ1,ξ2]T
wherein alpha is a virtual control variable,A coefficient matrix derived for the obstacle function, k1 being a first positive gain parameter, z1 being a corrected vehicle error matrix,Is the derivative of the system reference value.
The derivative of the corrected vehicle error is:
z2=x2-α
where z2 is the derivative of the corrected vehicle error and x2 is the derivative of the original vehicle error.
The control signal is:
Wherein u is a control signal,Being a pseudo-inverse of the second kinetic model parameter, a (x) being the first kinetic model parameter,For the optimal update of the weight vector, the xi (x) is a basis function vector,As an observation of the disturbance,As a derivative of the filtered value of the virtual control variable, k2 is a second positive gain parameter,
An automatic steering vehicle steering fault-tolerant control device with dynamic safety constraint comprises a memory, a processor and a program stored in the memory, wherein the processor realizes the method when executing the program.
A storage medium having stored thereon a program which when executed performs a method as described above.
Compared with the prior art, the invention has the following beneficial effects:
1. the obstacle function is used for describing the safety constraint, the distance-based trigger function is designed to realize dynamic safety constraint, continuity and stability in the safety constraint switching process are guaranteed, and the load of a control system can be reduced and the driving stability can be improved.
2. The selected trigger function can be quickly attenuated and guided everywhere when the distance between the first obstacle and the vehicle is smaller than the safety distance, so that the stability of the system in the constrained switching process can be ensured.
3. The system error constraint is converted into the system output constraint through the set barrier function, and the vehicle is controlled in the safety constraint through correcting the system error, so that the safety of the vehicle is ensured.
4. And a radial basis neural network compensation system is used for compensating steering faults and uncertainty, a nonlinear disturbance observer is constructed for compensating fitting errors and external disturbance of the neural network, and a back-stepping method is used for constructing a steering fault-tolerant control law so as to improve the safety of the automatic driving vehicle.
Detailed Description
The invention will now be described in detail with reference to the drawings and specific examples. The present embodiment is implemented on the premise of the technical scheme of the present invention, and a detailed implementation manner and a specific operation process are given, but the protection scope of the present invention is not limited to the following examples.
An autonomous vehicle steering fault tolerant control method with dynamic safety constraints, as shown in fig. 1, includes:
Step S1, information of an obstacle and a real-time vehicle state are acquired, wherein the vehicle state comprises a vehicle position and a vehicle course angle;
S2, calculating the distance between the vehicle and each obstacle, taking the obstacle closest to the vehicle as a first obstacle, and generating a trigger function value based on the distance between the first obstacle and the vehicle and a trigger function, wherein the trigger function is a continuous function with the value of 0to 1 for quick switching, and when the distance between the first obstacle and the vehicle is smaller than the safety distance, the value of the trigger function is 1;
in this embodiment, the trigger function is designed as follows:
Wherein Λl (d) is a trigger function, d is the distance between the first obstacle and the vehicle, dsv is a safety distance, e is a natural base number, m is a system order, and mu is a trigger parameter.
In some situations of autopilot, safety constraints need to be set to ensure vehicle safety. The safety constraint condition comprises two types, namely unconstrained and constrained. The key is to ensure that the constraint is only valid in a specified stage and ensure that the controller stably transits between the unconstrained and constrained stages, in order to solve the problem, the trigger function is provided, when no obstacle exists, d-infinity, and the trigger function is a continuous and conductive function as can be seen from fig. 4, and the continuity can ensure that the system is stable in the constraint switching process.
Fig. 4 illustrates the variation at different values. For μ, the convergence speed to 0 is determined. A larger value results in a slower convergence speed towards 0. Thus, a smaller value facilitates a fast transition between non-zero and zero.
Step S3, based on the trigger function value, correcting the acquired original vehicle error by combining the obstacle function to obtain a corrected vehicle error, and ensuring that the vehicle is in a safety constraint, wherein the vehicle error comprises a vehicle transverse error and a vehicle course angle error;
In this embodiment, the process of acquiring the original vehicle error includes:
acquiring a reference track, and extracting a reference position in the reference track based on the reference track and the vehicle position;
acquiring a reference course angle of a reference position in a reference track;
and obtaining an original vehicle position error based on the reference position and the vehicle position, and obtaining an original vehicle course angle error based on the reference course angle and the vehicle course angle.
The corrected vehicle error is specifically:
θl(e1l)=e1lΛl(d)
Wherein ζl is the corrected vehicle error, Qfl is the upper limit of the safety constraint, Qgl is the lower limit of the safety constraint, e1l is the original vehicle error, θl(e1l) is the triggering auxiliary variable, Λl (d) is the triggering function, l is 1 and represents the vehicle position, and 2 is the vehicle course angle.
Specifically, by defining a vehicle tracking error e1=x1-xd, where xd=[eyd,eψd],eyd=0,eψd =0, e1=x1=[ey,eψ]=[e11,e12 is therefore. Defining a trigger auxiliary variable:
θl(e1l)=e1lΛl(d)
to describe the safety constraints, the following barrier functions are proposed:
Where Qfl and Qgl represent upper and lower limits, respectively, of the security constraint, ζ= [ ζ1,ξ2]T. When d > dsv, Λl (d) =0, so θl(e1l) =0, then ζl=e1l, then the system is in an unconstrained state, when d+.ltoreq.dsv, Λl(d)=1,θl(e1l)=e1l, then:
If e1l is close to Qfl or Qgl,ξl → infinity, in the feedback control system, ζl is used instead of the original system error e1l, and the error does not exceed the safety margin due to the existence of the feedback control mechanism.
And S4, carrying out vehicle steering fault-tolerant control based on the corrected vehicle tracking error and a radial basis function neural network, wherein the method comprises the following steps of:
and S4-1, generating a virtual control variable based on the corrected vehicle error, wherein the mathematical expression of the virtual control variable is as follows:
z1=[ξ1,ξ2]T
wherein alpha is a virtual control variable,A coefficient matrix derived for the obstacle function, k1 being a first positive gain parameter, z1 being a corrected vehicle error matrix,Is the derivative of the system reference value.
And step S4-2, obtaining a derivative of the corrected vehicle error based on the virtual control variable, wherein the derivative of the corrected vehicle error is as follows:
z2=x2-α
where z2 is the derivative of the corrected vehicle error and x2 is the derivative of the original vehicle error.
And S4-3, generating a control signal based on the corrected vehicle error and the derivative thereof.
Specifically, for the control section, first, it is necessary to build a vehicle dynamics model including a steering actuator failure, uncertainty, and external disturbance, and as shown in fig. 3, a vehicle tracking dynamics model is built in consideration of a system actuator failure, uncertainty, and external disturbance:
uf=u-P(x,u),P(x,u)=u-ρu-γ
Wherein a state variable x= [ x1,x2]T, where x1=[ey,eψ]T,Ey is a vehicle lateral error, specifically a lateral distance error of the center of gravity of the vehicle from the reference trajectory, eψ is a vehicle heading angle error, specifically an error from the reference heading angle, a (x) and B (x) are a first dynamic model parameter and a second dynamic model parameter, respectively, Δa (x) and Δb (x) represent uncertainty inside the system, u is a control signal, uf represents a post-fault steering system input, γ represents an additive fault, ρ represents a multiplicative fault, d (t) is an external disturbance, which is assumed to be continuous and bounded in this patent.
Wherein the first kinetic model parameter and the second kinetic model parameter are respectively:
Wherein Caf and Car represent cornering stiffness of each front tire and rear tire, respectively, δ represents front wheel steering angle, Iz is moment of inertia of the vehicle about the z-axis, m1 is vehicle mass, Vx is longitudinal speed of the vehicle, and lf and lr are distances from the center of gravity of the vehicle to the front and rear axles, respectively.
All ill-treated variables in the kinetic model were integrated together to give:
G(x,u)=ΔA(x)-(B(x)+ΔB(x))P(x,u)+ΔB(x)u
the radial basis neural network (RBFNNs) is then used to compensate for actuator failures and uncertainties, and a nonlinear disturbance observer is used to observe and compensate for fitting errors and external disturbances of the neural network.
RBFNNs has general approximation capability, and strong generalization and adaptation capability in a dynamic uncertainty environment. RBFNNs is used in the present application to approximate G (x, u) containing system uncertainty and actuator failure:
G(x,u)=ωTΞ(x)+τ(x),
Wherein the method comprises the steps ofRepresenting the RBFNN input vector, τ (x) represents the NN approximation error. ω= [ ω1,ω2,...,ωN]T and (x) = [ Σ1(x),Ξ2(x),...,ΞN(x)]T represent weight vector and basis function vector, respectively, and N represents the number of nodes of the neural network. The gaussian function is chosen as the radial basis function:
where ci=[c1i,c2i,...cqi]T and bi represent a width vector and a center vector, respectively. To minimize the approximation error, an optimal weight ω needs to be found by iteration. Since RBFNN is a generic approximator that can approximate any continuous function on a compact set with arbitrary precision, it is, therefore,And is also provided withR is a positive real number and is a small positive number which is unknown.
To compensate for neural network fitting errors and external disturbances, the following disturbance composite function is defined:
D(t)=τ(x)+d(t)
since the external disturbance is bounded, thenAnd is also provided withThenThe kinetic equation can be rewritten as:
defining an error variable of the system:
z2=x2-α,
where alpha is a virtual control variable and,
To estimate the composite perturbation function, a nonlinear perturbation observer is designed:
Is an auxiliary function and λ is a positive constant.
In the application, the derivation of the barrier function can be obtained:
definition z1 = ζ, then:
the virtual control variable α is designed as:
where k1 is the designed positive gain parameter.
To reduce the effect of noise on the system, a first order filtering is performed on the virtual input parameter α:
Where χ represents the design constant p of the filter defined as the filtering error,
The self-adaptive neural network fault-tolerant control law with dynamic safety constraint designed by adopting the back-stepping method is as follows:
Wherein u is a control signal,Being a pseudo-inverse of the second kinetic model parameter, a (x) being the first kinetic model parameter,For the optimal update of the weight vector, the xi (x) is a basis function vector,As an observation of the disturbance,As a derivative of the filtered value of the virtual control variable, k2 is a second positive gain parameter,Is designed as the update law of
Where h is a positive constant and ΛW represents a constant gain.
Finally, the limitations of all control signals in a closed loop system can be verified by using the lyapunov method. The convergence and rationality of the weight update law and control inputs are demonstrated. The simulation result of fig. 5 also demonstrates that, in the constraint activation range, the steering fault-tolerant control method (target control law) with dynamic safety constraint ensures that the vehicle runs within the safety boundary, and effectively improves the safety of the automatic driving vehicle.
The above functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.