• Ei tuloksia

4.4 The Transformation Process to Integrate between Simulink and APROS

4.4.2 Path to Automation

The logical step to pursue after the specific system has been built is integration with other platforms and hardware. Considering, why simulations are used in the first place; the capa-bility to replace the model input provided as a value with sensor input measuring the actual

Figure 20. APROS-Simulink interface-code during execution

physical phenomena is often a viable goal. In practice, the capability to integrate with other platforms or hardware in external facilities comes with two use-cases:

• Benchmarking - based on the provided input deriving the optimal output; and

• Controlling - based on the provided input, using the output to control the phenomena.

The fundamental challenge with the platform or hardware based integration either metric based or derivatives to time and memory consumption. To solve both problems often re-quires optimization and the reduction of the input dimensionality. Overall, the optimization problem is generic, but the dimension reduction is always problem specific. It requires met-rics that have positive correlation with the available input. For instance, in the context of the CFB-reactor, the char inventory is identified as a viable metric to reduce the input-space (Tourunen 2010, Page 66). Based on the research to the CFB-reaction, the metric would need to automate the fuel, air, and oxygen controls (Tourunen 2010, Page 69 Figure 5.8).

Accumulating information about the causality, limitations, and stochastic characteristics as-sociated with the CFB-reaction, reduces (does work) to solve part of the automation. The life-cycle for the CFB-model visualized in Figure 21.

Figure 21. Automation (Tourunen 2010, Page 70 Figure 5.9)

The original CFB-model was dependent on running the Simulink platform (Figure 22, step 1). There was no possibility to execute any build on the model to compile the sources used.

This also meant that integrating the model with other similar systems was not possible. Cur-rently, the CFB-model is independent of the Simulink with regarding the model execution (Figure 22, step 2). This has enabled the capability to integrate the CFB-model with other corresponding platforms.

The main methods to integrate between two continuous systems are in this research defined as slave, tenant, master, and merged (Table 11). The accomplished state during this project is that the APROS model can be used to execute the CFB-model as external DLL (Figure 20). The two models are synchronized for each clock-cycle (larger time-step). And the error-handling is managed through the interface designed to integrate the two platforms. The final step to the sensor driven input requires the CFB-model to be build to specific hardware (Figure 22, step 3). As the product of this research, the path to providing sensor based input for the CFB-model is now open.

Figure 22. Validation of Simulink-APROS output

4.5 Chapter Summary

The general purpose of this chapter is to address the specific requirements and constraints for the Simulink-APROS integration. The benefits of the capability to integrate the platform with the model are:

• Continuity of design - simulations can be build to units and integrated to larger entities;

• Expanding the pool of available options - designing simulations using multiple plat-forms; and

• Path to automation using the MDA based paradigm.

The common denominator to building simulations corresponds with the capability to interac-tive design space. Just like the mathematical model, simulations need to describe the input, the transient parameter for input/output, output, state, constraints, conservation laws, and equation for equilibrium. With these components in place, the transformation process of the problem to simulation is manageable.

The design concept used to accomplish the Simulink-APROS model based integration is

visualized in Figure 6. The implementation between the platforms didn’t just transfer the simulation input, output, and state. Instead, the interface design used at implementation controlled the execution cycle and the system configuration. Isolating the control and the process to separate fragments gave the Simulink-APROS integration the service like quality.

In our case: the APROS simulation model contained the Simulink, simulation model. The two simulations are synchronized before providing output for each clock cycle (larger time-step). The Simulink model is provided with input and the minimum step. It returns the state, output, and the time-difference to the minimum step.

In this way, the two distinct platform simulations are isolated with an air gap (interface).

In effect the APROS model transmits a request to run the second (Simulink) simulation for an x amount of time with additional input parameters and the APROS model is locked waiting until the response is received (from the Simulink model) with the current state and time-difference between the two platform simulation. Visualized in Figure 19, the APROS model clock at 12,000 seconds is waiting for the simulink model clock to synchronize. The Simulink model clock is at 11,800 seconds; the 0,2 seconds gap is configured as ∆t for the APROS solver. In this case, the two models are executed with different configuration settings; the Simulink model executes with implicit variable-step solver, and the APROS model executes with the fixed-step explicit solver.

5 Evaluation

The challenge of having a mathematical or an information theory based topic is that at best it is possible to achieve a solid foundation for any domain specific topic. Whether the domain is in physics, chemistry, economy, biology or liberal arts, all of these fields have something to favour quantitative research practices. As such models and simulation in the context of the mathematical process is an orphan construct. At the core of the mathematical modelling is the generic system - it processes variables to be defined as the input, output (transient or steady-state), or both. But having the mathematical theory for modelling to collide with do-main, is the principle component to simulations. The simulation has to capture the concrete problem (plain during flight, climate change, ...) as variables to mimic the conditions for valid experiment or scenario. If compared to traditional (stateless) applications, the flexi-bility of simulations allow multitude of problems to be solved, with using the same model variables to model9:

• Plane during flight - to replicate the results of a plane crash; and

• Climate on earth - to model the climate history of Venus.

The traditional evaluation of result can be constructed to emphasize the qualitative or quan-titative metrics. While qualitative approaches for evaluation are easy to define, compared to quantitative approaches, the qualitative approaches are often subjective and produce narrative results (Lee and Hubona 2009, Page 1). The methods dealing with quantitative approaches for evaluation are on the other hand much harder to design and build, but also likely to pro-duce more objective and causally connected information with margins of error included (Lee and Hubona 2009, Page 21). The fundamental characteristic to quantitative approaches is the capacity to rank and categorize targets.

Both qualitative and quantitative approaches are often presented side by side. However, it is evident that the relationship between qualitative and quantitative research is uneasy (Lee and Hubona 2009, Page 1). At research focused on mathematical methodology, the

9. In both of these cases, the simulation would likely to fail, even if the underlying model would allow both scenarios to happen. In practice, the use-case to fail the simulation as a process is valid.

qualitative research is usually a slave to quantitative research methods. However, at design-sciences, the purpose of qualitative and quantitative research is to look through the object from different sides, and thus, form a union perspective rather than an intersect one (out from usable information to evaluate the object). After this distinction, the basis for evaluating the fitness of the artifact can be done by focusing on the specific aspects of the design (Lee and Hubona 2009, Page 18). Design-science is always goal oriented, and thus, heuristic.