0% found this document useful (0 votes)
23 views59 pages

S&S LAB MANUA-final - Merged

The document is a lab manual for the Signals & Systems course at Krishna Chaitanya Institute of Technology and Sciences, detailing safety rules, vision and mission statements, program outcomes, and specific experiments. It includes guidelines for laboratory safety, educational objectives, and a syllabus with a list of experiments related to signal generation and analysis using MATLAB. The manual aims to provide students with practical skills and knowledge in electronics and communication engineering.

Uploaded by

Satyanarayana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views59 pages

S&S LAB MANUA-final - Merged

The document is a lab manual for the Signals & Systems course at Krishna Chaitanya Institute of Technology and Sciences, detailing safety rules, vision and mission statements, program outcomes, and specific experiments. It includes guidelines for laboratory safety, educational objectives, and a syllabus with a list of experiments related to signal generation and analysis using MATLAB. The manual aims to provide students with practical skills and knowledge in electronics and communication engineering.

Uploaded by

Satyanarayana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

KRISHNA CHAITANYA INSTITUTE OF TECHNOLOGY AND SCIENCES

(An ISO 9001:2008 certified and AICTE approved institution, affiliated to JNTU-Kakinada)
Devarajugattu, Peddaraveedu (M), Markapur-523320, Prakasam (D), A.P
(Accrediated By NAAC)

A Hand book/Lab manual on


SIGNALS & SYSTEMS
(R23-REGULATION, MASTER COPY)
B.Tech II year II Semester

Prepared by
Dr.P.PRASANNA MURALI KRISHNA Ph.D
Mr. N.B.JILANI, M.Tech

Department Of Electronics and Communication Engineering


LABORATORY PRACTICE SAFETY RULES
1. Safety is of paramount importance in the Electronics and Communication Engineering
Laboratories.
2. Electricity never excuses careless persons. So, exercise enough care and attention in handling
electrical equipment and follow safety practices in the laboratory. (Electricity is a good servant but a
bad master).
3. Avoid direct contact with any voltage source and power line voltages. (Otherwise, any such
contact may subject you to electrical shock).
4. Wear rubber-soled shoes. (To insulate you from earth so that even if you accidentally contact a
live point, current will not flow through your body to earth and hence you will be protected from
Electrical shock).
5. Wear laboratory-coat and avoid loose clothing. (Loose clothing may get caught on an
Equipment/instrument and this may lead to an accident particularly if the equipment happens to be a
rotating machine.
6. Girl students should have their hair tucked under their coat or have it in a knot.
7. Do not wear any metallic rings, bangles, bracelets, wristwatches and neck chains. (When you
move your hand/body, such conducting items may create a short circuit or may touch a live point and
thereby subject you to electrical shock).
8. Be certain that your hands are dry and that you are not standing on wet floor. (Wet parts of the
body reduce the contact resistance thereby increasing the severity of the shock)
9. Ensure that the power is OFF before you start connecting up the circuit (Otherwise you will be
touching the live parts in the circuit).
10. Get your circuit diagram approved by the staff member and connect up the circuit strictly as per
the approved circuit diagram.
11. Check power chords for any sign of damage and be certain that the chords use safety plugs and
do not defeat the safety feature of these plugs by using ungrounded plugs.
12. When using connection leads, check for any insulation damage in the leads and avoid such
defective leads. .
13. Switch on the power to your circuit and equipment only after getting them checked up and
approved by the staff member.
14. Do not make any change in the connection without the approval of the staff member.
15. In case you notice any abnormal condition in your circuit ( like insulation heating up, Resistor
heating up etc. ), switch off the power to your circuit immediately and inform the staff member.
16. Keep hot soldering iron in the holder when not in use.
17. After completing the experiment show your readings to the staff member and switch off the
power to your circuit after getting approval from the staff member.
VISION & MISSION OF INSTITUTE

VISION
To emerge as a premiere institution for engineering education and research, through integrated
education for sustainable development of society and serve as resource center for the global industry.
.
MISSION
1. Imparting technical education to students in a caring and learning environment so that they
blossom as globally competent technocrats who respect and value their culture and contribute to
national development.
2. Providing cutting edge academic and research facilities so as to chisel the students to fit them into
a technically challenging future, instilling positive, productive thoughts that will enable them to
achieve success in their professional carriers and make them better employable.
3. Facilitate the use modern pedagogy and ICT for improving the teaching-learning process and to
involve students and faculty in innovative research projects linked with industry, academic and
research institutions in India and abroad.

4. To encourage multidisciplinary learning and research in cutting edge and niche areas & to provide
access to education for empowering the underprivileged and socially disadvantaged sections of
society.
VISION & MISSION OF ECE DEPARTMENT

VISION

To become a leading Centre of Excellence in higher learning and research, and to facilitate the
transformation of students into globally competent engineering professionals and to bring out quality
research in the frontier areas of Electronics & Communication Engineering.

MISSION

1. Focus on assimilation, generation and dissemination of knowledge in the field of electronics


and communication engineering.

2. Provide an academic environment that fosters leadership, research aptitude and promotes
life–long learning.

3. Practice and inculcate high standards of professional ethics, transparency and accountability.
4. Innovate and develop real time projects in the campus.
5. Increase the visibility of academic programs globally and attract talent at all levels.
PROGRAM SPECIFIC OUTCOMES (PSOs)

PSO1: Software Usage: Apply the simulation tools like VHDL, Verilog, MATLAB, MULTISIM
and Mentor Graphics to design and analyze both Analog & Digital Circuits.
PSO2: Problem Solving Skills: Apply the principles of analog, digital, Instrumentation and signal
processing concepts for Bio-Medical, Consumer Electronics, and Advanced communication
systems.
PSO3: Professional Knowledge: Apply the principles of Electronics & Communication
Engineering to provide cost effective and appropriate models.

PROGRAM EDUCATIONAL OBJECTIVES (PEOS): FOR ECE

PEO1:
Be receptive to new technologies and attain professional competence through lifelong
learning such as advanced degrees, professional registration, publications communication
skills and team work etc...
PEO2:
Analyze real life problems, design appropriate system to provide solutions that are
technically sound, economically feasible and socially acceptable.
PEO3: Communicate effectively and manage resources skillfully as members and leaders of
the profession.
PEO4:
Practice the ethics of their profession consistent with a sense of social responsibility
PROGRAMME OUTCOMES

PO1.Engineering knowledge: Apply the knowledge of mathematics, science,


engineering fundamentals, and an engineering specialization to the solution of complex
engineering problems.
PO2.Problem analysis: Identify, formulate, review research literature, and analyze
complex engineering problems reaching substantiated conclusions using first principles of
mathematics,natural sciences, and engineering sciences.
PO3.Design/development of solutions: Design solutions for complex engineering
problems and design system components or processes that meet the specified needs
with appropriate consideration for the public health and safety, and the cultural, societal,
and environmental considerations.
PO4.Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.
PO5.Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
PO6.The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
PO7.Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of,
and need for sustainable development.
PO8.Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
PO9.Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO10.Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective presentations, and give and receive
clear instructions.
PO11.Project management and finance: Demonstrate knowledge and understanding
of the engineering and management principles and apply these to one’s own work, as a
member and leader in a team, to manage projects and in multidisciplinary environments.
PO12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological change
SYLLABUS
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY:KAKINADA – 533 003,
Andhra Pradesh, India
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

List of Experiments:

I. Generation of Basic Signals (Analog and Discrete)


(a) Unit step
(b) Unit impulse
(c) Unit Ramp
(d) Sinusoidal
(e) Signum
2. Operations on signals
(a) Addition & Subtraction
(b) Multiplication & Division
(c) Maximum & minimum
3. Energy and power of signals, even and odd signals
4. Transformation of the independent variable
(a) Shifting (Delay & Advance)
(b) Reversing
(c) Scaling
5. Convolution & Deconvolution
6. Correlation
7. Fourier Series Representation
8. Fourier Transform and Analysis of Fourier Spectrum
9. Laplace Transforms
10. Z-Transforms

Equipment required for Laboratories: MATLAB R2007a


COURSE OUTCOMES

1. Understand the basics operation of MATLAB


2. Analysis of the time domain and frequency domain signals
3. Implement the concept of Fourier series and Fourier transforms.
4. Find the stability of system using pole-zero diagrams and bode diagram.
5. Design frequency response of the system

MAPPING BETWEEN PROGRAM OUTCOMES (PO’S) AND COURSE OUTCOMES


(CO’S)

High -3 Medium -2Low-1

PO1 PO2 PO3 PPO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 3 - - 3 2 - - - 1 1 - 2
CO2 3 2 1 - - - - - 2 2 - 2
CO3 2 2 2 - 2 - - - 1 1 - 1
CO4 2 1 2 2 1 - - - 1 1 - 2
CO5 1 2 3 2 1 - - - 1 1 - 2
Course
Correlation
2.2 1.4 1.6 1.6 1.2 - - - 1. 1.2 - 1.8
mapping
KRISHNA CHAITANYA INSTITUTE OF TECHNOLOGY AND SCIENCES
(An ISO 9001:2008 certified and AICTE approved institution, affiliated to JNTU-Kakinada)
Devarajugattu, peddaraveedu (M), Markapur-523320, Prakasam (D), A.P
(Accrediated By NAAC)

Department of Electronics and Communication Engineering

CERTIFICATE

This is to certify that the lab manual entitled “SIGNALS & SYSTEMS” is being prepared by

Dr.P.Prasanna Murali Krishna of Electronics and Communication Engineering department is a

record work carried out by him. The results given in this record work are produced by conducting

experiments. I appreciate the faculty member for his effort in preparation of this record.

HEAD OF THE DEPARTMENT


Dr.A.RANGANAYAKULU, Ph.D
PROFESSOR
INDEX

S NO NAME OF THE EXPERIMENT PAGE NO


1 Generation of Basic Signals (Analog and Discrete)
(a) Unit step (b) Unit impulse (c) Unit Ramp (d) Sinusoidal
(e) Signum
2 Operations on signals (a) Addition & Subtraction
(b) Multiplication & Division (c) Maximum & minimum

3 Energy and power of signals, even and odd signals

4 Transformation of the independent variable


(a) Shifting (Delay & Advance) (b) Reversing (c) Scaling

5 Convolution & Deconvolution

6 Correlation

7 Fourier Series Representation


8 Fourier Transform and Analysis of Fourier Spectrum
9
Laplace Transforms

10
Z-Transforms

ADDITIONAL EXPERIMENTS
1
EXPERIMENT NO.1
Generation of Basic Signals (Analog & Discrete)
Aim:-

To generate the following basic signals (Analog & Discrete):


1. Unit step signal
2. Unit Impulse
3. Unit Ramp
4. Sinusoidal signal
5. Signum signal

SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

THEORY:-

a) Step Function
The unit step function
is defined as
U(t) = 1 for t ≥ 0
= 0 for t > 0

U(t)=1

1. Continuous and Discrete Time Unit Step Signal:

clc;
clear all;
close all;
1
N=50;
t=1:50;
x=ones(1,N);
subplot(2,1,1);
plot(t,x,'g');
xlabel('time');
ylabel('amplitude');
title('continuous time unit step signal');
subplot(2,1,2);
stem(t,x,'r');
xlabel('time');
ylabel('amplitude');
title('Discrete time unit step signal');

OUTPUT WAVEFORMS:

(OR)

1. Continuous and Discrete time UNIT STEP SIGNAL:

clc;
clear all;
close all;

2
t= -5:0.01:5;
x=heaviside(t);
subplot(2,1,1);
plot(t,x);
axis([-5 5 -0.5 1.5]);
xlabel('time');
ylabel('amplitude');
title('conitunuous time unit step function');
n= -10:10;
Xn=(n>=0);
subplot(2,1,2);
stem(n,Xn);
axis([-10 10 -0.5 1.5]);
xlabel('Samples');
ylabel('amplitude');
title('discrete unit step signal');

OUTPUT WAVEFORMS:

b) Impulse Function
The impulse function is defined as

and
δ(t) = 0 for t ≠ 0)
That is the impulse function has zero amplitude everywhere expect at t = 0.
3
δ(t)

0
PROGRAM:-
clc;
clear all;
close all;
t= -10:0.01:10;
x = (t==0);
subplot(2,1,1);
plot(t,x,'g');
axis([-10 10 -0.5 1.5]);
xlabel('time');
ylabel('amplitude');
title('Continuous unit impulse signal');
n= -10:10;
Xn = (n==0);
subplot(2,1,2);
stem(n,Xn);
axis([-10 10 -0.5 1.5]);
xlabel('Samples');
ylabel('amplitude');
title('Discrete time unit impulse signal');
OUTPUT:

4
C) UNIT RAMP SIGNAL:

Ramp signal: The ramp function is a unitary real function, easily computable as the mean
of the independent variable and its absolute value. This function is applied in engineering.
The name ramp function is derived from the appearance of its graph

PROGRAM:
clc;
clear all;
close all;
t= -10:0.01:10;
x=(t>=0).*t;
subplot(2,1,1);
plot(t,x);
xlabel('time');
ylabel('amplitude');
title('Continuous time unit ramp signal');
subplot(2,1,2);
n= -10:10;
Xn=(n>=0).*n;
subplot(2,1,2);
stem(n,Xn);
xlabel(' Samples');
ylabel('amplitude');
title('discrete time unit ramp signal');

5
OUTPUT WAVEFORMS:

D). SINUSOIDAL SIGNAL:

The sinusoidal signals include sine and cosine signals.


Sine Signal = Asinωt = A sin(2πft)
Cosine Signal = A cos ωt = A cos(2πft)

6
PROGRAM:
clc;
clear all;
close all;
t=0:0.01:2;
f=1;
x=sin(2*pi*f*t);
subplot(2,1,1);
plot(t,x,'g');
xlabel('time');
ylabel('amplitude');
title('sinusoidal signal');
subplot(2,1,2);
stem(t,x,'r');
xlabel('time');
ylabel('amplitude');
title('sinusoidal sequence');

OUTPUT WAVEFORMS:

7
5. SIGNUM SIGNAL

Continuous time signum signal is defined as sgn(t) = { 1; t > 0


−1; t < 0
0; t = 0
It can also be written as sgn(t) = u(t) - u(-t) The phenomenon is similar in discrete time
signum signal.

PROGRAM:
clc;
clear all;
close all;
t=-10:0.01:10;
y1=[-ones(1,1000),zeros(1,1),ones(1,1000)];
subplot(3,1,1);
plot(t,y1,'r');
xlabel('time');
ylabel('amplitude');
title('Signum signal');
axis([-5 5 -2 2]);
y2=sign(t);
subplot(3,1,2);
plot(t,y2,'b');
xlabel('time');
ylabel('amplitude');
8
title('Signum signal');
axis([-5 5 -2 2]);
y3=t./abs(t);
subplot(3,1,3);
plot(t,y3,'g');
xlabel('time');
ylabel('amplitude');
title('Signum signal');
axis([-5 5 -2 2]);

OUTPUT WAVEFORMS:

RESULT:- Various signals & sequences generated using MATLAB software

VIVA QUESTIONS:-
1. Define Signal?
2. Define continuous and discrete Signals?
3. State the relation between step, ramp and Delta Functions?
4. Differentiate saw tooth and triangular signals?
5. Define Periodic and aperiodic Signal?

9
EXPERIMENT NO.2

OPERATIONS ON SIGNALS

AIM: perform the operations on signals and sequences such as addition, subtraction,
multiplication, Division, Maximum and Minimum
SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

Addition & Subtraction & Multiplication of two signals:

Theory:

Signal Addition

Addition: any two signals can be added to form a third signal,


z (t) = x (t) + y (t)
Signal Subtraction

Similar to the case of addition, subtraction deals with the subtraction of two or more signals in
order to obtain a new signal. Mathematically it can be represented as
y(t) = x1(t) - x2(t) … for continuous time signals, x1(t) and x2(t)

PROGRAM:
clc;
clear all;
close all;
t=0:0.001:2;
s1=6*sin(2*pi*5*t);
subplot(4,1,1);
plot(t,s1,'g');
xlabel('time');

10
ylabel('amplitude');
title('first signal');
s2=8*sin(2*pi*5*t);
subplot(4,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1+s2;
subplot(4,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('sum of two signals');
s4=s1-s2;
subplot(4,1,4);
plot(t,s4,'g');
xlabel('time');
ylabel('amplitude');
title('Subtraction of two signals');
Output waveforms:

11
Multiplication of two signals:

The basic signal operation performed over the dependent variable is multiplication. In this
case, two or more signals will be multiplied so as to obtain the new signal.

Mathematically, this can be given as:

y(t) = x1(t) × x2(t) … for continuous-time signals x1(t) and x2(t)

(A) PROGRAM:

clc;
clear all;
close all;
t=0:0.001:2;
s1=2*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=2*sin(2*pi*5*t);
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1.*s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Multiplication of two signals');

12
(B) Multiplication Program:

clc;
clear all;
close all;
t=0:0.01:1;
s1=2*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=exp(t);
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');

13
s3=s1.*s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Multiplication of two signals');

© Multiplication Pogram
clc;
clear all;
close all;
t=0:0.01:1;
s1=2*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=exp(-t);

14
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1.*s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Multiplication of two signals');

DIVISION OF TWO SIGNALS:

PROGRAM
clc;
clear all;
close all;
t=0:0.001:2;
15
s1=2*sin(2*pi*10*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=2*sin(2*pi*5*t);
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1./s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Division of two signals');

16
% Division of two signals sin t/t
clc;
clear all;
close all;
t=-20:0.01:20;
y=(sin(t))./t;
plot(t,y,'g');
xlabel('time');
ylabel('amplitude');
title('Division of two signals');

17
EXPERIMENT NO.3

ENERGY AND POWER OF SIGNALS, EVEN AND ODD SIGNALS

AIM: To find the Energy, Power, Even and Odd components of both continuous and
Discrete time signals
SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

Energy & Power of signal exp(-2t):


clc;
clear all;
close all;
syms t T;
y=exp(-2*t);
E=int(y,t,0,inf);
E
E1=int(y,t,0,T);
E1
P=limit(E1/2*T,T,inf);
P

OUTPUT:
E = 1/2

E1 = 1/2 - exp(-2*T)/2

P = Inf

Energy & Power of signal exp(2t):

clc;
clear all;
close all;
syms t T;
y=exp(2*t);
E=int(y,t,0,inf);
E
E1=int(y,t,0,T);

18
E1
P=limit(E1/2*T,T,inf);
P

OUTPUT:
E = Inf

E1 = exp(2*T)/2 - 1/2

P = Inf

Energy & Power of signal (1/2)n:

clc;
clear all;
close all;
syms n N;
y= (1/2)^n;
E=symsum(y,n,0,inf);
E
E1=symsum(y,n,0,N);
E1
P=limit(E1/(2*N+1),N,inf);
P

OUTPUT:

E = 2

E1 = 2 - (1/2)^N

P = 0

EVEN & ODD SIGNALS:

clc;
clear all;
close all;
t=-10:0.01:10;
u=0.5*sign(t)+0.5;
x1=exp(-1.5*t).*u;
subplot(4,1,1);
plot(t,x1);

19
title('x1(t)---->');
x2=fliplr(x1);
subplot(4,1,2);
plot(t,x2);
title('x2(t)---->');
xe=0.5*(x1+x2);
subplot(4,1,3);
plot(t,xe);
title('Even Component of x1(t)');
xo=0.5*(x1-x2);
subplot(4,1,4);
plot(t,xo);
title('Odd Component of x1(t)');

OUTPUT:

20
EVEN AND ODD COMPONENTS OF DISCRETE TIME SIGNAL

n=-5:5;
yn= 0*(n<0)+1*(n==0)+1*(n>0);
yflip=fliplr(yn);
subplot(4,1,1);
stem(n,yn,'r');
title('plot of yn');
xlabel('time');
ylabel('yn');
subplot(4,1,2);
stem(n,yflip,'r');
title('plot of yflip');
xlabel('time');
ylabel('yflip');
ye = (1/2)*(yn+yflip);
subplot(4,1,3);
stem(n,ye,'b');
title('plot of even');
xlabel('time');
ylabel('y even');
yo= (1/2)*(yn-yflip);
subplot(4,1,4);
stem(n,yo);
title('plot of odd');
xlabel('time');
ylabel('y odd');

21
OUTPUT WAVEFORMS:

22
EXPERIMENT NO.4
TRANSFORMATIONS OF INDEPENDENT VARIABLE

AIM: Perform the operations on signals and sequences such as scaling, shifting and
Reversing .
SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

Amplitude scaling for signals

Amplitude scaling rescales the amplitude of the signal. As a result signal may be amplified or
attenuated. Given a signal x=Asin(2πft) where A is the amplitude of the signal. We can rescale
the amplitude by some constant multiplier alpha or beta. Amplitude scaled output will be

PROGRAM:

clc;

clear all;

close all;

t=0:0.001:2;

s1=6*sin(2*pi*5*t);

subplot(3,1,1);

plot(t,s1,'g');

xlabel('time');

ylabel('amplitude');

title('sinusoidal signal');

s2=3*s1;

subplot(3,1,2);
23
plot(t,s2,'r');

xlabel('time');

ylabel('amplitude');

title('amplified signal');

s3=s1/3;

subplot(3,1,3);

plot(t,s3,'g');

xlabel('time');

ylabel('amplitude');

title('attenuated signal');

Output waveforms:

Time shifting of a signal :

Time Shift or delay operation shifts the signals to the desired delay. Given a signal x(t) a shifted
signal will be of the form y (t)= x(t- to) where to is the delay or shift in time domain. Let
Asin(2πft) is the signal which is desired to be shifted by an amount to.

24
PROGRAM:

clc;

clear all;

close all;

t=0:0.001:3;

s1=6*sin(2*pi*5*t);

subplot(3,1,1);

plot(t,s1,'g');

xlabel('time');

ylabel('amplitude');

title('sinusoidal signal');

t1=t+10;

subplot(3,1,2);

plot(t1,s1,'r');

xlabel('time');

ylabel('amplitude');

title('right shift of the signal');

t2=t-10;

subplot(3,1,3);

plot(t2,s1,'g');

xlabel('time');

ylabel('amplitude');

title('left shift of the signal');

25
Output Waveforms:

Time folding of a signal

Time Reversal operation flips each sample of the signal about t=0 or n=0 to obtain a
folded sequence.

PROGRAM:

clc;

clear all;

close all;

t=0:0.001:2;

s=sin(2*pi*5*t);

m=length(s);

n=[-m:m];

y=[0,zeros(1,m),s];

subplot(2,1,1);
26
plot(n,y,'g');

xlabel('time');

ylabel('amplitude');

title('original signal');

y1=[fliplr(s),0,zeros(1,m)];

subplot(2,1,2);

plot(n,y1,'r');

xlabel('time');

ylabel('amplitude');

title('folded signal');

Time scaling for signals

Operation of time scaling scales the time axis to a certain scale resulting in increasing or
decreasing the frequency of the signal which compresses or expands the signal on time
domain. General expression for the time scaled output is given below.

PROGRAM:

clc;

clear all;

close all;

t=0:0.001:2;

s1=6*sin(2*pi*5*t);

subplot(3,1,1);

plot(t,s1,'g');

xlabel('time');

ylabel('amplitude');

title('sinusoidal signal');

27
t1=3*t;

subplot(3,1,2);

plot(t1,s1,'r');

xlabel('time');

ylabel('amplitude');

title('compressed signal');

t2=t/3;

subplot(3,1,3);

plot(t2,s1,'g');

xlabel('time');

ylabel('amplitude');

title('enlarged signal');

OUTPUT:

Result: Various operations on signals and sequences are performed


28
VIVA QUESTIONS:-
1. Define Symmetric and Anti-Symmetric Signals?
2. Define scaling of a signal?
3. What are the Different types of representation of discrete time signals?
4. What are the Different types of Operation performed on signals?
5. What is System?

29
EXPERIMENT NO.5
CONVOLUTION & DE-CONVOLUTION

AIM: Write the program for convolution &De-Convolution between two signals

SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

Convolution of two signals

Convolution involves the following operations.


1. Folding
2. Multiplication
3. Addition
4. Shifting

Convolution is an integral concatenation of two signals. It is used for the determination of the
output signal of a linear time-invariant system by convolving the input signal with the impulse
response of the system. Note that convolving two signals is equivalent to multiplying the Fourier
transform of the two signals.
These operations can be represented by a Mathematical Expression as follows:
x[n]= Input signal Samples
h[ n-k]= Impulse response co-efficient.
y[ n]= Convolution output.
n = No. of Input samples
h = No. of Impulse response co-efficient.

Example : x(n)={1 2 -1 0 1}, h(n)={ 1,2,3,-1}

30
PROGRAM:

clc;

clear all;

close all;

t=0:0.001:10;

x=sin(t);

h=square(t);

subplot(3,1,1);

plot(t,x,'g');

xlabel('time');

ylabel('amplitude');

title('sinusoidal signal');

subplot(3,1,2);

plot(t,h,'r');

xlabel('time');

ylabel('amplitude');

title('square function');

y=conv(x,h);

subplot(3,1,3);

plot(y);

xlabel('time');

ylabel('amplitude');

title('convolution signal');

31
Convolution of two sequences

PROGRAM:

clc;

clear all;

close all;

L=input('enter the length of 1st sequence');

M=input('enter the length of 2nd sequence');

x=input('enter the first sequence:x(n)=');

h=input('enter the second sequence:y(n)=');

N=0:(L+M-1);

y=conv(x,h);

subplot(3,1,1);

stem(x,'g');

xlabel('discrete time');

ylabel('x(n)');

title('1st sequence');

subplot(3,1,2);

stem(h,'r');

xlabel('discrete time');

ylabel('h(n)');

title('second sequence');

subplot(3,1,3);

stem(y);

xlabel('discrete time');

ylabel('y(n)');

title('convolution of two sequences');

32
OUTPUT;

33
EXPERIMENT NO.6
CORRELATION

AIM: To Compute Auto Correlation And Cross Correlation Between Signals And Sequences
SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

Theory
Correlation:

It is a measure of the degree to which two sequences are similar. Given two real-valued
sequences x(n) and y(n) of finite energy,
Convolution involves the following operations.
1. Shifting 2. Multiplication 3. Addition

These operations can be represented by a Mathematical Expression as follows:

Cross correlation

The index l is called the shift or lag parameter


Autocorrelation:

PROGRAM:-Auto correlation for a signal

clc;

clear all;

close all;

t=0:0.001:1;

34
x=cos(2*pi*3*t);

a=xcorr(x);

subplot(2,1,1);

plot(t,x,'g');

xlabel('time');

ylabel('amplitude');

title('input signal');

subplot(2,1,2);

plot(a,'r');

xlabel('time');

ylabel('amplitude');

title('auto correlation signal');

OUTPUT:

35
PROGRAM:-cross correlation for a signal

clc;

clear all;

close all;

t=0:0.001:1;

x=cos(2*pi*3*t);

y=cos(2*pi*5*t);

a=xcorr(x,y);

subplot(3,1,1);

plot(t,x,'g');

xlabel('time');

ylabel('amplitude');

title('1st signal');

subplot(3,1,2);

plot(t,y,'r');

xlabel('time');

ylabel('amplitude');

title('2nd signal');

subplot(3,1,3);

plot(a,'r');

xlabel('time');

ylabel('amplitude');

title('cross correlation signal');

36
OUTPUT:

PROGRAM:-Auto correlation for a sequence

clc;

clear all;

close all;

x=input('enter sample values');

a=xcorr(x);

subplot(2,1,1);

stem(x,'g');

xlabel('time');

ylabel('amplitude');

title('input sequence');

subplot(2,1,2);

stem(a,'r');

xlabel('time');
37
ylabel('amplitude');

title('auto correlation sequence');

RESULT: INPUT SEQUENCE[1 2 3 4]

PROGRAM:-cross correlation for a sequence

clc;

clear all;

close all;

x=input('enter first sequence');

y=input('entersecond sequence');

a=xcorr(x,y);

subplot(3,1,1);

stem(x,'g');

xlabel('time');

ylabel('amplitude');

title('1stsequence');

subplot(3,1,2);

stem(y,'r');

xlabel('time');

ylabel('amplitude');
38
title('2nd sequence');

subplot(3,1,3);

stem(a,'r');

xlabel('time');

ylabel('amplitude');

title('cross correlation sequence');

Result: Auto correlation and Cross correlation between signals and sequences is computed.

VIVA QUESTIONS:-
1. Define Correlation? And its properties?
2. Define Auto-Correlation?
3. Define Cross-Correlation?
4. What is the importance of correlation?
5. What is the difference b/w correlation and convolution?

39
EXPERIMENT NO.7
FOURIER SERIES REPRESENTATION

AIM: Write a MATLAB program to generate Exponential Fourier series of a Square Wave
waveform and also plot the magnitude spectrum of its coefficients

SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

THEORY:-

Let’s assume we have a square wave with following characteristics:


Period=2π
Peak−to−Peak Value=2 V
Average Value=0 V
So, we can express it as:

MATLAB PROGRAM:
clc;
close all;
clear all;
syms t n;
w0=1;
T=2*pi;
n=-10:10;
cn=int(exp(-j*n*w0*t),t,0,pi)+int(-exp(-j*n*w0*t),t,pi,2*pi);

40
cn1=(1/T)*cn;
stem(n,abs(cn1));
xlabel('n----->');

ylabel('Magnitude of cn---->');

title('magnitude spectrum of Fourier series coefficients’);

OUTPUT:

41
EXPERIMENT NO.8
FOURIER TRANSFORM AND ANALYSIS OF FOURIER SPECTRUM:

AIM: To find the Fourier Transform of a given signal and plotting its magnitude and phase
spectrum.

SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

THEORY:-

The Fourier transform as follows. Suppose that ƒ is a function which is zero outside of some
interval *−L/2, L/2]. Then for any T ≥ L we may expand ƒ in a Fourier series on the interval
*−T/2,T/2], where the "amount" of the wave e2πinx/T in the Fourier series of ƒ is given by By
definition Fourier Transform of signal f(t) is defined as

Inverse Fourier Transform of signal F(w) is defined as

x(t) = ʃ X(f)exp(j2πft)df.

PROGRAM Fourier Transform:-

clc;

clear all;

close all;

syms t;

x=exp(-2*t)*heaviside(t);

y=fourier(x);

42
disp('Fourier Transform of input signal');

z=ifourier(y);

disp('Inverse Fourier Transform of input signal');

mg=abs(y);

subplot(2,1,1);

ezplot(mg);

xlabel('time');

ylabel('amplitude');

title('magnitude spectrum of a input signal');

grid;

pha=atan(imag(y)/real(y));

subplot(2,1,2);

ezplot(pha);

xlabel('time');

ylabel('amplitude');

title('phasespectrum of a input signal');

grid;

Result: Magnitude and phase spectrum of Fourier Transform of a given signal is plotted.

43
VIVA QUESTIONS:

1. Define convolution property of Fourier transform?


2. What are the properties of Continuous-Time Fourier transform?
3. What is the sufficient condition for the existence of F.T?
4. Define the F.T of a signal?
5. What is the difference b/w F.T&F.S?

44
EXPERIMENT NO.8
LAPLACE TRANSFORM

AIM: Write a MATLAB program to find Laplace Transform and Inverse Laplace Transform
of the following signals

i) x1(t) = e-atu(t) ii) x2(t) =t*e-atu(t) iii) x3(t) = cos(w*t)

iv) x4(t) = e-at * cos(w*t)

SOFTWARE USED:- MATLAB R2009A

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

THEORY:-

Laplace transform is the integral transform of the given derivative function with real variable t to
convert into a complex function with variable s. For t ≥ 0, let f(t) be given and assume the function
satisfies certain conditions to be stated later on.
The Laplace transform of f(t), that is denoted by L{f(t)} or F(s) is defined by the Laplace
transform formula:

MATLAB PROGRAM:

clc;
clear all;
close all;
syms a t w;
x1=exp(-a*t);
disp('Laplace Transform of x1(t) signal');
y1=laplace(x1)
45
disp('Inverse Laplace Transform of input signal');
z1=ilaplace(y1)

x2=t*exp(-a*t);
disp('Laplace Transform of x2(t) signal');
y2=laplace(x2)
disp('Inverse Laplace Transform of input signal');
z2=ilaplace(y2)

x3=cos(w*t);
disp('Laplace Transform of x3(t) signal');
y3=laplace(x3)
disp('Inverse Laplace Transform of input signal');
z3=ilaplace(y3)

x4=exp(-a*t)*cos(w*t);
disp('Laplace Transform of x4(t) signal');
y4=laplace(x4)

46
PROGRAM:- Locating Poles Of Zero On S-Plane

clc;

clear all;

close all;

num=input('enter numerator co-efficients');

den=input('enter denominator co-efficients');

h=tf(num,den);

poles=roots(den);

zeros=roots(num);

sgrid;

pzmap(h);

grid on;

title('locating poles of zeros on s-plane');

47
Z-TRANSFORM

clc;
close all;
clear all;
syms a b w0 n;
disp('the sequence x1(n) is');
x1=sin(w0*n);
z1=ztrans(x1);
disp('the Z-Transform of x1(n) is');
pretty(z1)
x2=cos(w0*n);
z2=ztrans(x2);
disp('the Z-Transform of x2(n) is');
pretty(z2)
x3=a^n;
z3=ztrans(x3);
disp('the Z-Transform of x3(n) is');
pretty(z3)

RESULT:

48
49

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy