Starting from:

$25.99

MCE747- Homework 6 Solved

1: Robust Passivity-Based Tracking Control of the WAM Model
The objective is to implement and tune an RPBC tracking controller for joints 1,2 and 4 of the WAM robot by simulation, with joint 3 fixed at zero. Procedure:

Use the minimal parameter vector and regressor identified in HW5. A complete set ofparameterized matrices, the regressor and the parameter vector are contained in m-file
WAM124Ytheta.m attached to this homework.

The inertial parameters of the diagonal elements of M have to be adjusted to include the reflected inertia of the motors and gears. This has been already done in the m-file. Also, since the model of the previous homework did not consider friction, the following columns and corresponding parameters must be appended to the regressor:

Use the nominal parameter values declared in the supplied m-file to obtain the numerical value of the nominal Θ (25 entries).
Initially tune the controller to track the following reference trajectories:
 
=
sin(wt)
 
=
−0.5 + sin(wt)
 
=
0.75sin(wt)
Use initial conditions that match the desired trajectories at t = 0. Once the controller is running, test for convergence for q(0) =6 qd(0).

Apply a random perturbation to the nominal Θ, leaving the value used by the controllerthe same. Re-tune and observe the increment in chattering levels. Document the results.
2: Optimal Trajectories for Parameter Estimation
The goal is to find reference trajectories that optimize the numerical conditioning of the regressor for identification purposes, as discussed in class. Use the following objective function:

where N is the number of data points. As constraints, use the maximum and minimum values for the joint positions, velocities and Cartesian velocities shown in Table 1 where i = 1,2,4, e denotes the end plate position (910 mm along the z3 axis) and p denotes the Variable  Min Value       Max Value  Units

q1 -1 1 rad q2 -1 1 rad q4 -0.5 2 rad q˙i -1 1 rad/s ve -0.5 0.5 m/s vp -0.5 0.5 m/s

Table 1: Position and Velocity Constraints

elbow (origin of frame 3).

Optimize over the coefficients of Fourier expansions for qi, i = 1,2,4.

Use Nf = 4. With this, you have a total of 12 a coefficients and 12 b coefficients. Procedure:

Code a function that returns the extended regressor (including the 4 columns associated with friction) given N-by-1 vectors with qi(t), ˙qi(t) and ¨qi(t). The returned regressor will have 3N rows and as many columns as the parameter vector (it’s a stack of regressors evaluated at all time instants).
Code for the objective function. It receives a candidate vector [a b], parameters w, N, λ1, λ2 and a time vector. The time vector to be used is [0:0.1:10]. The function evaluates qi(t), ˙qi(t) and ¨qi(t) and the 3-row regressor at each time point.
The condition number to be used is the sum of the condition numbers of every time instance of the 3-row regressor. The same for the minimum singuar value.

Code for the constraints function. It receives the same arguments as the objective function. It evaluates qi(t), ˙qi(t) and ¨qi(t). From there, it calculates ve and vp at each time point. With this information, it finds the minimum and maximum values from the data a forms an inequality constraint output (negative when constraints are satisfied).
Call fmincon with the following options:
options=optimptions(’fmincon’,’Display’,’iter’,’MaxFunctionEvaluations’,10000, ’OptimalityTolerance’,1e-11,’StepTolerance’,1e-11,’MaxIterations’,10000); Use a random guess for [a b] and take λ1 = 1 and λ2 = 10.

Show the resulting trajectories and verify that they comply with the constraints.
Tune the controller to follow these trajectories.

More products