2024-08-31 13:31:35 +02:00
|
|
|
function plot_doubleinput(t, sat, U_track, U_corr, type)
|
2024-08-13 11:45:36 +02:00
|
|
|
|
|
|
|
tiledlayout(1,1,'Padding','tight', 'TileSpacing','compact')
|
|
|
|
nexttile
|
|
|
|
|
2024-08-31 13:31:35 +02:00
|
|
|
|
|
|
|
if type == 0
|
|
|
|
subplot(1,2,1);
|
|
|
|
else
|
2024-08-13 11:45:36 +02:00
|
|
|
subplot(2,1,1);
|
2024-08-31 13:31:35 +02:00
|
|
|
end
|
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
hold on
|
|
|
|
plot(t, U_track(:, 1), 'Linewidth', 5, 'DisplayName', '\omega_r^{track}');
|
|
|
|
plot(t, U_corr(:, 1), 'Linewidth', 5, 'DisplayName', '\omega_r^{corr}');
|
|
|
|
legend('FontSize', 12, 'Location', 'east', 'AutoUpdate','off')
|
|
|
|
plot(t, ones(1,length(t))*sat(1), 'Linewidth', 2.5, 'LineStyle', '--');
|
|
|
|
plot(t, -ones(1,length(t))*sat(1), 'Linewidth', 2.5, 'LineStyle', '--');
|
|
|
|
xlabel('\textbf{t[s]}', 'FontSize', 18, 'Interpreter','latex');
|
|
|
|
hold off
|
|
|
|
|
|
|
|
|
|
|
|
Axes = gca;
|
|
|
|
Axes.FontSize=18;
|
|
|
|
Axes.FontWeight='bold';
|
|
|
|
grid minor;
|
|
|
|
Axes.PlotBoxAspectRatio = [1 1 1];
|
|
|
|
|
2024-08-31 13:31:35 +02:00
|
|
|
|
|
|
|
if type == 0
|
|
|
|
subplot(1,2,2);
|
|
|
|
else
|
2024-08-13 11:45:36 +02:00
|
|
|
subplot(2,1,2);
|
2024-08-31 13:31:35 +02:00
|
|
|
end
|
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
hold on
|
2024-08-31 13:31:35 +02:00
|
|
|
plot(t, U_track(:, 2), 'Linewidth', 5, 'DisplayName', '\omega_l^{track}');
|
|
|
|
plot(t, U_corr(:, 2), 'Linewidth', 5, 'DisplayName', '\omega_l^{corr}');
|
2024-08-13 11:45:36 +02:00
|
|
|
legend('FontSize', 12, 'Location', 'east', 'AutoUpdate','off')
|
|
|
|
plot(t, ones(1,length(t))*sat(2), 'Linewidth', 2.5, 'LineStyle', '--');
|
|
|
|
plot(t, -ones(1,length(t))*sat(2), 'Linewidth', 2.5, 'LineStyle', '--');
|
|
|
|
xlabel('\textbf{t[s]}', 'FontSize', 18, 'Interpreter','latex');
|
|
|
|
|
|
|
|
Axes = gca;
|
|
|
|
Axes.FontSize=18;
|
|
|
|
Axes.FontWeight='bold';
|
|
|
|
grid minor;
|
|
|
|
Axes.PlotBoxAspectRatio = [1 1 1];
|
|
|
|
|
|
|
|
hold off
|
|
|
|
end
|