
Title: Physical Systems for Software Modellers

Authors: 
Hans Vangheluwe Hans.Vangheluwe@uantwerpen.be 
Cláudio Gomes claudio.gomes@uantwerpen.be 

Author keywords: 
physical systems ("plant") modelling
computationally a-causal modelling
equation-based object-oriented languages
Modelica
Causal Block Diagrams
Synchronous Data Flow
PID control

EasyChair keyphrases: physical system (160), causal block diagram (79), functional mockup unit (63), reynold number (60), pid controller (50), discrete time cbd (47), causal modelling (40), next level (40), hour part (40), software modeller (40), causality assignment (40)

Abstract:
The complex engineered systems we build today get their value from the networking of multi-physical (mechanical, electrical, hydraulic, biochemical, …) and computational (control, signal processing, planning, …) processes, often interacting with a highly uncertain environment. Software plays a pivotal role, both as a component of such systems, often realizing control laws, deployed on a resource-constrained physical platform, and in the construction of enabling modelling and simulation tools.

This two-part tutorial will introduce software modellers to the two main facets of dealing with physical systems through modelling, simulation and (controller) code synthesis.

In the first part, the different levels at which physical systems may be modelled are introduced. This starts with the technological level. At this level, components are considered that can be physically realized with current materials and production methods. Such components are often available off the shelf. They are characterized by the very specific context (also known as Experimental Frame) in which their models are valid. The next level uses the full knowledge of physics and engineering to describe the behaviour of physical components to study a wide variety of properties. To study the possibly turbulent flow of a viscous liquid through a pipe for example, a Navier-Stokes Partial Differential Equations model will be used. Such models are hard to calibrate and simulate accurately and efficiently. The next level considers the often occurring situation where, for the properties of interest, the spatial distribution of the problem can be abstracted and a lumped-parameter (as opposed to distributed-parameter) model can be used. In a translational mechanical context for example, an object with a complex geometry may still be considered as a point mass characterized by a single parameter "mass". Such models still obey physical conservation laws such as energy conservation. At this level, formalisms such as Bond Graphs that focus on power flow through a system are used. At the next level, the link with physics is weakened and computational components (functions) are added. This leads to the popular Equation-based Object-Oriented modelling languages such as Modelica® and Simscape®. The semantics of such computationally a-causal languages will be explained with particular focus on the process of causality assignment. This leads to the next level at which input-output computational blocks are used. The main disadvantage of this level is that it focuses on "how" to compute the evolution of state variables over time as opposed the focus on "what" the governing equations are in equation-based languages, leaving the "how" to a model compiler.

The second part of the tutorial starts from the computationally causal level. The formalisms used are known as Causal Block Diagrams (CBDs) or Synchronous Data Flow (SDF), with Simulink® as the most notable example. Three different semantics of CBDs will be explained, bridging the gap between the equations resulting from causality assignment described in the first part of the tutorial and their realization in software. This software can either be a simulator (or a Functional Mockup Unit in case of co-simulation) on a digital computer or a controller deployed on a micro-controller or ECU.
One semantics focuses on algebraic CBDs only. Here, time has been abstracted away, which may lead to "algebraic loops" which need to be detected and revoled. The second semantics focuses on discrete-time CBDs. Time is abstracted as a discrete counter. The introduction of memory in the form of a delay block allows, in combination with feedback loops in the CBD, for the expression of complex dynamics. The third semantics treats time as continuous. To allow for simulation on a digital computer, discretization is required. As such, continuous-time CBDs are approximated and mapped onto discrete-time CBDs. Such approximation introduces numerical errors which must be dealt with.
Even the discretized level is still an idealization as the numerical values as not Real numbers, but are implemented as floating point approximations.

Once CBDs are well understood, the tutorial gives a very basic introduction to automatic control. In engineering practice, the behaviour of virtually every physical systems (also known as "plant") is regulated by some form of controller. The principles of automatic control will be explained by means of the most simple Proportional, Integral and Derivative (PID) controller. The effect of the different parts of such a controller will be explained. A PID controller will be modelled in the form of a continuous-time CBD. This is then the basis for discritezation to a discrete-time CBD and subsequent synthesis of control software. To demonstrate the concepts, a PID controller will be developed and its optimal parameters will be estimated for the simple cruise control of a vehicle.
