Prof.christenson July17 APSS2010

download Prof.christenson July17 APSS2010

of 6

Transcript of Prof.christenson July17 APSS2010

  • 8/20/2019 Prof.christenson July17 APSS2010

    1/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Theory of Control: ITheory of Control: I

    Richard ChristensonRichard Christenson

    University of ConnecticutUniversity of Connecticut

     Asia Asia‐‐Pacific Summer SchoolPacific Summer School

    on Smart Structures Technology on Smart Structures Technology 

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    OverviewOverview

    Introduction to structural control

    Control theory

    Basic feedback control

    Optimal control – state feedback control

    Observers and LQG controllers

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Passive Control SystemsPassive Control Systems

    StructureExcitation Response

    Passive Device

    Passive Damper

    Base Isolation

    m

    Tuned Mass Damper

    3

    Types of Structural ControlTypes of Structural Control

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

     Active Control Systems Active Control Systems

    StructureExcitation Response

    4

    Types of Structural ControlTypes of Structural Control

     ActuatorsM 

     Active Bracing

    m

     Active Mass Damper

    Sensor Sensor

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

     Active Control Systems Active Control Systems

    StructureExcitation Response

     Actuators

    5

    Types of Structural ControlTypes of Structural Control

    Controller SensorsSensors

    feedforward feedback

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Hybrid Control SystemsHybrid Control Systems

    StructureExcitation Response

     Actuators

    6

    Types of Structural ControlTypes of Structural Control

    Controller SensorsSensors

    feedforward feedback

    Passive Device

     Active Base Isolation

    Sensor

     Actuator

  • 8/20/2019 Prof.christenson July17 APSS2010

    2/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Semiactive Control SystemsSemiactive Control Systems

    StructureExcitation Response

     Actuators

    7

    Types of Structural ControlTypes of Structural Control

    Controller SensorsSensors

    Passive Device

    feedforward feedback

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Functionally Upgraded Passive SystemsFunctionally Upgraded Passive Systems

    StructureExcitation Response

     Actuators

    8

    Types of Structural ControlTypes of Structural Control

    Controller SensorsSensors

    Passive Devicefeedforward feedback

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    StructureExcitation Response

     Actuators

    9

    Types of Structural ControlTypes of Structural Control

    Controller SensorsSensors

    feedforward feedback

    Our focus today Our focus today ……

    Controller

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Introduction to theory theory behind automatic

    control systems – closed‐loop control

    Control is used primarily for:

    1. Reduce sensitivity to variations

    2. Reduce sensitivity to output disturbance

    3. Ability to control system bandwidth

    4. Stabilization of an unstable system5. Control system transient response

    Segway

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Controlling the temperature of fluid in a tank

    Open‐loop control

    In open‐loop control the command signal alone is

    selected to achieve the desired response

    Controller 

    G(s)

    Plant

    H(s)

    r(t)

    reference

    input

    u(t)

    control

    input

    y(t)

    output

    Example: Filling a bathtub with water*Example: Filling a bathtub with water*

    *taken from Linear Control Systems, (*taken from Linear Control Systems, (RohrsRohrs, et al.), et al.)Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Open‐loop control

    Open hot water tap specified amount

    Open cold water tap specified amount

    If you have done this many time before, you might

    know rather well the necessary settings

    However, a number of factors might affect the

    control of the output

    Example: Filling a bathtub with waterExample: Filling a bathtub with water

  • 8/20/2019 Prof.christenson July17 APSS2010

    3/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Closed‐loop control

    In closed‐loop control, feedback measurements

    are included to achieve the desired response

    Controller 

    G(s)

    Plant

    H(s)

    r(t)

    reference

    input

    u(t)

    control

    input

    y(t)

    output

    Example: Filling a bathtub with waterExample: Filling a bathtub with water

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Closed‐loop control

    In closed‐loop control feedback measurements are

    included to achieve the desired response

    Feel the water at several intervals while the tub is

    filling

    If water is not at right temperature, adjust hot or

    cold water faucets

    In this manner, the system output affects the control

    of the system

    Example: Filling a bathtub with waterExample: Filling a bathtub with water

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Closed‐loop control

    Use of the state of the output is termed feedback  feedback 

    More measurements (temp. of each faucet, rate

    of change of temp.) can achieve better results

    Closed‐loop may be more complex than open‐loop,

    but can provide better performance

    Compromise between stability stability and performance performance

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Closed‐loop control

    Compromise between stability stability and performance performance

    Controlling only hot water (cold predetermined

    level) by turning fully on or fully off ;

    Our slow response time with the dramatic

    response may cause oscillations in temperature

    Common causes of instability in automatic

    control systems: (1) delay; and (2) high gain

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Take the human out of the closed‐loop control

    Automatic closed‐loop control

    Sensor to measure the required variables

    Actuator to adjust control valves

    Controller Controller to interpret sensors and send control

    signal (which would then be amplified) to actuator

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Introduction to Structural ControlIntroduction to Structural Control

    Modeling the system is a crucial step in thedesign of a controller

    The quality of the controller is linked to the

    quality of the model used in the control design

    Since no system can be perfectly modeled,

    care must be taken in designing the controller

    Parameter inaccuracies

    Unmodeled dynamics

    Nonlinearities

  • 8/20/2019 Prof.christenson July17 APSS2010

    4/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    OverviewOverview

    Introduction to structural control

    Control theory

    Basic feedback control

    Optimal control – state feedback control

    Observers and LQG controllers

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    General form of the closed‐loop control system

    Controller 

    G(s)

    Plant

    H(s)

    r(t)

    reference

    input

    u(t)

    control

    input

    y(t)

    output

    Feedback control can take many forms…

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Let’s begin with an example examining the

    effect of control gains in the forward path:

    Controller 

    G(s)

    Plant 

    H(s)

    r(t)

    reference

    input

    u(t)

    control

    input

    y(t)

    output

    When G(s) = K , this is called a proportional

    controller with unity gain feedback

    e(t)

    error +-

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Let’s begin with an example examining the

    effect of control gains in the forward path:

    K    H(s)r(t)

    reference

    input

    u(t)

    control

    input

    y(t)

    output

    When G(s) = K , this is called a proportional

    controller with unity gain feedback

    e(t)

    error +-

    Close loop system

    H cl (s)

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    The goal is to choose the control gain (K) to

    stabilize the system and improve response time

    Using the block diagram, we can write

    K   H(s)

    r(t)   u(t)   y(t)e(t)+-

    )()()(   sU sH sY    =   )()()(   sKE sH sY    =

    [ ])()()()(   sY sR K sH sY    −=[ ]

      )()(1

    )()(   sR 

    sKH 

    sKH sY 

    +=

    [ ])(1)(

    )(

    )()(

    sKH 

    sKH 

    sR 

    sY sH cl  +

    ==Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Consider a simple example of a dynamic system In the Laplace domain, the transfer function of the

    plant is

    Simple model of an electric motor or hydraulic actuator with theSimple model of an electric motor or hydraulic actuator with the

    command/voltage as the input and the position/command/voltage as the input and the position/dispdisp. as the output. as the output

    Note that this system is marginally stable because one pole is at the origin

    )(

    1)(

    τ +=

    sssH 

  • 8/20/2019 Prof.christenson July17 APSS2010

    5/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    The close loop system is:

    [ ]   K ssK 

    sKH 

    sKH sH cl  ++

    =+

    =τ 2)(1

    )()(

    tao = 1;

    K = 1;

    num = K;

    den = [1 tao K];

    sys = tf(num,den);

    [y,t]=step(sys,t);

    plot(t,y)

    K=1

    K=0.1

    K=10

    uncontrolled system H(s)

    improved response time

    overshoot

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Let’s look at the closed loop poles

    has poles at

    Note:

    The system is stable when

    The system is underdamped when

    2

    42

    2,1

    K  p

      −±−=

      τ τ 

    K ss

    K sH cl 

    ++

    =

    τ 

    2)(

    τ τ    K 

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    We can use the pole placement approach to

    assign K values to achieve the specific behavior

    K=1

    K=0.1

    K=10

    K=1

    K=0.1

    K=10

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    This system can equivalently be considered in

    state space

    )(

    1

    )(

    )()(

    τ +==

    sssU 

    sY sH 

    ( ) ( )sU sssY    =+   )(   2 τ 

    )()()(   t ut y t y    =+   &&&   τ 

    )()()(   t ut y t y    +−=   &&&   τ 

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    This system can equivalently be considered instate space

    )()()(

    )()()(

    t Dut Cz t y 

    t But  Az t z 

    +=

    +=

    [ ] [ ]   )(0)(

    )(01)(

    )(1

    0

    )(

    )(

    0

    10

    )(

    )(

    t ut y 

    t y t y 

    t ut y 

    t y 

    t y 

    t y 

    +

    =

    +

    =

    &

    &&&

    &

    τ 

    )()()(   t ut y t y    +−=   &&&   τ 

    −=

    τ 0

    10 A

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    This system can equivalently be considered instate space

    Poles of the transfer function are equal to the

    eigenvalues of the state space A matrix

    =τ 0

    10 A

    ( )  

    +

    −=

    −−

    =−

    τ λ 

    λ 

    τ λ 

    λ λ 

    0

    1

    0

    10

    0

    0det   AI 

    λτ λ τ λ λ    +=−−+=   2)0)(1()(

  • 8/20/2019 Prof.christenson July17 APSS2010

    6/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Let’s look at the poles and the step response of

    a second order differential equation

    The Laplace Transform (zero IC) is

    Consider the poles of the system

    )()()(2)(  22

    t r t y t y t y  nnn   ω ω ζω    =++   &&&

    22

    2

    2)(

    )(

    nn

    n

    sssR 

    sY 

    ω ζω 

    ω 

    ++=

    ( )   22 1 nns   ω ζ ζω    −±−=Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Assuming the system is underdamped21   ζ ω ζω    −±−=   nn   j s

    real imaginary

    21   ζ ω    −n

    nζω 

    ( )   ( )222 1   ζ ω ζω    −+   nnMagnitude:

    ( )   ( )222 1   ζ ω ζω    −+   nn

    nω =

    22222

    nnn   ω ζ ω ω ζ    −+

    nω 

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Assuming the system is underdamped21   ζ ω ζω    −±−=   nn   j s

    real imaginary

    21   ζ ω    −n

    nζω 

    ( )   ζ ω 

    ζω θ    ==

    n

    nsin

    Angle:

    nω ζ=sinθ

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Consider the response of the system

    To a step input

    The step response can be determined as

    )(2

    )(22

    2

    sR ss

    sY nn

    n

    ω ζω 

    ω 

    ++=

    ssR 

      1)(   =

    ( )   ( )Ψ+−−−=  −

    t et y  nt n   2

    2 1sin1

    1

    1   ζ ω ζ 

    ζω 

     

     

     

        −=Ψ

    ζ 

    ζ  21arctan

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    The peak response occurs at

    The peak value of y is then

    And the overshoot is

    Note: overshoot is only a function of dampingNote: overshoot is only a function of damping

    21   ζ ω 

    π 

    −= nt 

     

     

     

     

    −−

    +=  21

    max   1)(  ζ 

    ζπ 

    et y 

     

     

     

     

    −−

    21  ζ 

    ζπ 

    e

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    The settling time (defined as time required forresponse to remain within 5% of final value) is

    Note: increasingNote: increasing wnwn decreases the rise timedecreases the rise time

    05.0=−   t ne   ζω 

    3=t nζω 

    n

    st ζω 

    3=

  • 8/20/2019 Prof.christenson July17 APSS2010

    7/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Closed Loop ControlClosed Loop Control

    Let’s look at the poles and the step response

    m  a g  

    =  ω 

    θ = ζ

    Optimal poles move away from origin at desired damping

    overshoot =

    settling time = nst 

    ζω 

    3=

     

     

     

     

    −−

    21  ζ 

    ζπ 

    e

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Theory of Control: IITheory of Control: II

    Richard ChristensonRichard Christenson

    University of ConnecticutUniversity of Connecticut

     Asia Asia‐‐Pacific Summer SchoolPacific Summer School

    on Smart Structures Technology on Smart Structures Technology 

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    OverviewOverview

    Introduction to structural control

    Control theory

    Basic feedback control

    Optimal control – state feedback control

    Observers and LQG controllers

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Optimal ControlOptimal Control

    Modern control theory uses the approach that

    an optimal controller can be obtained for a plant

    taking the form

    Controller 

    G(s)

    Plant

    w(t)

    excitationu(t)

    control

    y(t)

    output)()()()(

    )()()()(

    t Fv t Dut Cz t y 

    t Ew t But  Az t z 

    ++=

    ++=&

    v(t)

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Assume that all states are measured and a fullstate feedback control law takes the form

    The closed loop dynamics are given by

    The poles of this system may be placedarbitrarily if the system is controllable

    However, optimal placement is possible with aproperly chosen cost function

    )()(   t Kz t u   −=

    ( )   )()()(   t z  At z BK  At z  cl =−=&

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Consider the Linear Quadratic Regulator (LQR) We seek a state feedback controller (K) that

    minimizes the cost function

    Where Q is positive semidefinate, R is positive

    definite, and subject to

    dt RuuQz z J    T t 

    T f 

    )(0

    ∫   +=

    0)0(   z z Bu Az z    =+=&

  • 8/20/2019 Prof.christenson July17 APSS2010

    8/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    The solution to the LQR problem is given by

    Where the control gain matrix K is given by

    Where P is the Riccati matrix which is goverened

    by the Riccati equation

    )()(   t Kz t u   −=

    0)(,)()()()(   1 =−++=−   − f T T  t P P BBR t P R  At P t P  At P &

    P BR K    T 1−=

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    As t  f goes to infinity, we see that P becomes

    constant and can be determined by solving the

    algebraic Riccati equation (ARE)

    We can use MATLAB to readily obtain this

    solution

    The matrices Q and R provide the mechanisms

    to design an effective controller

    P BBR t P R  At P t P  A   T T    1)()()(0   −−++=

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Let’s consider an example of a sdof building with

    active bracing

     Active Bracing

    Sensor

    wn = 1*2*pi; % rad/sec

    xsi = 5/100; % damping 5%

    M = 100;

    K = M*wn^2;

    C = 2*xsi*wn*M;

    % State Space System

    % dx = Ac*x + Bc*u + Ec*w

    % y = Cc*x + Dc*u + Fc*w

    Ac = [0 1;-inv(M)*K -inv(M)*C];

    Bc = [0;1];

    Ec = [0;inv(M)*1];

    Cc = [eye(2);-inv(M)*K -inv(M)*C];

    Dc = [1];

    Fc = [0];

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Plot the uncontrolled system’s response due to

    Kobe earthquake [w(t)]

    sys = ss(Ac,Ec,Cc,Fc);

    t = linspace(0,30,1000);

    load kobe

    w = interp1(k(1,:),k(2,:),t);

    y = lsim(sys,w,t);

    figure(3);

    subplot(311);plot(t,y(:,1),'g');

    subplot(312);plot(t,y(:,2),'g');

    subplot(313);plot(t,y(:,3),'g');

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Plot the uncontrolled system’s response due toKobe earthquake [w(t)]

    sys = ss(Ac,Ec,Cc,Fc);

    t = linspace(0,30,1000);

    load kobe

    w = interp1(k(1,:),k(2,:),t);

    y = lsim(sys,w,t);

    figure(3);

    subplot(311);plot(t,y(:,1),'g');

    subplot(312);plot(t,y(:,2),'g');

    subplot(313);plot(t,y(:,3),'g');

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Design an LQR controller to weight displacementand velocity equally

    Q = diag([1 1]);

    R = 1e-2;

    Klqr = lqr(Ac,Bc,Q,R,[]);

    sys = ss(Ac-Bc*Klqr,Ec,Cc-Dc*Klqr,Fc);

    y = lsim(sys,w,t);

    figure(3);

    subplot(311);hold on;plot(t,y(:,1),'b');

    subplot(312);hold on;plot(t,y(:,2),'b');

    subplot(313);hold on;plot(t,y(:,3),'b');

  • 8/20/2019 Prof.christenson July17 APSS2010

    9/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Design an LQR controller to weight displacement

    and velocity equally

    Q = diag([1 1]);R = 1e-2;

    Klqr = lqr(Ac,Bc,Q,R,[]);

    sys = ss(Ac-Bc*Klqr,Ec,Cc-Dc*Klqr,Fc);

    y = lsim(sys,w,t);

    figure(3);

    subplot(311);hold on;plot(t,y(:,1),'b');

    subplot(312);hold on;plot(t,y(:,2),'b');

    subplot(313);hold on;plot(t,y(:,3),'b');

    dt RuuQz z J    T t 

    T f 

    )(0

    ∫   +=

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Let’s look at the poles

    R decreases

    R decreases

    Q – displacement weighting Q – velocity weighting

    dt RuuQz z J    T t 

    T f 

    )(0

    ∫   +=

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State ObserversState Observers

    In practice, it is not feasible or practical to

    measure all of the states of the system

    Thus, feedback control design often requires

    that one estimate the state variables

    Controller 

    G(s)

    Plant

    w(t)

    excitationu(t)

    control

    y(t)

    output)()()()(

    )()()()(

    t Fv t Dut Cz t y 

    t Ew t But  Az t z 

    ++=

    ++=&

    v(t)

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State ObserversState Observers

    An observer is a dynamic system with inputs u

    (control input) and y (measured responses), and

    output that estimates the state vector (called

    xhat)

    Observer (linear, continuous time) category:

    Open loop observer

    Full order observer

    Kalman (Bucy) filter

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    Open Loop ObserversOpen Loop Observers

    The objective is: Observer (linear, continuous time) category:

    Linear invariant system:

    Auxiliary dynamical system:

    Estimation error:

    If A is stable, then e(t) approaches zero

    Drawbacks:

    Unbounded error for unstable state matrix

    Fails in the presence of modeling errors and disturbances

    0)(ˆ)(lim   =−∞→ t  x t  x t 

    00 )()()()()()(   x t  x t Cx t y t But  Ax t  x    ==+=&

    )()(ˆ)(ˆ   t But  x  At  x    +=&

    )(ˆ)()(   t  x t  x t e   −≡

    ( )   0)()()(ˆ)()(ˆ)(   t t t  Aet But  x  At But  x  At e   ≥=+−+=&

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State ObserversState Observers

    Full order observer – “Luenberger observer”

    Linear invariant system:

    Auxiliary dynamical system:

    Estimation error:

    If (A‐LC) is stable, then e(t) approaches zero

    Drawbacks:

    Still fails in the presence of modeling errors and disturbances

    00 )()()()()()(   x t  x t Cx t y t But  Ax t  x    ==+=&

    ( ))(ˆ)()()(ˆ)(ˆ   t  x C t y Lt But  x  At  x    −++=&

    )(ˆ)()(   t  x t  x t e   −≡

    ( )   0)()(   t t t eLC  At e   ≥−=&Observer feedback

  • 8/20/2019 Prof.christenson July17 APSS2010

    10/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State ObserversState Observers

    Stochastic state observer, “Kalman‐Bucy filter”

    Linear invariant system:

    Auxiliary dynamical system:

    )()()()()()()(   t v t Cx t y t w t But  Ax t  x    +=++=&

    ( ))(ˆ)()()(ˆ)(ˆ   t  x C t y K t But  x  At  x    −++=&

    Process noise with

    covariance Q(t)

    Disturbance with

    covariance R(t)

    Both noise terms are assumed white, Gaussian and mutually independant

    )()()()()()()(   t K t R t K t Q At P t  AP t P    T T  −++=&

    )()()()(   1 t R t C t P t K    T    −=

    Riccati equation:

    Kalman Gain:

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State ObserversState Observers

    The Kalman filter provides the best estimate of

    the states based on current available noisy

    information

    The solution P(t) to the associated differentialRiccati equation (DRE) is also the covariance of

    estimation error

    If only the steady‐state behavior is of interest,

    the time derivative is eliminated in the DRE and

    and results in an algebraic Riccati equation (ARE)

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    LQG ControlLQG Control

    Kalman filter is often known as linear quadratic

    estimation (LQE)

    When we combine optimal state feedback with

    estimator design, we realize a linear quadratic

    Gaussian (LQG) controller

    ( ))(ˆ)(

    ˆ)()(ˆ)(ˆ

    t z K t u

    z C y Lt But z  At z 

    −=

    −++=&

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    LQG ControlLQG Control

    The closed loop system is thus

    ( )   ( )

    )(ˆ)(ˆ)(

    )()(ˆ)(ˆ

    )()(ˆˆ)()(ˆ)(ˆ

    t z C t z K t u

    t y Bt z  At z 

    t Ly t z BK LC  Az C y Lt But z  At z 

    e

    ee

    =−=+=

    +−−=−++=

    &

    &

    Controller 

    Plant

    w(t)

    excitationu(t)

    control

    y(t)

    output)()()()(

    )()()()(

    t Fv t Dut Cz t y 

    t Ew t But  Az t z 

    ++=

    ++=&

    v(t)

    ( ))(ˆ)(

    ˆ)()(ˆ)(ˆ

    t z K t u

    z C y Lt But z  At z 

    −=

    −++=&

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    LQG ControlLQG Control

    The closed loop system is thus

    [ ]  

    =

    +

    +=

    )(ˆ

    )()(

    )(0)(ˆ

    )(

    )(ˆ

    )(

    t z 

    t z DC C t y 

    t w E 

    t z 

    t z 

    DC B AC B

    BC  A

    t z 

    t z 

    e

    eeee

    e

    &

    &

    )(ˆ)()(

    )()(ˆ)()(

    t z DC t Cz t y 

    t Ew t z BC t  Az t z 

    e

    e

    +=

    ++=&

    )(ˆ)(ˆ)(

    )()(ˆ)(ˆ

    t z C t z K t u

    t y Bt z  At z 

    e

    ee

    =−=

    +=&

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Design an LQG controllerEww = 0.1;

    Evv = 4e-5;

    Lgain = lqe(Ac,Ec,Cc(3,:),Eww,Evv);

    Ak = Ac-Bc*Klqr-Lgain*Cc(3,:);

    Bk = Lgain;

    Ck = -Klqr;

    Dk = 0;

    Acl = [Ac Bc*Ck;Bk*Cc(3,:)

    Ak+Bk*Dc(3,:)*Ck];

    Bcl = [Ec;zeros(2,1)];

    Ccl = [Cc Dc*Ck];

    Dcl = zeros(3,1);

    sys = ss(Acl,Bcl,Ccl,Dcl);

    y = lsim(sys,w,t);

  • 8/20/2019 Prof.christenson July17 APSS2010

    11/11

    Advanced Hazards Mitigation LabAdvanced Hazards Mitigation Lab

    Department of Civil & Environmental EngineeringDepartment of Civil & Environmental Engineering

    State Feedback ControlState Feedback Control

    Design an LQG controller

    States (actual – blue; estimated – green) Response (lqr – blue; lqg– red)