# Application of Elliptic Jerk Motion Profile to Cartesian Space Position Control of a Serial Robot
## 3 Cartesian Space Position Control  
Cartesian space position control of a generic serial manipulator is usually expressed by the following control law [18]:  
\[\mathbf{\tau}=\mathbf{J}^{T}(\theta)\Big{(}\mathbf{K}_{KD}(\mathbf{x}_{d}-\mathbf{x }(\theta))+\mathbf{D}_{KD}(\mathbf{x}_{d}-\mathbf{x}(\mathbf{q}))^{(1)}\Big{)}+ \mathbf{\tau}_{g}(\theta) \tag{1}\]  
In Equation (1): \(\mathbf{J}(\theta)\) is the robot Jacobian matrix; \(\mathbf{x}_{d}\) is the vector of the time-varying external coordinates of the set-point motion; \(\mathbf{\tau}_{g}(\theta)\) is the gravity compensation; \(\mathbf{K}_{KD}\) is the stiffness matrix; \(\mathbf{D}_{KD}\) is the damping matrix. The superscript (i) designates the time derivative of fractional order \(i\); therefore, in the law (1) damping is proportional to the derivative of order 1 of the error of the external coordinates.  
In general, \(\mathbf{K}_{KD}\) and \(\mathbf{D}_{KD}\) define both the translational and the rotational behavior [18]; in the case of [PERSON] motion, their size is 4 \(\times\) 4. In order to have the translational behavior decoupled from the rotational behavior, \(\mathbf{K}_{KD}\) and \(\mathbf{D}_{KD}\) are block-diagonal; the 3-DOF translational impedance is defined by the upper left 3 \(\times\) 3 submatrices of \(\mathbf{K}_{KD}\) and \(\mathbf{D}_{KD}\), while the 1-DOF rotational impedance is defined by the fourth diagonal elements of \(\mathbf{K}_{KD}\) and \(\mathbf{D}_{KD}\).  
The IO law (1) is named KD; a FO extension, named KDHD, is obtained by adding a damping term proportional to the derivative of order 1/2 (half-derivative) of the error through the 4 \(\times\) 4 matrix \(\mathbf{HD}_{KDHD}\)[12]:  
\[\begin{array}{rl}\mathbf{\tau}=&\mathbf{J}^{T}(\theta)\left(\left(\mathbf{K}_{ KDHD}-\frac{\sum\limits_{i=0}^{n}w_{i}}{T_{i}^{3/2}}\mathbf{HD}_{KDHD}\right)( \mathbf{x}_{d}-\mathbf{x}(\theta))+\right.\\ &\left.+\mathbf{D}_{KDHD}(\mathbf{x}_{d}-\mathbf{x}(\mathbf{q}))^{(1)}+\mathbf{ HD}_{KDHD}(\mathbf{x}_{d}-\mathbf{x}(\mathbf{q}))^{(1/2)}\right)+\mathbf{\tau}_{g}( \theta)\end{array} \tag{2}\]  
In (2) the half-derivative of \(f(t)\) is calculated through a digital filter with order \(n\) and sampling time \(T_{s}\) based on the Grunwald-Letnikov approach [19]:  
\[\begin{array}{rl}f(t)^{(1/2)}\cong f(kT_{s})^{(1/2)}\cong\frac{1}{T_{s} ^{1/2}}\left(\sum\limits_{j=0}^{n}w_{j}f((k-j)T_{s})\right)\text{, }k=[t/T_{s}]\\ w_{0}=1\text{, }w_{j}=\left(1-\frac{3}{2}\right)w_{j-1}\text{, }j=1\text{... }n\end{array} \tag{3}\]  
Figure 2: Kinematic notation.  
The digital filter (3) considers only the time interval [\(t-nT_{s}\), \(t\)], while an exact calculation of a FO derivative involves all the time history of the original function. This introduces an approximation in the calculation of the FO derivative that modifies the stiffness imposed by the matrix \(\mathbf{K}_{\text{{{{KDHD}}}}}\). To solve this problem, in Equation (2) a stiffness correction term is present, the function of \(\mathbf{HD}_{\text{{{KDHD}}}}\) and of the filter coefficients \(w_{j}\). The effectiveness of the control law (2) with the proposed correction is discussed in [12].  
In the following, both the IO law (1) and the FO law (2) will be applied to the RRFbR manipulator, to assess if the type of Cartesian space position control influences the comparison of the motion profiles used to define the set-point motion \(\mathbf{x}_{d}\). In the next section, the elliptic jerk motion profile's main features will be summarized.