## MATLAB Assignment 5

### Re: MATLAB Assignment 5

F11Jonathan wrote:How should we post the data on the forum for problems 2-5? Should we post all 500 saved datapoints for each computed quantity?

No, don't do that, in fact you can't do that since you don't know how to solve the nonlinear systems, etc.

Please report the required information only in the initial configuration, at t=0.

You will have to evaluate \Phi(q,t) at q0 and t0. Then you will have to evaluate \Phiq(q0,t0), and then \nu at q0 and t0, etc.

So post these numbers and arrays, they are only for one configuration.

I hope this helps.

Dan

### Re: MATLAB Assignment 5

Thanks for the suggestion, I found the error.

Constraint_1Phi= 0

Constraint_1Phi_q = [1; 0; 0]

Constraint_1Nu = 0

Constraint_1Gamma = 0

Constraint_2Phi =0

Constraint_2Phi_q = [0; 1; -2]

Constraint_2Nu = 0

Constraint_2Gamma = 0

Constraint_5Phi =0

Constraint_5Phi_q = [0; 1; 0]

Constraint_5Nu = 0

Constraint_5Gamma = 0

Constraint_6Phi =0

Constraint_6Phi_q = [0; 0; 1]

Constraint_6Nu = 0

Constraint_6Gamma = 0

Constraint_7Phi =0

Constraint_7Phi_q = [0; 0; 1]

Constraint_7Nu = 0

Constraint_7Gamma = 2

Constraint_3Phi =[0;0]

Constraint_3Phi_qi=[1 0 2;0 1 0]

Constraint_3Phi_qj=[1 0 -3;0 1 0]

Constraint_3Nu=[0;0]

Constraint_3Gamma=[0;0]

Constraint_4Phi =[0;0]

Constraint_4Phi_qi=[1 0 3;0 1 0]

Constraint_4Phi_qj=[1 0 0;0 1 0]

Constraint_4Nu=[0;0]

Constraint_4Gamma=[0;0]

Constraint_1Phi= 0

Constraint_1Phi_q = [1; 0; 0]

Constraint_1Nu = 0

Constraint_1Gamma = 0

Constraint_2Phi =0

Constraint_2Phi_q = [0; 1; -2]

Constraint_2Nu = 0

Constraint_2Gamma = 0

Constraint_5Phi =0

Constraint_5Phi_q = [0; 1; 0]

Constraint_5Nu = 0

Constraint_5Gamma = 0

Constraint_6Phi =0

Constraint_6Phi_q = [0; 0; 1]

Constraint_6Nu = 0

Constraint_6Gamma = 0

Constraint_7Phi =0

Constraint_7Phi_q = [0; 0; 1]

Constraint_7Nu = 0

Constraint_7Gamma = 2

Constraint_3Phi =[0;0]

Constraint_3Phi_qi=[1 0 2;0 1 0]

Constraint_3Phi_qj=[1 0 -3;0 1 0]

Constraint_3Nu=[0;0]

Constraint_3Gamma=[0;0]

Constraint_4Phi =[0;0]

Constraint_4Phi_qi=[1 0 3;0 1 0]

Constraint_4Phi_qj=[1 0 0;0 1 0]

Constraint_4Nu=[0;0]

Constraint_4Gamma=[0;0]

### Re: MATLAB Assignment 5

All of mine and Wendy's answers agree i just combined the qi and qj into one jacobian for the revolute joints

Constraint 1: Absolute X

Phi = 0

Phi_q = [1 0 0]

Nu = 0

Gamma = 0

Constraint 2: Absolute Y

Phi = 0

Phi_q = [0 1 -2]

Nu = 0

Gamma = 0

Constraint 5: Absolute Y

Phi = 0

Phi_q = [0 1 0]

Nu = 0

Gamma = 0

Constraint 6: Absolute A

Phi = 0

Phi_q = [0 0 1]

Nu = 0

Gamma = 0

Constraint 7: Absolute A

Phi = 0

Phi_q = [0 0 1]

Nu = 0

Gamma = 0

Constraint 3: Revolute Joint

Phi = [0 0]’

Phi_q = [[1 0 0 -1 0 0];[0 1 2 0 -1 3]]

Nu = 0

Gamma = [0 0]’

Constraint 4: Revolute Joint

Phi = [0 0]’

Phi_q = [[1 0 0 -1 0 0];[0 1 3 0 -1 0]]

Nu = 0

Gamma = [0 0]’

Constraint 1: Absolute X

Phi = 0

Phi_q = [1 0 0]

Nu = 0

Gamma = 0

Constraint 2: Absolute Y

Phi = 0

Phi_q = [0 1 -2]

Nu = 0

Gamma = 0

Constraint 5: Absolute Y

Phi = 0

Phi_q = [0 1 0]

Nu = 0

Gamma = 0

Constraint 6: Absolute A

Phi = 0

Phi_q = [0 0 1]

Nu = 0

Gamma = 0

Constraint 7: Absolute A

Phi = 0

Phi_q = [0 0 1]

Nu = 0

Gamma = 0

Constraint 3: Revolute Joint

Phi = [0 0]’

Phi_q = [[1 0 0 -1 0 0];[0 1 2 0 -1 3]]

Nu = 0

Gamma = [0 0]’

Constraint 4: Revolute Joint

Phi = [0 0]’

Phi_q = [[1 0 0 -1 0 0];[0 1 3 0 -1 0]]

Nu = 0

Gamma = [0 0]’

### Re: MATLAB Assignment 5

It would seem that answers differ for the Gamma value for constraint 7. I think that the -Phi_tt term in the gamma equation would cause gamma to equal cdDotHandle(t) for this problem, but does anyone else have thoughts on the matter?

Constraint1_Phi =

0

Constraint1_Phi_q =

1 0 0

Constriant1_Nu =

0

Constraint1_Gamma =

0

Constraint2_Phi =

0

Constraint2_Phi_q =

0 1 -2

Constriant2_Nu =

0

Constraint2_Gamma =

0

Constraint5_Phi =

0

Constraint5_Phi_q =

0 1 0

Constriant5_Nu =

0

Constraint5_Gamma =

0

Constraint6_Phi =

0

Constraint6_Phi_q =

0 0 1

Constriant6_Nu =

0

Constraint6_Gamma =

0

Constraint7_Phi =

0

Constraint7_Phi_q =

0 0 1

Constriant7_Nu =

0

Constraint7_Gamma =

-2

Constraint3_Phi =

0

0

Constraint3_Phi_qi =

1 0 0

0 1 2

Constraint3_Phi_qj =

-1 0 0

0 -1 3

Constriant3_Nu =

0

Constraint3_Gamma =

0

0

Constraint4_Phi =

0

0

Constraint4_Phi_qi =

1 0 0

0 1 3

Constraint4_Phi_qj =

-1 0 0

0 -1 0

Constriant4_Nu =

0

Constraint4_Gamma =

0

0

Elapsed time is 0.239710 seconds.

Constraint1_Phi =

0

Constraint1_Phi_q =

1 0 0

Constriant1_Nu =

0

Constraint1_Gamma =

0

Constraint2_Phi =

0

Constraint2_Phi_q =

0 1 -2

Constriant2_Nu =

0

Constraint2_Gamma =

0

Constraint5_Phi =

0

Constraint5_Phi_q =

0 1 0

Constriant5_Nu =

0

Constraint5_Gamma =

0

Constraint6_Phi =

0

Constraint6_Phi_q =

0 0 1

Constriant6_Nu =

0

Constraint6_Gamma =

0

Constraint7_Phi =

0

Constraint7_Phi_q =

0 0 1

Constriant7_Nu =

0

Constraint7_Gamma =

-2

Constraint3_Phi =

0

0

Constraint3_Phi_qi =

1 0 0

0 1 2

Constraint3_Phi_qj =

-1 0 0

0 -1 3

Constriant3_Nu =

0

Constraint3_Gamma =

0

0

Constraint4_Phi =

0

0

Constraint4_Phi_qi =

1 0 0

0 1 3

Constraint4_Phi_qj =

-1 0 0

0 -1 0

Constriant4_Nu =

0

Constraint4_Gamma =

0

0

Elapsed time is 0.239710 seconds.

### Re: MATLAB Assignment 5

Phi_1= 0

Phi_q_1 = [1; 0; 0]

Nu_1 = 0

Gamma_1 = 0

Phi_2 =0

Phi_q_2 = [0; 1; -2]

Nu_2 = 0

Gamma_2 = 0

Phi_5 =0

Phi_q_5 = [0; 1; 3]

Nu_5 = 0

Gamma_5 = 0

Phi_6 =0

Phi_q_6 = [0; 0; 1]

Nu_6 = 0

Gamma_6 = 0

Phi_7 =0

Phi_q_7 = [0; 0; 1]

Nu_7 = 0

Gamma _7= 2

Phi_3 =[0;0]

Phi_qi_3=[1 0 0;0 1 2]

Phi_qj_3=[-1 0 0;0 -1 3]

Nu_3=0

Gamma_3=[0;0]

Phi_4 =[0;0]

Phi_qi_4=[1 0 0;0 1 3]

Phi_qj_4=[-1 0 0;0 -1 0]

Nu_4=0

Gamma_4=[0;0]

Jonathan and my answers agree except for the '3' in the Phi_q_5. I believe the difference arises in that I constrained the point on body 2 two have a constant I where as Jonathan must have constrained the point on body 3 to have a constant y value. This should not make a difference as these points are connected by a revolute joint. Should there than be some other difference to account for this?

Phi_q_1 = [1; 0; 0]

Nu_1 = 0

Gamma_1 = 0

Phi_2 =0

Phi_q_2 = [0; 1; -2]

Nu_2 = 0

Gamma_2 = 0

Phi_5 =0

Phi_q_5 = [0; 1; 3]

Nu_5 = 0

Gamma_5 = 0

Phi_6 =0

Phi_q_6 = [0; 0; 1]

Nu_6 = 0

Gamma_6 = 0

Phi_7 =0

Phi_q_7 = [0; 0; 1]

Nu_7 = 0

Gamma _7= 2

Phi_3 =[0;0]

Phi_qi_3=[1 0 0;0 1 2]

Phi_qj_3=[-1 0 0;0 -1 3]

Nu_3=0

Gamma_3=[0;0]

Phi_4 =[0;0]

Phi_qi_4=[1 0 0;0 1 3]

Phi_qj_4=[-1 0 0;0 -1 0]

Nu_4=0

Gamma_4=[0;0]

Jonathan and my answers agree except for the '3' in the Phi_q_5. I believe the difference arises in that I constrained the point on body 2 two have a constant I where as Jonathan must have constrained the point on body 3 to have a constant y value. This should not make a difference as these points are connected by a revolute joint. Should there than be some other difference to account for this?

### Re: MATLAB Assignment 5

Absoulte X_1

Phi = 0

Phi_q = 1 0 0

Nu = 0

Gamma = 0

Absoulte Y_1

Phi = 0

Phi_q = 0 1 -2

Nu = 0

Gamma = 0

AbsoluteAngle_1 (Driving Constraint)

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

Revolute(1,2)

Phi = 0;0

Phi_qi = 1 0 0; 0 1 2

Phi_qj = -1 0 0; 0 -1 3

Nu = 0

Gamma = 0;0

Absolute Y_3

Phi = 0

Phi_q = 0 1 0

Nu = 0

Gamma = 0

Revolute(2,3)

Phi = 0 0

Phi_qi = 1 0 0; 0 1 3

Phi_qj = -1 0 0; 0 -1 0

Nu = 0

Gamma = 0;0

AbsoluteAngle_3

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 1 0 0

Nu = 0

Gamma = 0

Absoulte Y_1

Phi = 0

Phi_q = 0 1 -2

Nu = 0

Gamma = 0

AbsoluteAngle_1 (Driving Constraint)

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

Revolute(1,2)

Phi = 0;0

Phi_qi = 1 0 0; 0 1 2

Phi_qj = -1 0 0; 0 -1 3

Nu = 0

Gamma = 0;0

Absolute Y_3

Phi = 0

Phi_q = 0 1 0

Nu = 0

Gamma = 0

Revolute(2,3)

Phi = 0 0

Phi_qi = 1 0 0; 0 1 3

Phi_qj = -1 0 0; 0 -1 0

Nu = 0

Gamma = 0;0

AbsoluteAngle_3

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

### Re: MATLAB Assignment 5

const_1:AbsoluteX

myPhi=0

myPhi_q=[1 0 0]'

myNu=0

myGamma=0

const_2:AbsoluteY

myPhi= 0

myPhi_q= [0 1 -2]'

myNu=0

myGamma=0

const_3:

myPhi=[-3 0]

myPhi_q=[ 1 0 0 -1 0 0;0 1 2 0 -1 3]

myNu=[0 0]'

myGamma=[0 0]'

const_4:

myPhi=[0 0]'

myPhi_q=[1 0 0 -1 0 0;0 1 3 0 -1 0]

myNu=[0 0]'

myGamma=[0 0]'

const_5:AbsoluteY

myPhi=0

myPhi_q=[0 1 3]'

myNu=0

myGamma=0

const_6:AbsoluteAngle

myPhi=0

myPhi_q=[0 0 1]'

myNu=0

myGamma=0

const_7:AbsoluteAngle

myPhi=0

myPhi_q=[0 0 1]'

myNu=0

myGamma=2

myPhi=0

myPhi_q=[1 0 0]'

myNu=0

myGamma=0

const_2:AbsoluteY

myPhi= 0

myPhi_q= [0 1 -2]'

myNu=0

myGamma=0

const_3:

myPhi=[-3 0]

myPhi_q=[ 1 0 0 -1 0 0;0 1 2 0 -1 3]

myNu=[0 0]'

myGamma=[0 0]'

const_4:

myPhi=[0 0]'

myPhi_q=[1 0 0 -1 0 0;0 1 3 0 -1 0]

myNu=[0 0]'

myGamma=[0 0]'

const_5:AbsoluteY

myPhi=0

myPhi_q=[0 1 3]'

myNu=0

myGamma=0

const_6:AbsoluteAngle

myPhi=0

myPhi_q=[0 0 1]'

myNu=0

myGamma=0

const_7:AbsoluteAngle

myPhi=0

myPhi_q=[0 0 1]'

myNu=0

myGamma=2

### Re: MATLAB Assignment 5

constraint 1:

phi = 0

phi_q = [1 0 0]

nu = 0

gamma = 0

constraint 2:

phi = 0

phi_q = [0 1 -2]

nu = 0

gamma = 0

constraint 3:

phi = [0;0]

phi_q_i = [1 0 0; 0 1 2]

phi_q_j = [-1 0 0; 0 -1 3]

nu = [0;0;0]

gamma = [0;0;0]

constraint 4:

phi = [0;0]

phi_q_i = [1 0 0; 0 1 3]

phi_q_j = [-1 0 0; 0 -1 0]

nu = [0;0;0]

gamma = [0;0;0]

constraint 5:

phi = 0

phi_q = [0 1 0]

nu = 0

gamma = 0

constraint 6:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

constraint 7:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

Does anyone else get some sort of photoshop files showing up where they save their matlab stuff? They have the same name as my matlab functions, and I'm afraid to delete them because I don't know why they're there.

phi = 0

phi_q = [1 0 0]

nu = 0

gamma = 0

constraint 2:

phi = 0

phi_q = [0 1 -2]

nu = 0

gamma = 0

constraint 3:

phi = [0;0]

phi_q_i = [1 0 0; 0 1 2]

phi_q_j = [-1 0 0; 0 -1 3]

nu = [0;0;0]

gamma = [0;0;0]

constraint 4:

phi = [0;0]

phi_q_i = [1 0 0; 0 1 3]

phi_q_j = [-1 0 0; 0 -1 0]

nu = [0;0;0]

gamma = [0;0;0]

constraint 5:

phi = 0

phi_q = [0 1 0]

nu = 0

gamma = 0

constraint 6:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

constraint 7:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

Does anyone else get some sort of photoshop files showing up where they save their matlab stuff? They have the same name as my matlab functions, and I'm afraid to delete them because I don't know why they're there.

### Re: MATLAB Assignment 5

constraint: 1

phi=0

phi_q=[1 0 0]

nu=0

gamma=0

constarint: 2

phi=0

phi_q=[0 1 -2]

nu=0

gamma=0

constraint: 3

phi=[0 0]

phi_qi=[1 0 0; 0 1 2]

phi-qj=[-1 0 0; 0 -1 3]

nu=[0;0]

gamma=[0;0]

constraint: 4

phi=[0;0]

phi_qi=[1 0 0; 0 1 3]

phi_qj=[-1 0 0;0 -1 0]

nu=[0;0]

gamma=[0;0]

constraint: 5

phi=0

phi_q=[0;1;0]

nu=0

gamma=0

constraint: 6

phi=0

phi_q=[0;0;1]

nu=0

gamma=0

constraint: 7

phi=0

phi_q=[0;0;1]

nu=0

gamma=0

phi=0

phi_q=[1 0 0]

nu=0

gamma=0

constarint: 2

phi=0

phi_q=[0 1 -2]

nu=0

gamma=0

constraint: 3

phi=[0 0]

phi_qi=[1 0 0; 0 1 2]

phi-qj=[-1 0 0; 0 -1 3]

nu=[0;0]

gamma=[0;0]

constraint: 4

phi=[0;0]

phi_qi=[1 0 0; 0 1 3]

phi_qj=[-1 0 0;0 -1 0]

nu=[0;0]

gamma=[0;0]

constraint: 5

phi=0

phi_q=[0;1;0]

nu=0

gamma=0

constraint: 6

phi=0

phi_q=[0;0;1]

nu=0

gamma=0

constraint: 7

phi=0

phi_q=[0;0;1]

nu=0

gamma=0

### Re: MATLAB Assignment 5

Phi = 0

Phi_q = 1 0 0

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 1 -2

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 1 0

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

Phi = 0 0

Phi_qi = 1 0 0

0 1 2

Phi_qj = -1 0 0

0 1 0

Nu = 0

Gamma = 0

0

Phi =

8 0

Phi_qi =

1 0 0

0 1 2

Phi_qj =

-1 0 0

0 1 0

Nu =

0

Gamma =

0

0

Phi = 8 0

Phi_qi = 1 0 0

0 1 2

Phi_qj = -1 0 0

0 1 0

Nu = 0

Gamma = 0

0

Phi_q = 1 0 0

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 1 -2

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 1 0

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

Phi = 0

Phi_q = 0 0 1

Nu = 0

Gamma = 0

Phi = 0 0

Phi_qi = 1 0 0

0 1 2

Phi_qj = -1 0 0

0 1 0

Nu = 0

Gamma = 0

0

Phi =

8 0

Phi_qi =

1 0 0

0 1 2

Phi_qj =

-1 0 0

0 1 0

Nu =

0

Gamma =

0

0

Phi = 8 0

Phi_qi = 1 0 0

0 1 2

Phi_qj = -1 0 0

0 1 0

Nu = 0

Gamma = 0

0

### Re: MATLAB Assignment 5

absX1

myPhi = 0

myPhi_q =

1

0

0

myNu = 0

myGamma = 0

absy2

myPhi= 0

myPhi_q =

0

1

-2

myNu = 0

myGamma = 0

absy5

myPhi = 0

myPhi_q =

0

1

0

myNu = 0

myGamma = 0

absa6

myPhi = 0

myPhi_q =

0

0

1

myNu = 0

myGamma = 0

absa7

myPhi = 0

myPhi_q =

0

0

1

myNu = 0

myGamma = 2

rev3

myPhi =

-6 -7

myPhi_qi =

1 0 0

0 1 2

myPhi_qj =

-1 0 0

0 -1 3

myNu = 0

myGamma = 0

rev4

myPhi =

0 -10

myPhi_qi =

1 0 0

0 1 3

myPhi_qj =

-1 0 0

0 -1 0

myNu = 0

myGamma = 0

myPhi = 0

myPhi_q =

1

0

0

myNu = 0

myGamma = 0

absy2

myPhi= 0

myPhi_q =

0

1

-2

myNu = 0

myGamma = 0

absy5

myPhi = 0

myPhi_q =

0

1

0

myNu = 0

myGamma = 0

absa6

myPhi = 0

myPhi_q =

0

0

1

myNu = 0

myGamma = 0

absa7

myPhi = 0

myPhi_q =

0

0

1

myNu = 0

myGamma = 2

rev3

myPhi =

-6 -7

myPhi_qi =

1 0 0

0 1 2

myPhi_qj =

-1 0 0

0 -1 3

myNu = 0

myGamma = 0

rev4

myPhi =

0 -10

myPhi_qi =

1 0 0

0 1 3

myPhi_qj =

-1 0 0

0 -1 0

myNu = 0

myGamma = 0

### Re: MATLAB Assignment 5

constraint 1:

phi = 0

phi_q = [1 0 0]

nu = 0

gamma = 0

constraint 2:

phi = 0

phi_q = [0 1 -2]

nu = 0

gamma = 0

constraint 3:

phi = [0;0]

phi_q_i = [1 0 3

0 1 2]

phi_q_j = [-1 0 2

0 -1 3]

nu = 0

gamma = [0

0]

constraint 4:

phi = [0;0]

phi_q_i = [1 0 0

0 1 3]

phi_q_j = [-1 0 3

0 -1 0]

nu = 0

gamma = [0

0]

constraint 5:

phi = 0

phi_q = [0 1 0]

nu = 0

gamma = 0

constraint 6:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

constraint 7:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

phi = 0

phi_q = [1 0 0]

nu = 0

gamma = 0

constraint 2:

phi = 0

phi_q = [0 1 -2]

nu = 0

gamma = 0

constraint 3:

phi = [0;0]

phi_q_i = [1 0 3

0 1 2]

phi_q_j = [-1 0 2

0 -1 3]

nu = 0

gamma = [0

0]

constraint 4:

phi = [0;0]

phi_q_i = [1 0 0

0 1 3]

phi_q_j = [-1 0 3

0 -1 0]

nu = 0

gamma = [0

0]

constraint 5:

phi = 0

phi_q = [0 1 0]

nu = 0

gamma = 0

constraint 6:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

constraint 7:

phi = 0

phi_q = [0 0 1]

nu = 0

gamma = 0

13 posts
• Page

**1**of**1**Return to ME451 Fall 2011: Kinematics and Dynamics of Machine Systems

### Who is online

Users browsing this forum: No registered users and 1 guest