CN111240266B - Two-wheel speed irregularity optimization algorithm applied to sweeping robot - Google Patents

Two-wheel speed irregularity optimization algorithm applied to sweeping robot Download PDF

Info

Publication number
CN111240266B
CN111240266B CN202010046811.0A CN202010046811A CN111240266B CN 111240266 B CN111240266 B CN 111240266B CN 202010046811 A CN202010046811 A CN 202010046811A CN 111240266 B CN111240266 B CN 111240266B
Authority
CN
China
Prior art keywords
wheel
code disc
module
control layer
slowest
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.)
Active
Application number
CN202010046811.0A
Other languages
Chinese (zh)
Other versions
CN111240266A (en
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.)
Hunan Grand Pro Robot Technology Co ltd
Original Assignee
Hunan Grand Pro Robot 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 Hunan Grand Pro Robot Technology Co ltd filed Critical Hunan Grand Pro Robot Technology Co ltd
Priority to CN202010046811.0A priority Critical patent/CN111240266B/en
Publication of CN111240266A publication Critical patent/CN111240266A/en
Application granted granted Critical
Publication of CN111240266B publication Critical patent/CN111240266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/19Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/35Nc in input of data, input till input file format
    • G05B2219/35349Display part, programmed locus and tool path, traject, dynamic locus

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The invention discloses a two-wheel speed irregularity optimization algorithm applied to a sweeping robot, which comprises the following steps: (1) starting and initializing the sweeping robot; (2) the control layer calls a PIDCtrlTick module of the algorithm layer, the PIDCtrlTick module receives the number of the code discs of the left wheel and the right wheel in real time, updates the number of the slowest code discs at set time intervals and returns the updated number to the control layer, and the wheel speeds of the left wheel and the right wheel are controlled according to a return value; (3) the control layer calls a WheelSpdSet module of the algorithm layer; (4) the control layer calls a SpeedPIDCal module of the algorithm layer, and the SpeedPIDCal module controls the wheel speeds of the left wheel and the right wheel according to the target dial number; (5) and the control layer judges whether the sweeping robot stops moving, if not, the step 2 is returned, and if not, the robot stops moving.

Description

Two-wheel speed irregularity optimization algorithm applied to sweeping robot
Technical Field
The invention relates to the technical field of robots, in particular to a two-wheel speed irregularity optimization algorithm applied to a sweeping robot.
Background
The current sweeping robot has the following defects in linear walking: (1) the traveling process deviates, and due to the difference of motors of the existing sweeping robot, when the sweeping robot is controlled to travel, the traveling speed of the wheel on the side with the slow rotating speed of the motor is also slower, so that the sweeping robot deviates in the traveling process; (2) due to the difference of wheel speeds, the sweeping robot deviates, and the calculation of the position coordinate of the sweeping robot in the following process is also greatly influenced, so that the sweeping robot cannot move according to a planned route; (3) most of the solutions are to replace the motor or wheel gear structure with higher precision and higher cost.
Therefore, it is necessary to design an algorithm for solving the two-wheel differential problem, which has high algorithm execution efficiency and lower requirement on motor precision.
Disclosure of Invention
Technical problem to be solved
Aiming at the defects of the prior art, the invention provides an optimization algorithm for the uneven wheel speeds of two wheels of a sweeping robot, and solves the problem that the straight line walking of the sweeping robot has defects due to the fact that the wheels of the left wheel and the right wheel of the sweeping robot are different due to the difference of motors of the sweeping robot.
(II) technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme: the utility model provides a be applied to robot of sweeping floor's two rounds of wheel speed irregularity optimization algorithm, includes control layer and algorithm layer, includes the following step:
step 1: starting the sweeping robot, initializing the maximum number of left wheels, the maximum number of right wheels and the slowest number of left wheels by the algorithm layer, returning the slowest number of left wheels to the control layer, and controlling the wheel speeds of the left and right wheels by the control layer through a return value;
step 2: the control layer calls a PIDCtrlTick module of the algorithm layer, the PIDCtrlTick module receives the number of the code discs of the left wheel and the right wheel in real time, updates the number of the slowest code discs at set time intervals and returns the updated number to the control layer, and the control layer controls the wheel speeds of the left wheel and the right wheel according to the returned value;
and step 3: the control layer calls a WheelSpdSet module of the algorithm layer, the WheelSpdSet module calculates the number of target code discs according to preset target wheel speeds of the left wheel and the right wheel, and returns the number of the target code discs to the control layer.
And 4, step 4: the control layer calls a SpeedPIDCal module of the algorithm layer, and the SpeedPIDCal module controls the wheel speeds of the left wheel and the right wheel according to the target dial number;
and 5: and the control layer judges whether the sweeping robot stops moving, if not, the step 2 is returned, otherwise, the movement is stopped.
Preferably, the method for updating the slowest code disc number by the PIDCtrlTick module comprises the following steps:
step 1: presetting initial values of a left wheel maximum code disc number maxLeftcode, a right wheel maximum code disc number maxRightcode and a slowest code disc number slowest, returning the slowest code disc number slowest to a control layer, and controlling the wheel speeds of the left wheel and the right wheel by the control layer according to the return values;
step 2: the control layer judges whether the sweeping robot stops moving, if so, the step 3 is executed, and if not, the judgment is carried out again;
and step 3: the control layer guides the code disc numbers of the left wheel and the right wheel into the algorithm layer in real time, the PIDCtrTick module records the code disc number PidLw.last10mscode of the left wheel and the code disc number PidRw.last10mscode of the right wheel every 10ms, and the code disc numbers of the left wheel and the right wheel are reset after recording;
and 4, step 4: the PIDCtrlTick module judges the number PidLw.last10mscode of the left wheel and the maximum number maxLeftcode of the left wheel, if PidLw.last10mscode > maxLeftcode, executing the step 5, and otherwise, executing the step 8;
and 5: the PIDCtrlTick module assigns PidLw.last10mscode to maxLeftcode;
step 6: the PIDCtrlTick module judges the number PidRw.last10mscode of the right wheel code disc and the maximum number maxRightcode of the right wheel code disc, if the PidRw.last10mscode is greater than the maxRightcode, executing a step 7, and otherwise, executing a step 8;
and 7: the PIDCtrlTick module assigns PidRw.last10msCode to maxRightCode;
and 8: the PIDCtrlTick module judges the maximum left code disc number maxLeftcode and the maximum right code disc number maxRightcode, if the maximum left code disc number maxLeftcode is smaller than the maximum right code disc number maxRightcode, the PIDCtrlTick module assigns the maxLeftcode to the slowest code disc number slowest, and otherwise assigns the maxRightcode to the slowest code disc number slowest;
and step 9: and the PIDCtrlTick module returns the slowest code disc number slowerCode to the control layer.
Preferably, the updating the target number of yards by the WheelSpdSet module includes the following steps:
step 1: the WheelSpdSet module calculates the speed ratio of the left wheel and the right wheel according to a preset target wheel speed lspd of the left wheel and a preset target wheel speed rspd of the right wheel, and the calculation formula is
Figure BDA0002369713900000041
Step 2: the WheelSpdSet module calculates the target code disc numbers of the left wheel and the right wheel according to the speed ratio of the left wheel and the right wheel, and the calculation formula is that the target code disc number of the left wheel is equal to the speed ratio of the left wheel multiplied by the slowest code disc number multiplied by a correction coefficient, and the target code disc number of the right wheel is equal to the speed ratio of the right wheel multiplied by the slowest code disc number multiplied by a correction coefficient.
Preferably, the SpeedPIDCal module adjusting the duty ratio of the left wheel and the right wheel comprises the following steps:
step 1: calculating a current error value, wherein the formula is that the current error value err is equal to the target code disc number-the current code disc number;
step 2: calculating an adjustment amplitude, wherein the formula is that the adjustment amplitude ftmp is KP x (err-lerr) + KI x err + KD x (err + perr-2 x lerr), in the formula, err is an error value of the actual 10ms code disc number and the target code disc number, lerr is an error value of the last time, perr is an error value of the last time, KP is a proportional control weight, KI is an integral control weight, and KD is a differential control weight;
and step 3: assigning the last error value lerr to the last error value perr;
and 4, step 4: assigning the current error value to the last error value lerr;
and 5: and controlling the duty ratio p- > out + ftmp of the wheel speed and carrying out amplitude limiting, so that the value range of p- > out is-5000.
(III) advantageous effects
The invention provides a two-wheel speed irregularity optimization algorithm applied to a sweeping robot. The method has the following beneficial effects: (1) the robot body of the sweeping robot is low in cost and low in requirement on the precision of the motor, and the deviation is extremely small when the robot body of the sweeping robot is controlled to walk on a straight path under the condition that the two motors are different; (2) automatically starting to adjust after the machine starts to move, and dynamically adjusting the wheel speed all the time in the running process; (3) when the sweeping robot walks linearly, the deviation angle is far lower than that of the sweeping robot without processing wheel speed difference.
Drawings
FIG. 1 is a schematic diagram of an algorithm invocation flow of the present invention;
FIG. 2 is a schematic block diagram of a PIDCtrlTick module flow of the present invention;
FIG. 3 is a block diagram illustrating the WheelSpdSet module flow of the present invention;
FIG. 4 is a schematic block diagram of the speedPIDCal module flow of the present invention.
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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. 1-4, an embodiment of the present invention provides a technical solution: the utility model provides a be applied to robot of sweeping floor's two rounds of wheel speed irregularity optimization algorithm, includes control layer and algorithm layer, includes the following step:
step 1: starting the sweeping robot, wherein the algorithm layer initializes a left wheel maximum code disc number maxLeftCode, a right wheel maximum code disc number maxright code and a slowest code disc number slowest code disc, (since the difference of the same motor can be controlled within a certain range under most conditions, code disc values within 10ms of two wheels under the condition of no wheel speed limitation are tested before initialization, the values are used for initializing the left wheel maximum code disc number, the right wheel maximum code disc number and the slowest code disc number, when a user uses the sweeping robot, a real-time value is used for replacing the initialization value after the sweeping robot starts to move), the slowest code disc number refers to the smaller value of the left wheel maximum code disc number and the right wheel maximum code disc number, and the slowest code disc number is returned to the code disc control layer, and the control layer controls the wheel speeds of the left wheel and the right wheel through a return value (namely the slowest code disc number);
step 2: the control layer calls a PIDCtrlTick module of the algorithm layer, the PIDCtrlTick module receives the number of code discs of the left wheel and the right wheel in real time, updates the number of the slowest code discs at set time intervals (the set time is 10ms in the embodiment) and returns the updated number of the slowest code discs to the control layer, and the control layer controls the wheel speeds of the left wheel and the right wheel according to the return value; the PIDCtrlTick module outputs the duty ratio of two wheels after adjustment, the duty ratio is called once every 10ms in a program, the count values of code discs of a left wheel and a right wheel within 10ms are recorded respectively, if the count values are higher than the maximum code disc value recorded before, the maximum code disc number of the left wheel and the maximum code disc number of the right wheel are updated, the maximum code disc number of the left wheel and the maximum code disc number of the right wheel are compared after the updating is finished, the smaller value between the maximum code disc number and the maximum code disc number of the right wheel is taken as the slowest code disc number and stored in slowest code, and in the subsequent wheel speed adjustment of the left wheel and the right wheel, the slowest code disc number is taken as a 10ms target code disc number for speed adjustment after the coefficient processing of slowest code disc number is carried out, and the PIDCtrlTick module updates the slowest code disc number and comprises the following steps: (1) presetting initial values of a left wheel maximum code disc number maxLeftcode, a right wheel maximum code disc number maxRightcode and a slowest code disc number slowest, returning the slowest code disc number slowest to a control layer, and controlling the wheel speeds of the left wheel and the right wheel by the control layer according to the return values; (2) the control layer judges whether the sweeping robot stops moving, if so, the step (3) is executed, and if not, the judgment is carried out again; (3) the control layer guides the code disc numbers of the left wheel and the right wheel into the algorithm layer in real time, the PIDCtrTick module records the code disc number PidLw.last10mscode of the left wheel and the code disc number PidRw.last10mscode of the right wheel every 10ms, and the code disc numbers of the left wheel and the right wheel are reset after recording; (4) the PIDCtrlTick module judges the number PidLw.last10mscode of the left wheel and the maximum number maxLeftcode of the left wheel, if PidLw.last10mscode > maxLeftcode, executing the step (5), and if not, executing the step (8); (5) the PIDCtrlTick module assigns PidLw.last10mscode to maxLeftcode; (6) the PIDCtrlTick module judges the number PidRw.last10MSCode of the right wheel code disc and the maximum number maxRightCode of the right wheel code disc, if PidRw.last10MSCode > maxRightCode, executing the step (7), and if not, executing the step (8); (7) the PIDCtrlTick module assigns PidRw.last10msCode to maxRightCode; (8) the PIDCtrlTick module judges the maximum left code disc number maxLeftcode and the maximum right code disc number maxRightcode, if the maximum left code disc number maxLeftcode is smaller than the maximum right code disc number maxRightcode, the PIDCtrlTick module assigns the maxLeftcode to the slowest code disc number slowest, and otherwise assigns the maxRightcode to the slowest code disc number slowest; (9) and the PIDCtrlTick module returns the slowest code disc number slowerCode to the control layer.
And step 3: the control layer calls a WheelSpdSet module of the algorithm layer, the WheelSpdSet module obtains a proportion of the wheel speed set by a user and the maximum speed of the machine according to preset target wheel speeds of the left wheel and the right wheel (in the process of setting the wheel speed, the maximum speed which can be reached by the floor sweeping robot is taken as a reference, the proportion is multiplied to the slowest code disc number to obtain the target code disc number corresponding to the current speed, in the motion process, the control layer repeatedly calls a PIDCtrlTick module to obtain the code disc number of the left wheel and the right wheel within 10ms, continuously updates the maximum code disc number of the left wheel and the right wheel, and calculates the target code disc number of the left wheel and the right wheel together with control layer setting parameters (namely the target wheel speed and a correction coefficient, wherein the correction coefficient can be automatically generated by the control layer or manually set, the setting range is 0.5-1.2), and returns the target code disc number of the left wheel and the right wheel to the control layer, the method for updating the number of the target code discs by the WheelSpdSet module comprises the following steps: (1) the WheelSpdSet module calculates the speed ratio of the left wheel and the right wheel according to a preset target wheel speed lspd of the left wheel and a preset target wheel speed rspd of the right wheel, and the calculation formula is
Figure BDA0002369713900000081
The WheelSpdSet module calculates the left wheel target code disc number of the left wheel target code disc and the right wheel target code disc according to the speed ratio of the left wheel to the right wheel, wherein the left wheel target code disc number is equal to the speed ratio of the left wheel multiplied by the slowest code disc number multiplied by a correction coefficient, and the calculation formula is that the right wheel target code disc number is equal to the speed ratio of the right wheel multiplied by the slowest code disc number multiplied by the correction coefficient;
and 4, step 4: the control layer calls a SpeedPIDCal module of the algorithm layer, the SpeedPIDCal module controls the wheel speeds of the left wheel and the right wheel according to the target dial number, and the SpeedPIDCal module adjusts the duty ratios of the left wheel and the right wheel and comprises the following steps: (1) calculating a current error value, wherein the formula is that the current error value err is equal to the target code disc number-the current code disc number; (2) calculating an adjustment amplitude, wherein the formula is that the adjustment amplitude ftmp is KP x (err-lerr) + KI x err + KD x (err + perr-2 x lerr), in the formula, err is an error value of an actual 10ms code disc number and a target code disc number, lerr is an error value of a previous time, perr is an error value of the previous time, KP is a proportional control weight, the value is 1, KI is an integral control weight, the value is 0.9, KD is a differential control weight, and the value is 0.07; (3) assigning the last error value lerr to the last error value perr; (4) assigning the current error value to the last error value lerr; (5) controlling the wheel speed duty ratio p- > out + ftmp and carrying out amplitude limiting, so that the value range of p- > out is-5000;
and 5: and the control layer judges whether the sweeping robot stops moving, if not, the step 2 is returned, otherwise, the movement is stopped.
The invention continuously records the maximum number of code discs (namely the maximum number of the code discs of the left wheel and the maximum number of the code discs of the right wheel) which can be respectively reached by the left wheel and the right wheel in each 10ms interval in the moving process, takes the smaller one (namely the slowest number of the code discs) of the two wheels, and controls the speed of the left wheel and the right wheel according to the smaller value, thereby finishing the effect that the two wheels can keep the deviation of a walking route to be extremely small under the condition of difference of motors.
The invention continuously compares the error between the current 10ms code disc number and the target code disc number, outputs the duty ratio adjusting value through parameter adjustment, and continuously adjusts the duty ratio of the left wheel and the right wheel so as to control the wheel speeds of the two wheels to be consistent.
Definition of relevant modules of the invention:
wheel speed governing structure:
Figure BDA0002369713900000091
Figure BDA0002369713900000101
WheelSpdSet adjusts the target number of yardage disks with the speed ratio:
type (B) Parameter(s) Description of the invention
int lspd Left wheel speed
int rspd Speed of right wheel
And (3) outputting: target number of yards;
method for dynamically adjusting wheel speed by using slowerCode in speedPIDCal
Inputting:
type (B) Parameter(s) Description of the invention
Pointer with a movable finger p Wheel PID structure defined at initialization
And (3) outputting: the duty cycle p- > out of the control wheel speed.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (3)

1. The utility model provides a be applied to uneven optimization algorithm of two wheel speeds of robot of sweeping floor which characterized in that, includes control layer and algorithm layer, includes the following step:
step 1: starting the sweeping robot, initializing the maximum number of left wheels, the maximum number of right wheels and the slowest number of left wheels by the algorithm layer, returning the slowest number of left wheels to the control layer, and controlling the wheel speeds of the left and right wheels by the control layer through a return value;
step 2: the control layer calls a PIDCtrlTick module of the algorithm layer, the PIDCtrlTick module receives the number of the code discs of the left wheel and the right wheel in real time, updates the number of the slowest code discs at set time intervals and returns the updated number to the control layer, and the control layer controls the wheel speeds of the left wheel and the right wheel according to the returned value;
and step 3: the control layer calls a WheelSpdSet module of the algorithm layer, the WheelSpdSet module calculates the number of target code discs according to preset target wheel speeds of the left wheel and the right wheel and returns the number of the target code discs to the control layer;
and 4, step 4: the control layer calls a SpeedPIDCal module of the algorithm layer, and the SpeedPIDCal module controls the wheel speeds of the left wheel and the right wheel according to the target dial number;
and 5: the control layer judges whether the sweeping robot stops moving, if not, the step 2 is returned, otherwise, the movement is stopped;
the method for updating the slowest code disc number by the PIDCtrlTick module comprises the following steps:
step 1: presetting initial values of a left wheel maximum code disc number maxLeftcode, a right wheel maximum code disc number maxRightcode and a slowest code disc number slowest, returning the slowest code disc number slowest to a control layer, and controlling the wheel speeds of the left wheel and the right wheel by the control layer according to the return values;
step 2: the control layer judges whether the sweeping robot stops moving, if so, the step 3 is executed, and if not, the judgment is carried out again;
and step 3: the control layer guides the code disc numbers of the left wheel and the right wheel into the algorithm layer in real time, the PIDCtrTick module records the code disc number PidLw.last10mscode of the left wheel and the code disc number PidRw.last10mscode of the right wheel every 10ms, and the code disc numbers of the left wheel and the right wheel are reset after recording;
and 4, step 4: the PIDCtrlTick module judges the number PidLw.last10mscode of the left wheel and the maximum number maxLeftcode of the left wheel, if PidLw.last10mscode > maxLeftcode, executing the step 5, and otherwise, executing the step 8;
and 5: the PIDCtrlTick module assigns PidLw.last10mscode to maxLeftcode;
step 6: the PIDCtrlTick module judges the number PidRw.last10mscode of the right wheel code disc and the maximum number maxRightcode of the right wheel code disc, if the PidRw.last10mscode is greater than the maxRightcode, executing a step 7, and otherwise, executing a step 8;
and 7: the PIDCtrlTick module assigns PidRw.last10msCode to maxRightCode;
and 8: the PIDCtrlTick module judges the maximum left code disc number maxLeftcode and the maximum right code disc number maxRightcode, if the maximum left code disc number maxLeftcode is smaller than the maximum right code disc number maxRightcode, the PIDCtrlTick module assigns the maxLeftcode to the slowest code disc number slowest, and otherwise assigns the maxRightcode to the slowest code disc number slowest;
and step 9: and the PIDCtrlTick module returns the slowest code disc number slowerCode to the control layer.
2. The algorithm for optimizing two wheel speed irregularities applied to a sweeping robot according to claim 1, wherein the WheelSpdSet module updating the target pallet number comprises the following steps:
step 1: the WheelSpdSet module calculates the speed ratio of the left wheel and the right wheel according to a preset target wheel speed lspd of the left wheel and a preset target wheel speed rspd of the right wheel, and the calculation formula is
Figure FDA0003103526040000031
Step 2: the WheelSpdSet module calculates the target code disc number of the left wheel and the right wheel according to the speed ratio of the left wheel and the right wheel, and the calculation formula is
Figure FDA0003103526040000032
3. The algorithm for optimizing two-wheel speed irregularity applied to the sweeping robot as claimed in claim 2, wherein the SpeedPIDCal module adjusting the duty cycle of the left and right wheels comprises the following steps:
step 1: calculating a current error value, wherein the formula is that the current error value err is equal to the target code disc number-the current code disc number;
step 2: calculating an adjustment amplitude, wherein the formula is that the adjustment amplitude ftmp is KP x (err-lerr) + KI x err + KD x (err + perr-2 x lerr), in the formula, err is an error value of the actual 10ms code disc number and the target code disc number, lerr is an error value of the last time, perr is an error value of the last time, KP is a proportional control weight, KI is an integral control weight, and KD is a differential control weight;
and step 3: assigning the last error value lerr to the last error value perr;
and 4, step 4: assigning the current error value to the last error value lerr;
and 5: and controlling the duty ratio p- > out + ftmp of the wheel speed and carrying out amplitude limiting, so that the value range of p- > out is-5000.
CN202010046811.0A 2020-01-16 2020-01-16 Two-wheel speed irregularity optimization algorithm applied to sweeping robot Active CN111240266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010046811.0A CN111240266B (en) 2020-01-16 2020-01-16 Two-wheel speed irregularity optimization algorithm applied to sweeping robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010046811.0A CN111240266B (en) 2020-01-16 2020-01-16 Two-wheel speed irregularity optimization algorithm applied to sweeping robot

Publications (2)

Publication Number Publication Date
CN111240266A CN111240266A (en) 2020-06-05
CN111240266B true CN111240266B (en) 2021-08-10

Family

ID=70864920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010046811.0A Active CN111240266B (en) 2020-01-16 2020-01-16 Two-wheel speed irregularity optimization algorithm applied to sweeping robot

Country Status (1)

Country Link
CN (1) CN111240266B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2478957B (en) * 2010-03-24 2014-07-09 Penny & Giles Controls Ltd A controller and control method for a motorised vehicle
CN102141814A (en) * 2010-12-09 2011-08-03 北京理工大学 Balance control method, balance control device and robot
CN102331781B (en) * 2011-06-24 2014-04-23 成都市新筑路桥机械股份有限公司 Trolley left-right linear synchronous travelling control circuit, control method and detection device
CN108274467B (en) * 2018-01-24 2020-05-05 珠海市一微半导体有限公司 Robot straight line control method, chip and robot
CN110667562B (en) * 2018-07-03 2020-11-10 郑州宇通客车股份有限公司 Vehicle straight-running maintaining control method and device based on wheel rotating speed
CN209375502U (en) * 2018-09-14 2019-09-10 天奇自动化工程股份有限公司 The driving motor two-shipper synchronizing device realized using coded disc counting mode

Also Published As

Publication number Publication date
CN111240266A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN107608313B (en) A kind of double spline curve interpolation rate planing methods of five axis
CN1082743C (en) Motor controller
CN101114166A (en) Contour outline control method for complicated track
CN1024849C (en) Process control system
CN106970589A (en) A kind of feed rate relaxation method for reducing Multi-axis Machining profile errors
CN110134062B (en) Multi-axis numerical control machine tool machining path optimization method based on reinforcement learning
CN111240266B (en) Two-wheel speed irregularity optimization algorithm applied to sweeping robot
CN107844058B (en) Motion curve discrete dynamic planning method
CN108636671B (en) Irregular surface patch offset spraying path planning method
CN110989495B (en) Error compensation method based on adaptive iterative learning and numerical control system
CN107748540A (en) A kind of estimation of multiple axes system profile errors and iteration control method based on Newton method
CN109426151A (en) Real-time flexible acceleration/deceleration control algorithm based on adaptive prediction and prediction correction
CN109332910A (en) A kind of speed adjusting method and system of laser cutting
CN105867303A (en) System for machine tool temperature difference compensation by referring to error
CN110108306A (en) The physical parameter check method and AGV trolley of AGV trolley
CN107491034A (en) A kind of optimal tool orientation method based on covariant field functional
CN110875703A (en) Machine learning device, control system, and machine learning method
CN108556364A (en) A kind of parallel reciprocating linear filling optimization method and system
CN108696199A (en) A kind of control method improving permanent magnetic linear synchronous motor positional precision
Garcia et al. On the improvement of walking performance in natural environments by a compliant adaptive gait
CN112327844B (en) Trajectory control method and device, navigation vehicle and computer readable storage medium
CN113467466A (en) Industrial robot control method and device and industrial robot
CN116834015A (en) Deep reinforcement learning training optimization method for automatic control of intelligent robot arm
CN105773628A (en) Wax spraying control method of LED chip waxing robot
CN115453968A (en) Speed planning control method and system for numerical control cam grinding

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
GR01 Patent grant
GR01 Patent grant