Modelling and Simulation of Mechatronic Systems 02PCYQW Examples - - PDF document

modelling and simulation of mechatronic systems 02pcyqw
SMART_READER_LITE
LIVE PREVIEW

Modelling and Simulation of Mechatronic Systems 02PCYQW Examples - - PDF document

Modelling and Simulation of Mechatronic Systems 02PCYQW Examples Matrix Calculus Basilio Bona Politecnico di Torino October 20, 2016 1 Matrix Calculus Example 1. Given the matrix 3 1 4 M = 6 5 12 31


slide-1
SLIDE 1

Modelling and Simulation of Mechatronic Systems 02PCYQW Examples Matrix Calculus

Basilio Bona – Politecnico di Torino October 20, 2016

1 Matrix Calculus

Example 1. Given the matrix M =   3 −1 4 −6 5 −12 31 −17 14   compute the determinant D = det M , the trace T = tr M , the inverse matrix M −1, the transpose matrix M T. Solution: D = −326 T = 22 M −1 =   0.4110 0.1656 0.0245 0.8834 0.2515 −0.0368 0.1626 −0.0613 −0.0276   M T =   3 −6 31 −1 5 −17 4 −12 14   Example 2. Given the matrix A A = 2 12 4 3 −1 7

  • compute AAT and ATA and notice that they are square and symmetric (this is a general

rule, always valid for these matrix products). 1

slide-2
SLIDE 2

Solution: ATA =   13 21 29 21 145 41 29 41 65   AAT = 164 22 22 59

  • The rank of AAT is equal to 2, and also the rank of ATA is equal to 2, i.e., the rank of

both product matrices in not larger than the rank of the original A. Example 3. Given the square matrix M of Example 1, compute its decomposition M = M s + M ss and the vector v associated to the skew-symmetric matrix M ss Solution: M s = 1 2(M + M T) =   3.0 −3.5 17.5 −3.5 5.0 −14.5 17.5 14.5 14.0   M ss = 1 2(M − M T) =   2.5 −13.5 −2.5 2.5 13.5 −2.5   v =   −2.5 −13.5 −2.5   Example 4. Given the following two matrices A and B A =   0.3473 −0.6016 −0.7193 0.5702 0.7445 −0.3473 0.7445 −0.2895 0.6016   B =   0.3473 0.6016 −0.7193 0.5702 −0.7445 −0.3473 0.7445 0.2895 0.6016   find which one is a rotation matrix and which one is a reflection matrix. Solution: Both products ATA and BB T give an identity matrix, so it is necessary to compute the determinant, det(A) = 1, while det(B) = −1 so B is the reflection matrix. Now, if one performs two successive reflections, that corre- spond to the product BB = B2, the resulting matrix has determinant equal to 1, that is, a rotation. 2

slide-3
SLIDE 3

Example 5. Recalling the identity that defines a skew-symmetric matrix S S 2(v) = vv T − v2 I use the vector of Example ?? to generate the matrix S and confirm that the vector em- bedded in S is indeed v. Solution: vv T − v2 I =   1 2 3 2 4 6 3 6 9   − 14   1 1 1   =   −13 2 3 2 −10 6 3 6 −5   Since the generic second power of a skew-symmetric matrix is   −Z Y Z −X −Y X     −Z Y Z −X −Y X   =   −(Z2 + Y 2) XY XZ XY −(Z2 + X2) Y Z XZ Y Z −(Y 2 + X2)  

  • ne can see that

v =   X = 1 Y = 2 Z = 3   satisfies the relation. Example 6. Given two skew-symmetric matrices S 1, S 2 S 1(v) =   2 −1 −2 −1   S 2(w) =   −1 2 1 −2   compute the commutator matrix S comm = [S 1, S 2] Solution: Since [S 1, S 2] = S 1S 2 − S 2S 1

  • ne obtains

S comm(z) = [S 1, S 2] =   −4 2 1 2 −4   −   −4 2 1 2 −4   =   −2 −1 2 −2 1 2   3

slide-4
SLIDE 4

with z =   2 −1 2   4