For the case where the controller commands joint velocities, in the previous video we derived a feedforward plus PI feedback controller when the desired motion is expressed in joint space. Now consider the case where the desired motion is expressed as X_d, the desired SE(3) configuration of the end-effector as a function of time. The corresponding twist V_d at any instant of time is X_d-inverse times X_d-dot, which is the twist of the end-effector expressed in the desired frame of the end-effector. Similarly, the actual motion is defined by the actual configuration X as a function of time and V_b, the end-effector twist expressed in the end-effector frame. Now we can write a task-space version of our feedforward plus PI feedback controller. The controller commands the actual end-effector twist V_b. The feedforward component is the desired twist V_d, but expressed in the actual end-effector frame. To change the frame of reference of the twist, we use the matrix adjoint of the transformation matrix X_bd that expresses the desired configuration relative to the actual configuration. X_bd is calculated as X-inverse times X_d, which we can derive by remembering our subscript cancellation rule and that X_d can be written X_sd and X can be written X_sb, where {s} is the implicit space frame. Next, we add the PI feedback portion of the controller, replacing theta_e with X_e. The configuration error X_e is not an element of SE(3). Just as theta_e represents a vector from the actual joint angles to the desired joint angles, X_e is a twist pointing from the current configuration to the desired configuration. X_bd, which we calculated earlier to be X-inverse times X_d, is the configuration of the desired frame relative to the actual frame, and the log calculates the matrix representation of the twist, expressed in the end-effector frame, that goes from the actual frame to the desired frame in unit time. This twist is multiplied by the proportional gain K_p, and integrated and multiplied by the integral gain K_i, to get the PI feedback portion of the commanded velocity. The final controller can be written like this, a task-space feedforward plus PI feedback control with velocity inputs. The actual joint velocities are calculated using the Jacobian inverse or pseudoinverse. This controller calculates the error between two configurations in terms of a twist. Another option is to decouple the rotational error and the linear error. Consider a configuration represented as a rotation matrix R and a position vector p. Then we can separately calculate the commanded angular velocity omega_b and linear velocity p-dot. The feedforward component for omega_b expresses the desired angular velocity omega_d in a frame actually oriented with the end-effector. The feedforward linear velocity is just the rate of change of the p coordinates. The PI feedback portion of the controller defines a configuration error X_e that has an angular velocity, expressed in the end-effector frame, that takes the end-effector to the desired orientation in unit time, as well as the typical coordinate error for the position p. The resulting control law is a decoupled task-space controller with velocity controls. As an example, assume that the red frame represents a stationary desired configuration, and the green frame represents the actual configuration. If we set the feedforward control and the gain K_i to be zero, the task-space controller that couples angular and linear errors produces a motion about a constant screw axis. The decoupled task-space controller, on the other hand, carries the origin of the frame along a straight-line path. This concludes our study of robot control with velocities as controls, but we will see these control laws again in Chapter 13 when we study wheeled mobile robots. For the rest of this chapter, we assume that the controls are joint torques and forces and consider the robot's dynamics.