Work 1: File housekeeping

This commit is contained in:
2025-04-04 00:46:41 +03:00
parent d93dd0f967
commit 8b25ee6130
30 changed files with 21 additions and 21 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+9 -9
View File
@@ -89,7 +89,7 @@
\begin{itemize}
\item Την παρούσα αναφορά.
\item Τον κατάλογο \textbf{scripts/}, που περιέχει τον κώδικα της MATLAB.
\item Το \href{https://git.hoo2.net/hoo2/SystemModling}{σύνδεσμο} με το αποθετήριο που περιέχει όλο το project με τον κώδικα της MATLAB, της αναφοράς και τα παραδοτέα.
\item Το \href{https://git.hoo2.net/hoo2/SystemModling/src/branch/master/Work%201}{σύνδεσμο} με το αποθετήριο που περιέχει όλο το project με τον κώδικα της MATLAB, της αναφοράς και τα παραδοτέα.
\end{itemize}
\section*{Θέμα 1 – Μοντελοποίηση και Προσομοίωση Συστήματος Εκκρεμούς}
@@ -143,10 +143,10 @@
Για τον λόγο αυτό, επεκτείναμε τη διάρκεια προσομοίωσης στα $90$ δευτερόλεπτα.
Όπως φαίνεται στο Σχήμα~\ref{fig:90s}, το σύστημα σταθεροποιείται τελικά σε περιοδική μορφή περίπου μετά από $50$ δευτερόλεπτα.
\InsertFigure{!ht}{1}{fig:20s}{../scripts/Prob1_responce_20s.png}{
\InsertFigure{!ht}{1}{fig:20s}{../scripts/output/Prob1_responce_20s.png}{
Απόκριση του συστήματος για $t \in [0, 20]$ sec. Η μεταβατική φάση παραμένει ενεργή.
}
\InsertFigure{!ht}{1}{fig:90s}{../scripts/Prob1_responce_90s.png}{
\InsertFigure{!ht}{1}{fig:90s}{../scripts/output/Prob1_responce_90s.png}{
Απόκριση του συστήματος για $t \in [0, 90]$ sec. Το σύστημα σταθεροποιείται σε περιοδική συμπεριφορά μετά τα $50$ sec.
}
@@ -187,7 +187,7 @@
\]
Στο Σχήμα~\ref{fig:prob2a} παρουσιάζονται η πραγματική και η εκτιμώμενη γωνία, καθώς και το σφάλμα $e_q(t)$ μεταξύ τους.
\InsertFigure{!ht}{1}{fig:prob2a}{../scripts/Prob2_20s_Ts0.1.png}{
\InsertFigure{!ht}{1}{fig:prob2a}{../scripts/output/Prob2_20s_Ts0.1.png}{
Αποτελέσματα εκτίμησης παραμέτρων με χρήση όλων των μεταβλητών κατάστασης.
}
\paragraph*{Συμπεράσματα:}
@@ -204,7 +204,7 @@
\]
Ακολουθείται η ίδια διαδικασία παλινδρόμησης με την περίπτωση (α), όπως και η ανακατασκευή της απόκρισης. Το Σχήμα~\ref{fig:prob2b} δείχνει τα αντίστοιχα αποτελέσματα.
\InsertFigure{!ht}{1}{fig:prob2b}{../scripts/Prob2b_20s_Ts0.1.png}{
\InsertFigure{!ht}{1}{fig:prob2b}{../scripts/output/Prob2b_20s_Ts0.1.png}{
Αποτελέσματα εκτίμησης παραμέτρων με χρήση μόνο του $q(t)$ και του $u(t)$.
}
@@ -238,13 +238,13 @@
\hspace{-2em}
\begin{minipage}{0.49\textwidth}
\centering
\includegraphics[width=1.15\linewidth]{../scripts/Prob3a_NoiseStd0.0010.png}
\includegraphics[width=1.15\linewidth]{../scripts/output/Prob3a_NoiseStd0.0010.png}
\caption{Εκτίμηση με $\sigma = 0.001$}
\end{minipage}
\hspace{0.5em}
\begin{minipage}{0.49\textwidth}
\centering
\includegraphics[width=1.15\linewidth]{../scripts/Prob3a_NoiseStd0.0025.png}
\includegraphics[width=1.15\linewidth]{../scripts/output/Prob3a_NoiseStd0.0025.png}
\caption{Εκτίμηση με $\sigma = 0.0025$}
\end{minipage}
\end{figure}
@@ -280,7 +280,7 @@
\caption{Εκτιμήσεις και ποσοστά σφάλματος παραμέτρων για διαφορετικές περιόδους $T_s$}
\end{table}
\InsertFigure{!ht}{1}{fig:3b}{../scripts/Prob3b_SamplingPeriodEffect.png}{
\InsertFigure{!ht}{1}{fig:3b}{../scripts/output/Prob3b_SamplingPeriodEffect.png}{
Σφάλμα εκτίμησης ως προς την περίοδο δειγματοληψίας $T_s$.
}
@@ -319,7 +319,7 @@
\caption{Εκτιμήσεις και ποσοστά σφάλματος παραμέτρων για διαφορετικά πλάτη $A_0$}
\end{table}
\InsertFigure{!ht}{1}{fig:3c}{../scripts/Prob3c_AmplitudeEffect.png}{
\InsertFigure{!ht}{1}{fig:3c}{../scripts/output/Prob3c_AmplitudeEffect.png}{
Σφάλμα εκτίμησης παραμέτρων συναρτήσει του πλάτους εισόδου $A_0$.
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

+3 -3
View File
@@ -28,11 +28,11 @@ subplot(2,1,1);
plot(t, x(:,1)); ylabel('q(t) [rad]'); grid on; title('Γωνία');
subplot(2,1,2);
plot(t, x(:,2), 'r'); ylabel('dq(t) [rad/s]'); xlabel('t [sec]'); grid on; title('Γωνιακή Ταχύτητα');
saveas(gcf, 'Prob1_responce_20s.png');
saveas(gcf, 'output/Prob1_responce_20s.png');
% === Sampling for Problem 2 ===
Ts = 0.1; % Sampling period
sample_data(t, x, Ts, A0, omega, 'problem1_data.csv');
sample_data(t, x, Ts, A0, omega, 'output/problem1_data.csv');
% --- Extended simulation to 90 sec ---
tspan = [0 90];
@@ -47,4 +47,4 @@ subplot(2,1,1);
plot(t, x(:,1)); ylabel('q(t) [rad]'); grid on; title('Γωνία');
subplot(2,1,2);
plot(t, x(:,2), 'r'); ylabel('dq(t) [rad/s]'); xlabel('t [sec]'); grid on; title('Γωνιακή Ταχύτητα');
saveas(gcf, 'Prob1_responce_90s.png');
saveas(gcf, 'output/Prob1_responce_90s.png');
+2 -2
View File
@@ -12,7 +12,7 @@ mgL_true = m * g * L;
theta_true = [mL2_true; c_true; mgL_true];
% Load sampled data from Problem 1
data = readtable('problem1_data.csv');
data = readtable('output/problem1_data.csv');
t = data.t;
q = data.q;
dq = data.dq;
@@ -73,7 +73,7 @@ bar(["mL^2", "c", "mgL"], theta_hat);
title('Estimated Parameters');
ylabel('Value');
grid on;
saveas(gcf, 'Prob2_20s_Ts0.1.png');
saveas(gcf, 'output/Prob2_20s_Ts0.1.png');
fprintf(' Actual Parameters: mL^2=%f, c=%f, mgL=%f\n', theta_true(1), theta_true(2), theta_true(3));
fprintf('Estimated Parameters: mL^2=%f, c=%f, mgL=%f\n', theta_hat(1), theta_hat(2), theta_hat(3));
+2 -2
View File
@@ -12,7 +12,7 @@ mgL_true = m * g * L;
theta_true = [mL2_true; c_true; mgL_true];
% Load sampled data
data = readtable('problem1_data.csv');
data = readtable('output/problem1_data.csv');
t = data.t;
q = data.q;
u = data.u;
@@ -81,7 +81,7 @@ ylabel('Value');
grid on;
% Save figure
saveas(gcf, 'Prob2b_20s_Ts0.1.png');
saveas(gcf, 'output/Prob2b_20s_Ts0.1.png');
% Print results
fprintf(' Actual Parameters: mL^2=%f, c=%f, mgL=%f\n', theta_true(1), theta_true(2), theta_true(3));
+2 -2
View File
@@ -13,7 +13,7 @@ mgL_true = m * g * L;
theta_true = [mL2_true; c; mgL_true];
% Load clean data
data = readtable('problem1_data.csv');
data = readtable('output/problem1_data.csv');
t = data.t;
q_clean = data.q;
u = data.u;
@@ -109,6 +109,6 @@ for i = 1:length(noise_levels)
grid on;
% Save figure
filename = sprintf('Prob3a_NoiseStd%.4f.png', noise_std);
filename = sprintf('output/Prob3a_NoiseStd%.4f.png', noise_std);
saveas(gcf, filename);
end
+1 -1
View File
@@ -77,4 +77,4 @@ ylabel('Relative Error [%]');
title('Effect of Ts on Parameter Estimation');
grid on;
saveas(gcf, 'Prob3b_SamplingPeriodEffect.png');
saveas(gcf, 'output/Prob3b_SamplingPeriodEffect.png');
+2 -2
View File
@@ -19,7 +19,7 @@ dt = 1e-4; % integration resolution
T_final = 20; % simulation time
% Amplitudes to test
A0_list = [1, 2, 4, 6, 8, 16, 32];
A0_list = [1, 2, 4, 6, 8, 16];
n_cases = length(A0_list);
rel_errors_all = zeros(3, n_cases);
@@ -75,4 +75,4 @@ title('Effect of Input Amplitude on Parameter Estimation');
grid on;
ylim([0 1.1]);
saveas(gcf, 'Prob3c_AmplitudeEffect.png');
saveas(gcf, 'output/Prob3c_AmplitudeEffect.png');
Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB