Model-based design of CANopen systems: mechatronics
Technology Update: Co-existing, multiple disciplines for mechatronic system design hinder the use of software-oriented modeling principles, such as UML, but modern tools may be integrated into a working tool chain. (Part 1 of 2)
Model-based design has become mainstream in the industry, but it has been used mostly for developing individual control functions or devices, not entire control systems. Current mechatronic systems are becoming more complex, and simultaneously, the requirements for quality, time-to-market, and costs have risen. An increasing number of systems are distributed, but development is typically done device by device and without systematic coordination of system structures. Approaches to manage distributed systems with written documents have led to inefficiency and inconsistent interfaces. Inconsistent interfaces have led to situations where it was easier and faster for the designers to write a new software component than reuse an existing one. Another typical occurrence is that significant interface adjustments have to be performed during integration testing of a system. Based on such experiences, there is a demand for standardized and semantically well-formed interfaces between multiple disciplines .
In typical mechatronic systems, multiple disciplines co-exist and none of them dominate. The multidisciplinary nature of design work makes it very difficult to utilize the modeling principles dedicated for software-oriented development, such as unified modeling language (UML) or system modeling language (SysML). Studies show that it is impossible to create a single tool that is optimal for all disciplines; instead, existing state-of-the art tools can be integrated into a working tool chain.
Traditional distributed automation
In a typical distributed system, one function may be divided into several devices, and one device may serve multiple functions. Node-centric development can be difficult because the exact functional distribution is not known prior to development. Application-centric development and simulation also provide limited efficiency because of limited testing capabilities . Software-centric development, without thorough system-level management, leads to serious interface inconsistencies. The old approach to managing communication interfaces is to embed communication descriptions into the application software . Historically, this works with very small systems, where there is only one instance of each type of device. When devices exist more than once in a system, this approach often leads to poor reuse of design artifacts or adoption of configuration management processes.
Model-based designs have become attractive because of the inefficiencies of the existing approaches. Although the requirement management in traditional software development has been document-centric, in some cases the requirements for the next version were collected from the source code of a previous version . It has also been documented that model-based designs can reduce the number of defects and wasted efforts produced by current approaches.
A separate design of the logical and physical structures causes challenges in managing the two parallel models and their connections without inconsistencies and still allowing incomplete models . In addition, if a model-based conceptual design was used, models can be manually converted into code, or control applications can be developed and tested separately, independent of each other. The main motivation for more systematic developments can be found in the assembly and service process, rather than in development, because of their higher significance . Systematic configuration management enables solving serious problems, for example, during system assembly and service . Systematic configuration management is required throughout the development process .
Existing modeling approaches
Increasing complexity of the systems requires increasing systematics during development . Most defects found during the last phases of the traditional processes were caused by failures in the requirement acquisition in the early phase of the processes  . The validation of specifications to models and model-to-code matching is easier with simulation models , and the use of automatic code generation with proven tools makes it possible to automate code verification and move the focus of reviews from code to models. Automatic code generation from simulation models improves the development of especially high-integrity systems   . The simulation model is actually an executable specification, from which certain documents can be generated    . Higher integrity with lower effort can be achieved by validating the basic blocks and maximizing their reuse . Conformance to corresponding standards helps to achieve required quality . Simulation models can also document interfaces between structural blocks, improving consistency and enabling parallel and co-development, improving overall efficiency   .
Old processes produce old results ; new development approaches, such as a model-based design, improve the design. New processes and tools are often needed to achieve maximum improvements. A new process with an existing, constrained design does not show benefits, but benefits can be found with new and more complex designs. A phase-by-phase approach is required to provide a learning curve. It is also important to be able to keep existing code compatible with the new code generated from models. Design reuse is one of the main things that improve productivity. The systematic management of both interfaces and behavior is mandatory in safety relevant system designs . Instead of using model-based tools as a separate overlay for the existing processes and tools, automated interfaces need to be implemented between tools . Connecting model-based tools with the existing legacy tools may require changes beyond the tools' built-in capabilities, increasing the effort required to maintain, develop, and upgrade the tool chain.
Modeling tools, scope
The Simulink tool was used in the project because it is the de facto modeling tool in research and industry with open interfaces. It also solves most of the problems found in other modeling languages and approaches . One of the most significant benefits is the support of dynamic simulations. Unlike examples such as executable UML, Simulink models can be used for modeling disciplines other than software. The models can be simply made and based only on behavior. The physical structure can be included into the model by adjusting the hierarchy of the logical model. If required, the models can be developed to cover improved dynamics as well.
Because of the increasing time-to-market and functional safety requirements in machinery automation applications, higher productivity and support for model verification and reuse of designs became significant reasons for using Simulink. Features include linking to the requirement management, model analysis, support for continuous simulation during the design process, testing coverage analysis, and approved code generation capabilities . Using the Simulink models enables efficient reuse of the models for various purposes.
Using IEC 61131-3 programming languages for the evaluation is increasing because they are well standardized. Their use, especially in safety critical implementations, has increased because some of the IEC 61131-3 languages are recommended by functional safety standards . A standardized XML-based code import and export format has been published recently, further improving systematic design processes.
The presented approach is technology independent. CANopen was selected as an example integration framework because the CANopen standard family covers system management processes and information storage. It is supported by many commercial tool chains that can be seamlessly integrated. The management process fulfills the requirements set for design of safety relevant control systems  and defines how CANopen interfaces appear in IEC 61131-3 programmable devices . A managed process is required to reach the functional safety targets . There is also a wide selection of various types of off-the-shelf devices on the market that enable efficient industrial manufacturing and maintenance. Device profiles, in particular, help reuse common functions instead of developing them constantly. CANopen also offers extensive benefits in assembly and service when compared to other integration frameworks.
Relevant CANopen issues are reviewed first to enable readers to understand the process consuming the presented communication description. Next, the basic modeling principles are shown. After presenting the modeling principles, the communication interface description in the model and exporting of both application interfaces and behavior followed. Modeling details are not within the scope of this article.
- Events & Awards
- Magazine Archives
- Digital Reports
- Global SI Database
- Oil & Gas Engineering
- Survey Prize Winners