我在 matlab 中使用 pwelch 方法来计算一些风速测量的功率谱。因此,到目前为止,我已经编写了以下代码作为示例:
t = 10800; % number of seconds in 3 hours
t = 1:t; % generate time vector
fs = 1; % sampling frequency (seconds)
A = 2; % amplitude
P = 1000; % period (seconds), the time it takes for the signal to repeat itself
f1 = 1/P; % number of cycles per second (i.e. how often the signal repeats itself every second).
y = A*sin(2*pi*f1*t); % signal
fh = figure(1);
set(fh,'color','white','Units', 'Inches', 'Position', [0,0,6,6],...
'PaperUnits', 'Inches', 'PaperSize', [6,6]);
[pxx, f] = pwelch(y,[],[],[],fs);
loglog(f,10*(pxx),'k','linewidth',1.2);
xlabel('log10(cycles per s)');
ylabel('Spectral Density (dB Hz^{-1})');
我无法包含该情节,因为我没有足够的声望点
这有意义吗?我正在为在情节右侧产生噪音的想法而苦苦挣扎。分解后的信号是一个没有噪声的正弦波,这个噪声是从哪里来的呢?y轴上的值为负的事实是否表明这些频率可以忽略不计?此外,如果风速以 m/s 为单位测量,那么在 y 轴上写单位的最佳方法是什么,这可以转换为对环境科学家更有意义的东西吗?