Note 7 Control

download Note 7 Control

of 22

Transcript of Note 7 Control

  • 7/29/2019 Note 7 Control

    1/22

    Lecture note 7 discrete event control 1

    Discrete Event Control

    CONTENTS

    1. Introduction

    2. State Diagram

    3. Boolean Logical Equation

  • 7/29/2019 Note 7 Control

    2/22

    Lecture note 7 discrete event control 2

    Discrete Event Control

    1. Introduction

    DEC: both input and output control variable are discrete

    variables that change values as a result of the occurrence

    of events

    Multiple-input/multiple-output (MIMO) discrete logical

    controller, see Figure 1, where Ii is discrete value-based

    input variable, and Yi discrete value-based output.

    Ii and Yi only take value 0 (off) or 1 (on).

    Input and output devices are usually located at a distance

    from the controller.

  • 7/29/2019 Note 7 Control

    3/22

    Lecture note 7 discrete event control 3

    Introduction

    Figure 1

    Discrete

    Logic

    Controller

    Y1

    I2

    Ip

    I1

    Y2

    Ym

  • 7/29/2019 Note 7 Control

    4/22

    Lecture note 7 discrete event control 4

    Figure 2

    Figure 3

    Level Limit LLS VSwitch Controller Valve

    Introduction

  • 7/29/2019 Note 7 Control

    5/22

    Lecture note 7 discrete event control 5

    We need a method to represent system

    dynamics. Control system: including bothplant and controller. However, in discrete

    event driven system, plant dynamics is

    ignored. Therefore, the control system fordiscrete event driven system reduces to

    the controller only.

    State and state diagram is the method.

    Next, we discuss state and state diagram.

  • 7/29/2019 Note 7 Control

    6/22

    Lecture note 7 discrete event control 6

    State Diagram

    States: indicators that system changes

    State Variables: assign a name to each independent class of states

    EX 1: Switch: on and off. (1,0).

    State change has a cause. State diagram (Fig.4, Fig.5) representsthe cause-state change. In particular, node: state; edge: cause.

    In this example, we define:

    LLS=0 for the level of liquid is below L

    LLS=1 for the level of liquid is above L

    Is LLS state variable?

    NO

  • 7/29/2019 Note 7 Control

    7/22

    Lecture note 7 discrete event control 7

    State Diagram

    1. State -> System state.

    2. System: components: valve, pump.

    3. Fluid: is not a part of the system, though the fluid has

    its state as well. Level of fluid in the tank can beconsidered as a kind of state, but not in the sense of

    system state.

    4. Since we concern system state, the level of fluid is not

    considered as a state variable. Level of fluid is inputvariable in this case; see the next slide.

    5. In future, state refers to system state, but we omit

    word system here.

  • 7/29/2019 Note 7 Control

    8/22

    Lecture note 7 discrete event control 8

    State Diagram

    Control system

    (X: state variable)

    Level of fluid: LLS

    Remain to see what is X and whatis output.

  • 7/29/2019 Note 7 Control

    9/22

    Lecture note 7 discrete event control 9

    State diagram

    Figure 4

    Figure 5

  • 7/29/2019 Note 7 Control

    10/22

    Lecture note 7 discrete event control 10

    State Diagram

    Control system

    (X: state variable)

    Level of fluid: LLS

    X: state variable: valve

    Output: X as well

    So we have: output = X

  • 7/29/2019 Note 7 Control

    11/22

    Lecture note 7 discrete event control 11

    State Diagram

    It is noted that the two circles represent different states ofone state variable (i.e., valve). The system in EX 1 has

    only one state variable.

    EX 2: In EX 1, if we introduce also the pump in the

    system. In particular, there is a piece of knowledge:

    when the valve is closed the pump must be off. We can

    sum up the desired control actions as follows:

  • 7/29/2019 Note 7 Control

    12/22

    Lecture note 7 discrete event control 12

    State Diagram

    State variables: X1: pump; X2: valve.

    X1: X1=0: pump off

    X1=1: pump on

    X2: X2=0: valve is closed

    X2=1: valve is open

  • 7/29/2019 Note 7 Control

    13/22

    Lecture note 7 discrete event control 13

    State Diagram (for controller)

    1. Open the valve if it is closed and the level of liquid in the

    tank is less than the desired level L (LLS=0), or keep

    the valve open if LLS=0.

    2. Close the valve if it is open and the level of liquid in thetank is equal to or greater than the desired level L

    (LLS=1), or keep the valve closed if LLS=1.

    3. Turn the pump on if it is off and the valve is open andLLS=0, or keep the pump on if it is already on and the

    valve is open and LLS=0.

  • 7/29/2019 Note 7 Control

    14/22

    Lecture note 7 discrete event control 14

    State Diagram

    4. Turn the pump off if it is on and LLS=1, or keep the pumpoff if LLS=1.

    The above expressions of control action can be represented

    by two state variables, namely X1 (for pump) and X2 (for

    valve)

    X1=0, X2=0 (pump off, valve closed)

    X1=0, X2=1 (pump off, valve open)

    X1=1, X2=1 (pump on, valve open)

    Fig.6 shows the state diagram for EX 2.

  • 7/29/2019 Note 7 Control

    15/22

    Lecture note 7 discrete event control 15

    State Diagram

    Figure 6

    Put all state variables

    of the system in onecircle

  • 7/29/2019 Note 7 Control

    16/22

    Lecture note 7 discrete event control 16

    State Diagram

    Fig. 7 shows another way to represent the state

    diagram for EX 2. The features of Fig. 7 are:

    1. Each node represents one state variable with its

    value.

    2. A state variable can be the cause of changes for

    other state variables.

  • 7/29/2019 Note 7 Control

    17/22

    Lecture note 7 discrete event control 17

    State Diagram

    Fig. 7The meaningthat the pump

    can never be on

    if the valve is

    closed has notbeen

    represented by

    the state

    diagram. This

    shows some

    limitation of the

    state diagram

  • 7/29/2019 Note 7 Control

    18/22

    Lecture note 7 discrete event control 18

    State Diagram

    Control system

    (X: state variable)

    Level of fluid: LLS

    X1: state variable: pump

    X2: state variable: valve

    Output: X1, X2

    So we have: output = X

  • 7/29/2019 Note 7 Control

    19/22

    Lecture note 7 discrete event control 19

    State Diagram: Summary

    Control system

    (X: state variable)I

    I: a vector of inputs

    O: a vector of outputs

    X: a vector of state variablesI and O are in general function of X. In a special

    case, O=X or I=X.

    O

  • 7/29/2019 Note 7 Control

    20/22

    Lecture note 7 discrete event control 20

    State Diagram: Summary

    1. State diagram involves logical variables that take 0 or 1 as theirvalues. State diagram has nodes and edges.

    2. Each edge represents one cause or event for the state change inthe corresponding nodes. The cause is also a representation of thelogical variables. For instance, in Fig. 7, the cause can be writtenas: X2=1 and LLS =0.3. The state diagram has some limitation to express the meaning ofthe desired control action.

    A formal way or mathematical way to represent the meaning:

    If X2=1 AND LLS=0, X1 changes from 0 to 1. This desire

    leads us to think of Boolean algebra. The idea is to think

    another way to represent the controller or control system.

    The next will discuss Boolean algebra.

  • 7/29/2019 Note 7 Control

    21/22

    Lecture note 7 discrete event control 21

    Boolean Logic Equations

    Boolean Logic Equations

    Let A and B be binary variables; that is, A, B=0, or 1.

    When A =1 (B=1) means that A is true (resp., B is true).A =0 (B=0) means that A is false (resp., B is false).

    (1) A+B means that either A or B is true

    A+B=0 when A=0 and B=0

    A+B=1 otherwise

  • 7/29/2019 Note 7 Control

    22/22

    Lecture note 7 discrete event control 22

    Boolean Logic Equation

    (2) AB means that both A and B are true

    AB=1 when A=1 and B=1

    AB=0 otherwise

    (3) Not operation, byA

    1A

    0A

    when A=0

    when A=1