You are on page 1of 21

SIGNALS AND SYSTEMS

DE-40 EE || Semester 4
Spring 2020

Lab Report # 06
Submitted by Reg No

Muhammad Minhaj Khokhar 265439


Muhammad Yousaf Khan 246668
Syed Hussain Kamil 280866

Electrical Engineering
Syndicate ‘B’

Lab Instructor: Sitwat Mahd

DEPARTMENT OF Electrical ENGINEERING

College of Electrical and Mechanical Engineering (CEME)


National University of Sciences and Technology (NUST)
Introduction:

A Simulink® function is a computational unit that calculates a set of


outputs when provided with a set of inputs. Since a Simulink function
provides a common text it is a MATLAB-based graphical programming
environment for modeling, simulating and analyzing multidomain
dynamical systems. Its primary interface is a graphical block diagramming
tool and a customizable set of block libraries. It offers tight integration
with the rest of the MATLAB environment and can either drive MATLAB
or be scripted from it. Simulink is widely used in automatic control and
digital signal processing for multidomain simulation and model-based
design.
Tasks:
The students have to create each of the following block diagrams in Simulink, and learn
the purpose and usage of each of the blocks used.

Task 1:

MATLAB Workings:
Scope 1:

Scope 2:
Scope 3:

Scope 4:
Scope 5:

Scope 6:
Scope 7:

Scope 8:
Scope 9:

Scope 10:
Scope 11:

Functions:
-The Min-Max Running Resettable block outputs the minimum or maximum
of all past inputs u. You specify whether the block outputs the running
minimum or maximum with the Function parameter. The block can reset its
state based on an external reset signal R.

-The Min-Max block outputs either the minimum or the maximum element
or elements of the inputs.

-The Concatenate block concatenates the input signals to create an output


signal whose elements reside in contiguous locations in memory.

-Polynomial (Simulink Reference) The Polynomial block uses a coefficients


parameter to evaluate a real polynomial for the input value. You define a set
of polynomial coefficients in the form accepted by MATLAB's polynomial
command. The block then calculates P(u) at each time step for the input u.

-The Dot Block, it takes the dot product of the input waves and gives the
result.

-The Add Block, it adds the input waves.

-The Gain Block, it increases the amplitude the input wave.

-The Sqrt Block, it takes the square root of the input wave.

-The Bias Block, it gives us shift of the input wave. Such that if we have
maximum amplitude on x-axis was on 0 then u+2 gives us a shift of 2.

-The Abs Block, gives the absolute value of the input. Meaning it makes the
negative parts positive such that the whole output wave has positive values.
Task 2:

MATLAB Workings:
Scope 1:
Scope 2:

Scope 3:

Scope 4:
Scope 5:

Scope 6:
Scope 7:

Scope 8:
Functions:
-The Rounding Function block rounds each element of the input signal to
produce the output signal. You select the type of rounding from the Function
parameter list. The name of the selected function appears on the block.

-The Unary Minus block negates the input.

-The vector Concatenate block concatenates the input signals to create an


output signal whose elements reside in contiguous locations in memory. It
also copies the elements in contiguous locations.

-The Product and Product of Elements Block, it takes the products of the
input waves.

-The Subtract Block, it subtracts the first input from the second one.

-The Reciprocal Sqrt Blocks, it gives the reciprocal of square root of the
input wave.

- Sign (Simulink Reference) The Sign block indicates the sign of the input:
The output is 1 when the input is greater than zero. The output is 0 when the
input is equal to zero.

Task 3:
MATLAB Workings:

Scope 1:
Scope 2:

Scope 3:
Scope 4:

Functions:
-The Trigonometric Function block performs numerous common
trigonometric functions.

-We can select one of these functions from the Function list: sin, cos, tan,
asin, acos, atan, atan^2, sinh, cosh, and tanh. The block output is the result of
the operation of the function on the input.

-The Divide Block, it dives the inputs.

-The Math Function Block, it means we can perform any mathematical


function using it.

-The Mux Block, all the inputs are shown in the same output graph.

You might also like