2016, Controllab Products B.V. Author: Ir. C. Kleijn, Ir. M. A. Groothuis. Disclaimer

Please download to get full document.

View again

of 190
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Others

Published:

Views: 0 | Pages: 190

Extension: PDF | Download: 0

Share
Related documents
Description
2016, Controllab Products B.V. Author: Ir. C. Kleijn, Ir. M. A. Groothuis Disclaimer This manual describes the modeling and simulation package 20-sim. C ontrollab Products B.V. makes every effort to insure
Transcript
2016, Controllab Products B.V. Author: Ir. C. Kleijn, Ir. M. A. Groothuis Disclaimer This manual describes the modeling and simulation package 20-sim. C ontrollab Products B.V. makes every effort to insure this information is accurate and reliable. C ontrollab Products B.V. will not accept any responsibility for damage that may arise from using this manual or information, either correct or incorrect, contained in this manual. Information in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of C ontrollab Products B.V. Windows is a registered trademark of the Microsoft C orporation, USA. MATLAB is a registered trademark of The MathWorks, Inc., USA. Reference Kleijn, C., Groothuis, M.A. Enschede, C ontrollab Products B.V., 2016 ISBN Information C ontrollab Products B.V. Address: Hengelosestraat AN Enschede the Netherlands Phone: Internet: Table of Contents 1 Welcome 1 2 Notation 3 3 Installation Versions Installing 20-sim Uninstalling Deactivation Unattended Installation Unattended Uninstallation 8 4 Introduction What is 20-sim sim: a quick tour Library Block Diagrams Iconic Diagrams Bond Graphs Editor Simulator Toolboxes 22 5 Equation Models 5.1 Introduction Equation Mainmodel Equation Submodel 34 6 Block Diagrams Block Diagram Mainmodel Block Diagram Submodel 50 7 Iconic Diagrams i 7.1 Iconic Diagram (Electric) View Menu Iconic Diagram (Mechanical) 66 8 Bond Graphs 8.1 Bond Graph Model 9 3D Mechanics Toolbox 9.1 3D Mechanics Toolbox Double Pendulum Scara Robot Contact Modeling 10 Animation Toolbox Animation Toolbox D Animation Basics Planetary System Control Toolbox 11.1 Control Toolbox Frequency Domain Toolbox 12.1 Frequency Domain Toolbox Mechatronics Toolbox Mechatronics Toolbox Servo Motor Editor Real Time Toolbox 14.1 Real Time Toolbox Time Domain Toolbox 15.1 Time Domain Toolbox Scripting Toolbox Introduction Installation for Scripting: 20-sim 165 ii 16.3 Scripting in Octave/Matlab Scripting in Python 175 Index 181 iii 1. Welcome 1 Welcome This manual provides a basic overview of installing and using 20-sim. It is not a reference manual but intended as a guided tour to show you how to use 20-sim and how to create and simulate your own models. If you are a first time user you are advised to read this manual carefully and run the various examples to get hands on experience with the package. Installation: This chapter describes the various versions of 20-sim and how to install 20-sim on your computer. It is useful for system managers and if you experience problems installing the package. You may skip this chapter if 20-sim is properly working on your computer. Introduction: This chapter describes the basic parts of the 20-sim package, the modeling representations that are supported and the various toolboxes. It gives a good overview of the package. Users who want to learn the package by trial and error. Equation Models: No one should skip this chapter! It describes the basic modeling representation of 20-sim: (differential) equations. You should run the examples of this chapter to get a good understanding of entering equations in 20-sim. Block Diagram Models: Extremely recommended once you have finished the equations. Everyone will now and then use block diagram elements and in this chapter you can learn all about this modeling representation. Iconic Diagrams: Iconic diagrams or physical components are the building blocks of models of physical systems. This chapter is absolutely worth reading for everyone who is involved in modeling physical systems. Bond Graphs: Bond graphs are a mathematical notation of physical systems. 20-sim has a large library of bond graph elements. This chapter does not explain bond graphs but how to use 20-sim to enter bond graph models. 3D Mechanics Toolbox: The 20-sim 3D Mechanics Toolbox provides you with the tool that makes 3D dynamic modeling easier, the 3D Mechanics Editor. Animation Toolbox: The Animation Toolbox offers you an easy way to create 3D Animations and view graph animations. Control toolbox: The C ontrol Toolbox of 20-sim contains several tools that can aid you in developing controllers for your modeled machines, the C ontroller Design Editor, the Filter Editor and the Neural Network Editors. Frequency Domain Toolbox: The 20-sim Frequency Domain Toolbox consists of the Linear System Editor, FFT Analysis and Model Linearization functionality. Mechatronics Toolbox: The Mechatronics Toolbox includes the Motion Profile Wizard, the C AM Wizard and the Servo Motor Editor. 1 1. Welcome Real Time Toolbox: The Real Time Toolbox provides you with C -code generation tools and templates for all kinds of different targets and platforms. Time Domain Toolbox: During simulation, the time domain behavior of a model is calculated. Based on this time-domain behavior, the model can be analyzed. A set of powerful methods for time domain analysis is available in 20-sim. Scripting Toolbox: This chapter contains a description of the new scripting functionality that allows you to automate tasks with 20-sim using Octave, Matlab or Python. 2 2. Notation 2 Notation In the 20-sim manual the following typographic notations are used: User instructions are numbered: 1. Open the Simulator and start a simulation run. Specific 20-sim menus and menu commands are in bold: The simulator can always be started by the Start Simulator command from the Model menu. Files and directories are written in italic type: The file ScaraRobot.emx is located in C:\Program Files\20-sim 4.6\Models\Examples \2D Mechanics (or on 64-bit systems: C:\Program Files (x86)\20-sim 4.6\Models \Examples\2D Mechanics). 20-sim commands, windows and window parts are started with an uppercase character and written in italic type: Drag and drop the model from the Library Browser to the Graphical Editor. Parameters, variables and other specific 20-sim elements are written in italic type: In the equation model the function abs is used to make the signal output equal to the absolute value of sum of variable offset and the signal input. 3 3. Installation 3 Installation 3.1 Versions 20-sim is available in two versions: Viewer and Professional. Viewer/Demonstration version: This is a freeware version that allows you to load and run models and evaluate the package. Saving of models is not possible in this version. Professional: This is the full version of 20-sim with all toolboxes. The table below shows in detail the options that are available in the three versions: Viewer Professional Library Models v* v 3D Mechanics Toolbox v* v Animation Toolbox v* v C ontrol Toolbox v* v Frequency Domain Toolbox v* v Mechatronics Toolbox v* v Real Time Toolbox v* v Time Domain Toolbox v* v x v Scripting Toolbox v = included v* = included but no saving possible x = not available 20-sim is installed, using an Installation Manager that will lock 20-sim to your computer. There are three types of licenses available: Viewer/Demonstration: The free demonstration version comes with a license that is not locked to your computer. No actions have to be taken after installation of 20sim to use this license. The limitation of this license is that you cannot save any modifications. Single License: A single license locks 20-sim to a specific computer. After installation you have to register to get a valid license. Floating License: A floating license allows multiple users to work with 20-sim at the same time. After installation you have to register to get a valid license. 4 3. Installation 3.2 Installing 20-sim 20-sim can be downloaded from the website This is an installation file that will install 20-sim on your computer. The first 4 steps are equal for all users. Depending on the type of license (single, floating) you have to continue differently. 1. Install 20-sim and start the program. 2. During Installation you will be asked to install the (optional) Python 3.4 package. We advise to keep the default setting: Yes. 3. Start 20-sim (from the Windows Start Menu choose 20-sim 4.6). If a valid license of 20-sim 4.6 was activated before, the program will start automatically and you can skip the rest of this section. If you have not installed 20-sim before, the License Activation dialog will open. You can also manually open the License Activation dialog: 4. From the Help menu select License Activation. Use the Registration/Update window to request for a license. 5. If you have a valid license key or license file, press the Activation button to enter your license key or browse for the license file. If you do not yet have a valid license, press the Trial License button request an trial license or press the Buy button to purchase a license. If you want to continue in Viewer mode (no save functionality), just close the dialog without activating 20-sim. 6. Select which kind of license you have and who should use the license. 5 3. Installation License installation dialog. Single License If you are using a single license, you have to enter a license key or license file. 7. On the next dialog, select I received a license key by and enter the key in the next dialog. When you received a license file, you have to enter the location of the license file. Single License dialog. You will be asked for confirmation (click Activate Now) and activation will be carried out. After a successful activation process the License Information dialog will show the new license. Web Activation dialog. 6 3. Installation Floating License Installing a floating license (Administrator) If you are using a license that is shared by more users (floating license, also known as concurrent license or server license), you have enter the received license key and a location on the server (a normal Windows shared folder) first. This location on the server should be accessible to all users and have read/write permission. The floating license will be stored at the selected location. 6. On the next dialog, select First Installation and then enter the license key and the location on the server (Windows share). On the location that you have given, a license file 20sim.lic will be installed. Remember the location of this file because every new user of 20-sim will need to enter it. You will be asked for confirmation (click Activate Now) and activation will be carried out. After a successful activation process the License Information dialog will show the new license. Using a floating license (Other users, Administrator) If you are using a floating license that was already installed you have to enter the location of the license file. 7. On the next dialog, select Administrator already installed server license and then enter the license location (i.e. location of the file 20sim.lic). After a successful entry of the location of the license location, the License Information dialog will show the new license. 3.3 Uninstalling You can uninstall 20-sim by clicking the Uninstall command from the 20-sim start menu. Uninstalling of 20-sim will not deactivate your license. If you want to move 20-sim to another computer, you have to deactivate your license first before uninstalling. 3.4 Deactivation If you want to move 20-sim to another computer, you have to deactivate your license before uninstalling the program. On the new computer you can then install the program and activate the license. To deactivate your license: 1. From the Windows Start menu open 20-sim. 2. From the Help menu choose License Activation. 3. Press the Activation button. 4. C hoose Deactivate the License and click Finish You will be asked for confirmation and deactivation will start. After a successful deactivation, you version of 20-sim has turned into the demonstration version. You can now uninstall the software and reinstall it. 3.5 Unattended Installation An unattended installation is an installation that is performed without user interaction during its progress or with no user present at all. 7 3. Installation To perform an unattended installation the default 'program files' installation directory run the following command : 20sim.exe /S It is possible to set an alternative installation directory by specifying the /D argument. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. Only absolute paths are supported. 20sim.exe /S /D=D:\My Installation Files\20-sim Unattended Uninstallation An unattended uninstall is an uninstall that is performed without user interaction during its progress or with no user present at all. To perform an unattended uninstall from the default 'program files' installation directory run the following command on the 20-sim uninstaller: C:\Program Files (x86)\20-sim 4.6\Uninstall.exe /S 8 4. Introduction 4 Introduction 4.1 What is 20-sim 20-sim is a modeling and simulation program that runs under Microsoft Windows. With 20-sim you can simulate the behavior of dynamic systems, such as electrical, mechanical and hydraulic systems or any combination of these. 20-sim fully supports graphical modeling, allowing to design and analyze dynamic systems in a intuitive and user friendly way, without compromising power. 20-sim supports the use of components. This allows you to enter models as in an engineering sketch: by choosing components from the library and connecting them, your engineering scheme is actually rebuilt, without entering a single line of math! From the engineering sketch, directly to a model, one on one! 9 4. Introduction sim: a quick tour The best way to experience the capabilities of 20-sim is to open example models and run simulations. In this quick tour we will show you how to load models from the Examples library and run simulations. 1. Start 20-sim. 20-sim consists of two main windows (Editor and Simulator) and a lot of tools. The Editor opens when you start 20-sim. In the Editor you can create your models. The 20-sim Editor. The Editor consists of four parts: Model tab / Library tab: This is the part at the middle left. The Model tab shows the model hierarchy, i.e. the hierarchical composition (all the elements) of the model that is created in the Editor. The Library tab shows the 20-sim library. Graphical Editor / Equation Editor: This is the big white space at the middle right. In this editor you can create graphical models and enter equations. Output tab / Process tab / Find tab: This is the part at the bottom right. The Output tab shows the files that are opened and stored. The Process tab shows the compiler messages. The Find tab shows the search results. Interface tab / Icon tab: This is the part at the bottom left. The Interface tab shows the interface of a selected model. Double clicking it will open the Interface Editor. The Icon tab shows the icon of a selected model. Double clicking it will open the Icon Editor. We will open the model DiscreteController.em from the Examples\Control\Standard Control folder. 2. Select the Library tab to open the Library Browser (shows the 20-sim library). 10 4. Introduction 3. In the Library Browser select Examples - Control - Standard Control - Discrete Controller. Your Editor should now look like: The 20-sim Editor with the model library selected. Note: All models in 20-sim are stored on file with the extension.emx. Library models can be found where 20-sim was installed, e.g. C:\Program Files (x86)\20-sim 4.6 \Models. The model DiscreteController is stored in: C:\Program Files\20-sim 4.6 (x86) \Models\Examples\Control\Standard Control\DiscreteController.emx 4. Drag and drop the Discrete Controller model to the graphical editor (large white area). Now the model is opened. Your Editor should look like: The 20-sim Editor with the model DiscreteController.emx loaded. 11 4. Introduction You can inspect the model by enlarging the Editor window or using the zoom button. We will continue the quick tour running a simulation. 5. In the Model menu select Start Simulator. Now the Simulator will be opened. The 20-sim Simulator with the model DiscreteController.emx loaded. In the Simulator you can run a simulation and show the results in plots and animations. The Simulator contains various tools to analyze the simulation results. 6. In the Simulation menu select Run. Now a simulation run will be performed. Your Simulator should look like: The 20-sim Simulator with the simulation results. 12 4. Introduction You have just learned how to open and run an example model. Try to load and run other models from the Examples library to find out more about the capabilities of the 20-sim package. 4.3 Library In 20-sim, creating models only takes you just a few mouse clicks. By dragging an element from the library and dropping it in the graphical editor, your model is actually built the same way as you would draw an engineering scheme. 20-sim supports various model representations, such as block diagrams and iconic diagrams. These representations may be combined in one model. Library Browser All models in 20-sim are stored on files with the extension.emx. The standard libraries can be found in the 20-sim folder: C:\Program Files\20-sim 4.6\Models or on 64-bit systems: C:\Program Files (x86)\20-sim 4.6\Models This folder contains all the models that are visible in the Library Browser on the left part of the Editor. You can find the library at the left of the Editor. The library contains 4 sections: Bond Graph: bond graph elements Iconic Diagrams: Physical components Signal: Block diagram elements Tutorial: example models that show you how to perform various tasks in 20-sim Getting Started: al the models that you need in the lessons of the Getting Started manual. 13 4. Introduction Open Models All library models are open source. You can inspect the content of any model in the Editor. If the model contains a hierarchy, you can use the Go Down command of the Model menu to descend in the hierarchy. If a model opens a specific editor, you can still inspect the underlying code by keeping the shift key pressed while clicking the Go Down command. Custom Libraries You can create your own model libraries in 20-sim: 1. From the Tools menu click Options - Folders - Library Folders. 2. Add your folder. 3. Give it a useful name by clicking Edit Label. 4. C lick OK to close the dialog. Then you can add your own library models to the library: 5. Select the submodel that you want to store in your library. 6. From the File menu select Save Submodel. 7. Store the submodel in your library folder. The next time you start up 20-sim, the library will show the new submodel. 4.4 Block Diagrams Block diagrams allow you to graphically represent the mathematical relationships between signals in a system. They are especially suited to model control systems. In 20sim a large library of block diagram elements is available. The elements are displayed in the Editor by icons. You can create block diagram models by dragging the elements to the Graphical Editor and making the proper connections between the elements. 14 4. Introduction Library 20-sim has a large library of block diagram elements such as linear, non-linear, discrete and source elements. In 20-sim you can create custom made block diagram elements and add them to the existing libraries or combine them in newly defined libraries. From the Library Browser (left) you can drag and drop elements into the Graphical Editor (right). Signals The foundation of block diagram elements is the use of input and output signals. 20-sim allows you to create user defined block diagram elements with an arbitrary number of input and output signals. Signal sizes can be 1 (default) or larger. Custom Made Models In 20-sim you can create your own block diagram elements and save them in your own model library. Models can have an arbitrary number of ports, input and output signals. A specialized drawing editor can be used to give the models any kind of representation. 4.5 Ico
Recommended
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks