Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system

Similar documents
AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Lecture 08: Feb. 08, 2019

Regular expressions, Finite Automata, transition graphs are all the same!!

Deterministic Finite Automata

Non-Deterministic Finite Automata

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

CHAPTER 1 Regular Languages. Contents

Nondeterminism and Nodeterministic Automata

Non-deterministic Finite Automata

Designing finite automata II

Formal Languages and Automata

Minimal DFA. minimal DFA for L starting from any other

Convert the NFA into DFA

1 Nondeterministic Finite Automata

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Chapter 2 Finite Automata

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

CMSC 330: Organization of Programming Languages

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Let's start with an example:

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

Theory of Computation Regular Languages

Languages & Automata

Fundamentals of Computer Science

Some Theory of Computation Exercises Week 1

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Finite-State Automata: Recap

Hybrid Control and Switched Systems. Lecture #1 Hybrid systems are everywhere: Examples

Non-deterministic Finite Automata

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

A Symbolic Approach to Control via Approximate Bisimulations

Java II Finite Automata I

CISC 4090 Theory of Computation

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

Coalgebra, Lecture 15: Equations for Deterministic Automata

1 From NFA to regular expression

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

Context-Free Grammars and Languages

More on automata. Michael George. March 24 April 7, 2014

NFAs continued, Closure Properties of Regular Languages

3 Regular expressions

Worked out examples Finite Automata

Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem 2/16/15

CS375: Logic and Theory of Computing

Normal Forms for Context-free Grammars

Homework 3 Solutions

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Formal languages, automata, and theory of computation

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Formal Language and Automata Theory (CS21004)

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

NFAs continued, Closure Properties of Regular Languages

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

Lecture 09: Myhill-Nerode Theorem

Model Reduction of Finite State Machines by Contraction

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Lexical Analysis Part III

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Reinforcement learning II

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

Lexical Analysis Finite Automate

FABER Formal Languages, Automata and Models of Computation

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

input tape head moves current state

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Regular languages refresher

Finite Automata-cont d

First Midterm Examination

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

a b b a pop push read unread

SWEN 224 Formal Foundations of Programming WITH ANSWERS

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

( ) Same as above but m = f x = f x - symmetric to y-axis. find where f ( x) Relative: Find where f ( x) x a + lim exists ( lim f exists.

In-depth introduction to main models, concepts of theory of computation:

Synchronizing Automata with Random Inputs

Thoery of Automata CS402

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

GNFA GNFA GNFA GNFA GNFA

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

Transcription:

Hyrid Control nd Switched Systems Lecture #2 How to descrie hyrid system? Forml models for hyrid system João P. Hespnh University of Cliforni t Snt Brr Summry. Forml models for hyrid systems: Finite utomt Differentil equtions Hyrid utomt Open hyrid utomton 2. Nondeterministic vs. stochstic systems Non-deterministic hyrid utomt Stochstic hyrid utomt

Exmple #5: Multiple-tnk system pump pump-on inflow λ constnt outflow μ y gol prevent the tnk from emptying or filling up δ dely etween commnd is sent to pump nd the time it is executed gurd condition pump off τ δ? wit to off y y min? τ ú 0 stte reset τ ú 0 wit to on τ δ? pump on y y mx? How to formlly descrie this hyrid system? utomt M Deterministic finite utomton Q ú {q, q 2,, q n } finite set of sttes Σ ú {,, c, } finite set of input symols (lphet) Φ : Q Σ Q trnsition function Exmple: q Q 2 2 locking stte s Σ / Φ(q,s) 2 Grph representtion: 2 one node per stte (except for locking stte ) one directed edge (rrow) from q to Φ(q, s) with lel s for ech pir (q, s) for which Φ(q, s) 2

2 Deterministic finite utomton Nottion: Given set A string finite sequence of symols empty string A * set of ll strings of symols in set A e.g., A = {, } s = A * s[] = (rd element) s = 8 (length of string) Definition: Given initil stte q Q set of finl sttes F Q M ccepts string s Σ * with length n ú s if there exists sequence of sttes q Q * with length q = n+ (execution) such tht. q[] = q (strts t initil stte) 2. q[i+] = Φ(q[i], s[i] ), i {,2,,n} (follows rrows with correct lel). q[n+] F (ends in set of finl sttes) Definition: lnguge ccepted y utomton M L(M) ú { set of ll strings ccepted y M } There is no concept of time the whole string is ccepted instntneously 2 Deterministic finite utomton Definition: Given initil stte q Q set of finl sttes F Q M ccepts string s Σ * with length n ú s if there exists sequence of sttes q Q * with length q = n+ (execution) such tht. q[] = q (strts t initil stte) 2. q[i+] = Φ(q[i], s[i] ), i {,2,,n} (follows rrows with correct lel). q[n+] = F (ends in set of finl sttes) Definition: lnguge ccepted y utomton M L(M) ú { set of ll strings ccepted y M } Exmple: q ú F ú {} L(M)= {,,,,,, } = ( ()* ()* )* Questions in forml lnguge theory: Is there finite utomton tht ccepts given lnguge? Do two given utomt ccept the sme lnguge? Wht is the smllest utomton tht ccepts given lnguge? etc.

ordinry differentil eqution with input Σ Differentil eqution R m stte spce input spce f : R m vector field Definition: Given n input signl u : [0, ) R m A signl x : [0, ) is solution to Σ (in the sense of Crtheodory) if. x is piecewise differentile 2. If x is solution then t ny time t for which the derivtive exists ordinry differentil eqution without input Σ Differentil eqution (no inputs) f : stte spce vector field Definition: A signl x : [0, ) is solution to Σ (in the sense of Crtheodory) if. x is piecewise differentile 2. If x is solution then t ny time t for which the derivtive exists 4

Hyrid Automton (Exmple #2: Thermostt) x men temperture x 7? room off mode on mode heter x 77? Q set of discrete sttes continuous stte-spce f : Q vector field ϕ : Q Q discrete trnsition Exmple: Q ú { off, on } n ú note closed inequlities ssocited with jump nd open inequlities with flow Hyrid Automton (Exmple #2: Thermostt) x men temperture x 7? room off mode on mode heter x 77? Q set of discrete sttes continuous stte-spce f : Q vector field ϕ : Q Q discrete trnsition ϕ (q,x) = q 2? mode q 2 mode q mode q ϕ (q,x) = q? resets? 5

Hyrid Automton Q set of discrete sttes continuous stte-spce f : Q vector field ϕ : Q Q discrete trnsition ρ : Q reset mp x ú ρ (q,x ) mode q 2 ϕ (q,x ) = q 2? mode q mode q ϕ( q,x ) = q? x ú ρ (q,x ) Q f : Q Φ : Q Q Hyrid Automton set of discrete sttes continuous stte-spce vector field discrete trnsition (& reset mp) x ú Φ 2 (q,x ) mode q 2 Φ (q,x ) = q 2? mode q mode q Φ (q,x ) = q? x ú Φ 2 (q,x ) Compct representtion of hyrid utomton 6

Exmple #5: Multiple-tnk system pump pump-on inflow λ constnt outflow μ y gol prevent the tnk from emptying or filling up δ dely etween commnd is sent to pump nd the time it is executed pump off τ δ? wit to off y y min? τ ú 0 τ ú 0 wit to on τ δ? pump on y y mx? Exmple #5: Multiple-tnk system τ δ? pump off wit to off y y min? τ ú 0 τ ú 0 wit to on τ δ? pump on y y mx? Q ú { off, won, on, woff } R 2 continuous stte-spce 7

Solution to hyrid utomton x ú Φ 2 (q,x ) Φ (q,x ) = q 2? mode q 2 mode q Definition: A solution to the hyrid utomton is pir of right-continuous signls x : [0, ) q : [0, ) Q such tht. x is piecewise differentile & q is piecewise constnt 2. on ny intervl (t,t 2 ) on which q is constnt nd x continuous continuous evolution. discrete trnsitions Hyrid Automton (Exmple #2: Thermostt) x men temperture x 7? room off mode on mode heter x 77? 77 7 x x = 77, q = on q = off no trnsition would occur if the jump rnch hd strict inequlity x > 77 q = on off off off on on on note closed inequlities ssocited with jumps nd open inequlities with flows 8

Exmple #7: Server system with congestion control incoming rte r q mx q Additive increse/multiplictive decrese congestion control (AIMD): while q < q mx increse r linerly when q reches q mx instntneously multiply r y γ (0,) queue dynmics q q mx? server B rte of service (ndwidth) congestion controller q(t) r ú γ r t incoming rte r Open Automton (Exmple #7: Server system with congestion control) queue dynmics q q mx? q mx congestion controller r ú γ r q server vrile r B rte of service (ndwidth) queue dynmics event q q mx congestion controller 9

q mx incoming rte r server B rte of service (ndwidth) Open Automton (Exmple #7: Server system with congestion control) q queue dynmics vrile r congestion controller q q mx? queue-full event queue-full queue-full? r ú γ r synchronized trnsitions (ll gurds must hold for trnsition to occur) events re nothing more thn symolic lels for trnsitions incoming rte r q mx server B rte of service (ndwidth) Open Automton (Exmple #7: Server system with congestion control) q queue dynmics vrile r congestion controller q q mx? queue-full event queue-full r > queue-full r ú γ r synchronized trnsitions (ll gurds must hold for trnsition to occur) events re nothing more thn symolic lels for trnsitions 0

Open Automton (Exmple #5: Multiple-tnk system) pump pump-on inflow λ constnt outflow μ y gol prevent the tnk from emptying or filling up δ dely etween commnd is sent to pump nd the time it is executed pump off τ δ? wit to off y y min? τ ú 0 τ ú 0 wit to on τ δ? pump on y y mx? Open Automton (Exmple #5: Multiple-tnk system) pump pump-on inflow λ constnt outflow μ y gol prevent the tnk from emptying or filling up δ dely etween commnd is sent to pump nd the time it is executed sk y y min? pump off event chnge idle chnge? sk? chnge y y mx? chnge? pump on event sk τ ú 0 dely τ δ? sk

utomt M Deterministic finite utomton Q ú {q, q 2,, q n } finite set of sttes Σ ú {,, c, } finite set of input symols (lphet) Φ : Q Σ Q trnsition function Exmple: q Q 2 2 locking stte s Σ / Φ(q,s) 2 Grph representtion: 2 one node per stte (except for locking stte ) one directed edge (rrow) from q to Φ(q, s) with lel s for ech pir (q, s) for which Φ(q, s) utomt M Nondeterministic finite utomton Q ú {q, q 2,, q n } finite set of sttes Σ ú {,, c, } finite set of input symols (lphet) Φ : Q Σ 2 Q trnsition set-vlued function Exmple: q Q 2 2 locking stte s Σ / Φ(q,s) {2} { } { } {,} {} { } { } Grph representtion: 2 Nottion: Given set A, 2 A power-set of A, i.e., the set of ll susets of A e.g., A = {,2} 2 A = {, {}, {2}, {,2} } When A hs n < elements then 2 A hs 2 n elements 2

2 Nondeterministic finite utomton Exmple: q ú F ú {} L(M)= {,,,,,, } = ( ()* ()* )* Definition: Given initil stte q Q set of finl sttes F Q M ccepts string s Σ * with length n ú s if there exists sequence of sttes q Q * with length q = n+ (execution) such tht. q[] = q (strts t initil stte) 2. q[i+] Φ(q[i], s[i] ), i {,2,,n} (follows rrows with correct lel). q[n+] F (ends in set of finl sttes) Definition: lnguge ccepted y utomton M L(M) ú { set of ll strings ccepted y M } Determiniztion From forml lnguge theory: For every nondeterministic finite utomton there is deterministic one tht ccepts the sme lnguge (ut generlly the deterministic one needs more sttes) nondeterministic utomton M 2 deterministic utomton N 2 or 2 or from only ccepts nd goes to 2 from 2 only ccepts nd cn go to either or from or only ccepts nd goes to 2 or resp. from (or 2) cn ccepts nd go to 2 from ( or) 2 cn ccept nd go to or Sme lnguge: L(M) = L(N) = ( ()* ()* )* M provides more compct representtion

η η 2 η η 4 Exmple #: Trnsmission throttle u [-,] position θ g {,2,,4} ger ω velocity η k efficiency of the k th ger ω velocity [Hedlund, Rntzer 999] Exmple #: Semi-utomtic trnsmission v(t) { up, down, keep } drivers input (discrete) v = up or ω ω 2? v = up or ω ω? v = up or ω ω 4? g = g = 2 g = g = 4 v = down or ω ϖ? v = down or ω ϖ 2? v = down or ω ϖ? ω 2 g = ω g = 2 ϖ g = ϖ 2 ω 4 g = 4 ϖ 4

Nondeterministic Hyrid Automton (Exmple #: Semi-utomtic trnsmission) Suppose we wnt to consider ll possile driver inputs: ω ϖ? ω ϖ 2? ω ϖ? g = g = 2 g = g = 4 ω ω ϖ ω ω ϖ 2 ω ω 4 2 ω ϖ invrince condition (must hold to remin in discrete stte) g = ω ω 2? ω ω? ω ω 4? ϖ ϖ 2 ω 2 ω g = 2 g = ϖ gurd condition (does not force jump, simply llows it) ω 4 g = 4 Nondeterministic Hyrid Automton Q set of discrete sttes continuous stte-spce f : Q vector field ϕ : Q 2 Q set-vlued discrete trnsition ρ : Q 2 Rn set-vlued reset mp Δ Q domin or invrint set x ρ(q,x ) mode q 2 (q 2,x) Δ q 2 ϕ(q,x )? mode q mode q (q,x) Δ (q,x) Δ q ϕ(q,x )? x ρ(q,x ) 5

Nondeterministic Hyrid Automton Q set of discrete sttes continuous stte-spce f : Q vector field Φ: Q 2 Q Rn set-vlued discrete trnsition (& reset & domin)? ú (q 2, x) Φ(q,x ) mode q 2 mode q mode q (q 2,x) Φ(q 2,x ) (q,x) Φ(q,x ) (q,x) Φ(q,x ) (q, x) Φ(q,x ) Compct representtion of nondeterministic hyrid utomton gurd condition (does not force jump, simply llows it) Nondeterministic Hyrid Automton (Exmple #: Semi-utomtic trnsmission) ω ϖ? g = g = 2 g = ϖ ω 2 g = 2 invrince condition (must hold to remin in discrete stte) ω ω 2 ϖ ω ω ω ω 2? Q ú {, 2 } R 2 continuous stte-spce 6

Solution to nondeterministic hyrid utomton (q 2, x) Φ(q,x ) mode q 2 mode q (q 2,x) Φ(q 2,x ) (q,x) Φ(q,x ) Definition: A solution to the hyrid utomton is pir of right-continuous signls x : [0, ) q : [0, ) Q such tht. x is piecewise differentile & q is piecewise constnt 2. on ny intervl (t,t 2 ) on which q is constnt nd x continuous continuous evolution. discrete trnsition & resets & domin Stochstic finite utomton: controlled Mrkov chin controlled Mrkov chin M 2 20% 80% Q ú {q, q 2,, q n } finite set of sttes Σ ú {,, c, } finite set of input symols Φ : Q Q Σ [0,] trnsition proility function Φ(q, q 2, s ) proility of trnsitioning to stte q 2, when in stte q nd symol s is selected By convention, typiclly edges drwn without proilities correspond to trnsitions tht occur with proility self-loops my e omitted 7

Stochstic finite utomton: controlled Mrkov chin 00% 00% 2 00% 20% 00% 80% By convention, typiclly edges drwn without proilities correspond to trnsitions tht occur with proility self loops my e omitted 00% Q ú {, 2, } Σ ú {, } Φ(q, q 2, s ) proility of trnsitioning to stte q 2, when in stte q nd symol s is selected Stochstic Hyrid Automton Q set of discrete sttes continuous stte-spce f : Q vector field ϕ : Q Q [0, ] discrete trnsition proility ρ : Q Q reset mp (deterministic) x ú ρ (q, q 2, x ) ϕ (q, q 2, x ) mode q 2 (Poisson-like model) mode q mode q ϕ (q, q, x ) x ú ρ (q, q, x ) 8

Stochstic Hyrid Automton Q set of discrete sttes continuous stte-spce f : Q vector field Φ : Q Q [0, ] discrete trnsition proility & reset ϕ (q, q 2, x, x) (Poisson-like model) mode q 2 mode q mode q ϕ (q, q, x, x) More s specil topic lter Next clss. Trjectories of hyrid systems: Solution to hyrid system Execution of hyrid system 2. Degenercies Finite escpe time Chttering Zeno trjectories Non-continuous dependency on initil conditions 9