Introduction
Introduction
Two wheeled balancing car is the practical application of mobile robot in real life. The research of mobile robot
involves the fields of computer technology, software technology, microelectronics technology, and related disciplines
such as automatic control theory, modern control theory, C language, circuit and so on. Because it involves a wide
range of research is difficult, but the technical content is high, the demand for talent, so it can be said that the
development of robots can represent a country's overall national strength. The effect of noise interference, engineering,
communications, aerospace, industrial automation and other fields with a wide range of applications. Two wheeled
balancing car is also a kind of wheeled mobile robot, which can adjust the acceleration of the motor according to the
tilting angle of the car body so as to ensure the balance of the car. The model of two wheeled vehicle is derived from
the inverted pendulum, which has the characteristics of uncertainty, nonlinearity and strong coupling. Therefore, the
two wheeled self-balancing car for the inspection of various control algorithms are of great significance.
In the automobile and other motor vehicles prevailing in the moment, the motor industry has brought serious
environmental pollution, traffic problems and energy issues. Compared with the traditional wheeled robot, the two
wheeled balancing car has the advantages of in situ steering, no brake, small power, etc., and can be operated in some
complex paths, and can be used in special occasions such as narrow space, etc.. Research on control algorithm of
rotation angle sensor, most researchers mainly based on the selection of the sensor, obtained the stationary data more
accurate, but much depends on the mobile robot during acceleration, dynamic instability, controllable small angle
problem. The key point is that the two wheeled self-balancing robot controls the attitude control, and the attitude
control is the core of the control algorithm. Colman filter as the best prediction method, this method has the effect of
suppressing the noise interference, engineering, in communications, aerospace, industrial automation and other fields
with a wide range of applications.
Obviously, in the absence of any control measures under the conditions, the car suddenly opened in the vertical, will
fall. If you want to keep the car upright posture, you must have a good control of the car's center of gravity, so that the
car balance.
1 static: the car center of gravity falls on the left and right wheels and the ground contact point of the connection
center position, the car to keep balance. At this point, the wheels do not need to do any action to achieve the balance
requirements.
2 forward: the body center of gravity, then the body will lean forward until the car fell to the ground, to keep the car
balance, must control the wheel forward, the support and the body again moved forward to coincide, to keep
balance.
3 After dipping: the body center of gravity, then the body will gradually tilted backwards until the car fell to the
ground, and forward the same. It is necessary to control the wheel backwards, so that the support point back to the
body and then re coincide in order to maintain balance.
As shown in the figure, to ensure that the car's stability, we must first know what the car tilt direction and angle, then as
a basis to adjust the direction of motor and speed, specific value according to the tilt angle and the car.
Body inclination
Backward Forward
Not handle
acceleration acceleration
Calman filter is an efficient recursive autoregressive filter, which can estimate the state of a dynamic system by using
system noise and observation noise. The operation of the Calman filter includes two stages of prediction and update. In
the prediction stage, the last two balanced filter according to the attitude of the robot, estimate the present moment
angle; in the update stage, filter using the latest observations measured MPU6050 optimization of sensor module in the
forecast stage data, to obtain more accurate estimates.
2 PID analysis
The PID controller is very important in the field of automatic control. PID controller is to input the proportion of
deviation (proportion), integral (integral), differential (differential) linear operation, and then the results of the input to
the control mechanism for automatic control. In daily life everywhere can see the figure of PID controller.
Pwm represents incremental output. is not high, so we only use the P control. In fact, the steering information can be PI
control is used in our speed obtained by encoder and gyroscope, so control system, so the PID controller can the steering
ring has a variety of control be reduced to the following formula:
Methods, summarized as follows: Pwm+=Kp[e(k)-e(k-1)]+ki*e(k)] (7) 1 using the integral value of the
Only PI control is used in the axis gyroscope to get the steering angle closed-loop control system of our as the
deviation, the Z axis gyroscope is position, so the PID controller can be used as the input of the differential reduced to
the following formula: control to control the PD. The utility
4 steering control
increase of system error. The balance of the car steering ring 3 the difference between the data of using P (proportional)
controller or P the left and right wheel encoders is used (proportional) D (differential) controller, as the steering speed
deviation for P as we have said, the general control control. Advantage is simple, system with P control or PI control can
The disadvantage is that the be, is the "general steering ring control encoder cannot detect the wheel sliding, system", in
response to the requirements and has high requirements on the
encoder accuracy. 4 using the data of the Z axis gyroscope as the steering speed deviation for P
control, the goal is to keep the steering speed set value. The utility model has the advantages of
simple algorithm, avoiding the phenomenon that the encoder cannot detect the sliding of the wheel
and the drift of the gyroscope, etc..