how to calculate signal power spectrum density(PSD) in dB in frequency domain ?
Show older comments
Hi Everyone ,
I have signal in time domain as data with two columns t(ns)=data(:,1) and signal=data(:,2). my signal period is from 0.6 (ns) to 2.4 (ns). I have used FFT to convert it to frequency domain in order to get PSD (dB). Please help me to get power of signal . One more Question , If my signal has period of 2.4 ns -0.6 ns = 1.8 ns and as Fc=1/t then Fc=1/1.8 ns = 555.5 MHz . is this frequency similar to center frequency in FFT plot ?

Fs = 8e9; (chose for testing but my Fc is 4.0GHz)
time=data(:,1);
x=data(:,2);
E=abs(x.^2); a=0.6e-9; b=2.4e-9; N=0.5e-9:2.4e-9; delta=b-a/N;
pow=sum(E)*delta/1.8e-9; power=sum(E);
%pow_db=mag2db(pow); Fs = 8e9; %t = 0:1/Fs:1-1/Fs; Power = (1/20)*sum(x(1:20).^2) xdft = fft(x); xdft = xdft(1:length(x)/2+1); xdft(2:end-1) = 2*xdft(2:end-1); psdest = 1/(length(x)*Fs)*abs(xdft).^2;<<<<<<<<http://mathworks.com/matlabcentral/images/surf.gif>>>>>>>> freq = 0:Fs/length(x):Fs/2;
figure(1) plot(time,x); xlabel('Time(ns)'); ylabel('Amplitude'); grid on;
figure(2) plot(freq,10*log10(psdest)); xlabel('Frequency (GHz)'); ylabel('Magnitude'); grid on;
*******Plot links of signal in Time Domain **********************
*******Plot link of FFT of time Domain signal ********************** <file:////lsbu.ac.uk/EagleDFS-UsersG/g/gh/ghafarim/My%20Pictures/FFT%20_%20freqency%20Domain.JPG>
Answers (0)
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!