Platform-Independent Debugging of Physical Interaction and Signal - - PowerPoint PPT Presentation

platform independent debugging of physical interaction
SMART_READER_LITE
LIVE PREVIEW

Platform-Independent Debugging of Physical Interaction and Signal - - PowerPoint PPT Presentation

Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Platform-Independent Debugging of Physical Interaction and Signal Flow Models Mehdi Dadfarnia 1 Raphael Barbau 2 1 National Institute of Standards


slide-1
SLIDE 1

1/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Platform-Independent Debugging of Physical Interaction and Signal Flow Models

Mehdi Dadfarnia1 Raphael Barbau2

1National Institute of Standards & Technology 2Engisis, LLC

April 9, 2019 2019 IEEE International Systems Conference

slide-2
SLIDE 2

2/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Table of Contents

1

Intro

2

Background

3

Debugging Methods

4

Conclusions & Future Work

5

References & Backup Slides

slide-3
SLIDE 3

3/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Table of Contents

1

Intro

2

Background

3

Debugging Methods

4

Conclusions & Future Work

5

References & Backup Slides

slide-4
SLIDE 4

4/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Introduction

Debugging procedures for integrated systems modeling and simulation tools Integration via SysPhS (publicly available standard)

Platform-independent integration of SysML with physical interaction and signal flow simulation tools

Physical interaction & signal flow (PISF) models:

Interconnected components (system structure) Energy/information exchanges between components (system behavior)

slide-5
SLIDE 5

5/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Systems Modeling & Simulation Tools

Systems modeling languages Organize & coordinate analysis focusing on subsets of components and interconnections Higher-level abstraction of component physical interactions & signal flows Example: SysML Equation-based simulation languages Teams focus on separate subsets of components and interconnections with discipline-specific models Experiment with systems without physically building them Examples: Modelica, Simulink/Simscape

slide-6
SLIDE 6

6/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Integrating Systems Modeling & Simulation Tools

PI & SF simulation languages & tools

SysML

stm TireTraction [State Diagram] Gripping Slipping LossOfTraction RegainTraction

SysPhS

Exchanging models of physical and informational behaviors

slide-7
SLIDE 7

7/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Goals

Find errors in system models before they propagate to simulation models on multiple platforms

Does not require translating fixes to simulation models back into system models Verifies system models before discipline-specific experts focus

  • n their subsets

Debug in higher abstraction system models before translation to lower abstraction, domain-specific simulations

Identify causes of failure to:

Execute simulation files translated from system models Get expected results from simulation execution

slide-8
SLIDE 8

8/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Table of Contents

1

Intro

2

Background

3

Debugging Methods

4

Conclusions & Future Work

5

References & Backup Slides

slide-9
SLIDE 9

9/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Types of Errors & Debugging Techniques for PISF Models

Errors that cause simulation failures Inconsistent underlying system of equations & erroneous symbolic transformations Examples: overconstrained or underconstrained equations; equations that would divide by zero; functions called outside their domain Errors that cause simulations to produce unintended results Desired system behavior different from simulation execution Examples: variable-values outside bounds; incorrect equations, function calls or initialization values; equation solver-specific behaviors

slide-10
SLIDE 10

9/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Types of Errors & Debugging Techniques for PISF Models

Debugging procedure depends on type of error Static Debugging: Identify errors that cause failure to compile or simulate by tracing symbolic transformations Dynamic Debugging: Identify errors that cause simulations to produce unexpected results by comparing executions to static traces Challenge: Identifying errors in (bidirectional) physical interactions

No ordered execution of command sequences More difficult in systems models: higher abstraction, fewer established debuggers

slide-11
SLIDE 11

10/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

State-of-the-art Debugging Techniques for PISF Models

Debugging physical interactions Modelica community: integrate traditional debugging (breakpoints, stepping); determine balance of equation systems; isolate data flow slices

Integrate static debugging output into dynamic debugger with variable explorer at simulation run-time (Sjolund et al. 2014)

Debugging systems models Architecture for systems model debugger focusing on visualizing variables at simulation run-time rather than tracing symbolic transformations (Canedo and Shen, 2013)

slide-12
SLIDE 12

11/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Modeling Physical Interactions and Signal Flows with SysPhS

dragCoefficient = 1.0 crossSectionalArea = 2.0{unit = squaredMeter} mass = 2000.0{unit = kilogram} initial values controlledVehicle : Car initial values radius = 0.5{unit=meter} impeller : Wheel hub kP = 200.0{unit = hertz} kI = 30.0{unit = hertzSquared} throttleAccRatio = 1.0{unit = secondSquaredPerMeter}

initial values

speedController : CruiseController throttleActuatorJack speedSensorJack speedDriverJack changetime = 100.0{unit = second} speed1 = 10.0{unit = meterPerSecond} speed2 = 15.0{unit = meterPerSecond} initial values driver : Person trqCoef = 1.0{unit = newtonMeter}

initial values powerSource : Engine

crankshaft SpeedSignal ThrottleSignal SpeedSignal AngularMomentum CruiseControlTotalSystem ibd «connector» impellerVehicleLink : ALMomentumTransformation lMTG gravVehicleLink : LMomPotEngTransformation airVehicleLink : LMomentumTransfer «connector» initial values acceleration = 9.8 {unit = meterPerSecondSquared}

  • peratingEnvironment : Earth

density = 1.2 {unit = kilogramPerCubicMeter} initial values atmosphere : Air rise = 0.1 stop = 70.0{unit = second} start = 50.0{unit = second} flat = 0.0

initial values surface : Road

Momentum LinearMomentum LinearMomentum rrCoeff = 0.5

IBD for a vehicle cruise control system

slide-13
SLIDE 13

11/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Modeling Physical Interactions and Signal Flows with SysPhS

Key modeling elements: SysML internal block diagram, SysPhS extension Parts, ports, and components model system components Connectors model interactions for PI&SF

Mathematical relationships via parametric diagrams Flow properties: specify the kind of signal or conserved physical substance (& their variables) flowing through boundary of component PhSConstant & PhSVariable property stereotypes Mathematical relationship between variables of flow properties: physical interactions vs signal flows; transformations across connectors

Implication for debugging: trace chains of connectors between components for the symbolic transformations

slide-14
SLIDE 14

12/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Table of Contents

1

Intro

2

Background

3

Debugging Methods

4

Conclusions & Future Work

5

References & Backup Slides

slide-15
SLIDE 15

13/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Overview

1 Preprocessing: Makes debugging complex models more

manageable

2 Static Debugging: Identifies errors in compiling or

simulating the platform model

3 Dynamic Debugging: Identifies errors in simulation behavior

Prior static debugging recommended, not required

slide-16
SLIDE 16

14/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Preprocessing: Simplifying SysML Models for Debugging

Decompose into smaller models; replicate fixes in complete model

Physical interactions-only & signal flows-only models

Steps to a physical interactions-only model: IBD: Eliminate non-physical interaction connectors & their connected parts/ports Parametric diagrams:

Eliminate equations determining variables bound to signal

  • ut-flow properties

Eliminate part/port properties only bound to these equations Replace equation variables bound to signal in-flow properties with constants

Similar steps for signal flow model (see backup slides)

slide-17
SLIDE 17

14/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Preprocessing: Simplifying SysML Models for Debugging

dragCoefficient = 1.0 crossSectionalArea = 2.0{unit = squaredMeter} mass = 2000.0{unit = kilogram}

initial values

controlledVehicle : Car

initial values

radius = 0.5{unit=meter} impeller : Wheel hub

trqCoef = 1.0{unit = newtonMeter} throttleSetting = 0.8

initial values

powerSource : Engine

crankshaft AngularMomentum CruiseControlPhysicalInteractions ibd

«connector»

impellerVehicleLink : ALMomentumTransformation lMTG gravVehicleLink : LMomPotEngTransformation airVehicleLink : LMomentumTransfer «connector»

initial values

acceleration = 9.8 {unit = meterPerSecondSquared}

  • peratingEnvironment : Earth

density = 1.2 {unit = kilogramPerCubicMeter}

initial values

atmosphere : Air rise = 0.1 stop = 70.0{unit = second} start = 50.0{unit = second} flat = 0.0

initial values

surface : Road

Momentum LinearMomentum LinearMomentum rrCoeff = 0.5

Only physical interactions

slide-18
SLIDE 18

14/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Preprocessing: Simplifying SysML Models for Debugging

Wheel par aMomF.aV : AngularVelocity aMomF.trq : Torque hub {aS1=-aS2} {lS=aS2*radius} {rr*trq1+trq2=0} «constraint» wC : WheelConstraint lS trq2 radius trq1 aS1 aS2 aMomF.aV : AngularVelocity speed : LinearVelocity aMomF.trq : Torque ^radius : Length «equal» «equal» «equal» «equal» «equal» «equal»

constraints parameters

rr rrCoeff : Real «equal» Wheel par aMomF.aV : AngularVelocity aMomF.trq : Torque hub {aS1=-aS2} {rr*trq1+trq2=0} «constraint» wC : WheelConstraint tq2 trq1 aS1 aS2 aMomF.aV : AngularVelocity aMomF.trq : Torque «equal» «equal» «equal»

constraints parameters

rr rrCoeff : Real «equal» «equal»

Parametric diagram changes for physical interactions model

slide-19
SLIDE 19

15/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Static Debugging for Failure to Execute Simulation

Trace & bookkeep symbolic transformations:

Chains of connectors between components in IBDs Constraint equations in parametric diagrams

Known vs unknown variables

Variables known before simulation: bindings to constant properties, initial values, & time values

Note: full trace must go through all connectors and parts/ports Replicate changes in original model

slide-20
SLIDE 20

15/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Static Debugging for Failure to Execute Simulation

Selecting a trace starting point: Physical interaction-only models: Part that initiates rest of interactions (car engine)

If multiple candidate parts or ports; select arbitrarily For non-obvious initiators: inspect parametric diagrams (more constants than variables)

Similar steps for signal flow-only models (see backup slides)

slide-21
SLIDE 21

15/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Static Debugging for Failure to Execute Simulation

dragCoefficient = 1.0 crossSectionalArea = 2.0{unit = squaredMeter} mass = 2000.0{unit = kilogram}

initial values

controlledVehicle : Car

initial values

radius = 0.5{unit=meter} impeller : Wheel hub

trqCoef = 1.0{unit = newtonMeter} throttleSetting = 0.8

initial values

powerSource : Engine

crankshaft AngularMomentum CruiseControlPhysicalInteractions ibd

«connector»

impellerVehicleLink : ALMomentumTransformation lMTG gravVehicleLink : LMomPotEngTransformation airVehicleLink : LMomentumTransfer «connector»

initial values

acceleration = 9.8 {unit = meterPerSecondSquared}

  • peratingEnvironment : Earth

density = 1.2 {unit = kilogramPerCubicMeter}

initial values

atmosphere : Air rise = 0.1 stop = 70.0{unit = second} start = 50.0{unit = second} flat = 0.0

initial values

surface : Road

Momentum LinearMomentum LinearMomentum rrCoeff = 0.5

A F C D E B Traces from starting point A (initiating interaction part or port)

slide-22
SLIDE 22

15/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Static Debugging for Failure to Execute Simulation

Bookkeeping of variables through parts and ports from A to B power- Source Value known? crankshaft Value known? hub Value known? impeller Value known? impeller- VehicleLink Value known? trqCoeff

torque

torque

torque

torque

throttle- Setting

angular velocity

angular velocity

angular velocity

angular velocity

rrCoeff

force

radius

linear velocity

radius

ground- force

ground- linear velocity

☐ Bookkeeping to track value assignments

  • Added benefit: spotting erroneous equations
slide-23
SLIDE 23

15/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Static Debugging for Failure to Execute Simulation

Bookkeeping of variables through parts and ports from C to B to F surface Value known? lMTG (ground) Value known? impeller- VehicleLink Value known? controlled- Vehicle Value known? linear velocity

force

torque

mass

slope

linear velocity

angular velocity

force

force

linear velocity

linear velocity

radius

ground- force

ground- linear velocity

Bookkeeping and value assignment

slide-24
SLIDE 24

16/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Dynamic Debugging for Unexpected Simulation Results

Simulation deviates from modeler expectations Bookkeep simulated values & compare to variables bound to flow properties

Understand flows of conserved substances and signals Related via connectors & constraints

Replicate changes in original systems model; test again

Multiple simulation platform testing for robustness

Simplify further: temporarily remove components until simulation behaves as intended

Incrementally restore, simulate, & check model

slide-25
SLIDE 25

16/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Dynamic Debugging for Unexpected Simulation Results

Wheel par aMomF.aV : AngularVelocity aMomF.trq : Torque hub {aS1=-aS2} {rr*trq1+trq2=0} «constraint» wC : WheelConstraint trq2 trq1 aS1 aS2 aMomF.aV : AngularVelocity aMomF.trq : Torque «equal» «equal» «equal»

constraints parameters

rr rrCoeff : Real «equal» «equal»

Time (sec) Torque through hub Torque through car

Relationship between simulated variables & flow properties Sufficiently long simulation run

slide-26
SLIDE 26

16/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Dynamic Debugging for Unexpected Simulation Results

Models with physical interactions Start tracing from interaction initiator points Simulated values correspond to flow property variables at connector endpoints

Flow rate & Potential to flow

Compare simulated values to those related to the same part or connector Ensure simulated values reflect intended mathematical transformations Replace parts that have only out-flow properties with constants Similar steps for signal flow-only models (see backup slides)

slide-27
SLIDE 27

17/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Table of Contents

1

Intro

2

Background

3

Debugging Methods

4

Conclusions & Future Work

5

References & Backup Slides

slide-28
SLIDE 28

18/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Conclusions & Future Work

Debugging systems models of bidirectional PI&SF

Complements existing debugging techniques on simulation platforms

Identify causes of simulation/compilation failures and incorrect simulations Static debugging & dynamic debugging SysPhS enables fixes to more-abstract systems model before errors cascade to translated simulations Future considerations:

Debugging errors that only occur when physical interaction and signal flow are combined User-friendly interface to visualize model translation Provide explicit mapping between system components and simulation structures: names, locations, simulation history, etc

slide-29
SLIDE 29

19/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

More Information

An Improved Method of Physical Interaction and Signal Flow Modeling for Systems Engineering:

Paper:

https://www.nist.gov/publications/improved-method-physical- interaction-and-signal-flow-modeling-systems-engineering

Slides:

https://flumes.iei.liu.se/modprod/modprod2017 proceedings/ modprod2017-keynote-ConradBock SysML-PISF- PhysicalInteraction.pdf

An Extension of the Systems Modeling Language for Physical Interaction and Signal Flow Simulation:

https://www.nist.gov/publications/extension-systems-modeling- language-physical-interaction-and-signal-flow-simulation

Standard: https://www.omg.org/spec/SysPhS Implementation:

https: //github.com/usnistgov/saismo/releases/download/sysphs/sysphs1.0.zip

slide-30
SLIDE 30

20/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Thank you. Questions?

slide-31
SLIDE 31

21/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

Table of Contents

1

Intro

2

Background

3

Debugging Methods

4

Conclusions & Future Work

5

References & Backup Slides

slide-32
SLIDE 32

22/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides

References

  • M. Sjolund, F. Casella, A. Pop, A. Asghar, P. Fritzson, W. Braun, L.

Ochel, and B. Bachmann, ”Integrated Debugging of Equation-Based Models,” in 10th international Modelica Conference, Lund Sweden, March 2014, pp. 195-204.

  • A. Candeo, and L. Shen, ”Functional Debugging of Equation-Based

Languages,” in 5th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Nottingham UK, April 2013, pp. 55-64.

slide-33
SLIDE 33

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Preprocessing a Signal Flows-Only Model

Steps: IBD: Eliminate non-signal flow connectors & their connected parts/ports Parametric diagrams:

Eliminate equations that aren’t used to determine variables bound to signal out-flow properties Eliminate equations that have no bindings to signal in-flow properties Eliminate part or port properties not bound to remaining equations Replace any variables bound to physical interaction inout-flow properties

slide-34
SLIDE 34

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Preprocessing for Signal Flow-Only Models

controlledVehicle : Car

initial values

radius = 0.5{unit=meter} impeller : Wheel kP = 200.0{unit = hertz} kI = 30.0{unit = hertzSquared} throttleAccRatio = 1.0{unit = secondSquaredPerMeter}

initial values

speedController : CruiseController throttleActuatorJack speedSensorJack speedDriverJack changetime = 100.0{unit = second} speed1 = 10.0{unit = meterPerSecond} speed2 = 15.0{unit = meterPerSecond}

initial values

driver : Person

trqCoef = 1.0{unit = newtonMeter}

initial values

powerSource : Engine

SpeedSignal ThrottleSignal SpeedSignal CruiseControlSignalFlows ibd

Only signal flows in cruise control model

slide-35
SLIDE 35

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Preprocessing for Signal Flow-Only Models

Wheel par aMomF.aV : AngularVelocity aMomF.trq : Torque hub {aS1=-aS2} {lS=aS2*radius} {rr*trq1+trq2=0} «constraint» wC : WheelConstraint lS trq2 radius trq1 aS1 aS2 aMomF.aV : AngularVelocity speed : LinearVelocity aMomF.trq : Torque ^radius : Length «equal» «equal» «equal» «equal» «equal» «equal»

constraints parameters

rr rrCoeff : Real «equal» Wheel par aMomF.aV : AngularVelocity hub {aS1=-aS2} {lS=aS2*radius} «constraint» wC : WheelConstraint lS radius aS1 aS2 aMomF.aV : AngularVelocity speed : LinearVelocity ^radius : Length «equal» «equal» «equal» «equal»

constraints parameters

Parametric diagram changes for Wheel port

slide-36
SLIDE 36

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Static Debugging for Failure to Execute Simulation

dragCoefficient = 1.0 crossSectionalArea = 2.0{unit = squaredMeter} mass = 2000.0{unit = kilogram}

initial values

controlledVehicle : Car

initial values

radius = 0.5{unit=meter} impeller : Wheel hub

trqCoef = 1.0{unit = newtonMeter} throttleSetting = 0.8

initial values

powerSource : Engine

crankshaft AngularMomentum CruiseControlPhysicalInteractions ibd

«connector»

impellerVehicleLink : ALMomentumTransformation lMTG gravVehicleLink : LMomPotEngTransformation airVehicleLink : LMomentumTransfer «connector»

initial values

acceleration = 9.8 {unit = meterPerSecondSquared}

  • peratingEnvironment : Earth

density = 1.2 {unit = kilogramPerCubicMeter}

initial values

atmosphere : Air rise = 0.1 stop = 70.0{unit = second} start = 50.0{unit = second} flat = 0.0

initial values

surface : Road

Momentum LinearMomentum LinearMomentum rrCoeff = 0.5

A F C D E B Debugging through physical interactions, continued

slide-37
SLIDE 37

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Static Debugging for Failure to Execute Simulation

Bookkeeping of variables through parts and ports from E to F air Value known? air- VehicleLink Value known? controlled- Vehicle Value known? linear velocity

density

mass

cross- sectional Area

force

dragCoeff

linear velocity

fluid- linear velocity

fluid- force

velocity

solid- linear velocity

solid- force

slide-38
SLIDE 38

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Static Debugging for Failure to Execute Simulation

Bookkeeping of variables through parts and ports from D to F Operating- Environment Value known? grav- VehicleLink Value known? controlled- Vehicle Value known? acceleration

slope

mass

acceleration

force

mass

linear velocity

force

slide-39
SLIDE 39

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Static Debugging - Models with Signal Flows

controlledVehicle : Car

initial values

radius = 0.5{unit=meter} impeller : Wheel kP = 200.0{unit = hertz} kI = 30.0{unit = hertzSquared} throttleAccRatio = 1.0{unit = secondSquaredPerMeter}

initial values

speedController : CruiseController throttleActuatorJack speedSensorJack speedDriverJack changetime = 100.0{unit = second} speed1 = 10.0{unit = meterPerSecond} speed2 = 15.0{unit = meterPerSecond}

initial values

driver : Person

trqCoef = 1.0{unit = newtonMeter}

initial values

powerSource : Engine

SpeedSignal ThrottleSignal SpeedSignal CruiseControlSignalFlows ibd

Similar to that of physical interactions; Focus is on parts without an in-flow property

slide-40
SLIDE 40

23/23 Intro Background Debugging Methods Conclusions & Future Work References & Backup Slides Backup

Dynamic Debugging - Models with Signal Flows

Replace parts that have only out-flow properties with constants Signal flow-only models:

Similar to that of physical interactions, but start from parts without an in-flow property