Transitioning from Crescendo to INTO-CPS Kenneth Lausdahl 1 Kim - - PowerPoint PPT Presentation

transitioning from crescendo to into cps
SMART_READER_LITE
LIVE PREVIEW

Transitioning from Crescendo to INTO-CPS Kenneth Lausdahl 1 Kim - - PowerPoint PPT Presentation

Transitioning from Crescendo to INTO-CPS Kenneth Lausdahl 1 Kim Bjerge 1 Tom Bokhove 2 Frank Groen 2 Peter Gorm Larsen 1 Aarhus University, Denmark Controllab Products, Netherlands 15th Overture workshop Newcastle, UK September 15


slide-1
SLIDE 1

Transitioning from Crescendo to INTO-CPS

Kenneth Lausdahl1 Kim Bjerge1 Tom Bokhove2 Frank Groen2 Peter Gorm Larsen1

Aarhus University, Denmark Controllab Products, Netherlands

15th Overture workshop Newcastle, UK – September 15

slide-2
SLIDE 2

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Agenda

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [2/25]

slide-3
SLIDE 3

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Agenda

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [3/25]

slide-4
SLIDE 4

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

DESTECS - Crescendo

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [4/25]

slide-5
SLIDE 5

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

INTO-CPS

  • FMI 2.0 based co-simulation
  • Simulation of N models
  • Multi platform
  • Uses SysML for high level design
  • Both Fixed and Variable Step algorithms

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [5/25]

slide-6
SLIDE 6

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

INTO-CPS

FMI

Functional Mock-Up Interface

  • A collection of C functions
  • instantiate
  • setInteger|Boolen|Real|String
  • doStep
  • getInteger|Boolen|Real|String
  • Zip container with standard layout for: Linux, Mac

and Windows

  • binaries/
  • resources/
  • modelDescription.xml

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [6/25]

slide-7
SLIDE 7

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

INTO-CPS

Variable Simulation Algorithm

  • Zero Crossing
  • Reduce step size near zero crossing
  • Bounded Difference
  • Sampling Rate
  • FMU Max Step Size

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [7/25]

slide-8
SLIDE 8

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

INTO-CPS

Variable Simulation Algorithm

  • Zero Crossing
  • Reduce step size near zero crossing
  • Bounded Difference
  • Sampling Rate
  • FMU Max Step Size

class A thread periodic (20E6, 0, 0, 20E6) (step); //0.02 seconds

  • perations

step : () ==> () step()==duration(0) skip; end A

✝ ✆

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [7/25]

slide-9
SLIDE 9

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

INTO-CPS

Variable Simulation Algorithm

  • Zero Crossing
  • Reduce step size near zero crossing
  • Bounded Difference
  • Sampling Rate
  • FMU Max Step Size

class A thread periodic (20E6, 0, 0, 20E6) (step); //0.02 seconds

  • perations

step : () ==> () step()==duration(0) skip; end A

✝ ✆

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [7/25]

slide-10
SLIDE 10

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

INTO-CPS

Variable Simulation Algorithm

  • Zero Crossing
  • Reduce step size near zero crossing
  • Bounded Difference
  • Sampling Rate
  • FMU Max Step Size

class A thread periodic (20E6, 0, 0, 20E6) (step); //0.02 seconds

  • perations

step : () ==> () step()==duration(0) skip; end A

✝ ✆

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [7/25]

slide-11
SLIDE 11

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

INTO-CPS

Simulation Algorithm: Zero Crossing Example Constraint: zero crossing Ports: (level, max) Constraint: zero crossing Ports: (level, min)

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [8/25]

slide-12
SLIDE 12

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Agenda

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [9/25]

slide-13
SLIDE 13

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Overture FMI

  • Added new FMI library
  • BoolPort
  • IntPort
  • RealPort
  • StringPort

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [10/25]

slide-14
SLIDE 14

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Overture FMI

  • Added new FMI library
  • BoolPort
  • IntPort
  • RealPort
  • StringPort

class HardwareInterface values

  • - @ interface: type = parameter;

public v : RealPort = new RealPort(1.0); instance variables

  • - @ interface: type = input;

public distanceTravelled : RealPort := new RealPort(0.0);

  • - @ interface: type = output;

public setAngle : RealPort := new RealPort(0.0); end HardwareInterface

✡ ✝ ✆

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [10/25]

slide-15
SLIDE 15

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Overture FMI

  • Added new FMI library
  • BoolPort
  • IntPort
  • RealPort
  • StringPort

system System instance variables

  • - Hardware interface variable required by FMU Import/Export

public static hwi:HardwareInterface:=new HardwareInterface(); ...

  • perations

public System : () ==> System System () == ( ctrl := new Controller(hwi); cpu1.deploy(ctrl, "Controller"); ); end System

✡ ✝ ✆

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [10/25]

slide-16
SLIDE 16

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

20-sim

  • Generate an FMU for a model
  • Direct calls from the FMU into 20-sim

FMU Co-Simulation

Export Tool Wrapper FMU

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [11/25]

slide-17
SLIDE 17

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Agenda

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [12/25]

slide-18
SLIDE 18

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [13/25]

slide-19
SLIDE 19

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

DESTECS Contract

sdp real v; sdp real r2; sdp real r4; sdp real l1; sdp real l3; sdp real trayPitch; sdp real p; controlled real setAngle := 0.0; monitored real distanceTravelled := 0.0; monitored real distCTB1 := 0.0; monitored real distCTB2 := 0.0; monitored real distCTB3 := 0.0; monitored real distCTB4 := 0.0; event eventCTB1; event eventCTB2; event eventCTB3; event eventCTB4;

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [14/25]

slide-20
SLIDE 20

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

DESTECS Contract

sdp real v; sdp real r2; sdp real r4; sdp real l1; sdp real l3; sdp real trayPitch; sdp real p; controlled real setAngle := 0.0; monitored real distanceTravelled := 0.0; monitored real distCTB1 := 0.0; monitored real distCTB2 := 0.0; monitored real distCTB3 := 0.0; monitored real distCTB4 := 0.0; event eventCTB1; event eventCTB2; event eventCTB3; event eventCTB4;

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [14/25]

slide-21
SLIDE 21

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

DESTECS Contract

sdp real v; sdp real r2; sdp real r4; sdp real l1; sdp real l3; sdp real trayPitch; sdp real p; controlled real setAngle := 0.0; monitored real distanceTravelled := 0.0; monitored real distCTB1 := 0.0; monitored real distCTB2 := 0.0; monitored real distCTB3 := 0.0; monitored real distCTB4 := 0.0; event eventCTB1; event eventCTB2; event eventCTB3; event eventCTB4;

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [14/25]

slide-22
SLIDE 22

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

DESTECS Contract

sdp real v; sdp real r2; sdp real r4; sdp real l1; sdp real l3; sdp real trayPitch; sdp real p; controlled real setAngle := 0.0; monitored real distanceTravelled := 0.0; monitored real distCTB1 := 0.0; monitored real distCTB2 := 0.0; monitored real distCTB3 := 0.0; monitored real distCTB4 := 0.0; event eventCTB1; event eventCTB2; event eventCTB3; event eventCTB4;

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [14/25]

slide-23
SLIDE 23

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

DESTECS Contract

sdp real v; sdp real r2; sdp real r4; sdp real l1; sdp real l3; sdp real trayPitch; sdp real p; controlled real setAngle := 0.0; monitored real distanceTravelled := 0.0; monitored real distCTB1 := 0.0; monitored real distCTB2 := 0.0; monitored real distCTB3 := 0.0; monitored real distCTB4 := 0.0; event eventCTB1; event eventCTB2; event eventCTB3; event eventCTB4;

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [14/25]

slide-24
SLIDE 24

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

DESTECS Simulation - result

2 4 6 8 10 12 0.15 0.10 0.05 0.00 0.05 0.10 0.15

Crescendo bankAngle

2 4 6 8 10 12 0.15 0.10 0.05 0.00 0.05 0.10 0.15

Crescendo desiredBankAngle

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [15/25]

slide-25
SLIDE 25

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

INTO-CPS

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [16/25]

slide-26
SLIDE 26

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

INTO-CPS Simulation - result

2 4 6 8 10 12 0.10 0.05 0.00 0.05 0.10

Crescendo INTO-CPS

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [17/25]

slide-27
SLIDE 27

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

INTO-CPS Simulation - result

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [17/25]

slide-28
SLIDE 28

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Case-Study

INTO-CPS Simulation - result 0.760.77 0.78 0.79 0.800.81 0.82 0.83 0.840.85 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [17/25]

slide-29
SLIDE 29

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Agenda

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [18/25]

slide-30
SLIDE 30

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Animation

20sim 3D Animation

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [19/25]

slide-31
SLIDE 31

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Animation

Automated conversion to Unity

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [20/25]

slide-32
SLIDE 32

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Animation

Unity FMI Support

Unity Executable Unity Plug-in FMU Co-Simulation

Socket FMI Export Tool Wrapper FMU Generate:

  • unity excitable (.exe)
  • modelDescription.xml

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [21/25]

slide-33
SLIDE 33

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Demo

https://youtu.be/zHIcLxf-RVI

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [22/25]

slide-34
SLIDE 34

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Agenda

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [23/25]

slide-35
SLIDE 35

Technologies Tool Extensions Case-Study Animation Conclusion and future plans

Conclusion and future plans

  • Successful transition of the trolley conveyor case

study

  • Events can be supported through constraints
  • Automatic translation from 20sim 3D to Unity
  • Enabled FMI for Unity

15th Overture Workshop, September 15, 2017 Kenneth Lausdahl, Kim Bjerge, Tom Bokhove, Frank Groen, Peter Gorm Larsen [24/25]

slide-36
SLIDE 36

Thank you