CN110562321A - two-drive differential control method suitable for four-wheel trolley - Google Patents

two-drive differential control method suitable for four-wheel trolley Download PDF

Info

Publication number
CN110562321A
CN110562321A CN201910747708.6A CN201910747708A CN110562321A CN 110562321 A CN110562321 A CN 110562321A CN 201910747708 A CN201910747708 A CN 201910747708A CN 110562321 A CN110562321 A CN 110562321A
Authority
CN
China
Prior art keywords
wheel
data
chassis
speed
period
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
CN201910747708.6A
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.)
Suzhou Kun Automation Technology Co Ltd
Original Assignee
Suzhou Kun Automation Technology Co Ltd
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 Suzhou Kun Automation Technology Co Ltd filed Critical Suzhou Kun Automation Technology Co Ltd
Priority to CN201910747708.6A priority Critical patent/CN110562321A/en
Publication of CN110562321A publication Critical patent/CN110562321A/en
Pending legal-status Critical Current

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B62LAND VEHICLES FOR TRAVELLING OTHERWISE THAN ON RAILS
    • B62DMOTOR VEHICLES; TRAILERS
    • B62D6/00Arrangements for automatically controlling steering depending on driving conditions sensed and responded to, e.g. control circuits
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Chemical & Material Sciences (AREA)
  • Combustion & Propulsion (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Electric Propulsion And Braking For Vehicles (AREA)

Abstract

the invention relates to a two-drive differential control method suitable for a four-wheel trolley, which comprises the following steps of: step 1: setting the motion state of the chassis; step 2: and (4) calculating odometer data. The invention can realize the accurate control of the trolley.

Description

two-drive differential control method suitable for four-wheel trolley
Technical Field
The invention relates to a differential control method, in particular to a two-drive differential control method suitable for a four-wheel trolley.
background
with the rapid development of advanced technologies in China, the research on intelligent robots becomes more popular, the application of the intelligent robots is more and more extensive, and the value of the intelligent robots is gradually highlighted. At present, a motor with an encoder is generally selected during the turning of the intelligent four-wheel trolley, and the turning is controlled by PID by acquiring the rotating speed of the motor at the current moment; in the low-cost motor without an encoder, a PWM value is usually given at will to realize turning, and the specific turning angle and radius are ignored, however, in the process of controlling turning, the turning angle and radius are also a key point, so that how to realize the turning control by applying the low-cost motor to the intelligent four-wheel vehicle is an important technical problem.
Disclosure of Invention
To solve the above technical problems, an object of the present invention is to provide a method for controlling a two-wheel drive differential speed of a four-wheel vehicle.
in order to achieve the purpose, the invention adopts the following technical scheme:
A method for controlling two-drive differential speed of four-wheel vehicle includes the following steps:
step 1: setting the motion state of the chassis;
Step 11: before operation, selecting the chassis type;
Step 12: after the selection is completed in step 11, selecting a chassis drive;
step 13: after the selection and installation in step 12 are completed, the linear velocity and the angular velocity in the X, Y direction thereof are set to zero processing;
Step 14: setting X, Y the linear and angular velocities;
step 15: obtaining the position in the direction of X, Y in the odometer and the rotation angle of the chassis;
Step 16: obtaining the linear speed and the rotation angular speed of the chassis in the direction X, Y;
Step 2: calculating odometer data;
step 21: reading the data of the chassis;
step 22: reading the speed and rotation direction information of the wheel in the data by using a state machine;
Step 23: calculating the rotation angle of the left/right wheel in a period of time;
step 24: calculating a distance that the left/right wheel moves over a period of time;
Step 25: and inputting the speed information of the two wheels in the differential model to obtain odometer data.
Preferably, the period of time involved in step 23 and step 24 is the same period of time.
preferably, in step 21, data transmission is performed through serial port data.
Preferably, the chassis drive in the four-wheel trolley is provided with an embedded platform which is connected through a serial port data line.
Preferably, the embedded platform is connected with the PC end through a network.
By the scheme, the invention at least has the following advantages:
the foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings.
drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of the motion state of the chassis of the present invention;
fig. 2 is a flow chart of the calculation of odometry data of the invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
in order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. The components of 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 of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Examples
As shown in figures 1 and 2 of the drawings,
a method for controlling two-drive differential speed of four-wheel vehicle includes the following steps:
step 1: setting the motion state of the chassis;
step 11: before operation, selecting the chassis type;
Step 12: after the selection is completed in step 11, selecting a chassis drive;
step 13: after the selection and installation in step 12 are completed, the linear velocity and the angular velocity in the X, Y direction thereof are set to zero processing;
step 14: setting X, Y the linear and angular velocities;
Step 15: obtaining the position in the direction of X, Y in the odometer and the rotation angle of the chassis;
Step 16: obtaining the linear speed and the rotation angular speed of the chassis in the direction X, Y;
Step 2: calculating odometer data;
Step 21: reading the data of the chassis;
step 22: reading the speed and rotation direction information of the wheel in the data by using a state machine;
Step 23: calculating the rotation angle of the left/right wheel in a period of time;
Step 24: calculating a distance that the left/right wheel moves over a period of time;
Step 25: and inputting the speed information of the two wheels in the differential model to obtain odometer data.
the time period involved in step 23 and step 24 in the present invention is the same time period.
In the present invention, data transmission is performed through serial port data in step 21.
the chassis drive in the four-wheel trolley is provided with an embedded platform which is connected through a serial port data line.
The embedded platform is connected with the PC end through the network.
example one
the serial port is used for sending the command, so that the expected speed and direction information can be conveniently sent to the trolley to enable the trolley to move according to the command. According to the serial port control instruction specification driven by the motor, a control command (character array) can be sent to the trolley through a SendData function in a chassis driving program, so that the trolley can move.
The serial port control instruction consists of an initial bit, a data bit and a reserved bit. The start bit is composed of two bytes of 0xFF 0 xFE. The data bits are composed of four bytes of data, namely, the speed of the wheel A, the speed of the wheel B, the motor direction of the wheel A and the motor direction of the wheel B, wherein the non-zero direction is the positive direction, the zero direction is the negative direction, the wheel A is the right wheel, and the wheel B is the left wheel.
The wheel speed data is the number of pulses rotating within 10ms, for example, tx 0 equals 0x12, which means that there are 18 pulses per 10ms, 1800 pulses within 1s, 11750 pulses per wheel revolution as known from the data of the cart itself, and the wheel speed is calculated to be about 0.1 m/s.
In the program, a variable charbuf [32] of a defined private member is used for storing control command information which is expected to be sent out by a serial port. The wheel RPM speed information is converted into the pulse number information of every 10ms to be transmitted in the SetRPM function, the speed information of two wheels a and B and the wheel rotation direction information are put into the buf array in the SetSpeedLR function, and then the top ten elements in the buf array are transmitted by using the SendData function.
the speed information of the two sending wheels is 0x12, the movement speed of the wheels is 0.1m/s by observing the movement of the wheels, and the serial port sends data successfully.
Realize the calculation of receiving data through the serial port
And receiving a data protocol according to a serial port control instruction driven by the motor, and detecting a start bit and receiving data of the rotating speed and the direction of the wheel by using a state machine.
For the Z-axis data, no analysis is received. For the motor speed direction, zero represents a positive direction, and the second represents a negative direction, and the motor speed direction is one when the wheels are in a stationary state, i.e., the speed is zero. In order to verify the format of the received data, the serial assistant sends the speed and direction information of the motor to the trolley and receives the data transmitted back by the serial port.
the data transmitted in the invention is 0x12 speed and negative direction of rotation, and the data FF FE 12021202000100017F FF received by the serial assistant is observed, and the speed and the direction are consistent.
after the data is sent, the data returned by the serial port is received, the ReadData function is used for reading the information, and the state machine is used for reading the information in the data string.
When the frame head (FF FE) is detected, the motion state of the A and B rounds is followed, and when the frame head is not detected, the state stays in the A state. The next example is the operation of sorting each data by the state machine after the serial port receives the data.
when the starting frame head is detected, each state records the data needing sorting respectively, and then waits for the arrival of the next frame head.
Mileage meter
the odometer is used for calculating the current position of the trolley and can measure the front and back displacement, the left and right displacement and the rotating angle of the trolley.
after data are received through the serial port and the current wheel movement speed and direction are obtained, if the direction is negative, the speed information is negative. The speed information returned by the serial port, namely the pulse numbers left _ speed _ ms and right _ speed _ ms of every 10ms, is read in a function GetDiffPos. By defining a time (time to read each data) in the GetDiffAngle function, the angular change at each time interval can be calculated.
dangle=dt×left_speed/one_wheel_counts
wherein, Dangle: a time interval angle change;
And Dt: a time interval;
Left _ speed: the number of pulses in 1s, namely left _ speed _ ms 100, and the same applies to the right wheel;
One _ wheel _ counts: the number of pulses required for one wheel revolution (47 × 500 × 4/8 ═ 11750);
And finally, dividing the pulse number of each interval time by the pulse number required by one wheel revolution, namely the percentage of the turning angle in the interval time dt to 2 pi degrees.
the time interval information dt is 0.107s, the date is 0.016 by the above relation, the actual date is 0.0164 by printing information in the program, the error is 2.5%, and is within 3%, and the result is correct within the error allowance.
the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, it should be noted that, for those skilled in the art, many modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (5)

1. A method for controlling two-drive differential speed of a four-wheel trolley is characterized by comprising the following steps:
step 1: setting the motion state of the chassis;
Step 11: before operation, selecting the chassis type;
step 12: after the selection is completed in step 11, selecting a chassis drive;
Step 13: after the selection and installation in step 12 are completed, the linear velocity and the angular velocity in the X, Y direction thereof are set to zero processing;
Step 14: setting X, Y the linear and angular velocities;
step 15: obtaining the position in the direction of X, Y in the odometer and the rotation angle of the chassis;
step 16: obtaining the linear speed and the rotation angular speed of the chassis in the direction X, Y;
step 2: calculating odometer data;
step 21: reading the data of the chassis;
Step 22: reading the speed and rotation direction information of the wheel in the data by using a state machine;
Step 23: calculating the rotation angle of the left/right wheel in a period of time;
step 24: calculating a distance that the left/right wheel moves over a period of time;
Step 25: and inputting the speed information of the two wheels in the differential model to obtain odometer data.
2. the method for controlling the two-wheel drive differential speed of a four-wheel vehicle according to claim 1, wherein: the period of time involved in step 23 and step 24 is the same period of time.
3. the method of claim 1, wherein the differential speed control comprises: and in the step 21, data transmission is performed through serial port data.
4. the method of claim 1, wherein the differential speed control comprises: the chassis drive in the four-wheel trolley is provided with an embedded platform which is connected through a serial port data line.
5. The method of claim 4, wherein the differential speed control comprises: the embedded platform is connected with the PC end through a network.
CN201910747708.6A 2019-08-14 2019-08-14 two-drive differential control method suitable for four-wheel trolley Pending CN110562321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910747708.6A CN110562321A (en) 2019-08-14 2019-08-14 two-drive differential control method suitable for four-wheel trolley

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910747708.6A CN110562321A (en) 2019-08-14 2019-08-14 two-drive differential control method suitable for four-wheel trolley

Publications (1)

Publication Number Publication Date
CN110562321A true CN110562321A (en) 2019-12-13

Family

ID=68775392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910747708.6A Pending CN110562321A (en) 2019-08-14 2019-08-14 two-drive differential control method suitable for four-wheel trolley

Country Status (1)

Country Link
CN (1) CN110562321A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090132126A1 (en) * 2007-11-20 2009-05-21 Jtekt Corporation Electric power steering device
CN103383570A (en) * 2013-06-25 2013-11-06 天奇自动化工程股份有限公司 Automatic guided vehicle capable of moving in all directions
CN106020200A (en) * 2016-07-07 2016-10-12 江苏上骐集团有限公司 AGV driven by wheel hub motor and its path planning method
CN107544512A (en) * 2017-09-30 2018-01-05 江西洪都航空工业集团有限责任公司 A kind of differential turning control for intelligent lorry

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090132126A1 (en) * 2007-11-20 2009-05-21 Jtekt Corporation Electric power steering device
CN103383570A (en) * 2013-06-25 2013-11-06 天奇自动化工程股份有限公司 Automatic guided vehicle capable of moving in all directions
CN106020200A (en) * 2016-07-07 2016-10-12 江苏上骐集团有限公司 AGV driven by wheel hub motor and its path planning method
CN107544512A (en) * 2017-09-30 2018-01-05 江西洪都航空工业集团有限责任公司 A kind of differential turning control for intelligent lorry

Similar Documents

Publication Publication Date Title
CN105033996B (en) Control system based on hand-push teaching type five-shaft horizontal joint robot
CN109249397B (en) Six-degree-of-freedom robot dynamics parameter identification method and system
Lee et al. A neural network model of electric differential system for electric vehicle
CN103389087A (en) Posture calculation method of wheeled robot
CN208654640U (en) Two-wheeled balanced robot's control system
CN107689754A (en) A kind of steering wheel position information processing method and system
CN106020124A (en) Apparatus for controlling servo motor and method for detecting collision
CN108759822A (en) A kind of mobile robot 3D positioning systems
CN111993411A (en) Robot motion planning method and device, robot and storage medium
CN105204441A (en) Hand-push teaching type five-axis polishing grinding robot
CN206664791U (en) A kind of longitudinal double-wheel self-balancing robot and control system
CN110562321A (en) two-drive differential control method suitable for four-wheel trolley
CN108062024A (en) A kind of mobile robot back-stepping sliding mode control method for considering resistance
CN113601516A (en) Sensorless robot dragging teaching method and system
CN109732595A (en) A kind of calibration method of steering engine, device and controller
CN105241678A (en) Fast control prototype realization method of active rear wheel steering
CN110027610A (en) Pilotless automobile wire-controlled steering system, rotating direction control method and development approach
CN110647120B (en) Motion control method suitable for extreme application conditions
CN109445404A (en) Intelligent driving programmed decision-making control system enhances in ring test method
CN105403190A (en) Displacement detection system of stepping machine
CN108594798A (en) A kind of the robot car system and its control method of the control that can be achieved to swarm
CN106998161A (en) The method for identification of rotational inertia and device of a kind of servo-drive system
CN109202883A (en) A kind of position control method of self-balance robot
CN104155909B (en) Stability in finite time control system based on the tape speed observer of PC+FPGA
CN113219973B (en) Local path control method of mobile robot

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191213

RJ01 Rejection of invention patent application after publication