Professional Documents
Culture Documents
ADC Labs
ADC Labs
ADC Labs
Submitted By:
Afnan Javaid
Submitted To:
Ma’am Maira Waseem
Registration No:
2020-UET-NFC-FD-Elect-11
Section:
A
Session:
(2020-2024)
Experiment No. 1
Introduction to MATLAB & SIMULINK
Objective:
1.) To familiarize the Student with MATLAB.
Theory:
MATLAB:
MATLAB stands for Matrix Laboratory. It includes High Level commands
of 2 and 3-dimensional matrix for data visualization.
MATLAB is a programming platform designed specifically for engineers and
scientists to analyze and design systems and products that transform our world. The
heart of MATLAB is the MATLAB language, a matrix-based language allowing the
most natural expression of computational mathematics.
Uses:
Millions of engineers and scientists worldwide use MATLAB
Signal processing and communications
Image and video processing
Test and measurement
Computational finance and computational biology.
1. Main Window:
The MATLAB Command Window is the main window where you type
commands directly to the MATLAB interpreter. From main window we can
navigate through different options of the software in order to interact with
the commands.
2. Command Window:
In this window we can write our program line by line but we cannot undo
the previously run codes.
3. Command History:
This window contains the history of lines of the code that was previously
entered.
Matrix Operations:
1. Creating a Matrix:
Let's create a simple vector with 6 elements called a.
a = [9 2 4 3 4 5]
a = 1×6
2. Addition of number to a Matrix:
Now let's add 2 to each element of our vector, a, and store the
result in a new vector.
Notice how MATLAB requires no special handling of vector or
matrix math.
b=a+2
b = 1×6
4. Transpose of a Matrix:
We can easily find the transpose of the matrix a.
A = [1 2 0; 2 5 -1; 4 10 -1]
A = 3×3
B = A'
5. Multiplication of Two Matrices
MATLAB doesn't require you to deal with matrices as a collection of
numbers. MATLAB knows when you are dealing with matrices and
adjusts your calculations accordingly.
C = A * B
Commands Introduction:
clc:
The clc command will clear the command window from previously
executed code.
clear all:
This command will clear the variable matrices data from the workspace
window.
linspace:
This command will let us use the range between two numbers that is
divided into 100 equally spaced points.
global:
This command will declares variables to be global.
help:
This command will searches for a help topic.
Experiment No. 2
Fourier Series using MATLAB
Objective:
To create MATLAB Program for Trigonometric Series.
Theory:
Fourier Series:
A Fourier series is a method used to represent a periodic function as an
infinite sum of sine and cosine functions. Fourier series is used for periodic
functions. For the non-periodic functions, Fourier transform is considered.
The computation and study of Fourier series is known as harmonic analysis
and is extremely useful as a way to break up an arbitrary periodic function into a set of
simple terms that can be plugged in, solved individually, and then recombined to
obtain the solution to the original problem or an approximation to it to whatever
accuracy is desired or practical.
The motivation for introducing Fourier series seems to be to solve ordinary
differential equations for forced oscillations and to approximate periodic functions.
Later, applications to partial differential equations are presented, much in line with the
motivation behind Fourier's original work.
Task 1
Implementing Basic values as Variables:
Result:
Task 2
Calculate Co-efficient of our function:
Result:
Task 3
For Multiple Co-efficients using Loop:
Result:
Task 4
COEFFICIENTS USING FUNCTION:
Result:
Experiment No. 3
Discrete Fourier Transform & Discrete Time
Fourier Transform
Objective:
To develop a program that can elaborate the relationship between
Discrete Fourier Transform & Discrete Time Fourier Transform using
MATLAB.
Theory:
Discrete Fourier Transform:
The DFT is one of the most powerful tools in digital signal processing
which enables us to find the spectrum of a finite-duration signal.
In mathematics, the discrete Fourier transform (DFT) converts a finite
sequence of equally-spaced samples of a function into a same-length sequence of
equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a
complex-valued function of frequency.
Mathematically:
Discrete Time Fourier Transform:
The discrete time Fourier transform (DTFT) is the member of the Fourier
transform family that operates on aperiodic, discrete signals.
A discrete-time signal can be represented in the frequency domain using discrete-
time Fourier transform. Therefore, the Fourier transform of a discrete time sequence
is called the discrete-time Fourier transform (DTFT).
Mathematically, if x(n)x(n) is a discrete-time sequence, then its discrete-time Fourier
transform is defined as
F[x(n)]=X(ω)=∑n=−∞∞x(n)e−jωnF[x(n)]=
X(ω)=∑n=−∞∞x(n)e−jωn
DFT DTFT
Non-Periodically, Non-Continuous
Periodicity, Continuous
Accuracy is less.
Accuracy is more.
Experiment No. 4
Amplitude Modulation
Objective:
To perform ampliture modulation using DSB/SSB AM transmitter
(ST 2201)
To perfrom ampliture modulation using MATLAB
To perform amplitude modulation using SIMULINK
Apparatus:
Hardware based: DSB/SSB AM transmitter trainer
Software based: MATLAB
Introduction:
Where,
Result:
AM modulation in SimuLink:
Result:
Modulated signal
Experiment No. 5
Amplitude Demodulation
Objective:
To perform ampliture demodulation using Advance fiber optic
communication trainer (IT 4410)
Introduction:
Result: