Starting from:

$25.99

MCE747- Homework 5 Solved

The purpose of this homework is to obtain a dynamic model (in symbolic form) for the Barrett WAM robot, with joints 1, 2 and 4 active and joint 3 frozen at q3 = 0. This is done to limit the complexity of the resulting model matrices and allow you to obtain a regressor and parameters “by inspection”. This assignment will carry over into the final project.

A Matlab file with the D-H frame assigments used by Barrett and nominal parameters is provided to save you time and have uniformity of solutions. Refer to Barrett’s documentation if you need to:

https://support.barrett.com/wiki/WAM/KinematicsJointRangesConversionFactors

http://www.me.unm.edu/~starr/research/WAM_MassParams_AA-00.pdf Procedure:

Start as if you were going to work with all four joints.
Adjust the supplied code so it runs with your own transformation libraries. Look at the documentation and verify with a few easy configurations.
Follow the examples discussed in class and materials posted on the course website to generate the massmatrix M using Matlab’s Symbolic Toolbox. Verify that the matrix is symmetric.
Set q3 = 0 and evaluate M to take in this value. Then remove the third row and the third column to obtain a 3-by-3 matrix.
Obtain the Coriolis matrix symbolically using M and the gravity vector. Remember to ignore the gravity vector component corresponding to joint 3.
Verify the skew-symmetry property by symbolic differentiation of M.
Inspect each one of the 6 distinct entries of M to identify Θ parameters. Suggested procedure:Display M(1,1) and copy-paste its constant portion, assigning it to Θ1. Remove this parameter from M(1,1) to obtain a shorter expression.
Look at the kinds of terms showing in M(1,1), for instance cos(2q2 + q4), sin(q2), etc. Use subs as follows:
>> syms c24; term=subs(M(1,1),cos(2*q2+q4), c24); coeff=diff(term,c24)

This puts a placeholder c24 and allows you to extract its coefficient by taking the partial derivative. This coefficient will be a Θ parameter.

Shorten M(1,1) further by removing the identified coefficient times the corresponding trig function.
This procedure will eventually cover all entries of M, but it will take a few hours of focused work.
Without scanning for linearly-dependent Θ parameters, the instructor found that 19 parameters werenecessary to describe M. (there was one obviously repeated parameter).
Identify a few more parameters for the gravity vector. In all, the instructor found 25 parameters. Howmany fundamental parameters (individual masses, lengths, etc) were initially present?
Obtain the Coriolis matrix in Θ form.
Verify that the parameterization works by evaluating Mq¨+Cq˙+g with the non-parameterized matrices and the Θ forms, as done in class.
Obtain the regressor Y (q,q,˙ q¨) by partial differentiation of Mq¨+Cq˙ +g in parameter form, as done in class.
Code a state derivative function for use in Simulink that returns the state derivatives of the robot dynamics. Numerical values are involved at this point, not earlier. It is recommended to use the parameter form of the dynamic matrices in this code (it is more compact). The state derivative function can receive the numerical Θ vector as a parameter from a Simulink constant block.
Simulate the joint motion that results when the applied torques are all equal to sin(t). Simulate for 5 seconds.
Extra points question: setting all initial angles to zero (robot upright) and all initial velocities to zeroresults in a nonzero initial acceleration for joint 1. How is this possible? - Explain fully.

More products