Visible to the public File preview

CPS Design Group
cps.ics.uci.edu

A Ball Goes to School Our Experiences from a Cyber Physical Systems Design Experiment
Steffen Peter, Frank Vahid, Daniel Gajski, and Tony Givargis

Motivation/Approach
Develop an educational program to teach CPS design to graduate Computer Science students. Improve understanding of CPS design and sharpen attention in crafting solutions by teaching: -  Typical design flows for CPS design -  Importance of models and their limitations -  Introduction to state-ofthe art simulation and modeling tools Apply small examples, that are: -  Easy to understand -  Possible to design and evaluate using a variety of tools and methodologies -  Is implementable in the lab

The Falling Ball Example
-  A camera should take a picture of a falling ball that is dropped from a variable height. -  Sensors mounted above the camera detect the ball. -  A program in the cyber part of the system estimates
  the approaching time. Benefits: -  Easily understood -  Need for precise timing -  Physical process needing mathematical modeling -  No perfect precision in cyber part -  Can be build in the lab


 

Modeling and Implementation
-  Students modeled or implemented the system applying a range of tools (one per student) -  Progress, advantages and problems of the selected tools are discussed in the group

Simulink


 


 

Lab implementation running on Raspberry Pie board

Modellica

//====================================================== // Name : ball.cpp //====================================================== #include <iostream> #include "ball.h" Ball::Ball(sc_module_name name): sc_module(name) { time_us = 0; g_force = 0.0000000098; physical_clk
 @1MHz
 
  cyber_clk
 @
 1KHz
 
  SC_METHOD(position_update); dont_initialize(); Controller
  sensitive << clk.pos(); Module
 
posi1on
 =
 0
 
  sensor_1
 
  sensor_2
 
  gripper
 
  posi1on
 =
 0.5
 x
 a
 x
 t2
 
 

Height [m]

}

posi1on
 

Ball
 Module
 

void Ball::position_update() { position = 0.5 * g_force * time_us * time_us; //cout << "position:" << position << endl; //cout << "time: " << sc_time_stamp() << endl; time_us++; } Time [s]

SystemC

Results:

Conclusions: -  The Falling Ball example is a suitable use case to teach Discovered and discussed challenges: CPS design -  Math and modeling the physical system -  Simplicity of the example allows students to focus on the
  -  Separation of physical and cyber part actual CPS design challenges
  four weeks (10h/week) students learned how to use -  Design methodologies of graphical design tools -  In -  Selection of an appropriate Model of Computation tools, model the system, run simulations, test the system -  Zeno behavior and simulation time resolution and evaluate the results issues -  Discovered design challenges are good support for lecture Project Contact: Steffen Peter (st.peter@uci.edu) Web: cps.ics.uci.edu Funded by: National Science Foundation