Lecture9b Discontinuous Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Discontinuous Systems

Harry G. Kwatny
Department of Mechanical Engineering & Mechanics
Drexel University
Outline
Simple Examples
Bouncing ball
Heating system
Gearbox/cruise control
Simulating Hybrid Systems Simulink with Stateflow
Stateflow/Simulink
Bouncing ball
Power conditioning system
Inverted pendulum
Brockets Necessary Condition
Some systems cannot be stabilized by smooth state feedback
Extensions to BNC
Solutions to Discontinuous Differential Equations
Various notions of solution may be appropriate
SIMPLE EXAMPLES
Bouncing Ball
( ) ( )
( ) ( )
| |
Free fall:
0
Collision:
, 0,1
y g
y t y t
y t cy t c
+
+
=
= =
=


Bouncing Ball
0
2
0
0
1
0 0 0
1 2
1 1
0 0 0
1 1 1
0
1 2
0
2
2 2 2
, , ,
2 2 2 1
1
2 1
For 0 1, lim
1
Zeno phenomenon transitions in finite time
i
i
N
N N N
i i
N i
i i i
N
N
v v gt
v
x v t gt t
g
v v v
t t c t c
g g g
v v v c
T t c c
g g g c
v
c T
g c


= = =

=
= = =
= = =
(
= = = =
(


(
< =
(

Time for N
transitions
Heater
( ) ( )
{ }
( ) ( ) ( ) ( )
continuous state: ,
50
, , ,
100
discrete state: , ,
, 73
, 73
1 , , ,
, 77
, 77
x R
x q off
x f x q f x q
x q on
q on off
on q off x
off q off x
q k x q k x q
off q on x
on q on x

+ =

= =

+ =

= >

+ = =

=

= <

Automobile Gearbox Control


Problem 1: Automated gearbox - coordinate
automatic gearshift with throttle command
Problem 2: Cruise control automate throttle and
gearbox to maintain speed
Background
R. W. Brockett, "Hybrid Models for Motion Control," in Perspectives in
Control, H. L. Trentelman and J . C. Willems, Ed. Boston: Birkhauser, 1993,
pp. 29-54.
S. Hedlund and A. Rantzer, "Optimal Control of Hybrid Systems," presented
at Conference on Decision and Control, Phoenix, AZ, pp. 3972-3977, 1999.
F. D. Torrisi and A. Bemporad, "HYSDEL-A Tool for Generating
Computational Hybrid Models for Analysis and Synthesis Problems," IEEE
Transactions on Control Systems Technology, vol. 12, pp. 235-249, 2004.
Transmission
( ) ( )
| |
( )
{ }
2
1 2 3 4 5
,
sin
0,1 throttle position
engine speed
engine torque-speed characteristic
, , , ,
transmission state
corresponding gear ratios 1, ,5
rear gear
i
i
i
q fin
q eng b veh
wheel
eng
q
fin
R R
M v f u F cv M g
r
u
f u
q q q q q q
R i
R

ratio
wheel radius
brake force
wheel
b
r
F
Cruise Control
2
2
, gear2
P I I
q fin
wheel
q
v k v k v k v
R R
v
r

+ + =
=

3
3
, gear3
P I I
q fin
wheel
q
v k v k v k v
R R
v
r

+ + =
=

5
5
, gear5
P I I
q fin
wheel
q
v k v k v k v
R R
v
r

+ + =
=

4
4
, gear4
P I I
q fin
wheel
q
v k v k v k v
R R
v
r

+ + =
=

1
1
, gear1
P I I
q fin
wheel
q
v k v k v k v
R R
v
r

+ + =
=

0
, neutral q
u
u

u

u

l
<
l
<
l
<
l
< stall
<
u

( ) ( ) ( ) ( )
2
Continuous control - throttle and brake are chosen so that
sin
- a standard feedback linearized design with PI controller.
- notice that cont
i
i
b
q fin
eng b veh q P I
wheel
u F
R R
f u F cv M g M k v v k v v d t
r

(
= + + +

rol depends on the discrete state.


Discrete control - ad hoc gear shift strategy.
( )
eng
f

Cruise Control Issues


Choice of shift thresholds
Wide spread implies large speed deviation before
shift
Narrow spread opens possibility of excessive
shifting, even chattering
Does not explicitly consider throttle and brake
limits
It must be verified that the engine does not
stall or exceed red line
SIMULATING HYBRID
SYSTEMS WITH
STATEFLOW/SIMULINK
Stateflow
Stateflow is a Simulink toolbox
Provides a graphical means to incorporate
discrete event process into Simulink
Based on the concept of statecharts
Harel, D., Statecharts: A Visual Formalism for
Complex Systems. Science of Computer
Programming, 1987. 8: p. 231-274.
Has evolved to represent an implementation of
UML
Simulating Hybrid Systems in
Stateflow/SIMULINK
Finite State
Machine
Event Generator Switched
Dynamical System
Mode Selector
Interface
Discrete Inputs
Discrete Outputs
Continuous Inputs
Continuous Outputs
Discrete
Disturbances
Continuous
Disturbances
Stateflow
Simulink
Stateflow: Action Language Categories
Event trigger
Transition action
State exi t action
State dur i ng action
Condition action Condition Event trigger
State ent r y action
State on event_name action
State creator tool
Merge tool
Default state
Stateflow coder
Bouncing Ball
( ) ( )
( ) ( )
| |
Free fall:
0
Collision:
, 0,1
y g
y t y t
y t cy t c
+
+
=
= =
=


Power Conditioning System
High power drives in vehicle applications
Startup (precharge)
Normal (current regulation)
Shutdown (bleed)
Background (Boost converters)
M. Senesky, G. Eirea, and T. J . Koo, "Hybrid Modeling and Control of Power
Electronics," in Hybrid Systems: Computation and Control, vol. 2623, Lecture Notes in
Computer Science. New York: Springer-Verlag, 2003, pp. 450-465.
P. Gupta and A. Patra, "Hybrid Sliding Mode Control of DC-DC Power Converters,"
presented at IEEE Tencon 2003, Bangalore, 2003.
L
i
C
o
v
+
-
E
o
R
bleed
R
pre
R
Power Conditioning System
1
s
Time
Synch
Step1
Step
Scope
Total Load Current
Main Breaker
Precharge
Bleed
Bank Voltage
Mains Voltage
Mains Current
Bank Current
Power System
Power
1
On
-1
Off
Voltage
I_avge
Time
MainBreaker
PreBreaker
Bleed
I_avge_reset
Time_reset
Modes1
Memory2
Memory1
Memory
10
Gain
0
Display
1
Constant1
Clock
1
s
Avge Current
MainBreaker {OFF=-1, ON=1}
MainBreaker {OFF=-1, ON=1}
PreBreaker {OFF=-1, ON=1} PreBreaker {OFF=-1, ON=1}
Bank Voltage
Mains Voltage
Mains Current
Bank Current
Bleed Breaker {OFF=-1, ON=1} Bleed Breaker {OFF=-1, ON=1}
Avge Current Reset
Avge Current Reset
Time Reset
I_avge
Time
Power Conditioning System
Power Conditioning System
Inverted Pendulum ~ 1
2
2 cos sin
cos sin
Suppose we choose to regulate , so that the
pendulum equations are
sin cos
where is treated as a control.
x v
v F
v
F v
u
u





=
=
+ = +
+ =
=
=

Inverted Pendulum ~ 2
| |
Suppose we wish to design a global feedback controller
that will steer any initial state to the upright position
with the constraint 1,1.
Feedback linearization will not work in general, choose
so t
u
u

hat
sin cos 0 2 0
2 sin
within constraints only near 0.
cos
u
u


+ = + + =

= =

Inverted Pendulum Swing-up


Strategy
( )
| |
( )
2
1
2
, sin cos cos 1
0 when 0, 0
1) pump/remove energy into system until 0, ,
sin cos sin cos
2) wait until pendulum is close to upright
3) apply feedback
pend
pend
pend pend
u E
E
E E
E u u




= = = +
= = =

= =

linearizing control
Inverted Pendulum: Control
Strategy
Constant energy trajectories, 0,
in 'wait' state. Switch to 'stabilize' in
blue box.
u =
Brocketts Necessary
Condition
Necessary Condition for
Asymptotic Stability
( ) ( )
( )
( )
( ) ( ) ( )
, , , , 0,0 0
: (Brockett) Suppose is smooth and the origin is
stabilized by a smooth state feedback control ,
0 0. Then the mapping : ,
, maps neighborhoods of the origi
n m
n n
x f x u x R u R f
f
u x
u F R R
F x f x u x
= =
=
=
Theorem

( )
( )
n
into neighborhoods of the origin, i.e.
0 0 such that
alternatively, is a neighborhood of 0 .
m n
B F B
f B R R

> >

Example 1
1
2 1
x u
x x u
=
=

1.0 0.5 0.5 1.0


x
1
1.0
0.5
0.5
1.0
x
2
1.0 0.5 0.5 1.0
F
1
1.2
1.0
0.8
0.6
0.4
0.2
0.2
F
2
Points on F2 axis
close to F1 axis are
outside image.
Example 2
1 3 1
2 3 1
3 2
2 1
cos cos
sin sin
Notice that points on the axis close to axis
are not in the image of the mapping.
x
x
x v x x u
d
y v x x u
dt
x u
F F


=
( (
( (
= =
( (
( (
=

Notions of Solution for


Discontinuous Dynamics
Solutions of ODEs
Classical Solutions
Caratheodory Solutions
Satisfies the ode almost everywhere on [0,t]
Filippov Solutions (differential inclusion a set)
( ) ( ) ( ) ( )
0
, , 0 x t f x t t x x = =

( ) ( ) ( )
0
0
,
t
x t x f x s s ds = +

( ) ( ) ( ) ( )
0
, , 0 x t x t t x x = F

Classical Solutions
( ) ( ) ( )
( )
,
: is continuously differenti classical solution able.
x t f x t t
x t
=

1 2 3 4
t
0.2
0.4
0.6
0.8
1.0
vt
Example: brick on ramp
with stiction.
sgn sin mv v cv mg = +
Not a classical solution
Caratheodory Solutions
( ) ( ) ( )
| |
is satisfied at almost all points on every
interval , ,
Stopping solutions for the brick on ramp problems are not
Caratheodory solutions. For these solutions the brick is
stopped on a finite
x t f x t
t a b a b
=
>

( ) | |
( ) | |
interval, i.e, 0 on ,
0 on ,
sgn0 sin 0
v t t a b
v t t a b
mg
=
=
+ =

Brick Example try something


else
sgn sin
sgn sin
sin 0
sin , sin 0
sin 0
mv v cv mg
c
v v v g
m m
c
v v g v
m m
v g g v
m m
c
v v g v
m m


= +
= +
= + >
(
+ + =
(

= + <

Filippov Solutions
0
( )
( ( ), ): conv ( ( , ( )) ( , ( )), )
dx t
x t t f S x t x t t
dt


>
= F

{ } } : ) , ( < = x y R y x S
n
( , ):subset of measurezeroonwhich isnot defined x f
(
(
Example: nearest neighbor
3 agents moving in square
Q
Rule: move diametrically
away from nearest
neighbor
{ } { }
{ }
1 2 3
Nearest neighbor to
argmin , , \
Action
i
i i i
i i
i
i i
p
p q q Q p p p p
p
p
p
=

N
N
N
Example: nearest neighbor,
contd
Consider 1 agent - in which case
the only obstacles are the walls.
The nearest neighbor is easily
identified on the nearest wall.
The vector field is well defined
everywhere except on the
diagonals where it is not defined
because there are multiple
nearest neighbors.
1
1
1
p q
p
p q

Example: nearest neighbor,


contd
( )
( )
( )
( )
( )
2 1 2
1 2 1
1 2
2 1 2
1 2 1
0, 1
1,0
,
0,1
1,0
x x x
x x x
x f x x
x x x
x x x
< <

< <

= =

< <

< <

( )
0 1
1 , 0 1
1 0
f
( (
+
( (

Extension of Brocketts
Condition
( )
( )
( ) ( )
( )
( ) ( )
Assumption on , :
convex , convex
conv , ,conv
: Admissible feedback controls are piecewise continuous and
solutions are defined in the sense of Filippov
,
m n
m
f x u
A R f x A R
A R f x A f x A
u x
x f x u x


(


Definition
F

( )
( )
( )
and 0 0
(Ryan): For , continuous and satisfying assumption, asymptotic
stabilization by discontinuous feedback each neighborhood
of 0 , is a neighborhood of 0 .
n m n
u
f x u
R f R R
(


Theorem
F
B
B

You might also like