Kinematics, Dynamics, and Controls (KDC)
Homework 2

 

General Comments:

 

 

The continuous dynamic equations, , are the “forward dynamics” found by either deriving equations of motion or using a dynamics package that does it for you (ODE).

 

We can get the discrete dynamics using a simple euler approximation:

 

 

Now linearizing the system involves finding the matrices in the equation:

 

 

Here is the pseudo-matlab-code that finds the two matrices.  Note that you are linearizing about , where these values may not be zero, depending on your model.

 

N = # of states;

M = # of inputes;

X0 = state you are linearizing about;

U0 = torques required to produce (inverse dynamics);

 

delta = small number;

 

%% Find A matrix

for i=1:N

X=X0;

X(i)=X(i)+delta;           %% perturb state i by delta

X1 = fD(X,U0);

A(:,i) = (X1-X0)/delta;

end

 

%% Find B matrix

for i=1:M

U=U0;

U(i)=U(i)+delta;           %% perturb action i by delta

X1 = fD(X0,U);

B(:,i) = (X1-X0)/delta;

end

 

Grading Comments:

 

There was a wider range of grades for this homework.  Generally, either people got it or they didn’t.  There 3 parts to assignment: 1) simulator, 2) LQR balance, 3) walking.  If you were unable to accomplish one of these tasks, your grade reflected it.

 

I really want to emphasize that if you are lost or having significant trouble with the homework, please contact me or Chris and we can guide you in a constructive direction.

 

Highlights: