Unmanned bicycle control method and system

文档序号:1946556 发布日期:2021-12-10 浏览:23次 中文

阅读说明:本技术 一种无人自行车控制方法及系统 (Unmanned bicycle control method and system ) 是由 林海 王小冬 李晓辉 李�杰 赵毅 董媛 于 2021-09-03 设计创作,主要内容包括:本发明公开了一种无人自行车控制方法及系统,建模得到自行车系统的动力学模型;对自行车系统的动力学模型进行线性化处理得到线性模型;采集车身倾斜角度与给定期望值的偏差以及自行车行驶速度,输入线性模型中得到车身倾斜角与把手转向角的单输入单输出模型,设计基于指数趋近律的自适应滑模控制器;根据自适应控制器求解得到把手转向角和自行车设定转速值,根据把手转向角通过步进电机控制自行车的前叉系统转向,使用FOC方法利用自行车设定转速值和自行车给定转速值的偏差调节电流控制电机的转速,实现自行车的自平衡控制。为无人自行车系统的设计与实现提供了一种思路,对系统中每个环节的处理确保了整个系统的可靠性和可行性。(The invention discloses an unmanned bicycle control method and system, wherein a dynamic model of a bicycle system is obtained through modeling; carrying out linearization processing on a dynamic model of the bicycle system to obtain a linear model; acquiring the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into a linear model to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of a handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law; the steering angle of a handle and a set rotating speed value of a bicycle are obtained through solving by a self-adaptive controller, the steering of a front fork system of the bicycle is controlled through a stepping motor according to the steering angle of the handle, the rotating speed of the motor is controlled by using an FOC method through the deviation of the set rotating speed value of the bicycle and the set rotating speed value of the bicycle, and self-balancing control of the bicycle is achieved. The method provides a thought for the design and implementation of the unmanned bicycle system, and ensures the reliability and feasibility of the whole system by processing each link in the system.)

1. An unmanned bicycle control method is characterized by comprising the following steps:

s1, modeling the bicycle system to obtain a dynamic model of the bicycle system;

s2, carrying out linearization processing on the dynamic model of the bicycle system obtained in the step S1 to obtain a linear model;

s3, collecting the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into the linear model in the step S2 to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of the handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law;

s4, obtaining a handlebar steering angle and a bicycle set rotating speed value according to the self-adaptive controller solution of the step S3, controlling the front fork system of the bicycle to steer through a stepping motor according to the handlebar steering angle, and using an FOC method to adjust the rotating speed of a current control motor by utilizing the deviation of the bicycle set rotating speed value and the bicycle given rotating speed value so as to realize self-balancing control of the bicycle.

2. The method of claim 1, wherein in step S1, the dynamic model of the bicycle system is embodied as:

wherein the content of the first and second substances,is the vehicle body inclination angle acceleration, phi is the vehicle body inclination angle, g is the gravity acceleration, h is the centroid height, V is the bicycle running speed, l2The distance between the landing points of the front and rear wheels, l1The distance between the landing point of the rear wheel and the projection point of the center of mass on the horizontal plane is theta, and theta is the steering angle of the handlebar.

3. The method according to claim 1, wherein in step S2, the linear model is specifically:

wherein the content of the first and second substances,is the vehicle body inclination angle acceleration, phi is the vehicle body inclination angle, g is the gravity acceleration, h is the centroid height, V is the bicycle running speed, l2Theta is the distance between the landing points of the front and rear wheels, and theta is the steering angle of the handlebar.

4. The method according to claim 1, wherein in step S3, the control law and the adaptive law are respectively designed according to the linear model by using the Lyapunov stability theory, and discretization processing is performed on the linear model, the control law, the adaptive law and the sliding mode function respectively.

5. The method of claim 4, wherein the system model discretization φ (k) is:

wherein phi (k) is the inclination angle of the bicycle body at the moment k, phi (k-1) is the inclination angle of the bicycle body at the moment k before, phi (k-2) is the inclination angle of the bicycle body at the two moments k before, g is the acceleration of gravity, h is the height of the center of mass of the bicycle, V is the running speed of the bicycle, l2T is the sampling period, and theta (k) is the steering angle of the handle at the moment k.

6. The method of claim 4, wherein the control law discretization θ (k) is:

wherein k is*Eta, lambda, c are all greater than 0, T is the sampling period, s (k) is the gliding model function at time k, phid(k) For an ideal trace instruction at time k, phid(k-1) is the ideal tracking instruction at the moment k is earlier, φd(k-2) is the theory under the first two times of kIt is desirable to track the instructions as well,is the tracking error at time k, and e (k-1) is the tracking error at the time k precedingIs q at time k1Is determined by the estimated value of (c),is q at time k2An estimate of (d).

7. The method of claim 4, wherein the controller parameter adaptation law discretization is:

wherein, γ1、γ2、k*Are all larger than 0, and are all larger than 0,is q at time k1Is determined by the estimated value of (c),is q at the moment before k1T is a sampling period, s (k) is a gliding model function at the moment k, phi (k) is a vehicle body inclination angle at the moment k,is q at time k2Is determined by the estimated value of (c),is q at the moment before k2θ (k) is the handle steering angle at time k.

8. The method of claim 4, wherein the sliding-mode function discretization s (k) is:

where c is greater than 0, T is the sampling period, and e (k) is the tracking error at time k.

9. The method according to claim 1, wherein step S4 is specifically:

the pulse signal is given by the singlechip to control the on and off of a switch tube in the inverter, so as to realize the control of the stepping motor and control the steering of a front fork system of the bicycle; according toAnd obtaining a given rotating speed value of the bicycle, carrying out PI regulation on the deviation of the given rotating speed value of the bicycle and the actual rotating speed value of the bicycle to obtain a reference current value, carrying out PI regulation on the deviation of the given rotating speed value of the bicycle and the actual rotating speed value of the bicycle, inputting the deviation of the given rotating speed value of the bicycle and the actual current value into a PWM module, and generating a switching signal by the PWM module to control the rotating speed of the brushless motor.

10. An unmanned bicycle control system, comprising:

the model module is used for modeling the bicycle system to obtain a dynamic model of the bicycle system;

the linear module is used for carrying out linearization processing on the dynamic model of the bicycle system obtained by the model module to obtain a linear model;

the design module is used for acquiring the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into a linear model of the linear module to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of the handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law;

and the control module is used for solving according to the self-adaptive controller of the design module to obtain a handle steering angle and a bicycle set rotating speed value, controlling the steering of a front fork system of the bicycle through the stepping motor according to the handle steering angle, and adjusting the rotating speed of the current control motor by utilizing the deviation of the bicycle set rotating speed value and the bicycle given rotating speed value by using an FOC method to realize the self-balancing control of the bicycle.

Technical Field

The invention belongs to the technical field of unmanned intelligent control, and particularly relates to an unmanned bicycle control method and system.

Background

The bicycle is used as a vehicle which is most widely used, and has the advantages of simple structure, portability, flexibility, easy operation, energy conservation, environmental protection and the like. When no external force is used for supporting, the bicycle cannot be kept upright in a static state, and in the running process, the bicycle is difficult to control when the speed is slower, and a rider needs to continuously rotate a handlebar left and right to prevent the bicycle body from toppling; conversely, a faster speed bicycle is more easily controlled by the rider without tipping over. And the faster the bicycle is driven, the more difficult the system is influenced by external environments such as road conditions, wind power and the like to topple over, and the system has certain anti-jamming capability.

The unmanned bicycle combines a traditional bicycle running structure with an intelligent robot technology, so that on one hand, the simple mechanical structure of the bicycle is maintained, and the advantages of small volume, high utilization rate and the like are inherited; on the other hand, the vehicle serving as an intelligent vehicle for automatic driving has wide application prospects in the aspects of automatic obstacle avoidance, field exploration, disaster area rescue and the like.

In addition, due to inherent nonlinearity, non-integrity and serious non-minimum phase characteristics, the bicycle system can be used as a research object of a nonlinear and non-minimum phase system, and provides a new idea for solving nonlinear system problems such as time variation, uncertainty, motion control and stability control. Therefore, how to design a self-balancing control strategy for the unmanned bicycle has a very wide application prospect.

Disclosure of Invention

The invention aims to solve the technical problem of providing an unmanned bicycle control method and system aiming at the defects in the prior art, so that the response speed of the system is improved, and the stability and the anti-interference performance of the system are improved.

The invention adopts the following technical scheme:

an unmanned bicycle control method comprising the steps of:

s1, modeling the bicycle system to obtain a dynamic model of the bicycle system;

s2, carrying out linearization processing on the dynamic model of the bicycle system obtained in the step S1 to obtain a linear model;

s3, collecting the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into the linear model in the step S2 to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of the handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law;

s4, obtaining a handlebar steering angle and a bicycle set rotating speed value according to the self-adaptive controller solution of the step S3, controlling the front fork system of the bicycle to steer through a stepping motor according to the handlebar steering angle, and using an FOC method to adjust the rotating speed of a current control motor by utilizing the deviation of the bicycle set rotating speed value and the bicycle given rotating speed value so as to realize self-balancing control of the bicycle.

Specifically, in step S1, the dynamic model of the bicycle system is specifically:

wherein the content of the first and second substances,is the vehicle body inclination angle acceleration, phi is the vehicle body inclination angle, g is the gravity acceleration, h is the centroid height, V is the bicycle running speed, l2The distance between the landing points of the front and rear wheels, l1The distance between the landing point of the rear wheel and the projection point of the center of mass on the horizontal plane is theta, and theta is the steering angle of the handlebar.

Specifically, in step S2, the linear model specifically includes:

wherein the content of the first and second substances,is the vehicle body inclination angle acceleration, phi is the vehicle body inclination angle, g is the gravity acceleration, h is the centroid height, V is the bicycle running speed, l2Theta is the distance between the landing points of the front and rear wheels, and theta is the steering angle of the handlebar.

Specifically, in step S3, a control law and an adaptive law are respectively designed according to the linear model and using the Lyapunov stability theory, and discretization processing is performed on the linear model, the control law, the adaptive law and the sliding mode function respectively.

Further, the system model discretization φ (k) is:

wherein phi (k) is the inclination angle of the bicycle body at the moment k, phi (k-1) is the inclination angle of the bicycle body at the moment k before, phi (k-2) is the inclination angle of the bicycle body at the two moments k before, g is the acceleration of gravity, h is the height of the center of mass of the bicycle, V is the running speed of the bicycle, l2T is the sampling period, and theta (k) is the steering angle of the handle at the moment k.

Further, the control law discretization θ (k) is as follows:

wherein k is*Eta, lambda, c are all greater than 0, T is the sampling period, s (k) is the gliding model function at time k, phid(k) For an ideal trace instruction at time k, phid(k-1) is the ideal tracking instruction at the moment k is earlier, φd(k-2) is the ideal tracking instruction at the first two moments k,is the tracking error at time k, and e (k-1) is the tracking error at the time k precedingIs q at time k1Is determined by the estimated value of (c),is q at time k2An estimate of (d).

Further, the controller parameter adaptive law is discretized into:

wherein, γ1、γ2、k*Are all larger than 0, and are all larger than 0,is q at time k1Is determined by the estimated value of (c),is q at the moment before k1T is a sampling period, s (k) is a gliding model function at the moment k, phi (k) is a vehicle body inclination angle at the moment k,is q at time k2Is determined by the estimated value of (c),is q at the moment before k2θ (k) is the handle steering angle at time k.

Further, the sliding mode function discretization s (k) is as follows:

where c is greater than 0, T is the sampling period, and e (k) is the tracking error at time k.

Specifically, step S4 specifically includes:

the pulse signal is given by the singlechip to control the on and off of a switch tube in the inverter, so as to realize the control of the stepping motor and control the steering of a front fork system of the bicycle; according toAnd obtaining a given rotating speed value of the bicycle, carrying out PI regulation on the deviation of the given rotating speed value of the bicycle and the actual rotating speed value of the bicycle to obtain a reference current value, carrying out PI regulation on the deviation of the given rotating speed value of the bicycle and the actual rotating speed value of the bicycle, inputting the deviation of the given rotating speed value of the bicycle and the actual current value into a PWM module, and generating a switching signal by the PWM module to control the rotating speed of the brushless motor.

Another technical solution of the present invention is an unmanned bicycle control system, comprising:

the model module is used for modeling the bicycle system to obtain a dynamic model of the bicycle system;

the linear module is used for carrying out linearization processing on the dynamic model of the bicycle system obtained by the model module to obtain a linear model;

the design module is used for acquiring the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into a linear model of the linear module to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of the handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law;

and the control module is used for solving according to the self-adaptive controller of the design module to obtain a handle steering angle and a bicycle set rotating speed value, controlling the steering of a front fork system of the bicycle through the stepping motor according to the handle steering angle, and adjusting the rotating speed of the current control motor by utilizing the deviation of the bicycle set rotating speed value and the bicycle given rotating speed value by using an FOC method to realize the self-balancing control of the bicycle.

Compared with the prior art, the invention has at least the following beneficial effects:

the invention relates to an unmanned bicycle control method, which obtains a dynamic model of a system by modeling and analyzing a bicycle system, adopts a small quantity approximation method to process the model in a linearization way for facilitating subsequent design and calculation, designs an adaptive sliding mode controller based on an exponential approximation law, solves and obtains a handle steering angle and a bicycle set rotating speed value required by maintaining balance of a bicycle, controls the steering of a front fork system of the bicycle through a stepping motor according to the handle steering angle, and adjusts the rotating speed of the bicycle by using a vector control (FOC) method, thereby realizing the self-balance of the bicycle. The whole method steps provide a relatively clear idea for the design and implementation of the unmanned bicycle system, and the reliability and feasibility of the whole system are ensured by processing each link in the system.

Furthermore, the system dynamics model is a constraint relation among the vehicle body inclination angle, the handlebar steering angle and the bicycle running speed when the system maintains balance, and is also a main basis for the design of a subsequent balance algorithm.

Furthermore, due to the fact that the nonlinear system is complex to process and large in calculation amount, the system is better controlled in convenience for subsequent design and calculation, and local linearization processing is carried out by adopting a small-amount approximation method.

Furthermore, an adaptive sliding mode controller based on an exponential approximation law is designed according to a linearized model, parameter adaptive control is introduced on the basis of traditional sliding mode control, a control law and an adaptive law are respectively designed by utilizing a Lyapunov stability theory, changes of system parameters and external interference on a system are identified through the adaptive law, the parameters of the controller are adjusted in real time, meanwhile, the problem of buffeting in the traditional sliding mode control is solved by adopting the exponential approximation law, good robustness of the sliding mode control is maintained, and control accuracy of the system is improved.

Furthermore, in order to facilitate the design and implementation of subsequent programs, the system model is discretized, so that the hidden defect in data is effectively overcome, the time complexity is reduced, and the system model is more stable.

Furthermore, the discretization processing is carried out on the control law, so that the iteration is facilitated, the operation speed of the system is improved, the control quantity required by the system for maintaining the balance can be calculated more quickly, and the control precision of the system is improved.

Furthermore, discretization processing is carried out on the self-adaptive law, the operation speed of the system is improved, the parameter change and the external interference of the system can be sensed more quickly, and real-time adjustment is carried out.

Furthermore, discretization processing is carried out on the sliding mode function, so that the interference of sensor data abnormity on the system can be overcome, and the robustness of the system is improved.

Further, a handle steering angle and a bicycle set rotating speed value are obtained through solving by an adaptive sliding mode controller based on an exponential approximation law, the steering of a front fork system of the bicycle is controlled through a stepping motor according to the handle steering angle, and the rotating speed of the bicycle is adjusted by adopting a vector control (FOC) method, so that the self-balancing control of the bicycle is realized. The vector control method can effectively overcome the influence of various external interferences on the rotating speed of the bicycle and improve the anti-interference performance of the system.

In summary, the control device, the handle steering device and the power device are added to the traditional bicycle running structure, a dynamic model of the system is obtained through modeling and analyzing a bicycle system, the model is linearized by adopting a small quantity approximation method, and the self-adaptive sliding mode controller based on the exponential approximation law is designed. The method is characterized in that parameter adaptive control is introduced on the basis of the traditional sliding mode control, a control law and an adaptive law are respectively designed by utilizing a Lyapunov stability theory, the change of system parameters and the external interference on the system are identified through the adaptive law, the parameters of a controller are adjusted in real time, meanwhile, the buffeting problem existing in the traditional sliding mode control is solved by adopting an exponential approaching law, the good robustness of the sliding mode control is kept, and the control precision of the system is improved. The steering angle of a handle and a set rotating speed value of the bicycle required by maintaining balance of the bicycle are obtained through solving by a controller, the steering of a front fork system of the bicycle is controlled through a stepping motor according to the steering angle of the handle, and the rotating speed of the bicycle is adjusted by adopting a vector control (FOC) method, so that the self-balancing control of the bicycle is realized. In addition, the invention is convenient for subsequent program design and realization, reduces the time complexity, overcomes the hidden defect in data and improves the operation speed of the system, and carries out discretization processing on a linear model, a control law, a self-adaptation law and a sliding mode function.

The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.

Drawings

FIG. 1 is a block diagram of a bicycle system;

FIG. 2 is a bicycle system control strategy diagram;

FIG. 3 is a hardware block diagram of the bicycle system;

FIG. 4 is a flow chart of a bicycle system routine;

fig. 5 is a graph showing changes in the body inclination angle, the handle steering angle and time, in which (a) is the body inclination angle and (b) is the handle steering angle.

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 some, not all, embodiments of the present invention. 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 the description of the present invention, it should be understood that the terms "comprises" and/or "comprising" indicate the presence of the stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

Various structural schematics according to the disclosed embodiments of the invention are shown in the drawings. The figures are not drawn to scale, wherein certain details are exaggerated and possibly omitted for clarity of presentation. The shapes of various regions, layers and their relative sizes and positional relationships shown in the drawings are merely exemplary, and deviations may occur in practice due to manufacturing tolerances or technical limitations, and a person skilled in the art may additionally design regions/layers having different shapes, sizes, relative positions, according to actual needs.

The invention provides an unmanned bicycle control system, which comprises a power supply part, a control part, a sensor part and a main circuit part. The power supply part supplies power to the control part, the sensor part and the main circuit part by using a 36V storage battery, the MPU6050 attitude sensor is used for collecting the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, the deviation and the running speed of the bicycle are added into a dynamic model, an adaptive sliding mode control method based on an exponential approximation law is designed to solve the model, the steering angle of the handle and the set rotating speed value of the bicycle are obtained, and self-balancing control is achieved.

The invention relates to an unmanned bicycle control method, which comprises the following steps:

s1, modeling the bicycle system to obtain a dynamic model of the bicycle system;

referring to fig. 1, the bicycle can be regarded as an inverted pendulum, and the gravity acts as an unstable system, and needs to provide additional restoring force to maintain balance, and the restoring force is the centrifugal force when the bicycle turns. The centrifugal force is a function of the bicycle travel speed and the handlebar steering angle, which can be considered the control return force if the bicycle travel speed is known. Prior to modeling the bicycle system, idealized assumptions are made to facilitate subsequent analysis and solution of the model. Such as: neglecting the air resistance and the moment of inertia of the front and rear wheels, and there is no friction between the front and rear wheels and the ground, all the masses of the bicycle are completely concentrated on one point of the mass center. The simplified schematic diagram of the bicycle system structure is shown in fig. 1(a), wherein only the gravity of the bicycle body generates torque in the external force applied to the system, and the system dynamic equation is as follows:

since the turning radius of the bicycle is directly related to the steering angle of the handlebar, the structural plan view of the bicycle system is shown in fig. 1(b), and can be obtained according to the geometrical relationship:

wherein J is mh2Is moment of inertia, m is bicycle mass, phi is vehicle body inclination angle, g is gravity acceleration, h is center of mass height, V is bicycle running speed, l2The distance between the landing points of the front and rear wheels, l1The distance between the rear wheel landing point and the projected point of the mass center on the horizontal plane, theta is the steering angle of the handlebar, and r is the turning radius of the bicycle.

The two formulas are combined to obtain the mathematical model of the bicycle system as follows:

wherein the content of the first and second substances,is the vehicle body inclination angle acceleration, phi is the vehicle body inclination angle, g is the gravity acceleration, h is the centroid height, V is the bicycle running speed, l2The distance between the landing points of the front and rear wheels, l1The distance between the landing point of the rear wheel and the projection point of the center of mass on the horizontal plane is theta, and theta is the steering angle of the handlebar.

S2, carrying out linearization processing on the dynamic model of the bicycle system obtained in the step S1 to obtain a linear model;

for design and calculation convenience, when the vehicle body is vertical, all angles are small, and the model is linearized as follows:

wherein phi is the inclination angle of the bicycle body, g is the acceleration of gravity, h is the height of the center of mass, V is the running speed of the bicycle, l2The distance between the landing points of the front and rear wheels, l1The distance between the rear wheel landing point and the projected point of the mass center on the horizontal plane, theta is the steering angle of the handlebar, omega*The rotating speed value is set for the bicycle,d is the diameter of the rear wheel.

S3, designing an adaptive sliding mode controller based on an exponential approximation law according to the linear model of the step S2;

referring to fig. 2, the deviation of the body inclination angle from the given expected value and the bicycle running speed are collected by the MPU6050 attitude sensor and are fed to the dynamic model obtained in fig. 1, the dynamic model becomes a single-input single-output model of the body inclination angle and the handlebar steering angle, and an adaptive sliding mode controller based on an exponential approximation law is designed according to the dynamic model.

S301, designing a control law and an adaptive law:

order:the linear model is then:

let the ideal trace instruction be phidDefine the tracking error e of the system as phi-phidDesigning a sliding mode function as follows:

wherein c is greater than 0.

The design control law is as follows:

wherein k, eta, lambda and c are all larger than 0,for the expected value of the acceleration of the body inclination angle,are each q1,q2An estimate of (d).

Defining the Lyapunov function as:

wherein:are each q1,q2The estimation error of (2).

And (3) carrying out derivation on the Lyapunov function to obtain:

the self-adaptation law is designed as follows:

wherein, γ12Are all greater than 0.

S302, stability analysis:

carrying in an adaptive law (7) to obtain:

according to the Young's inequality:

equation (10) can be simplified as:

scaling and simplifying the formula (13) to obtain:

let τ be1=2k,

Equation (14) can be:

since the continuous function L (t) ≧ 0 and L (0) is bounded, τ in equation (15)1>0,τ2> 0, L (t) can be obtained bounded and converged,

when t → ∞, s → 0, and thus e → 0, vehicleThe body inclination angle phi converges to a given value phid

S302, in order to facilitate subsequent design and implementation, discretizing the partial sub-formula:

the discretization expression of the system model in the formula (3) is as follows:

the discretization expression of the sliding mode function in the formula (4) is as follows:

the discretization expression of the control law of the formula (5) is as follows:

the adaptive law discretization expressions of the expressions (8) and (9) are as follows:

s4, solving according to the self-adaptive controller of the step S3 to obtain a steering angle of a handle and a set rotating speed value of the bicycle, and controlling the turning of the stepping motor by controlling the on and off of a switch tube in an inverter through pulse signals given by a single chip microcomputer, so as to control the turning of a front fork system of the bicycle; according toThe given rotation speed value of the bicycle can be obtained, the deviation between the given rotation speed value and the actual rotation speed value of the bicycle is subjected to PI regulation to obtain a reference current value, and then the deviation between the given rotation speed value and the actual rotation speed value of the bicycle is subjected to PI regulation and then is subjected to PI regulationThe coordinate transformation is transmitted to the PWM module to generate a switching signal capable of driving an IGBT tube in the inverter, so that the rotating speed of the brushless motor is controlled, the brushless motor is quickly stabilized near a given value, and various external interferences can be overcome. Wherein the bicycle running speed V is a function of time t and the functional relationship f (t) is known. If f (t) is a constant, self-balancing under constant speed conditions can be achieved. Otherwise, self-balancing of the system under shifting conditions (V ═ f (t)) can be achieved.

The steering angle of the handle is given corresponding pulse signals through the controller to control the steering of the stepping motor, so that the steering of the front fork system of the bicycle is controlled; for the set rotating speed value of the bicycle, a vector control (FOC) method is adopted, and a controller provides a corresponding PWM signal to control the on and off of a switch tube in an inverter, so that the control of the rear wheel brushless motor is realized, and the rotating speed of the rear wheel brushless motor is quickly stabilized to be close to the set value.

Referring to fig. 3, the hardware structure of the unmanned bicycle system is mainly composed of a power supply part, a control part, a sensor part and a main circuit part.

A power supply section: charging the battery and supplying power to all parts of the system by adopting a charging module and a storage battery;

the control part: STM32F103ZET6 is used as a main control chip;

a sensor portion: acquiring the body offset angle of the bicycle by adopting an MPU6050 attitude sensor;

a main circuit part: the stepping motor and the driver thereof, and the brushless motor and the driver thereof.

Give step motor driver and brushless motor driver power supply through 36V battery, give the singlechip power supply by the step-down module again, the singlechip uses ST company's STM32F103ZET6 as main control chip, and this chip has a plurality of timers and abundant peripheral hardware, and the satisfying design requirement that can be fine. The inclination degree of the bicycle body is detected by the MPU6050 attitude sensor and is sent to the single chip microcomputer, the steering angle of the handlebar and the set rotating speed value of the bicycle can be obtained by solving a mathematical model, and the controller gives corresponding signals to control the on-off of a switch tube in the driver, so that the steering of the stepping motor and the rotating speed of the brushless motor are controlled, and the bicycle can stably run near a balance state.

Referring to fig. 4, in order to increase the response speed of the system, the system is embedded with a FreeRTOS system in the software design process, so that multitask operation such as brushless motor control, stepping motor control, serial communication, LCD display and the like is realized, and the scheduling of related tasks is completed through a task scheduler. The task scheduler ensures the real-time performance of rotating speed response and handle steering, thereby improving the stability of the system. The method comprises the following specific steps:

step 1: starting, entering a FreeRTOS system and initializing;

step 2: creating a task and starting a task scheduler;

and step 3: scheduling the relevant tasks through a task scheduler;

and 4, step 4: judging whether the system finishes running, if so, jumping to the step 5, otherwise, returning to the step 3;

and 5: and (6) ending.

In still another embodiment of the present invention, an unmanned bicycle control system is provided, which can be used to implement the above-mentioned unmanned bicycle control method, and particularly, the unmanned bicycle control system includes a model module, a linear module, a design module, and a control module.

The model module is used for modeling the bicycle system to obtain a dynamic model of the bicycle system;

the linear module is used for carrying out linearization processing on the dynamic model of the bicycle system obtained by the model module to obtain a linear model;

the design module is used for acquiring the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into a linear model of the linear module to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of the handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law;

and the control module is used for solving according to the self-adaptive controller of the design module to obtain a handle steering angle and a bicycle set rotating speed value, controlling the steering of a front fork system of the bicycle through the stepping motor according to the handle steering angle, and adjusting the rotating speed of the current control motor by utilizing the deviation of the bicycle set rotating speed value and the bicycle given rotating speed value by using an FOC method to realize the self-balancing control of the bicycle.

In yet another embodiment of the present invention, a terminal device is provided that includes a processor and a memory for storing a computer program comprising program instructions, the processor being configured to execute the program instructions stored by the computer storage medium. The Processor may be a Central Processing Unit (CPU), or may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable gate array (FPGA) or other Programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc., which is a computing core and a control core of the terminal, and is adapted to implement one or more instructions, and is specifically adapted to load and execute one or more instructions to implement a corresponding method flow or a corresponding function; the processor of the embodiment of the invention can be used for the operation of the unmanned bicycle control method, and comprises the following steps:

modeling the bicycle system to obtain a dynamic model of the bicycle system; carrying out linearization processing on a dynamic model of the bicycle system to obtain a linear model; acquiring the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into a linear model to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of a handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law; the steering angle of a handle and a set rotating speed value of a bicycle are obtained through solving by a self-adaptive controller, the steering of a front fork system of the bicycle is controlled through a stepping motor according to the steering angle of the handle, the rotating speed of the motor is controlled by using an FOC method through the deviation of the set rotating speed value of the bicycle and the set rotating speed value of the bicycle, and self-balancing control of the bicycle is achieved.

In still another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory), which is a Memory device in a terminal device and is used for storing programs and data. It is understood that the computer readable storage medium herein may include a built-in storage medium in the terminal device, and may also include an extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space storing an operating system of the terminal. Also, one or more instructions, which may be one or more computer programs (including program code), are stored in the memory space and are adapted to be loaded and executed by the processor. It should be noted that the computer-readable storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory.

The one or more instructions stored in the computer-readable storage medium may be loaded and executed by the processor to implement the corresponding steps of the above-described embodiments with respect to the unmanned bicycle control method; one or more instructions in the computer-readable storage medium are loaded by the processor and perform the steps of:

modeling the bicycle system to obtain a dynamic model of the bicycle system; carrying out linearization processing on a dynamic model of the bicycle system to obtain a linear model; acquiring the deviation of the inclination angle of the bicycle body and a given expected value and the running speed of the bicycle, inputting the deviation into a linear model to obtain a single-input single-output model of the inclination angle of the bicycle body and the steering angle of a handlebar, and designing an adaptive sliding mode controller based on an exponential approximation law; the steering angle of a handle and a set rotating speed value of a bicycle are obtained through solving by a self-adaptive controller, the steering of a front fork system of the bicycle is controlled through a stepping motor according to the steering angle of the handle, the rotating speed of the motor is controlled by using an FOC method through the deviation of the set rotating speed value of the bicycle and the set rotating speed value of the bicycle, and self-balancing control of the bicycle is achieved.

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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.

Referring to fig. 5, the body inclination angle is freely released at 0.1rad, and the values of the parameters in the adaptive controller are as follows: g is 9.8m/s2;h=0.6m;l2=0.8m,c=0.01;k=0.01;η=0.01;λ=5;γ1=0.1;γ20.1; v is 5 m/s; fig. 5 shows the change curves of the body inclination angle, the handlebar steering angle and the time, and it can be seen that the body inclination angle is restored to the balanced state after about 1.2s by the adjusting action of the controller, and the handlebar steering angle is also restored to the balanced state after the same time from 0.1rad, so that the self-balancing of the unmanned bicycle system can be realized by the adjusting action of the controller.

In summary, the unmanned bicycle control method provided by the invention can realize self-balancing of the unmanned bicycle under the action of the adaptive sliding mode controller based on the exponential approximation law, and has good robustness and control accuracy.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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.

The above-mentioned contents are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modification made on the basis of the technical idea of the present invention falls within the protection scope of the claims of the present invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于大数据应用的状态判断系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!