Presentation is loading. Please wait.

Presentation is loading. Please wait.

Regensburg, 24. – 28.7. 2006 Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory.

Similar presentations


Presentation on theme: "Regensburg, 24. – 28.7. 2006 Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory."— Presentation transcript:

1 Regensburg, 24. – 28.7. 2006 Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory of Electrical Engineering Part One

2 Regensburg, 24. – 28.7. 2006 Contents: 1.What is Simulink? 2.Getting Started 3.Dynamic System Definition 4.Preparing Problem for Simulation 5.Creation of Simuling Model – Standard Block Descripton 6.Analyzing Results

3 Regensburg, 24. – 28.7. 2006 -intended to modeling, simulating, and analyzing of dynamical systems under GUI -linear and nonlinear analyses -hierarchical model 1. What is Simulink? 1. What is Simulink? Simulink (SIMUlation and LINK) is an extension of MATLAB by Mathworks Inc

4 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started Simple model – Sine wave and its integral 1.Start Simulink a)From Command Window: type simulink b)From Main toolbar

5 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started 2. Simulink Library Browser 3. Create new model (by new file icon)

6 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started 4. Workspace for your model 5. Explore Library browser for become familiarized

7 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started 6. Drag from Sources group block with name Sine Wave to workspace 7. Save your work to harddisk

8 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started 8. Continue to build model by adding blocks to your model window. From Sinks library: Scope From Continuous library: Integrator From Signal Routing library: Mux

9 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started 8. Continue to build model by adding blocks to your model window. From Sinks library: Scope From Continuous library: Integrator From Signal Routing library: Mux

10 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started 9. Establish connection between the blocks To make a connection: left-click while holding down the control key (on your keyboard) and drag from source port to a destination port.

11 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started 10. Run the simulation Double click on the Scope block to display of the scope.

12 Regensburg, 24. – 28.7. 2006 2. Getting Started 2. Getting Started NOTE: From math: Primitive function to sine function is –cosine function Real integrator: Definite integral of input variable (area under sine wave function between 0 and t)

13 Regensburg, 24. – 28.7. 2006 3. Dynamic System Definition 3. Dynamic System Definition A dynamic system is in fact a way how to describe real objects and phenomena. It is possible to say, that the dynamic system is a set of variables and relations. Dynamic system can describe relations between variables and causality between variables as well. Variables describing an object or a phenomenon can be divided into to sets – parameters and state of system. State of system is such a set of variables the knowledge of which and the input function, with the equation describing the dynamics, will provide the future state and output of the system.

14 Regensburg, 24. – 28.7. 2006 3. Dynamic System Definition 3. Dynamic System Definition The state of a system is described by a set of first-order differential equations in terms of the state variables. This set of differential equations can be written in matrix form as follows: In general the output of dynamic system can be related to the state variables and the input signal by the output equation

15 Regensburg, 24. – 28.7. 2006 3. Dynamic System Definition 3. Dynamic System Definition The state of a system is described by a set of first-order differential equations in terms of the state variables. This set of differential equations can be written in matrix form as follows: In general the output of dynamic system can be related to the state variables and the input signal by the output equation

16 Regensburg, 24. – 28.7. 2006 3. Dynamic System Definition 3. Dynamic System Definition xinner state vector uinput vector xoutput vector Amatrix of dynamics of the system Binput matrix Coutput matrix Dmatrix of direct acting of input to output

17 Regensburg, 24. – 28.7. 2006 4. 4. Preparing Problem for Simulation Given circuit can be described by this equation: Simulate electrical circuit With initial condition: TASK: Find time evolution of current i L

18 Regensburg, 24. – 28.7. 2006 4. 4. Preparing Problem for Simulation After some rearrangement we will get: It is possible to rewrite previous equation in the "matrix" form where Initial condition (integrator):

19 Regensburg, 24. – 28.7. 2006 5. 5. Creation of Simuling Model Block diagram of simple dynamic system Simulink model of simple dynamic system

20 Regensburg, 24. – 28.7. 2006 5. 5. Creation of Simuling Model Setting up Initial condition (double click on Integrator block)

21 Regensburg, 24. – 28.7. 2006 5. 5. Creation of Simuling Model Setting up simulation preferences (menu item Simulation > Configuration Parameters …)

22 Regensburg, 24. – 28.7. 2006 6. 6. Analyzing Results Time evolution of current i L (double click on Scope block)

23 Regensburg, 24. – 28.7. 2006 Thank you for your kind attention


Download ppt "Regensburg, 24. – 28.7. 2006 Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory."

Similar presentations


Ads by Google