PNDbotics Institute
Trapezoidal Motion Trajectory
When controlling motion, it is very important to move smoothly from one position to another. For example, suppose you have a robotic arm that picks up an object and needs to move it from one side of a table to the other. This action takes several seconds to execute. A better approach is to find many intermediate joint angles that can move smoothly to the target position and gradually accelerate and decelerate rather than immediately commanding the target joint angle to move the end effector of the arm to the new position. This is what the trapezoidal motion trajectory can help you accomplish.
In the trapezoidal motion trajectory, three variables define the entire motion process: acceleration, deceleration, and speed limit.
PID Controller
The motor controller is a cascaded position, speed, and current control loop as shown in the figure below. When the control mode is set to position control, it runs on the entire loop. When running in speed control mode, the position control part is bypassed and the speed command is directly input to the second-level input. In current control mode, only the current controller is used.
Each stage of the control loop is a variant of a PID controller. The PID controller is a mathematical model that can be applied to control various systems. This flexibility is crucial because it allows PNDrive to be used to control various mechanical systems.
Position Loop:
The position controller is a P loop with a single proportional gain.
Speed Loop:
The speed controller is a PI loop.
vel_error = vel_cmd - vel_feedback
current_integral += vel_error * vel_integrator_gain
current_cmd = vel_error * vel_gain + current_integral + current_feedforward
Current Loop:
The current controller is a PI loop.