0% found this document useful (0 votes)
47 views19 pages

EL220 Signals and Systems: Introduction To Simulink

lab 13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views19 pages

EL220 Signals and Systems: Introduction To Simulink

lab 13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Introduction to Simulink |13

EL220 Signals and Systems

Experiment # 13

Introduction to Simulink

Performed on _____________

Student Name:
Roll Number: Section:

Maximum Marks Performance = 05 Viva = 05 Total = 10


Marks Obtained
Remarks (if any)

Experiment evaluated by

Instructor Name: Rameen Anwar

Signature:

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Theory

Simulink is an environment for simulation and model-based design for dynamic and embedded
systems. It provides an interactive graphical environment and a customizable set of block
libraries that let you design, simulate, implement, and test a variety of time-varying systems,
including communications, controls, signal processing, video processing, and image processing.
Simulink offers:
o A quick way of develop your model in contrast to text based-programming language
such as e.g., C.
o Simulink has integrated solvers. In text based-programming language such as e.g., C you
need to write your own solver.

1. Getting Started:

o You start Simulink from the MATLAB IDE:


o Open MATLAB and select the Simulink icon in the Toolbar:

Or type “simulink” in the Command window, like this:

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Then the following window appears (Simulink Library Browser):

The Simulink Library Browser is the library where you find all the blocks you may use in
Simulink. Simulink software includes an extensive library of functions commonly used in
modeling a system. These include:
o Continuous and discrete dynamics blocks, such as Integration, Transfer
functions, Transport Delay, etc.
o Math blocks, such as Sum, Product, Add, etc
o Sources, such as Ramp, Random Generator, Step, etc

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Block Libraries

Here are some common used Continuous Blocks

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Create a new model:

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Wiring Techniques

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Help Window

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Configuration

Useful Features

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

1. Comments \ Labels

Allign and distribute blocks

Flip Blocks

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Hide names

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Example:

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Lab Task
Q1.Build the circuit shown in figure. Open “Configuration Parameters” from
“Simulation” tab. Set “stop time” as “2/f” where “f” is the last 2 digits of your student
number. Set solver options as “Fixed-Step” and set “Fixed-Step size” as “1e-4”. Open
block parameters of sine wave by double-clicking to the icon. Set the frequency as
“2*pi*f” where again “f” is the last 2 digits of your student number. Run the simulation
and observe the output by double-clicking to “scope” attach output waveform.

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Q2. Build the circuit shown in figure. Set “Configuration Parameters” and “Block
Parameters” given in Problem 1 except Set solver options as “Fixed-Step” and set
“Fixed-Step size” as “0.002” above. Set “Phase” of “Sine Wave 2” as “-pi/2”. Run the
simulation and observe the output. Frequency of sine wave 2 should be 3*pi*f

Open Ended Task

1) For the circuit shown in figure below adjust following setting in model configuration
parameters as depicted in snap shot

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Provide sine wave source Frequency =2 Hz and amplitude 1vp-p double click gain and
set gain to 4. And add two channels on scope save and run following simulation. Attach
output graph.

Q2: For the figure shown below attach output graph take sinewave Frequency to 2Hz
Amplitude 1vp-p. Gain should be adjusted to 3 while saturation upper limit should be 0.5
and lower limit should be -0.5 as shown in figure below

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Introduction to Simulink |13

Fig Saturation block configuration

Multiplexer should be of 3 channels.

Copyright © Department of Electrical Engineering – Usman Institute of Technology

You might also like