continuous system modeling

27
Continuous System Modeling

Upload: ishi

Post on 05-Feb-2016

56 views

Category:

Documents


1 download

DESCRIPTION

Continuous System Modeling. Need various types models. Advances in system development ultimately rely on well-constructed predictive models Applications: traditional fields such as electrical and mechanical engineering newer domains such as information and bio-technologies - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Continuous System Modeling

Continuous System Modeling

Page 2: Continuous System Modeling

Need various types models• Advances in system development ultimately rely on well-constructed

predictive models

• Applications:– traditional fields such as electrical and mechanical engineering – newer domains such as information and bio-technologies

• Using appropriate simulation software, we can derive solutions to difficult problems using such models

• Success often depends on having a variety of modeling approaches available to formulate the right model for the particular issue at hand

• Therefore, a broad familiarity with different types of models is desirable

Page 3: Continuous System Modeling

Continuous System Models

• Continuous system models were the first widely employed models and are traditionally described by ordinary and partial differential equations.

• Such models originated in such areas as physics and chemistry, electrical circuits, mechanics, and aeronautics.

• They have been extended to many new areas such as bio-informatics, homeland security, and social systems.

• Continuous differential equation models remain an essential component in multi-formalism compositions.

Page 4: Continuous System Modeling

Multi-formalism Compositions

• A host of formalisms have emerged in the last few decades that greatly increase our ability to express features of the real world and employ them in engineering systems.

• Such formalisms include Neural Networks, Fuzzy Logic Systems, Cellular Automata, Evolutionary and Genetic Algorithms, among others.

• Hybrid models combine two or more formalisms, e.g., fuzzy logic control of continuous manufacturing process.

• Most often, applications will require such hybrids to address the

problem domain of interest.

Page 5: Continuous System Modeling

Fundamental Systems Problems

Systems Problem Does source of the data exist? What are we trying to learn

about it?

Which level transition is involved?

systems analysis The system being analyzed may exist or may be planned. In either case we are trying to understand its behavioral characteristics.

moving from higher to lower levels, e.g., using generative information to generate the data in a data system

systems inference The system exists. We are trying to infer how it works from observations of its behavior.

moving from lower to higher levels, e.g., having data, finding a means to generate it

systems design The system being designed does not yet exist in the form that is being contemplated. We are trying to come up with a good design for it.

moving from lower to higher levels, e.g. having a means to generate observed data, synthesizing it with components taken off the shelf.

Page 6: Continuous System Modeling

M&S Entities and Relations

Real WorldReal World SimulatorSimulatorSimulatorSimulator

modelingrelation

simulationrelation

Each entity is represented as a dynamic system

Each relation is represented by a homomorphism or other equivalence

Data: Input/output relation pairs

structure for generating behaviorclaimed to represent real world

Device forexecuting model

Model

Page 7: Continuous System Modeling

M&S Framework: Continuous case

Real WorldReal World SimulatorSimulatorSimulatorSimulator

modelingrelation

simulationrelation

Model

d q(t) / dt = x(t)

Numerical Integration:•Accuracy•Error effects

Validity:•Accuracy of -retro-diction-prediction

Page 8: Continuous System Modeling

Specification Levels for Differential Equation Systems

Level Specification Name What we know at this level Differential Equation System Specification0 Observation Frame how to stimulate the system with inputs;

what variables to measure and how to observe them over a time base;

Input and output ports with continuous variables

1 I/O Behavior time-indexed data collected from a source system; consists of input/output pairs

Input/output pairs described by relational equations using first and higher order derivatives, usually linear and some non-linear

f(y(t), d y(t)/dt, ..., d yn(t)/dtn , x1(t), x2(t),..., xm(t))=0

e.g. d y2(t)/dt2 - (1 – y2) * d y(t)/dt - x1(t) =0

2 I/O Function knowledge of initial state; given an initial state, every input stimulus produces a unique output.

State Operator description

y[0,t] = L(y(0),x(0,t))3 State Transition how states are affected by inputs; given a

state and an input what is the state after the input stimulus is over; what output event is generated by a state.

Canonical Ordinary Differential Equation Model

d q1(t)/dt = f1(q1(t), q2(t), ..., qn(t), x1(t), x2(t),..., xm(t))

...

d qn(t)/dt = fn(q1(t), q2(t), ..., qn(t), x1(t), x2(t),..., xm(t))

<y1(t), y2(t),..., yn(t) > = g(<q1(t), q2(t),..., qm(t)>)

x,y = input and output vectors

q = state vector

Model, usually linear, can be induced from level 2 by realization methods4 Coupled

Componentcomponents and how they are coupled together. The components can be specified at lower levels or can even be structure systems themselves – leading to hierarchical structure.

Components can be atomic DESS systems e.g. Integrators, or couplings of them, in hierarchical structure

Page 9: Continuous System Modeling

Canonical Ordinary Differential Equation Model

d q1(t)/dt = f1(q1(t), q2(t), ..., qn(t), x1(t), x2(t),..., xm(t))d q2(t)/dt = f2(q1(t), q2(t), ..., qn(t), x1(t), x2(t),..., xm(t))

...d qn(t)/dt = fn(q1(t), q2(t), ..., qn(t), x1(t), x2(t),..., xm(t))

d q1/dt q1f1x

d q2/dt q2f2

d qn/dt qnfn

qx

qx

qx

...

Page 10: Continuous System Modeling

Numerical Integration

1

f(q(ti),x(ti))

x(ti)

q

x

q(ti)

Euler or rectangular method.

h

tqhtq

dt

tdqh

)()(lim

)(0

dt

tdqhtqhtq

)()()(

0 2h 3hh

q(0)q(h)

q(2h)

q(3h)

= f(q(t),x(t)) q((n+1)h)=q(nh)+h*f(q(nh),x(nh))

= f(q(t),x(t))

Page 11: Continuous System Modeling

Feedback Coupling

f2 q1 q2 f3 q3qn f1

... qn

11

22 1

1

( )

( )

...

( )

n

nn n

dqf q

dtdq

f qdt

dqf q

dt

1

1 1

1 1

1

)

)

( )

Direct influence is negative if ( ( )) ( (-)

and positive if( ( )) ( (+)

There is no connection if

( ) 0, i.e., 0

ii i

i i i

i i i

ii i

dqf q

dt

sign f q sign q

sign f q sign q

dqf q

dt

Page 12: Continuous System Modeling

Feedback Qualitative Analysis

For a feedback connection there are no zero influences.

Then the feedback loop is negative (positive) if

is odd (even)

where is the number of negative direct influences

i.e., sign is determined b

N

NN P Ny (-1) (1) (-1)

e.g. 0, 1 positive feedback

1, 0 negative feedback

2, 0 positive feedback

1, 1 oscillationBut:

N P

N P

N P

N P

Direct influences multiply in sign:

(+)(+)= +

(+)(-)= -

(-)(-)= +

f2 q1 q2 f3 q3qn f1

... qn

f

Page 13: Continuous System Modeling

2nd Order Linear System (undamped)

v x

-

x

v

v x

-

x

v

v x

-

x

v

2 exponential growthP

2 exponential growthN

1, 1 oscillationN P

angular frequency =

2period = = T

Page 14: Continuous System Modeling

Continuous system simulation languages and systems

state-space description languages:

• Continuous System Simulation Language (CSSL) standard, e.g., ACSL

• block oriented simulation systems, e.g., Simulink

CSSL PROGRAM Van der PolINITIAL

constantk = -1, x0 = 1, v0 = 0,tf = 20

ENDDYNAMIC

DERIVATIVEx = integ(v, x0)v = integ((1 – x**2)*v – k*x, v0)

ENDtermt (t.ge.tf)

ENDEND

Van der Pol Oscillator

Page 15: Continuous System Modeling

Simulink building blocks

Sum: y = x1 + x2++

integrator: dq / dt = x, y = q1/s

* Multiplier: y = x1 * x2

c Gain: y = c * x

cConstant: y = c

f(x)Function: y = f(x)

Sinusgenerator: y = sin (t)

Subsystem: Placeholder for a subnetwork model

1Inport: Input from an external model

1Outport: Output to an external model

Page 16: Continuous System Modeling

Van der Pol Oscillator in Simulink Block Diagram

1/s

k

1/s-+

-+

1

* *

v x

1

Page 17: Continuous System Modeling

1st Order Linear System – exponential growth/decay

q

c

( ) ( )dq

f q f q cqdt

0c

0c

Page 18: Continuous System Modeling

1st Order– constant input toexponential decay

x + q

-c

( , ) ( )

At equilibrium,

0 = /eq

dqf q x f q x cq

dt

dqx cq q x c

dt

( ) ( )difference t x cq t

/eqq x c

Page 19: Continuous System Modeling

Damped Linear oscillator of second order

F(t)

x

d

k

m F(t) + v

-d

x

-k

(a) (b)

m = 1

Page 20: Continuous System Modeling

Van der Pol Oscillator Dynamic Behavior

Page 21: Continuous System Modeling

Lotka Volterra Model and Behavior

py = prey populationpd = predator population

Exercise:• write the ODE for the model• find the equilibrium point of the Lotka-Volterra model•investigate the oscillations around this equilibrium. •where do the maximum and minimum populations occur? •show that small oscillations around the equilibrium are approximated by the 2nd order linear oscillator.

eq

eq

bpd

kd

pyc

[ ] ( ) ( , )

[ ]( ) ( , )

d py d dkb k pd py kpd py pd o py pd

dt c cd pd b cb

d cpy pd py o py pddt k k

dk cbdb

c k

bpd pd

kd

py pyc

py

pd

eq

dpy

c

eq

bpd

k

db maxpd

minpd

maxpyminpy

Page 22: Continuous System Modeling

Locating Min/Max using Zero Crossings

dq

dt

0 at '

is maximum or minimum

at '

dqt t

dt

q

t t

q

qdq

dt

Page 23: Continuous System Modeling

Limit Cycle and Chaos are Opposites

• limit cycles – initial state eventually winds up in a periodic loop or cycle

• chaos – trajectories are sensitive to initial states – small difference in initial state results in large difference in trajectory

• Note – ODE models are deterministic – if the input is zero, then if a trajectory returns to an earlier state, it will get into a cycle

• If a chaotic model has a trajectory that comes close to an earlier state than it diverges from that earlier portion due to its sensitivity to initial states

• BUT – a chaotic model can have a “strange attractor” i.e., a subset to which always returns, though not with a fixed period.

Page 24: Continuous System Modeling

Rössler Model and Chaotic Behavior

+

y x-1

-1

fz

fz (x, z) = b + (x – c)*z

z+

-a

state plane (v , z) to x time behavior

/ - ( )

/

/ ( - )

a = b = 0, c = 4.7

/ =0 y=-z

/ 0 x= 0

/ 0 z=0 or x=c z=0

equilibrium point = (0,0,0)

dx dt y z

dy dt x a y

dz dt b z x c

dx dt

dy dt

dz dt

interactive applet at: http://www.geom.uiuc.edu/~worfolk/apps/Rossler/

Page 25: Continuous System Modeling

Rössler Behavior

http://astronomy.swin.edu.au/~pbourke/fractals/rossler/

http://mathforum.org/advanced/robertd/rossler.html

a = b = 0.2, and c = 8.0.

Page 26: Continuous System Modeling

Lorenz Attractor– Butterfly Effect

Java applet: http://www.cmp.caltech.edu/~mcc/chaos_new/Lor_docs/intro.html

For a < 1 the solution rapidly decays to the origin X=Y=Z=0. This corresponds to no motion in the fluid context. For a > 1 (e.g. a=5) the orbit approaches one of two fixed points (depending on the initial values) away from the origin. The fixed points are at X 2 =Y 2=Z=a-1. In the convection context this corresponds to nonzero but steady fluid flow (in a circulating "roll" configuration). At larger values of a, for example a=24.1, the long time dynamics may either approach one of the fixed points or a strange attractor (depending on the choice of initial values), which coexist at these values of a. (Choose nearby initial values to find solutions that converge to the fixed points.) For a>24.74 the strange attractor collides with the fixed points, which become unstable so that practically all initial values lead to the familiar butterfly dynamics. a=28 gives the usual picture.

http://astronomy.swin.edu.au/~pbourke/fractals/lorenz/

/ - ( - )

/ - -

/ ( - )

8 / 3 10

dX dt c X Y

dY dt aX Y XZ

dZ dt b XY Z

b c

Page 27: Continuous System Modeling

References/Literature• Course Notes from: B. P., H. Praehofer and T. G. Kim (2000). Theory of Modeling

and Simulation: Integrating Discrete Event and Continuous Complex Dynamic Systems, (2nd Ed.) Academic Press, NY.)

• On reserve: A First Course in Differential Equations: The Classic Fifth Edition (Hardcover) by Dennis G. Zill, Brooks Cole; 5 edition (December 8, 2000)

• Others:– The Nonlinear Workbook: Chaos, Fractals, Celluar Automata, Neural Networks, Genetic

Algorithms, Gene Expression Programming, Support Vector Machine, Wavelets, Hidden Markov M (Paperback) by Willi-Hans Steeb, 588 pages, Publisher: World Scientific Publishing Company; 3rd edition (July 15, 2005)

– Modeling and Analysis of Post-Conflict Reconstruction, Damon B. Richardson, Richard F. Deckro, and Victor D. Wiley, JDMS: The Journal of Defense Modeling and Simulation,October 2004, Volume 1 Number 4

– Fernando J. Barros, A Formal Representation of Hybrid Mobile Component, SIMULATION, May 2005; 81: 381 - 393.

– What is signal and what is noise in the brain? A.Knoblauch, G.Palm, Biosystems 79(1-3), pp 83-90, 2005.

– Discrete Event Multi-Level Models for Systems Biology, Uhrmacher, A.M. and Degenring, D. and Zeigler, B.P, LNCS Transactions on Computational Systems Biology, Vol. 1, 3380/2005, pp. 66-85.

– Modifications of the Helbing-Molnár-Farkas-Vicsek Social Force Model for Pedestrian Evolution, Taras I. Lakoba, D. J. Kaup, and Neal M. Finkelstein, SIMULATION 2005 81: 339-352.