Disclosure of Invention
Aiming at the problems, the invention aims to provide a control method for online accurate calibration of an AGV odometer, which does not need manual accurate calibration, can use an online self-learning function to dynamically and autonomously adjust calibration parameters of the AGV under the normal work of the AGV and when the working condition changes or the performance of the AGV motor and wheels changes due to aging reasons and design parameters, greatly reduces the factory calibration workload of the AGV, and improves the intelligence of the AGV.
In order to achieve the purpose, the invention provides the following technical scheme: a control method for online accurate calibration of an AGV odometer comprises the following steps:
step S1: obtaining the current two-dimension code and comparing the current two-dimension code with the positioning data obtained by the two-dimension code last time to obtain two distance difference values:
wherein (x)
0 ,y
0 ) And (x)
1 ,y
1 ) Global coordinates of the previous two-dimensional code and the current two-dimensional code are respectively;
step S2: and (3) obtaining the distance ratio between the two-dimensional code and the distance given by the odometer:
defining: r is
qr,odo,C For the last distance ratio, r
qr,odo,1 Is the current distance ratio;
and step S3: and updating the calibration coefficient coff of the odometer based on the fuzzy control judged by the working condition.
Preferably, the positioning of the two-dimensional code specifically includes: arranging two-dimensional codes according to rules on the ground, and providing absolute positioning information (x, y, theta) by the two-dimensional code camera when the AGV acts on the two-dimensional codes, namely the two-dimensional codes exist in the visual field range of the two-dimensional code camera; according to the above description, the odometer information is real-time continuous information, and the two-dimensional code information is intermittent information; the central controller obtains two sensor positioning modes, one mode is integration according to the position and pose increment of the odometer and is called odometer positioning, and the other mode is absolute positioning obtained when a certain two-dimensional code is in the visible range of the two-dimensional code camera and is called two-dimensional code positioning.
Preferably, in step S3, the working condition determination occurs at the time of newly finding the two-dimensional code, and defines: cond curr For the current operating mode, cond prev For the last judged condition, the fuzzy control rule is defined as: when the working conditions are not switched, coff = r qr,odo,1 When the working condition is from idle → light load, idle → heavy load, light load → heavy load, if r qr,odo,1 >r qr,odo,0 If coff = r qr,odo,1 +0.02*r qr,odo,0 If r is qr,odo,1 <r qr,odo,0 If coff = r qr,odo,0 (ii) a When the working condition is from light load → no load, heavy load → light load, heavy load → no load, if r qr,odo,1 >r qr,odo,0 If coff = r qr,odo,0 If r is qr,odo,1 <r qr,odo,0 If coff = r qr,odo,1 +0.05*r qr,odo,0 。
Preferably, the method further comprises the step S4: odometer calibration coefficient k odo And limiting, wherein the upper limit of the calibration error of the odometer is generally within 5% of factory calibration. The invention thus provides that the variation of the odometer calibration factor cannot exceed 5% of the factory calibration factor, and that if the odometer calibration factor exceeds 5%, the adjustment of this calibration factor is limited to 5%.
Preferably, when the AGV leaves the factory, the odometer is positioned and calibrated, and when the AGV runs, the real-time pose is expressed as: (x) curr ,y curr ,θ curr ) T =(x prev ,y prev ,θ prev ) T +k odo (Δx,Δy,Δθ) T Formula (1) wherein (x) curr ,y curr ,θ curr ) T To estimate pose, (x) prev ,y prev ,θ prev ) T For the last pose, (Δ x, Δ y, Δ θ) T For odometer pose increment, k odo And calibrating coefficients for the odometer.
Preferably, the process of judging and determining the working condition includes: calculating load ratio, estimating load according to AGV characteristics, and defining AGV load ratio R
Load Characterizing the load condition of the current AGV:
wherein, I
M For the current running motor current, I
R The load ratio is in direct proportion to the load condition for the rated current of the walking motor.
Preferably, the process of judging and determining the working condition further includes: the load ratio is filtered on line, and the load condition of the AGV is directly reflected in the process of constant-speed running of the AGV; in order to avoid singular value mutation, online filtering is carried out on the load ratio when the AGV runs at a constant speed:
wherein a + b =1, the filter parameters are represented, and a =0.9, b =0.1 is taken; />
Is the current load ratio after filtering; />
The load ratio after the last beat of filtering is obtained; r
Load And the load ratio obtained by sampling the motor at this time.
Preferably, the AGV load condition is divided into three conditions: if it is not
Then the AGV is in an idle running working condition; if->
Then the AGV is in a light-load running condition; if +>
The AGV is in a heavy-duty drive condition.
Compared with the prior art, the invention has the following beneficial effects: according to the method, manual accurate calibration is not needed, an online self-learning function can be used to dynamically and automatically adjust the calibration parameters of the odometer when the working condition of the AGV works normally and the design parameters of the AGV motor and wheels change due to aging, so that the factory calibration workload of the AGV is greatly reduced, and the intelligence of the AGV is improved.
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.
In the description of the present invention, it should be noted that the terms "upper", "lower", "inner", "outer", "front", "rear", "both ends", "one end", "the other end", and the like indicate orientations or positional relationships based on orientations or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be configured in a specific orientation, and operate, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it is to be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "disposed," "connected," and the like are to be construed broadly, such as "connected," which may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Referring to fig. 1, a method for controlling online accurate calibration of an AGV odometer includes the following steps:
step S1: obtaining the current two-dimensional code and comparing the current two-dimensional code with the positioning data obtained by the two-dimensional code last time to obtain a difference value of two distances:
wherein (x)
0 ,y
0 ) And (x)
1 ,y
1 ) Global coordinates of the previous two-dimensional code and the current two-dimensional code are respectively obtained; wherein the location of two-dimensional code specifically includes: arranging two-dimensional codes according to rules on the ground, and providing absolute positioning information (x, y, theta) by the two-dimensional code camera when the AGV acts on the two-dimensional codes, namely the two-dimensional codes exist in the visual field range of the two-dimensional code camera; according to the above description, the odometer information is real-time continuous information, and the two-dimensional code information is intermittent information; the central controller obtains two sensor positioning modes, one mode is integration according to the position and pose increment of the odometer and is called odometer positioning, and the other mode is absolute positioning obtained when a certain two-dimensional code is in the visible range of the two-dimensional code camera and is called two-dimensional code positioning.
Step S2: and (3) obtaining the distance ratio between the two-dimensional code and the distance given by the odometer:
defining: r is
qr,odo,0 For the last distance ratio, r
qr,odo,1 Is the current distance ratio;
and step S3: updating a calibration coefficient coff of the odometer based on fuzzy control judged by working conditions, and defining when the working conditions are judged to occur at the moment of newly finding the two-dimensional code: cond curr For the current operating mode, cond prev For the last judged condition, the fuzzy control rule is defined as: when the working conditions are not switched, coff = r qr,odo,1 When the working condition is from no load → light load, no load → heavy load, light load → heavy load, if r qr,odo,1 >r qr,odo,0 If coff = r qr,odo,1 +0.02*r qr,odo,0 If r is qr,odo,1 <r qr,odo,0 If coff = r qr,odo,0 (ii) a When the working condition is from light load → no load, heavy load → light load, heavy load → no load, if r qr,odo,1 >r qr,odo,0 If coff = r qr,odo,0 If r is qr,odo,1 <r qr,odo,0 If coff = r qr,odo,1 +0.05*r qr,odo,0 。
And step S4: odometer calibration coefficient k odo And (6) limiting.
In the invention, when the AGV leaves the factory, the odometer is positioned and calibrated, and when the AGV runs, the real-time pose is expressed as follows: (x)
curr ,y
curr ,θ
curr )
T =(x
prev ,y
prev ,θ
prev )
T +k
odo (Δx,Δy,Δθ)
T Formula (1) wherein (x)
curr ,y
curr ,θ
curr )
T To estimate pose, (x)
prev ,y
prev ,θ
prev )
T For the last pose, (Δ x, Δ y, Δ θ)
T For odometer pose increment, k
odo And calibrating coefficients for the odometer. The working condition judging and judging process comprises the following steps: calculating the load ratio, estimating the load according to the AGV characteristics, and defining the AGV load ratio R
Load The load condition of the current AGV is characterized:
wherein, I
M For the current running motor current, I
R The load ratio is in direct proportion to the load condition for the rated current of the walking motor. The load ratio is filtered on line, and the load condition of the AGV is directly reflected in the process of constant-speed running of the AGV; in order to avoid singular value mutation, online filtering is carried out on the load ratio when the AGV runs at a constant speed: />
Wherein a + b =1, the filter parameters are represented, and a =0.9, b =0.1 is taken; />
Is the current load ratio after filtering; />
The load ratio after the last beat of filtering is obtained; r
Load And the load ratio obtained by sampling the motor at this time. />
In the invention, the AGV load condition is divided into three working conditions: if it is not
Then the AGV is in an idle running working condition; if +>
Then the AGV is in a light-load running working condition; if +>
Then the AGV is in a heavy-duty drive condition.
The following provides a specific embodiment of the present invention
Example 1
The invention provides a control method for online accurate calibration of an AGV odometer, wherein the AGV is provided with a walking servo motor and a servo driver, and a central controller controls the walking servo motor so that the AGV moves according to a specified target. The servo driver sends the rotating speed information of the motor to the central controller in real time, and the central controller calculates the odometer information on line according to the rotating speed of the motor. Specifically, the odometer information is expressed as the pose increment (Δ x, Δ y, Δ θ) of the AGV T . In addition, the AGV is equipped with at least one external sensor (in this embodiment, a two-dimensional code sensor is taken as an example), and the ground arranges two-dimensional codes according to a certain rule. When the AGV moves onto the two-dimensional code, i.e. there is a two-dimensional code within the field of view of the two-dimensional code camera, the two-dimensional code camera provides absolute positioning information (x, y, theta). According to the above description, the odometer information is real-time continuous information, and the two-dimensional code information is intermittent information. The central controller can obtain two sensor positioning modes, one mode is integration according to the position and pose increment of the odometer and is called odometer positioning, and the other mode is absolute positioning obtained when a certain two-dimensional code is in the visible range of the two-dimensional code camera and is called two-dimensional code positioning. General, two-dimensionalThe positioning information provided by the code positioning is accurate and has no accumulated error.
When the AGV leaves the factory, calibrate the odometer positioning, and when the AGV runs, the real-time pose is expressed as:
(x curr ,y curr ,θ curr ) T =(x prev ,y prev ,θ prev ) T +k odo (Δx,Δy,Δθ) T formula (1)
Wherein (x) curr ,y curr ,θ curr ) T To estimate pose, (x) prev ,y prev ,θ prev ) T For the last pose, (Δ x, Δ y, Δ θ) T For odometer pose increment, k odo And calibrating coefficients for the odometer. The invention provides a pair k odo A method for performing online learning adjustment.
The specific process is as follows:
off-line calibration based on working conditions;
when the AGV leaves the factory, demarcating three working conditions of the AGV respectively, wherein demarcating results are shown in the following table 1:
table 1 factory calibration prestored table
And judging the working condition, wherein the working condition switching only occurs when a new two-dimensional code is found, and the calculation occurs in a time period when the AGV runs between the two-dimensional codes.
First, duty ratio calculation
Firstly, according to AGV characteristics, load estimation is carried out, and AGV load ratio R is defined Load The load condition of the current AGV is characterized:
wherein, I M For the current running motor current, I R The rated current of the walking motor. Load ratio and load conditionIs in direct proportion.
And secondly, filtering the load ratio on line, and directly reflecting the load condition of the AGV in the process of driving the AGV at a constant speed. In order to avoid singular value mutation, online filtering is carried out on the load ratio when the AGV runs at a constant speed:
wherein a + b =1, the filter parameters are represented, and generally, a =0.9, b =0.1;
is the current load ratio after filtering;
the load ratio after the last beat of filtering is obtained;
R Load and the load ratio obtained by sampling the motor at this time.
Thirdly, judging the working conditions
The AGV load condition is divided into three working conditions:
if it is used
Then the AGV is in an idle running working condition;
if it is not
Then the AGV is in a light-load running working condition;
if it is used
Then the AGV is in a heavy-load driving condition;
the process of determining the loading of the AGV is shown in fig. 1:
in this embodiment, the process of selecting the on-line calibration initial value of the engineering meter is as follows:
and (4) obtaining an initial value of the on-line calibration of the odometer according to the obtained working condition judgment and the data of the table 1.
In this embodiment, the specific process of the odometer online calibration algorithm is as follows:
after selecting a calibration initial value, k is added odo,0 And starting online calibration as an initial value of the odometer online calibration algorithm. The calibration result is as follows: k is a radical of formula odo =coff*k odo,0 。k odo Substituting equation (1) provides online odometer positioning for the AGV.
The algorithm is based on fuzzy control, and ensures that the mileage counting data is adjusted online by online calibration coefficients each time when the two-dimensional code passes through, and on the other hand, in order to ensure the robustness of calibration, online smoothing is carried out to remove singular values or noise points. Linear motion is adopted between the two-dimensional codes of AGV walking.
The first step, obtain present two-dimensional code and carry out the comparison with the last positioning data that is acquireed by the two-dimensional code, obtain two distance difference:
wherein (x) 0 ,y 0 ) And (x) 1 ,y 1 ) The global coordinates of the last two-dimensional code and the current two-dimensional code are respectively.
Meanwhile, according to the formula (1), the moving distance d of the odometer in the same time period is obtained odo 。
Secondly, obtaining the distance ratio given by the two-dimensional code and the odometer:
defining: r is a radical of hydrogen
qr,odo,0 For the last distance ratio, r
qr,odo,1 Is the current distance ratio;
and thirdly, updating the calibration coefficient coff of the odometer based on the fuzzy control judged by the working condition. As mentioned in 4.2, the condition determination occurs at the new discovery twoThe time of dimension code defines: cond curr Is the current operating condition, cond prev For the last judged condition, the fuzzy control rule is defined as shown in table 2:
TABLE 2
In table 2, the upper limit of the odometer calibration error is within 2% of the factory calibration, wherein the adjustment coefficients 0.02 and 0.05 of (1) and (2) in the remarks can be adjusted according to different AGVs, generally, the parameter is directly related to the weight ratio of the heavy load to the no load of the AGVs; the adjustment coefficient (0.02) in remark (2) is greater than the adjustment coefficient (0.02) in item (1), mainly because when the AGV reduces the load, the command running speed is generally increased, the accumulated error of the odometer greatly affects the positioning of the AGV, and rapid adjustment is required.
Fourthly, the odometer calibrates the coefficient k odo And (6) limiting. Generally, the upper limit of the calibration error of the odometer is within 5% of factory calibration. Therefore, the invention provides that the fluctuation of the calibration coefficient of the odometer can not exceed 5 percent of the factory calibration coefficient, and the corresponding working condition is shown in the table 1. If the odometer calibration factor exceeds 5%, then this calibration factor adjustment is limited to 5%. According to the method, manual accurate calibration is not needed, an online self-learning function can be used to dynamically and automatically adjust the calibration parameters of the odometer when the working condition of the AGV works normally and the design parameters of the AGV motor and wheels change due to aging, so that the factory calibration workload of the AGV is greatly reduced, and the intelligence of the AGV is improved.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.