Linear system theory: basics Algebra, Matrix

Embed Size (px)

Citation preview

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    1/21

    NATIONAL CHENG KUNG UNIVERSITY

    Department of Mechanical Engineering

    LINEAR SYSTEM

    HOMEWORK 2

    Instructor: Prof. SzuChi Tien

    Student: Nguyen Van Thanh

    Student ID: P96007019

    Department: Inst. of Manufacturing & Information Systems

    Class: 1001- N154000Linear System

    October 10, 2011

    http://class-qry.acad.ncku.edu.tw/qry/classmate.php?syear=0100&sem=1&co_no=N164400&class_code=http://class-qry.acad.ncku.edu.tw/qry/classmate.php?syear=0100&sem=1&co_no=N164400&class_code=
  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    2/21

    Contents

    Problem 1 ...............................................................................................................................

    Problem 2 ............................................................................................................................. 1

    Problem 3 ............................................................................................................................. 1

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    3/21

    Problem 1

    Consider the following linear system:

    1.Find the eigenvalues and eigenvectors of the system matrix A (you may use Matlab). Is thsystem stable? Explain.

    The characteristic polynomial equation of the matrixA is,

    .0 1/

    The eigenvectors ofA is defined by an expression:

    0 1 01 - With :

    - With : The system is stable since al the eigenvalues of matrixA those real part are negative.

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    4/21

    2.Find the modal matrix Am

    = T1

    AT , where columns of the similarity transformation

    matrix T are the eigenvectors of the matrix A. Is the modal matrix unique? Explain.

    , - 0 1

    The modal matrix is not unique. It depends on how we specify the eigenvectors in the

    similarity transformation matrix T. For example, if we change T:

    , - 0 1

    Note: one eigenvalue can have more than one eigenvector. Now, we change , and butstill keep their position in the similarity transformation matrix T. For example, , - SoAmdoesnt change. That means:

    ,

    -

    ,

    - ,

    -

    ,

    -

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    5/21

    3.Find the exponential matrix eAtusing four different methods:(a) Cayley Hamilton theorem (Finite series representation).We can express the exponential matrix as a form:

    (3a.1Where the coefficients and are solutions of the differential equations 0 1

    0

    1 (3a.2

    By using the Matlab commands:>> syms t;

    >> S = dsolve('Dalpha0 = -4*alpha1',...

    'Dalpha1 = alpha0 - 2*alpha1',...

    'alpha0(0) = 1, alpha1(0) = 0');

    >> alpha0 = S.alpha0;

    >> alpha1 = S.alpha1;

    >> pretty(alpha0)

    >> pretty(alpha1)

    We obtain the solution:

    (3a.3

    Another way for obtaining and is using the expression below. (3a.4

    Where

    are the eigenvalues of matrixA.

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    6/21

    (3a.5

    From section 1, we already known the eigenvectors of matrixA, they are:

    (3a.6By using the Eulers formula:

    (3a.7 (3a.8

    Now, we plug equations (1.2) and (1.3) into equation (1.1), we obtain.

    (3a.9Plug equation (3a.3) (or (3a.9)),

    0 1 0 1

    (b)Resolvent matrix (Inverse Laplace transform of (sI A)1).

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    7/21

    Where,

    Use the Leverrier-Fadeev Algorithm, we obtain

    0 1 0 1 0 1 0 1

    0 1 0 1 0 1

    0 1

    Taking the inverse Laplace transform of

    (by looking up the table of Laplace transform

    we obtain

    ./ ./ This can be verified by using the Matlab commands:

    syms st;

    Phi11 = (s+2)/(s^2+2*s+4);

    Phi12 = 1/(s^2+2*s+4);

    Phi21 = -4/(s^2+2*s+4);

    Phi22 = s/(s^2+2*s+4);

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    8/21

    Phi = [Phi11 Phi12; Phi21 Phi22];

    pretty(ilaplace(Phi))

    (c)Modal transformation T where .

    [ ./ ./ ]

    (d)Use Maple or Mathematica (if you have accessed and familiar with one of these toolsnote: this part is optional).

    In Maple, by using the commands:

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    9/21

    4.Find the limit of the exponential matrix as t .

    (

    )

    Note that, all two eigenvalues of matrix A has negative real part . Sincethe system is modeled by equation (1) is stable.

    5. Solve analytically for the time responses x(t) to initial conditions x(0) = [0 3]T and napplied input u(t)=0 for all t 0. Plot your time responses.

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    10/21

    Time responses x(t) to initial conditions x(0) = [0 3]T and no applied input u(t)=0 for all

    0 are given by:

    01

    Time responses are shown in figure 5.1.

    Figure 5.1 Time responses to initial conditions , -

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    11/21

    10

    6. (a) Solve analytically for the time responses x(t) to zero initial conditions x(0) = [0 0]Tand with input u(t)=7 for all t 0.What are the steady-state values of x(t); i.e. ?

    Time responsesx(t) to the initial conditionsx(0) = [0 0]T

    and with the input u(t) = 7for all t >= 0 are given by

    . / . / 01

    Where, . By using the Hint or Maple, we obtain:

    [ ]

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    12/21

    11

    Time response are shown in figure 6a.1.

    Figure 6a.1 Time response to input u(t) = 7

    (b) Find the steady-values using the state-space model given in equation (1) withoutsolving for the time responses

    In the steady-state, we have

    0 1 01

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    13/21

    12

    7. Solve analytically for the time responses x(t) to initial conditions in Part (5) and atthe same time with the applied input in Part (6). Plot your time responses.

    The system is a LTI, so by applying the properties of the LTI, we use the superposition

    property,

    Time responses are shown in figure 7.1.

    Figure 7.1 Time responses to x(0) = [0 3]T, and u(t) = 7

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    14/21

    13

    Problem 2

    Given the following matrix

    , -1. (a) Find a set of orthonormal basis vectors for the range of A. Hint: Use Gram

    Schmidt orthogonalization.

    Recall that, if , the y is the range space of A, where x is any vector in R3.We have, From matrixA, the first column of matrix A = the third column the second column of

    matrix A, that means

    Hence, rank(A) = 2 (or we can using the Matlab command: >> rank(A)). So, the basis

    vectors for the range ofA () are * + (because and are linearly independent).Now, we use Gram-Schmidt orthogonalization to orthogonalize the

    * +.

    ||

    | |

    | |

    A set of orthonormal basis vectors for the range space ofA is

    * +(b) Can you find a solution x R

    3

    such that

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    15/21

    14

    From , we can find a solution iff . However,the matrix A is not full rank, if , the solution x is not unique.We choose a set of basis vectors for the range space of matrixA is * +, where,

    How we know is in the range space ofA or not? If we can find two coefficients such that,

    are not simultaneously zero. Hence, is in the range space ofA. If we cannot find satisfying . Hence, is not in the range space ofA.(i) , -Find

    satisfying,

    Hence, we can find a solution

    such that

    . Because, the matrix A is not full

    rank, so the solution x is not unique.

    (ii) , -Find satisfying,

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    16/21

    15

    Hence, we cannot find a solution

    such that

    2.Find a set of orthonormal basis vectors for the null space of A.Recall, then is in null space ofA.

    Thus, the null space ofA is spanned by the vector

    Hence, an orthonormal basis vector for the null space ofA is

    | |

    3. Use MATLAB to determine the singular value decomposition of A.Singular value decomposition:

    Use the command [U, S, V] = svd(A) in Matlab, we obtain

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    17/21

    16

    4. Using the results from the singular value decomposition in Part 3, answer thefollowing questions:

    (a) What are the singular values (1, 2, 3) of A? Note that123.

    (b) What is the rank of A? Verify your result using MATLAB rank(A).

    Use the command rank(A) in Matlab (>> rank(A)), we obtain the ans = 2.

    (c)What is the right singular vector associated with the singular value 3? Show theconnection of the right singular vector with the null space of A in Part 2.

    , -, where, are the right singular vectors ofA. The right singularvector associated with the singular value 3 is

    Recall from part 2, the null space ofA is spanned by the vector

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    18/21

    17

    it is along the same direction as the null space ofA in Part 2.(d)What are the left singular vectors corresponding to the non-zero singular values of A?

    Show the connection of the left singular vectors with the range space of A in Part 1.

    , -, where, are the left singular vectors ofA. The left singularvectors corresponding to the non-zero singular values ofA is

    We choose a set of basis vectors for the range space of matrixA is * +, where,

    We have,

    Hence, are in the range space ofA in Part 1. We can verify the result by usingthe command rank([u1 u2 U1 U2]) = 2.

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    19/21

    18

    Problem 3

    Given the following matrix

    1.Find the eigenvalues and eigenvectors of the matrix ATA using Matlab. The

    eigenvector matrix of ATA forms the unitary matrix V in the singular value

    decomposition of A according to equation (5).

    By using the following commands in Matlab,

    >> A = [1 2; 2 7; 4 0];

    >> [V1, D1] = eig(A'*A)

    We obtain

    0 1 0 1So, the eigenvalues of the matrixATA are

    corresponding to two eigenvectors 0 1 012.Find the eigenvalues and eigenvectors of AATusing MATLAB. The eigenvector matrix

    of AAT

    forms the unitary matrix U in the singular value decomposition of A according

    to equation (8).

    By using the following commands in Matlab,

    >> A = [1 2; 2 7; 4 0];

    >> [V2, D2] = eig(A*A')

    We obtain

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    20/21

    19

    So, the eigenvalues of the matrixAATare

    (exactly the same to the eigenvalues of the matrix ATA) corresponding to two

    eigenvectors

    3.Finally, determine the singular values i(i =1, 2 rm) of the matrix A from the

    square root of the eigenvalues of AT

    A.

    By using the following commands in Matlab,

    >> A = [1 2; 2 7; 4 0];

    >> [V1, D1] = eig(A'*A);

    >> SigmaMatrix = D1^(1/2)

    We obtain

    0 14. Compare the results obtained from the Matlab command svd(A) to the unitary

    matrices U and V obtained in Parts (1) and (2).

    By using the following commands in Matlab,

    >> A = [1 2; 2 7; 4 0];

    >> [U, S, V] = svd(A)

    We obtain

  • 7/29/2019 Linear system theory: basics Algebra, Matrix

    21/21

    0 1Recall, from Part 1:

    0 1 0 1And from Part2:

    Thus, the left singular vectors in Uare the same as the eigenvectors in Part2 and the

    right singular vectors Vare the same as the eigenvectors in Part1. If we specify the

    eigenvalues in given order (i.e. descending), hence,