AleC++ is a HDL created as a superset of the standard programming language. Its programming features are very helpful in defining complex models. In this example we have used them to model devices with distributed parameters.
In Fig. 5.17, a micro-electro-mechanical pressure sensing system is shown. A rectangular capacitor membrane is deformed when pressure is applied. Membrane deformation is modeled using a partial differential equation [Timo59]. That equation can be discretized and represented as a system of ordinary differential equations. Discretization is performed in the for loop in the action block of the module. That for loop must be in the structural process (types of process synchronization are given in the section 3.2), since the structure of the system of equations must be defined before the simulation, and the structural processes are performed before the actual simulation starts.
Fig. 5.17: Micro-electro-mechanical capacitive pressure sensing system.
The time-domain simulation results are given in the Fig. 5.18. The spatial displacement of the membrane for one time instant of time-domain simulation is given in Fig. 5.19. It is interesting to note that the graphical postprocessor that is used to create all time-domain simulation results is also a class described in AleC++ language and stored in the library. For spatial drawings, as given in Fig. 5.19, a new class is defined in AleC++, derived from the class for standard, time-domain waveforms. In this way, we did not have to write a new graphical postprocessor for this purpose. Functions from the base class are used, just some new had to be added to the derived class. Both the time-domain simulation results and the spatial drawings can be viewed during the simulation run.
Fig. 5.18: Time-domain simulation results for the system given in Fig. 5.17. Traced signals are pressure, displacement of the pressure sensor center, sensor capacitance, and the output voltage.
Fig. 5.19: Displacement of the sensor membrane for simulation time instant 0.0004s in Fig. 5.18.