1 Simulink Create a model in Simulink Run simulation from Simulink Invoke simulation from a MATLAB script Create a subsystem Create a testbed for testing.

Slides:



Advertisements
Similar presentations
1 Application Software Course Simulink By: Mahdi Akbari 2010.
Advertisements

1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
For System Dynamics & Control
Simulink Overview: open simulink to open simulink Library Browser.
Getting started with Simulink An introductory tutorial ES205 Analysis and Design of Engineering Systems Rose-Hulman Institute of Technology © R. Layton.
© 2011 Xilinx, Inc. All Rights Reserved This material exempt per Department of Commerce license exception TSU Simulink Basics.
475 Wall Street, Princeton NJ Introduction to PSCAD © 2012 Nayak Corporation Inc. 1.
HOW TO CREATE A HISTOGRAM IN EXCEL. STEP 1: INSTALL ANALYSIS TOOLPAK 1.Click on the Microsoft Office Button (circle button) 2.Click on Excel Options.
System Dynamics, Third Edition
Control Systems Engineering, Fourth Edition by Norman S. Nise Copyright © 2004 by John Wiley & Sons. All rights reserved. Figure C-1 (p. 907) MATLAB window.
1 A Tool for System Simulation: SIMULINK Can be used for simulation of various systems: – Linear, nonlinear; Input signals can be arbitrarily generated:
E.1 Eclipse. e.2 Installing Eclipse Download the eclipse.installation.exe from the course web site to your computer and execute it. Keep the destination.
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
HossamTalaat - MATLAB Course - KSU - 21/1/24 1 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink By Prof. Hossam Talaat.
Simulink ® From Simulink® 7 Getting Started Guide.
DC Motor Model Using Simscape Engr. Salim Lashari.
Using Simscape™ for Modeling Vibration Problems:
EPSII 59:006 Spring Topics Using TextPad If Statements Relational Operators Nested If Statements Else and Elseif Clauses Logical Functions For Loops.
Controlling a 3D Vehicle with Simulink Jeff Bender ME
Introduction to Simulink Dr. Mohammed F. Alsayed.
Chapter 1 Databases and Database Objects: An Introduction
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
Control Theory Lab 4 Modeling of Physical-SİMULİNK.
Chapter 1: Getting Started with MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
CMPS 1371 Introduction to Computing for Engineers MatLab.
ECEN/MAE 3723 – Systems I MATLAB Lecture 2. Lecture Overview What is Simulink? How to use Simulink  Getting Start with Simulink  Building a model Example.
Chapter 4 Creating a Custom Publication from Scratch Microsoft Publisher 2013.
Fuzzy Logic Toolbox in MATLAB Praktikum 10. example  We want to buid FIS Mamdani, with this rules :  1. If the service is poor or the food is rancid,
Very Short Simulink Tutorial In the Matlab command window write simulink. The window that has opened is the Simulink Library Browser. –It is used to choose.
Regensburg, 24. – Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory.
OUTLINE Overview Numbers, variables and similar in Matlab
Plot the value of a single variable along an aquifer at different times.
Introduction to Matlab Module #9 Page 1 Introduction to Matlab Module #9 – Simulink Topics 1.Simulink Textbook Reading Assignments Practice Problems.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 10 Simulink PowerPoint to accompany Copyright © The McGraw-Hill Companies,
Multisim Subcircuits. Draw the basic circuit you want.
EE 460 Advanced Control and System Integration
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VII Introduction to SIMULINK Rajeev Madazhy
DC Motor Speed Modeling in Simulink
EE3417 – Introduction to Simulink
Modeling of Power Converters using Matlab and Simulink
Simulink Simulink is a graphical extension to MATLAB for modeling and simulation of systems. In Simulink, systems are drawn on screen as block diagrams.
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
Simulink Simscape by Dr. Amin Danial Asham.
Getting started with MATLAB/Simulink
Simulink by Dr. Amin Danial Asham. References  MATLAB Help  Telemark University College - Department of Electrical Engineering, Information Technology.
Simulink  ? 1 Simulink  ( Simu lation and Link ) is an extension of Matlab Offers modeling, simulation, and analysis of dynamical systems; i.e., a system.
MATLAB and SimulinkLecture 21 To days Outline Introduction to Simulink Block diagrams Building models Exercises on today’s topics.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
Plotting Data & the Finding Regression Line. Clear Old Data 2 nd MEM 4 ENTER.
HossamTalaat - MATLAB Course - KSU - 17/08/14231 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink (part 2) By Prof. Hossam.
Getting started with Simulink
Simulink Modelling Tutorial In Simulink, it is very straightforward to represent a physical system or a model. In general, a dynamic system can be constructed.
Getting started with Simulink An introductory tutorial.
 Types of communication systems ◦ Coaxial (Wired) ◦ Microwave (Wireless) ◦ Satellite (Wireless) ◦ Cable (Wired) ◦ Cellular (Wireless)
An Introduction to Simulink
BEST Robotic, Inc. MATLAB/Simulink Team Training
Matlab Programming for Engineers
VAB™ for INFINITY Tutorial
Single Tank System FV Desired liquid level: 5 cm (0.05 m)
- Graphical extension to MATLAB for modeling and simulation of systems
Appendix B MathScript Basics
SIMULINK LOGIKA DAN PEMROGRAMAN KOMPUTER Wayan Nata Septiadi, ST
ECEN/MAE 3723 – Systems I MATLAB Lecture 2.
Simulink Basics Reijo Vuohelainen
Licensed Electrical & Mechanical Engineer
Using AMOS With SPSS Files.
Fundamental Operation
Getting Started With Simulink
Simulink Examples Ex1: Simulate the following equation Blocks needed:
Presentation transcript:

1 Simulink Create a model in Simulink Run simulation from Simulink Invoke simulation from a MATLAB script Create a subsystem Create a testbed for testing subsystem

2 Differential Equation

3 Simulation

4 File > New > Model or

5 Drag Blocks from Sublibraries into Model File > Save as … example.slx

6 Flipping a Block: Right-Click the Block, Select “Rotate & Flip”

7 Connect Two Blocks: Click Output, Drag Arrow to Input (Click 1 st Block, Control-Click 2 nd Block)

8 Tap into One Line, Creating a Branch Position cursor on the line, control-click and drag new arrow

9 Renaming Blocks 1.Highlight name of block 2.Type new name (erasing old name) 3.Esc key (not Enter)

10 Change Parameters in a Block double-click the block

11 SublibraryBlockParameters SourcesStep Math OperationsSum (2) Math OperationsGain (2) ContinuousIntegrator (2) SinksScope SinksTo WorkspaceVariable name: y Saved as: Array Blocks for This Simulation

12 example.slx

13 Simulation > Model Configuration Parameters (from the example.slx window)

14 Model Configuration Parameters PaneParameters SolverStart time: 0.0 Stop time: 20 Max step size: 0.1 Data Import/ExportTime: t Format: Array Output: y

15 Run then double-click Scope

16 Click Autoscale

a = [1 10]; curv = {'-b','--r'}; figure(1) for n = 1:2 C = 1/a(n); K = sqrt(2*a(n)); set_param('example/C','Gain',num2str(C)) set_param('example/K','Gain',num2str(K)) sim('example') plot(t,y,curv{n}) hold on end axis([ ]) set(gca,'YTick',0:0.2:1.2) set(gca,'FontSize',20) xlabel(‘t') ylabel('y') title('Step Response') legend('a = 1','a = 10','Location','SouthEast') set(findobj(gcf,'LineWidth',0.5),'LineWidth',2) saveas(1,'Step Response','png') 17 Create MATLAB script runexample.m and run it from MATLAB

18

19 Prepare New Model with Generic Input/Output Remove these blocks: Step, Scope, To Workspace. Add In1 (Sources Sublibrary) and Out1 (Sinks Sublibrary). Rename In1 and Out1. File > Save as … diffEq.slx

20 Create Subsystem Edit > Select All Diagram > Subsystem & Model Reference > Create Subsystem from Selection

21 Create Testbed for Testing Subsystem Rename subsystem block. Add Step on input. Step time: 0, Start value: 0, Final value: 1 Add Scope to output. Add To Workspace. Variable name: y, Save format: Array Save as … test.slx

22 Simulation > Model Configuration Parameters (from the test.slx window)

23 Model Configuration Parameters PaneParameters SolverStart time: 0.0 Stop time: 20 Max step size: 0.1 Data Import/ExportTime: t Format: Array Output: y

a = [1 10]; curv = {'-b','--r'}; figure(1) for n = 1:2 C = 1/a(n); K = sqrt(2*a(n)); set_param(‘test/diffEq/C','Gain',num2str(C)) set_param(‘test/diffEq/K','Gain',num2str(K)) sim(‘test') plot(t,y,curv{n}) hold on end axis([ ]) set(gca,'YTick',0:0.2:1.2) set(gca,'FontSize',20) xlabel(‘t') ylabel('y') title('Step Response') legend('a = 1','a = 10','Location','SouthEast') set(findobj(gcf,'LineWidth',0.5),'LineWidth',2) saveas(1,'Step Response','png') 24 Create MATLAB Script runtest.m and run it from MATLAB

25 Exercise Simulate the following differential equation using a step input.