Question: Trajectory Generation and Related Setup First, assign the start time and duration for the trajectory. tStart = 0 . 5 ; tDuration = 3 ;
Trajectory Generation and Related Setup
First, assign the start time and duration for the trajectory.
tStart ;
tDuration ;
Next, assign the initial and target configuration. q is the initial configuration and q is the target configuration.
q;
q zeros;
The following figures show the robot visualization of the initial configuration and the target configuration related to the location of the planar object. The planar object is placed so that the robot will collide to it during trajectory tracking.
In the Simulink model, a Polynomial Trajectory block is used to compute the robot's position, velocity, and acceleration at any instant in the trajectory using a fifthorder polynomial.
Simulink Model Overview
Next, open the Simulink model. The variables generated above are already stored in Simulink model workspace:
opensystemrobotSafeTrajectoryTrackingslx;
The robotSafeTrajectoryTracking model implements a computed torque controller with trajectory scaling for safe trajectory tracking. There are three main subsystems in this model:
Computed Torque Controller
Trajectory Scaling and Desired Motion
Simscape Multibody Model with Simple Contact Mechanics
On each time step, if the trajectory scaling switch is on the modified time stamp is used for evaluating the desired joint position, velocity and acceleration. Then, the computed torque controller uses the manipulator blocks associated with the RigidBodyTree model to track the desired motion. The derived control input is fed into the Sawyer model in Simscape Multibody where the planar object for interacting with the robot is included
QUESTION
For a manipulator with n nonfixed joints, the system dynamics can be expressed as:
Mqq Cqqq Gq u
where qqq in Rn are the position, velocity and acceleration of the generalized coordinate, u in Rn is the control input torque Mq is the joint space mass matrix, Cqqq is the velocity product torque, Gq is the gravity torque. To track along a desired joint trajectory with desired position qd velocity qd and acceleration qd the computed torque controller calculates the torque needed to obtain a given configuration and velocity, provided the robot dynamics variables Mq Cqqq and Gq In Simulink, these variables can be easily derived using robotics manipulator blocks from Robotics System Toolbox to design the following computed torque controller:
u MqqdKdqeKpqe Cqqq Gq
where qeqqd is the position error and qeqqd is the velocity error. With this controller input, the system dynamics becomes a secondorder ODE:
qe Kdqe Kpqe
By choosing Kd and Kp properly, the tracking error qe will converge to zero when time approaches infinity.
Gain Kp: The proportional gain when correcting the robot configuration
Gain Kd: The derivative gain when correcting the robot configuration
A standard way to determine the Kp and Kd is to calculate them as:
Kpomega n
Kd omega nxi
In this example, the default value of Kp and Kd are derived by setting the natural angular frequency of Hz and a damped frequency of Hz
Calculate the damping ratio from the general equation for the system is to make the secondorder ODE damping system.
Find Kp and Kd where omega n and xi are the natural frequency and damping ratio of the secondorder ODE.
Determine these variables by substituting the calculated values in and using design computed torque controller
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
