  Hybrid systems are discrete controllers that are used for controlling a
physical process (plant) exhibiting continuous dynamics. A hybrid automata (HA)
is a well known and widely used formal model for the specification of such
systems. While many methods exist for simulating hybrid automata, there are no
known approaches for the automatic code generation from HA that are semantic
preserving. If this were feasible, it would enable the design of a
plant-on-a-chip (PoC) system that could be used for the emulation of the plant
to validate discrete controllers. Such an approach would need to be
mathematically sound and should not rely on numerical solvers. We propose a
method of PoC design for plant emulation, not possible before. The approach
restricts input/output (I/O) HA models using a set of criteria for
well-formedness which are statically verified. Following verification, we use
an abstraction based on a synchronous approach to facilitate code generation.
This is feasible through a sound transformation to synchronous HA. We compare
our method (the developed tool called Piha) to the widely used Simulink R
simulation framework and show that our method is superior in both execution
time and code size. Our approach to the PoC problem paves the way for the
emulation of physical plants in diverse domains such as robotics, automation,
medical devices, and intelligent transportation systems.
