Contents Previous Next
1 BlockImporter
1.1 Introduction to BlockImporter
Overview
BlockImporter allows you to import a Simulink® model into Maple, and convert it to a set of mathematical equations. Maple provides the power to simplify, manipulate, and simulate the model.
Features of this toolbox include:
The ability to perform calculations and simplifications on your Simulink® models by using Maple's suite of tools.
Perform advanced analysis on your systems by using Maple's built-in DynamicSystems package, including system object representation, graphical analysis, system manipulation procedures, signal generation tools, and system simulation.
Reliable, tested computational routines to test the validity of your models, before performing simulations.
Commands for performing frequency- and complex-domain analysis, stability and sensitivity analysis, and parameter optimization on your Simulink® models.
Symbolic methods for eliminating algebraic loops, which can significantly improve the efficiency and execution speed of your Simulink® models.
Requirements
Before installing BlockImporter, you must install and activate Maple 2024. You must also install MATLAB® and Simulink® before using this toolbox. For details on supported Simulink® versions and installation instructions, see the Install.html file on the product disc.
You need a purchase code to activate BlockImporter. This code has been emailed to you. If you have not received your purchase code, contact Maplesoft Customer Service at custservice@maplesoft.com, or the Maplesoft office or reseller in your region (visit http://www.maplesoft.com/contact/).
After installation, the BlockImporter.mw file appears on your desktop (Windows® and Mac®) or in your home directory (Linux®). Open this file. Note that you can also access this file by entering ?BlockImporter,Tour in Maple.
The document BlockImporter.mw contains links to getting started documentation, help system documentation, and more. The getting started documentation contains an overview of the tools in this product, and provides multiple examples. The examples illustrate how to define a model in Simulink®, import the mathematical model into Maple, and perform analyses such as stability, sensitivity, and parameter optimization.
1.2 Getting Started with BlockImporter
Establishing a Connection
To begin, open a new Maple window. Enter the following command to establish a connection with MATLAB®.
Matlabopenlink
A MATLAB® command window should open. If one does not, follow the instructions in the Matlab/setup help page to configure the connection.
You are now ready to use BlockImporter.
Help with BlockImporter
For a list of commands in Maple to support BlockImporter, see the BlockImporter help page. Links to related Maple commands are also provided; many built-in Maple functions, especially the commands in the Dynamic Systems package, can be extremely helpful in generating and manipulating physical system models.
1.3 Working with BlockImporter
You can import any Simulink® system or subsystem model by using the Import command.
Set the directory in which the Simulink® files are located. For example, use the directory containing the pre-installed BlockImporter example models, which can be located by using the following command.
datadir≔BlockImporterDataDirectory:
Using the Import command, specify the file to import. The inplace option indicates that the model will be converted in MATLAB® to a Maple record.
withBlockImporter
BuildDE,Import,PrintSummary,SimplifyModel
sys ≔ Importexample, path = datadir, init = example_init, inplace = true:
This particular model has the following model diagram in Simulink®.
A copy of the model is created, consisting of a list of mathematical equations. Use the PrintSummary command to display the equations, variables, and parameters.
PrintSummarysys:
u10,1,1=y2,1,1,u2,2,1=y3,1,1,u2,1,1=y4,1,1,u8,1,1=y6,1,1,u9,1,1=y7,1,1,u4,1,1=y8,1,1,u3,1,1=y8,1,1,u11,1,1=y9,1,1,u9,2,1=y10,1,1,u5,1,1=y11,1,1,u8,2,1=y11,1,1,y2,1,1=u2,1,1+u2,2,1,y3,1,1=u3,1,1,D⁡x4,1=u4,1,1,y4,1,1=x4,1,SinkScope,5,1,1=u5,1,1,y6,1,1=SourceStep,6,1,y7,1,1=SourceStep,7,1,y8,1,1=u8,1,1−u8,2,1,y9,1,1=u9,1,1+u9,2,1,D⁡x10,1=u10,1,1−K0,a1⁢x10,1,y10,1,1=x10,1,D⁡x11,1=u11,1,1−K0,a2⁢x11,1,y11,1,1=x11,1
x4,1,x10,1,x11,1
x4,1⁡0=0,x10,1⁡0=0,x11,1⁡0=0
SourceStep,6,1={0t<11otherwise,SourceStep,7,1={0t<40.1otherwise
SourceStep,6,1,SourceStep,7,1
SinkScope,5,1,1
K0,a1=2.,K0,a2=1.
Use Maple's built-in simplification and simulation routines, especially those in the DynamicSystems package, to manipulate the model.
With the basic tools outlined here, you are now ready to use BlockImporter to create many engineering design solutions. See the Maple help system for more information about the commands used in this guide, or more ways in which BlockImporter can help you.
Download Help Document