Vietnam Journal of Mechanics, VAST, Vol 41, No (2019), pp 337 – 348 DOI: https://doi.org/10.15625/0866-7136/14196 TAYLOR EXPANSION FOR MATRIX FUNCTIONS OF VECTOR VARIABLE USING THE KRONECKER PRODUCT Nguyen Van Khang1,∗ , Dinh Cong Dat1,2 , Nguyen Thai Minh Tuan1 Hanoi University of Science and Technology, Vietnam Hanoi University of Mining and Geology, Vietnam ∗ E-mail: khang.nguyenvan2@hust.edu.vn Received: 11 August 2019 / Published online: 07 November 2019 Abstract Taylor expansion is one of the many mathematical tools that is applied in Mechanics and Engineering In this paper, using the partial derivative of a matrix with respect to a vector and the Kronecker product, the formulae of Taylor series of vector variable for scalar functions, vector functions and matrix functions are built and demonstrated An example regarding the linearization of the differential equations of an elastic manipulator is presented using Taylor expansion Keywords: Taylor expansion, Kronecker product, the partial derivative of a matrix with respect to a vector, elastic manipulator, linearization INTRODUCTION Taylor expansion is one of the many mathematical tools that is applied in Mechanics and Engineering [1–4] Taylor series for multivariate scalar functions has been well documented in mathematics textbooks [5] Recently, the partial derivatives with respect to a vector variable of vector functions and matrix functions using the Kronecker product have been studied [6,7] This type of derivative has been used in dynamics of multi-body systems [8–11] In the field of dynamics of many elastic objects, equations of motion have very complex forms The simplification of these complex equations is essential On the other hand, it is also desirable to get the solutions quickly and handily for the applications in optimum design, real-time control or optimal control Therefore, in many cases the solutions of nonlinear partial differential equations are not desired directly; instead, appropriate techniques are used to convert them into more suitable forms which not only still adequately describe the important characteristics of the true systems but also are easier to deal with One of these techniques is the Taylor expansion However, applying common Taylor expansion formula for scalar functions of one or many scalar variables to the problems of multi-body systems where matrix functions of vector variables are widely used, one witnesses the inconvenience of cumbersome formulations c 2019 Vietnam Academy of Science and Technology 338 Nguyen Van Khang, Dinh Cong Dat, Nguyen Thai Minh Tuan In this paper, using the definition on partial derivative of a matrix with respect to a vector and Kronecker product [7–9], the formulae of Taylor expansion according to a vector x for scalar functions, vector functions and matrix functions will be built and demonstrated An applied example regarding the linearization of the differential equations of an elastic manipulator will be presented SOME DEFINITIONS AND PROPERTIES: A REVIEW 2.1 Single variable Taylor series Let f ( x ) be an infinitely differentiable function in some open interval around x = x0 Then the Taylor expansion of f ( x ) at x0 is [5] n f ( x ) = f ( x0 ) + ∑ k =1 f ( k ) ( x0 ) ( x − x ) k + O ( x − x ) n +1 , k! (1) where O ( x − x0 )n+1 is the remainder 2.2 The Kronecker product and the Kronecker exponentiation Definition Let A = [ aij ] ∈ Rm×n , B = [bij ] and B is defined as the matrix [6] a11 B a12 B a21 B a22 B A ⊗ B = am1 B am2 B ∈ Rr×s Then, the Kronecker product of A a1n B a2n B ∈ Rmr×ns (2) amn B Some properties of Kronecker products [6–10] (A ⊗ B) ⊗ C = A ⊗ (B ⊗ C) , (3) (A ⊗ B) T = A T ⊗ B T , (4) (A ⊗ B)(C ⊗ D) = (AC) ⊗ (BD), (5) (E p ⊗ xn×1 )A p×m dm×1 = (A ⊗ En )(d ⊗ x), (6) d p×1 ⊗ xn×1 = (d ⊗ En )x (7) From Eqs (6) and (7), we have (En ⊗ am ×1 ) bn ×1 = (bn ×1 ⊗ Em ) am ×1 (8) It is possible to prove am×1 bnT×1 = (bT ⊗ Em )(En ⊗ a) (9) Taylor expansion for matrix functions of vector variable using the Kronecker product 339 Indeed, using Eq (5), we have (bT ⊗ Em )(En ⊗ a) = (bT En ) ⊗ (Em a) a1 b1 a1 b2 a1 bn a2 b1 a2 b2 a2 bn = bT ⊗ a = am b1 am b2 am bn (10) = abT In the above formulae, Em denotes the m × m identity matrix Definition The kth -Kronecker power of the matrix A (k is an integer larger than 1) is defined as follows (11) A⊗ k = A ⊗ (A⊗ k −1 ) = A ⊗ A ⊗ ⊗ A k copies If k = 1, we have A⊗1 = A (12) 2.3 The partial derivative of a matrix with respect to a vector Let scalar α(x), vector a(x) ∈ Rm and matrix A(x) ∈ Rm× p be functions of vector variable x ∈ Rn Definition The first order partial derivatives with respect to vector x of scalar α(x), vector a(x) and matrix A(x) are respectively defined by [7, 8] ∂α = ∂x ∂a = ∂x ∂A = ∂x ∂a1 ∂x ··· ∂a p ∂x ∂α ∂α ∂x1 ∂x2 ∂a ∂a1 ∂x ∂x1 ∂a2 ∂a2 ∂x1 ∂x = ∂am ∂am ∂x ∂x1 ∂a11 ··· ∂x1 = ∂a m1 ··· ∂x1 ··· ∂α ∂xn ∂a1 ∂x2 ∂a2 ∂x2 ∂am ∂x2 ∂a11 ∂xn ∂am1 ∂xn ··· ∈ Rn , (13) ∂a1 ∂xn ∂a2 ··· ∂xn ∈ Rm × n , ∂am ··· ∂xn ∂a1p ∂a1p ··· ∂x1 ∂xn ··· ∂amp ∂amp ··· ∂x1 ∂xn (14) ∈ Rm×np (15) Definition The kth -order partial derivatives with respect to vector x of scalar α(x), vector a(x) and matrix A(x) are respectively defined as follows (k > 2) ∂(k) α ∂ = k ( ) ∂x ∂x ∂ ( k −1) α ∂x(k−1) = ∂ ( k −1) ∂x(k−1) ∂α ∂x k ∈ Rn , (16) 340 Nguyen Van Khang, Dinh Cong Dat, Nguyen Thai Minh Tuan ∂(k) a ∂ = k ( ) ∂x ∂x ∂ ( k −1) a ∂x(k−1) ∂k A ∂ = k ∂x ∂x ∂ ( k −1) A ∂x(k−1) = 1× n k ∂ k a1 ∂xk ∂ k a2 ∂xk ∂k am ∂xk ∈ Rm × n k , 1× n k 1× n k k ∂ a11 ∂xk = 1× n k ∂k a m1 ∂xk ∂k a12 ∂xk 1× n k 1× n k ∂k am2 ∂xk ∂k a1p ∂xk ∂k amp ∂xk (17) k ∈ Rm× pn (18) Property For the product of two matrices A(x) ∈ Rm× p and B(x) ∈ R p×s , we have the following property [8] ∂A ∂B ∂ (A(x)B(x)) = (B ⊗ En ) + A ∂x ∂x ∂x (19) Corollary Using Eq (19) for matrix A(x) ∈ Rm× p and matrix of constants C ∈ R p×s , we have ∂ ∂A (A(x)C) = (C ⊗ En ) (20) ∂x ∂x Deriving the above expression with respect to the vector x successively, we get ∂k ∂ k −1 ( A ( x ) C ) = ∂xk ∂xk−1 ∂A (C ⊗ En ) ∂x = ∂ k −2 ∂xk−2 ∂2 A (C ⊗ E⊗ n ) ∂x2 = ∂k A k (C ⊗ E⊗ n ) (21) ∂xk Property Taking kth -order derivative of the identity m a(x) = ∑ ei a i , (22) i =1 where ei is the ith column of the unit matrix with an appropriate size, one obtains m m ∂k ∂k ∂k e a ( x ) = ( e a ) = a i i i ∑ ∑ k k i ∂xk i =1 ∂x i =1 ∂x (23) Property Taking kth -order derivative of the identity p A(x) = ∑ eiT , i =1 (24) Taylor expansion for matrix functions of vector variable using the Kronecker product 341 and noting (21) yield p p p ∂k ∂k ∂k ∂k T T ⊗k A ( x ) = ( a e ) = a ( e ⊗ E ) = ∑ ∂xk i i ∑ ∂xk i i ∑ ∂xk (eiT ⊗ Enk ) n ∂xk i =1 i =1 i =1 (25) TAYLOR EXPANSION FOR MATRIX FUNCTIONS OF VECTOR VARIABLE 3.1 Taylor series for scalar functions of vector variable Let scalar α (x) be a function of vector variable x ∈ Rn , namely α = α (x) = α ( x1 , x2 , , x n ) The Taylor expansion with respect to vector x for α (x) in the neighborhood of x = x0 is defined as follows α (x) ≈ α (x0 ) + n ∂ α ( x0 ) ( x i − x i ) 1! i∑ ∂xi1 =1 n + n ∂2 α ( x0 ) ( x i − x i ) ( x i − x i ) ∑ ∑ 2! i =1 i =1 ∂xi1 ∂xi2 n n n ∂3 α (x0 ) ( xi1 − xi1 ) ( xi2 − xi2 ) ( xi3 − xi3 ) + + ∑ ∑ ∑ 3! i =1 i =1 i =1 ∂xi1 ∂xi2 ∂xi3 n + (26) n n ∂k ∑ α ( x0 ) ( x i − x i ) ( x i − x i ) ( x i k − x i k ) , ∑ ∑ k! i =1 i =1 i =1 ∂xi1 ∂xi2 ∂xik k where x0 = x10 x20 xn0 T Lemma The following expression holds n n ∑ ∑ i1 =1 i2 =1 n ∂k ∂k x − x x − x x − x = α ( x0 ) ∆ ⊗ k , α x ) ( ) ( ) ( ) ( i1 i1 i2 i2 ik ik ∑ ∂xi ∂xi ∂xi k ∂x k i k =1 (27) where ∆ = x − x0 (28) Proof It can easily be shown that Eq (27) is true when k = n ∂ ∑ ∂xi α (x0 ) (xi1 − xi1 ) = i =1 = ∂ α (x0 ) ∂x1 ∂ α ( x0 ) ∆ ⊗ ∂x ∂ α ( x0 ) ∂x2 ∂ α ( x0 ) ∂xn ( x1 − x10 ) ( x2 − x20 ) ( xn − xn0 ) (29) 342 Nguyen Van Khang, Dinh Cong Dat, Nguyen Thai Minh Tuan Assuming that Eq (27) is correct with k = j n n n ∑ ∑ i1 =1 i2 =1 ∑ i j =1 ∂j α ( x0 ) x i − x i ∂xi1 ∂xi2 ∂xi j x i2 − x i2 x i j − x i j = ∂j α ( x0 ) ∆ ⊗ j , ∂x j (30) we just need to prove that Eq (27) is true with k = j + n ∑ n n ∂ j +1 α (x0 ) xi1 − xi1 ∂x ∂x ∂xi j+1 =1 i1 i2 ∑ ∑ i1 =1 i j =1 i j +1 x i2 − x i2 x i j − x i j x i j +1 − x i j +1 (31) ∂ j +1 = j + α ( x0 ) ∆ ⊗ j + ∂x Consider an integer value i j+1 such that ≤ i j+1 ≤ n From (30) replacing α by ∂α , ∂xi j+1 we have n ∑ n i1 =1 ∂j ∂xi1 ∂xi2 ∂xi j ∑ i j =1 ∂α ∂xi j+1 x i1 − x i1 x i2 − x i2 x i j − x i j = x0 ∂j ∂x j ∂α ∂xi j+1 ∆⊗ j x0 (32) Multiplying both sides of the above equation with xi j+1 − xi j+1 , we get n n i1 =1 i j =1 ∂j ∂xi1 ∂xi2 ∂xi j ∑ ∑ = ∂j ∂x j ∂α ∂xi j+1 ∂α ∂xi j+1 ( x i1 − x i1 ) ( x i2 − x i2 ) x i j − x i j x i j +1 − x i j +1 x0 ∆ ⊗ j x i j +1 − x i j +1 x0 (33) Assigning values from to n to i j+1 and adding all expressions (33), we have another representation of the left side of (31) as follows n ∑ i j +1 = = = = ∂j ∂x j ∂α ∂xi j+1 ∂j ∂x j ∂α ∂x1 ∂j ∂x j ∂α ∂x1 ∂j ∂x j ∂α ∂x1 ∂j ∂x j ∂α ∂x x i j +1 − x i j +1 ∆ ⊗ j x0 ( x1 − x10 ) x0 (( x1 − x10 ) En ) x0 x0 ∂j ∂x j ( ∆ ⊗ En ) ∆ ⊗ j x0 ∂j ∂x j ∂α ∂xn (x0 ) ∂α ∂xn ( xn − xn0 ) ∆⊗ j x0 ∂j ∂α (( xn − xn0 ) En ) j ∂x ∂x n x0 ( x − x ) En ⊗j ∆ ( x n − x n ) En ∆⊗ j (34) Taylor expansion for matrix functions of vector variable using the Kronecker product 343 Using Eq (7) and Eq (16), Eq (34) can be rewritten as n ∑ i j +1 ∂j α ∂x j ∂ ∂xi j+1 x i j +1 − x i j +1 ∆ ⊗ j = x0 ∂ j +1 α ( x0 ) ∆ ⊗ j + ∂x j+1 (35) Thus, (31) holds and therefore (27) is true Substituting Eq (27) into Eq (26), we get a compact formula as follows k ∂i α (x0 ) ∆⊗i i i! ∂x i =1 α ( x ) ≈ α ( x0 ) + ∑ (36) 3.2 Taylor series for vector functions of vector variable Consider a vector function of vector x ∈ Rn a (x) = T a1 (x) a2 (x) a m (x) m = ∑ ei a i , a (x ) ∈ Rm (37) i =1 Using Eq (36), we have the Taylor expansion with respect to vector x for scalar function (x)in the neighborhood of x = x0 k a i ( x ) ≈ a i ( x0 ) + ∑ j =1 ∂j (x0 ) ∆⊗ j , i = 1, m, j! ∂x j (38) which leads to m a (x) ≈ k ∑ ei i =1 = ∂j α i ( x0 ) ∆ ⊗ j j! ∂x j αi (x0 ) + ∑ j =1 m m i =1 i =1 k ∑ ei αi (x0 ) + ∑ ei k m = a (x0 ) + ∑ ∑ j =1 i =1 k = a (x0 ) + ∑ j =1 j! ∑ j =1 ∂j αi (x0 ) ∆⊗ j j! ∂x j (39) ∂j ei αi (x0 ) ∆⊗ j j! ∂x j m ∑ ei i =1 ∂j αi (x0 ) ∂x j ∆⊗ j Applying (23), we have m ∂j ∂j ∑ ei ∂xj αi (x0 ) = ∂xj a (x0 ) , j = 1, k (40) i =1 Substituting Eq (40) into Eq (39), we get k a (x) ≈ a (x0 ) + ∑ j =1 ∂j a ( x0 ) ∆ ⊗ j j! ∂x j (41) Eq (41) is the Taylor series for vector function a(x) in the neighborhood of x = x0 344 Nguyen Van Khang, Dinh Cong Dat, Nguyen Thai Minh Tuan 3.3 Taylor series for matrix functions of vector variable Consider a matrix function of vector x ∈ Rn a11 (x) a12 (x) a21 (x) a22 (x) A (x) = a1p (x) a2p (x) (42) am1 (x) am2 (x) amp (x) p a1 ( x ) a2 ( x ) a p ( x ) = = ∑ eiT i =1 Using Eq (41), Taylor series for column vector ∈ A in a neighborhood of x = x0 has the following form k ∂j (x0 ) ∆⊗ j , i = 1, p j! ∂x j (x) ≈ (x0 ) + ∑ j =1 (43) Substituting Eq (43) into Eq (42), we have p A (x) ≈ k a i ( x0 ) + ∑ ∑ i =1 j =1 p = ∂j (x0 ) ∆⊗ j j! ∂x j p k eiT ∂j ∑ (x0 ) eiT + ∑ ∑ j! ∂xj (x0 ) ∆⊗ j i =1 i =1 p k = A ( x0 ) + ∑ ∑ j =1 i =1 eiT (44) j =1 ∂j (x0 ) ∆⊗ j eiT j! ∂x j Applying Eq (9), we have E p ⊗ ∆⊗ j , i = 1, p, j = 1, k ∆⊗ j eiT = eiT ⊗ En j (45) Eq (44) can be written in the following form k A (x) ≈ A (x0 ) + ∑ p ∂j ∑ j! ∂xj (x0 ) eiT ⊗ En j E p ⊗ ∆⊗ j j =1 i =1 k = A (x0 ) + ∑ j =1 j! (46) p ∂j ∑ ∂xj (x0 ) eiT ⊗ Enj i =1 Ep ⊗ ∆ ⊗j Using Eq (25), we have the Taylor expansion with respect to vector x for matrix function A (x) in the neighborhood of x = x0 k A ( x ) ≈ A ( x0 ) + ∑ j =1 ∂j A ( x0 ) E p ⊗ ∆ ⊗ j j! ∂x j (47) Taylor expansion for matrix functions of vector variable using the Kronecker product 345 3.4 Linearization of the matrix function of vector variables If the quadratic or higher terms in the Taylor series (47) are negligibly small, we have the linearization formula A (x) ≈ A (x0 ) + ∂ A ( x0 ) E p ⊗ ∆ ∂x (48) For matrix functions with two vector variables x ∈ Rn and y ∈ Rn , we can apply (48) twice in succession as follows ∂ A ( x0 , y ) E p ⊗ ( x − x0 ) ∂x ∂ ≈ A (x0 , y0 ) + A (x0 , y0 ) E p ⊗ (y − y0 ) + ∂y ∂ + A ( x0 , y0 ) E p ⊗ ( x − x0 ) + ∂x ∂ ∂ + A (x0 , y0 ) E p ⊗ (x − x0 ) E p ⊗ (y − y0 ) ∂x ∂y A (x, y) ≈ A (x0 , y) + (49) Note that the last term of (49) is a nonlinear term The final linearization formula for a matrix function of two vector variables is A (x, y) ≈ A (x0 , y0 ) + ∂ A (x0 , y0 ) E p ⊗ (y − y0 ) ∂y (50) ∂ + A ( x0 , y0 ) E p ⊗ ( x − x0 ) ∂x A special case but very common in the dynamics of multi-body systems: we need to linearize the product of a matrix function and one of its vector variable A (x, y) y ≈ A (x0 , y0 ) + ∂ A ( x0 , y0 ) E p ⊗ ( y − y0 ) + ∂y ∂ A (x0 , y0 ) E p ⊗ (x − x0 ) (y0 + (y − y0 )) ∂x ∂ ≈ A (x0 , y0 ) y0 + A (x0 , y0 ) E p ⊗ (y − y0 ) y0 + ∂y ∂ + A (x0 , y0 ) E p ⊗ (x − x0 ) y0 + A (x0 , y0 ) (y − y0 )+ ∂x ∂ + A (x0 , y0 ) E p ⊗ (y − y0 ) + ∂y ∂ + A (x0 , y0 ) E p ⊗ (x − x0 ) (y0 + (y − y0 )) ∂x + (51) 346 Nguyen Van Khang, Dinh Cong Dat, Nguyen Thai Minh Tuan Ignoring the nonlinear terms and using Eq (8), we have A (x, y) y ≈ A (x0 , y0 ) y0 + A (x0 , y0 ) + ∂ A (x0 , y0 ) (y0 ⊗ En ) (y − y0 )+ ∂y (52) ∂ + A (x0 , y0 ) (y0 ⊗ En ) (x − x0 ) ∂x As a corollary, one can write ∂ A ( x0 ) ( y0 ⊗ E n ) ( x − x0 ) ∂x A (x) y ≈ A (x0 ) y0 + A (x0 ) (y − y0 ) + (53) LINEARIZATION OF THE MOTION EQUATIONS OF AN ELASTIC MANIPULATOR In this section, we apply the Taylor expansion for matrix functions to linearize the motion equations of a flexible manipulator moving and vibrating only in a vertical plane as shown in Fig Flexible link OE is assumed to be long and slender enough for the Euler-Bernoulli beam theory to be applied The stationary frame is denoted as Ox0 y0 If the elastic vibration is ignored, the link move exactly the same as the moving frame denoted link Oxy link has Young modulus second moment of density areaI,ρ,volumetric hasThe Young modulus E, second moment E, of area I, volumetric mass length l, and mass density ρ,cross-sectional length l, and cross-sectional area A τ ( t ) is the driving torque area A t (t ) is the driving torque Using Lagrange’s equations ofofsecond kind and method, we can Using Lagrange's equations the second kind andthe the Ritz-Galerkin Ritz-Galerkin method, we can establishestablish the system of differential equations of motion motion system considering the system of differential equations of of of the the system considering only the only first mode shape,assuming assuming that thethe other modemode shapes shapes are negligible the first mode shape, that other are negligible In this example, the general coordinates of the manipulator selected as follows In this example, the general coordinates of the manipulator are selectedare as follows éq ù s = ê aú ëwû s= qa w , (54) (54) where q aWhere is theqrotation angle andand w wisisthe displacement the link angle the elastic elastic displacement of theof link a is the rotation Fig A single–link flexible Fig A single–link flexible manipulator manipulator The motion equations of the flexible manipulator have the following form [11] The motion equations of the flexible manipulator have the following form [11] (55) M ( s )!!s + C ( s,s! ) s! + g ( s ) = t ( t ) M (s) să + C (s, s˙ ) s˙ + g (s) = τ (t) (55) Here we use the following notations s ( t ) = sR ( t ) + Ds ( t ) = sR ( t ) + y ( t ), (56) s! ( t ) = s! R ( t ) + Ds! ( t ) = s! R ( t ) + y! ( t ) , (57) !!s ( t ) = !!s R ( t ) + D!!s ( t ) = !!s R ( t ) + !! y (t ) (58) where superscript R denotes the basic motion – the motion of the manipulator if the link is ... =1 i =1 i =1 (25) TAYLOR EXPANSION FOR MATRIX FUNCTIONS OF VECTOR VARIABLE 3.1 Taylor series for scalar functions of vector variable Let scalar α (x) be a function of vector variable x ∈ Rn ,... expansion for matrix functions of vector variable using the Kronecker product 345 3.4 Linearization of the matrix function of vector variables If the quadratic or higher terms in the Taylor series (47)... paper, using the definition on partial derivative of a matrix with respect to a vector and Kronecker product [7–9], the formulae of Taylor expansion according to a vector x for scalar functions, vector