Now let us consider a hybrid Tank containing a Proportional-Integral (PI) controller.
Figure 1: A tank system with a tank, a source for liquid, and a controller.
BaseControllerClocked
PIdiscreteControllerClocked
PIDdiscreteControllerClocked Version
Finally we put together the hybrid tank system by simply replacing the continuous PI controller by the discrete one, called piDiscrete, as depicted in Figure 2.
Figure 2: A Hybrid Tank system consisting of a continuous tank model connected to a source for liquid and a discrete PI controller.
The TankHybridPI model connects a discrete PI controller to a liquid source and a tank, both defined by the models above.
The hybrid tank system with a discrete PI controller is simulated, see Figure ??, obtaining essentially the same result as when using the continuous PI controller (compare to Figure ?? on page ??). The response shown in the curve is the reaction of the controller to an instantaneous increase in the input flow from the source at time t=150. The only difference compared to the continuous controller case is a few small squiggles in the curve probably caused by the discrete approximation.
This model contains clocked synchronous constructs that are not yet fully supported by OpenModelica as of October 2015, but may start working within the near future.Hence the Simulation of this models does not work
This model contains clocked synchronous constructs that are not yet supported by OpenModelica as of October 2015, but may start working within the near future.Hence the Simulation of this models does not work