Workshop: Dealing with real-time in real world Hybrid Systems - - PowerPoint PPT Presentation

workshop dealing with real time in real world hybrid
SMART_READER_LITE
LIVE PREVIEW

Workshop: Dealing with real-time in real world Hybrid Systems - - PowerPoint PPT Presentation

Workshop: Dealing with real-time in real world Hybrid Systems Pieter van Schaik Altreonic NV August 24, 2015 From Deep Space To Deep Sea Outline Overview of Hybrid Systems A Practical Example: Yaw Control Summary Questions for


slide-1
SLIDE 1

From Deep Space To Deep Sea

Workshop: Dealing with real-time in real world Hybrid Systems

Pieter van Schaik Altreonic NV August 24, 2015

slide-2
SLIDE 2

Outline

  • Overview of Hybrid Systems
  • A Practical Example: Yaw Control
  • Summary
  • Questions for Discussion

23/08/2015 From Deep Space to Deep Sea 2

slide-3
SLIDE 3

Overview of Hybrid Systems

Abbreviated definition: “A Hybrid System is a dynamical system with both discrete and continuous state changes” Simply stated: A Hybrid System is embedded software controlling a physical process

23/08/2015 From Deep Space to Deep Sea 3

slide-4
SLIDE 4

The Challenge

How can we provide people and society with Hybrid Systems that they can trust their lives on?

  • Methodology to enable compositional certification

Eliminate recertification after integration

  • New Formal Modeling Techniques

Conventional models focus on discrete systems

23/08/2015 From Deep Space to Deep Sea 4

slide-5
SLIDE 5

Motivating Examples

Air Traffic Control Systems (ACAS X)

  • Differential Dynamic Logic indicated conflicts with

actual advisory European Train Control System ETCS

  • Successful verification of cooperation layer of fully

parametric ETCS

23/08/2015 From Deep Space to Deep Sea 5

slide-6
SLIDE 6

A Practical Example: Yaw Control

  • Goal: Formally model discretization of the KURT skid-

steer yaw control

Specific focus on stability of the closed loop system

  • Abridged development embedded in Hybrid Event-B

formalism

Reference: R. Banach, E.Verhulst, P. van Schaik. Simulation and Formal Modeling of Yaw Control in a Drive-by-Wire Application. FedCSIS 2015

23/08/2015 From Deep Space to Deep Sea 6

slide-7
SLIDE 7

Simulations of Yaw Control

  • Initial design validation with Modelica simulation

Stability of control strategy

  • Simplified PID based control strategy
  • PID parameter optimization by practical tuning

methods

23/08/2015 From Deep Space to Deep Sea 7

slide-8
SLIDE 8

Modeling Continuous Time Systems

Transfer Function

  • Derived from linear time invariant (LTI) differential

equation using Laplace Transform:

ω σ j s where dt e t f s F

st

+ = = ∫

∞ − −

) ( ) (

  • Transfer function is the ratio of input and output

polynomials in s, evaluated with zero initial conditions

1 1 1 1

... ... ) ( ) ( ) ( a s a s a b s b s b s G s R s C

n n n n m m m m

+ + + + + = =

− − − −

  • Location of numerator and denominator roots in

complex s-plane characterise transfer function response

23/08/2015 From Deep Space to Deep Sea 8

slide-9
SLIDE 9

Exponential Stability of LTI Systems

  • Exponential stability analysis with transfer

function:

) 10 )( 8 )( 7 )( 1 ( ) 6 )( 4 ( 10 ) ( + + + + + + = s s s s s s s G

  • General terms of the output c(t) with unit

step input:

t t t t

Ee De Ce Be A t g

10 8 7

) (

− − − −

+ + + + ≡

  • i.e. any positive real pole causes unstable

behaviour

23/08/2015 From Deep Space to Deep Sea 9

slide-10
SLIDE 10

Hybrid Event-B

  • Hybrid Event-B - an extension of Event-B

All variables are functions of time Mode events and variables - discrete events and variables Pliant events and variables - variables with continuous evolution over time Interfaces allow access to shared variables

23/08/2015 From Deep Space to Deep Sea 10

slide-11
SLIDE 11

Discrete Event Systems

  • Classes of DES models:

Untimed DES

  • only concerned with logical behaviour, ex. whether a

particular state is reachable

Timed DES

  • concerned with both logical behaviour and timing

information, ex. whether a particular state is reachable and when it will be reached

  • Stability of DES:

for some set of initial states the system's state is guaranteed to enter a given set and remain there forever

23/08/2015 From Deep Space to Deep Sea 11

slide-12
SLIDE 12

Hybrid Systems

  • General Hybrid Dynamical System

dynamic behaviour - differential/difference equations discrete state space - transition map

  • Stability of Hybrid Systems

dynamic behaviour stability - exponential stability properties of the transition map

23/08/2015 From Deep Space to Deep Sea 12

slide-13
SLIDE 13

Formal Modeling Yaw Control

  • KURT yaw rate mathematical model:

) ( ) ( t stc C t yrm dt d

k

=

  • PID controller mathematical model:

+ + =

t D I p

t yre dt d T ds s yre T t yre K t stc )] ( ) ( 1 ) ( [ ) (

  • Substituting yre(t) = YRR - yrm(t) results in:

) ( 1 ) ( ) ( ) 1 (

2 2

= + + + t stc T t stc dt d t stc dt d K C T

I P k D

  • Exponential stability requires that:

1 and > + >

P k D I

K C T T

23/08/2015 From Deep Space to Deep Sea 13

slide-14
SLIDE 14

Continuous Time HEB Model

  • Equivalent Hybrid Event-B system:

23/08/2015 From Deep Space to Deep Sea 14

slide-15
SLIDE 15

General Model of Yaw Control

Addressing more arbitrary steering episodes requires solving for:

) ( ) ( ) ( t t t dt d b b b b Astc Astc Astc Astc stc stc stc stc + =

where A A A A is constant, stc stc stc stc(t) depends on stc(t) and stc'(t), b b b b(t) is dependent on the inhomogeneous term:

)) ( 1 ) ( ) ( ( 1 ) (

2 2 3 3

t yrr dt d T t yrr dt d t yrr dt d T C t inh

I D K

+ + =

23/08/2015 From Deep Space to Deep Sea 15

slide-16
SLIDE 16

Discretizing Yaw Control

Discretizing Hybrid Event-B Yaw Control

  • Implementation on a discrete computing platform

requires sampling

  • Strategy of viewing discretizing as a refinement poses

difficulties:

formal standpoint is sampling impoverishes the continuous model degrades information available for consistency proof

  • Argument for HEB approach:

stability of the discretized system ensures that the system can be steered to a desired regime

23/08/2015 From Deep Space to Deep Sea 16

slide-17
SLIDE 17

Sampled Data Systems

  • Sampling frequency must be related to

characteristics of function being sampled

Sampling frequency too low -> loss of important information Sampling frequency too high -> unnecessarily cost/complexity

  • Important to understand the effects of sampling

23/08/2015 From Deep Space to Deep Sea 17

slide-18
SLIDE 18

Signal Bandwidth Illustration

https://en.wikipedia.org/wiki/File:Fourier_series_and_transform.gif 23/08/2015 From Deep Space to Deep Sea 18

slide-19
SLIDE 19

Effects of Sampling

Pictorial representation of the effect of sampling:

  • The central signal spectrum can be recovered by low

pass filtering (anti-aliasing filter)

  • Shannon-Nyquist theorem limits sampling interval:

For band limited signals:

W Ts π =

max

23/08/2015 From Deep Space to Deep Sea 19

slide-20
SLIDE 20

Sampling Effect Illustration

23/08/2015 From Deep Space to Deep Sea 20

slide-21
SLIDE 21

Stability of Sampled Data Systems

  • Sampling period affects stability:

Example: Consider the following SDS transfer function:

) 10 11 ( ) 1 ( 10 ) ( − − − =

− − T T

e z e z T

For T > 0.2 the resulting transfer function is unstable

23/08/2015 From Deep Space to Deep Sea 21

slide-22
SLIDE 22

Discretized HEB Yaw Control

Resulting discretized Hybrid Event-B model:

23/08/2015 From Deep Space to Deep Sea 22

slide-23
SLIDE 23

A Practical Example: Yaw Control

Discretized Stability Analysis

  • A similar approach to analogue counter part resulted in:

] 2 , 2 1 , 2 , , 1 , 2 , 1 , 2 , 3 ,

/ ) ( ) 2 ( [ 2

I k D k D k D k D k D k D D P K k D k D k D

T stc T stc stc T stc stc stc T K C stc stc stc

+ + + + + + + +

+ − + + − − = + −

  • Requires solving for:

] 2 / 1 [ ] / 2 / [

2 2 3

= + − − + − + + +

D P k D P k P k P k D I P k

T K C W T T K C K C W K C T T T T K C W

  • For stability, eventually deduce:

D P k

T K C > 1

23/08/2015 From Deep Space to Deep Sea 23

slide-24
SLIDE 24

Summary

  • Viewing discretization as an instance of

refinement is demanding

  • Many simplifications required to render

calculations tractable

mathematical insight and domain knowledge required

  • Closer cooperation needed between frequency

domain and state space approaches

23/08/2015 From Deep Space to Deep Sea 24

slide-25
SLIDE 25

Questions for Discussion

  • Can sampling theory be applied to reconcile

continuous and discrete views in a way that is acceptable to formal techniques?

  • Can supporting tools make hybrid system

formal methods more accessible to engineers?

23/08/2015 From Deep Space to Deep Sea 25