Part 1 - Introduction to System Identification

  • Upload
    farideh

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

  • 7/25/2019 Part 1 - Introduction to System Identification

    1/40

    System IdentificationControl Engineering B.Sc., 3rd yearTechnical University of Cluj-Napoca

    Romania

    Lecturer: Lucian Busoniu

  • 7/25/2019 Part 1 - Introduction to System Identification

    2/40

    The system concept The model concept System identification workflow Course logistics

    Part I

    Introduction to System Identification

  • 7/25/2019 Part 1 - Introduction to System Identification

    3/40

    The system concept The model concept System identification workflow Course logistics

    Overall objective

    System identificationis the process of creating a modelto describe the behavior of adynamical system, fromexperimental data.

  • 7/25/2019 Part 1 - Introduction to System Identification

    4/40

    The system concept The model concept System identification workflow Course logistics

    An informal example

    Motion capture is one example where:Thesystemis the human

    Themodelconsists of the measured trajectories of the markers

    C

  • 7/25/2019 Part 1 - Introduction to System Identification

    5/40

    The system concept The model concept System identification workflow Course logistics

    Table of contents

    1 The system concept

    2 The model concept

    3 System identification workflow, with an example

    4 Course logistics

    Th t t Th d l t S t id tifi ti kfl C l i ti

  • 7/25/2019 Part 1 - Introduction to System Identification

    6/40

    The system concept The model concept System identification workflow Course logistics

    System concept

    An informal definition

    A realsystemis a part of the physical world, with a well-definedinterface, which is acted on by inputand disturbancesignals, andproduces in responseoutputsignals.

    The input can be controlled, but not the disturbance; often thedisturbance cannot be measured, either. Note that the signals arefunctions of time, so the system evolves in time (it is dynamical).

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    7/40

    The system concept The model concept System identification workflow Course logistics

    System example: car

    Consider the longitudinal (forward) motion of the car.

    Inputs: Gas pedal position, gear, brake pedal position.

    Output: Velocity.

    Disturbance: Friction with varying road surfaces.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    8/40

    The system concept The model concept System identification workflow Course logistics

    System example: a robot arm

    Consider a robot arm that, for example, must perform pick-and-place

    tasks.

    Inputs: DC voltages on the link and end-effector motors.

    Outputs: The positions of the links and of the end-effector.

    Disturbances: Mass of the picked-up object (load), friction.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    9/40

    The system concept The model concept System identification workflow Course logistics

    System example: aircraft

    Consider the roll motion of the aircraft.

    Input: Aileron deflection angle.

    Output: Aircraft roll angle.

    Disturbances: Wind, inputs from other control surfaces, etc.

    Note that only a part of the overall system dynamics is studied. Thistype of simplification is commonly used.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    10/40

    The system concept The model concept System identification workflow Course logistics

    System example: HIV infection

    Inputs: Quantities of applied drugs (e.g. protease inhibitors,reverse transcriptase inhibitors).

    Output: Counts of infected and healthy target cells; virus count;immune effector count (per milliliter).

    Disturbances: Other infections, patient characteristics.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    11/40

    y p p y g

    Other domains

    The HIV example illustrates that the utility of system modeling andidentification goes beyond typical cases studied in control, such asthe mechanical systems described above.

    Other application fields include:

    Chemical industry. Energy, transport, and water infrastructure.

    Signal processing.

    Economy.

    Social sciences (e.g. dynamics of social networks).Etc.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    12/40

    y p p y g

    Table of contents

    1 The system concept

    2 The model concept

    3 System identification workflow, with an example

    4 Course logistics

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    13/40

    Model concept

    An informal definition

    Amodelis a description of the system that captures its essential

    behavior.

    Crucial feature: the model is always an approximation(idealization,abstractization) of the real system.

    This feature is necessary and also desirable: exact models are

    unfeasible, simpler models are easier to understand and use.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    14/40

    Types of models

    1 Mental or verbal models

    2 Graphs and tables3 Mathematical models, with two subtypes:

    First-principles, analytical models

    Models from system identification

    Examples follow.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    15/40

    Mental / verbal models: example

    The model consists of verbal rules such as:

    Turning the wheel causes the car to turn.

    Pressing the gas pedal makes the car accelerate.

    Pressing the brake pedal makes the car slow down.

    ...

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    16/40

    Graph models: example

    Consider a hard drive read-write head, with input = motor voltage,and output = head position.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    17/40

    Graph models: example (continued)

    The model represents the system behavior in graph form, such asstep responseor frequency response(Bode diagram). The nextlectures will deal with this type of model.

    Connection: System Theory (recall step & impulse responses of

    1st and 2nd order systems, Bode diagrams).

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    18/40

    First-principles mathematical models

    Physical laws are used to write down equations describing thesystem (e.g., balance equations). Models are usually continuous-timedifferential equations involving the inputs and outputs.

    Characteristics:

    Remain valid for every operating point.

    Offer significant insight into the systems behavior.

    Unfeasible if the system is too complex or poorly understood.

    Connection: Process Modeling.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    19/40

    First-principles mathematical models: Example

    M()+ C(, )+ G() =

    Inputs: Motor torques in the joints, collected in the vector Rn. ndenotes the number of joints.

    Output: Angles of the links, collected in the vector [, )n.

    Note and are functions of time; for conciseness, argument t is notgiven. Also, the dot denotes differentiation w.r.t. time, e.g. =d/dt.

    M: mass matrix,C: matrix of centrifugal and Coriolis forces,G:

    gravity vector (we do not give their expressions here).

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    20/40

    Mathematical models from system identification

    Obtained numerically from experimental data collected on the system.

    Characteristics (compared to first-principles models):

    Usually validlocally, around an operating point.Give less physical insight.

    Easy to construct and use, the only option in many applications.

    Main focus of this system identification course.

    A detailed example is given in the next section.

  • 7/25/2019 Part 1 - Introduction to System Identification

    21/40

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    22/40

    Using the model

    Models are useful for many purposes, some of the more importantones being:

    Simulateof the systems response in new scenarios (e.g. howthe HIV patient will respond to drugs). Allows studying scenariosthat might be dangerous or expensive in the real system.

    Predictthe systems future output (e.g. weather prediction).

    Design a controllerfor the system, in order to achieve goodbehavior (e.g. fast response, small overshoot).

    Design the system itself, by obtaining insight into how the

    yet-unbuilt system will behave. (Since system is not available,requires first-principles modeling.)

    Control design is the most relevant for us, as control engineers.

    Connection: Control Engineering discipline (this semester)

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    23/40

    Table of contents

    1 The system concept

    2 The model concept

    3 System identification workflow, with an example

    4 Course logistics

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    24/40

    Workflow example

    System identification often works in discrete time, as we will work inthis example.

    Usual procedure for identification in discrete-time:

    Here, we consider a flexible robot arm,u= torque,y= armacceleration. The data is obtained from the Daisy database

    (http://homes.esat.kuleuven.be/smc/daisy/).

    The system concept The model concept System identification workflow Course logistics

    http://homes.esat.kuleuven.be/~smc/daisy/http://homes.esat.kuleuven.be/~smc/daisy/http://homes.esat.kuleuven.be/~smc/daisy/http://homes.esat.kuleuven.be/~smc/daisy/http://homes.esat.kuleuven.be/~smc/daisy/
  • 7/25/2019 Part 1 - Introduction to System Identification

    25/40

    Workflow 1: Experiment design

    A main part of experiment design consists of selecting the inputsignal (duration, shape). This signal should be sufficiently rich tobring out the interesting behavior in the system.

    There are usually constraints: the system cannot be placed indangerous conditions, cannot deviate too much from the operatingpoint, etc.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    26/40

    Workflow 1: Experiment design: Example

    Input signal:

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    27/40

    Workflow 2: Experiment

    The experiment is performed and the output data is recorded.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    28/40

    Workflow 2: Experiment: Example

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    29/40

    Workflow 2: Experiment: Example (continued)

    We split the data into an identificationset and avalidationset (see

    later).

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    30/40

    Workflow 3: Structure choice

    The structure of the model is chosen: graphical model, ormathematical model.

    Any knowledge and intuition about the system should be exploited tochoose an appropriate structure: it should be flexible enough to leadto an accurate model, but simple enough to keep the estimation taskwell-conditioned.

    The system concept The model concept System identification workflow Course logistics

  • 7/25/2019 Part 1 - Introduction to System Identification

    31/40

    Workflow 3: Structure choice: Example

    We choose a so-called ARX model structure, where the output y(k)at the current discrete time step is computed based on to theprevious inputs and outputs:

    y(k) + a1y(k 1) + a2y(k 2) + a3y(k 3)=b1u(k 1) + b2u(k 2) + b3u(k 3) + b4u(k 4) + e(k)

    equivalent to

    y(k) = a1y(k 1) a2y(k 2) a3y(k 3)

    + b1u(k 1) + b2u(k 2) + b3u(k 3) + b4u(k 4) + e(k)

    e(k)is the error made by the model at step k.

    Model parameters: a1, a2, a3 andb1, . . . , b4.

    The system concept The model concept System identification workflow Course logistics

    W kfl 4 M d l i i

  • 7/25/2019 Part 1 - Introduction to System Identification

    32/40

    Workflow 4: Model estimation

    A method is chosen and applied to identify the parameters of thestructure. Of course, which methods are appropriate depends on thestructure chosen.

    The system concept The model concept System identification workflow Course logistics

    W kfl 4 M d l ti ti E l

  • 7/25/2019 Part 1 - Introduction to System Identification

    33/40

    Workflow 4: Model estimation: Example

    Identification consists of finding the parametersa1, a2, a3, b1, . . . , b4.We choose a method that minimizes the sum of the squared errors300

    k=1 e2(k)on the identification data. The actual algorithm will be

    presented later in the course.

    The solution is:

    a1 = 2.24, a2 =2.17, a3 = 0.83,

    b1 = 0.24, b2 =0.45, b3 = 0.41, b4 =0.22

    which replaced in the structure gives the following approximate model:

    y(k) =2.24y(k 1) 2.17y(k 2) + 0.83y(k 3) 0.24u(k 1) + 0.45u(k 2) 0.41u(k 3) + 0.22u(k 4)

    The system concept The model concept System identification workflow Course logistics

    W kfl 5 M d l lid ti

  • 7/25/2019 Part 1 - Introduction to System Identification

    34/40

    Workflow 5: Model validation

    Validation is a crucial step: the model must be good enough for ourpurposes. If validation is unsuccessful, some or all of the previoussteps must be repeated.

    E.g., the response (outputs) of the obtained model can be comparedwith the true response of the system, on validation data. Thisvalidation dataset should preferably be different from the set used foridentification. (Either a different experiment is performed, or theexperimental data is split into testing and validation subsets.)

    The system concept The model concept System identification workflow Course logistics

    W kfl 4 M d l lid ti E l

  • 7/25/2019 Part 1 - Introduction to System Identification

    35/40

    Workflow 4: Model validation: Example

    We use the validation data that we kept separate from the start:

    Assuming our goal is to simulate the system output (for inputs thatare well represented by the experimental input chosen), the model

    is acceptable.

    The system concept The model concept System identification workflow Course logistics

    Table of contents

  • 7/25/2019 Part 1 - Introduction to System Identification

    36/40

    Table of contents

    1 The system concept

    2 The model concept

    3 System identification workflow, with an example

    4 Course logistics

    The system concept The model concept System identification workflow Course logistics

    Prerequisites and literature

  • 7/25/2019 Part 1 - Introduction to System Identification

    37/40

    Prerequisites and literature

    Prerequisites:

    Linear dynamical systems, statistics, linear algebra, Matlab(brief introductions to the required topics will be given along the way)

    Literature

    Mandatory: lecture slides (will be written down in detail to give a

    self-contained, complete picture).Students may also optionally consult:

    T. Soderstrom and P. Stoica. System Identification. Prentice Hall, 1989,

    on which this course is based. Full text available legally and free of

    charge at: http://user.it.uu.se/ts/bookinfo.html.

    An advanced textbook: L. Ljung,System Identification: Theory for theUser, 2nd ed., Prentice Hall, 1999.

    Credit for some ideas goes to the SysID course at Uppsala University,by K. Pelckmans.http://www.it.uu.se/edu/course/homepage/systemid/vt12

    The system concept The model concept System identification workflow Course logistics

    Grading and schedule

    http://user.it.uu.se/~ts/bookinfo.htmlhttp://user.it.uu.se/~ts/bookinfo.htmlhttp://user.it.uu.se/~ts/bookinfo.htmlhttp://user.it.uu.se/~ts/bookinfo.htmlhttp://www.it.uu.se/edu/course/homepage/systemid/vt12http://www.it.uu.se/edu/course/homepage/systemid/vt12http://user.it.uu.se/~ts/bookinfo.html
  • 7/25/2019 Part 1 - Introduction to System Identification

    38/40

    Grading and schedule

    Grading

    40% 2 lab tests: one-hour long, must apply (randomly chosen)methods studied at previous labs. The solution consists of Matlabcode, which must be submitted at the end of the test. The codewill be run and verified by the lecturer;any non-original solutionsare disqualified. These tests will be announced at least a week in

    advance; they arerequiredbefore being admitted to the exam.20% project.

    40% final written exam.

    Labs: an acceptable solution is needed before participation is taken

    into account.Schedule(subject to possible changes)

    Course: Wednesdays 10-12, room 356, Baritiu.

    Labs & projects: Mondays (group 2), Wednesdays (group 1),

    room C01, Dorobantilor.

    The system concept The model concept System identification workflow Course logistics

    Website contact

  • 7/25/2019 Part 1 - Introduction to System Identification

    39/40

    Website, contact

    http://busoniu.net/teaching/sysid2013Email: [email protected]

    On the website you can find:

    Course information

    Lecture slides

    Lab material

    etc.

    The system concept The model concept System identification workflow Course logistics

    Project

  • 7/25/2019 Part 1 - Introduction to System Identification

    40/40

    Project

    Details will be finalized soon. Preliminary idea: neural-networkidentification of nonlinear systems, with the following deliverables:

    Matlab solutionReport