0% found this document useful (0 votes)
23 views

Ash Convolution 1

T

Uploaded by

asraf1975atm
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)
23 views

Ash Convolution 1

T

Uploaded by

asraf1975atm
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/ 7

Signals and systems

Exp. No. :
Date: / /202
Convolution

AIM :
To demonstrate convolution in both continuous and discrete-time systems
and observe its effects on signals through Simulation.

APPARATUS REQUIRED:
MAT LAB Version
THEORY:

Convolution:

Convolution is a mathematical operation that combines two functions to produce a


third function. It expresses how the shape of one function is modified by another. In
the context of signals and systems, convolution is used to determine the output of a
linear time-invariant (LTI) system when given an input signal and the system's
impulse response.

Continuous-time convolution:

●Definition:
Convolution is a mathematical operation that combines two signals to produce
a third signal. In continuous-time systems, it's represented by the integral:

Explanation

x(t): The input signal.


h(t): The impulse response of the system.
y(t): The output signal resulting from the convolution.
τ : A dummy variable of integration.

1
Signals and systems

Interpretation:

Convolution can be thought of as "sliding" the impulse response h(t)


across the input signal x(t) and integrating the product at each time instant.
The result is the output signal y(t).

Convolution in Discrete-Time Systems:

●Definition:

Similar to continuous-time, convolution in discrete-time systems is


represented by the sum:

Explanation

x[n]: The input signal.


h[n]: The impulse response of the system.
y[n]: The output signal resulting from the convolution.
k: A dummy variable of summation.

Interpretation:

Convolution in discrete-time can be visualized as "flipping" the impulse


response h[n] and sliding it across the input sequence x[n], summing the
products at each time index.

Applications of Convolution:

● Signal processing: Filtering, modulation, demodulation, and correlation.


● Image processing: Edge detection, image blurring, and sharpening.
● Control systems: System analysis and design.
● Communication systems: Channel equalization and matched filtering.

2
Signals and systems

SOURCE CODE:

Convolution for continuous signal

% convolution of tu(t) and u(t)

% Define variables
syms t tau

% Define the signals


x = tau * heaviside(tau); % Signal x(tau) = tau
* u(tau) h = heaviside(t - tau); % Signal h(t
- tau) = u(t - tau)

% Convolution integral
y = int(x * h, tau, -inf, inf); % Convolution integral over –infinity to +infinity

% Simplify the result


y_simplified = simplify(y); % refer this function in matlab help

% Display the convolution result


disp('The convolution result y(t) = tu(t) * u(t)
is:'); disp(y_simplified);

Matlab Output :

The convolution result y(t) = tu(t) * u(t) is:

(t^2*heaviside(t))/2

SOURCE CODE:

Convolution for Discrete signal

clc; % Clear command window


clear; % Clear all variables from the
workspace close; % Close all figure windows

% Program for the signal convolution

x = [2, 3, 4, 5]; % Define the first signal (x[n])


h = [3, 4, 5, 6]; % Define the second signal (h[n])
t = [0:3]; % Define the time index for the signals (0 to 3)

% Plot the first signal x[n]


subplot(2,2,1); % Create a subplot in a 2x2 grid, first

3
Signals and systems

position stem(t, x); % Plot x[n] as a stem plot

4
Signals and systems

% Plot the second signal h[n]


subplot(2,2,2); % Create a subplot in a 2x2 grid, second
position stem(t, h); % Plot h[n] as a stem plot

% Calculate the length of x and


h x1 = length(x); % Length of
signal x
h1 = length(h); % Length of signal h

% Determine the length of the convolution output


z = x1 + h1 - 1; % The length of the convolution result y[n]

% Initialize the result of the convolution to zeros


y = zeros(1, z); % Create an array of zeros of length z for the convolution result

% Perform the convolution manually using nested


loops for i = 1:x1 % Loop through each element of
x[n]
for j = 1:h1 % Loop through each element of h[n]
y(i + j - 1) = y(i + j - 1) + x(i) * h(j); % Multiply and accumulate
the result end;
end;

% Plot the convolution result y[n]


subplot(2,2,3); % Create a subplot in a 2x2 grid, third
position stem(y); % Plot the convolution result as a stem
plot

Matlab Output :

5
Signals and systems

GRAPHS:

RESULT:

The experiment successfully demonstrated the concept of convolution in both


continuous and discrete-time systems, and the results aligned with the expected behavior
of convolution.

6
Signals and systems

You might also like