SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 12”
SUNY-New Paltz Dynamic Simulation Objectives Understand the basics of Dynamic Simulation Learn Basics of Simulink
SUNY-New Paltz What Is Simulink? Simulink is a software package for modeling, simulating, and analyzing dynamical systems.
SUNY-New Paltz Simulink For modeling, Simulink provides a graphical user interface (GUI) for building models as block diagrams, using click-and-drag mouse operations.
SUNY-New Paltz Simulink Models are hierarchical, so you can build models using both top-down and bottom-up approaches.
SUNY-New Paltz Simulation Exercise Create 2 signals: –a sine and a cosine –compare the signals together Use MATLAB: Develop code store data Plot the 2 signals Use SIMULINK: Place SIMULINK blocks Run Dynamic Simulation View waveforms on the scope
SUNY-New Paltz Building a Simple Model
SUNY-New Paltz Simulink Library Browser
SUNY-New Paltz Create a Model
SUNY-New Paltz Select a Source
SUNY-New Paltz Sinusoidal Source
SUNY-New Paltz Other Blocks
SUNY-New Paltz Connect the Blocks
SUNY-New Paltz Connect the Blocks
SUNY-New Paltz Simulation Parameters
SUNY-New Paltz Run the Model
SUNY-New Paltz Block Parameters Key properties of many standard blocks are parameterized. What are the parameters of the Sine Wave Block? Change them and see the effects! What are the parameters of the Scope Block? Change them and see the effects!
SUNY-New Paltz Exercise 1 Design a Simulink model that generates the first 5 harmonics of a sine wave with period 4 seconds. Show all the signals on the same scope Design a Simulink model that generates the first 5 harmonics of a cosine wave with period 4 seconds. Show all the signals on the same scope
SUNY-New Paltz Exercise 1 - continued Simplify the model such that it only consists of a single source block!
SUNY-New Paltz Exercise 2 Generate three wave forms (sine, rectangular and saw tooth), each having a period of 3 seconds. Display the signal on the same scope but on three different screens!
SUNY-New Paltz Exercise 3 Simulate a simple rectifier!