Lab 3

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

1

SIGNALS AND SYSTEMS


Lab 03
Lab Title: SIGNALS AND THEIR CLASIFICATIONS
Objective: In this lab, we will get an understanding of the following topics:
 Continuous Time vs. Discrete Time Signals
 Analog vs. Digital Signals
 Periodic vs. Aperiodic Signals
 Even vs. Odd Signals
 Energy vs. Power Signals
Tool Used: Matlab.

Description:

What is a signal ?
A flow of information.
 (Mathematically represented as) a function of independent variables such as time (e.g.
speech signal), position (e.g. image), etc.
 A common convention is to refer to the independent variable as time, although may in
fact not.
Example signals

 Speech: 1-Dimension signal as a function of time s(t);.


 Grey-scale image: 2-Dimension signal as a function of space i(x,y)
Types of signals

The independent variable may be either continuous or discrete


Continuous-time signals
Discrete-time signals are defined at discrete times and represented as
sequences of numbers
The signal amplitude may be either continuous or discrete
Analog signals: amplitude is continuous
Digital signals: Amplitude is discrete
Computers and other digital devices are restricted to discrete time
Signal processing systems classification follows the same lines

Signal Processing
Modifying and analyzing information
Representation, transformation and manipulation of signals and information they contain

Applications of Signal Processing


Speech processing
2

Enhancement – noise filtering


Coding
Text-to-speech (synthesis)
Recognition
Image processing
Enhancement, coding, pattern recognition (e.g. OCR)
Multimedia processing
Media transmission, digital TV, video conferencing
Communications
Biomedical engineering
Navigation, radar, GPS
Control, robotics, machine vision

Continuous Time vs. Discrete Time Signals


Continuous Time Signals:
Continuous Time Signal is the one whose domain is uncountable, we don’t care about
range. For storing the continuous time signal you need infinite memory which is not
possible in any real system. So, finite no of samples of a continuous time signals are
stored. For plotting the continuous time signals we use plot command, which simply
connects the values of intermediate samples, gives us the illusion of continuous time
signals. In MATLAB we can plot any continuous time signal for example using plot
command as follows:
%Continuous Time Signal Example
3

Discrete Time Signals:


Discrete Time Signals are those signals which are purely based upon domain, whose domain is
Countable. We don’t care about range of the signal.
In MATLAB we can plot any discrete time signal for example Asin(wn+q) using stem
command as follow
%Discrete Time Signal Example

example of discrete time signal


4

1
amplitude

-1

-2

-3

-4
0 1 2 3 4 5 6 7 8 9 10
n(sample number)
4

Analog vs. Digital Signal:


This classification of signal is purely based on range, we don’t care about the domain.
Analog Signals:
Analog Signals can take infinite values in range. In MATLAB we can plot any Analog signal
for example Asin(2πft+∅) using plot command as follows:
5

We can also plot analog signal using stem command.


%Example of Analog Signal

Example of Analog Signal


2

1.5

0.5
Amplitude

-0.5

-1

-1.5

-2
0 10 20 30 40 50 60 70 80 90 100
Sample Number
6

Digital Signal:
Digital signal is the one which can take countable finite values in range. In MATLAB we can
plot digital signal for example a random bipolar data using stem or plot Commands.
%Digital Signal Example

Example of Analog Signal


2

1.5

0.5
Amplitude

-0.5

-1

-1.5

-2
0 10 20 30 40 50 60 70 80 90 100
Sample Number
7

Square wave is another example of Digital signal.


%Digital Signal Example

Example of Digital Signal

0.5
Amplitude

-0.5

-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time 0(pi Units)
8

Periodic vs. Aperiodic Signals:


Periodic Signals:
A signal which repeats its pattern after a specific interval of time is called periodic
signal. A signal which does not repeat its pattern after a specific interval of time is called
aperiodic signal.

Where N is the fundamental time period


In MATLAB we can generate a periodic signal using following code:
%Periodic Signal Example
9

b) Aperiodic Signals:
The opposite of a periodic signal is an aperiodic signal. An aperiodic function never repeats,
although technically an aperiodic function can be considered like a periodic function
with an infinite period.
In MATLAB we can generate an aperiodic signal using following code:
%Aperiodic Signal Example
10

Even vs. Odd Signals


a) Even Signals:
If x(-n) = x(n) then signal is called even signal. Cosine function is an example of even signal.
%Even Signal Example

Example of Even Signal


1

0.5
Amplitude

-0.5

-1
-10 -8 -6 -4 -2 0 2 4 6 8 10
n (Sample Number)
11

b) Odd Signals:
If x(-n) = -x(n) then signal is called odd signal. Sine function is a n example of odd signal.
12

Energy vs. Power Signal:


a) Energy Signal:
A signal x(t) is said to be energy signal if and only if the total normalized energy is finite and
non-zero. Non-periodic signals are energy signals.
Total energy of a signal x(t) can be expressed as:

b) Power Signal:
The signal x(t) is said to be power signal, if and only if the normalized average power p is
finite and non-zero. Practical periodic signals are power signals.
Total power of a signal x(t) is given by:

Example: Following is example of Energy signal:

Using MATLAB Symbolic Maths, we can find its energy as following


syms t T
x=2;
E=limit((int(x^2,t,-1,1)),T,inf)

The energy answer will be: E = 8


For an energy signal, power will always be equal to zero
P=limit((1/(2*T))*(int(x^2,t,-1,1)),T,inf)
P=0
Example: Following is the example of Power Signal

syms t T
x = t;
P = limit((1/(2))*(int(x^2,t,-1,1)),T, inf)
P = 4/3
For a power signal, energy is always equal to .
E = limit((int(x^2,t,-T,T)),T,inf)
E = Inf
13

Exercise:

Q#1 Even and Odd Signals


Give two examples of Odd and Even signals each and plot them in MATLAB.
Example of even Signals.
14
15

Example of odd signals.


16

Q#2 Find the energy and power of the following signal

Lab performed on (date): ___________ Signature: ______________

Checked by: ________________________ Date: ______________

Marks Awarded: ____________

Comments:

You might also like