CN117471972A - Self-balancing active planning route intelligent bicycle control method and device - Google Patents

Self-balancing active planning route intelligent bicycle control method and device Download PDF

Info

Publication number
CN117471972A
CN117471972A CN202311553355.9A CN202311553355A CN117471972A CN 117471972 A CN117471972 A CN 117471972A CN 202311553355 A CN202311553355 A CN 202311553355A CN 117471972 A CN117471972 A CN 117471972A
Authority
CN
China
Prior art keywords
bicycle
real
time
steering engine
path planning
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.)
Pending
Application number
CN202311553355.9A
Other languages
Chinese (zh)
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.)
Shandong Jianzhu University
Original Assignee
Shandong Jianzhu 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 Shandong Jianzhu University filed Critical Shandong Jianzhu University
Priority to CN202311553355.9A priority Critical patent/CN117471972A/en
Publication of CN117471972A publication Critical patent/CN117471972A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Abstract

The invention relates to the field of automatic driving of bicycles, and provides an intelligent bicycle control method and device for a self-balancing active planning route. The method comprises the steps of designing an MPC path planning algorithm controller according to a bicycle dynamics model; based on the yaw angle of the position of the bicycle and the speed of the center of the bicycle body, an MPC path planning algorithm controller is adopted to obtain an optimal track decision from an initial point to a target point; based on the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed, a cascade PID controller is adopted, and the inclination angle of the vehicle body is changed by combining the steering engine footage value obtained in real time, so that the steering engine output torque and the motor output rotating speed are obtained; and controlling the yaw angle of the vehicle according to the output torque of the steering engine and the output rotating speed of the motor based on the optimal track decision, so that the bicycle can carry out automatic path planning driving.

Description

Self-balancing active planning route intelligent bicycle control method and device
Technical Field
The invention relates to the field of automatic driving of bicycles, in particular to an intelligent bicycle control method and device for a self-balancing active planning route.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
At present, in the technical field of automatic driving of bicycles, a plurality of research achievements are used for establishing structural mechanics analysis and modeling on a bicycle integral frame, only the relation between momentum wheel torque and a bicycle mechanical structure is considered for the research of a vehicle in a static state, and the traditional PID control is adopted in the field of automatic driving decision-making, so that parameters are required to be manually adjusted, and the vehicle dynamics model and track planning decision-making of the bicycle in a multi-input complex scene are not considered.
Disclosure of Invention
In order to solve the technical problems in the background technology, the invention provides a self-balancing active planning route intelligent bicycle control method and device, and the invention realizes automatic planning driving of the track of a momentum wheel type self-balancing bicycle.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
the first aspect of the invention provides a self-balancing active planning route intelligent bicycle control method.
A self-balancing active planning route intelligent bicycle control method comprises the following steps:
according to the structural characteristics of the bicycle, a bicycle dynamics model is established;
designing an MPC path planning algorithm controller according to a bicycle dynamics model;
acquiring a real-time vehicle body inclination angle, a yaw angle of a vehicle position, a speed of a vehicle body center and a real-time momentum wheel motor rotating speed of a bicycle;
based on the yaw angle of the position of the bicycle and the speed of the center of the bicycle body, an MPC path planning algorithm controller is adopted to obtain an optimal track decision from an initial point to a target point;
based on the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed, a cascade PID controller is adopted, and the inclination angle of the vehicle body is changed by combining the steering engine footage value obtained in real time, so that the steering engine output torque and the motor output rotating speed are obtained;
and controlling the yaw angle of the vehicle according to the output torque of the steering engine and the output rotating speed of the motor based on the optimal track decision, so that the bicycle can carry out automatic path planning driving.
Further, the process of establishing the bicycle dynamics model includes: and (3) taking the rear wheel of the wheel as an origin, and establishing a rectangular coordinate system to obtain a bicycle dynamics model.
Further, the process of adopting the MPC path planning algorithm controller comprises the following steps: the following formula is adopted to enable the output value of the MPC path planning algorithm controller to meet the expected target as soon as possible:
w(k+i)=α i Y(k)+(1-α i )Y ref
wherein alpha is i For the function slope, the larger the value, the faster the curve is increased, and vice versa, Y ref For the target expectation, Y (k) is the current value.
Further, in the process of adopting the MPC path planning algorithm controller, the method further comprises the following steps: and designing a total cost function, and adjusting the weight parameter of the expected target output by the MPC path planning algorithm controller according to the total cost function.
Further, the total cost function is:
J=J 1 q+J 2 r
wherein J is 1 Representing a first cost function, J 2 Representing a second cost function, q being the weight of the first cost function, r being the weight of the second cost function.
Further, the process of obtaining the real-time vehicle body inclination angle and the real-time momentum wheel motor rotation speed comprises the following steps: a steering engine position type PID controller and a cascade PID controller are adopted to obtain the inclination angle of the bicycle; based on the inclination angle of the bicycle, a cascade PID control function is adopted to control the magnitude of a mechanical zero point, so that the real-time inclination angle of the bicycle body and the real-time rotational speed of the momentum wheel motor are obtained.
Further, the steering engine position type PID controller adopts the following formula:
u(k)=Kp×e(k)+Ki×∑i=0ke(i)+Kd×[e(k)-e(k-1)]
wherein k is a sampling sequence number, and u (k) is a computer output value at the kth sampling time; e (k) is the deviation value input at k sampling moments; e (k-1) represents the deviation value input at the k-1 th sampling time, ki represents the integral coefficient, and Kd represents the differential coefficient.
Further, the process of adopting the MPC path planning algorithm controller comprises the following steps: obtaining a track by adopting a fusion equation, wherein the fusion equation is as follows:
wherein,for the body speed of the vehicle in the X-axis direction of the coordinate system,/->For the body speed of the vehicle in the Y-axis direction of the coordinate system,/->At low speeds, the yaw rate of the vehicle is taken as the angular velocity of the vehicle corner, a (k) being the trajectory.
The second aspect of the invention provides a self-balancing active planning route intelligent bicycle control device.
A self-balancing active planning route intelligent bicycle control device comprises:
a model building module configured to: according to the structural characteristics of the bicycle, a bicycle dynamics model is established;
a design module configured to: designing an MPC path planning algorithm controller according to a bicycle dynamics model;
a data acquisition module configured to: acquiring a real-time vehicle body inclination angle, a yaw angle of a vehicle position, a speed of a vehicle body center and a real-time momentum wheel motor rotating speed of a bicycle;
a path planning module configured to: based on the yaw angle of the position of the bicycle and the speed of the center of the bicycle body, an MPC path planning algorithm controller is adopted to obtain an optimal track decision from an initial point to a target point;
a self-balancing module configured to: based on the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed, a cascade PID controller is adopted, and the inclination angle of the vehicle body is changed by combining the steering engine footage value obtained in real time, so that the steering engine output torque and the motor output rotating speed are obtained;
an autopilot module configured to: and controlling the yaw angle of the vehicle according to the output torque of the steering engine and the output rotating speed of the motor based on the optimal track decision, so that the bicycle can carry out automatic path planning driving.
A third aspect of the invention provides a computer device.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the self-balancing active route planning intelligent bicycle control method according to the first aspect when executing the program.
Compared with the prior art, the invention has the beneficial effects that:
the invention takes the yaw angle of the vehicle position of the bicycle and the speed of the center of the vehicle body as the input quantity of the MPC path planning algorithm controller, the controller calculates the optimal path according to the initial point and the end point, adopts limited step length to perform rolling optimization, improves path planning precision compared with cascade PID control, saves partial calculation force compared with LQR, ensures that the calculation result has real-time performance, and improves the stability facing disturbance under a multi-scene input time-varying system.
The invention adopts the MPC path planning algorithm controller and the cascade PID controller to plan the path of the bicycle, ensure the self-balance of the bicycle and realize the automatic planning and driving of the track of the momentum wheel type self-balancing bicycle.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention.
FIG. 1 is a flow chart of a self-balancing active route planning intelligent bicycle control method shown in the present invention;
fig. 2 is a diagram of the bicycle of the present invention after the coordinate system is established.
Detailed Description
The invention will be further described with reference to the drawings and examples.
It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present invention. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
It is noted that the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of the present disclosure. It should be noted that each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by special purpose hardware-based systems which perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
Example 1
As shown in fig. 1, this embodiment provides a self-balancing active route planning intelligent bicycle control method, and this embodiment is illustrated by applying the method to a server, and it can be understood that the method may also be applied to a terminal, and may also be applied to a system and a terminal, and implemented through interaction between the terminal and the server. The server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, security services CDNs, basic cloud computing services such as big data and artificial intelligent platforms and the like. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein. In this embodiment, the method includes the steps of:
according to the structural characteristics of the bicycle, a bicycle dynamics model is established;
designing an MPC path planning algorithm controller according to a bicycle dynamics model;
acquiring a real-time vehicle body inclination angle, a yaw angle of a vehicle position, a speed of a vehicle body center and a real-time momentum wheel motor rotating speed of a bicycle;
based on the yaw angle of the position of the bicycle and the speed of the center of the bicycle body, an MPC path planning algorithm controller is adopted to obtain an optimal track decision from an initial point to a target point;
based on the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed, a cascade PID controller is adopted, and the inclination angle of the vehicle body is changed by combining the steering engine footage value obtained in real time, so that the steering engine output torque and the motor output rotating speed are obtained;
and controlling the yaw angle of the vehicle according to the output torque of the steering engine and the output rotating speed of the motor based on the optimal track decision, so that the bicycle can carry out automatic path planning driving.
The following describes the present embodiment in detail with reference to the accompanying drawings, including two parts of bicycle automatic driving track planning and bicycle momentum wheel type self-balancing control.
Wherein, the process of bicycle autopilot trajectory planning includes:
according to the structural characteristics of the bicycle, a bicycle dynamics model is established;
according to a bicycle dynamics model, designing an MPC path planning algorithm controller;
the yaw angle of the vehicle position and the speed of the vehicle body center of the bicycle are acquired, the yaw angle of the vehicle position and the speed parameters of the vehicle body center are input into the MPC path planning algorithm controller for processing, and the optimal track decision from the initial point to the target point is acquired, so that the yaw angle of the bicycle is controlled according to the steering engine output torque, and the bicycle is driven in an automatic path planning mode.
The process for establishing the bicycle dynamics model according to the bicycle structural characteristics comprises the following steps: the rear wheel of the wheel is the point B, and a rectangular coordinate system is established, and the longitudinal speed, the transverse speed and the course angular speed of the rectangular coordinate system are shown in figure 2. When the vehicle kinematics is modeled, only the front wheel, the rear wheel and the wheelbase are used for representing, the slip angle of the vehicle is beta, namely an included angle between the vehicle and the X axis, the length of the vehicle axis is L1+L2, the bicycle turning kinematics model can be regarded as that the rear wheel makes circular motion around one point, the turning radius is R, O represents the instantaneous speed center of the vehicle, and ψ is yawThe angle, the state of the vehicle, can be expressed as X, Y, β+ψ. In the middle-low speed state, the rear wheel steering angle delta r Toward 0, where the rear wheel steering angle is considered to be 0. In the transient state, the point O of the vehicle is the transient center of the transient rotation of the vehicle, OB is perpendicular to AB, the connection OC and OC are the track radius R of the vehicle, and at the moment, the vehicle body speed direction V is the tangential direction of a circle with the radius R.
The yaw angle of the position of the bicycle and the speed of the center of the bicycle body are used as the input quantity of the MPC path planning algorithm controller, the controller calculates the optimal path according to the initial point and the end point, and the controller adopts a limited step length to perform rolling optimization. The MPC path planning algorithm controller processes constraint, takes brake linear control as hard constraint, takes rear wheel motor torque as soft constraint condition, adopts finite time domain algorithm, prescribes maximum and minimum motor torque, and controls a maximum and minimum brake control threshold, and selects finite step length control from 0 to positive infinity time-space in the future.
According to the decision, outputting a fusion equation with detailed path, speed information and course angle deviation value tracks, obtaining tracks according to the fusion equation, and sending the tracks to a controller for tracking, wherein the controller is connected by a central chip MCU (micro control unit), the tracks output to the controller are the final output of an MPC (MPC path planning algorithm) controller, namely, the path information, and the execution period is 10Hz as same as the decision. This is a reasonable frequency for the MPC path planning algorithm controller to output more stably.
Wherein, the fusion equation is:
wherein,for the body speed of the vehicle in the X-axis direction of the coordinate system,/->For the body speed of the vehicle in the Y-axis direction of the coordinate system,/->At low speeds, the yaw rate of the vehicle can be seen as the angular velocity of the vehicle corner, a (k) being the trajectory.
The invention predicts 10% -20% step length in the complete track prediction control range, can lead the output result to be more ideal, and simultaneously ensures the MCU processing frequency and the anti-interference capability of the model.
Collecting the yaw angle of the vehicle position and the speed of the vehicle body center at an initial time, and integrating the yaw angle of the vehicle position and the speed parameters of the vehicle body center into functions of yaw angle x, y and angular speed:
wherein a is a (k) in the fusion equation, p is a prediction step length, Y 0 (k+1) is the predicted output of the system at the time k+1, u is the control step length, and Deltau (k) is the data deviation between the last time and the previous time.
Creating a new matrix according to the parameter input values, and realizing new prediction output as follows:
wherein A is an input value of a (k), deltau is a data deviation between the last time and the last time of data, Y 0 And outputting the original prediction.
The formula adopts a first-order filtering method to enable an actual value to reach an expected value, and an MPC path planning algorithm is used, so that an output value output by a controller reaches an expected target as soon as possible, and the formula is as follows:
w(k+i)=α i Y(k)+(1-α i )Y ref
where w (k+i) is the target tracking function, α i The larger the value, the faster the curve is increased for the function slope magnitude, and vice versa. Y is Y ref For the target expectation, Y (k) is the current value.
Setting a cost function, namely, the actual value of the system is expected to control the expected quick tracking, and in the discussion of the actual problem, setting two target directions, namely, the quick tracking target in a limited step length is taken as a target, and the system is taken as a target for increasing the energy utilization rate as the energy consumption is lower.
The first cost function is:
the second cost function is:
the comprehensive cost function is:
wherein q is the weight of the first cost function, r is the weight of the second cost function, w (k+i) is the target tracking function, y (k+j) is the system prediction output, and u is the control step length. Adjusting weight parameters of an expected target output by the MPC path planning algorithm controller according to the selected comprehensive cost function, and focusing on selecting a direction of the cost function by changing the size of the weight coefficients, for example: q > r, the function is heavier and faster to obtain the target value, the path is tracked, the q < r function energy is smaller, the energy utilization rate is increased, and the path optimal solution is further calculated.
And solving a bias guide about Deltau for the J cost function to be equal to 0, and solving an optimal solution when the Deltau is the value of the overall system, wherein the formula is as follows:
i.e. Δu= (a T QA+p i ) -1 ·A T ·(W-Y 0 )
Obtaining future P times at K timesMeasuring value, taking predicted value at K+1 momentObtaining the true output value Y (k+1) of the system at the time K+1, the error +.>
Calculating the output quantity y of single final feedback cor (k+1):
y cor (k+1)=Y 0 (k+1)+hi*e(k+1)
Wherein Y is 0 The real output value of the system is obtained at the moment (k+1) of k+1, e (k+1) is an error, and hi is a variable coefficient (hi takes 0 to 1).
y cor (k+1)=Y 0 (k+1)+hi*e(k+1)
The output quantity (track) fed back once is obtained and is output to the steering engine, the torque of the steering engine is increased to realize the optimal track decision from the initial point to the target point, and the yaw angle of the vehicle is controlled according to the output torque of the steering engine, so that the bicycle can achieve automatic path planning driving.
And when the single cycle is finished, the motor value output last time is required to be updated as the input quantity of the next system MPC path planning algorithm controller, and rolling optimization is carried out on the time K and the time K+1.
Wherein, the process of the momentum wheel type self-balancing control of the bicycle comprises the following steps:
according to a single-vehicle mechanical system of a momentum wheel fusion steering engine control type, a single-vehicle physical model of the momentum wheel fusion steering engine control type is established;
according to a physical model of a momentum wheel fusion steering engine control type bicycle, designing an upright posture cascade PID controller and integrating steering engine auxiliary balance control;
the method comprises the steps of obtaining a real-time vehicle body inclination angle and a real-time momentum wheel motor rotating speed, inputting the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed into a cascade PID controller for processing, continuously obtaining a steering engine footage value, carrying the obtained value into a piecewise function for operation, changing the inclination angle of the vehicle body, finally obtaining the momentum wheel motor torque, controlling the output torque of the momentum wheel motor according to the momentum wheel motor torque, and enabling the momentum wheel to be balanced by continuously changing the acceleration and then changing the force.
Wherein the piecewise function is:
C=Kp×(S1-S0)+Kd×V
wherein C is the final change quantity, kp and Kd are parameters, S1 is the current steering engine footage value, S0 is the steering engine median value, V is the current bicycle speed, and C and the current vehicle body inclination angle value are added and then are input into a cascade PID controller together, so that the torque of the momentum wheel motor is finally obtained.
And (3) inputting a steering engine PID control function, wherein the control function is as follows:
u(k)=Kp×e(k)+Ki×∑i=0ke(i)+Kd×[e(k)-e(k-1)]
the steering wheel footing angle is obtained, and the steering of the momentum wheel fusion steering engine control type bicycle is realized through the change of the steering wheel footing angle.
And acquiring the inclination angle of the body of the momentum wheel type unmanned bicycle and inputting the inclination angle into the upright posture cascade PID controller so as to control the mechanical zero point.
When the momentum wheel fusion steering engine control type bicycle needs a straight running state, a DMP (the DMP is fully called as a digital motion processor, is an embedded processor and is integrated on an MPU6050 module, the DMP acquires data from an accelerometer, a gyroscope and other third party sensors, the DMP fuses and processes the data into quaternion data, pitch angle X, roll angle Y and heading angle Z can be obtained by means of DMP resolving), errors of real-time Z axis values and central line Z axis values are detected through the gyroscope, the errors are multiplied by a coefficient KP, the result is fused into first-order complementary filtering to operate, finally, steering engine footage values are changed, and the momentum wheel fusion steering engine control type bicycle can stably keep straight running.
The final steering engine footage value is changed by adopting the following formula:
C=K×(Z1-Z)+(1-k)×C1
wherein C is the difference value of the steering engine footage, K is a parameter, Z1 is a real-time calculated heading angle value, Z is a heading angle median, C1 is the difference value of the steering engine footage obtained by the last calculation, and the application of K and (1-K) is first-order complementary filtering.
In the cascade PID controller, the outermost ring is a speed ring, and the speed ring plays a role in letting the momentum wheel output angular momentum to let the bicycle self-balance, and simultaneously, when the bicycle reaches balance, the target value of the bicycle, namely the momentum wheel rotating speed, is kept to be 0. The motor rotation speed collected by the encoder in real time is used as an input value of a speed ring, and a target value of the motor rotation speed is the final output value of the speed ring, namely an expected value of the inclination angle of the vehicle body.
The inner ring is an angle ring, the input of the angle ring is the real-time vehicle body inclination angle angular speed acquired after the angle ring is resolved by a gyroscope through a DMP (the gyroscope needs to stand for 1-3 minutes and waits for the numerical value to be stable), the target value of the angle ring is a mechanical zero point, and the mechanical zero point is the position zero point of an X axis of the bicycle at a balance position through the gyroscope resolving. Finally, the output value of the angle ring is the expected value of the inclination angle and the angular speed of the vehicle body.
The angular velocity ring has the fastest response speed and therefore serves as the innermost ring. The angular velocity loop is closed loop for the left and right offset velocity acquired in real time, the value is generated immediately when the offset exists, and the response speed of the angular velocity loop is faster than that of the first two loops. The angular velocity ring is used as the innermost ring, the input value of the angular velocity ring is the vehicle body dip angle angular velocity acquired by the gyroscope in real time, and the target value of the angular velocity ring is the output value of the angular ring, namely the vehicle body dip angle angular velocity expected value. Finally, the output value of the angular velocity ring is the output torque of the motor.
In the running speed closed loop, the calculated output value of the speed loop is a momentum wheel fusion steering engine control type intelligent balance bicycle, in a mechanical zero angle, the angle of an X axis which is required to be calculated by a gyroscope is added with the mechanical zero angle to convert the speed control into angle control, and only the X axis data is required to be acquired by an attitude sensor. The speed ring circulates once in 100ms, the angle ring circulates once in 10ms, the angular speed ring circulates once in 2ms, the output of the outer ring needs to be added with an amplitude limit first and then transmitted to the inner ring, the actual measurement effect is very stable, the vibration can not be generated, and obvious reaction lag can not occur.
For balance control, the control of the angle, the angular speed and the speed is converted into control of the angle, the angular speed and the speed through cascade PID, and the output of a final angular speed ring in the whole control system is controlled by a motor so as to control the rotation of the momentum wheel to keep balance. The cascade PID algorithm is implemented in different periods of angular velocity loop, angle loop and velocity loop control. After the initialization procedure is completed, a timed interrupt with a period of 2ms is initiated. The PIT interruption is used for providing time sequence zone bit control for program execution for the algorithm in the cycle, and different control links are executed in different periods according to the zone bit.
In steering engine PID control, the steering engine control generally selects position type PID, firstly, the integral term is abandoned, and as the working principle of the steering engine is different from that of the direct current motor, the steering engine can rotate the corresponding angle only by inputting a PWM signal with a certain duty ratio, so that the steering engine system does not need to continuously output, and the steering engine only needs to update the output once every period, and no static difference can occur. The rejection of the integral term does not have any effect, and various complex integral operations in the position formula can be avoided; the differential term is reserved, and the steering engine controls the steering ring of the whole automobile model, so that the steering ring of the automobile model needs to steer in advance, namely, needs to rotate in advance before reaching a curve, and the function is mainly regulated by GPS tracking, and is secondly the differential term by the controller. The differential term adjusts the output of the controller according to the deviation between the current moment and the last moment, and when the vehicle model is about to enter the curve, the differential term plays a positive adjusting role due to the fact that the path is positively deviated, namely the vehicle model turns in advance before entering the curve; when the turning of the automobile model is finished, the field deviation tends to be reduced, and the differential term plays a negative regulation role, namely, a small angle is formed before the automobile model is bent. Therefore, the effect of quick in-bending and stable out-bending is realized, and the effect is the ideal condition of momentum wheel fusion steering engine control type bicycle turning and auxiliary balance. The control quantity output value of each time of the steering engine is not related to the control quantity output value of the last time, the control quantity output value is only related to the past state, and the steering engine needs to quickly rotate to a certain angle. The position PID does not need to memorize the control quantity, but directly calculates the deviation value to obtain the expected control quantity. Meanwhile, in actual measurement, under the state of high-speed tracking, the momentum wheel fusion steering engine control type bicycle is extremely easy to turn on one's side due to the fact that the moment turning angle is too large, so that when large-angle turning is needed, time delay is needed, turning time is increased, the momentum wheel fusion steering engine control type bicycle is prevented from turning on one's side, and stable running is guaranteed.
The position PID can be obtained by discretizing a PID formula, and the discretization is performed because the computer control is a sampling control, which can only calculate the control amount according to the deviation of the sampling time, but cannot continuously output the control amount as in the analog control, and perform the continuous control. Because of this feature, the integral term and the derivative term in the PID formula cannot be directly used, and a discretization process must be performed.
After discretization, a position type PID, also called a full-scale type PID, is obtained:
u(k)=Kp×e(k)+Ki×∑i=0ke(i)+Kd×[e(k)-e(k-1)]
wherein k is a sampling sequence number, and u (k) is a computer output value at the kth sampling moment; e (k) is the deviation value input at k sampling moments; e (k-1) represents the deviation value input at the k-1 th sampling time, ki represents the integral coefficient, and Kd represents the differential coefficient.
The steering engine position type PID control and the cascade PID control are used for controlling the inclination angle of the steering engine control type bicycle, the steering engine position type PID control function is input to the cascade PID control function, the mechanical zero point is controlled, the real-time body inclination angle and the angular velocity value of the steering engine type unmanned bicycle and the real-time rotating speed of the steering engine motor are obtained, the real-time body inclination angle and the real-time rotating speed of the steering engine motor are input to the cascade PID controller for processing, the torque of the steering engine motor is obtained, the output torque of the steering engine motor is controlled according to the torque of the steering engine motor, the steering engine is controlled by the cooperation position type PID to beat auxiliary balance, and the steering engine control type bicycle is enabled to keep balanced and stably run.
Example two
The embodiment provides an intelligent bicycle control device for a self-balancing active planning route.
A self-balancing active planning route intelligent bicycle control device comprises:
a model building module configured to: according to the structural characteristics of the bicycle, a bicycle dynamics model is established;
a design module configured to: designing an MPC path planning algorithm controller according to a bicycle dynamics model;
a data acquisition module configured to: acquiring a real-time vehicle body inclination angle, a yaw angle of a vehicle position, a speed of a vehicle body center and a real-time momentum wheel motor rotating speed of a bicycle;
a path planning module configured to: based on the yaw angle of the position of the bicycle and the speed of the center of the bicycle body, an MPC path planning algorithm controller is adopted to obtain an optimal track decision from an initial point to a target point;
a self-balancing module configured to: based on the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed, a cascade PID controller is adopted, and the inclination angle of the vehicle body is changed by combining the steering engine footage value obtained in real time, so that the steering engine output torque and the motor output rotating speed are obtained;
an autopilot module configured to: and controlling the yaw angle of the vehicle according to the output torque of the steering engine and the output rotating speed of the motor based on the optimal track decision, so that the bicycle can carry out automatic path planning driving.
It should be noted that the model building module, the design module, the data obtaining module, the path planning module, the self-balancing module, and the automatic driving module are the same as the examples and the application scenarios implemented by the steps in the first embodiment, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above may be implemented as part of a system in a computer system, such as a set of computer-executable instructions.
Example III
The present embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps in the self-balancing active route planning intelligent bicycle control method according to the above embodiment.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random access Memory (Random AccessMemory, RAM), or the like.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The intelligent bicycle control method for the self-balancing active planning route is characterized by comprising the following steps of:
according to the structural characteristics of the bicycle, a bicycle dynamics model is established;
designing an MPC path planning algorithm controller according to a bicycle dynamics model;
acquiring a real-time vehicle body inclination angle, a yaw angle of a vehicle position, a speed of a vehicle body center and a real-time momentum wheel motor rotating speed of a bicycle;
based on the yaw angle of the position of the bicycle and the speed of the center of the bicycle body, an MPC path planning algorithm controller is adopted to obtain an optimal track decision from an initial point to a target point;
based on the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed, a cascade PID controller is adopted, and the inclination angle of the vehicle body is changed by combining the steering engine footage value obtained in real time, so that the steering engine output torque and the motor output rotating speed are obtained;
and controlling the yaw angle of the vehicle according to the output torque of the steering engine and the output rotating speed of the motor based on the optimal track decision, so that the bicycle can carry out automatic path planning driving.
2. The method for intelligent bicycle control of a self-balancing active planned route according to claim 1, wherein the process of building a bicycle dynamics model comprises: and (3) taking the rear wheel of the wheel as an origin, and establishing a rectangular coordinate system to obtain a bicycle dynamics model.
3. The method for intelligent bicycle control of a self-balancing actively planned route according to claim 1, wherein the process of using an MPC path planning algorithm controller comprises: the following formula is adopted to enable the output value of the MPC path planning algorithm controller to meet the expected target as soon as possible:
w(k+i)=α i Y(k)+(1-α i )Y ref
wherein alpha is i For the function slope, the larger the value, the faster the curve is increased, and vice versa, Y ref For the target expectation, Y (k) is the current value.
4. The method for intelligent bicycle control of a self-balancing actively planned route according to claim 1, further comprising, in the process of using the MPC path planning algorithm controller: and designing a total cost function, and adjusting the weight parameter of the expected target output by the MPC path planning algorithm controller according to the total cost function.
5. The method for controlling the intelligent bicycle of the self-balancing active planning route according to claim 1, wherein the total cost function is:
J=J 1 q+J 2 r
wherein J is 1 Representing a first cost function, J 2 Representing a second cost function, q being the weight of the first cost function, r being the weight of the second cost function.
6. The method for controlling the intelligent bicycle of the self-balancing active planning route according to claim 1, wherein the process of obtaining the real-time vehicle body inclination angle and the real-time momentum wheel motor rotation speed comprises the following steps: a steering engine position type PID controller and a cascade PID controller are adopted to obtain the inclination angle of the bicycle; based on the inclination angle of the bicycle, a cascade PID control function is adopted to control the magnitude of a mechanical zero point, so that the real-time inclination angle of the bicycle body and the real-time rotational speed of the momentum wheel motor are obtained.
7. The intelligent bicycle control method for the self-balancing active planning route according to claim 1, wherein the steering engine position type PID controller adopts the following formula:
u(k)=Kp×e(k)+Ki×∑i=0ke(i)+Kd×[e(k)-e(k-1)]
wherein k is a sampling sequence number, and u (k) is a computer output value at the kth sampling time; e (k) is the deviation value input at k sampling moments; e (k-1) represents the deviation value input at the k-1 th sampling time, ki represents the integral coefficient, and Kd represents the differential coefficient.
8. The method for intelligent bicycle control of a self-balancing actively planned route according to claim 1, wherein the process of using an MPC path planning algorithm controller comprises: obtaining a track by adopting a fusion equation, wherein the fusion equation is as follows:
wherein,for the body speed of the vehicle in the X-axis direction of the coordinate system,/->For the body speed of the vehicle in the Y-axis direction of the coordinate system,/->At low speeds, the yaw rate of the vehicle is taken as the angular velocity of the vehicle corner, a (k) being the trajectory.
9. The utility model provides a self-balancing initiative planning route intelligence bicycle controlling means which characterized in that includes:
a model building module configured to: according to the structural characteristics of the bicycle, a bicycle dynamics model is established;
a design module configured to: designing an MPC path planning algorithm controller according to a bicycle dynamics model;
a data acquisition module configured to: acquiring a real-time vehicle body inclination angle, a yaw angle of a vehicle position, a speed of a vehicle body center and a real-time momentum wheel motor rotating speed of a bicycle;
a path planning module configured to: based on the yaw angle of the position of the bicycle and the speed of the center of the bicycle body, an MPC path planning algorithm controller is adopted to obtain an optimal track decision from an initial point to a target point;
a self-balancing module configured to: based on the real-time vehicle body inclination angle and the real-time momentum wheel motor rotating speed, a cascade PID controller is adopted, and the inclination angle of the vehicle body is changed by combining the steering engine footage value obtained in real time, so that the steering engine output torque and the motor output rotating speed are obtained;
an autopilot module configured to: and controlling the yaw angle of the vehicle according to the output torque of the steering engine and the output rotating speed of the motor based on the optimal track decision, so that the bicycle can carry out automatic path planning driving.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps in the self-balancing active route planning intelligent bicycle control method according to any of claims 1-8 when the program is executed by the processor.
CN202311553355.9A 2023-11-20 2023-11-20 Self-balancing active planning route intelligent bicycle control method and device Pending CN117471972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311553355.9A CN117471972A (en) 2023-11-20 2023-11-20 Self-balancing active planning route intelligent bicycle control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311553355.9A CN117471972A (en) 2023-11-20 2023-11-20 Self-balancing active planning route intelligent bicycle control method and device

Publications (1)

Publication Number Publication Date
CN117471972A true CN117471972A (en) 2024-01-30

Family

ID=89632803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311553355.9A Pending CN117471972A (en) 2023-11-20 2023-11-20 Self-balancing active planning route intelligent bicycle control method and device

Country Status (1)

Country Link
CN (1) CN117471972A (en)

Similar Documents

Publication Publication Date Title
Liu et al. Adaptive sliding mode based disturbance attenuation tracking control for wheeled mobile robots
CN109884900B (en) Design method of harvester path tracking controller based on adaptive model predictive control
Borhaug et al. Cross-track control for underactuated autonomous vehicles
WO2018176597A1 (en) Unmanned bicycle balance control method based on rate gyroscope
CN102343985A (en) Satellite time optimal posture maneuvering method with reaction flywheel
Farid et al. Computationally efficient algorithm to generate a waypoints-based trajectory for a quadrotor UAV
An et al. Adaptive trajectory tracking controller design for a quadrotor UAV with payload variation
Wang et al. Non-cascaded dynamic inversion design for quadrotor position control with L1 augmentation
CN110109354B (en) Self-adaptive sliding mode control method for counteractive wheel balance bicycle robot
CN208384428U (en) Stable turntable system based on reversed bit shift compensation
Tian et al. Control of different-axis two-wheeled self-balancing vehicles
CN113110527B (en) Cascading control method for finite time path tracking of autonomous underwater vehicle
CN111781938B (en) Under-actuated underwater vehicle and stabilizing method and device thereof
Ramaswamy et al. Formation control of car-like mobile robots: A Lyapunov function based approach
CN117471972A (en) Self-balancing active planning route intelligent bicycle control method and device
CN108931986A (en) A kind of two wheels automobile self-balancing control method, device and storage medium
Ou et al. Balance control of a single wheel robot
CN114355959B (en) Attitude output feedback control method, device, medium and equipment for aerial robot
CN112947072B (en) Mobile robot driving control method, system and equipment based on sliding mode variable structure
Koslosky et al. On using fuzzy logic to control a simulated hexacopter carrying an attached pendulum
Jin et al. Development of a stable control system for a segway
Patil et al. Self Balancing Robot
Božić et al. Advantages of a combination of PD and PID controller over PID controller in the example of quadcopter control and stabilization
CN113771837B (en) Unmanned bicycle control method and system
Zhang et al. Design of the outdoor cruising control system of the quadrotor drone

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