EXPERIMENT2
EXPERIMENT2
AIM:
To perform Linear convolution of discrete time signals.
SOFTWARE REQUIRED:
Matlab software
THEORY:
To calculate discrete linear convolution for two sequences namely,
x[n] = [a, b, c]
h[n] = [e, f, g]
The convolved output will be
x[n] * h[n] = [ea, fa+eb, ga+fb+ec, gb+fc, gc]
PROCEDURE:
Type the above code in Matlab, simulate the same and get the output.
SIMULATION RESULTS:
OBSERVATION:
The length of the output sequence in linear convolution is equal to the
sum of the lengths of the input sequences minus one. For example, if the
first input sequence has N samples and the second input sequence has
M samples, then the output sequence will have N + M - 1 samples.
CALCULATION:
In linear convolution, each sample in the output sequence is obtained by
summing the products of corresponding samples from the input
sequences.
CONCLUDING REMARKS:
The linear convolution of two discrete time signals have been calculated
and the same has been plotted
EXPERIMENT-2B
Correlation of discrete time signals
AIM:
SOFTWARE REQUIRED:
Matlab software
THEORY:
The correlation of discrete-time signals is a measure of similarity or
relationship between two signals. It is often used in signal processing
and communication systems to analyse and compare signals.
r
The cross-correlation of x[n] and y[n], denoted as xy[n], is given by the
following expression:
∞
rxy[n] = ∑ (x[k] * y[k - n])
k = -∞
SIMULATION RESULTS:
OBSERVATION:
In the case of cross-correlation, the correlation function is
generally asymmetric. If x[n] is cross-correlated with y[n], the
correlation function will not be the same as when y[n] is cross-
correlated with x[n]. The position of the peak will be different,
indicating the direction of the relationship between the signals.
CALCULATION:
Step-by-step process to calculate the cross-correlation:
Choose a specific value of n, the time lag.
For that value of n, perform the following steps:
Initialize a variable, let's call it sum, to 0.
Iterate over all possible values of k.
Inside the iteration:
Multiply x[k] with y[k - n].
Add the result to the sum.
r
After the iteration, assign the value of sum to xy[n].
CONCLUDING REMARKS:
The cross-correlation of two discrete time signals have been calculated
and the same has been plotted.