Design of double closed-loop PID control for two-wheel self-balancing trolley

Source: Internet
Author: User

Research significance of two-wheel self-balancing trolley

The research significance of 1.1 two wheel balance vehicle

Two wheel balance car is a kind of environment that can sense , and a multifunctional system capable of analyzing and judging and then conducting behavioral control is a kind of mobile robot. In the field of motion control, in order to study the control algorithm, it is very useful to set up a two-wheel balancing vehicle to verify the control algorithm, which makes the two-wheel balance vehicle also be a subject in the study of automatic control field theory. The research on the establishment, analysis and control algorithm of two-wheel balanced vehicle model is the focus and difficulty of the research. The design of two-wheel balance car to achieve forward, backward, turn and other functions are the purpose of the system research, after the car can climb, off-road and other functions to test. A highly unstable, dynamic model with multivariable, system parameter coupling, time- varying, uncertain nonlinearity is the difficulty of the two-wheel balance vehicle two-wheeled vehicle research content , its kinematic non-integrity constraints require its control of the multiplicity of tasks, that is, in a balanced state to complete the specified control tasks, such as the implementation of mobile tracking tasks in complex road conditions, which brings great challenges to system design. Therefore, it can be said that the two-way balance car is a relatively complex control system, which puts forward a high demand for the control method, a great challenge to the control theory method, is a typical platform for the control method realization, has been paid great attention by experts in this field, and becomes one of the challenges in the field of control.

The two-wheel balance vehicle is a complex system experimental device , its control algorithm is complex, the parameters vary greatly, it is the ideal platform for theoretical research and experimental simulation. In the balanced vehicle system, the research of control methods, such as control, uncertainty system control, adaptive control and nonlinear system control, has the characteristics of obvious physical meaning and convenient observation, and the balance car is not very expensive from the cost, it occupies a small area, and is a good experiment tool . In addition, the research on the balance system based on this theory can adapt to the navigation and patrol of complex environment, and has great application potential in industrial production and social life.

The control methods used in the two-wheel balance vehicle include : State feedback control, PID control, optimal control, pole feedback control, etc., these control methods are called traditional control methods.

1.2 Contents of this paper

(1) Simple control system design of two-wheel self-balancing trolley.

(2) Mathematical modeling of two-wheel self-balancing trolley based on inverted pendulum model.

(3) The system control method of two-wheel self-balancing trolley is analyzed by using MATLAB tool.

Design of control system for two-wheel self-balancing trolley

This chapter will focus on describing the working principle of two-wheel self-balancing trolley, and some of the control system components of the trolley are described.

2.1 Basic principle of two-wheel self-balancing trolley

the structure of the two-wheel self-balancing trolley is similar to that of an inverted pendulum, and its motion is shown in Figure 1, which rotates at the center of the motor axis.

Figure 1 trolley Tilt

When not in control, the car body forward or backward when the left and right wheel is in a stationary state, that is, the body's front and rear swing and wheel rotation is independent of each other. And when the control starts, the trolley starts upright,

After the release of the car will have three ways of movement, only the correct control of the car to maintain balance. These three kinds of sports

The methods and controls are described as follows:

(1) stationary: When the body's center of gravity is above the axis of the motor, the trolley is in a stationary and balanced state and does not require

any control.

(2) tilt: When the body's center of gravity is leaning forward, it needs to drive the motor to make the wheel forward.

Thus, the control of the two-wheel self-balancing trolley is measured by measuring the angle and angular velocity of the body and the vertical direction, changing the direction of the motor and its control force . ( torque, voltage ) the size of the car to maintain its own dynamic balance.

to maintain a balanced state.

(3) back: When the body's center of gravity is leaning back, the body will lean backwards, so it needs to drive the motor so that the wheel

to maintain a balanced state.

Thus, the control of the two-wheel self-balancing trolley is measured by measuring the angle and angular velocity of the body and the vertical direction, changing the direction of the motor and its control force . ( torque, voltage ) the size of the car to maintain its own dynamic balance.

Design of control system for 2.2 two-wheel self-balancing trolley

For the analysis of two-wheel self-balancing trolley, the control system can be divided into three parts:

(1) Inclination sensor is used to collect the motion state information of the trolley.

(2) The controller is used to process the information previously collected by the sensor, and the output signal is calculated to control the power

Machine.

(3) Actuator is a servo motor used to control the car.

The two-wheel self-balancing trolley uses an inclination sensor to obtain the state of the car, and two of its mechanical structure

The wheel is driven by a DC motor with encoder, which controls the forward and backward of the trolley through the control unit according to a certain control algorithm, thus accomplishing the control purpose. The control principle is shown in block Diagram 2.

model of inverted pendulum system

3.1 Brief introduction of inverted pendulum system

Because the principle of the two-wheel self-balancing trolley is equivalent to the inverted pendulum, the mathematical model here is almost the same as the first inverted pendulum.

The inverted pendulum is an organic method of robotics, control theory, computer control and many other fields. combined, the controlled system itself is an absolutely unstable, feature, multivariable, strongly coupled nonlinear system, it can be studied as a typical control object. The initial study began in the 20th century 50, when a cybernetics expert from the Massachusetts Institute of Engineering (MIT) designed an inverted pendulum experimental device based on the principle of the rocket launcher booster. In recent years, new control methods have emerged, and people try to test whether the new control method has strong ability to deal with multivariable, non-linear and absolute unstable systems through inverted pendulum, so as to find the best control method. As an ideal experimental method in the study of control theory, the inverted pendulum system constructs a good experimental platform for the teaching, experiment and scientific research of the Autocontrol theory, which is used to test the typical scheme of some control theory or method, and promotes the development of new theory and New Thought of control system. Because of the wide application of control theory, the method and technology of the system research will be in the semiconductor and precision instrument processing, robot control technology, artificial intelligence, missile interception control system, air docking control technology, rocket launch in the verticality of control, The attitude control and the general industrial application in the satellite flight have wide utilization and development foreground. The plane inverted pendulum can compare the actual flight control of the modeled rocket and the stability control of the walking robot.

3.2 Inverted Pendulum classification

Inverted pendulum has been extended from the original straight-line inverted pendulum a lot of types, typical linear inverted pendulum, circular inverted pendulum, flat inverted pendulum and composite inverted pendulum, inverted pendulum system is mounted on the motion module Inverted pendulum device, Since different inverted pendulum devices can be loaded on the same motion module, the type of inverted pendulum is enriched by this and is divided by the structure of the inverted pendulum, which has the following types of inverted pendulum:

1) Straight inverted pendulum series

linear inverted pendulum is a linear motion module equipped with a pendulum assembly, linear motion module has a degree of freedom, the car can be horizontal movement along the guide rail, loading different pendulum components in the car, can be composed of many types of inverted pendulum, linear flexible inverted pendulum and the general linear inverted pendulum difference is that, The flexible inverted pendulum has two carriages that can slide along the rails, and a spring is added between the active trolley and the driven trolley as a flexible joint.

2) circular inverted pendulum series of circular inverted pendulum is equipped with a pendulum assembly on the circular motion module, the circular motion module has a degree of freedom, can be around the gear center to do circular motion, at the end of the moving arm is equipped with pendulum components, according to the Pendulum Assembly series and serial or parallel way, can form many forms of inverted pendulum.

3) Flat inverted Pendulum series

Plane inverted pendulum is a motion module that can do plane motion, there are two main types of plane motion module: One is XY motion platform, the other is two degrees of freedom SCARA manipulator; The pendulum assembly also has a class, two, three and four levels.

4) Composite inverted pendulum series

The composite inverted pendulum is a new type of inverted pendulum, which is composed of moving body and swinging rod assembly, and its motion The body can be easily adjusted into three modes, one is 2) described in the circular inverted pendulum, but also the body can be flipped 90 degrees, the connecting rod vertically downward and vertically up the pendulum and the top pendulum two forms of inverted pendulum.

According to the series of inverted pendulum: there is an inverted pendulum, two inverted pendulum, three inverted pendulum and four inverted pendulum, one-level inverted pendulum is often used for control theory of basic experiments, multi-level inverted pendulum is often used for control algorithm research, the higher the series of inverted pendulum, its control is more difficult, at present, can achieve the inverted pendulum control up to four

Modeling of straight inverted pendulum

4.1 Physical model of straight-line inverted pendulum

System modeling can be divided into two types: mechanism modeling and experimental modeling. Experimental modeling is to use mathematical methods to establish the input-output relationship of the system by adding a series of pre-determined input signals to the image, stimulating the research object and detecting its observable output through the sensor . This includes the selection of the input signal, the accurate detection of the output signal, the research of mathematical algorithms and so on. The mechanism modeling is based on the understanding of the motion law of the research object, through the physical and chemical knowledge and mathematical means to establish

Input-State relationships within the system.

for inverted pendulum systems, because of its self-unstable system, There are some difficulties in the modeling of experiments. However, after ignoring some minor factors, the inverted pendulum system is a typical moving rigid body system, which can be used to establish the dynamical equations of the system by applying classical mechanics theory in the inertial coordinate system. In the following, we use the Newton-Euler method to establish the mathematical model of a straight-line inverted pendulum system.

Derivation of 4.1.1 differential equation

after ignoring the air resistance and all kinds of friction, A straight-line inverted pendulum system can be abstracted into a system consisting of a trolley and a homogeneous rod , as shown in 4-1.

We might as well make the following assumptions:

M Trolley Quality
m Pendulum quality
b Trolley friction coefficient
l The length of the center of rotation of the pendulum shaft to the rod
I Swing lever inertia

F plus the force on the trolley
x Trolley position

Figure 4-1 linear inverted pendulum model

φ angle between swing lever and vertical upward direction
Θ angle between the swing lever and the vertical downward direction (considering that the initial position of the pendulum is vertical downwards)

The figure is the Force analysis diagram of the trolley and the pendulum bar in the system. whereN and P are the horizontal and vertical components of the interaction force between the trolley and the pendulum bar.

Note: The positive and negative direction of the detection and execution device in the actual inverted pendulum system has been fully determined, thus the vector direction is defined and the direction of the diagram is the vector positive direction.

analysis on the force of 4-2 trolley and swinging rod in figure

The simulation results show that the system stability time is short and can be accepted. It can be seen that the double closed-loop PID control scheme realizes the double stability of the position of the trolley and the angle of the swing rod, and achieves the control purpose and requirement. In the process of debugging, we find that the system has a low sensitivity to the change of PID parameters, and the controller can control the inverted pendulum effectively and make it run stably when the specified parameters change in a certain range.

Design of double closed-loop PID control for two-wheel self-balancing trolley

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.