Better figure outputs
This commit is contained in:
parent
e55ca8b01a
commit
5262c4a460
@ -68,8 +68,8 @@ io(io_i) = linio([mdl, '/dac_noise'], 1, 'input'); io_i = io_i + 1; % DAC n
|
||||
io(io_i) = linio([mdl, '/amp_noise'], 1, 'input'); io_i = io_i + 1; % Voltage Amplifier noise [V]
|
||||
io(io_i) = linio([mdl, '/NASS/adc_noise'], 1, 'input'); io_i = io_i + 1; % ADC noise [V]
|
||||
io(io_i) = linio([mdl, '/NASS/enc_noise'], 1, 'input'); io_i = io_i + 1; % Encoder noise [m]
|
||||
io(io_i) = linio([mdl, '/NASS'], 2, 'output', [], 'z'); io_i = io_i + 1; % Vertical error [m]
|
||||
io(io_i) = linio([mdl, '/NASS'], 2, 'output', [], 'y'); io_i = io_i + 1; % Lateral error [m]
|
||||
io(io_i) = linio([mdl, '/NASS'], 2, 'output', [], 'z'); io_i = io_i + 1; % Vertical error [m]
|
||||
|
||||
Gd = linearize(mdl, io);
|
||||
Gd.InputName = {...
|
||||
@ -114,9 +114,9 @@ rms_unit_asd_amp = sqrt(sum((unit_asd.*abs(squeeze(freqresp(Gd('z', 'namp1'), fr
|
||||
rms_unit_asd_adc = sqrt(sum((unit_asd.*abs(squeeze(freqresp(Gd('z', 'nad1' ), freqs, 'Hz'))).').^2));
|
||||
|
||||
% Obtained maximum ASD for different instruments
|
||||
max_dac_asd = max_asd_z./rms_unit_asd_dac; % [V/sqrt(Hz)]
|
||||
max_amp_asd = max_asd_z./rms_unit_asd_amp; % [V/sqrt(Hz)]
|
||||
max_adc_asd = max_asd_z./rms_unit_asd_adc; % [V/sqrt(Hz)]
|
||||
max_dac_asd = max_asd_z./rms_unit_asd_dac % [V/sqrt(Hz)]
|
||||
max_amp_asd = max_asd_z./rms_unit_asd_amp % [V/sqrt(Hz)]
|
||||
max_adc_asd = max_asd_z./rms_unit_asd_adc % [V/sqrt(Hz)]
|
||||
|
||||
% Estimation of the equivalent RMS noise
|
||||
max_dac_rms = 1e3*max_dac_asd*sqrt(5e3) % [mV RMS]
|
||||
|
@ -283,8 +283,8 @@ tiledlayout(3, 1, 'TileSpacing', 'compact', 'Padding', 'None');
|
||||
|
||||
ax1 = nexttile([2,1]);
|
||||
hold on;
|
||||
plot(f, abs(G_dac_adc), 'color', colors(2,:), 'DisplayName', 'Measurement');
|
||||
plot(f, abs(squeeze(freqresp(G_delay, f, 'Hz'))), 'k--', 'DisplayName', 'Pure Delay');
|
||||
plot(f, abs(G_dac_adc), 'color', [colors(1,:), 0.5], 'linewidth', 2.5, 'DisplayName', 'Measurement');
|
||||
plot(f, abs(squeeze(freqresp(G_delay, f, 'Hz'))), '--', 'color', colors(1,:), 'DisplayName', 'Pure Delay');
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [V/V]'); set(gca, 'XTickLabel',[]);
|
||||
@ -294,8 +294,8 @@ leg.ItemTokenSize(1) = 15;
|
||||
|
||||
ax2 = nexttile();
|
||||
hold on;
|
||||
plot(f, 180/pi*unwrap(angle(G_dac_adc)), 'color', colors(2,:));
|
||||
plot(f, 180/pi*unwrap(angle(squeeze(freqresp(G_delay, f, 'Hz')))), 'k--', 'DisplayName', 'Pure Delay');
|
||||
plot(f, 180/pi*unwrap(angle(G_dac_adc)), 'color', [colors(1,:), 0.5], 'linewidth', 2.5);
|
||||
plot(f, 180/pi*unwrap(angle(squeeze(freqresp(G_delay, f, 'Hz')))), '--', 'color', colors(1,:));
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
@ -353,7 +353,7 @@ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD [$V/\sqrt{Hz}$]');
|
||||
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
|
||||
leg.ItemTokenSize(1) = 15;
|
||||
ylim([1e-10, 4e-4]); xlim([1, 5e3]);
|
||||
ylim([1e-10, 1e-3]); xlim([1, 5e3]);
|
||||
xticks([1e0, 1e1, 1e2, 1e3])
|
||||
|
||||
%% Load all the measurements
|
||||
|
Loading…
x
Reference in New Issue
Block a user