Simulink 강의 노트 작성 일자 : 2007, 01, 30 저 자 : 임 종수. 강의 순서 -- Section 1. 1. Simulink 의 특징과 install 시 주의사항. 2. simple simulink model 개발. 3. simulink 의 계산 방법.

Slides:



Advertisements
Similar presentations
1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
Advertisements

MATLAB and SimulinkLecture 71 To days Outline  Callbacks  MATLAB And Simulink  S-functions  Project suggestions.
For System Dynamics & Control
Time plan and deadlines Week Introduction lectures - Start lab: Intro to Simulink. (About 20 hours of work) - Electronic quizzes in webct - Choose.
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.
MotoHawk Training Model-Based Design of Embedded Systems.
1 A Tool for System Simulation: SIMULINK Can be used for simulation of various systems: – Linear, nonlinear; Input signals can be arbitrarily generated:
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.
Special Projects on Control Topic : MATLAB Simulink.
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.
Anne Mascarin DSP Marketing The MathWorks
Simulink ® Interface Course 13 Active-HDL Interfaces.
Introduction to Simulink Dr. Mohammed F. Alsayed.
LAB 1 MATLAB, dSPACE and Simulink
C-MEX S-Function MATLAB SIMULINK SI Lab Presentation Presented by: Ashkan Jalili 2007/12/08.
Simulink ® Interface Course 13 Active-HDL Interfaces.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Tot 15 LTPDA Graphic User Interface summary and status N. Tateo 26/06/2007.
Control Theory Lab 4 Modeling of Physical-SİMULİNK.
C Language 실습 (Chap1. “HelloWorld”)
Copyright © 2010, SAS Institute Inc. All rights reserved. SAS ® Office Analytics.
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.
M.S. Thesis Defense Jason Anderson Electrical and Computer Engineering Dept. Clemson University.
Time plan and deadlines Week Introduction lectures - Start lab: Intro to Simulink. (About 20 hours of work) - Electronic quizzes in webct - Choose.
Regensburg, 24. – Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory.
Chapter9_10 Circuit & Packet Switching
OUTLINE Overview Numbers, variables and similar in Matlab
Introduction to Matlab and Simulink
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
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,
© 2003 The MathWorks, Inc. 1 Importing C code into Simulink for Signal Processing Applications © 2003 The MathWorks, Inc. Colin Warwick
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
EE3417 – Introduction to Simulink
© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 12”
S-Functions in 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.
Go by Example Closures ~ Errors , Sam Jo.
9-4 The Shifter  Shifter shifts the value on Bus B  Right shift and Left shift Bidirectional shift register with parallel load First clock pulse 에 Bus.
MATLAB and SimulinkLecture 21 To days Outline Introduction to Simulink Block diagrams Building models Exercises on today’s topics.
MATLAB och SimulinkLecture 41 To days Outline  Continuous system  Discrete systems  Subsystem  Masking  Exercises on this days topics.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
7. Design and Performance. 7.1 INTRODUCTION Good Performance = Careful Design x Careful Choice of Coding Parameters [ Issues on this Chapter ] The design.
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
Getting started with Simulink An introductory tutorial.
 Types of communication systems ◦ Coaxial (Wired) ◦ Microwave (Wireless) ◦ Satellite (Wireless) ◦ Cable (Wired) ◦ Cellular (Wireless)
WORKSHOP 1 CO-SIMULATION.
- Graphical extension to MATLAB for modeling and simulation of systems
ECEN/MAE 3723 – Systems I MATLAB Lecture 2.
Simulink Basics Reijo Vuohelainen
Contents Simulink model Grouping into subsystems Naming the subsystems
Workshop on INTRODUCTION OF MATLAB/SIMULINK TOOLS AND THEIR APPLICATION conducted by EEE/CCET 11/13/2018 workshop on 01/12/2010.
سیمولینک کنترل خطی در متلب
Fundamental Operation
LTPDA Graphic User Interface summary and status
Getting Started With Simulink
Introduction To Simulink
Matlab Basic Dr. Imtiaz Hussain
Simulink Examples Ex1: Simulate the following equation Blocks needed:
Introduction To MATLAB
Modulation Lab 2 – 2019/1440 By: Elham Sunbu.
Presentation transcript:

Simulink 강의 노트 작성 일자 : 2007, 01, 30 저 자 : 임 종수

강의 순서 -- Section Simulink 의 특징과 install 시 주의사항. 2. simple simulink model 개발. 3. simulink 의 계산 방법. 4. Triggered model concept. 5. Model workspace concept. 6. model parameter settings rule. 7. masking concept 8. simulink library 개발. -- Section matlab 과 simulink 의 연동. 2. simulink 의 third party 소개.

Simulink 의 특징. Simulink 는 동적으로 데이터를 분석. -> step size. 그래픽 언어. -> 알고리즘 개발보다는 구현.( 즉, 이론보다는 구현 위주 ) 조합회로에 해당. -> model 은 하나의 step size 에서 동시에 계산. -> 순차회로는 stateflow 에서 수행. 독특한 debugging 방법. C/C++, Ada, Fortran, M-file 과의 link -> S-function

Simulink Install 방법. Matlab 버전과는 독립적으로 운영. Install 시 다음 사항에 주의.

Simple Simulink Model(1)

Simple Simulink Model(2) y=ksin(x) model 개발 : ① Sources Library 에 있는 Sine Wave block. ② Sinks Library 에 있는 Scope block. ③ Math Library 에 있는 Gain block.

Simple Simulink Model(3)

Simple Simulink Model(4) 주석을 삽입할 수 있다. -> 수학기호 및 다른 특수 문자 삽입가능. Port Data type 표시 기능. Storage class 표시 기능. Sample Time Colors Signal Dimension 표시 기능.

Simple Simulink Model(5) 버전에 따라서 GUI 환경이 다름. install 한 toolbox 에 따라서 GUI 환경이 다름. model 에 대한 거의 모든 환경을 setting 할 수 있음.

Simple Simulink Model(6)

Simple Simulink Model(7) >> simplot(ScopeData) -> simplot 사용 기능. simulation 결과 2 개의 경고문이 발생. 1) continuous states 가 없음. 2) maximum step size : 0.2

Simulink Model Ex1(1) Motion Equation : -> 2 계 system 이므로 2 개의 적분 block 이 필요. damping 계수 c=1.0 lb sec/ft, spring 상수 k=2 lb/ft, cart 의 질량 m=5 slugs. ->

Simulink Model Ex1(2)

Simulink Model Ex1(3)

Simulink Model Ex1(4)

Simulink Model Ex1(5)

Subsystem (1)

Subsystem (2)

Simulink & Matlab 데이터 교환 (1) % 시간 축의 범위는 0 ∼ 7 초이고, % sampling frequency 는 100[Hz] 이다. >> XTime=0:0.01:7; >> YData=sin(XTime); >> MatToSim=[XTime' YData']; >> plot(XTime,YData,'k') >> set(gcf,'color','w','pos',[ ],'units','pixels') >> axis([min(XTime) max(XTime) min(YData) max(YData)]) >> grid on

Simulink & Matlab 데이터 교환 (2)

Simulink & Matlab 데이터 교환 (3)

Simulink 의 계산 방법 (1) 초기화 과정에서 model 을 구성하는 blocks 의 실행 ( 즉, 갱신 ) 순서를 정함. -> Simulink 는 모든 inputs 에 대한 outputs 의 관계에 근거하여 model 을 구성하 는 block 들을 분류. 1) direct-feedthrough port : 현재의 input port 값은 곧바로 block 의 현재 output port 값을 결정. 예 : gain, Product. 등등 2) non-direct-feedthrough port : Integrator block 의 output port 는 입력이 아닌, states 의 함수, Constant block 은 입력을 가지고 있지 않으며, Memory block 의 output 은 이전 time step 에서의 입력 Simulink 는 direct-feedthrough port 를 갖지 않는 block 을 update 순서의 앞에 놓고, direct-feedthrough port 를 갖는 block 을 update 순서의 뒤에 놓는 초기화 과정을 수행하고 나서 update 를 순서대로 수행.

Simulink 의 계산 방법 (2)

Simulink 의 계산 방법 (3) Computability Model

Triggered Model Comcept(1) Enabled Subsystem : control signal 이 positive 인 경우, 각각의 simulation step 에서 실행. 즉, scalar 또는 vector 형태를 갖는 control signal 이 negative 에서 positive 로 바뀌는 순간 실행을 시작하여 positive 에서 negative 로 바뀌는 경우 실행을 멈춤. Triggered Subsystem : 임의의 trigger event 가 발생할 때마다 한번 실행한다. rising edge 또는 falling edge 가 발생한 경우.

Triggered Model Comcept(2)

Triggered Model Comcept(3)

Triggered Model Comcept(4)

Triggered Model Comcept(5) 실습 : subsystem 안의 unit delay 에 주의.

Model Workspace Concept(1) model workspace 에 있는 변수들은 단지, 해당 model 의 범위에서만 볼 수 있 으며, model 이 loading 될 때, 이들 변수에 관련된 데이터가 초기화됨. * Model Explorer : Simulink model 또는 Stateflow chart 의 elements 에 대 한 위치를 찾거나, 보거나, 수정할 때 사용.

Model Workspace Concept(2)

* Model workspace 에 새 로운 변수 AmpVar 생성. * Model workspace 에 있 는 AmpVar 를 Model 매개 변수로 선언. Model Workspace Concept(3)

Model Workspace Concept(4)

Model Parameters Setting(1) Matlab Handle Graphics System – set.m, get.m Simulink Parameter based System – set_param, get_param – set_param('obj', 'parameter1', value1, 'parameter2', value2,...) – get_param('obj', 'parameter')

Model Parameters Setting(2)

Model Parameters Setting(3)

Model Parameters Setting(4) sim command : –Model 을 matlab command window 에서 실행. – sim(‘model name’) 예 제 :

Masking Concept(1) Subsystems 에 대한 custom user interfaces( 즉, masks) 를 새롭게 만드는 기법. Masked subsystem 의 요구 사항 : – Mask Icon. – Mask Parameters – Mask Initialization Code – Mask Workspace

Masking Concept(2)

Masking Concept(3)

Masking Concept(4)

Masking Concept(5)

Masking Concept(6)

Masking Concept(7)

Masking Concept(8)

Masking Concept(9)

Masking Concept(10)

Masking Concept(11)

Masking Concept(12)

Masking Concept(13)

Simulink Library(1)

Simulink Library(2)

Simulink Library(3) function blkStruct=slblocks %SLBLOCKS Defines the block library for a specific Toolbox or Blockset. % % 2005, 6, 6 By Lim Jong Su % blkStruct.Name=sprintf('Sim Library Test'); blkStruct.OpenFcn='SimLibByLim'; blkStruct.MaskInitialization=''; blkStruct.MaskDisplay=['disp(''Sim Library Test'')']; % Define the library list for the Simulink Library Browser. % Return the name of the library model and the name for it. Browser(1).Library='SimLibByLim'; Browser(1).Name ='Sim Library Test'; blkStruct.Browser=Browser; %end of slblocks.m

Simulink Library(4) LimSimLib directory 를 matlab 경로에 첨가해 주어야 함.

Simulink Library(5)

Simulink Library(6)

Matlab & Simulink 연동 (1) Simulink model 과 Matlab GUI 기능을 link.

Matlab & Simulink 연동 (2) Matlab 의 guide.m 함수로 GUI 개발.

Matlab & Simulink 연동 (3) 소스 분석.

Simulink 의 third Party pany_name.html pany_name.html Xilinx Syste Generator, Altera DSP Builder, Synplify DSP, AccelChip etc. /loadCategory.do /loadCategory.do desk.htmlhttp:// desk.html