CN-122008236-A - Control parameter optimization method for second-order balance robot
Abstract
The application relates to the field of robot balance control, and discloses a control parameter optimization method of a second-order balance robot; the method comprises the steps of establishing a dynamic model and a linear discrete state space model aiming at a second-order balance system formed by connecting a vehicle body and a swinging rod in series, establishing a linear quadratic regulator control frame, mapping diagonal elements of a state weight matrix as parameters to be optimized to a logarithmic scale search space after bilateral symmetry constraint dimension reduction treatment, optimizing by adopting a particle swarm optimization algorithm, establishing a composite cost function comprising a core error item, a control saturation item and a control stability item based on a vehicle body inclination response, a swinging rod inclination response, a control input and a closed loop pole, and outputting an optimal state weight matrix and corresponding control gain as optimal control parameters of a second-order balance robot. The method can improve the pertinence and the stability of the second-order balance robot control parameter setting.
Inventors
- Huang Kuntao
- ZHANG CHI
- ZOU CHENG
- CHEN XUBING
- ZHANG QIAN
Assignees
- 武汉工程大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260331
Claims (10)
- 1. The control parameter optimization method of the second-order balance robot is characterized by comprising the following steps of: S1, a dynamic model is built for a second-order balance robot, wherein the second-order balance robot is a second-order balance system formed by connecting a vehicle body and a swinging rod in series, the pitching of the vehicle body around an axle forms a first-order balance, and the swinging of the swinging rod around the vehicle body forms a second-order balance; S2, carrying out linearization processing near an upright balance point based on the dynamics model, establishing a state space model of the second-order balance robot, and carrying out discretization processing on the state space model to construct a linear quadratic regulator control frame, wherein a state vector comprises a left wheel angle, a right wheel angle, a vehicle body inclination angle, a swing rod inclination angle, a left wheel angular velocity, a right wheel angular velocity, a vehicle body inclination angular velocity and a swing rod angular velocity, and control inputs comprise a left wheel motor input and a right wheel motor input; S3, constructing a state weight matrix And input weight matrix State weight matrix For diagonal matrix, input weight matrix Is a diagonal matrix and is input with a weight matrix Fixing the state weight matrix as a preset input weight diagonal matrix Diagonal elements of (a) are used as parameters to be optimized; S4, according to the symmetrical characteristics of the left-right structure and the driving configuration of the second-order balance robot, symmetrical constraint is applied to the parameters to be optimized, so that the weight of a left wheel position item is equal to that of a right wheel position item, and the weight of a left wheel speed item is equal to that of a right wheel speed item, so that a parameter set to be optimized after dimension reduction is formed; S5, mapping the parameter set to be optimized to a logarithmic scale search space, initializing a particle group, and representing a group of candidate state weight parameters by the position of each particle; s6, decoding the candidate state weight parameters corresponding to the particles, recovering the actual linear weight value, and constructing a candidate state weight matrix And combine the input weight matrix Solving the corresponding linear quadratic regulator control gain ; S7, controlling gain Substituting the vehicle body inclination angle response and the swing rod inclination angle response obtained by simulation into a discrete time domain closed loop system corresponding to the state space model for simulation, and constructing a composite cost function value, wherein the composite cost function comprises a core error term, a control saturation term and a control stability term; S8, when the closed-loop system corresponding to the candidate state weight parameter is unstable or the control gain K fails to solve, setting the composite cost function value corresponding to the candidate state weight parameter as a preset maximum value; S9, updating the individual optimal position and the global optimal position of each particle according to the composite cost function value of each particle, and iteratively updating each particle according to the speed updating rule and the position updating rule of the particle swarm optimization algorithm; S10, when a preset termination condition is met, outputting an optimal state weight matrix corresponding to the global optimal particles And the optimal state weight matrix Corresponding control gain As the optimal control parameter of the second-order balance robot.
- 2. The method for optimizing control parameters of a second-order balance robot according to claim 1, wherein the state vector of the state space model is an eight-dimensional state vector, the eight-dimensional state vector sequentially comprises a left wheel angle, a right wheel angle, a vehicle body inclination angle, a swing rod inclination angle, a left wheel angular velocity, a right wheel angular velocity, a vehicle body inclination angular velocity and a swing rod angular velocity, and the control input is a two-dimensional control input comprising a left wheel motor input and a right wheel motor input.
- 3. The method for optimizing control parameters of the second-order balance robot according to claim 2 is characterized in that the second-order balance robot is subjected to linearization processing under the following simplified conditions that wheels and the ground are in pure rolling and have no relative sliding, the vehicle body and the swing rod are regarded as rigid bodies, elastic deformation is ignored, and the inductance of a motor is ignored.
- 4. A control parameter optimization method of a second order balance robot according to claim 3, wherein the state weight matrix Q is expressed as ; The input weight matrix R is expressed as ; And matrix the input weights Fixed as a diagonal matrix of preset input weights, and only the state weight matrix And optimizing.
- 5. The method for optimizing control parameters of a second order balance robot of claim 4, wherein said state weight matrix The imposed symmetry constraint includes left wheel position term weights Weights with right wheel position term Equal, left wheel speed term weight Weight with right wheel speed term And (3) reducing the dimension of the original eight independent parameters to be optimized to six parameters to be optimized.
- 6. The method for optimizing control parameters of a second-order balanced robot according to claim 5, wherein the parameter set to be optimized updates particle positions in a logarithmic scale search space and is restored to actual linear weight values by exponential mapping before fitness calculation to construct a candidate state weight matrix 。
- 7. The method of claim 6, wherein the composite cost function value is a weighted sum of a core error term, a control saturation term, and a control stability term for a candidate state weight matrix And carrying out joint evaluation on the corresponding control precision, execution realizability and stability margin.
- 8. The method for optimizing control parameters of a second-order balance robot according to claim 7, wherein the core error term is obtained by accumulating the sum of the absolute value of the inclination angle of the vehicle body and the absolute value of the inclination angle of the swing rod at each sampling time in the discrete time domain simulation process; The control saturation term is obtained according to the square accumulated value of the part of the control input exceeding the preset output limit; The control stability item is determined according to the relation between the maximum modulus of the closed loop pole and the stability safety threshold, and when the maximum modulus of the closed loop pole is smaller than the stability safety threshold, the control stability item takes zero; and when the maximum module value of the closed loop pole is larger than or equal to the stability safety threshold, the control stability term is obtained according to the square of the difference between the maximum module value of the closed loop pole and the stability safety threshold and by combining a preset stability penalty coefficient.
- 9. The method for optimizing control parameters of a second-order balance robot according to claim 8, wherein in step S5, a hybrid initialization strategy is adopted for initializing the particle swarm, so that a plurality of particles are randomly generated in a search space, and a baseline linear quadratic regulator parameter set based on artificial experience is used as a seed to be injected into an initial population; In step S9, the inertial weight adopts an update strategy that decreases linearly with the increase of the iteration number, and the individual cognitive factor and the social cognitive factor are both preset values; in step S10, the preset termination condition includes reaching a maximum number of iterations, or the composite cost function value is smaller than a preset reference value.
- 10. The method for optimizing control parameters of a second order balance robot of claim 9, wherein said input weight matrix Is fixed as ; The stability safety threshold is 0.98; The population scale of the particle swarm is 100, the maximum iteration number is 100, the inertia weight is linearly decreased from 0.9 to 0.4, and the individual cognitive factor and the social cognitive factor are both 1.5.
Description
Control parameter optimization method for second-order balance robot Technical Field The invention relates to the field of robot balance control, in particular to a control parameter optimization method of a second-order balance robot. Background The application relates to the technical field of robot balance control, in particular to a control parameter optimization method of a second-order balance robot. The second-order balance robot generally comprises a vehicle body, wheels and a swinging rod hinged with the vehicle body, wherein the pitching of the vehicle body around an axle forms a first-order balance, the swinging of the swinging rod around the vehicle body forms a second-order balance, and the second-order balance robot belongs to a series balance system with the requirement of double-stage posture adjustment. The existing balance control scheme mainly takes a traditional two-wheel self-balancing trolley as an object, generally builds a linear quadratic regulator based on a linearization model, and determines a state weight matrix and an input weight matrix by a manual parameter test mode so as to give consideration to attitude recovery and control output. The scheme mainly surrounds single-stage pitching balance expansion of the vehicle body, the parameter setting object is simpler, and the evaluation focus is also concentrated on the attitude error and basic control response of the vehicle body. However, for a second-order balance robot, the change of the inclination angle of the swing rod can transmit additional gravity moment and inertia disturbance to the vehicle body, the motion of the swing rod can be influenced reversely by the posture adjustment of the vehicle body, so that obvious coupling is formed between the vehicle body and the swing rod, in this case, if a parameter setting mode facing a single-stage balance system is still used, the two-stage balance cooperative relationship is easily damaged, and further the problems of difficult effective compensation of the posture error of the swing rod, mismatching of control input and hardware capability and insufficient closed-loop stability occur. Disclosure of Invention Aiming at the defects of the prior art, the invention provides a control parameter optimization method of a second-order balance robot, which aims to solve the technical problems in the prior art. The technical aim of the invention is realized by the following technical scheme: A control parameter optimization method of a second-order balance robot comprises the following steps: S1, a dynamic model is built for a second-order balance robot, wherein the second-order balance robot is a second-order balance system formed by connecting a vehicle body and a swinging rod in series, the pitching of the vehicle body around an axle forms a first-order balance, and the swinging of the swinging rod around the vehicle body forms a second-order balance; S2, carrying out linearization processing near an upright balance point based on the dynamics model, establishing a state space model of the second-order balance robot, and carrying out discretization processing on the state space model to construct a linear quadratic regulator control frame, wherein a state vector comprises a left wheel angle, a right wheel angle, a vehicle body inclination angle, a swing rod inclination angle, a left wheel angular velocity, a right wheel angular velocity, a vehicle body inclination angular velocity and a swing rod angular velocity, and control inputs comprise a left wheel motor input and a right wheel motor input; S3, constructing a state weight matrix And input weight matrixState weight matrixFor diagonal matrix, input weight matrixIs a diagonal matrix and is input with a weight matrixFixing the state weight matrix as a preset input weight diagonal matrixDiagonal elements of (a) are used as parameters to be optimized; S4, according to the symmetrical characteristics of the left-right structure and the driving configuration of the second-order balance robot, symmetrical constraint is applied to the parameters to be optimized, so that the weight of a left wheel position item is equal to that of a right wheel position item, and the weight of a left wheel speed item is equal to that of a right wheel speed item, so that a parameter set to be optimized after dimension reduction is formed; S5, mapping the parameter set to be optimized to a logarithmic scale search space, initializing a particle group, and representing a group of candidate state weight parameters by the position of each particle; s6, decoding the candidate state weight parameters corresponding to the particles, recovering the actual linear weight value, and constructing a candidate state weight matrix And combine the input weight matrixSolving the corresponding linear quadratic regulator control gain; S7, controlling gainSubstituting the vehicle body inclination angle response and the swing rod inclination angle response obtained by simulatio