A calibration-free visual servo control method based on homography and Q-learning
Through the calibration-free visual servo control method based on homography and Q-learning, the instability problem caused by cumbersome camera calibration and fixed gain in the robot visual servo system is solved, and efficient convergence and stable vision are achieved in the case of many feature points. Servo control.
Patent Information
- Application Number
- CN202210379777.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-04-12
AI Technical Summary
The existing robot visual servo system is cumbersome and has large errors in the camera calibration process, resulting in reduced accuracy. The fixed gain of traditional IBVS leads to system instability and slow convergence. Especially when there are many feature points, the computational burden increases and the visual servo speed is reduced. .
An uncalibrated visual servo control method based on homography and Q-learning is adopted. By establishing the kinematic model and homography task model of the monocular visual servo system, a constant-dimensional mapping matrix is designed, and the Q-learning algorithm is used to adaptively adjust the Optimize servo gain, reduce Jacobian matrix calculation complexity, and improve convergence speed.
When there are many feature points, the computational complexity of the Jacobian matrix is reduced, the convergence speed of visual servoing is improved, and the stability and efficiency of the system are enhanced.
Smart Images

Figure CN114609976B
Abstract
Description
Technical Field
[0001] The invention relates to the field of robot visual servoing, and in particular to an uncalibrated visual servoing control method based on homography and Q learning. Background Art
[0002] 1. The camera calibration process is not only cumbersome, but the camera calibration error will lead to a decrease in the accuracy of visual servo control. In many cases, camera calibration has many limitations.
[0003] 2. In actual engineering, the more image features there are, the more robust the system is and the more accurate the control effect is. However, increasing the number of image feature points will increase the dimension of the Jacobian matrix, which will greatly increase the amount of calculation and the calculation time of the system.
[0004] 3. For traditional IBVS, the servo gain is usually a fixed value. However, fixed gain may cause system instability and slow convergence. Compared with traditional fixed gain, adaptive gain can improve the convergence speed of the system.
[0005] Patent CN202010151757.6 proposes a visual servo switching control method and system. This invention discloses a visual servo switching control method and system. However, this method will increase the calculation burden of the Jacobian matrix and reduce the speed of visual servoing when there are many feature points. Summary of the invention
[0006] In view of this, the present invention aims to propose an uncalibrated visual servo control method based on homography and Q-learning to solve at least one of at least some of the above-mentioned technical problems.
[0007] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0008] On the one hand, the present invention provides an uncalibrated visual servo control method based on homography and Q-learning, comprising the following steps:
[0009] S1. Establishing a kinematic model of a monocular visual servo system to obtain pixel coordinates when feature points are projected onto a current image plane and a desired image plane;
[0010] S2. Based on the central perspective principle, establish a homography task model and design the corresponding homography task function;
[0011] S3. Use the Q-learning algorithm to select the optimal gain coefficient of the homography task model.
[0012] Furthermore, the specific method of step S1 is as follows:
[0013] Assume that the current camera plane coordinate system is {F} and the expected camera plane coordinate system is {F *}、The feature point is P i , feature point P i In {F} and {F * The Euclidean coordinates under i =[X i ,Y i ,Z i ] T and X i and The relationship is:
[0014]
[0015] Where R represents {F *} relative to {F}, t represents the rotation of {F *} translation relative to {F};
[0016] P i The coordinates of {F} and {F *} coordinate system, and define
[0017]
[0018]
[0019] Among them, m i For {F i * Normalized coordinates in the coordinate system, For {F * Normalized coordinates in} coordinate system;
[0020] When the feature point P i When projected onto the current image plane and the desired image plane, its pixel coordinates pi are: They are:
[0021]
[0022] Where K is the gain matrix.
[0023] Furthermore, the specific method of step S2 is:
[0024] Assume n * is the normal vector of plane π and satisfies Combining the principle of central transmission projection, we get
[0025]
[0026] The Euclidean homography matrix of the normalized coordinates is:
[0027]
[0028] Where H is the Euclidean homography matrix of normalized coordinates, c R * Indicates {F *} relative to {F}, t represents the rotation of {F *} relative to {F}, n * Indicates that in {F * The normal vector of the plane π in the} coordinate system;
[0029] Define the depth ratio as:
[0030]
[0031] get,
[0032]
[0033] Define the projection homography matrix as:
[0034] G=KHK -1
[0035] Since the task goal of the monocular visual servo system is to make the two coordinate systems {F} and {F *} coincide, that is, R = I and t = 0, where I represents the identity matrix, we can get:
[0036] H = I;
[0037] Right now
[0038] G=I
[0039] Therefore, it is equivalent to R = I and t = 0, let
[0040]
[0041] Among them, β is an arbitrary proportional coefficient, which represents the mapping ratio relationship between the two sets of images.
[0042] Define a matrix function:
[0043]
[0044] Then the error task function is:
[0045] E=[E1 E2 E3] T
[0046] By taking the derivative of formula E, we get the following relationship:
[0047]
[0048] in, Represents the relationship between the rotation matrix and the angular velocity, that is
[0049]
[0050] The calculation formula is:
[0051]
[0052] Among them, v represents the translation speed of the camera, and w represents the angular speed of the camera;
[0053] It can be deduced that
[0054]
[0055] Transform the above formula:
[0056]
[0057] The expression relating the derivative of e to the camera velocity is obtained as:
[0058]
[0059] Among them, L ec is the Jacobian matrix, V c is the spatial velocity of the camera;
[0060] The control algorithm of the visual servo controller for a stationary target is calculated as follows:
[0061]
[0062] Where λ is the gain coefficient.
[0063] Furthermore, the specific method of step S3 is as follows:
[0064] The gain coefficient of the homography task model λ = diag{λ vx ,λ vy ,λ vz ,λ ωx ,λ ωy ,λ ωz}∈R 6×6 , including the agent A with six dimensional servo gains vx ,A vy ,A vz ,A ωx ,A ωy ,A ωz ;
[0065] From the control algorithm of the visual servo controller, it can be seen that the servo gain λ is related to the image Jacobian matrix and the feature error; in addition, even when there are many feature points, The dimension of is fixed, so choose as a state space;
[0066] The state space of the six agents is:
[0067]
[0068] Among them, S vx S vy S vz S wx S wy S wz is the state space set under six degrees of freedom; the state space of the agent in each dimension adopts the logarithmic partitioning method, but the upper and lower limits are different, and the upper and lower limits are determined according to the specific situation;
[0069] Six state spaces S j The upper limit of (j=1,…,6) and lower limit Acquired through the environment; positive interval is divided into n intervals, each interval is Negative interval is divided into n intervals, each interval is
[0070] The logarithmic partitioning method is as follows:
[0071]
[0072] Furthermore, it also includes establishing a gain action set, the method is as follows:
[0073] Select m gains as the action set a = {a i |i=1,…,m}, use the ε-greedy algorithm to select an action a from the action set i , when the random probability is less than ε, randomly select the gain a from the action set i , if the random probability is greater than ε, then select the action corresponding to the maximum value of Q(s,a), and choose ε=μ n is the exploration probability, where n is the number of training runs and μ is a constant between 0 and 1.
[0074] Furthermore, in step S3, the design method of the reward function of the Q learning algorithm is as follows:
[0075] Determine the conditions for the value of the reward function, which include the feature point reaching the expected position, the feature point leaving the field of view, and the feature point approaching the expected position;
[0076] (1) If the sum of the error norms corresponding to the feature points is less than a given threshold, it is judged that the desired position has been reached and the reward value is the maximum value R;
[0077] (2) If a feature point produces a bad trajectory and leaves the field of view after selecting a bad action, the worst reward value -R is given to avoid selecting this action;
[0078] (3) When the feature point is close to the expected position, in order to reduce the error, the reward value is made larger when the feature is closer to the expected position; the reward value changes with the distance of the feature close to the target and is related to the error of the feature point.
[0079] The formula of the reward function is as follows:
[0080]
[0081] Among them, R is the maximum reward value, which is a positive constant; row is the height of the image plane, col is the width of the image plane; σ is the number of feature points.
[0082] Furthermore, in step S3, the update function of the Q learning algorithm is:
[0083]
[0084] Among them, Q t+1 (s t ,a t ) is the state s at time t+1 t Execute action a t The updated Q value after t (s t ,a t ) is the state s at time t t Execute action a t The cumulative Q value after is α, r is the immediate return, γ is the discount rate, Q t (s t+1 ,a t+1 ) is the Q value predicted at the next moment at time t.
[0085] On the other hand, the present invention provides an uncalibrated visual servo control system based on homography and Q-learning, comprising:
[0086] An image acquisition module, used for acquiring image information;
[0087] Modeling module 1 is used to establish the kinematic model of the monocular visual servo system, and obtain the pixel coordinates of the feature points when projected onto the current image plane and the expected image plane in combination with the collected image details;
[0088] Modeling module 2 is used to establish a homography task model and output a mapping matrix with a constant dimension;
[0089] The Q-learning gain module selects the optimal gain coefficient of the homography task model based on the Q-learning algorithm.
[0090] Compared with the prior art, the uncalibrated visual servo control method based on homography and Q-learning described in the present invention has the following advantages:
[0091] Compared with the traditional method, the calibration-free visual servo control method based on homography and Q learning of the present invention reduces the computational complexity of the Jacobian matrix and accelerates the convergence speed by using the homography task function design when there are many feature points. The Q learning method is used to perform adaptive tuning of the gain parameters, which increases the convergence speed of the visual servo task. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0093] Figure 1 Create schematics for kinematic models;
[0094] Figure 2 The architecture diagram of the uncalibrated visual servo control method based on homography and Q-learning;
[0095] Figure 3 For the case of 4 points, the trajectory and error effect comparison of traditional IBVS+Q learning and homography+Q learning;
[0096] Figure 4 For the case of 4 points, the trajectory and error effect comparison of homography + fixed gain and homography + Q learning;
[0097] Figure 5 For the case of 9 points, the trajectory and error effect comparison of traditional IBVS+Q learning and homography+Q learning;
[0098] Figure 6 For the case of 9 points, the trajectory and error effect comparison of homography + fixed gain and homography + Q learning;
[0099] Figure 7 For the case of 16 points, the trajectory and error effect comparison of traditional IBVS+Q learning and homography+Q learning;
[0100] Figure 8 For the case of 16 points, the trajectory and error effect comparison of homography + fixed gain and homography + Q learning. DETAILED DESCRIPTION
[0101] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0102] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0103] A calibration-free visual servo control method based on homography and Q-learning, such as Figure 2 As shown, the details are as follows:
[0104] The kinematic model specifically includes:
[0105] like Figure 1 As shown, for an eye-in-hand type monocular visual servo system, there are the current camera plane coordinate system {F} and the desired camera plane coordinate system {F *}. Assume that the target feature point is P i (i=1,2,...), then it is in {F} and {F * The Euclidean coordinates under i =[X i ,Y i ,Z i ] T and X i and The relationship can be described as
[0106]
[0107] Where R represents {F *} relative to {F}, t represents the rotation of {F *} relative to {F}.
[0108] P i The coordinates of {F} and {F *} coordinate system, and define
[0109]
[0110]
[0111] Among them, m i For {F i * Normalized coordinates in the coordinate system, Normalized coordinates in the coordinate system.
[0112] When the feature point P i When projected onto the current image plane and the desired image plane, its pixel coordinates p i , They are
[0113]
[0114] Where K is the gain matrix.
[0115] Preferably, the steps of designing the homography task function include:
[0116] The homography matrix represents the correspondence between a set of identical features in space in different coordinate systems.
[0117] Assume that n * is the normal vector of plane π and satisfies Combining the principle of central transmission projection, we can get
[0118]
[0119] The Euclidean homography matrix of normalized coordinates can be written as
[0120]
[0121] Where H is the Euclidean homography matrix of normalized coordinates, c R * Indicates {F *} relative to {F}, t represents the rotation of {F *} relative to {F}, n * Indicates that in {F *}The normal vector of plane π in the coordinate system.
[0122] Define the depth ratio as
[0123]
[0124] Can get
[0125]
[0126] Define the projection homography matrix as
[0127] G=KHK -1
[0128] The task of visual servoing is to make two coordinate systems {F} and {F *} coincide, that is, R = I and t = 0, where I represents the identity matrix, we can get
[0129] H=I
[0130] Right now
[0131] G=I
[0132] Therefore, it is equivalent to R = I and t = 0. Let
[0133]
[0134] Among them, β is an arbitrary proportional coefficient, which only expresses the mapping proportional relationship between the two sets of images. For the convenience of calculation, it is usually chosen to use
[0135] Define a matrix function:
[0136]
[0137] Then the error task function is
[0138] E=[E1 E2 E3] T
[0139] Taking the derivative of formula E, we can get the following relationship
[0140]
[0141] in, Represents the relationship between the rotation matrix and the angular velocity, that is
[0142]
[0143] It can be obtained by the following formula
[0144]
[0145] Among them, v represents the translation speed of the camera, and w represents the angular speed of the camera;
[0146] It can be deduced that
[0147]
[0148] The above formula can also be written as
[0149]
[0150] We can therefore derive an expression that relates the derivative of e to the camera velocity, namely
[0151]
[0152] Among them, L ec is the Jacobian matrix, V c is the spatial velocity of the camera.
[0153] The control algorithm of the visual servo controller for stationary targets is obtained as follows:
[0154]
[0155] Where λ is the gain coefficient.
[0156] Compared with the traditional fixed gain, the adaptive gain can improve the convergence speed of the system. The present invention uses Q learning to determine the gain. Compared with other methods, Q learning can make the best decision by learning the environment, and achieve the effect of adaptively adjusting the gain under different states, thereby improving the convergence speed.
[0157] In the present invention, the gain coefficient is λ=diag{λ vx ,λ vy ,λ vz ,λ ωx ,λ ωy ,λ ωz}∈R 6×6 Six agents A representing servo gains vx ,A vy ,A vz ,A ωx ,A ωy ,A ωz , learning experience from the environment through Q-learning.
[0158] From the control algorithm of the visual servo controller, it can be seen that the servo gain λ is related to the image Jacobian matrix and the feature error. In addition, even when there are many feature points, The dimension of is fixed, so choose as state space.
[0159] The Q gain state partitioning design steps include:
[0160] The state space of the six agents is
[0161]
[0162] Among them, S vx S vy S vz S wx S wy S wz It is a state space set under six degrees of freedom. The state space of each dimension adopts the logarithmic partitioning method, but the upper and lower limits are different, and the upper and lower limits are determined by the specific situation.
[0163] Six state spaces S j The upper limit of (j=1,…,6) and lower limit Can be obtained through the environment. Positive interval can be divided into n intervals, each of which is Similarly, the negative interval can be divided into n intervals, each of which is The logarithmic partitioning method is as follows:
[0164]
[0165]
[0166] Preferably, the Q gain action set design steps include:
[0167] In order to reduce the time cost, m gains are given as action set a = {a i |i=1,…,m}. The ε-greedy algorithm is used to select an action a from the action set i When the random probability is less than ε, a gain a is randomly selected from the action set i However, if the random probability is greater than ε, the action corresponding to the maximum value of Q(s,a) is selected, and ε=μ n is the exploration probability, where n is the number of training runs and μ is a constant between 0 and 1.
[0168] The steps of designing the Q-gain reward function in the Q-learning algorithm of the present invention include:
[0169] The value of the reward function mainly depends on three conditions: the feature point reaches the expected position, the feature point leaves the field of view, and the feature point approaches the expected position.
[0170] (1) If the sum of the error norms corresponding to these four points is less than a given threshold, it can be judged that the feature has reached the desired position and the reward value is the maximum value R.
[0171] (2) If a feature point produces a bad trajectory and leaves the field of view after selecting a bad action, the worst reward value -R is given to avoid selecting this action.
[0172] (3) When the feature is close to the expected position, in order to reduce the error, the reward value is made larger when the feature is closer to the expected position. Therefore, the reward value changes as the feature approaches the target and is related to the error of the feature point.
[0173] The reward function is as follows, where R is the maximum reward value, which is a positive constant; row is the height of the image plane, col is the width of the image plane; σ is the number of feature points.
[0174]
[0175] Preferably, the Q function updating step in Q learning includes:
[0176] In the present invention, the update of Q value is independent for each state space, and the Q update function is
[0177]
[0178] Among them, Q t+1 (s t ,a t ) is the state s at time t+1 t Execute action a t The updated Q value after t (s t ,a t ) is the state s at time t t Execute action a t The cumulative Q value after is α, r is the immediate return, γ is the discount rate, Q t (s t+1 ,a t+1 ) is the Q value predicted at the next moment at time t.
[0179] Example:
[0180] In order to verify the effectiveness of the method based on projection homography, the present invention uses 4 feature points, 9 feature points and 16 feature points to compare with the traditional method. Among them, the estimation method of the Jacobian matrix of the two mainly adopts Kalman filter estimation and adaptive estimation, and both are uncalibrated visual servoing.
[0181] The initial positions and expected positions of 4 feature points, 9 feature points, and 16 feature points are shown in the following table:
[0182] Initial and expected positions of the four feature points on the image plane (pixels)
[0183]
[0184] Initial and expected positions of the 9 feature points on the image plane (pixels)
[0185]
[0186]
[0187] Initial and expected positions of 16 feature points on the image plane (pixels)
[0188]
[0189]
[0190] Step one: Building the kinematic model of the visual servo system.
[0191] Step 2: Establishment of homography task model. Before performing uncalibrated visual servo control, whether it is the traditional uncalibrated visual servo method or the uncalibrated visual servo based on homography projection, it is necessary to estimate the initial value of the image Jacobian matrix and determine it using the orthogonal heuristic method.
[0192] Step 3: Establish the Q learning gain module. This includes the Q gain state partition design step, the Q gain action set design step, the Q gain reward function design step, and the Q function update rate step to design the Q learning gain module.
[0193] Step 4: Conduct simulation tests on 6 situations for verification. Figure 3 , Figure 4 It is shown that simulation test 1 and simulation test 2 are comparisons of the uncalibrated visual servoing method of 4 feature points. Among them, the image Jacobian matrix in simulation tests 1 and 2 is estimated using an adaptive method. Simulation test 1 uses IBVS+Q learning to compare with homography+Q learning, where IBVS+Q learning takes 4.24s and homography+Q learning takes 23.52s. It is verified that the traditional effect is better at 4 points. Simulation test 2 uses homography+fixed gain to compare with homography+Q learning, where homography+fixed gain takes 29.76s and homography+Q learning takes 23.52s. It is verified that Q learning has a better effect at 4 points.
[0194] like Figure 5 , Figure 6 It is shown that simulation test three and simulation test four are comparisons of uncalibrated visual servoing methods of 9 feature points. Among them, the image Jacobian matrix in simulation tests three and four is estimated using an adaptive method. Simulation test three uses IBVS+Q learning to compare with homography+Q learning, where IBVS+Q learning takes 19.32s and homography+Q learning takes 14.32s. It is verified that at 9 points, the homography effect is better. Simulation test four uses homography+fixed gain to compare with homography+Q learning, where homography+fixed gain takes 16.84s and homography+Q learning takes 14.32s. It is verified that at 9 points, the Q learning effect is better.
[0195] like Figure 7 , Figure 8It is shown that simulation test five and simulation test six are comparisons of uncalibrated visual servoing methods with 16 feature points. Among them, the image Jacobian matrix in simulation tests five and six is estimated using an adaptive method. Simulation test five uses IBVS+Q learning to compare with homography+Q learning, where IBVS+Q learning takes 11.92s and homography+Q learning takes 10.56s. It is verified that at 16 points, the traditional effect is better. Simulation test six uses homography+fixed gain to compare with homography+Q learning, where homography+fixed gain takes 10.84s and homography+Q learning takes 10.56s. It is verified that at 16 points, Q learning has a better effect.
[0196] On the other hand, the present invention also provides an uncalibrated visual servo control system based on homography and Q-learning, comprising:
[0197] An image acquisition module, used for acquiring image information;
[0198] Modeling module 1 is used to establish the kinematic model of the monocular visual servo system, and obtain the pixel coordinates of the feature points when projected onto the current image plane and the expected image plane in combination with the collected image details;
[0199] Modeling module 2 is used to establish a homography task model and output a mapping matrix with a constant dimension;
[0200] The Q-learning gain module selects the optimal gain coefficient of the homography task model based on the Q-learning algorithm.
[0201] The above modules may be implemented in the form of software or hardware, or a combination of the two. The uncalibrated visual servo control system based on homography and Q-learning in this embodiment is implemented based on the uncalibrated visual servo control method based on homography and Q-learning in the above embodiment.
[0202] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0203] In the several embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the division of the units described above is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The above-mentioned units may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
[0205] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A calibration-free visual servo control method based on homography and Q-learning, characterized in that: The steps include: S1. Establishing a kinematic model of a monocular visual servo system to obtain pixel coordinates when feature points are projected onto a current image plane and a desired image plane; S2. Based on the central perspective principle, establish a homography task model and design the corresponding homography task function; S3, using Q learning algorithm to select the optimal gain coefficient of the homography task model; The specific method of step S1 is as follows: Assume that the current camera plane coordinate system is {F} and the expected camera plane coordinate system is {F * }、The feature point is P i , feature point P i In {F} and {F * The Euclidean coordinates under i =[X i ,Y i ,Z i ] T and X i and The relationship is: Where R represents {F * } relative to {F}, t represents the rotation of {F * } translation relative to {F}; P i The coordinates of {F} and {F * } coordinate system, and define Among them, m i For {F i * Normalized coordinates in the coordinate system, For {F * Normalized coordinates in} coordinate system; When the feature point P i When projected onto the current image plane and the desired image plane, its pixel coordinates p i , They are: Where K is the gain matrix; The specific method of step S2 is: Assume n * is the normal vector of plane π and satisfies Combining the principle of central transmission projection, we get The Euclidean homography matrix of the normalized coordinates is: Where H is the Euclidean homography matrix of normalized coordinates, c R * Indicates {F * } relative to {F}, t represents the rotation of {F * } relative to {F}, n * Indicates that in {F * The normal vector of the plane π in the} coordinate system; Define the depth ratio as: get, Define the projection homography matrix as: G=KHK -1 Since the task goal of the monocular visual servo system is to make the two coordinate systems {F} and {F * } coincide, that is, R = I and t = 0, where I represents the identity matrix, we can get: H = I; Right now G=I Therefore, it is equivalent to R = I and t = 0, let Among them, β is an arbitrary proportional coefficient, which represents the mapping ratio relationship between the two sets of images. Define a matrix function: Then the error task function is: <h2 style=";text-align:left;direction:ltr">E=[E1 E2 E3]<h2 style=";text-align:left;direction:ltr"> T By taking the derivative of formula E, we get the following relationship: in, Represents the relationship between the rotation matrix and the angular velocity, that is The calculation formula is: Among them, v represents the translation speed of the camera, and w represents the angular speed of the camera; It can be deduced that Transform the above formula: The expression relating the derivative of e to the camera velocity is obtained as: Among them, L ec is the Jacobian matrix, V c is the spatial velocity of the camera; The control algorithm of the visual servo controller for a stationary target is calculated as follows: Where, λ is the gain coefficient; The specific method of step S3 is as follows: The gain coefficient of the homography task model λ = diag{λ vx ,λ vy ,λ vz ,λ ωx ,λ ωy ,λ ωz }∈R 6×6 , including the agent A with six dimensional servo gains vx ,A vy ,A vz ,A ωx ,A ωy ,A ωz ; From the control algorithm of the visual servo controller, it can be seen that the servo gain λ is related to the image Jacobian matrix and the feature error; in addition, even when there are many feature points, The dimension of is fixed, so choose as a state space; The state space of the six agents is: Among them, S vx S vy S vz S wx S wy S wz is the state space set under six degrees of freedom; the state space of the agent in each dimension adopts the logarithmic partitioning method, but the upper and lower limits are different, and the upper and lower limits are determined according to the specific situation; Six state spaces S j The upper limit of (j=1,…,6) and lower limit Acquired through the environment; positive interval is divided into n intervals, each interval is Negative interval is divided into n intervals, each interval is The logarithmic partitioning method is as follows: It also includes establishing a gain action set, as follows: Select m gains as the action set a = {a i |i=1,…,m}, use the ε-greedy algorithm to select an action a from the action set i , when the random probability is less than ε, randomly select the gain a from the action set i , if the random probability is greater than ε, then select the action corresponding to the maximum value of Q(s,a), and choose ε=μ n As the exploration probability, where n is the number of training times and μ is a constant between 0 and 1; In step S3, the design method of the reward function of the Q learning algorithm is as follows: Determine the conditions for the value of the reward function, which include the feature point reaching the expected position, the feature point leaving the field of view, and the feature point approaching the expected position; (1) If the sum of the error norms corresponding to the feature points is less than a given threshold, it is judged that the desired position has been reached and the reward value is the maximum value R; (2) If a feature point produces a bad trajectory and leaves the field of view after selecting a bad action, the worst reward value -R is given to avoid selecting this action; (3) When the feature point is close to the expected position, in order to reduce the error, the reward value is made larger when the feature is closer to the expected position; the reward value changes as the feature approaches the target and is related to the error of the feature point; The formula of the reward function is as follows: Among them, R is the maximum reward value, which is a positive constant; row is the height of the image plane, col is the width of the image plane; σ is the number of feature points; In step S3, the update function of the Q learning algorithm is: Among them, Q t+1 (s t ,a t ) is the state s at time t+1 t Execute action a t The updated Q value after t (s t ,a t ) is the state s at time t t Execute action a t The cumulative Q value after is α, r is the immediate return, γ is the discount rate, Q t (s t+1 ,a t+1 ) is the Q value predicted at the next moment at time t.
2. A calibration-free visual servo control system based on homography and Q-learning, based on the calibration-free visual servo control method based on homography and Q-learning described in claim 1, characterized in that: include: An image acquisition module, used for acquiring image information; Modeling module 1 is used to establish the kinematic model of the monocular visual servo system, and obtain the pixel coordinates of the feature points when projected onto the current image plane and the expected image plane in combination with the collected image details; Modeling module 2 is used to establish a homography task model and output a mapping matrix with a constant dimension; The Q-learning gain module selects the optimal gain coefficient of the homography task model based on the Q-learning algorithm.
Citation Information
Patent Citations
Visual servo switching control method and system
CN111360827A
Control system and machine learning device
CN108227482A
Visual servo control method for rotor UAV based on fuzzy SARSA learning
CN109143855A
