Autooo
Autooo
Autooo
PSDUSING SCILAB
AIM:
Write a program for Autocorrelation and PSD of signals in SCILAB and verify Wiener-
Khinchin relation.
EQUIPMENTS Needed
THEORY:
The Wiener-Khinchin theorem states that the power spectral density of a wide sense
stationary random process is theFourier transform of the corresponding autocorrelation
function.
Algorithm
1. Load or Define the Signal: Input your time-domain signal.
2. Compute Autocorrelation: Calculate the autocorrelation function of the signal.
3. Compute Power Spectral Density (PSD): Estimate the PSD of the signal,
either directly using a method like Welch’s periodogram or by using the Fourier
transform of the autocorrelation.
4. Plot Results: Visualize the autocorrelation function and PSD.
PROCEDURE
PROGRAM:
clc;
clear all;
t=0:0.01:2*%pi;
x=sin(2*t);
subplot(3,2,1);
plot(x);
au=xcorr(x,x);
subplot (3,2,2);
plot (au);
v=fft(au);
subplot(3,2,3);
plot(abs(v));
fw=fft(x);
subplot(3,2,4);
plot(fw);
fw2=(abs(fw)).^2;
subplot(3,2,5);
plot(fw2);
OUTPUT:
RESULT:
Thus the Autocorrelation and PSD are executed in Scilab and output is
verified.