You are on page 1of 5

Elektrotehnički fakultet u Banjoj Luci

Katedra za komunikacije

Osnovi komunikacija i teorija informacija

Laboratorijska vježba br: 6 – Konvolucija i korelacija

Priprema za vježbu:

Konvolucija = primjena određivanje odziva u vremenu kod sistema ako je poznat impulsni odziv sistema

Korelacija = primjena za određivanje sličnosti dva signala

Veza između konvolucije i korelacije?

Šta je impulsni odziv sistema?

Kako se određuje odziv sistema na proizvoljnu pobudu?

Koja je veza između Laplasove i Furijeove transformacije?

Kako se određuje prenosna funkcija sistema u domenu učestanosti i šta ona predstavlja  ?

Uvod – primjeri konvolucije I korelacije u Matlabu:

(Za bolje razumjevanje konvolucije i korelacije otiđite na link:

https://www.mathworks.com/help/matlab/ref/conv.html )

Convolution

The convolution of two vectors, u and v, represents the area of overlap under the points as v
slides across u. Algebraically, convolution is the same operation as multiplying polynomials
whose coefficients are the elements of u and v.
Let m = length(u) and n = length(v) . Then w is the vector of length m+n-1 whose kth
element is


w(k)= suma u(j)v(k−j+1). (ovo je diskretna konvolucija, pa je suma odmjeraka a ne integral)
j

The sum is over all the values of j that lead to legal subscripts for u(j) and v(k-j+1),
specifically j = max(1,k+1-n):1:min(k,m). When m = n, this gives

w(1) = u(1)*v(1)
w(2) = u(1)*v(2)+u(2)*v(1)
w(3) = u(1)*v(3)+u(2)*v(2)+u(3)*v(1)
...
w(n) = u(1)*v(n)+u(2)*v(n-1)+ ... +u(n)*v(1)
...
w(2*n-1) = u(n)*v(n)

This example shows how to use the cross-correlation sequence to detect the time delay in a
noise-corrupted sequence. The output sequence is a delayed version of the input sequence with
additive white Gaussian noise. Create two sequences. One sequence is a delayed version of the
other. The delay is 3 samples. Add white noise to the delayed signal. Use the sample
cross-correlation sequence to detect the lag.

Create and plot the signals. Set the random number generator to the default settings for
reproducible results.

rng default

x = triang(20);
y = [zeros(3,1);x]+0.3*randn(length(x)+3,1);

subplot(2,1,1)
stem(x,'filled')
axis([0 22 -1 2])
title('Input Sequence')

subplot(2,1,2)
stem(y,'filled')
axis([0 22 -1 2])
title('Output Sequence')
Obtain the sample cross-correlation sequence and use the maximum absolute value to estimate
the lag. Plot the sample cross-correlation sequence.

[xc,lags] = xcorr(y,x);
[~,I] = max(abs(xc));

figure
stem(lags,xc,'filled')
legend(sprintf('Maximum at lag %d',lags(I)))
title('Sample Cross-Correlation Sequence')
The maximum cross correlation sequence value occurs at lag 3 as expected.

Rad na času:

Otvoriti Matlab, ući u simulink okruženje i kreirati telekomunikacioni sistem koji je


dat sljedećom blok-šemom.
Odrediti odziv sistema u vremenu na jediničnu odskočnu funkciju. Koja je veza
između ovod odziva i impulsnog odziva sistema. Riječ je o LTI (Linear Time
Invarient) komunikacionom sistemu!

You might also like