Translating Simulink Models to Modelica Using the Nsp Platform Jean-Philippe Chancelier, Sébastien Furic, Pierre Weis

Total Page:16

File Type:pdf, Size:1020Kb

Load more

Translating Simulink Models to Modelica using the Nsp Platform Jean-Philippe Chancelier, Sébastien Furic, Pierre Weis To cite this version: Jean-Philippe Chancelier, Sébastien Furic, Pierre Weis. Translating Simulink Models to Modelica using the Nsp Platform. 2019. hal-01948681v2 HAL Id: hal-01948681 https://hal.archives-ouvertes.fr/hal-01948681v2 Preprint submitted on 21 Feb 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Translating Simulink Models to Modelica using the Nsp Platform Jean-Philippe Chancelier1 Sébastien Furic2 Pierre Weis2 1Université Paris-Est, CERMICS (ENPC), 77455 Marne-la-Vallée 2, France, [email protected] 2 Inria Paris, 2 rue Simone Iff, 75589 Paris, France & Université Paris-Est, CERMICS (ENPC), 77455 Marne-la-Vallée 2, France {sebastien.furic,pierre.weis}@inria.fr Abstract blocks. Up to our knowledge this work remains the most advanced effort in that direction. It is however no We present a new Simulink (Simulink) to Modelica (Mod- longer maintained. In the Scicos software environment, elica) translation chain embedded into Nsp. Translated the Coselica library offers signal models to allow users models can be edited (original Simulink diagrams are pre- to better exploit Modelica from within Scicos by propos- served through translation) and simulated. This transla- ing a large set of Modelica submodels in the same spirit as tion chain makes use of the Simport tool, originally de- the standard Modelica library (MSL). Many Simulink-like signed to translate Simulink models to Scicos models, and blocks are also available in Coselica. also relies on Modelicac, i.e. Scicos’ Modelica companion The approach presented here differs from Mike compiler. Dempsey’s and Dirk Reusch’s approaches in that trans- Using some examples, we demonstrate the effective- lation of original blocks is not attempted on a one-to-one ness of the translation process and detail some techni- basis. Instead, we use a two steps translation process: the cal aspects of it. This new Nsp feature extends Nsp’s first step translates the Simulink model into an equivalent simulation capabilities and makes it a reference platform Scicos native model; the second step translates the Scicos for users looking for means to simulate Simulink models native model to Modelica code. within a Modelica framework. Resulting Modelica code To handle the initial Simulink to Scicos translation, can even be exported to other Modelica compatible tools. we use an external tool named Simport: it translates a Keywords: Nsp; Simulink; Modelica Simulink model by translating each block in the original Simulink model with one or several blocks of the Scicos 1 Introduction native block library, so that original semantics is preserved Nsp (Nsp) is a Matlab-like numerical environment which with a high degree of confidence. can run the Scicos modeling environment, a Simulink-like For the second step, we developed a set of Nsp special block diagram editor and simulator. purpose compilation routines to translate Scicos blocks to From 2003 to 2008, in the course of funded projects genuine Modelica blocks. When a Scicos block has a di- SimPA and SimPA2, a Modelica compiler named Modeli- rect Coselica equivalent, the compilation routine simply cac has been developed allowing Scicos to handle genuine emits thre corresponding Coselica block; when there is Modelica models. This integration of Modelica within no Coselica equivalent, the compilation routine generates Scicos has been the subject of several papers published an entirely new block containing ad-hoc Modelica code at the Modelica conference (Nikoukhah and Najafi, 2008; to handle the Scicos block behavior. Using this compile- Nikoukhah and Furic, 2009). The purpose of using Mod- time Modelica code generation and the two steps transla- elica is to serve as a high-level description language to tion process was the key ideas to fill the huge semantic gap extend Scicos expressiveness: Modelica allows users to between Simulink and Modelica. compose “acausal” models where the original environ- We give in this paper a detailed description of this new ment forced users to describe their models as block dia- translation chain hosted by the Nsp environment. grams. 2 Involved Tools In this paper we focus on a new application of Modelica within Scicos under Nsp, that is as a target language for As mentioned above, the translation chain relies on a com- Simulink model translation. bination of several tools. We give hereafter a short de- Several Simulink to Modelica translation tools have al- scription of each of them. ready been proposed in the past, we mention in partic- 2.1 Nsp, a Programming Environment for Nu- ular Mike Dempsey’s Simelica and AdvancedBlocks li- brary (Dempsey, 2003) and Dirk Reusch’s Coselica ini- merical Applications tiative (Reusch). AdvancedBlocks was a fairly complete Nsp (Nsp) is a mature Matlab-like Scientific Software library of Modelica blocks which allowed users to use Package developed under the GPL license. Nsp features Modelica blocks as a one-to-one replacement for Simulink a high-level, safe imperative programming language with automatic memory management. This language can be produces a Scicos model data structure. Second, using used interactively, giving users an easy access to efficient Nsp scripts we are able to convert, in a Scicos model data numerical routines; It can also be used as a more conven- structure, some Scicos blocks to Modelica blocks. tional programming language to extend Nsp’s capabilities. In the conversion process from Simulink to Modelica, Nsp contains internally a class system with simple in- the scicos compiler/scheduler also plays a key role. It heritance and interface implementation. When used as an infers dimensions and types used in the Modelica blocs. interactive computing environment, it comes with online This is quite an exciting feature since it gives the possibil- help facilities and an easy access to GUI facilities and ity to have Modelica blocks for which the associated Mod- graphics. elica model is not a fixed Modelica class but a specific one A large set of libraries are available and it is moreover adapted to specific dimensions and types generated on the easy to implement new functionalities. External libraries fly. can also be used: this requires writing some wrapper code (also called interface) to live in harmony with Nsp’s inter- 2.3 Modelicac, a Simple Yet Useful Modelica nal state. The interface mechanism can be either static or Compiler dynamic. By using dynamic functionalities one is able to Development of Modelicac started in 2003 as a joint work build toolboxes. between Inria and TNI-Valiosys (now Dassault Systèmes) Nsp shares many traits with other Matlab-like Scientific in the course of the SimPA (SIMulation pour le Procédé Softwares such as Matlab, Octave, ScilabGtk (ScilabGtk; et l’Automatique) french funded project. The goal was to Campbell et al., 2006), and also with scripting languages make Scicos compatible with a significant subset of the such as Python. Modelica language in order for users to be able to de- The main toolbox used in this work is Scicos that we scribe complex hybrid models without having to resort to describe now. low-level block diagram descriptions. Indeed, building a 2.2 Scicos, a Block Diagram Modeler and Sim- block diagram from a physical model requires 1)perform- ing a complete analysis of physical phenomena into play ulator (to determine which elementary blocks to use in the dia- Scicos (Scicos) is a graphical dynamical system modeler gram), and 2)determining how data flows between blocks and simulator originally developed in the Metalau project (to connect elementary blocks together). On the other at INRIA, Paris-Rocquencourt center. With Scicos, users hand, Modelica tools considerably ease physical model can create block diagrams to model and simulate the dy- construction by automatically analysing the overall struc- namics of hybrid dynamical systems and compile models ture of physical models described in a much more user- into executable code. Scicos is used for signal process- friendly way: familiar physical components (e.g. springs, ing, systems control, queuing systems, and to study phys- transistors, hydraulic pumps, etc.) can be used to build ical and biological systems. Extensions allow generation models. Translation from this high-level description to of component-based modeling of electrical and hydraulic low-level data flow is performed automatically in a quite circuits using the Modelica language. satisfactory way, which frees users from a painful work. We consider in this paper the Scicos/Nsp version of Sci- Moreover, even slight modifications of physical models cos maintained and developed at ENPC. Scicos/Nsp is a may require considerable changes in corresponding block- Nsp toolbox and runs in the Nsp environment. Having ac- diagram descriptions; this is not the case with a high-level cess to Nsp functions when designing simulation models description. is of great importance. In its initial version, Modelicac essentially focussed on Scicos users often needs to use Nsp functions such as the “continuous part” of hybrid models. This mainly com- those dedicated to filter design for signal processing or prises differential equations and event-trigerring mecha- controller design in the construction of simulation mod- nisms (e.g. , “when equations”). Difference equations els. Nsp’s programming language can be used for batch were however also be described, although with many re- processing of multiple simulation tasks, and more gener- strictions, because the idea was to discourage users from ally, models designed by Scicos can be used as functions writing discrete equations in Modelica.
Recommended publications
  • Applying Reinforcement Learning to Modelica Models

    Applying Reinforcement Learning to Modelica Models

    ModelicaGym: Applying Reinforcement Learning to Modelica Models Oleh Lukianykhin∗ Tetiana Bogodorova [email protected] [email protected] The Machine Learning Lab, Ukrainian Catholic University Lviv, Ukraine Figure 1: A high-level overview of a considered pipeline and place of the presented toolbox in it. ABSTRACT CCS CONCEPTS This paper presents ModelicaGym toolbox that was developed • Theory of computation → Reinforcement learning; • Soft- to employ Reinforcement Learning (RL) for solving optimization ware and its engineering → Integration frameworks; System and control tasks in Modelica models. The developed tool allows modeling languages; • Computing methodologies → Model de- connecting models using Functional Mock-up Interface (FMI) to velopment and analysis. OpenAI Gym toolkit in order to exploit Modelica equation-based modeling and co-simulation together with RL algorithms as a func- KEYWORDS tionality of the tools correspondingly. Thus, ModelicaGym facilit- Cart Pole, FMI, JModelica.org, Modelica, model integration, Open ates fast and convenient development of RL algorithms and their AI Gym, OpenModelica, Python, reinforcement learning comparison when solving optimal control problem for Modelica dynamic models. Inheritance structure of ModelicaGym toolbox’s ACM Reference Format: Oleh Lukianykhin and Tetiana Bogodorova. 2019. ModelicaGym: Applying classes and the implemented methods are discussed in details. The Reinforcement Learning to Modelica Models. In EOOLT 2019: 9th Interna- toolbox functionality validation is performed on Cart-Pole balan- tional Workshop on Equation-Based Object-Oriented Modeling Languages and arXiv:1909.08604v1 [cs.SE] 18 Sep 2019 cing problem. This includes physical system model description and Tools, November 04–05, 2019, Berlin, DE. ACM, New York, NY, USA, 10 pages. its integration using the toolbox, experiments on selection and in- https://doi.org/10.1145/nnnnnnn.nnnnnnn fluence of the model parameters (i.e.
  • Basic Scicoslab and Scicos

    Basic Scicoslab and Scicos

    Florence University, October 2010 Basic ScicosLab and Scicos ScicosLab/Scicos for dummies like us Simone Mannori – ScicosLab/Scicos developer 1 Florence University, October 2010 Basic ScicosLab and Scicos Digital control systems design and simulation: the Bermuda Triangle for engineers Computer science Control systems Physics Simone Mannori – ScicosLab/Scicos developer 2 Florence University, October 2010 Basic ScicosLab and Scicos What ScicosLab is? An interpreted language (“Scilab Language”, very similar _but_not_equal_ to Matlab) Full support for matrix computation (BLAS, LAPACK, single and multi cores support using ACML now, GPU support in the near future using OpenCL). Basic programming (just like Matlab) GUI development (using TCL/TK and UICONTROL) Linear algebra Polynomial calculation Control systems modelling and design (continuous, discrete and hybrid systems) Robust control toolbox Optimization and simulation (build-in solvers) Signal processing (filters design, etc.) ARMA modelling and simulation Basic statistics Basic identification PVM support TCL/TK and Java support Max-plus algebra toolbox Simone Mannori – ScicosLab/Scicos developer 3 Florence University, October 2010 Basic ScicosLab and Scicos What you can do with ScicosLab? • Interact with the command line • Write a program, one line at time, using the internal or with an external editor • Run the program in an user friendly interpreted environment (easy debug) • Use the rich embedded library. • You can develop your ScicosLab functions using C, Fortran, Java, etc. • Produce nice graphics diagrams. Simone Mannori – ScicosLab/Scicos developer 4 Florence University, October 2010 Basic ScicosLab and Scicos What Scicos is? Scicos is a graphical dynamical system modeller and simulator developed inside the METALAU project at INRIA, Paris Rocquencourt centre.
  • RTAI-Lab Tutorial: Scicoslab, Comedi, and Real-Time Control

    RTAI-Lab Tutorial: Scicoslab, Comedi, and Real-Time Control

    RTAI-Lab tutorial: Scicoslab, Comedi, and real-time control Roberto Bucher 1 Simone Mannori Thomas Netter 2 May 24, 2010 Summary RTAI-Lab is a tool chain for real-time software and control system development. This tutorial shows how to install the various components: the RTAI real-time Linux kernel, the Comedi interface for control and measurement hardware, the Scicoslab GUI-based CACSD modeling software and associated RTAI-Lab blocks, and the xrtailab interactive oscilloscope. RTAI-Lab’s Scicos blocks are detailed and examples show how to develop elementary block diagrams, automatically generate real-time executables, and add custom elements. 1Main RTAI-Lab developer, person to contact for technical questions: roberto.bucher at supsi.ch, see page 46 Contents 1 Introduction 4 1.1 RTAI-Lab tool chain . .4 1.2 Commercial software . .4 2 Installation 5 2.1 Requirements . .5 2.1.1 Hardware requirements . .5 2.1.2 Software requirements . .6 2.2 Mesa library . .7 2.3 EFLTK library . .7 2.4 Linux kernel and RTAI patch . .7 2.5 Comedilib . .8 2.6 RTAI (1st pass) . .8 2.7 RTAI tests . .9 2.8 Comedi . .9 2.9 RTAI (2nd pass) . 10 2.10 ScicosLab . 11 2.11 RTAI-Lab add-ons to Scicoslab-4.4 . 11 2.12 User configuration for scicoslab-4.4 . 11 2.13 Load the modules . 11 3 Development with RTAI-Lab 13 3.1 Boot Linux-RTAI . 13 3.2 Start Scicos . 13 3.3 RTAI-Lib palette . 14 3.4 Real-time sinewave: step by step . 16 3.4.1 Create block diagram .
  • Reusing Static Analysis Across Di Erent Domain-Specific Languages

    Reusing Static Analysis Across Di Erent Domain-Specific Languages

    Reusing Static Analysis across Dierent Domain-Specific Languages using Reference Attribute Grammars Johannes Meya, Thomas Kühnb, René Schönea, and Uwe Aßmanna a Technische Universität Dresden, Germany b Karlsruhe Institute of Technology, Germany Abstract Context: Domain-specific languages (DSLs) enable domain experts to specify tasks and problems themselves, while enabling static analysis to elucidate issues in the modelled domain early. Although language work- benches have simplified the design of DSLs and extensions to general purpose languages, static analyses must still be implemented manually. Inquiry: Moreover, static analyses, e.g., complexity metrics, dependency analysis, and declaration-use analy- sis, are usually domain-dependent and cannot be easily reused. Therefore, transferring existing static analyses to another DSL incurs a huge implementation overhead. However, this overhead is not always intrinsically necessary: in many cases, while the concepts of the DSL on which a static analysis is performed are domain- specific, the underlying algorithm employed in the analysis is actually domain-independent and thus can be reused in principle, depending on how it is specified. While current approaches either implement static anal- yses internally or with an external Visitor, the implementation is tied to the language’s grammar and cannot be reused easily. Thus far, a commonly used approach that achieves reusable static analysis relies on the trans- formation into an intermediate representation upon which the analysis is performed. This, however, entails a considerable additional implementation effort. Approach: To remedy this, it has been proposed to map the necessary domain-specific concepts to the algo- rithm’s domain-independent data structures, yet without a practical implementation and the demonstration of reuse.
  • Introduction to Dymola

    Introduction to Dymola

    DYMOLA AND MODELICA Course overview DAY 1 Dymola and Modelica I • Introduction Dymola, Modelica, Modelon • Lecture 1 Overview of Dymola and Physical modeling . Workshop 1 Workflow of modeling physical systems in Dymola • Lecture 2 Simulation and post-processing with Dymola . Workshop 2 Simulating and analyzing a physical system • Lecture 3 Configure system models . Workshop 3 Creating a reconfigurable system DAY 2 Dymola and Modelica I • Lecture 4 Modelica I – Writing Modelica models . Workshop 4a Cauer low pass filter using Electric Library . Workshop 4b A moving coil using Magnetic, Electric and Translational mechanics libraries . Workshop 4c Temperature control using Heat transfer Library • Lecture 5 Understanding equation-based modeling . Workshop 5 Defining boundary conditions • Lecture 6 Trouble shooting and common pitfalls . Workshop 6 Common pitfalls DAY 3 Dymola and Modelica II • Lecture 7 Modelica II – Advanced features . Workshop 7 Implementing a solar collector • Lecture 8 Working with the Modelica Standard Library . Workshop 8a Lamp logic using StateGraph II . Workshop 8b Suspension linkage using MultiBody mechanics • Lecture 9 Hybrid modeling . Workshop 9a Hybrid examples . Workshop 9b Hammer impact model . Workshop 9c Designing a thermostat valve DAY 4 Dymola and Modelica II • Lecture 10 Efficient and reconfigurable modeling . Workshop 10 Creating a system architecture based on templates and interfaces • Lecture 11 Model variants and data management . Workshop 11 Creating a data architecture and adaptive parameter interfaces • Lecture 12 FMI technology . Workshop 12a Import and Export FMUs in Dymola . Workshop 12b FMI with Excel . Workshop 12c FMI with Simulink DAY 5 Dymola and Modelica II • Lecture 13 Workflow automation and scripting . Workshop 13 Automated sensitivity analysis • Lecture 14 Dymola code with other tools .
  • Automated Annotation of Simulink Generated C Code Based on the Simulink Model

    Automated Annotation of Simulink Generated C Code Based on the Simulink Model

    DEGREE PROJECT IN COMPUTER SCIENCE AND ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM, SWEDEN 2020 Automated Annotation of Simulink Generated C Code Based on the Simulink Model SREEYA BASU ROY KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE Automated Annotation of Simulink Generated C Code Based on the Simulink Model SREEYA BASU ROY Master in Embedded Systems Date: September 25, 2020 Supervisor: Predrag Filipovikj Examiner: Matthias Becker School of Electrical Engineering and Computer Science Host company: Scania CV AB Swedish title: Automatisk Kommentar av Simulink Genererad C kod Baserad på Simulink Modellen iii Abstract There has been a wave of transformation in the automotive industry in recent years, with most vehicular functions being controlled electron- ically instead of mechanically. This has led to an exponential increase in the complexity of software functions in vehicles, making it essential for manufactures to guarantee their correctness. Traditional software testing is reaching its limits, consequently pushing the automotive in- dustry to explore other forms of quality assurance. One such technique that has been gaining momentum over the years is a set of verification techniques based on mathematical logic called formal verification tech- niques. Although formal techniques have not yet been adopted on a large scale, these methods offer systematic and possibly more exhaus- tive verification of the software under test, since their fundamentals are based on the principles of mathematics. In order to be able to apply formal verification, the system under test must be transformed into a formal model, and a set of proper- ties over such models, which can then be verified using some of the well-established formal verification techniques, such as model check- ing or deductive verification.
  • Máster Universitario En Investigación En Inteligencia Artificial

    Máster Universitario En Investigación En Inteligencia Artificial

    Identificador : 4311243 IMPRESO SOLICITUD PARA MODIFICACIÓN DE TÍTULOS OFICIALES 1. DATOS DE LA UNIVERSIDAD, CENTRO Y TÍTULO QUE PRESENTA LA SOLICITUD De conformidad con el Real Decreto 1393/2007, por el que se establece la ordenación de las Enseñanzas Universitarias Oficiales UNIVERSIDAD SOLICITANTE CENTRO CÓDIGO CENTRO Universidad Nacional de Educación a Distancia Escuela Técnica Superior de Ingeniería 28050756 Informática NIVEL DENOMINACIÓN CORTA Máster Investigación en Inteligencia Artificial DENOMINACIÓN ESPECÍFICA Máster Universitario en Investigación en Inteligencia Artificial por la Universidad Nacional de Educación a Distancia RAMA DE CONOCIMIENTO CONJUNTO Ingeniería y Arquitectura No HABILITA PARA EL EJERCICIO DE PROFESIONES NORMA HABILITACIÓN REGULADAS No SOLICITANTE NOMBRE Y APELLIDOS CARGO EMILIO LETÓN MOLINA Coordinador del Máster en Investigación en Inteligencia Artificial Tipo Documento Número Documento NIF REPRESENTANTE LEGAL NOMBRE Y APELLIDOS CARGO ALEJANDRO TIANA FERRER Rector Tipo Documento Número Documento NIF RESPONSABLE DEL TÍTULO NOMBRE Y APELLIDOS CARGO RAFAEL MARTINEZ TOMAS Director de la Escuela Técnica Superior de Ingeniería Informática de la Universidad Nacional de Educación a Distancia Tipo Documento Número Documento NIF 2. DIRECCIÓN A EFECTOS DE NOTIFICACIÓN A los efectos de la práctica de la NOTIFICACIÓN de todos los procedimientos relativos a la presente solicitud, las comunicaciones se dirigirán a la dirección que figure en el presente apartado. DOMICILIO CÓDIGO POSTAL MUNICIPIO TELÉFONO Bravo Murillo, 38 28015 Madrid E-MAIL PROVINCIA FAX Madrid 1 / 66 Verificable en https://sede.educacion.gob.es/cid y Carpeta Ciudadana (https://sede.administracion.gob.es) CSV: 298753191227704287823872 Identificador : 4311243 3. PROTECCIÓN DE DATOS PERSONALES De acuerdo con lo previsto en la Ley Orgánica 5/1999 de 13 de diciembre, de Protección de Datos de Carácter Personal, se informa que los datos solicitados en este impreso son necesarios para la tramitación de la solicitud y podrán ser objeto de tratamiento automatizado.
  • Lecture #4: Simulation of Hybrid Systems

    Lecture #4: Simulation of Hybrid Systems

    Embedded Control Systems Lecture 4 – Spring 2018 Knut Åkesson Modelling of Physcial Systems Model knowledge is stored in books and human minds which computers cannot access “The change of motion is proportional to the motive force impressed “ – Newton Newtons second law of motion: F=m*a Slide from: Open Source Modelica Consortium, Copyright © Equation Based Modelling • Equations were used in the third millennium B.C. • Equality sign was introduced by Robert Recorde in 1557 Newton still wrote text (Principia, vol. 1, 1686) “The change of motion is proportional to the motive force impressed ” Programming languages usually do not allow equations! Slide from: Open Source Modelica Consortium, Copyright © Languages for Equation-based Modelling of Physcial Systems Two widely used tools/languages based on the same ideas Modelica + Open standard + Supported by many different vendors, including open source implementations + Many existing libraries + A plant model in Modelica can be imported into Simulink - Matlab is often used for the control design History: The Modelica design effort was initiated in September 1996 by Hilding Elmqvist from Lund, Sweden. Simscape + Easy integration in the Mathworks tool chain (Simulink/Stateflow/Simscape) - Closed implementation What is Modelica A language for modeling of complex cyber-physical systems • Robotics • Automotive • Aircrafts • Satellites • Power plants • Systems biology Slide from: Open Source Modelica Consortium, Copyright © What is Modelica A language for modeling of complex cyber-physical systems
  • Introduction to Simulink

    Introduction to Simulink

    Introduction to Simulink Mariusz Janiak p. 331 C-3, 71 320 26 44 c 2015 Mariusz Janiak All Rights Reserved Contents 1 Introduction 2 Essentials 3 Continuous systems 4 Hardware-in-the-Loop (HIL) Simulation Introduction Simulink is a block diagram environment for multidomain simulation and Model-Based Design. It supports simulation, automatic code generation, and continuous test and verification of embedded systems.1 Graphical editor Customizable block libraries Solvers for modeling and simulating dynamic systems Integrated with Matlab Web page www.mathworks.com 1 The MathWorks, Inc. Introduction Simulink capabilities Building the model (hierarchical subsystems) Simulating the model Analyzing simulation results Managing projects Connecting to hardware Introduction Alternatives to Simulink Xcos (www.scilab.org/en/scilab/features/xcos) OpenModelica (www.openmodelica.org) MapleSim (www.maplesoft.com/products/maplesim) Wolfram SystemModeler (www.wolfram.com/system-modeler) Introduction Model based design with Simulink Modeling and simulation Multidomain dynamic systems Nonlinear systems Continuous-, Discrete-time, Multi-rate systems Plant and controller design Rapidly model what-if scenarios Communicate design ideas Select/Optimize control architecture and parameters Implementation Automatic code generation Rapid prototyping for HIL, SIL Verification and validation Essentials Working with Simulink Launching Simulink Library Browser Finding Blocks Getting Help Context sensitive help Simulink documentation Demo Working with a simple model Changing
  • FMI Target for Simulink Coder, It Is Now Possible to Export Models from Simulink to Any Platform That Supports Fmus for Co-Simulation

    FMI Target for Simulink Coder, It Is Now Possible to Export Models from Simulink to Any Platform That Supports Fmus for Co-Simulation

    Supporting your vision Cross-Platform Modeling with FMI Target for Simulink® Coder™ Open technology standards for an integrated product lifecycle Engine Transmission Thermal EV/HV Chassis Compo- Models Models Systems Models nents Models Functional Mock-Up Interface The challenge for manufacturers of complex machinery that heavily rely on components from suppliers is the seamless exchange of data and specifications during the development. The same holds true for large corporates with multiple R&D departments at various locations using several development tools due to different objectives. Those challenges include different programming languages from the various tools, the lack of standardized model interfaces and the concerns for the protection of intellectual property. The development of the Functional Mock-up Interface (FMI) has enabled software-, model- and hardware-in-the-loop simulations with dynamic system models from different software environments. With the FMI Target for Simulink Coder, it is now possible to export models from Simulink to any platform that supports FMUs for Co-Simulation. FMI for Co-Simulation The goal is to couple two or more models with solvers in a co-simulation environment. The data exchange between subsystems is restricted to discrete communication points. The subsystems are processed independently from each other by their individual solvers during the time interval between two communication points. Master algorithms control the synchronization of all slave simulation solvers and the data exchange between the subsystems. The interface allows for both standard and advanced master algorithms, such as variable communication step sizes, signal extrapolation of higher order and error checking. FMI Target for Simulink® Coder™ FMI for Co-Simulation For the exchange of models across different platforms, the FMI Target for Simulink Coder enables the export of models from Simulink as FMUs for Co-Simulation.
  • Making Simulink Models Robust with Respect to Change Making Simulink Models Robust with Respect to Change

    Making Simulink Models Robust with Respect to Change Making Simulink Models Robust with Respect to Change

    Making Simulink Models Robust with Respect to Change Making Simulink Models Robust with Respect to Change By Monika Jaskolka, B.Co.Sc., M.A.Sc. a thesis submitted to the Department of Computing and Software and the School of Graduate Studies of McMaster University in partial fulfillment of the requirements for the degree of Doctor of Philosophy Doctor of Philosophy (December 2020) McMaster University (Software Engineering) Hamilton, ON, Canada Title: Making Simulink Models Robust with Respect to Change Author: Monika Jaskolka B.Co.Sc. (Laurentian University) M.A.Sc. (McMaster University) Supervisors: Dr. Mark Lawford, Dr. Alan Wassyng Number of Pages: xi, 206 ii For my husband, Jason iii Abstract Model-Based Development (MBD) is an approach that uses software models to describe the behaviour of embedded software and cyber-physical systems. MBD has become an increasingly prevalent paradigm, with Simulink by MathWorks being the most widely used MBD platform for control software. Unlike textual programming languages, visual languages for MBD such as Simulink use block diagrams as their syntax. Thus, some software engineering principles created for textual languages are not easily adapted to this graphical notation or have not yet been supported. A software engineering principle that is not readily supported in Simulink is the modularization of systems using information hiding. As with all software artifacts, Simulink models must be constantly maintained and are subject to evolution over their lifetime. This principle hides likely changes, thus enabling the design to be robust with respect to future changes. In this thesis, we perform repository mining on an industry change management system of Simulink models to understand how they are likely to change.
  • A Comparison of Software Engines for Simulation of Closed-Loop Control Systems

    A Comparison of Software Engines for Simulation of Closed-Loop Control Systems

    New Jersey Institute of Technology Digital Commons @ NJIT Theses Electronic Theses and Dissertations Spring 5-31-2010 A comparison of software engines for simulation of closed-loop control systems Sanket D. Nikam New Jersey Institute of Technology Follow this and additional works at: https://digitalcommons.njit.edu/theses Part of the Electrical and Electronics Commons Recommended Citation Nikam, Sanket D., "A comparison of software engines for simulation of closed-loop control systems" (2010). Theses. 68. https://digitalcommons.njit.edu/theses/68 This Thesis is brought to you for free and open access by the Electronic Theses and Dissertations at Digital Commons @ NJIT. It has been accepted for inclusion in Theses by an authorized administrator of Digital Commons @ NJIT. For more information, please contact [email protected]. Cprht Wrnn & trtn h prht l f th Untd Stt (tl , Untd Stt Cd vrn th n f phtp r thr rprdtn f prhtd trl. Undr rtn ndtn pfd n th l, lbrr nd rhv r thrzd t frnh phtp r thr rprdtn. On f th pfd ndtn tht th phtp r rprdtn nt t b “d fr n prp thr thn prvt td, hlrhp, r rrh. If , r rt fr, r ltr , phtp r rprdtn fr prp n x f “fr tht r b lbl fr prht nfrnnt, h ntttn rrv th rht t rf t pt pn rdr f, n t jdnt, flfllnt f th rdr ld nvlv vltn f prht l. l t: h thr rtn th prht hl th r Inttt f hnl rrv th rht t dtrbt th th r drttn rntn nt: If d nt h t prnt th p, thn lt “ fr: frt p t: lt p n th prnt dl rn h n tn lbrr h rvd f th prnl nfrtn nd ll ntr fr th pprvl p nd brphl th f th nd drttn n rdr t prtt th dntt f I rdt nd flt.