Noise measurement
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
pd200_7 = load('mat/noise_PD200_7.mat', 't', 'Vn', 'notes');
|
||||||
|
|
||||||
|
Ts = t(2)-t(1);
|
||||||
|
|
||||||
|
pd200_7.Vn = pd200_7.Vn/pd200_7.notes.pre_amp.gain;
|
||||||
|
|
||||||
|
% Peak to peak in mV
|
||||||
|
1000*(max(Vn)-min(Vn))
|
||||||
|
|
||||||
|
% RMS in uV
|
||||||
|
1e6*rms(Vn)
|
||||||
|
|
||||||
|
win = hann(ceil(length(Vn)/20));
|
||||||
|
[pxx, f] = pwelch(Vn, win, [], [], 1/Ts);
|
||||||
|
|
||||||
|
figure;
|
||||||
|
plot(f, sqrt(pxx));
|
||||||
|
set(gca, 'xscale', 'log');
|
||||||
|
set(gca, 'yscale', 'log');
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
|||||||
|
%%
|
||||||
|
tg = slrt;
|
||||||
|
|
||||||
|
f = SimulinkRealTime.openFTP(tg);
|
||||||
|
mget(f, 'data/data.dat');
|
||||||
|
close(f);
|
||||||
|
|
||||||
|
%% Convert the Data
|
||||||
|
data = SimulinkRealTime.utils.getFileScopeData('data/data.dat').data;
|
||||||
|
|
||||||
|
Vn = data(:, 1);
|
||||||
|
t = data(:, end);
|
||||||
|
|
||||||
|
%% Notes
|
||||||
|
pre_amp = struct('coupling', 'DC A-B', ...
|
||||||
|
'gain', 1000, ...
|
||||||
|
'LPF', '12dB 0.1Hz', ...
|
||||||
|
'HPF', '1MHz');
|
||||||
|
|
||||||
|
pd200 = struct('input', '50 Ohm', ...
|
||||||
|
'offset', 0.2);
|
||||||
|
|
||||||
|
notes = struct('pre_amp', pre_amp, 'pd_200', pd200);
|
||||||
|
|
||||||
|
%% Save
|
||||||
|
save('mat/noise_PD200_6.mat', 't', 'Vn', 'notes');
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Fs = 20e3; % [Hz]
|
||||||
|
Ts = 1/Fs; % [s]
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user