PID parameter adjustment method, device and equipment for wheeled robot and storage medium

By calculating the lateral and heading errors of the wheeled robot, updating the Q-value table, and discretizing the parameter space, the problem of inaccurate PID parameter determination in the prior art is solved, and the wheeled robot is able to operate according to the optimal trajectory.

CN121386360APending Publication Date: 2026-01-23MULTIWAY ROBOTICS TECH (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511961526.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing technologies cannot accurately obtain the optimal PID control parameters for wheeled robots, causing the robots to fail to operate according to the optimal work trajectory.

Method used

By calculating the actual lateral coordinates and heading angle of the wheeled robot, the lateral tracking error and heading angle tracking error are calculated, the PID control parameters in the Q-value table are updated, control input commands are generated based on the Q-value table, and the parameter space is discretized to determine the optimal PID control parameters when preset conditions are met.

Benefits of technology

This method enables the accurate determination of optimal PID control parameters while ensuring stable operation of the wheeled robot, avoiding parameter deviations caused by insufficient experience or incorrect operation, and improving the accuracy of robot operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121386360A_ABST
    Figure CN121386360A_ABST
Patent Text Reader

Abstract

The invention discloses a PID parameter adjustment method, device and equipment for a wheeled robot and a storage medium. The method comprises the following steps: calculating a transverse tracking error and a course angle tracking error of the wheeled robot; updating the Q value table based on the transverse tracking error, the course angle tracking error and the PID control parameter; a control input instruction is obtained based on the Q value table, and the transverse coordinate and the course angle of the wheeled robot are updated based on the control input instruction; and when the updated transverse coordinate and course angle meet a preset condition, discretizing a parameter space corresponding to the PID control parameter, and determining an optimal PID control parameter. Compared with the prior art that the PID control parameters of the wheeled robot are determined through artificial experience, on the basis that stable operation of the wheeled robot is guaranteed, the state of the wheeled robot is updated based on the transverse tracking error, the course angle tracking error and the PID control parameters which are calculated in real time, and therefore the optimal PID control parameters are determined.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine control, and in particular to a PID parameter tuning method, device and equipment of a wheeled robot and a storage medium. BACKGROUND

[0002] Nowadays, although various control methods emerge in an endless stream in the field of academic research. However, in the industrial field, the PID control method is still the mainstream control method of the wheeled robot. With the advantages of strong anti-interference ability, high control precision, simple and efficient use, the PID control method well meets the requirements of industrial control. However, in the actual working process, the optimal PID control parameter represents that the wheeled robot can control the working trajectory according to the optimal or the most expected working trajectory, so as to improve the working efficiency. Therefore, how to determine the optimal PID control parameter has important practical value and theoretical significance.

[0003] At present, the optimal PID parameter of the wheeled robot is usually determined by the working experience of the control engineer. However, there are too many uncontrollable factors (such as insufficient experience, wrong operation, external environment influence, etc.) in this method, which makes it very complicated and difficult to determine a set of optimal or appropriate PID control parameters in the current PID parameter tuning process of the wheeled robot. In addition, even if the control engineer is experienced, there may still be a considerable deviation between the determined PID control parameter and the optimal PID control parameter, so that the wheeled robot cannot work according to the optimal working trajectory. Therefore, at present, the industry urgently needs a method which can accurately obtain the optimal PID control parameter of the wheeled robot.

[0004] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide a PID parameter tuning method, device, equipment and storage medium of a wheeled robot, which aims to solve the technical problem that the prior art cannot accurately obtain the optimal PID control parameter of the wheeled robot.

[0006] To achieve the above purpose, the present application provides a PID parameter tuning method of a wheeled robot, which comprises the following steps:

[0007] The lateral tracking error and the heading angle tracking error are calculated according to the actual lateral coordinates and the actual heading angle of the wheeled robot, respectively;

[0008] The Q value table is updated based on the lateral tracking error, the heading angle tracking error and the PID control parameter, and the PID control parameter includes the proportional parameter, the integral parameter and the differential parameter;

[0009] obtain a control input instruction based on the Q value table, and transmit the control input instruction to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction;

[0010] When the updated lateral coordinate and the heading angle meet a preset condition, discretize the parameter space corresponding to the PID control parameter, and determine the optimal PID control parameter.

[0011] Optionally, before the lateral tracking error and the heading angle tracking error are calculated according to the actual lateral coordinate and the actual heading angle of the wheeled robot, the method further comprises:

[0012] establishing a space rectangular coordinate system with the center of the wheeled robot as the coordinate origin;

[0013] acquiring the actual lateral coordinate and the actual heading angle of the wheeled robot in the space rectangular coordinate system through a radar and an inertial measurement unit respectively.

[0014] Optionally, the lateral tracking error and the heading angle tracking error are calculated according to the actual lateral coordinate and the actual heading angle of the wheeled robot, comprising:

[0015] setting the difference between the preset lateral coordinate and the actual lateral coordinate as the lateral tracking error;

[0016] setting the difference between the preset heading angle and the actual heading angle as the heading angle tracking error.

[0017] Optionally, the PID control parameter is randomly selected according to a preset probability, and the Q value table is updated based on the lateral tracking error, the heading angle tracking error and the PID control parameter, the PID control parameter comprising a proportional parameter, an integral parameter and a differential parameter, comprising:

[0018] selecting the PID control parameter according to a preset probability;

[0019] inputting the lateral tracking error and the heading angle tracking error into a reward and punishment function to obtain a reward value;

[0020] updating the Q value table based on the reward value and the PID control parameter.

[0021] Optionally, the control input instruction is obtained based on the Q value table, and the control input instruction is transmitted to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction, comprising:

[0022] extracting the PID control parameter corresponding to the maximum Q value in the Q value table;

[0023] obtain a control input instruction based on the parameter corresponding to the maximum Q value;

[0024] transmit the control input instruction to the wheeled robot to make the wheeled robot update the lateral coordinate and the heading angle according to the control input instruction.

[0025] Optionally, when the updated lateral coordinate and the updated heading angle meet the preset condition, the parameter space corresponding to the PID control parameter is discretized to determine the optimal PID control parameter, comprising:

[0026] According to the updated lateral coordinate and the updated heading angle, the updated lateral tracking error and the updated heading angle tracking error are calculated respectively;

[0027] If the updated lateral tracking error and the updated heading angle tracking error both meet the preset condition, the parameter space corresponding to the PID control parameter is discretized to determine the optimal PID control parameter.

[0028] Optionally, before the parameter space corresponding to the PID control parameter is discretized to determine the optimal PID control parameter when the updated lateral coordinate and the updated heading angle meet the preset condition, the method further comprises:

[0029] When the updated lateral coordinate and the updated heading angle do not meet the preset condition, the following steps are repeated until the lateral coordinate and the heading angle meet the preset condition:

[0030] According to the current lateral coordinate and the current heading angle of the wheeled robot, the current lateral tracking error and the current heading angle tracking error are calculated respectively;

[0031] Based on the current lateral tracking error, the current heading angle tracking error and the PID control parameter, a Q value table is updated;

[0032] Based on the Q value table, a control input instruction is obtained, and the control input instruction is transmitted to the wheeled robot to make the wheeled robot update the lateral coordinate and the heading angle according to the control input instruction.

[0033] In addition, to achieve the above-mentioned purpose, the application further provides a PID parameter tuning device for a wheeled robot, which comprises:

[0034] A first calculation module is configured to calculate a lateral tracking error and a heading angle tracking error according to an actual lateral coordinate and an actual heading angle of the wheeled robot respectively;

[0035] A second calculation module is configured to update a Q value table based on the lateral tracking error, the heading angle tracking error and a PID control parameter, wherein the PID control parameter comprises a proportional parameter, an integral parameter and a differential parameter.

[0036] an instruction generation module configured to obtain a control input instruction based on the Q-value table and transmit the control input instruction to the wheeled robot to enable the wheeled robot to update the lateral coordinate and the heading angle according to the control input instruction;

[0037] a parameter determination module configured to discretize a parameter space corresponding to the PID control parameters when the updated lateral coordinate and the updated heading angle satisfy a preset condition, and determine optimal PID control parameters.

[0038] In addition, to achieve the above object, the present application further provides a PID parameter tuning device for a wheeled robot, which comprises a memory, a processor, and a PID parameter tuning program for a wheeled robot stored in the memory and capable of running on the processor, wherein the PID parameter tuning program for a wheeled robot is configured to implement the steps of the PID parameter tuning method for a wheeled robot as described above.

[0039] In addition, to achieve the above object, the present application further provides a storage medium having a PID parameter tuning program for a wheeled robot stored thereon, wherein the PID parameter tuning program for a wheeled robot, when executed by a processor, implements the steps of the PID parameter tuning method for a wheeled robot as described above.

[0040] The present application calculates a lateral tracking error and a heading angle tracking error according to an actual lateral coordinate and an actual heading angle of a wheeled robot, updates a Q-value table based on the lateral tracking error, the heading angle tracking error, and PID control parameters, wherein the PID control parameters include a proportional parameter, an integral parameter, and a differential parameter, obtains a control input instruction based on the Q-value table, and transmits the control input instruction to the wheeled robot to enable the wheeled robot to update the lateral coordinate and the heading angle according to the control input instruction, discretizes a parameter space corresponding to the PID control parameters when the updated lateral coordinate and the updated heading angle satisfy a preset condition, and determines optimal PID control parameters. Compared with the prior art in which an engineer's experience is used to determine the PID control parameters of a wheeled robot, the present application updates the state (i.e., the lateral coordinate and the heading angle) of a wheeled robot based on the lateral tracking error, the heading angle tracking error, and randomly selected PID control parameters calculated in real time on the basis of ensuring stable operation of the wheeled robot, and determines the optimal PID control parameters of the wheeled robot according to the updated state of the wheeled robot, thereby avoiding the situation in the prior art that an optimal or appropriate PID parameter cannot be accurately obtained due to uncontrollable factors such as insufficient experience and erroneous operation of a worker, and thus enabling accurate PID parameter tuning of the wheeled robot. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1The structural schematic diagram of the PID parameter adjusting device of the wheeled robot related to the hardware running environment of the embodiment scheme of the present application;

[0042] Figure 2 The flow schematic diagram of the first embodiment of the PID parameter adjusting method of the wheeled robot of the present application;

[0043] Figure 3 The flow schematic diagram of the second embodiment of the PID parameter adjusting method of the wheeled robot of the present application;

[0044] Figure 4 The flow schematic diagram of the third embodiment of the PID parameter adjusting method of the wheeled robot of the present application;

[0045] Figure 5 The schematic diagram of the PID parameter space discretization in the PID parameter adjusting method of the wheeled robot of the present application;

[0046] Figure 6 The structural block diagram of the first embodiment of the PID parameter adjusting device of the wheeled robot of the present application.

[0047] The implementation, functional features and advantages of the present application will be further explained with reference to the accompanying drawings in combination with the embodiments. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

[0049] Reference Figure 1 , Figure 1 The structural schematic diagram of the PID parameter adjusting device of the wheeled robot related to the hardware running environment of the embodiment scheme of the present application.

[0050] As Figure 1As shown in the figure, the PID parameter setting device of the wheeled robot can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display screen, an input unit such as a keyboard, and can also include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art can understand that Figure 1 The structure shown in the figure does not constitute a limitation on the PID parameter setting device of the wheeled robot, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.

[0052] As Figure 1 As shown in the figure, the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and a PID parameter setting program of the wheeled robot.

[0053] In Figure 1 In the PID parameter setting device of the wheeled robot shown in the figure, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the PID parameter setting device of the wheeled robot can be arranged in the PID parameter setting device of the wheeled robot, and the PID parameter setting device of the wheeled robot calls the PID parameter setting program of the wheeled robot stored in the memory 1005 through the processor 1001, and executes the PID parameter setting method of the wheeled robot provided in the embodiment of the application.

[0054] The embodiment of the application provides a PID parameter setting method of a wheeled robot, which refers to Figure 2 , Figure 2 The flowchart of the first embodiment of the PID parameter setting method of the wheeled robot of the application.

[0055] In this embodiment, the PID parameter setting method of the wheeled robot includes the following steps:

[0056] Step S10: Calculate the lateral tracking error and the heading angle tracking error according to the actual lateral coordinate and the actual heading angle of the wheeled robot respectively.

[0057] It should be noted that the execution subject of the method of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a mobile phone, a tablet computer, a personal computer, etc., and can also be other electronic devices capable of achieving the same or similar functions, which are not limited by the embodiment. Here, the PID parameter tuning device of the wheeled robot (hereinafter referred to as the tuning device) will be taken as an example to describe each embodiment of the PID parameter tuning method of the wheeled robot.

[0058] It can be understood that the wheeled robot described above can be a robot that realizes the motion trajectory by controlling the deflection angle, the advancing direction and other parameters of the tire.

[0059] It should be understood that the actual lateral coordinate and the actual heading angle are the current lateral coordinate and the current heading angle of the wheeled robot in a certain specified coordinate system at any moment under actual motion conditions.

[0060] In a specific implementation, the actual lateral coordinate and the actual heading angle can be used to simulate the actual motion trajectory of the wheeled robot. Then the actual motion trajectory and the preset motion trajectory are vectorized to obtain the actual motion trajectory vector and the preset motion trajectory vector. Finally, the similarity of the actual motion trajectory vector and the preset motion trajectory vector is compared, and the lateral tracking error and the heading angle tracking error are calculated based on the result of the similarity comparison.

[0061] Step S20: Update the Q value table based on the lateral tracking error, the heading angle tracking error and the PID control parameters, which include the proportional parameter, the integral parameter and the differential parameter.

[0062] It should be noted that the PID control parameters are a set of parameters used by the PID controller in the parameter adjustment device to control the wheeled robot, and the PID controller includes a proportional unit P (corresponding to the above-mentioned proportional parameter), an integral unit I (corresponding to the above-mentioned integral parameter), and a differential unit D (corresponding to the above-mentioned differential parameter). In actual operation, the PID controller can compare the information collected in the controlled object (such as the wheeled robot) with the given value, and based on the proportion, integral, and differential of the error generated by the comparison to achieve control of the controlled object. Among them, the role of the proportional parameter is to speed up the response speed of the system and improve the regulation accuracy of the system. The larger the proportional parameter, the faster the response speed of the system, and the higher the regulation accuracy of the system, but it is easy to produce overshoot, and even it can lead to system instability; if the proportional parameter is too small, the regulation accuracy will be reduced, the response speed will be slow, and the regulation time will be prolonged, so that the static and dynamic characteristics of the system will be bad. The role of the integral parameter is to eliminate the steady-state error of the system. The larger the integral parameter, the faster the elimination of the static error of the system, but if it is too large, it will produce integral saturation phenomenon in the initial stage of the response process, thereby causing large overshoot in the response process; if the integral parameter is too small, it will be difficult to eliminate the static error of the system, which will affect the regulation accuracy of the system. The role of the differential parameter is to improve the dynamic characteristics of the system, and its main role is to suppress the change of the deviation in any direction and to predict the deviation change in advance during the response process. However, if the differential parameter is too large, it will cause the response process to brake in advance, thereby prolonging the regulation time and reducing the anti-interference performance of the system.

[0063] It should be understood that the above Q value table is composed of states, actions, and Q values, and each set of state-action pairs corresponds to a corresponding Q value.

[0064] Step S30: obtaining a control input instruction based on the Q value table, and transmitting the control input instruction to the wheeled robot to make the wheeled robot update the lateral coordinate and the heading angle according to the control input instruction.

[0065] It should be noted that the above-mentioned control input instruction is a computer instruction capable of controlling the above-mentioned wheeled robot. When the wheeled robot receives the control input instruction sent by the parameter adjustment device, it can update the lateral coordinate and the heading angle according to the PID control parameters contained in the control input instruction.

[0066] In specific implementation, the parameter adjustment device can select the required Q value from the above-mentioned Q value table by setting a preset threshold, and generate a control input instruction based on the PID control parameters corresponding to the required Q value and issue it to the above-mentioned wheeled robot, thereby completing the control of the wheeled robot.

[0067] Step S40: when the updated lateral coordinate and the heading angle meet the preset condition, discretize the parameter space corresponding to the PID control parameter to determine the optimal PID control parameter.

[0068] It should be noted that the optimal PID control parameter is the control parameter that can control the wheeled robot to work according to the optimal or most expected working trajectory.

[0069] In a specific implementation, when the updated lateral coordinate and the heading angle meet the preset condition, it indicates that the corresponding PID control parameter has approached the optimal PID control parameter, and therefore the optimal PID control parameter can be determined by discretizing the parameter space corresponding to the PID control parameter at this time and gradually approaching the optimal PID control parameter by continuously discretizing the action interval and the state interval.

[0070] Further, in the present embodiment, in order to accurately obtain the actual lateral coordinate and the actual heading angle of the wheeled robot, before the step S10, the method can further include:

[0071] Step S01: establishing a space rectangular coordinate system with the center of the wheeled robot as the coordinate origin.

[0072] It should be noted that the center of the wheeled robot is only a default reference point that does not change, which can be the center of gravity of the wheeled robot or the geometric center of the wheeled robot, and the present embodiment does not limit it.

[0073] It should be understood that the space rectangular coordinate system is to select a coordinate origin O in space, and make three mutually perpendicular number axes Ox, Oy, and Oz through the point O, which all have O as the origin and the same length unit. The three axes are called x-axis (horizontal axis), y-axis (vertical axis), and z-axis (vertical axis), collectively referred to as coordinate axes, and the space rectangular coordinate system is composed of the three coordinate axes.

[0074] Step S02: acquiring the actual lateral coordinate and the actual heading angle of the wheeled robot in the space rectangular coordinate system through the radar and the inertial measurement unit respectively.

[0075] It should be understood that the radar and the inertial measurement unit are installed on the wheeled robot and are in working state throughout the whole period from the start of parameter adjustment to the end of parameter adjustment, thereby ensuring the accuracy of the actual lateral coordinate and the actual heading angle.

[0076] In a specific implementation, the starting point of the radar and the inertial measurement unit can be set as the initial point, and when the state of the wheeled robot is updated, the actual lateral coordinate and the actual heading angle of the wheeled robot in the space rectangular coordinate system are acquired with the initial point as the reference point.

[0077] The embodiment calculates a lateral tracking error and a heading angle tracking error according to an actual lateral coordinate and an actual heading angle of the wheeled robot respectively; updates a Q value table based on the lateral tracking error, the heading angle tracking error and PID control parameters, the PID control parameters including a proportional parameter, an integral parameter and a differential parameter; obtains a control input instruction based on the Q value table and transmits the control input instruction to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction; and discretizes a parameter space corresponding to the PID control parameters when the updated lateral coordinate and heading angle meet a preset condition, to determine optimal PID control parameters. Compared with the prior art of determining the PID control parameters of the wheeled robot through the experience of control engineers, the above method of the embodiment updates the state (i.e. the lateral coordinate and the heading angle) of the wheeled robot based on the lateral tracking error, the heading angle tracking error calculated in real time and the randomly selected PID control parameters on the basis of ensuring stable operation of the wheeled robot, and determines the optimal PID control parameters of the wheeled robot according to the updated state of the wheeled robot, thereby avoiding the uncontrollable factors such as insufficient experience, wrong operation of workers in the prior art, and thus accurately performing PID parameter tuning on the wheeled robot.

[0078] Reference Figure 3 , Figure 3 The flowchart of the second embodiment of the PID parameter tuning method for the wheeled robot is shown.

[0079] Based on the above first embodiment, in the embodiment, in order to accurately obtain the lateral tracking error and the heading angle tracking error of the wheeled robot, the step S10 can include:

[0080] Step S101: setting a difference value between a preset lateral coordinate and an actual lateral coordinate as a lateral tracking error.

[0081] In a specific implementation, assuming that is a preset lateral coordinate of the wheeled robot at time t, is an actual lateral coordinate of the wheeled robot at time t, the above lateral tracking error = - .

[0082] Step S102: setting a difference value between a preset heading angle and an actual heading angle as a heading angle tracking error.

[0083] In a specific implementation, assuming that is a preset heading angle of the wheeled robot at time t, is an actual heading angle of the wheeled robot at time t, the above heading angle tracking error = - .

[0084] Furthermore, in this embodiment, in order to accurately update the Q-value table and thus select different PID control parameters to compare their advantages and disadvantages, step S20 may include:

[0085] Step S201: Select PID control parameters according to preset probabilities.

[0086] In practical implementation, the probability of randomly selecting PID control parameters can be expressed by the following expression:

[0087] ;

[0088] in, , These represent the minimum probability and probability gain of randomly selecting PID control parameters, respectively. When At time 1, the probability of random selection reaches its maximum. The probability that a wheeled robot will select the PID control parameter corresponding to the maximum Q value based on the Q-value table is... As time goes by The increase of , the probability of random selection It will gradually decrease to the lowest level. The probability of selecting PID control parameters based on the Q-value table gradually increases to its highest value. .

[0089] Step S202: Input the lateral tracking error and the heading angle tracking error into the reward / penalty function to obtain the reward value.

[0090] It should be noted that the above reward and penalty functions are used to evaluate the current state of lateral tracking error and heading angle tracking error. The smaller the lateral tracking error and heading angle tracking error, the larger the reward value; conversely, the larger the error, the smaller the reward value.

[0091] In the specific implementation, in order to describe the merits of the lateral tracking error state and the heading angle tracking error state, this embodiment designs the reward and penalty function in the following three-dimensional form:

[0092] ;

[0093] From the above formula, we can see that It is a monotonically decreasing quadratic function in two variables. It only has lateral tracking error. and heading angle tracking error When all values ​​are 0, the reward value reaches its maximum value of 1.

[0094] Step S203: Update the Q value table based on the reward value and the PID control parameters.

[0095] In practical implementation, the aforementioned lateral tracking error and heading angle tracking error can be used as input states for the Q-value table. The above PID control parameters are used as the output action of the Q-value table. Then the Q-value table can be updated according to the following rules:

[0096] ;

[0097] in, Represents the discrete order. The larger the value, the higher the accuracy of the state and PID control parameters. It is the learning rate factor. It is the discount rate factor. This represents the tracking error at time t. The calculated reward and punishment values, express At the moment Under sub-discretization, the state With action The Q-value corresponds to the value in the Q-value table. Different precision Q-value tables are stored for different discrete orders, avoiding the drawback of a single Q-value table being too large and improving storage and retrieval speed.

[0098] Based on the first embodiment described above, in this embodiment, in order to accurately generate control input commands to update the lateral coordinates and heading angle of the wheeled robot, step S30 may include:

[0099] Step S301: Extract the PID control parameters corresponding to the maximum Q value in the Q value table.

[0100] It should be noted that, since the PID control parameters are obtained randomly before step S301, the Q-value table stores the Q-values ​​corresponding to several different PID control parameters. This allows for comparison to determine the merits of different PID parameters. A larger Q-value corresponds to a larger reward value. Furthermore, as shown in the previous steps, smaller lateral tracking errors and heading angle tracking errors result in larger reward values. Smaller lateral tracking errors and heading angle tracking errors indicate that the wheeled robot's trajectory more closely matches the expected trajectory. This strategy of selecting the largest Q-value from the stored Q-values ​​is called a greedy strategy.

[0101] Step S302: Obtain control input commands based on the parameters corresponding to the maximum Q value.

[0102] In practical implementation, the control input commands for controlling the wheeled robot can be obtained through the PID control parameters (i.e., proportional parameters, integral parameters, and derivative parameters), lateral tracking error, heading angle tracking error, and other parameters included in the parameters corresponding to the maximum Q value.

[0103] Step S303: Transmit the control input command to the wheeled robot so that the wheeled robot updates its lateral coordinates and heading angle according to the control input command.

[0104] In practice, when the wheeled robot receives the aforementioned control input commands, it parses the commands and updates the robot's lateral coordinates and heading angle based on the parsing results.

[0105] This embodiment defines the lateral tracking error as the difference between the preset lateral coordinates and the actual lateral coordinates; the lateral tracking error as the difference between the preset heading angle and the actual heading angle; PID control parameters are selected according to preset probabilities; the lateral tracking error and heading angle tracking error are input into a reward / penalty function to obtain a reward value; the Q-value table is updated based on the reward value and the PID control parameters; the PID control parameter corresponding to the maximum Q-value in the Q-value table is extracted; a control input command is obtained based on the parameter corresponding to the maximum Q-value; and the control input command is transmitted to the wheeled robot so that the wheeled robot updates its lateral coordinates and heading angle according to the control input command. Compared to the prior art that uses manually set PID control parameters to control the wheeled robot, the method described in this embodiment updates the Q-value table by establishing a three-dimensional reward / penalty function, thereby determining the PID control parameters by the maximum Q-value corresponding to the minimum lateral tracking error and heading angle tracking error, and thus completing the control of the wheeled robot.

[0106] refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the PID parameter tuning method for a wheeled robot according to the present invention.

[0107] Based on the above embodiments, in this embodiment, in order to obtain the optimal PID control parameters more accurately, step S40 may include:

[0108] Step S401: Calculate the updated lateral tracking error and the updated heading angle tracking error based on the updated lateral coordinates and the updated heading angle, respectively.

[0109] In the specific implementation, it is assumed that Let t' be the preset lateral coordinates of the wheeled robot after the update. Let be the actual lateral coordinates of the wheeled robot after the update at time t'. Then, the updated lateral tracking error is... = - Assume is the preset heading angle of the wheeled robot after updating at t' moment, is the actual heading angle of the wheeled robot after updating at t' moment, then the above updated heading angle tracking error

[0110] Step S402: If the updated lateral tracking error and the updated heading angle tracking error both satisfy a preset condition, discretize the parameter space corresponding to the PID control parameter, and determine the optimal PID control parameter.

[0111] It should be noted that the preset condition can be that the lateral tracking error and the updated heading angle tracking error of the wheeled robot are both 0, or that the lateral tracking error and the updated heading angle tracking error of the wheeled robot respectively fluctuate within a certain preset range, and the embodiment is not limited in this regard.

[0112] Referring to Figure 5 , Figure 5 is a PID parameter space discretization schematic diagram in the PID parameter tuning method of the wheeled robot.

[0113] In a specific implementation, if the updated lateral tracking error and the updated heading angle tracking error both satisfy a preset condition, the parameter space corresponding to the PID control parameter can be given according to the current state of the wheeled robot. That is, the upper and lower limits of the PID proportional gain are set as , , the upper and lower limits of the integral gain are set as , , and the upper and lower limits of the differential gain are set as , . The PID control parameter discretization factor is set to at the first time of discretization, where , , . The specific discretization process is shown in Figure 5 . First, the PID parameter space is initialized into four subspaces according to the parameter discretization factor . After the first learning is completed, the three parameters of the PID will be stabilized in a certain subspace, at this time, the number of control parameter discretization is increased, and then the subspace is divided into two subspaces according to . The learning in the subspace is continued in a loop, and so on, until the PID control parameter accuracy requirement is met, so as to determine the optimal PID control parameter.

[0114] ​​​Based on the above embodiments, in the present embodiment, in order to continue to adjust the state and action of the current wheeled robot when the updated lateral coordinate and heading angle do not meet the preset condition, so as to obtain the optimal PID control parameter, before the step S40, it can also include:

[0115] Step S31: when the updated lateral coordinate and heading angle do not meet the preset condition, repeat the following steps until the lateral coordinate and heading angle meet the preset condition:

[0116] According to the current lateral coordinate and the current heading angle of the wheeled robot, the current lateral tracking error and the current heading angle tracking error are calculated respectively; based on the current lateral tracking error, the current heading angle tracking error and the PID control parameter, the Q value table is updated; based on the Q value table, the control input instruction is obtained, and the control input instruction is transmitted to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction.

[0117] In a specific implementation, if the updated lateral coordinate and the heading angle do not meet the preset condition, it means that the current Q value corresponding to the PID control parameter is not the optimal PID control parameter. Therefore, it is necessary to continue to adjust the state and action of the wheeled robot until the lateral coordinate and the heading angle meet the preset condition.

[0118] In the present embodiment, according to the updated lateral coordinate and the updated heading angle, the updated lateral tracking error and the updated heading angle tracking error are calculated respectively; if the updated lateral tracking error and the updated heading angle tracking error both meet the preset condition, the parameter space corresponding to the PID control parameter is discretized to determine the optimal PID control parameter; when the updated lateral coordinate and the heading angle do not meet the preset condition, repeat the following steps until the lateral coordinate and the heading angle meet the preset condition: according to the current lateral coordinate and the current heading angle of the wheeled robot, the current lateral tracking error and the current heading angle tracking error are calculated respectively; based on the current lateral tracking error, the current heading angle tracking error and the PID control parameter, the Q value table is updated; based on the Q value table, the control input instruction is obtained, and the control input instruction is transmitted to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction. Compared with the prior art which determines whether the current PID control parameter is the optimal PID control parameter by manual estimation, the above method of the present embodiment determines whether the current PID control parameter is the optimal PID control parameter by judging whether the updated lateral tracking error and the updated heading angle tracking error both meet the preset condition, thereby improving the accuracy of the optimal PID control parameter.

[0119] Furthermore, the embodiment of the present application also provides a storage medium, wherein the storage medium stores a PID parameter setting program of the wheeled robot, and the PID parameter setting program of the wheeled robot is executed by a processor to realize the steps of the PID parameter setting method of the wheeled robot.

[0120] With reference to Figure 6 , Figure 6 FIG. 1 is a structural block diagram of a PID parameter setting device of a wheeled robot according to a first embodiment of the present application.

[0121] As shown in Figure 6 , the PID parameter setting device of the wheeled robot comprises:

[0122] a first calculation module 601, configured to calculate a lateral tracking error and a heading angle tracking error according to an actual lateral coordinate and an actual heading angle of the wheeled robot respectively;

[0123] a second calculation module 602, configured to update a Q value table based on the lateral tracking error, the heading angle tracking error and PID control parameters, wherein the PID control parameters comprise a proportional parameter, an integral parameter and a differential parameter;

[0124] an instruction generation module 603, configured to obtain a control input instruction based on the Q value table, and transmit the control input instruction to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction;

[0125] a parameter determination module 604, configured to discretize a parameter space corresponding to the PID control parameters when the updated lateral coordinate and the heading angle satisfy a preset condition, and determine optimal PID control parameters.

[0126] The embodiment calculates a lateral tracking error and a heading angle tracking error according to an actual lateral coordinate and an actual heading angle of the wheeled robot respectively; updates a Q value table based on the lateral tracking error, the heading angle tracking error and PID control parameters, the PID control parameters including a proportional parameter, an integral parameter and a differential parameter; obtains a control input instruction based on the Q value table and transmits the control input instruction to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction; and when the updated lateral coordinate and the heading angle meet a preset condition, discretizes a parameter space corresponding to the PID control parameters, and determines optimal PID control parameters. Compared with the prior art which determines the PID control parameters of the wheeled robot through the experience of control engineers, since the above method of the embodiment updates the state (i.e. the lateral coordinate and the heading angle) of the wheeled robot based on the lateral tracking error, the heading angle tracking error and the randomly selected PID control parameters calculated in real time on the basis of ensuring stable operation of the wheeled robot, and determines the optimal PID control parameters of the wheeled robot according to the updated state of the wheeled robot, the above method of the embodiment avoids the situation that the optimal or appropriate PID parameters cannot be accurately obtained due to uncontrollable factors such as insufficient experience and erroneous operation of workers in the prior art, and thus can accurately perform PID parameter tuning on the wheeled robot.

[0127] Other embodiments or specific implementations of the PID parameter tuning device of the wheeled robot of the present application can refer to the above method embodiments, which will not be described here again.

[0128] It should be noted that in this document, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or system. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or system including the element.

[0129] The above embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0130] Those skilled in the art can clearly understand the above-mentioned example method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but in many cases the former is a better implementation. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software products, the computer software product is stored in a storage medium (such as read-only memory / random access memory, disk, optical disk), including a number of instructions to make a terminal device (may be a mobile phone, computer, server, or network equipment, etc.) executes the method described in various embodiments of the present application.

[0131] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, any equivalent structure or equivalent flow transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A PID parameter tuning method for a wheeled robot, characterized in that, The method comprises the following steps: calculating a lateral tracking error and a heading angle tracking error according to an actual lateral coordinate and an actual heading angle of the wheeled robot respectively; randomly selecting a PID control parameter according to a preset probability; the PID control parameter comprises a proportional parameter, an integral parameter and a differential parameter; wherein the probability of randomly selecting the PID control parameter is determined by the following expression: ; wherein, , respectively represent the minimum probability and the probability gain of randomly selecting the PID control parameter. inputting the lateral tracking error and the heading angle tracking error into a reward-punishment function to obtain a reward value; the reward-punishment function is designed in the following three-dimensional form: ; wherein, represents the tracking error at time t the calculated reward-penalty value; updating a Q value table based on the reward value and the PID control parameter; obtaining a control input instruction based on the Q value table and transmitting the control input instruction to the wheeled robot so that the wheeled robot updates a lateral coordinate and a heading angle according to the control input instruction; when the updated lateral coordinate and the updated heading angle meet a preset condition, discretizing a parameter space corresponding to the PID control parameter to determine an optimal PID control parameter.

2. The PID parameter tuning method of the wheeled robot according to claim 1, characterized in that, The updating of the Q value table based on the reward value and the PID control parameter comprises: inputting the lateral tracking error and the heading angle tracking error as input states of a Q-value table outputting the PID control parameters as output actions of the Q-value table the Q-value table is updated according to the following rule: ; wherein, represents a discrete number, is a learning rate factor, is a discount rate factor; a Q value table of different precisions is stored respectively for different discrete numbers.

3. The PID parameter tuning method of the wheeled robot according to claim 1, wherein, Before the calculation of the lateral tracking error and the heading angle tracking error according to the actual lateral coordinate and the actual heading angle of the wheeled robot, the method further comprises: establishing a space rectangular coordinate system with the center of the wheeled robot as the coordinate origin; obtaining the actual lateral coordinate and the actual heading angle of the wheeled robot in the space rectangular coordinate system through a radar and an inertial measurement unit respectively.

4. The PID parameter tuning method of the wheeled robot according to claim 1, wherein, The calculation of the lateral tracking error and the heading angle tracking error according to the actual lateral coordinate and the actual heading angle of the wheeled robot comprises: setting the difference between a preset lateral coordinate and the actual lateral coordinate as the lateral tracking error; setting the difference between a preset heading angle and the actual heading angle as the heading angle tracking error.

5. The PID parameter tuning method of the wheeled robot according to claim 1, wherein, The obtaining of the control input instruction based on the Q value table and the transmission of the control input instruction to the wheeled robot so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction comprises: extracting the PID control parameter corresponding to the maximum Q value in the Q value table; obtaining the control input instruction based on the parameter corresponding to the maximum Q value; transmitting the control input instruction to the wheeled robot so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction.

6. The PID parameter tuning method of the wheeled robot according to claim 1, wherein, The discretization of the parameter space corresponding to the PID control parameter to determine the optimal PID control parameter when the updated lateral coordinate and the updated heading angle meet the preset condition comprises: calculating an updated lateral tracking error and an updated heading angle tracking error according to the updated lateral coordinate and the updated heading angle respectively; if the updated lateral tracking error and the updated heading angle tracking error both meet the preset condition, discretizing the parameter space corresponding to the PID control parameter to determine the optimal PID control parameter.

7. The PID parameter tuning method of the wheeled robot according to claim 1, wherein, Before the discretization of the parameter space corresponding to the PID control parameter to determine the optimal PID control parameter when the updated lateral coordinate and the updated heading angle meet the preset condition, the method further comprises: When the updated lateral coordinate and the updated heading angle do not satisfy the preset condition, repeating the following steps until the lateral coordinate and the heading angle satisfy the preset condition: calculating a current lateral tracking error and a current heading angle tracking error according to a current lateral coordinate and a current heading angle of the wheeled robot respectively; updating a Q value table based on the current lateral tracking error, the current heading angle tracking error and PID control parameters; obtaining a control input instruction based on the Q value table, and transmitting the control input instruction to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction.

8. A PID parameter tuning device for a wheeled robot, characterized in that, The PID parameter tuning device of the wheeled robot comprises: a first calculation module configured to calculate a lateral tracking error and a heading angle tracking error according to an actual lateral coordinate and an actual heading angle of the wheeled robot respectively; a second calculation module configured to randomly select PID control parameters according to a preset probability; the PID control parameters comprise a proportional parameter, an integral parameter and a differential parameter; wherein the probability of randomly selecting the PID control parameters is determined by the following expression: ; wherein, , respectively represent the minimum probability and the probability gain of randomly selecting the PID control parameter; and inputting the lateral tracking error and the heading angle tracking error into a reward-punishment function to obtain a reward value; the reward-punishment function is designed in the following three-dimensional form: ; wherein, represents the tracking error at time t a reward value calculated; updating a Q-value table based on the reward value and the PID control parameters; an instruction generation module configured to obtain a control input instruction based on the Q value table, and transmit the control input instruction to the wheeled robot, so that the wheeled robot updates the lateral coordinate and the heading angle according to the control input instruction; a parameter determination module configured to discretize a parameter space corresponding to the PID control parameters when the updated lateral coordinate and the updated heading angle satisfy the preset condition, and determine optimal PID control parameters.

9. A PID tuning device for a wheeled robot, comprising: The device comprises a memory, a processor and a PID parameter tuning program of a wheeled robot stored on the memory and executable on the processor, and the PID parameter tuning program of the wheeled robot is configured to implement the steps of the PID parameter tuning method of the wheeled robot according to any one of claims 1 to 7.

10. A storage medium, characterized by The storage medium stores a PID parameter tuning program of a wheeled robot, and the PID parameter tuning program of the wheeled robot is executed by the processor to implement the steps of the PID parameter tuning method of the wheeled robot according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Ship PID control parameter setting method and system based on Q-learning, and storage medium

    CN112947054A

  • Vehicle path tracking control method, controller and control system

    CN114237033A

  • Intelligent control method and system, and intelligent monitoring system

    US20190064753A1

  • PID controller autotuner using machine learning approaches

    US20210341895A1