How can I find the Power spectral density of a filtered Noise?
3 次查看(过去 30 天)
显示 更早的评论
I have this following code of generating noise and filtering it.. However I ailrd to plot its PSD of filtered Noise, as mentioned in coments?
N=2^10;
time=1:1:N;
time=time*1e-3;
time=time/N;
size(time)
bandwidth=100e3;
irn=10e-9;
plotting=1;
noisebw=(1/(max(time)/length(time)) )/2;
%%% SENSOR DATA
ws=(noisebw)/bandwidth;
Wn=1/ws;
[b,a] = butter(2,Wn,'low');
VN1=irn*sqrt(bandwidth);
VN2=sqrt(ws);
noise1=VN1*randn(size(time));
noise2=filter(b,a,noise1);
noise3=VN2*noise2; % filtered Noise
if plotting
figure(100);
plot(time,noise1,'-k','Linewidth',2);
hold on;
plot(time,noise2,'-y','Linewidth',2);
plot(time,noise3,'-m','Linewidth',2);
grid on;
legend('noise high bw','filtered','noise low bw');
title('noise source function outputs');
end
0 个评论
回答(1 个)
Ameer Hamza
2020-6-6
编辑:Ameer Hamza
2020-6-6
This example show how to plot PSD using FFT: https://www.mathworks.com/help/signal/ug/power-spectral-density-estimates-using-fft.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parametric Spectral Estimation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!