SCARA Manipulator: Kinematic Control Part II

Manipulators
Control Systems
MATLAB
Author

Suraj Kiron Nair

Published

June 26, 2024

Overview

This project will cover the following topics:
1. Second Order inverse differential kinematics of a Scara robotic Arm
2. Obstacle Avoidance by maximizing distance between joins and an Obstacle

Consider the SCARA manipulator depicted below.

Our Goal is to have the SCARA manipulator end effector follow the given position and velocity trajectories.

Implement in Matlab/Simulink a second order algorithm for kinematic inversion with jacobian inverse along the given trajectory. Adopt the Euler integration rule with integration time 1 ms.

Given trajectory

Our Goal is to have the SCARA manipulator end effector follow the given position and velocity trajectories.

Implement in Matlab/Simulink a second order algorithm for kinematic inversion with jacobian inverse along the given trajectory. Adopt the Euler integration rule with integration time 1 ms.

Second Order Inverse Kinematics using Jacobian Inverse

The Second order inverse kinematics equation for the given manipulator is given by

\[ \ddot{q} = J^{-1}_a(q)(\ddot{x}_d + K_d\dot{e}+K_pe-\dot{J_a}(q,\dot{q})\dot{q})\]

Where \(J^{-1}_a(q)\) is the inverse of the Jacobian. \(\ddot{x_d}\) is the acceleration trajectory. \(e\) is the error between the given trajectory and the end effector position. \(K_d\) and \(K_p\) are gains. For the SCARA robot the Jacobian is a 4×4 matrix. Since the \(Z\) component of the end effector is parallel to the \(Z\) component of the base frame the Geometric Jacobian is equal to the Analytical Jacobian.

The equation given above is modeled using the following kinematic control schematic diagram.

Results

Joint space trajectories are found to be.

The error vs time chart for the end effector positions along X, Y and Θ are .

Part 2

Suppose to relax one component in the operational space (relax the z component), implement in Matlab/Simulink the second order algorithm for kinematic inversion with Jacobian pseudo-inverse along the given trajectory maximizing the distance from an obstacle along the path. Suppose that the obstacle is a sphere centered in p = [0.4 −0.7 0.5] with radius 0.2 m.

Exploit Redundancy using Jacobian Pseudo-inverse

\[ \ddot{q} = J^{+}_a(\ddot{x}_d + K_d\dot{e}+K_pe-\dot{J_a}(q,\dot{q})\dot{q})+(I_n-J^{+}_aJ_a)\ddot{q}_0 \]

Where \(J^{+}_a\) is the Jacobian Pseudo inverse.

\(\dot{q}_0\) enables us to generate internal motions and optimize for certain criteria without changing end effector position. In our case we want to stay as close as possible to the center of the joint range.

\[\dot{q}_0 = k_0 \left( \frac{\partial w(q)}{\partial q} \right)^T\]

where \(k_0 > 0\) and \(w(q)\) is a (secondary) objective function of the joint variables.

\[w(q)= _{p, o}^{min} ||p(q)−o||\]

Here \(w(q)\) is a cost function that when minimized ensures that the end distance between the effector position pq and the obstacle \((o)\) is maximized.

The distance is calculated using the equation

\[w(q) = \sqrt{(p_x−o_x)^2+(p_y−o_y)^2+(p_z−o_z)^2}\]

Substituting \(p_x, p_y\) and \(p_z\) \[ \sqrt{\left( \frac{cos(\theta_1+\theta_2)}{2} + \frac{cos(\theta_1)}{2}-\frac{2}{5} \right)^2 + \left( \frac{sin(\theta_1+\theta_2)}{2} + \frac{sin(\theta_1)}{2}-\frac{7}{10} \right)^2 + \left( d_3 - \frac{1}{2} \right) }\]

Integrating twice with respect to “q” and multiply gain ‘\(k_0\)’ we get \(q_0\).

Results

Joint space trajectories are found to be. Notice that q3 is constant this correlates with the lowest position of the end effector. In essence, the maximum distance from the obstacle.

The error vs time chart for the end effector positions along X,Y and Θ axes are given.