Anda di halaman 1dari 11

3

Task-2 (P3-2, M1)


a) Dynamic equation of a robot is given bellow.


x, y, z are joint angular acceleration, joint angular velocity, and joint angular displacement
respectively. In an experiment three sets of values have been identified for (M, C, K, and F) as
(1.5, 2, 3, 3.2), (1.6, 3, 1.7, 4.1), (1.4, 1.2, 2.3, 4.3). Obtain the system of dynamic equations.
Convert the equations into matrix form, and solve them using Gaussian elimination.
Clearly show the step-by-step calculations.
x y z
x y z
x y z




Applying Gaussian elimination method:
The augmented matrix for the system can be written as follows:


Lets multiply the 1
st
row from 16/15 and subtract that from the second row,



Then the augmented matrix can be written as:
Augmented matrix



Lets multiply the 1
st
row from 14/15 and subtract that from the third row,



Then the augmented matrix can be written as:



Lets multiply the 2nd row from -10/3 and subtract that from the third row,



Finally the augmented matrix can be written as follows:



Now the unknowns can be easily solved:



x y z
x






7

b) Matrix A and B are given below














i) What are the dimensions of A and B?















ii) What is the condition to define the multiplication of two matrices?

In order to perform matrix multiplication, the number of columns in the first matrix should be
equal to the number of rows in the second matrix.
Ex:





iii) Find AB and BA if they can be defined (Carry out the multiplication manually).









































8

iv) Use Matlab software to define above multiplications.
Matlab codes are results returned are:
>> A=[1 5 8 6; 10 8 7 3; 14 1 11 4]
A =
1 5 8 6
10 8 7 3
14 1 11 4

>> B=[2 21 16; 9 6 12; 11 1 0]
B =
2 21 16
9 6 12
11 1 0

>> C=A*B
??? Error using ==> mtimes
Inner matrix dimensions must agree.
>> D= B*A
D =
436 194 339 139
237 105 246 120
21 63 95 69
Hecne we get,
C













9

B






















v) Obtain the transpose of A (A
T
) on the Matlab command window.
Matlab codes are results are:
>> E=A'
E =
1 10 14
5 8 1
8 7 11
6 3 4
Hence we get,

E
















10

vi) Matrices P and Q are obtained by selecting the first three columns of A as P and the last
two columns of A as Q. In Matlab, define P and Q using A and obtain the two matrices P
and Q on the command window.
Matlab codes and results are:


>> P=A(1:3,1:3)

P =

1 5 8
10 8 7
14 1 11

>> Q=A(1:3,3:4)

Q =

8 6
7 3
11 4

Hence we get,












11

vii) Find the inverse of P (P
-1
) and Q (Q
-1
) manually if they can be defined and verify your
answer using Matlab.














P
















P

P






auj P








cannot be defined because inverse of a matrix can be obtained only for a square
matrix (i.e. matrices with dimension ) and in this situation
dimensions of Q is ( )

12

Matlab codes and results are:


>> inv(P)

ans =

-0.1019 0.0591 0.0365
0.0151 0.127 -0.0918
0.1283 -0.0868 0.0528


>> inv(Q)

??? Error using ==> mpower
Matrix must be square.

Hence we get,

invP



invQ





13

viii) Find | P | manually and verify the answer using Matlab.

P


















Matlab codes and results are:

>> det(P)

ans =

-795
Hence we get,
uetP

Anda mungkin juga menyukai