The Islamia University of Bahawalpur University College of Engineering and Technology Department of Electronic Engineering Control Systems Lab Manual
The Islamia University of Bahawalpur University College of Engineering and Technology Department of Electronic Engineering Control Systems Lab Manual
LAB SESSION: 03
Lab Instructor Signatures: Date:
INTRODUCTION:
Simulink is an environment for multi -domain 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.
OBJECTIVE:
The objective of this lab is applying values to state space in Simulink and finding out the required
responses i.e. step and ramp response it is implemented as follows.
KEY FEATURES:
Extensive and expandable libraries of predefined blocks.
Interactive graphical editor for assembling and managing intuitive block diagrams.
Application programming int erfaces (APIs) that let you connect with other simulation
programs and incorporate hand-written code.
Simulation modes (Normal, Accelerator, and Rapid Accelerator) for running simulations
interpretively or at compiled C-code speeds using fixed- or variable-step solvers.
Graphical debugger and profiler to examine simulation results and then diagnose
performance and unexpected behavior in your design.
Model analysis and diagnostics tools to ensure model consistency and identify modeling
error.
SNAPSHOTS:
These are some of snapshots to make it easier to see how we work and from where we select our
require sources for modeling in Simulink.
42
EXAMPLES:
Here are some of the examples of plotting different waves and responses witnessed during working
on Simulink along with their output graphs.
Example 1:
We plot a simple modeling in Simulink along its output;
Output Graph:
43
Example 2:
Output Graph:
Example: 01
0 1 0 1
A 1 2 1 B 1 C 0 1 1 D [0]
0 2 2 1
44
OUTPUT:
Example: 02
0 1 0 1
A 1 2 1 B 1 C 0 1 1 D [0]
0 2 2 1
OUTPUT:
45
TASKS:
Question 1 Find the Response of the following model?
Question 2. Implement the following equation in Simulink. And draw the result on scope
Question 3. Find the Response of the Following state space by using MATLAB?
0 1 0 1
A 1 5 1 B 5 C 0 2 1 D [0]
0 1 5 1
Question 4. Find the Response of the Following state space by using MATLAB?
1 1 0 1
A 1 4 2 B 3 C 0 5 1 D [0]
0 2 5 7
46
Solutions to the Questions
Output:-
Question 1 Find the Response of the following model?
Solution:-
Question 2. Implement the following equation in Simulink. And draw the result on scope
Output:-
Question 3. Find the Response of the Following state space by using MATLAB?
Solution:-
Output:-
Question 4. Find the Response of the Following state space by using MATLAB?
Solution:-
Output:-
Question 5. How can we increase the simulation time in Simulink?
As the mark shown below through which we can change the simulation time.