NATIONAL UNIVERSITY OF
TECHNOLOGY
COMPUTER ENGINEERING DEPARTMENT
LAB # 12
Introduction to Simulink
Submitted By : Muhammad Junaid
Waseem(F23604037)
Tayyeba Fatima(F23604053)
Huzaifa khalid (F23604008)
Submitted To : Maam Maryam
Mehmood
Submitted On: 4/06/25
Objectives:
Introduce students to Simulink: This objective highlight that the lab aims to provide a foundational
understanding of Simulink, a graphical modelling environment within MATLAB.
Develop skills in signal generation: This objective focuses on equipping students with the ability to create
various types of signals using Simulink's tools.
Implement linear and non-linear systems: This objective emphasizes the practical aspect of building
models for both linear and non-linear systems within the Simulink environment.
Table of Contents
Objectives ................................................................................................................................................................... 2
Table of Contents ........................................................................................................................................................ 2
LAB TASK ................................................................................................................................................................. 3
Task 1 ..................................................................................................................................................................... 3
Solution ............................................................................................................................................................... 4
Task 2 ..................................................................................................................................................................... 5
Solution ............................................................................................................................................................... 5
Output ................................................................................................................................................................. 5
Conclusion .................................................................................................................................................................. 6
LAB TASK
Task 1:
We now test the linearity of the gain block. To do this, build the system of the figure given below. The following tips
should prove helpful.
● To copy a block, hold down the control key, left-click on the block and drag the copy to wherever it is needed.
● The summing block (the circle with the pluses inside) is located in the “Math Operations” library.
● Double clicking on the summing block opens up a dialog box that allows one to change the sums to differences.
That is how one produces a differencing block.
● To add a connection to a “wire,” hold down the control key, click on the spot on the wire to which you would
like to add a connection, and drag the cursor to the input of the item to which you would like to connect. Release
the cursor when a double cross-hair is shown over the block’s input.
● In order to open a scope window, double click on the scope of interest.
● If one does not see the whole signal on a scope, the problem is probably that the window is limiting the number
of samples that it saves. To remove this restriction, go to the scope window. Go to the “parameters” tab (the
second tab from the left) and click on it. A dialog box will open. Click on the “data history” tab, and unclick the
“limit data points to last” box.
Make the frequencies of the two sine waves different.
Solution :
Task 2:
Use Simulink to design a non-linear system and show that the system is non-linear by showing that the
principle of superposition does not hold.
Solution:
Output:
Conclusion
In this Lab we successfully explored the capabilities of Simulink, a graphical extension to MATLAB for modelling
and simulating systems.
Through a series of hands-on activities, we gained a foundational understanding of:
Simulink's core concepts, including block diagrams and libraries.
Generating various signals, such as sine waves.
Building models for both linear and non-linear systems.
Analyzing simulation results using scopes.
We further investigated the concept of linearity through Lab Task 1, demonstrating how Simulink can be used to
verify linear system behaviour. Lab Task 2 introduced the concept of non-linear systems and how Simulink can be
employed to model and analyse their behaviour.
Overall, this lab provided a valuable introduction to Simulink, equipping us with the skills to model and simulate
diverse systems within a user-friendly graphical environment.