algorithms Article
Optimization Design by Genetic Algorithm Controller for Trajectory Control of a 3-RRR Parallel Robot Lianchao Sheng and Wei Li * School of Mechatronic Engineering, China University of Mining and Technology, Xuzhou 221116, China;
[email protected] * Correspondence:
[email protected]; Tel.: +86-152-5203-3709 Received: 21 November 2017; Accepted: 12 January 2018; Published: 15 January 2018
Abstract: In order to improve the control precision and robustness of the existing proportion integration differentiation (PID) controller of a 3-Revolute–Revolute–Revolute (3-RRR) parallel robot, a variable PID parameter controller optimized by a genetic algorithm controller is proposed in this paper. Firstly, the inverse kinematics model of the 3-RRR parallel robot was established according to the vector method, and the motor conversion matrix was deduced. Then, the error square integral was chosen as the fitness function, and the genetic algorithm controller was designed. Finally, the control precision of the new controller was verified through the simulation model of the 3-RRR planar parallel robot—built in SimMechanics—and the robustness of the new controller was verified by adding interference. The results show that compared with the traditional PID controller, the new controller designed in this paper has better control precision and robustness, which provides the basis for practical application. Keywords: kinematics model; virtual bench; genetic algorithm controller; robustness
1. Introduction Parallel industrial robots are essentially closed kinematic chain mechanisms, in which the end-effector is clamped onto the base through several independent kinematic chains [1]. Parallel industrial robots exhibit the following obvious advantages over the serial series: no cumulative error, little movement inertia, high structural stiffness, high load capacity, and so on. They are suitable for fast and accurate operations, and have been widely applied in industrial fields such as integrated circuit manufacturing and testing, fiber docking, and flight simulators [2,3]. For instance, Lee and Yien [4] set up a three degrees of freedom (3-DOF) parallel industrial robot in order to operate and carry large-scale workpieces. Another 3-DOF micro-sized planar parallel industrial robot was developed for low-torque precision positioning tasks [5]. Combined with the advantages of parallel robots and their wide applications in all aspects of social life, the research on parallel industrial robots is of great significance. A typical 3-DOF planar 3-Revolute–Revolute–Revolute (3-RRR) parallel industrial robot— consisting of a moving platform which is connected to three identical branches and a static platform—has the advantages of a simple structure, good symmetry and accurate positioning. Therefore, many scholars have conducted detailed research on it. Gutierrez [6] performed an exhaustive singularity analysis of a 3-RRR planar parallel robot. From a kinematic point of view, the optimum characteristics of the 3-DOF planar parallel industrial robot were studied by Gosselin and Angeles [7]. Serdar Kucuk [8] presented an optimization problem for the 3-degrees-of-freedom RRR fully planar parallel manipulator (3-RRR) based on the actuator power consumption. The effects of clearance on the dynamics of a planar 3-RRR parallel manipulator are investigated in [9]. Based on forward Algorithms 2018, 11, 7; doi:10.3390/a11010007
www.mdpi.com/journal/algorithms
Algorithms 2018, 11, 7
2 of 13
kinematics theory, Flavio and Ron [10] studied the singularity problem, focusing completely on the planar parallel robot. Sébastien and Ilian [11] studied the accuracy problems on several kinds of typical 3-DOF planar parallel industrial robots. Gao [12] designed a planar 3-RRR parallel industrial robot by analyzing kinematics, singularity, dynamics, and controlling problems. Zhang et al. [13] presented the first-order approximation coupling model of planar 3-RRR flexible parallel robots and considered the rigid body motion constraints, elastic deformation motion constraints, and dynamic constraints of the moving platform in the coupling model. Yu [14] presented experimental research on the dynamics of flexible 3-RRR parallel robots and compared the results between the theoretical and experimental analysis. It can be seen from the above literature that the current research on the 3-RRR parallel robot mainly focuses on the dynamics model, work space analysis, singular point analysis, and structural optimization. Good control precision also plays a crucial role in the practical application of a robot. At present, the research on robot control algorithms mainly focuses on fuzzy control algorithms [15], adaptive robust control algorithms [16], and genetic control algorithms [17]. Stanet et al. [18] proposed a fuzzy controller for a 3-DOF parallel industrial robot in medical applications, and achieved more precise results with the fuzzy-based controller than with the classic PID controller. Noshadi et al. [19,20] introduced a method by which an active force can be used to control the platform. They also designed a two-level fuzzy tuning resolved acceleration control for the platforms. In doing so, they suggested that when there is disturbance, the manipulator can still perform trajectory tracking tasks with a stable response. Pham et al. [21] proposed a robust adaptive control method based on radial basis function neural network (RBFNN), and studied the trajectory tracking control of a two-link robot cleaning detection mechanism. In research by Ku et al. [22] the model predictive control was performed to fulfill the positioning control of a 3-RRR planar parallel manipulator. Song et al. [23] proposed a new path planning method for a robot based on a genetic algorithm and the Bezier curve. Wang et al. [24] presented a double global optimum genetic algorithm–particle swarm optimization for path planning of a welding robot. Lu et al. [25,26] proposed a new method for the optimal design and tuning of a Proportional–Integral–Derivative-type interval type-2 fuzzy logic controller for Delta parallel robot trajectory tracking control. The main aims of the above literature are to improve the robot control accuracy. However, a good control program needs to not only improve the control accuracy but also have the characteristics of simplicity, applicability, robustness, and stability. It is well known that the classic PID controllers have the advantage of simplicity, and the genetic random search algorithm has a fast search ability. A variable PID parameter controller optimized by a genetic algorithm has been designed in this paper, differing from previous research by combining both advantages. The inverse kinematics model of the 3-RRR parallel robot was established according to the vector method, and the motor conversion matrix was deduced. The control precision of the new controller was verified through the simulation model of the 3-RRR planar parallel robot—built in SimMechanics—and the robustness of the new controller was verified by adding interference. The results show that compared with the traditional PID controller, the new controller designed in this paper not only has better control precision, stability, and higher robustness but also has the characteristics of simplicity and applicability, which provides the basis for practical application. The other parts of this paper are arranged as follows: Section 2 introduces the model of the planar parallel industrial robot; Section 3 presents the virtual bench setup and genetic algorithm controller; Section 4 discusses the simulation results; finally, Section 5 is the conclusion. 2. The Model of the Planar 3-RRR Parallel Robot It is essential to establish the kinematics model for researching the planar parallel industrial robot control strategies. In this section, the inverse kinematics model of the 3-RRR parallel robot is established according to the vector method, and the motor conversion matrix is deduced, which is the foundation for the subsequent control.
Algorithms 2018, 11, 7
3 of 13
Algorithms 2018, 11, 7 Algorithms 2018, 11, 7
3 of 13 3 of 13
2.1. The Structure Structure of of the 2.1. The the 3-RRR 3-RRR Planar Planar Parallel Parallel Robot Robot 2.1. The Structure of the 3-RRR Planar Parallel Robot The map of The three-dimensional three-dimensional map of the the 3-RRR 3-RRR parallel parallel robot robot is is shown shown in in Figure Figure 1. 1. The The schematic schematic The three-dimensional map of the 3-RRR parallel robot is shown in Figure 1. The schematic diagram of the 3-RRR planar parallel robot is shown in Figure 2. The outline of the 3-RRR diagram of the 3-RRR planar parallel robot is shown in Figure 2. The outline of the 3-RRR planar planar diagram of the 3-RRR planar parallel robot is shown in Figure 2. The outline of the 3-RRR planar parallel the fixed fixed base parallel robot robot is is composed composed of of the the regular regular triangle triangle of of the the moving moving platform platform CC11CC22C C33;; the base parallel robot is composed of the regular triangle of the moving platform C1C2C3; the fixed base A A A ; and three identical branches A B C , A B C , A B C . As Figure 2 shows, the three vertices 1 2 3 1 1 1 2 2 2 3 3 3 A1A2A3; and three identical branches A1B1C1, A2B2C2, A3B3C3. As Figure 2 shows, the three vertices of A1A2A3; and three identical branches A1B1C1, A2B2C2, A3B3C3. As Figure 2 shows, the three vertices of of regular triangle active revolute joints points of1, BC11,, C B22,, 1 ,2,AA 23,,A 3 , where thethe regular triangle areare A1,AA where thethe active revolute joints areare set.set. TheThe points of B B12,, C the regular triangle are A1, A2, A3, where the active revolute joints are set. The points of B1, C1, B2, C2, C B33 ,are C3 the are the passive revolute joints, where =1C l11, B 2 BA 2 3= 2C 2 3== Bl23.CThe 3 = lradius 2 . The B32,, C passive revolute joints, where A1BA11=B1A= 2BA 2 = B3A=3 B l13, B = 1BC21C= 2 =BB 3C B3, C3 are the passive revolute joints, where A1B1 = A2B2 = A3B3 = l1, B1C1 = B2C2 = B3C3 = l2. The radius radius of the circle of the motor in the working platform is R. The radius of the circle of the joints in of the circle of the motor in the working platform is R. The radius of the circle of the joints in the of the circle of the motor in the working platform is R. The radius of the circle of the joints in the the moving platform is r. The 3-DOF planar motion can be achieved using the three driving motors moving platform is r. The 3-DOF planar motion can be achieved using the three driving motors in in moving platform is r. The 3-DOF planar motion can be achieved using the three driving motors in the the three three active active joints. joints. the three active joints.
Figure 1. Three-dimensional map of the 3-Revolute–Revolute–Revolute (3-RRR) parallel parallel robot. robot. Figure1. 1.Three-dimensional Three-dimensionalmap mapof ofthe the3-Revolute–Revolute–Revolute 3-Revolute–Revolute–Revolute (3-RRR) (3-RRR) Figure parallel robot.
Figure 2. Diagram of the 3-RRR parallel robot. Figure2. 2. Diagram Diagramof ofthe the3-RRR 3-RRRparallel parallelrobot. robot. Figure
2.2. The Kinematic Model of the 3-RRR Planar Parallel Robot 2.2. The Kinematic Model of the 3-RRR Planar Parallel Robot According to the geometric relationships shown in Figure 2, the coordinates of the motor in the According to the geometric relationships shown in Figure 2, the coordinates of the motor in the static coordinate system are shown as follows, static coordinate system are shown as follows,
Algorithms 2018, 11, 7
4 of 13
2.2. The Kinematic Model of the 3-RRR Planar Parallel Robot According to the geometric relationships shown in Figure 2, the coordinates of the motor in the static coordinate system are shown as follows, A=
h
A1
A2
A3
i
"
=
0 0
√
√
3 2 R 3 2R
3R 0
# (1)
The coordinates of the center of the moving platform in the moving coordinate system are shown as follows, # " √ √ h i − 23 r 23 r 0 P = C1 C2 C3 = (2) − 12 r − 12 r r The spatial transformation matrix T for transforming the moving coordinate system into the static coordinate system is shown as follows, T=
cos β cos γ sin γ cos β − sin β 0
sin β cos γ sin α − sin γ cos α sin γ sin β sin α + cos γ cos α cos β sin α 0
sin β cos γ cos α + sin γ sin α sin γ sin β cos α − cos γ sin α cos β cos α 0
x y z 1
(3)
where α, β, γ are the rotation angles around X, Y and Z, respectively. x, y, z are the distances along the X, Y and Z axes, respectively. Due to the parallel robot studied in this paper, they can only be translated along the x, y axis and rotated around the z axis, α = 0, β = 0, z = 0
(4)
T can be expressed as follows, T=
cos γ sin γ 0 0
− sin γ cos γ 0 0
x y 0 1
0 0 1 0
(5)
The coordinates of the moving platform center in the static coordinate system can be expressed as follows, " # " # C P =T× (6) 1 1 Combining Equations (2) and (5), C can be expressed as follows, C=
h
C1
C2
C3
i
"
=
x − r cos y − r sin
π 6 π 6
# − γ x + r cos γ − π6 x − r sin γ +γ y + r sin γ − π6 y + r cos γ
(7)
For any one branch Ai Bi Ci , the parallel robot satisfies the following motion constraint of the closed-loop vector. The vector equation is expressed as follows [8], *
*
*
*
OCi = OAi + Ai Bi + Bi Ci
(8)
where i = 1, 2, 3. Combined with Equation (8), θ Bi is the angle between the link Bi Ci and the positive direction of the X axis.
Algorithms 2018, 11, 7
5 of 13
Algorithms 2018, 11, 7
5 of 13
xCi = xAi + l1 cos θ Ai + l2 cos θ Bi yCi = y Ai + l1 sin θ Ai + l2 sin θ Bi
(9)
( Equation (9) can be expressed as xfollows, Ci = x Ai + l1 cos θ Ai + l2 cos θ Bi yCi = y Ai + l1 sin θ Ai + l2 sin θ Bi fi1 sin θ Ai + fi 2 cos θ Ai + fi 3 = 0
(9)
(10)
Equation (9) can be expressed as follows, where
fi1 = 2l1 ( y Aif i1−sin yCi θ) Ai + f i2 cos θ Ai + f i3 = 0 where
(10)
fi 2 = 2l1 ( xAi − xCi )
y 2 y)Ci y Ai + l12 − l22 fi 3 = xCi2 + yCi2 + xAi2f i1+= y Ai2 2l−12(yxCiAix− Ai − Ci f i2 = 2l1 ( x Ai − xCi ) 2 + y2 Equation 2 + y2(10), 2 2 Let ti = tan (θi / 2) , fsubstituting according to the universal formula of the = x + x − 2x i3 Ci x Ai − 2yCi y Ai + l − l Ci
Ci
Ai
1
Ai
2
trigonometric function, Equation (10) can be expressed as follows, Let ti = tan(θi /2), substituting Equation (10), according to the universal formula of the 2 trigonometric function, Equation( f(10) can be expressed as follows, (11) i 3 − fi 2 ) ti + 2 fi1ti + ( fi 3 + fi 2 ) = 0 According to the rooting formula, f i2roots 2 f i1 tbe 0 ( f i3 −the )t2i + can ( f i3 + f i2 )as=follows, i +expressed
− f can fi12 + fi 22 − fi 32 as follows, + be According to the rooting formula, the roots expressed θ Ai1 = 2arctan i1 fi 3 −√fi 2 2 2 2 1 θ = 2arctan − f i1 + f i1 + f i2 − f i3 Ai f i3 − 2f i2 2 − f − f 2 √ 2 i1 i1 + f2i 2 − 2 f i 3 2 θAi =2 2arctan − f i1 − f i1 + f i2 − f i3 fi 3 −f i3fi− 2 f i2 θ Ai = 2arctan
(11)
(12) (12)
Similarly, Similarly,θ Bi θ Bi can can be be obtained. obtained. order build genetic algorithm controller, it is necessary obtain transformation In In order to to build thethe genetic algorithm controller, it is necessary to to obtain thethe transformation matrix of the motor physical model. The physical model of the three-phase asynchronous motor matrix of the motor physical model. The physical model of the three-phase asynchronous motor is is shown Figure shown in in Figure 3. 3.
Figure 3. Physical model of the three-phase asynchronous motor. Figure 3. Physical model of the three-phase asynchronous motor.
The Themodel modelof ofthethethree-phase three-phaseasynchronous asynchronousmotor motorcancanbebeestablished establishedbybycoordinate coordinate transformation. The transformation matrix from the three-phase coordinate system to the two-phase transformation. The transformation matrix from the three-phase coordinate system to the two-phase stationary coordinate system through thethe geometric relationship can bebe expressed asas follows [27], stationary coordinate system through geometric relationship can expressed follows [27], C3s/2s
r " 2 1 = 3 0
1 − √2 3 2
−√21 − 23
# (13)
C3 s/2s = Algorithms 2018, 11, 7
1 1 − 2 2 3 3 0 2
1 2 3 − 2 −
(13) 6 of 13
The transformation matrix from the two-phase stationary coordinate system to the two-phase rotation system can be expressed as follows [27], Thecoordinate transformation matrix from the two-phase stationary coordinate system to the two-phase rotation coordinate system can be expressed as follows [27], cos θe sin θe C2s/2r = (14) " θ cossin θe θ # - sin cos θe e e C2s/2r = (14) − sin θe cos θe 3. Virtual Bench Setup and Genetic Algorithm Controller 3. Virtual Bench Setup and Genetic Algorithm Controller To verify the control effect of the PID controller optimized by the genetic algorithm, a virtual Toisverify the control effect of the PIDAt controller by the genetic algorithm, a virtual bench bench constructed in SimMechanics. the sameoptimized time, to simulate the gap error between the two is constructed in SimMechanics. At the same time, to simulate the gap error between the two revolute revolute joints in the actual system in the establishment of a three-dimensional model, the axis joints in the actual the system the establishment three-dimensional the axis distance between distance between twoin revolute joints is setoftoa0.5 mm. As Figure 4model, shows, the virtual bench of the the two 3-RRR revolute joints isindustrial set to 0.5 robot mm. As Figure 4 shows, benchinto of the planar 3-RRR planar parallel is translated from the its virtual Pro/E form Simulink in the parallel industrial robot is translated from its Pro/E form into Simulink in the SimMechanics toolbox. SimMechanics toolbox.
Figure 4. 4. The bench of of the the planar planar 3-RRR 3-RRR parallel parallel industrial industrial robot. robot. Figure The virtual virtual bench
According to the industrial robot structure in Figure 1, a virtual bench can be established as According to the industrial robot structure in Figure 1, a virtual bench can be established as shown shown in Figure 4. The parallel industrial robot is composed of three elements, six links, one moving in Figure 4. The parallel industrial robot is composed of three elements, six links, one moving platform, platform, and three driving joints. The moving platform is connected by three branches which consist and three driving joints. The moving platform is connected by three branches which consist of two of two individual links. Each of the two links are connected by revolute joints. The three driving joints individual links. Each of the two links are connected by revolute joints. The three driving joints on on the static platform can constitute an equilateral triangle. Similarly, the three connection joints on the static platform can constitute an equilateral triangle. Similarly, the three connection joints on the the moving platform can also constitute an equilateral triangle. moving platform can also constitute an equilateral triangle. The control scheme is significant for achieving the good stability and precise positioning needed The control scheme is significant for achieving the good stability and precise positioning needed by the 3-RRR planar parallel industrial robot. As we already know, the traditional PID controllers by the 3-RRR planar parallel industrial robot. As we already know, the traditional PID controllers have have good control of linear objects and their great advantages are simplicity and convenience. good control of linear objects and their great advantages are simplicity and convenience. However, However, when the control reference is complicated in the trajectory tracking control, or when the when the control reference is complicated in the trajectory tracking control, or when the dynamical dynamical parameters are changeable and complex, the classic PID control may not rapidly present parameters are changeable and complex, the classic PID control may not rapidly present a good result. a good result. In order to make the controller perform better, the genetic algorithm is introduced in In order to make the controller perform better, the genetic algorithm is introduced in this paper. It is a this paper. It is a random search algorithm of natural selection and genetic mechanism which random search algorithm of natural selection and genetic mechanism which possesses the advantage possesses the advantage of simplicity, versatility, robustness, and speed compared to the of simplicity, versatility, robustness, and speed compared to the conventional method. The design flow conventional method. The design flow chart of the genetic algorithm controller is shown in Figure 5. chart of the genetic algorithm controller is shown in Figure 5. The design process of the genetic algorithm is as follows: The design process of the genetic algorithm is as follows: Step 1: Parameter encoding: Due to the need-tuning parameters in the real domain, the simple binary Step 1: Parameter Due six to the need-tuning domain, the simple binary encodingencoding: and encoder, sub-strings can parameters be used as in thethe sixreal parameters influencing each encoding and encoder, six sub-strings can be used as the six parameters influencing each other. They then formed a chromosome. The precision of the PID solution parameters is set to 4 digits after the decimal point, and the solution space of the PID parameters can be divided into (1000 − 0) × (104 ) = 10,000,000 points. Because 223 < 10,000,000 < 224 , 24-bit binary numbers are needed to represent these solutions. In other words, a solution code is a 24-bit binary string.
Algorithms 2018, 11, 7
7 of 13
Algorithms 2018, 11, 7
7 of 13
other. They then formed a chromosome. The precision of the PID solution parameters is set to 4 digits after the decimal point, and the solution space of the PID parameters can be divided Algorithmsother. 2018, 11, 7 then formed a chromosome. The precision of the PID solution parameters 7isofset 13 They into (1000 − 0) × (104) = 10,000,000 points. Because 223 < 10,000,000 < 224, 24-bit binary numbers to 4 digits after the decimal point, and the solution space of the PID parameters can be divided are needed to represent these solutions. In other words, a solution code is a 24-bit binary into (1000 − 0) × (104) = 10,000,000 points. Because 223 < 10,000,000 < 224, 24-bit binary numbers string. these Initially, these binary aregenerated. randomly One generated. One such string Initially, binary strings are strings randomly such binary stringbinary represents a are needed to represent these solutions. In other words, a solution code is a 24-bit binary represents astring chromosome string where thechromosome length of thestring chromosome string is 24. chromosome where the length of the is 24. string. Initially, these binary strings are randomly generated. One such binary string Step The fitness function is the basis evaluating the selection, where the error integral be Step 2: 2:The fitness function is the basis for for evaluating the selection, where the error integral can becan used represents a chromosome string where the length of the chromosome string is 24. as the performance of the system, as Integrator Error (IE), Integrator Absolute Error asused the performance of the system, such assuch Integrator Error (IE), Integrator Absolute Error (IAE), Step 2: The fitness function is the basis for evaluating the selection, where the error integral can be (IAE), IntegralError Square Error (ISE), Integration Time andError Absolute Error (ITAE), etc. Each Integral (ISE), Absolute (ITAE), etc. Each formula has used asSquare the performance ofIntegration the system,Time such and as Integrator Error (IE), Integrator Absolute Error hasThis its own paper awants to dynamic achieve aerror, smaller dynamic the itsformula own focus. paperfocus. wantsThis to achieve smaller so the integral error, squareso error (IAE), Integral Square Error (ISE), Integration Time and Absolute Error (ITAE), etc. Each integral square error is used as the fitness Zfunction: isformula used as the fitness function: ∝ to achieve a smaller dynamic error, so the has its own focus. This paper wants [e (t)]2 (15) ∝ F = integral square error is used asFthe function: = fitness [e( t) ]2 0 (15) 0 ∝
Step 3: Genetic algorithm parameters: FGroup size Crossover probability Pc = 0.8, Mutation = [e( t)]2nn==20, Step 3: Genetic algorithm parameters: Group size 20, Crossover probability Pc = 0.8,(15) Mutation 0 probability Pm = 0.005. probability Pm = 0.005. Step Genetic algorithm parameters: Group size n = 20, Crossover probability Pc = 0.8, Mutation Step 4: 3: Step 4:If Ifthe theerror erroris isminimum, minimum,then thenrunning runningisisstopped, stopped,as asthe theoutput output has has reached reached the the optimal optimal probability Pm = 0.005. parameters. Otherwise, Steps 1 to 3 are repeated. parameters. Otherwise, Steps 1 to 3 are repeated. Step 4: If the error is minimum, then running is stopped, as the output has reached the optimal parameters. Otherwise, Steps 1 to 3 are repeated.
Figure 5. The design flow chart of the genetic algorithm controller. Figure 5. The design flow chart of the genetic algorithm controller. Figure 5. The design flow chart of the genetic algorithm controller.
The stability of the controller is of great importance to the reliability of the control system. To further analyze the stability of theimportance PID controller the optimized by aofgenetic algorithm for Thetheoretically stability of ofthe thecontroller controller great reliability control system. The stability isisofofgreat importance to to the reliability of thethe control system. To the 3-RRR parallel robot, the Routh stability criterion is introduced for stability verification of the PID To further theoretically analyze stability of the controller optimized a genetic algorithm further theoretically analyze the the stability of the PIDPID controller optimized by abygenetic algorithm for controller optimized by a genetic algorithm. The systemis PID closed-loop controlverification block diagram is for the 3-RRR parallel robot, the Routh stability criterion introduced for stability ofPID the the 3-RRR parallel robot, the Routh stability criterion is introduced for stability verification of the shown in Figure 6. PID controller optimized a genetic algorithm. The system PIDclosed-loop closed-loopcontrol controlblock block diagram diagram is is controller optimized by abygenetic algorithm. The system PID shown in in Figure Figure 6. shown 6.
Figure 6. System proportion integration differentiation (PID) closed-loop control block diagram. Figure 6. System proportion integration differentiation (PID) closed-loop control block diagram. Figure 6. System proportion integration differentiation (PID) closed-loop control block diagram.
Algorithms 2018, 11, 7
8 of 13
According to the closed-loop PID control block diagram shown in Figure 6, the characteristic equation of the closed-loop control transfer function can be expressed as follows, bK p Kd s3 + bK p + aK p Kd s2 + aK p + bK p Ki s + aK p Ki = 0
(16)
The Routh-table of the characteristic equation is expressed as follows, s3 s2 s2
bK p Kd bK p + aK p Kd (bK p +aK p Kd )( aK p +bK p Ki )−(bK p Kd )( aK p Ki )
aK p + bK p Ki aK p Ki
(17)
bK p + aK p Kd
s0
aK p Ki
In order to build PID controllers conveniently, the circular equation is divided into two input equations ( XP = 0.03 − 0.03 cos(50t) (Equation (a)), YP = 0.03 sin(50t) (Equation (b))). Therefore, two PID controllers optimized by a genetic algorithm are set. The parameters in system transfer function are given as a = 0.7374, b = 0.000036. When there is no interference added, the PID control parameters of the PID controller optimized by a genetic algorithm for Equation (Equation (a)) are Kp1 = 991.1899, Ki1 = 152.2033, Kd1 = 9.9589. The PID control parameters of the PID controller optimized by a genetic algorithm for Equation (Equation (b)) are Kp2 = 0.3, Ki2 = 799.9985, Kd2 = 0.0003. When there is interference added, the PID control parameters of the PID controller optimized by a genetic algorithm for Equation (Equation (a)) are Kp1 = 100, Ki1 = 198.9589, Kd1 = 9.7398. The PID control parameters of the PID controller optimized by a genetic algorithm for Equation (Equation (b)) are Kp2 = 0.3, Ki2 = 799.4141, Kd2 = 0.0003. Substituting the above parameters into the Routh-table Equation (17), it can be seen that none of the coefficients of the eigenvalue equation is zero, and the sign of each coefficient is positive; therefore, according to the Routh stability criterion, the system can be proved to be stable. 4. Simulation and Results Discussion To verify the control effect of the PID controller optimized by a genetic algorithm, the circular trajectory which is commonly used in industrial applications is selected as the trajectory. The system control block diagram is shown in Figure 7. The trajectory equation is as follows, XP = 0.03 − 0.03 cos(50t) YP = 0.03sin(50t) θ = π/6
(18)
The radius of the circle where the active revolute joints are located is R = 0.25 m. The radius of the circle where the triangle of the mobile platform is located is r = 0.0825 m; the length of the links l1 = l2 = 0.16 m; the concentrated mass of the links mg = 0.2 kg; the concentrated mass of the moving platform mp = 1 kg. To better describe the trajectory tracking error, ei (i = 1, 2) are defined as the tracking errors. The control parameters of the classic PID controller are Kp 1 = 10, Ki1 = 100, Kd1 = 5, Kp2 = 0.35, Ki2 = 500, Kd2 = 0.0003. q 2 2 e = x p − xd + y p − yd 1 q 2 2 e = x g − xd + y g − yd 2 where xd is the x coordinate of the desired trajectory. yd is the y coordinate of the desired trajectory.
(19)
Algorithms 2018, 11, 7
9 of 13
xp is the x coordinate of the trajectory obtained by the classic PID controller. yp is the y coordinate of the trajectory obtained by the classic PID controller. xg is the x coordinate of the trajectory obtained by the PID controller optimized by a genetic algorithm. yg is the y coordinate of7the trajectory obtained by the PID controller optimized by a genetic Algorithms 2018, 11, 9 of 13algorithm. The trajectory trackingoferrors of theobtained classic by PID the PID optimized optimized a genetic algorithm are xg is the x coordinate the trajectory theand PID controller by by a genetic algorithm. y g is the y coordinate of the trajectory obtained by the PID controller optimized by a genetic algorithm. shown in Figure 8. It is found that the PID controller optimized by the genetic algorithm has a higher Algorithms 2018, 11, 7 9 of 13 The trajectory tracking errors of the classic PID and the PID by a genetic algorithm control accuracy. The trajectories of the end-effector using theoptimized classic PID and the PID optimized shown in Figure 8.the It is found that the9. PID optimized bythe the running genetic algorithm has aof the PID xare g isalgorithm the x coordinate trajectory obtained by the optimized by a genetic algorithm. by a genetic areofshown in Figure It controller canPID becontroller found that trajectory control accuracy. The trajectories ofby the using the classic PID and the PID yhigher g is the y coordinate of the trajectory obtained theend-effector PID controller optimized by a genetic algorithm. controller optimized by a genetic algorithm is closer to the desired trajectory; therefore, the genetic optimized by a genetic algorithm are shown in Figure 9. It can be found that the running trajectory The trajectory errorsdesigned of the classic PID the PID by a genetic algorithm accuracy. algorithm-optimized PIDtracking controller thisand paper hastooptimized athe higher trajectory of the PID controller optimized by a genetic in algorithm is closer desired trajectory; tracking therefore, are shown in Figure 8. It is found that the PID controller optimized by the genetic algorithm has a algorithm-optimized PID designed in this paper a higher trajectory tracking Moreover,the thegenetic PID controller obtained bycontroller a genetic algorithm saveshas more time than the PID controller higher control accuracy. The trajectories of the end-effector using the classic PID and the PID accuracy. Moreover, the PID controller obtained by a genetic algorithm saves more time than the PID obtained by the trial and error method, which is simple and practical. optimized by a genetic algorithm are shown in Figure 9. It can be found that the running trajectory controller obtained by the trial and error method, which is simple and practical. of the PID controller optimized by a genetic algorithm is closer to the desired trajectory; therefore, the genetic algorithm-optimized PID controller designed in this paper has a higher trajectory tracking accuracy. Moreover, the PID controller obtained by a genetic algorithm saves more time than the PID controller obtained by the trial and error method, which is simple and practical.
Figure 7. System control block diagram.
Figure 7. System control block diagram. To further verify the robustness of the controller designed in this paper, an artificial disturbance is added to the model. The curve of the disturbance is as follows:
To further verify the robustnessFigure of the controller in this paper, an artificial disturbance is 7. System controldesigned block diagram. x d = 0.003cos(50 t) added to the model. The curve of the disturbance is as follows: (20) To further verify the robustness of theycontroller designed in this paper, an artificial disturbance d = 0.003s in(50t ) is added to the model. The curve of thexdisturbance is as(follows: = 0.003 cos 50t) d
0.003cos(50 t) ) ydx= sin(50t d = 0.003 yd = 0.003s in(50t )
(20)
Figure 8. The trajectory tracking errors of the classic PID and the PID optimized by a genetic algorithm.
Figure 8. The trajectory tracking errors of the classic PID and the PID optimized by a genetic algorithm.
Figure 8. The trajectory tracking errors of the classic PID and the PID optimized by a genetic algorithm.
(20)
Algorithms 2018, 11, 7
10 of 13
Algorithms 2018, 11, 7
10 of 13
0.03
Algorithms 2018, 11, 7
10 of 13
0.02 0.03
Desired Classic Genetic algorithm
Y(m)
Y(m)
0.01 0.02 0.01
Desired Classic Genetic algorithm
0
-0.01 0 -0.02 -0.01 -0.03 -0.02 0 -0.03
0.01
0.02
0.03 X(m)
0.04
0.05
0.06
Figure 9. Trajectories of the end-effector using the classic PID and the PID optimized by a genetic Figure 9. Trajectories of the using0.03 the classic the PID optimized by a 0 end-effector 0.01 0.02 0.04 PID 0.05 and0.06 algorithm. X(m) genetic algorithm.
The trajectory tracking of the using classic andPID theand PIDthe optimized by a genetic algorithm Figure 9. Trajectories of theerrors end-effector thePID classic PID optimized by a genetic are algorithm. shown in Figure 10. The maximum error isPID still and less than 1 mm. It is found the controller The trajectory tracking errors of the classic the PID optimized bythat a genetic algorithm designed in this paper stillmaximum has a highererror accuracy when interference is is added. The trajectories of are shown in Figure 10. The is still lessthe than 1 mm. It found that the controller The trajectoryusing tracking errors of theand classic PID optimized and the PID optimized by a genetic algorithm the end-effector the classic PID the PID by a genetic algorithm are shown designed in this paper still has a higher accuracy when the interference is added. The trajectoriesin of the are shown Thethat maximum error trajectory is still lessofthan 1 mm. It is found that theby controller Figure 11.in It Figure can be 10. found the running PID controller optimized a genetic end-effector using the classic PID and the PID optimized bythe a genetic algorithm are shown in Figure 11. designed in this paper to stillthe hasdesired a highertrajectory. accuracy when the interference is added. The trajectoriesPID of algorithm is closer Therefore, the genetic algorithm-optimized It can beend-effector found thatusing the running trajectory of PID controller optimized by a genetic algorithm is the thethe PID optimized by aaccuracy genetic and algorithm are shown in controller designed inthe thisclassic paper PID has aand higher trajectory tracking has better robustness closer to the desired trajectory. Therefore, the genetic algorithm-optimized PID controller designed in Figure can be found that the running trajectory of the PID controller optimized by a genetic when 11. the It interference is added. this paper has is a 12 higher tracking accuracy hasthe better robustness when thecontroller interference algorithm closer tothe the desired trajectory. Therefore, genetic algorithm-optimized PID Figure showstrajectory torque curves produced byand the classic PID controller and the PID is added. controller designed in this paper hasThese a higher trajectory accuracy and has better robustness optimized by a genetic algorithm. torque curves tracking are measured using a torque transducer built when the12interference istorque added. Figure shows the curves by the PIDPID controller and PIDcurves controller in SimMechanics. It can be found that, produced compared with theclassic traditional controller, thethe torque Figure 12 shows the torque curves produced theare classic PID controller thethe PID controller produced the PID controller optimized bycurves a by genetic algorithm are smoother at beginning of in optimized by a by genetic algorithm. These torque measured using aand torque transducer built optimized by a genetic algorithm. These torque curves are measured using a torque transducer built operation; therefore, the new controller has better stability at the beginning. SimMechanics. It can be found that, compared with the traditional PID controller, the torque curves in SimMechanics. It can be found that, compared with the traditional PID controller, the torque curves produced by the PID controller optimized by a genetic algorithm are smoother at the beginning of produced by the PID controller optimized by a genetic algorithm are smoother at the beginning of operation; therefore, the new controller has better stability at the beginning. operation; therefore, the new controller has better stability at the beginning.
Figure 10. The errors of using the classic PID and the PID optimized by a genetic algorithm in the presence of disturbances. Figure errors usingthe theclassic classic PID PID and by by a genetic algorithm in thein the Figure 10. 10. TheThe errors of of using andthe thePID PIDoptimized optimized a genetic algorithm presence of disturbances. presence of disturbances.
Algorithms 2018, 11, 7 Algorithms 2018, 11, 7 Algorithms 2018, 11, 7
11 of 13 11 of 13 11 of 13
0.03 0.03 Desired Desired Classic Classic algorithm Genetic Genetic algorithm
0.02 0.02 0.01 0.01 0 0 -0.01 -0.01 -0.02 -0.02 -0.03 -0.03 0 0
0.01 0.01
0.02 0.02
0.03 0.03 X(m) X(m) Figure 11. Trajectory of the end-effector using the classic Figure 11.11. Trajectory ofofthe end-effector Figure Trajectory the end-effectorusing using the the classic classic algorithm in the presence of disturbances. algorithm in the presence of disturbances. algorithm in the presence of disturbances.
0.04 0.04
0.05 0.05
0.06 0.06
PID and the PID optimized by a genetic PID and the the PID PIDoptimized optimizedbybya agenetic genetic PID and
Figure 12. The torque curves produced by the classic PID control and the GA–PID control. Figure The torquecurves curvesproduced producedby bythe the classic classic PID control Figure 12.12. The torque control and andthe theGA–PID GA–PIDcontrol. control.
Algorithms 2018, 11, 7
12 of 13
5. Conclusions In this paper, a variable PID parameter controller optimized by a genetic algorithm controller is proposed. The inverse kinematics model of the 3-RRR parallel robot was established according to the vector method, and the motor conversion matrix was deduced. The gap error between the two revolute joints in the actual system was simulated by the establishment of a three-dimensional model; the axis distance between the two revolute joints was set to 0.5 mm. The simulation model of the 3-RRR planar parallel robot—built by SimMechanics—was used to verify the new controller. The results show that, compared with the traditional PID controller, the new controller designed in this paper has better control precision, and when interference is added to the system, the new controller has better robustness and stability, which provides the basis for practical application. Acknowledgments: This work is supported by the National Natural Science Foundation of China (Grant No. U1610111 and No. 51775543), and the Project Funded by the Priority Academic Program Development of Jiangsu Higher Education Institutions (PAPD). Author Contributions: Wei Li and Lianchao Sheng put forward the initial ideas; Lianchao Sheng conceived and designed the simulations model; Lianchao Sheng analyzed the data; Lianchao Sheng wrote the paper. Conflicts of Interest: The authors declare no conflict of interest.
References 1. 2. 3. 4. 5. 6. 7. 8. 9.
10. 11. 12. 13. 14. 15.
16.
Merlet, J.P. Parallel Robots; Kluwer Academic Publishers: Norwell, MA, USA, 2000. Salas, F.G.; Santibáñez, V.; Llama, M.A. Fuzzy-Tuned PD Tracking Control of a 3-RRR Parallel Manipulator: Stability Analysis and Simulations. Intell. Autom. Soft Comput. 2014, 20, 159–182. [CrossRef] Fichter, E.F. A Stewart Platform-Based Manipulator: General Theory and Practical Construction. Int. J. Robot Res. 1986, 5, 157–182. [CrossRef] Lee, K.M.; Yien, C. Design and control of a prototype platform manipulator for work holding and work handling applications. J. Mech. Work. Technol. 1989, 20, 305–314. [CrossRef] Wang, R.; Zhang, X. Parameters optimization and experiment of a planar parallel 3-dof nanopositioning system. IEEE Trans. Ind. Electron. 2017, 99, 2388–2396. [CrossRef] Gutierrez, M.N.C. Dimensional synthesis of 3rrr planar parallel robots for well-conditioned workspace. IEEE Lat. Am. Trans. 2015, 13, 409–415. [CrossRef] Gosselin, C.; Angeles, J. The optimum kinematic design of a planar three-degree-of-freedom parallel manipulator. J. Mech. Trans. Autom. Design 1988, 110, 35–41. [CrossRef] Kucuk, S. Energy minimization for 3-rrr fully planar parallel manipulator using particle swarm optimization. Mech. Mach. Theory 2013, 62, 129–149. [CrossRef] Varedi-Koulaei, S.M.; Daniali, H.M.; Farajtabar, M.; Fathi, B.; Shafiee-Ashtiani, M. Reducing the undesirable effects of joints clearance on the behavior of the planar 3-rrr parallel manipulators. Nonlinear Dyn. 2016, 86, 1–16. [CrossRef] Firmani, F.; Podhorodeski, R.P. Singularity analysis of planar parallel manipulators based on forward kinematic solutions. Mech. Mach. Theory 2009, 44, 1386–1399. [CrossRef] Kroger, R.; Binder, S. Accuracy analysis of 3-dof planar parallel robots. Mech. Mach. Theory 2008, 43, 445–458. Gao, M.W. Design, Analysis and Control on the Planar Parallel Robot. Master’s Thesis, South China University of Technology, Guangzhou, China, 2012. Zhang, Q.; Fan, X.; Zhang, X. Dynamic analysis of planar 3-rrr flexible parallel robots with dynamic stiffening. Shock Vib. 2014, 1, 154–159. [CrossRef] Yu, Y.Q.; Du, Z.C.; Yang, J.X.; Li, Y. An experimental study on the dynamics of a 3-rrr flexible parallel robot. IEEE Trans. Robot. 2011, 27, 992–997. [CrossRef] Moezi, S.A.; Rafeeyan, M.; Zakeri, E.; Zare, A. Simulation and experimental control of a 3-rpr parallel robot using optimal fuzzy controller and fast on/off solenoid valves based on the pwm wave. ISA Trans. 2016, 61, 265. [CrossRef] [PubMed] Shang, C.; Tao, G.; Meng, D. Adaptive robust trajectory tracking control of a parallel manipulator driven by pneumatic cylinders. Adv. Mech. Eng. 2016, 8. [CrossRef]
Algorithms 2018, 11, 7
17.
18.
19.
20. 21. 22. 23. 24. 25. 26. 27.
13 of 13
Abu-Dakka, F.J.; Assad, I.F.; Alkhdour, R.M.; Abderahim, M. Statistical evaluation of an evolutionary algorithm for minimum time trajectory planning problem for industrial robots. Int. J. Adv. Manuf. Technol. 2017, 89, 389–406. [CrossRef] Stan, S.D.; Gogu, G.; Manic, M.; Balan, R.; Rad, C. Fuzzy Control of a 3 Degree of Freedom Parallel Robot. In Technological Developments in Education and Automation; Springer: Dordrecht, The Netherlands, 2010; pp. 437–442. Noshadi, A.; Mailah, M.; Zolfagharian, A. Active force control of 3-RRR planar parallel manipulator. In Proceedings of the IEEE International Conference on Mechanical and Electrical Technology, Singapore, 10–12 September 2010; pp. 77–81. Noshadi, A.; Mailah, M.; Zolfagharian, A. Intelligent active force control of a 3-rrr parallel manipulator incorporating fuzzy resolved acceleration control. Appl. Math. Model. 2012, 36, 2370–2383. [CrossRef] Pham, C.V.; Wang, Y.N. Robust adaptive trajectory tracking sliding mode control based on neural networks for cleaning and detecting robot manipulators. J. Intell. Robot. Syst. 2015, 79, 101–114. [CrossRef] Kuo, Y.L.; Lin, T.P.; Wu, C.Y. Experimental and numerical study on the semi-closed loop control of a planar parallel robot manipulator. Math. Probl. Eng. 2014, 5, 1–9. [CrossRef] Song, B.; Wang, Z.; Sheng, L. A new genetic algorithm approach to smooth path planning for mobile robots. Assem. Autom. 2016, 36, 138–145. [CrossRef] Wang, X.; Shi, Y.; Ding, D.; Gu, X. Double global optimum genetic algorithm–particle swarm optimization-based welding robot path planning. Eng. Optim. 2016, 48, 299–316. [CrossRef] Lu, X.; Liu, M. Optimal design and tuning of pid-type interval type-2 fuzzy logic controllers for delta parallel robots. Int. J. Adv. Robot Syst. 2016, 13, 96. [CrossRef] Lu, X.G.; Liu, M.; Liu, J.X. Design and optimization of interval type-2 fuzzy logic controller for delta parallel robot trajectory control. Int. J. Fuzzy Syst. 2017, 19, 190–206. [CrossRef] Yuan, L. Modern Permanent Magnet Synchronous Motor Control Theory and MATLAB Simulation; Beijing University of Aeronautics and Astronautics Press: Beijing, China, 2016. © 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).