diff --git a/BE_Beam.m b/BE_Beam.m index 623fd28..976ddea 100644 --- a/BE_Beam.m +++ b/BE_Beam.m @@ -173,20 +173,20 @@ plot(eig_zoh3,'x'); hold off; %% -sys_CL_Ts = c2d(sys_CL, 10, 'zoh'); +sys_CL_Ts = c2d(sys_CL, 1, 'zoh'); figure step(sys_CL_Ts) %% Question 11 -K = lqr(sys, eye(size(A)), 1); -H_lqr = inv(Cw_L*inv(-A+B*K)*B) ; +K_lqr = lqr(sys, eye(size(A)), 1); +H_lqr = inv(Cw_L*inv(-A+B*K_lqr)*B) ; %% Question 12 -sys_CL_lqr = ss(A-B*K, B*H_lqr, C, 0); +sys_CL_lqr = ss(A-B*K_lqr, B*H_lqr, C, 0); [y, t, x] = lsim(sys_CL_lqr, cmd, t); -u = H_lqr*cmd'-(K*x')' ; +u = H_lqr*cmd'-(K_lqr*x')' ; Question12 = figure ; plot(t, u, t, y, t, cmd, t, (Cw_L*x')'); xlabel("Temps (s)"); @@ -201,12 +201,12 @@ end %% Question 15 Bp = [0; 0; 0; 0; 1/2*L^4-L^3+L; L^3-1/2*L^4; 1/4*L^4-2/3*L^3+1/2*L^2; 1/4*L^4-1/3*L^3]; -q = -5 * double (t' >= 4); -sys_perturbations = ss(A-B*K, [B*H_lqr Bp], C, [0 0]); +q0 = -5 * double (t' >= 4); +sys_perturbations = ss(A-B*K_lqr, [B*H_lqr Bp], C, [0 0]); %%Question 16 -[y, t, x] = lsim(sys_perturbations, [cmd ; q], t'); -u = H_lqr*cmd'-(K*x')' ; +[y, t, x] = lsim(sys_perturbations, [cmd ; q0], t'); +u = H_lqr*cmd'-(K_lqr*x')' ; Question16 = figure ; plot(t, u, t, y, t, cmd, t, (Cw_L*x')'); xlabel("Temps (s)"); @@ -240,4 +240,18 @@ legend("$u(t)$", "$y(t)$", "$w_c(L,t)$", "$w(L,t)$", 'Interpreter', 'latex'); title("Simulation du retour d'états avec action intégrale et perturbations") ; if SAVE exportgraphics(Question19, './latex/Illustrations/Question19.pdf') -end \ No newline at end of file +end + +%% +sys_integral_d = c2d(sys_integral, 0.5, 'zoh'); +t_d = 0:0.5:10; % Define the time vector for discrete simulation +cmd_d = double (t_d >= 1) ; +q0_d = -5 * double(t_d >= 4); +[y_d, t_d, x_d] = lsim(sys_integral_d, [cmd_d ; q0_d], t_d); +u_d = -(K_aug*x_d')' ; +Question20 = figure ; +plot(t_d, u_d, t_d, y_d, t_d, cmd_d, t_d, ([Cw_L 0]*x_d')'); +xlabel("Temps (s)"); +ylabel("Amplitude"); +legend("$u(t)$", "$y(t)$", "$w_c(L,t)$", "$w(L,t)$", 'Interpreter', 'latex'); +title("Simulation du retour d'états avec action intégrale et perturbations") ; diff --git a/latex/contents.tex b/latex/contents.tex index 84291ed..94e19fd 100644 --- a/latex/contents.tex +++ b/latex/contents.tex @@ -25,7 +25,7 @@ Blabla \end{equation*} -\subsection{Exercice 1} +\subsection{Question 1} \begin{equation*} \left\{\begin{aligned} @@ -42,7 +42,7 @@ Blabla \end{equation} -\subsection{Exercice 2} +\subsection{Question 2} \begin{align*} \left\{\begin{aligned} @@ -156,7 +156,7 @@ Ce qui nous donne l'approximation : \boxed{y(t) = -\phi(L)^T e_{2d}} \end{equation*} -\subsection{Exercice 3} +\subsection{Question 3} On a : \begin{equation*} @@ -229,7 +229,7 @@ Pour : \end{equation*} -\subsection{Exercice 4} +\subsection{Question 4} \begin{equation*} \omega(p, t) = C_\omega(p)x_d(t) \end{equation*} @@ -247,7 +247,7 @@ Pour : \end{equation*} \includegraphics[width=\textwidth]{Illustrations/Question4} -\subsection{Exercice 5} +\subsection{Question 5} \includegraphics[width=\textwidth]{Illustrations/Question5}\begin{align*} y = -\phi(L)^Te_{2d} && y = -e_2(L, t) & & e_2(\zeta, t) \approx \phi(\zeta)^Te_{2d}(t) \end{align*} @@ -267,7 +267,7 @@ Pour : \end{align*} -\subsection{Exercice 6} +\subsection{Question 6} \begin{equation*} \begin{bmatrix} x_1 \\ x_2 @@ -303,56 +303,138 @@ $C_1$ et $C_2$ ????????????????? \section{Retour de sortie} -\subsection{Exercice 7} +\subsection{Question 7} +La sortie est donnée par $y(t) = C\,x_d(t)$, donc le système en boucle fermée s’écrit : + +\begin{equation*} +\begin{cases} + \dot{x}_d(t) = (A - B C k)\,x_d(t) + B H\,w_c(L,t) \\ + w(L,t) = C_w(L)\,x_d(t) +\end{cases} +\end{equation*} + +En régime permanent, $\dot{x}_d(t)=0$, donc : +\begin{equation*} + 0 = (A - B C k)\,x_d + B H\,C_w(L)\,x_d + \quad \Rightarrow \quad + x_d = -(A - B C k)^{-1} B H w_c(L,t) +\end{equation*} + +En multipliant l’expression par $C_w(L)$, on trouve : +\begin{equation*} + w(L,t) = C_w(L)\,x_d = -C_w(L)(A - B C k)^{-1} B H w_c(L,t) +\end{equation*} + +Pour assurer le suivi $w(L,t) = w_c(L,t)$, il faut : +\begin{equation*} + - C_w(L)(A - B C k)^{-1} B H = I +\end{equation*} + +D’où : +\begin{equation*} + \boxed{H = -\left(C_w(L)(A - B C k)^{-1} B\right)^{-1}} +\end{equation*} + +Finalement, après calcul sous MATLAB, on obtient $H = -3$. -\subsection{Exercice 8} +\subsection{Question 8} \includegraphics[width=\textwidth]{Illustrations/Question8} -\subsection{Exercice 9} +\subsection{Question 9} -\subsection{Exercice 10} +\subsection{Question 10} \section{Retour d'état} -\subsection{Exercice 11} +\subsection{Question 11} +En utilisant la fonction \texttt{lqr()} de MATLAB avec $Q = I_8$ et $R = 1$, on trouve la matrice de gain $K$ suivante : +\begin{equation*} + K = \begin{pmatrix} + 0.97 & -14.62 & 0.66 & 1.32 & 19.32 & 0.39 & 2.40 & -2.11 + \end{pmatrix} +\end{equation*} + +\subsection{Question 12} +\includegraphics[width=\textwidth]{Illustrations/Question12} -\subsection{Exercice 12} -\includegraphics[width=\textwidth]{Illustrations/Question12}\begin{align*} +\subsection{Question 13} -\subsection{Exercice 13} - - -\subsection{Exercice 14} +\subsection{Question 14} \section{Rejection de perturbation} -\subsection{Exercice 15} +\subsection{Question 15} +On sait que : +\begin{equation*} + F_{ext} = \int_{0}^{L}\phi(\zeta)q(\zeta,t)d\zeta + \quad \Rightarrow \quad + F_{ext} = q_0(t) \cdot \int_{0}^{L}\phi(\zeta)d\zeta \text{ car } q(\zeta,t) = q_0(t) +\end{equation*} +Or on a : +\begin{equation*} + E\dot{x}_{2d} = - e_{1d}D^T - \phi(L)u(t) - F_{ext} +\end{equation*} +Donc, puisque $\dot{x}_{d}(t) = A x_d(t) + B u(t) + B_p q_0(t)$, on trouve : +\begin{equation*} + B_p = \begin{pmatrix} + 0_{4 \times 1} \\ + -\int_{0}^{L}\phi(\zeta)d\zeta + \end{pmatrix} + + = \begin{pmatrix} + 0_{4 \times 1} \\ + 1/2 \\ + 1/2 \\ + 1/12 \\ + -1/12 + \end{pmatrix} +\end{equation*} + +\subsection{Question 16} +\includegraphics[width=\textwidth]{Illustrations/Question16} +Notre système ne permet pas de garantir une erreur nulle en régime permanent face +à une perturbation constante. + +\subsection{Question 17} +Nous souhaitons garder les mêmes valeurs propres que celles obtenues lors de la question 11 +avec la LQR. La valeur propre supplémentaire doit être plus à droite pour permettre +de rejeter la perturbation. On chosit $\lambda_9 = -2$. +On trouve alors : +\begin{equation*} + \lambda = \begin{pmatrix} + -84.66 & -7.56 \pm 68.77i & -27.97 \pm 17.24i & -15.91 & -4.38 \pm 2.66i & -2 + \end{pmatrix}^T +\end{equation*} + +\subsection{Question 18} +En utilisant la fonction \texttt{place()} de MATLAB, on trouve la matrice de gain $K$ suivante : +\begin{equation*} + K_{aug} = \begin{pmatrix} + K_1 & K_i + \end{pmatrix} \text{ avec } K_1 \in \mathbb{R}^{1 \times 8} \text{ et } K_i \in \mathbb{R} + + + K_{aug} = \begin{pmatrix} + -0.89 & -16.59 & 0.28 & 1.68 & 19.39 & -0.84 & 2.36 & -1.94 & 12.00 + \end{pmatrix} +\end{equation*} -\subsection{Exercice 16} -\includegraphics[width=\textwidth]{Illustrations/Question16}\begin{align*} +\subsection{Question 19} +\includegraphics[width=\textwidth]{Illustrations/Question19} +En utilisant l'action intégrale, on parvient à rejeter la perturbation constante +et à garantir une erreur nulle en régime permanent. - -\subsection{Exercice 17} - - -\subsection{Exercice 18} - - -\subsection{Exercice 19} -\includegraphics[width=\textwidth]{Illustrations/Question19}\begin{align*} - - -\subsection{Exercice 20} +\subsection{Question 20} diff --git a/latex/main.pdf b/latex/main.pdf index f8dd15f..24a2a59 100644 Binary files a/latex/main.pdf and b/latex/main.pdf differ