Heterogeneous Modeling Hybrid Systems Hybrid Models Automotive Powertrain Languages and Verification Problems Simulink and StateFlow CheckMate Charon Masaccio Motivation Hybrid Systems are becoming a major modeling paradigm for embedded systems Capability of modeling controller and plant Use of concurrent multiple levels of abstraction Difficult to verify and design Combination of continuous and discrete dynamics of different types Lack of operationally strong theoretical results Variety of tools and approaches mutually incompatible due to modeling differences Foundations of Hybrid Model Used classic model by J Lygeros S Sastry and C Tomlin as basis Model consists of three parts Structure sets discrete and dynamical components Time Bases intervals over which behavior is continuous Hybrid execution rules according to which we have jumps and continuous flows Observations Non deterministic behavior allowed needed Fixed interaction structure System Specifications Closed loop vehicle model Driver Key Brake Gas Transm emissions external noise temperature Vehicle force speed acceleration jerk rpm fuel consumption Engine Driveline spark advance injection time throttle angle Controller IN P U T S S top K K ey G G as P edal T C lu t c h Ped al Gear S t i ck B Brak e P ed al C C ru i se C o n tro l S tar tu p K Start n 0 FG 0 n n m in K O ff G 0 FG 0 n n st art up D C o m fort G 0 G 0 IdT le 0 n a r gm in M fu el G 0 R pm Tr acking n n G FG 0 FG 0 G 0 T 0 T 0 F a st N e g a tiv e F o r ce T r a ns ien t m ax D m ax F G F G G T n f I n 0 G 0 T 0 G 0 t T 0 F o r ce T r a ck ing G 0 t m in f D M fue l G GB B 1 G 0 B 1 S pe e d T r ack in g T 0 n E ng i ne S p eed F G Gen erat ed Fo rce V G V eh i cl e S p eed n n n m in K O f f T 0 G 0 O U T PU T V G V G m ax F G F G G T n F a st P o si tiv e F o r ce T r a ns ien t m in G GA M fue l M m a x D D m in f I n 0 G 0 G 0 C 1 F G F G G T n f I n G 0 I dle T r a sm On n n T 0 Why Mixed Models of Computation in internal combustion engines control Specifications Control variables input Throttle valve Fuel injection Spark ignition value time Continuous Continuous Discrete Continuous Discrete Discrete Physical processes in the plant Description of the HW SW implementation constraints Model of Power train Throttle opening angle Simple Manifold continuous system Manifold pressure Clutch Insertion Release Engine subsystem Spark timing Torque Gear change Drive line continuous system with changing dynamics Vehicle Speed 4 stroke engines Engine and Power train Model CTS CTS Intake Manifold V t V t a motor dynamics t p t air dynamics n t V t throttle motor voltage t throttle angle n t crankshaft speed p t manifold pressure Power train t T t power train dynamics T t generated torque t t e t torsion angle n t crankshaft speed t crankshaft angle p t wheel speed Engine and Power train Model intake manifold power train cylinders Hybrid Systems in the Tagged Signal Models TSMs Framework Hybrid systems can be seen as formalisms for describing a complex system using mixed models of computation when a single one is not powerful expressive or practical enough An event e V T V is the set of values and T is the set of tags e g universal time T is the set of real numbers discrete time T is a totally ordered discrete set a a signal is a set of events process with N channels is a subset of the set of N tuples of signals Models of Computation A Finite State Machine FSM is a synchronous TSM process in A Sequential System SS is a synchronous TSM process in which A Discrete Event System DES is a timed TSM process in which A Continuous Time System CTS is a timed TSM process in which the tags take values in N and the inputs outputs and states take values on finite sets the tags take values in N and the inputs outputs and states assume values on infinite sets the tags are order isomorphic with N and denote instants of time which the tags take values in a connected set on which a metric is defined and denote instants of time A Discrete Time System DTS is a synchronous DES Hybrid Tagged Signal Model of a Single Cylinder engine cycle torque profile air intake torque generation delay Engine Cycle FSM positive spark advance the spark is given before the TDC between the compression and expansion strokes negative spark advance the spark is given after the TDC between the compression and expansion strokes Torque Generation Delay SS Sequential System Torque Profile CTS Continuous Time System T i t real profile piece wise profile spark t a I BS k 2 PA k 1 k AS H k 1 Engine and Power train Model intake manifold power train cylinders Hybrid Model vs Mean Value Model Mean Value Model accurate over a longer time window regulation control problems low performance transient problems Hybrid Model cycle accurate transient control problems stability of delay sensitive control algorithms high performance control algorithms Outline Hybrid Models Languages and Verification Problems Simulink and StateFlow CheckMate Charon Masaccio What is a simulator Given a mathematical model of the system computes its evolution and its outputs under a pre determined set of inputs The mathematical model expresses heterogeneity and concurrency The simulator computes the response of the model by mapping it onto the device used to carry out the computation In general the computing device has limited resources and is digital We must embed the model of time of the model into the model of the computing device that gives the common denominator e g discretize time synchronize We must map a set of concurrent processes into a sequential system e g schedule execution of concurrent processes Hybrid Systems Simulation t FSM Discrete Event and other MOCs Inputs Interface Invariants Guards Sampling Outputs Continuous Time Integrator hold t Hybrid System Simulation A simulator for hybrid systems must capture different types of behaviors Continuos Time Discrete Events FSMs and resolve the domain interface problems Continuous Time Model of computation is DISCRETE TIME All variables are computed at each time point no run time scheduling decisions on variable computation Time interval can be fixed bad for stiff systems but no run time decision variable sophisticated solvers have this Variable time step …
View Full Document
Unlocking...