Abstract
Recently, to liberate the latent power of Simulink, Matlab gives support to object-oriented programming in two ways: (1) it supports object-oriented techniques in M programming language; (2) it enables the integration of C/C++Mex modules into Simulink. Although Matlab supports object-oriented programming current Simulink versions do not allow designers to invoke objects written in M language or existing in C++Mex modules in an object-oriented manner. In order to allow the designers to do so, in this paper, we analyze the semantic differences between Simulink and object-oriented models. We propose a model to allow the designers to define parameterized object unit in subsystem form in Simulink. This object unit refers to a numerical object identification, which is created in Matlab workspace or Mex modules and corresponds to an external object instance. If other blocks/subsystems can obtain the object identification from the signal link between the object unit and themselves, they can invoke the functions of the external object by utilizing the command pattern (a kind of object oriented design pattern). The techniques presented in this paper have been used with some success in an applicable numerical simulation software designed by us.
Original language | English |
---|---|
Pages (from-to) | 508-512 |
Number of pages | 5 |
Journal | Xibei Gongye Daxue Xuebao/Journal of Northwestern Polytechnical University |
Volume | 26 |
Issue number | 4 |
State | Published - Aug 2008 |
Keywords
- Computer simulation
- Object-oriented design pattern
- Simulink