0% found this document useful (0 votes)
671 views6 pages

Experiment - 1: Generation of Sinusoidal Waveform / Signal Based On Recursive Difference Equations Aim: Apparatus

The document describes generating sinusoidal waveforms using recursive difference equations in MATLAB. It provides theory on recursive and non-recursive filters. Code is presented to generate sinusoidal and random signals using recursion with plotting of the output waveforms. Applications to signal processing, control systems, and image processing are discussed.

Uploaded by

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

Experiment - 1: Generation of Sinusoidal Waveform / Signal Based On Recursive Difference Equations Aim: Apparatus

The document describes generating sinusoidal waveforms using recursive difference equations in MATLAB. It provides theory on recursive and non-recursive filters. Code is presented to generate sinusoidal and random signals using recursion with plotting of the output waveforms. Applications to signal processing, control systems, and image processing are discussed.

Uploaded by

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

NAME;

DATE:
ROLL NO : 21EG104A46 PAGE NO:

EXPERIMENT – 1
GENERATION OF SINUSOIDAL WAVEFORM / SIGNAL BASED
ON RECURSIVE DIFFERENCE EQUATIONS

Aim: To Generate Sinusoidal wave form / signal based on recursive difference equations.
Apparatus: software: matlab2023a
Hardware:personal computer

Theory:

A recursive filter has feedback from output to input,and in general its output is a function of the previous
outputvsamples and the present and past input samples as described by the following equation.

Where {ak,bk} are the filter coefficients and the output y(m) is a linera combination of the previous N
output samples[y(m-1)…..y(m-N)},the present input sample x(m) and the previous M input samples
[x(m-1)…x(m-N)].Thus a recursive filter is known as an infinite Impulse Response(IIR) filter.

A non Recursive filter has no feedback and its input output relation is given by

The output y(m) pf a non recursive filter is a function only of the input signal x(m). The response of such a
filter to an impulse consists of a finite sequence of M+1 samples,where M is the filter order.Hence,the filter
is known as a Finite Impulse Response(FIR) filter.
A first order filter recursive difference equation is given by

Y(m)=ay(m-1)+x(m)
.
ANURAG UNIVERSITY DIGITAL SIGNAL PROCESSING LAB ECE DEPARTMENT
NAME: T,LAKSHMI PRASANNA DATE:
ROLL NO : 21EG104A46 PAGE NO:

ANURAG UNIVERSITY DIGITAL SIGNAL PROCESSING LAB ECE DEPARTMENT


NAME: T,LAKSHMI PRASANNA DATE:
ROLL NO : 21EG104A46 PAGE NO:

Source code:
clc;
clear all;
close all;
%Generation of sinusoidal signal using recursive function
t=0:0.01:5 %Defining time interval
x=sin((2*pi+4)*t) %generation of sine signal
y=2*cos((2*pi+4)*t) %generation of cos signal
y(1)=x(1)
for n=4:20 %recursion using for loop
y(n)=1*x(n)+0.3*x(n-2)+0.6*y(n-3) %recursive function
end %end of loop
subplot(2,1,1)
plot(y) %plotting the sine signal
xlabel('time') %labelling on x-axis
ylabel('amplitude') %labelling on y-axis
title("Generation of sinusoidal signal using recursive function") %labelling the title

%Generation of Random signal using recursive function


n=1:20
x=rand(1,20) %generation of random signal x
y=rand(1,20) %generation of random signal y
y(1)=x(1)
for n=10:20 %recursion using for loop
y(n)=0.5*x(n)+0.1*x(n-1)+0.2*y(n-1) %recursive function
end
subplot(2,1,2)
plot(y) %plotting the sine signal
xlabel('time') %labelling on x-axis
ylabel('amplitude') %labelling on y-axis
title("Generation of random signal using recursive function") %labelling the title
gtext('21EG104A46')

ANURAG UNIVERSITY DIGITAL SIGNAL PROCESSING LAB ECE DEPARTMENT


NAME: T,LAKSHMI PRASANNA DATE:
ROLL NO : 21EG104A46 PAGE NO:

Output waveforms:

ANURAG UNIVERSITY DIGITAL SIGNAL PROCESSING LAB ECE DEPARTMENT


NAME: T,LAKSHMI PRASANNA DATE:
ROLL NO : 21EG104A46 PAGE NO:

Procedure:
1. Open MATLAB application.
2. Create an editor file in “.m” format.
3.Type the program in the editor window.
4.And save the file in any of the drive using “.m” format.
5.Run the program.
6. Check if there are any errors in the command
window. 7.The result will be shown in the command
window

Applications:
1. Signal processing:
Filter Design: Recursive equations are often used in designing digital filters, such as Infinite
Impulse Response (IIR) filters
2. Control systems.
Transfer Functions: Recursive equations are used to represent and analyze systems in control
theory, particularly in the context of transfer functions for systems with feedback.
3. Image processing
Recursive Filters: Recursive equations are employed in image processing for tasks such as image
smoothing, edge detection, and noise reduction using recursive filters.

Result:
Generation of sinusoidal waveform / signal based on recursive difference equations is
performed and the output graphs are verified using Matlab 2023a.

ANURAG UNIVERSITY DIGITAL SIGNAL PROCESSING LAB ECE DEPARTMENT

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