CN104682789A - PID (Proportion Integration Differentiation) controller applied to two-wheeled robots - Google Patents
PID (Proportion Integration Differentiation) controller applied to two-wheeled robots Download PDFInfo
- Publication number
- CN104682789A CN104682789A CN201310625486.3A CN201310625486A CN104682789A CN 104682789 A CN104682789 A CN 104682789A CN 201310625486 A CN201310625486 A CN 201310625486A CN 104682789 A CN104682789 A CN 104682789A
- Authority
- CN
- China
- Prior art keywords
- speed
- difference
- pid
- pass filter
- chip microcomputer
- 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
Links
Landscapes
- Motorcycle And Bicycle Frame (AREA)
Abstract
The invention relates to a PID (Proportion Integration Differentiation) controller applied to two-wheeled robots, which comprises a sensor, a counter, a data acquisition module, a control module, a PID processing module and a posture adjustment module. An implementation method of the controller for implementing stable system control is as follows: (1) the acceleration sensor and the counter are initialized; (2) data are acquired and processed; (3) state judgment is carried out; (4) a corrective control policy is chosen from a state judgment result; (5) the PID processing of output data is carried out; (6) posture is adjusted in real time; (7) step (2) is repeated until a final posture is achieved.
Description
Technical field
What the present invention relates to is a kind of controller, particularly a kind of PID controller in the application of two-wheel miniature motorcycle.
Background technology
The moving equilibrium control problem of two-wheel robot is the major issue of robotics and Robotics research, is also the major issue controlling scientific research simultaneously.With regard to moving equilibrium control problem, the two-wheel machine mankind are similar to inverted pendulum.In fact, in a sense, inverted pendulum is the predecessor of two-wheel robot, and basic thought and the general principle of two-wheel robot come from inverted pendulum.Research research both domestic and external for many years about inverted pendulum is very ripe, and its document is also quite a lot of, but the more important thing is how to be effectively applied on mobile robot by inverted pendulum.In recent years, Double-wheel self-balancing robot causes the robot fan of external many research institutions greatly to pay close attention to, and the various self-balancing system based on different object, different designs scheme and control strategy is born in succession.
Two-wheel miniature motorcycle under this application background arises at the historic moment.Two-wheel miniature motorcycle is actually the reversible pendulum system of a single shaft, and on the direction of its balance staff, the speed of system and acceleration are impermanent is zero.This system utilizes the athletic posture of sensor technology and fuzzy control principle real-time control system and ensures its stability and accuracy of action.Two-wheel miniature motorcycle as a can homeostasis the Intelligent motorcycle completed under unattended condition, enhance the technical and recreational of science and technology sports, and meet Kechuang demand with rapid changepl. never-ending changes and improvements, for user provides an all-around test stand.
The moving equilibrium control problem of two-wheel robot is the major issue of robotics and Robotics research, is also the major issue controlling scientific research simultaneously.With regard to moving equilibrium control problem, the two-wheel machine mankind are similar to inverted pendulum.In fact, in a sense, inverted pendulum is the predecessor of two-wheel robot, and basic thought and the general principle of two-wheel robot come from inverted pendulum.The correlative study of inverted pendulum is very ripe at home and abroad for many years, and its document is also quite a lot of, but the more important thing is how to be effectively applied on mobile robot by inverted pendulum.In recent years, Double-wheel self-balancing car causes the extensive concern of many scientific research institutions and robot fan, and many self-balance robots according to different object, employing different designs scheme and control strategy are born in succession.
Summary of the invention
The object of the present invention is to provide a kind of efficient improvement to the control effects of the motor of two-wheeled mobile robot, realize the controller that system stability controls.
The object of the present invention is achieved like this:
Be applied to a PID controller for two-wheel robot, its composition comprises: transducer, counter, data acquisition module, control module, PID processing module, pose adjustment module.
Described a kind of PID controller being applied to two-wheel robot, need single-chip microcomputer that the ideal velocity of motorcycle sport is set when it is characterized in that controlling speed, and the true velocity of motorcycle sport is recorded by measuring component (grating encoder), both are compared and obtains a difference, using this difference as in controlled quentity controlled variable input mage16 single-chip microcomputer, single-chip microcomputer produces according to difference size the PWM ripple that an average voltage is proportional to speed difference, PWM ripple is sent in drive circuit and drives direct current machine, the rotating speed of motor is directly proportional to speed extent, direction and the positive negative correlation of this difference.
Described a kind of PID controller being applied to two-wheel robot, when it is characterized in that Angle ambiguity, complementary filter is that the value that degree of will speed up reads is designated as X_acc through low pass filter, and the angular acceleration numerical integration that gyroscope reads is designated as gyrodt by high pass filter again.
Described a kind of PID controller being applied to two-wheel robot, is characterized in that in complementary filter, and low pass filter effect allows low frequency signal pass through to leach high frequency float, and the effect of high pass filter is just the opposite with it.
Initialization acceleration transducer sum counter;
Acquisition and processing data;
Carry out condition adjudgement;
Correction and Control strategy is selected from condition adjudgement result;
Export data PID process;
Real-time pose adjustment;
Repeat step (2) until reach final carriage.
The present invention can also comprise:
Need single-chip microcomputer that the ideal velocity of motorcycle sport is set when 1, controlling speed, and the true velocity of motorcycle sport is recorded by measuring component (grating encoder), both are compared and obtains a difference, using this difference as in controlled quentity controlled variable input mage16 single-chip microcomputer, single-chip microcomputer produces according to difference size the PWM ripple that an average voltage is proportional to speed difference, PWM ripple is sent in drive circuit and drives direct current machine, the rotating speed of motor is directly proportional to speed extent, direction and the positive negative correlation of this difference.
2, during Angle ambiguity, complementary filter is that the value that degree of will speed up reads is designated as X_acc through low pass filter, and the angular acceleration numerical integration that gyroscope reads is designated as gyrodt by high pass filter again.So angle value can be calculated by following formula:
angle=a(angle+gyro·dt)+(1-a)·(X_acc)
In formula, a is coefficient.
3, in complementary filter, low pass filter effect allows low frequency signal pass through to leach high frequency float, and the effect of high pass filter is just the opposite with it.For filter, the key of design is the determination of coefficient a.A can be calculated by following formula:
(1-a)τ=adt
In formula: τ is for expecting time constant.
Advantage of the present invention:
(1) application the invention enables two-wheel robot to have higher load capacity, calculating and ability to communicate, improves the diversity of finishing the work, carries out reliable autokinetic movement;
(2) invention increases the precision of two-wheel robot attitude detection under dynamic environment, reach the control overflow of full-vehicle control precision.
Accompanying drawing explanation
Fig. 1 is software flow pattern of the present invention;
Fig. 2 is complementary filter structure chart.
Embodiment
Below in conjunction with accompanying drawing citing, the present invention is described in more detail:
Be applied to a PID controller for two-wheel robot, its composition comprises: transducer, counter, data acquisition module, control module, PID processing module, pose adjustment module.
Need single-chip microcomputer that the ideal velocity of motorcycle sport is set when it is characterized in that controlling speed, and the true velocity of motorcycle sport is recorded by measuring component (grating encoder), both are compared and obtains a difference, using this difference as in controlled quentity controlled variable input mage16 single-chip microcomputer, single-chip microcomputer produces according to difference size the PWM ripple that an average voltage is proportional to speed difference, PWM ripple is sent in drive circuit and drives direct current machine, the rotating speed of motor is directly proportional to speed extent, direction and the positive negative correlation of this difference.
When it is characterized in that Angle ambiguity, complementary filter is that the value that degree of will speed up reads is designated as X_acc through low pass filter, and the angular acceleration numerical integration that gyroscope reads is designated as gyrodt by high pass filter again.
It is characterized in that in complementary filter, low pass filter effect allows low frequency signal pass through to leach high frequency float, and the effect of high pass filter is just the opposite with it.
Composition graphs 1, handling process of the present invention is as follows: be first speeds control: need single-chip microcomputer to arrange the ideal velocity of motorcycle sport when controlling speed, and the true velocity of motorcycle sport is recorded by measuring component (grating encoder), both are compared and obtains a difference, using this difference as in controlled quentity controlled variable input mage16 single-chip microcomputer, single-chip microcomputer produces according to difference size the PWM ripple that an average voltage is proportional to speed difference, PWM ripple is sent in drive circuit and drives direct current machine, the rotating speed of motor is directly proportional to speed extent, direction and the positive negative correlation of this difference.
According to the motion conditions analysis result of system, is divided into two major parts the speeds control stage, i.e. low-speed stage and high speed stage.
Low-speed stage is owing to being subject to the impact of gyrocompassing principle smaller, and system is in a very unsure state, and the Parameters variation of each attitude is rapid, and whole control procedure requires to adjust rapidly and accurately system mode delicately.During low-speed rectilinear movement, the easy run-off the straight of car body, inclination angle is by calculating after sensor measurement, and control car rudder corner through controller collection, adjustment, verification, timely adjustment center and direction of advance, and act on car body by the centripetal force that two-wheel car turning produces, make car body reply equilbrium position.At this moment, should be zero perpendicular to the speed of velocity attitude and acceleration.When car body run-off the straight, system repeats above set-up procedure again, until system tends towards stability.When system low speed is turned, the corner of car rudder is a variable changed with bend radian, and the inclination angle of car body is no longer zero.
When high speed stage, system due to high-speed motion comparatively large by the impact of gyroscope orientation, its attitudes vibration is relatively slow, not high to the sensitivity requirement of system.Similar when concrete control procedure and low speed.
According to design result, two-wheeled Intelligent motorcycle independently can realize the self-balancing under high-speed case, solves a difficult problem for kinematic axis one-stage inverted pendulum balance.But because systemic-function is limited under low-speed situations, the stable ability of System recover is undesirable, to be improved.But the program completes the preliminary test of autonomous motorcycle function, for practical basis has been established in autonomous tracking from now on, location and navigation.
Composition graphs 2, complementary filter is that the value that degree of will speed up reads is designated as X_acc through low pass filter, and the angular acceleration numerical integration that gyroscope reads is designated as gyrodt by high pass filter again.So angle value can be calculated by following formula:
angle=a(angle+gyro·dt)+(1-a)·(X_acc) (4-1)
(1) in formula, a is coefficient.
The method not only contributes to restraint speckle and drift, and compared with being used alone low pass filter, the method can produce relatively less delayed phase.
In complementary filter, low pass filter effect allows low frequency signal pass through to leach high frequency float, and the effect of high pass filter is just the opposite with it.For filter, the key of design is the determination of coefficient a.A can be calculated by following formula:
(1-a)τ=adt
In formula: τ is for expecting time constant.
τ determines the weight between angular speed that gyroscope draws and the angle that accelerometer draws.If during measuring-signal frequency < τ, illustrate that the angle that gyroscope integration draws is more accurate compared with accelerometer, if during measuring-signal frequency > τ, then illustrate that the angle that accelerometer draws is more accurate.After drawing angle value by complementary filter, just can judge motorcycle attitude.Select Correction and Control strategy again by judged result, finally by PID to the process exporting data, realize the adjustment to the real-time attitude of motorcycle.
Claims (4)
1. be applied to a PID controller for two-wheel robot, its composition comprises: transducer, counter, data acquisition module, control module, PID processing module, pose adjustment module.
2. a kind of PID controller being applied to two-wheel robot according to claim 1, need single-chip microcomputer that the ideal velocity of motorcycle sport is set when it is characterized in that controlling speed, and the true velocity of motorcycle sport is recorded by measuring component (grating encoder), both are compared and obtains a difference, using this difference as in controlled quentity controlled variable input mage16 single-chip microcomputer, single-chip microcomputer produces according to difference size the PWM ripple that an average voltage is proportional to speed difference, PWM ripple is sent in drive circuit and drives direct current machine, the rotating speed of motor is directly proportional to speed extent, direction and the positive negative correlation of this difference.
3. a kind of PID controller being applied to two-wheel robot according to claim 1, when it is characterized in that Angle ambiguity, complementary filter is that the value that degree of will speed up reads is designated as X_acc through low pass filter, and the angular acceleration numerical integration that gyroscope reads is designated as gyrodt by high pass filter again.
4. a kind of PID controller being applied to two-wheel robot according to claim 3, is characterized in that in complementary filter, and low pass filter effect allows low frequency signal pass through to leach high frequency float, and the effect of high pass filter is just the opposite with it.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310625486.3A CN104682789A (en) | 2013-11-28 | 2013-11-28 | PID (Proportion Integration Differentiation) controller applied to two-wheeled robots |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310625486.3A CN104682789A (en) | 2013-11-28 | 2013-11-28 | PID (Proportion Integration Differentiation) controller applied to two-wheeled robots |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104682789A true CN104682789A (en) | 2015-06-03 |
Family
ID=53317471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310625486.3A Pending CN104682789A (en) | 2013-11-28 | 2013-11-28 | PID (Proportion Integration Differentiation) controller applied to two-wheeled robots |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104682789A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105068543A (en) * | 2015-08-11 | 2015-11-18 | 浙江工业大学 | Piggyback-type AGV two wheel synchronization method based on PID control |
CN105527960A (en) * | 2015-12-18 | 2016-04-27 | 燕山大学 | Mobile robot formation control method based on leader-follow |
CN106990783A (en) * | 2017-04-21 | 2017-07-28 | 歌尔科技有限公司 | A kind of method and system of control two-wheel robot straight line moving |
CN108873893A (en) * | 2018-06-01 | 2018-11-23 | 重庆锐纳达自动化技术有限公司 | A kind of differential trolley position control method of two-wheel |
CN112099052A (en) * | 2020-09-16 | 2020-12-18 | 广东工业大学 | Laser radar level adjustment system |
CN113218391A (en) * | 2021-03-23 | 2021-08-06 | 合肥工业大学 | Attitude calculation method based on EWT algorithm |
-
2013
- 2013-11-28 CN CN201310625486.3A patent/CN104682789A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105068543A (en) * | 2015-08-11 | 2015-11-18 | 浙江工业大学 | Piggyback-type AGV two wheel synchronization method based on PID control |
CN105068543B (en) * | 2015-08-11 | 2017-07-28 | 浙江工业大学 | It is a kind of that type AGV two-wheeled synchronous method is born based on PID control |
CN105527960A (en) * | 2015-12-18 | 2016-04-27 | 燕山大学 | Mobile robot formation control method based on leader-follow |
CN106990783A (en) * | 2017-04-21 | 2017-07-28 | 歌尔科技有限公司 | A kind of method and system of control two-wheel robot straight line moving |
CN106990783B (en) * | 2017-04-21 | 2023-09-01 | 歌尔科技有限公司 | Method and system for controlling double-wheel robot to walk in straight line |
CN108873893A (en) * | 2018-06-01 | 2018-11-23 | 重庆锐纳达自动化技术有限公司 | A kind of differential trolley position control method of two-wheel |
CN112099052A (en) * | 2020-09-16 | 2020-12-18 | 广东工业大学 | Laser radar level adjustment system |
CN113218391A (en) * | 2021-03-23 | 2021-08-06 | 合肥工业大学 | Attitude calculation method based on EWT algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104682789A (en) | PID (Proportion Integration Differentiation) controller applied to two-wheeled robots | |
CN202267481U (en) | Miniature horizontal stabilized platform | |
CN104811588B (en) | A kind of boat-carrying based on gyroscope is surely as control method | |
CN202939489U (en) | Multi-rotor autobalance flight controller | |
Liu et al. | Two-wheel self-balanced car based on Kalman filtering and PID algorithm | |
CN106809051A (en) | Motor in electric automobile jitter suppression method and device | |
CN109108936A (en) | A kind of the self-balance robot control system and control method of Multiple Source Sensor data fusion | |
CN106142050B (en) | A kind of mobile robot that wheel difference of height is adaptive | |
CN103955152A (en) | High-precision electronic mouse for maze competition, and using method thereof | |
CN103076023A (en) | Method and device for calculating step | |
Xu et al. | Indoor vision/ins integrated mobile robot navigation using multimodel-based multifrequency kalman filter | |
CN105680736A (en) | Yaw angle-based double-motor speed synchronization and balance control method | |
CN110162068A (en) | A kind of control method of self-balance robot | |
CN103019093B (en) | The preparation method of two-wheel vehicle used sensor fusion angle | |
CN106335584A (en) | Double-wheel balance vehicle control system | |
Jie et al. | Design of upright intelligent vehicle based on camera | |
Nikita et al. | PID controller based two wheeled self balancing robot | |
CN110109354B (en) | Self-adaptive sliding mode control method for counteractive wheel balance bicycle robot | |
CN110109353B (en) | Fuzzy self-adaptive sliding-mode control system of counteractive wheel balance bicycle robot | |
CN108068938B (en) | Speed control method and system for two-wheel vehicle | |
Defoort et al. | Second order sliding mode control with disturbance observer for bicycle stabilization | |
Lee et al. | Kalman filter-based sensor fusion for improving localization of AGV | |
Zhang et al. | Control system design for two-wheel self-balanced robot based on the stepper motor | |
CN207860351U (en) | A kind of self-balancing trolley control system based on myRIO platforms | |
CN206029855U (en) | Wheel difference of height adaptive mobile robot |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150603 |