diff --git a/docs/control-tracking.html b/docs/control-tracking.html index 2b89ab4..22f7fbd 100644 --- a/docs/control-tracking.html +++ b/docs/control-tracking.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-The control architecture is shown in Figure 1. +The control architecture is shown in Figure 1.
@@ -367,16 +367,16 @@ Then, a diagonal (decentralized) controller \(\bm{K}_\mathcal{L}\) is used such
-+
Figure 1: Decentralized control for reference tracking
% Stewart Platform
@@ -407,8 +407,8 @@ references = initializeReferences(stewart);
Let’s identify the transfer function from \(\bm{\tau}\) to \(\bm{\mathcal{L}}\). @@ -431,43 +431,29 @@ G.OutputName = {'L1', '
-The diagonal terms of the plant is shown in Figure 2. +The diagonal and off-diagonal terms of the plant are shown in Figure 2.
All the diagonal terms are equal. -
- - - - --The off-diagonal terms are shown in Figure 3. -
- -We see that the plant is decoupled at low frequency which indicate that decentralized control may be a good idea.
-Let’s define some reference path to follow. @@ -516,7 +502,7 @@ references = initializeReferences(stewart, 't',
-The reference path is shown in Figure 5. +The reference path is shown in Figure 4.
-
Figure 5: Reference path used for Tracking control (png, pdf)
+Figure 4: Reference path used for Tracking control (png, pdf)
-The reference path and the position of the mobile platform are shown in Figure 6. +The reference path and the position of the mobile platform are shown in Figure 5.
Such control architecture is easy to implement and give good results. @@ -618,11 +604,11 @@ However, as \(\mathcal{X}\) is not directly measured, it is possible that import
-The centralized controller takes the position error \(\bm{\epsilon}_\mathcal{X}\) as an inputs and generate actuator forces \(\bm{\tau}\) (see Figure 9). +The centralized controller takes the position error \(\bm{\epsilon}_\mathcal{X}\) as an inputs and generate actuator forces \(\bm{\tau}\) (see Figure 8). The signals are:
-
Figure 9: Centralized Controller
+Figure 8: Centralized Controller
@@ -649,7 +635,7 @@ We can think of two ways to make the plant more diagonal that are described in s
-Note here that the subtraction shown in Figure 9 is not a real subtraction. +Note here that the subtraction shown in Figure 8 is not a real subtraction. It is indeed a more complex computation explained in section 5.
@@ -657,8 +643,8 @@ It is indeed a more complex computation explained in section -% Stewart Platform
@@ -689,8 +675,8 @@ references = initializeReferences(stewart);
Let’s identify the transfer function from \(\bm{\tau}\) to \(\bm{\mathcal{X}}\). @@ -720,13 +706,13 @@ G.OutputName = {'Dx', '
The pose error \(\bm{\epsilon}_\mathcal{X}\) is first converted in the frame of the leg by using the Jacobian matrix. Then a diagonal controller \(\bm{K}_\mathcal{L}\) is designed. -The final implemented controller is \(\bm{K} = \bm{K}_\mathcal{L} \cdot \bm{J}\) as shown in Figure 10 +The final implemented controller is \(\bm{K} = \bm{K}_\mathcal{L} \cdot \bm{J}\) as shown in Figure 9
@@ -737,16 +723,16 @@ Note here that the transformation from the pose error \(\bm{\epsilon}_\mathcal{X
-
Figure 10: Controller in the frame of the legs
+Figure 9: Controller in the frame of the legs
-We now multiply the plant by the Jacobian matrix as shown in Figure 10 to obtain a more diagonal plant. +We now multiply the plant by the Jacobian matrix as shown in Figure 9 to obtain a more diagonal plant.
-All the diagonal elements are identical. +The bode plot of the plant is shown in Figure 10. +We can see that the diagonal elements are identical. This will simplify the design of the controller as all the elements of the diagonal controller can be made identical.
--The off-diagonal terms of the controller are shown in Figure 12. -
- -The controller consists of: @@ -805,7 +781,7 @@ The controller consists of:
-The obtained loop gains corresponding to the diagonal elements are shown in Figure 13. +The obtained loop gains corresponding to the diagonal elements are shown in Figure 11.
- +
@@ -831,8 +807,8 @@ The controller \(\bm{K} = \bm{K}_\mathcal{L} \bm{J}\) is computed.
We specify the reference path to follow. @@ -876,11 +852,11 @@ save('./mat/control_tracking.mat',
-A diagonal controller \(\bm{K}_\mathcal{X}\) take the pose error \(\bm{\epsilon}_\mathcal{X}\) and generate cartesian forces \(\bm{\mathcal{F}}\) that are then converted to actuators forces using the Jacobian as shown in Figure e 14. +A diagonal controller \(\bm{K}_\mathcal{X}\) take the pose error \(\bm{\epsilon}_\mathcal{X}\) and generate cartesian forces \(\bm{\mathcal{F}}\) that are then converted to actuators forces using the Jacobian as shown in Figure e 12.
@@ -891,16 +867,16 @@ The final implemented controller is \(\bm{K} = \bm{J}^{-T} \cdot \bm{K}_\mathcal
-
Figure 14: Controller in the cartesian frame
+Figure 12: Controller in the cartesian frame
-We now multiply the plant by the Jacobian matrix as shown in Figure 14 to obtain a more diagonal plant. +We now multiply the plant by the Jacobian matrix as shown in Figure 12 to obtain a more diagonal plant.
+
-
Figure 15: Diagonal Elements of the plant \(\bm{G} \bm{J}^{-T}\) (png, pdf)
+Figure 13: Diagonal and off-diagonal elements of the plant \(\bm{G} \bm{J}^{-T}\) (png, pdf)
@@ -922,13 +898,6 @@ The resonances of the system are “decoupled”. For instance, the vertical resonance of the system is only present on the diagonal term corresponding to \(D_z/\mathcal{F}_z\).
- - -Here the system is almost decoupled at all frequencies except for the transfer functions \(\frac{R_y}{\mathcal{F}_x}\) and \(\frac{R_x}{\mathcal{F}_y}\).
@@ -1019,8 +988,8 @@ This control architecture can also give a dynamically decoupled plant if the CenThe controller consists of: @@ -1031,7 +1000,7 @@ The controller consists of:
-The obtained loop gains corresponding to the diagonal elements are shown in Figure 17. +The obtained loop gains corresponding to the diagonal elements are shown in Figure 14.
- +
@@ -1057,8 +1026,8 @@ The controller \(\bm{K} = \bm{J}^{-T} \bm{K}_\mathcal{X}\) is computed.
We specify the reference path to follow. @@ -1102,8 +1071,8 @@ save('./mat/control_tracking.mat',
The plant \(\bm{G}\) is pre-multiply by \(\bm{G}^{-1}(\omega = 0)\) such that the “shaped plant” \(\bm{G}_0 = \bm{G} \bm{G}^{-1}(\omega = 0)\) is diagonal at low frequency. @@ -1114,24 +1083,24 @@ Then a diagonal controller \(\bm{K}_0\) is designed.
-The control architecture is shown in Figure 18. +The control architecture is shown in Figure 15.
-
Figure 18: Static Decoupling of the Plant
+Figure 15: Static Decoupling of the Plant
The plant is pre-multiplied by \(\bm{G}^{-1}(\omega = 0)\). -The diagonal elements of the shaped plant are shown in Figure 19. +The diagonal and off-diagonal elements of the shaped plant are shown in Figure 16.
+
- - -We have that: @@ -1188,7 +1150,7 @@ We have that \(\bm{K}_0(s)\) commutes with \(\bm{G}^{-1}(\omega = 0)\) and thus
-The position error \(\bm{\epsilon}_\mathcal{X}\) for both centralized architecture are shown in Figure 22. +The position error \(\bm{\epsilon}_\mathcal{X}\) for both centralized architecture are shown in Figure 18.
-Based on Figure 22, we can see that: +Based on Figure 18, we can see that:
Both control architecture gives similar results even tough the control in the Leg’s frame gives slightly better results. @@ -1306,11 +1268,11 @@ Thus, this method should be quite robust against parameter variation (e.g. the p
% Stewart Platform @@ -1384,8 +1346,8 @@ references = initializeReferences(stewart);3.3 First Control Loop - \(\bm{K}_\mathcal{L}\)
--3.3.1 Identification
++-3.3.1 Identification
Let’s identify the transfer function from \(\bm{\tau}\) to \(\bm{L}\). @@ -1408,31 +1370,24 @@ Gl.OutputName = {'L1',
-3.3.2 Obtained Plant
++3.3.2 Obtained Plant
--The diagonal elements of the plant are shown in Figure 24 while the off diagonal terms are shown in Figure 25. +The obtained plant is shown in Figure 20.
--+
- - --3.3.3 Controller Design
++3.3.3 Controller Design
@@ -1464,8 +1419,8 @@ The obtain loop gain is shown in Figure 26.We apply a decentralized (diagonal) direct velocity feedback. @@ -1442,7 +1397,7 @@ The gain of the controller is chosen such that the resonances are critically dam
-The obtain loop gain is shown in Figure 26. +The obtain loop gain is shown in Figure 21.
3.4 Second Control Loop - \(\bm{K}_\mathcal{X}\)
--3.4.1 Identification
++@@ -1767,7 +1722,7 @@ Erz = atan2(-T(1, 2)/3.4.1 Identification
-Kx = tf(zeros(6)); @@ -1492,8 +1447,8 @@ G.OutputName = {'Dx', '--3.4.2 Obtained Plant
+-3.4.3 Controller Design
++-3.4.3 Controller Design
The controller consists of: @@ -1545,7 +1500,7 @@ Kx = Kx.*diag(1./dia
-
Figure 28: Obtained Loop Gain for the controller \(\bm{K}_\mathcal{X}\) (png, pdf)
+Figure 23: Obtained Loop Gain for the controller \(\bm{K}_\mathcal{X}\) (png, pdf)
@@ -1590,20 +1545,20 @@ save('./mat/control_tracking.mat', 29. +The obtained position error is shown in Figure 24.
-@@ -1615,7 +1570,7 @@ The obtained position error is shown in Figure 29.3.6 Conclusion
++3.6 Conclusion
-Let’s load the simulation results and compare them in Figure 30. +Let’s load the simulation results and compare them in Figure 25.
load('./mat/control_tracking.mat', 'simout_D', 'simout_L', 'simout_X', 'simout_H'); @@ -1626,7 +1581,7 @@ Let’s load the simulation results and compare them in Figure-
Figure 30: Comparison of the position errors for all the Control architecture used (png, pdf)
+Figure 25: Comparison of the position errors for all the Control architecture used (png, pdf)
diff --git a/docs/figs/control_measure_rotating_2dof.pdf b/docs/figs/decentralized_reference_tracking_L.pdf similarity index 100% rename from docs/figs/control_measure_rotating_2dof.pdf rename to docs/figs/decentralized_reference_tracking_L.pdf diff --git a/docs/figs/control_measure_rotating_2dof.png b/docs/figs/decentralized_reference_tracking_L.png similarity index 100% rename from docs/figs/control_measure_rotating_2dof.png rename to docs/figs/decentralized_reference_tracking_L.png diff --git a/docs/figs/hybrid_control_Kl_plant.pdf b/docs/figs/hybrid_control_Kl_plant.pdf new file mode 100644 index 0000000..07087c4 Binary files /dev/null and b/docs/figs/hybrid_control_Kl_plant.pdf differ diff --git a/docs/figs/hybrid_control_Kl_plant.png b/docs/figs/hybrid_control_Kl_plant.png new file mode 100644 index 0000000..42d92cb Binary files /dev/null and b/docs/figs/hybrid_control_Kl_plant.png differ diff --git a/docs/figs/hybrid_control_Kl_plant_diagonal.pdf b/docs/figs/hybrid_control_Kl_plant_diagonal.pdf deleted file mode 100644 index 47b4383..0000000 Binary files a/docs/figs/hybrid_control_Kl_plant_diagonal.pdf and /dev/null differ diff --git a/docs/figs/hybrid_control_Kl_plant_diagonal.png b/docs/figs/hybrid_control_Kl_plant_diagonal.png deleted file mode 100644 index 00f06c1..0000000 Binary files a/docs/figs/hybrid_control_Kl_plant_diagonal.png and /dev/null differ diff --git a/docs/figs/hybrid_control_Kl_plant_off_diagonal.pdf b/docs/figs/hybrid_control_Kl_plant_off_diagonal.pdf deleted file mode 100644 index 31b43e7..0000000 Binary files a/docs/figs/hybrid_control_Kl_plant_off_diagonal.pdf and /dev/null differ diff --git a/docs/figs/hybrid_control_Kl_plant_off_diagonal.png b/docs/figs/hybrid_control_Kl_plant_off_diagonal.png deleted file mode 100644 index b64d71d..0000000 Binary files a/docs/figs/hybrid_control_Kl_plant_off_diagonal.png and /dev/null differ diff --git a/docs/figs/plant_centralized_L.pdf b/docs/figs/plant_centralized_L.pdf new file mode 100644 index 0000000..b211318 Binary files /dev/null and b/docs/figs/plant_centralized_L.pdf differ diff --git a/docs/figs/plant_centralized_L.png b/docs/figs/plant_centralized_L.png new file mode 100644 index 0000000..42d92cb Binary files /dev/null and b/docs/figs/plant_centralized_L.png differ diff --git a/docs/figs/plant_centralized_SD.pdf b/docs/figs/plant_centralized_SD.pdf new file mode 100644 index 0000000..f44b482 Binary files /dev/null and b/docs/figs/plant_centralized_SD.pdf differ diff --git a/docs/figs/plant_centralized_SD.png b/docs/figs/plant_centralized_SD.png new file mode 100644 index 0000000..da18232 Binary files /dev/null and b/docs/figs/plant_centralized_SD.png differ diff --git a/docs/figs/plant_centralized_X.pdf b/docs/figs/plant_centralized_X.pdf new file mode 100644 index 0000000..885ffb6 Binary files /dev/null and b/docs/figs/plant_centralized_X.pdf differ diff --git a/docs/figs/plant_centralized_X.png b/docs/figs/plant_centralized_X.png new file mode 100644 index 0000000..81511d1 Binary files /dev/null and b/docs/figs/plant_centralized_X.png differ diff --git a/docs/figs/plant_centralized_diagonal_L.pdf b/docs/figs/plant_centralized_diagonal_L.pdf deleted file mode 100644 index a529e8c..0000000 Binary files a/docs/figs/plant_centralized_diagonal_L.pdf and /dev/null differ diff --git a/docs/figs/plant_centralized_diagonal_L.png b/docs/figs/plant_centralized_diagonal_L.png deleted file mode 100644 index 0aea6f9..0000000 Binary files a/docs/figs/plant_centralized_diagonal_L.png and /dev/null differ diff --git a/docs/figs/plant_centralized_diagonal_SD.pdf b/docs/figs/plant_centralized_diagonal_SD.pdf deleted file mode 100644 index 8b84d8c..0000000 Binary files a/docs/figs/plant_centralized_diagonal_SD.pdf and /dev/null differ diff --git a/docs/figs/plant_centralized_diagonal_SD.png b/docs/figs/plant_centralized_diagonal_SD.png deleted file mode 100644 index fc0246a..0000000 Binary files a/docs/figs/plant_centralized_diagonal_SD.png and /dev/null differ diff --git a/docs/figs/plant_centralized_diagonal_X.pdf b/docs/figs/plant_centralized_diagonal_X.pdf deleted file mode 100644 index befadc2..0000000 Binary files a/docs/figs/plant_centralized_diagonal_X.pdf and /dev/null differ diff --git a/docs/figs/plant_centralized_diagonal_X.png b/docs/figs/plant_centralized_diagonal_X.png deleted file mode 100644 index eacb85f..0000000 Binary files a/docs/figs/plant_centralized_diagonal_X.png and /dev/null differ diff --git a/docs/figs/plant_centralized_off_diagonal_L.pdf b/docs/figs/plant_centralized_off_diagonal_L.pdf deleted file mode 100644 index e9d4ac4..0000000 Binary files a/docs/figs/plant_centralized_off_diagonal_L.pdf and /dev/null differ diff --git a/docs/figs/plant_centralized_off_diagonal_L.png b/docs/figs/plant_centralized_off_diagonal_L.png deleted file mode 100644 index 961dd6c..0000000 Binary files a/docs/figs/plant_centralized_off_diagonal_L.png and /dev/null differ diff --git a/docs/figs/plant_centralized_off_diagonal_SD.pdf b/docs/figs/plant_centralized_off_diagonal_SD.pdf deleted file mode 100644 index 31fa572..0000000 Binary files a/docs/figs/plant_centralized_off_diagonal_SD.pdf and /dev/null differ diff --git a/docs/figs/plant_centralized_off_diagonal_SD.png b/docs/figs/plant_centralized_off_diagonal_SD.png deleted file mode 100644 index 7d7a373..0000000 Binary files a/docs/figs/plant_centralized_off_diagonal_SD.png and /dev/null differ diff --git a/docs/figs/plant_centralized_off_diagonal_X.pdf b/docs/figs/plant_centralized_off_diagonal_X.pdf deleted file mode 100644 index 541c3ba..0000000 Binary files a/docs/figs/plant_centralized_off_diagonal_X.pdf and /dev/null differ diff --git a/docs/figs/plant_centralized_off_diagonal_X.png b/docs/figs/plant_centralized_off_diagonal_X.png deleted file mode 100644 index 2348772..0000000 Binary files a/docs/figs/plant_centralized_off_diagonal_X.png and /dev/null differ diff --git a/docs/figs/plant_decentralized_L.pdf b/docs/figs/plant_decentralized_L.pdf new file mode 100644 index 0000000..6f569f8 Binary files /dev/null and b/docs/figs/plant_decentralized_L.pdf differ diff --git a/docs/figs/plant_decentralized_L.png b/docs/figs/plant_decentralized_L.png new file mode 100644 index 0000000..9a15079 Binary files /dev/null and b/docs/figs/plant_decentralized_L.png differ diff --git a/docs/figs/plant_decentralized_diagonal.pdf b/docs/figs/plant_decentralized_diagonal.pdf deleted file mode 100644 index ada4965..0000000 Binary files a/docs/figs/plant_decentralized_diagonal.pdf and /dev/null differ diff --git a/docs/figs/plant_decentralized_diagonal.png b/docs/figs/plant_decentralized_diagonal.png deleted file mode 100644 index 00f06c1..0000000 Binary files a/docs/figs/plant_decentralized_diagonal.png and /dev/null differ diff --git a/docs/figs/plant_decentralized_off_diagonal.pdf b/docs/figs/plant_decentralized_off_diagonal.pdf deleted file mode 100644 index eb06ab9..0000000 Binary files a/docs/figs/plant_decentralized_off_diagonal.pdf and /dev/null differ diff --git a/docs/figs/plant_decentralized_off_diagonal.png b/docs/figs/plant_decentralized_off_diagonal.png deleted file mode 100644 index b64d71d..0000000 Binary files a/docs/figs/plant_decentralized_off_diagonal.png and /dev/null differ diff --git a/org/control-tracking.org b/org/control-tracking.org index 9c5daee..ccb2c6c 100644 --- a/org/control-tracking.org +++ b/org/control-tracking.org @@ -70,13 +70,13 @@ The control configuration are compare in section [[sec:comparison]]. #+end_src ** Control Schematic -The control architecture is shown in Figure [[fig:control_measure_rotating_2dof]]. +The control architecture is shown in Figure [[fig:decentralized_reference_tracking_L]]. The required leg length $\bm{r}_\mathcal{L}$ is computed from the reference path $\bm{r}_\mathcal{X}$ using the inverse kinematics. Then, a diagonal (decentralized) controller $\bm{K}_\mathcal{L}$ is used such that each leg lengths stays close to its required length. -#+begin_src latex :file control_measure_rotating_2dof.pdf +#+begin_src latex :file decentralized_reference_tracking_L.pdf \begin{tikzpicture} % Blocs \node[block, align=center] (J) at (0, 0) {Inverse\\Kinematics}; @@ -93,10 +93,10 @@ Then, a diagonal (decentralized) controller $\bm{K}_\mathcal{L}$ is used such th \end{tikzpicture} #+end_src -#+name: fig:control_measure_rotating_2dof +#+name: fig:decentralized_reference_tracking_L #+caption: Decentralized control for reference tracking #+RESULTS: -[[file:figs/control_measure_rotating_2dof.png]] +[[file:figs/decentralized_reference_tracking_L.png]] ** Initialize the Stewart platform #+begin_src matlab :noweb yes @@ -121,49 +121,9 @@ Let's identify the transfer function from $\bm{\tau}$ to $\bm{\mathcal{L}}$. #+end_src ** Plant Analysis -The diagonal terms of the plant is shown in Figure [[fig:plant_decentralized_diagonal]]. +The diagonal and off-diagonal terms of the plant are shown in Figure [[fig:plant_decentralized_L]]. All the diagonal terms are equal. - -#+begin_src matlab :exports none - freqs = logspace(1, 4, 1000); - - figure; - - ax1 = subplot(2, 1, 1); - hold on; - for i = 1:6 - plot(freqs, abs(squeeze(freqresp(G(i, i), freqs, 'Hz')))); - end - hold off; - set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); - ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); - - ax2 = subplot(2, 1, 2); - hold on; - for i = 1:6 - plot(freqs, 180/pi*angle(squeeze(freqresp(G(i, i), freqs, 'Hz')))); - end - hold off; - set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); - ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); - ylim([-180, 180]); - yticks([-180, -90, 0, 90, 180]); - - linkaxes([ax1,ax2],'x'); -#+end_src - -#+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_decentralized_diagonal.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") -< -Created: 2020-03-13 ven. 13:23
+Created: 2020-03-16 lun. 11:22
> -#+end_src - -#+name: fig:plant_decentralized_diagonal -#+caption: Diagonal Elements of the Plant ([[./figs/plant_decentralized_diagonal.png][png]], [[./figs/plant_decentralized_diagonal.pdf][pdf]]) -[[file:figs/plant_decentralized_diagonal.png]] - -The off-diagonal terms are shown in Figure [[fig:plant_decentralized_off_diagonal]]. - We see that the plant is decoupled at low frequency which indicate that decentralized control may be a good idea. #+begin_src matlab :exports none @@ -171,7 +131,29 @@ We see that the plant is decoupled at low frequency which indicate that decentra figure; - ax1 = subplot(2, 1, 1); + ax1 = subplot(2, 2, 1); + hold on; + for i = 1:6 + plot(freqs, abs(squeeze(freqresp(G(i, i), freqs, 'Hz')))); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Diagonal elements of the Plant'); + + ax2 = subplot(2, 2, 3); + hold on; + for i = 1:6 + plot(freqs, 180/pi*angle(squeeze(freqresp(G(i, i), freqs, 'Hz'))), 'DisplayName', sprintf('$d\\mathcal{L}_%i/\\tau_%i$', i, i)); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); + ylim([-180, 180]); + yticks([-180, -90, 0, 90, 180]); + legend('location', 'northwest'); + + ax3 = subplot(2, 2, 2); hold on; for i = 1:5 for j = i+1:6 @@ -183,8 +165,9 @@ We see that the plant is decoupled at low frequency which indicate that decentra hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Off-Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax4 = subplot(2, 2, 4); hold on; for i = 1:5 for j = i+1:6 @@ -199,17 +182,17 @@ We see that the plant is decoupled at low frequency which indicate that decentra ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - linkaxes([ax1,ax2],'x'); + linkaxes([ax1,ax2,ax3,ax4],'x'); #+end_src #+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_decentralized_off_diagonal.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") +#+begin_src matlab :var filepath="figs/plant_decentralized_L.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") < > #+end_src -#+name: fig:plant_decentralized_off_diagonal -#+caption: Diagonal Elements of the Plant ([[./figs/plant_decentralized_off_diagonal.png][png]], [[./figs/plant_decentralized_off_diagonal.pdf][pdf]]) -[[file:figs/plant_decentralized_off_diagonal.png]] +#+name: fig:plant_decentralized_L +#+caption: Obtain Diagonal and off diagonal dynamics ([[./figs/plant_decentralized_L.png][png]], [[./figs/plant_decentralized_L.pdf][pdf]]) +[[file:figs/plant_decentralized_L.png]] ** Controller Design The controller consists of: @@ -558,12 +541,16 @@ We now multiply the plant by the Jacobian matrix as shown in Figure [[fig:centra Gl.OutputName = {'D1', 'D2', 'D3', 'D4', 'D5', 'D6'}; #+end_src +The bode plot of the plant is shown in Figure [[fig:plant_centralized_L]]. +We can see that the diagonal elements are identical. +This will simplify the design of the controller as all the elements of the diagonal controller can be made identical. + #+begin_src matlab :exports none freqs = logspace(1, 4, 1000); figure; - ax1 = subplot(2, 1, 1); + ax1 = subplot(2, 2, 1); hold on; for i = 1:6 plot(freqs, abs(squeeze(freqresp(Gl(i, i), freqs, 'Hz')))); @@ -571,42 +558,21 @@ We now multiply the plant by the Jacobian matrix as shown in Figure [[fig:centra hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax2 = subplot(2, 2, 3); hold on; for i = 1:6 - plot(freqs, 180/pi*angle(squeeze(freqresp(Gl(i, i), freqs, 'Hz'))), 'DisplayName', ['$d\mathcal{L}_' num2str(i) '/\tau_' num2str(i) '$']); + plot(freqs, 180/pi*angle(squeeze(freqresp(Gl(i, i), freqs, 'Hz'))), 'DisplayName', sprintf('$\\epsilon_{\\mathcal{L}_%i}/\\tau_%i$', i, i)); end hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - legend(); + legend('location', 'northwest'); - linkaxes([ax1,ax2],'x'); -#+end_src - -#+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_centralized_diagonal_L.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") -< > -#+end_src - -#+name: fig:plant_centralized_diagonal_L -#+caption: Diagonal Elements of the plant $\bm{J} \bm{G}$ ([[./figs/plant_centralized_diagonal_L.png][png]], [[./figs/plant_centralized_diagonal_L.pdf][pdf]]) -[[file:figs/plant_centralized_diagonal_L.png]] - -All the diagonal elements are identical. -This will simplify the design of the controller as all the elements of the diagonal controller can be made identical. - -The off-diagonal terms of the controller are shown in Figure [[fig:plant_centralized_off_diagonal_L]]. - -#+begin_src matlab :exports none - freqs = logspace(1, 4, 1000); - - figure; - - ax1 = subplot(2, 1, 1); + ax3 = subplot(2, 2, 2); hold on; for i = 1:5 for j = i+1:6 @@ -618,8 +584,9 @@ The off-diagonal terms of the controller are shown in Figure [[fig:plant_central hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Off-Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax4 = subplot(2, 2, 4); hold on; for i = 1:5 for j = i+1:6 @@ -634,17 +601,17 @@ The off-diagonal terms of the controller are shown in Figure [[fig:plant_central ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - linkaxes([ax1,ax2],'x'); + linkaxes([ax1,ax2,ax3,ax4],'x'); #+end_src #+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_centralized_off_diagonal_L.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") +#+begin_src matlab :var filepath="figs/plant_centralized_L.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") < > #+end_src -#+name: fig:plant_centralized_off_diagonal_L -#+caption: Off Diagonal Elements of the plant $\bm{J} \bm{G}$ ([[./figs/plant_centralized_off_diagonal_L.png][png]], [[./figs/plant_centralized_off_diagonal_L.pdf][pdf]]) -[[file:figs/plant_centralized_off_diagonal_L.png]] +#+name: fig:plant_centralized_L +#+caption: Diagonal and off-diagonal elements of the plant $\bm{K}\bm{G}$ ([[./figs/plant_centralized_L.png][png]], [[./figs/plant_centralized_L.pdf][pdf]]) +[[file:figs/plant_centralized_L.png]] We can see that this *totally decouples the system at low frequency*. @@ -774,7 +741,7 @@ We now multiply the plant by the Jacobian matrix as shown in Figure [[fig:centra figure; - ax1 = subplot(2, 1, 1); + ax1 = subplot(2, 2, 1); hold on; for i = 1:6 plot(freqs, abs(squeeze(freqresp(Gx(i, i), freqs, 'Hz')))); @@ -782,8 +749,9 @@ We now multiply the plant by the Jacobian matrix as shown in Figure [[fig:centra hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax2 = subplot(2, 2, 3); hold on; for i = 1:6 plot(freqs, 180/pi*angle(squeeze(freqresp(Gx(i, i), freqs, 'Hz'))), 'DisplayName', labels{i}); @@ -793,30 +761,9 @@ We now multiply the plant by the Jacobian matrix as shown in Figure [[fig:centra ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - legend(); + legend('location', 'northwest'); - linkaxes([ax1,ax2],'x'); -#+end_src - -#+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_centralized_diagonal_X.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") -< > -#+end_src - -#+name: fig:plant_centralized_diagonal_X -#+caption: Diagonal Elements of the plant $\bm{G} \bm{J}^{-T}$ ([[./figs/plant_centralized_diagonal_X.png][png]], [[./figs/plant_centralized_diagonal_X.pdf][pdf]]) -[[file:figs/plant_centralized_diagonal_X.png]] - -The diagonal terms are not the same. -The resonances of the system are "decoupled". -For instance, the vertical resonance of the system is only present on the diagonal term corresponding to $D_z/\mathcal{F}_z$. - -#+begin_src matlab :exports none - freqs = logspace(1, 4, 1000); - - figure; - - ax1 = subplot(2, 1, 1); + ax3 = subplot(2, 2, 2); hold on; for i = 1:5 for j = i+1:6 @@ -828,8 +775,9 @@ For instance, the vertical resonance of the system is only present on the diagon hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Off-Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax4 = subplot(2, 2, 4); hold on; for i = 1:5 for j = i+1:6 @@ -844,17 +792,21 @@ For instance, the vertical resonance of the system is only present on the diagon ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - linkaxes([ax1,ax2],'x'); + linkaxes([ax1,ax2,ax3,ax4],'x'); #+end_src #+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_centralized_off_diagonal_X.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") +#+begin_src matlab :var filepath="figs/plant_centralized_X.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") < > #+end_src -#+name: fig:plant_centralized_off_diagonal_X -#+caption: Off Diagonal Elements of the plant $\bm{G} \bm{J}^{-T}$ ([[./figs/plant_centralized_off_diagonal_X.png][png]], [[./figs/plant_centralized_off_diagonal_X.pdf][pdf]]) -[[file:figs/plant_centralized_off_diagonal_X.png]] +#+name: fig:plant_centralized_X +#+caption: Diagonal and off-diagonal elements of the plant $\bm{G} \bm{J}^{-T}$ ([[./figs/plant_centralized_X.png][png]], [[./figs/plant_centralized_X.pdf][pdf]]) +[[file:figs/plant_centralized_X.png]] + +The diagonal terms are not the same. +The resonances of the system are "decoupled". +For instance, the vertical resonance of the system is only present on the diagonal term corresponding to $D_z/\mathcal{F}_z$. Here the system is almost decoupled at all frequencies except for the transfer functions $\frac{R_y}{\mathcal{F}_x}$ and $\frac{R_x}{\mathcal{F}_y}$. @@ -985,7 +937,7 @@ The control architecture is shown in Figure [[fig:centralized_reference_tracking *** Plant Analysis The plant is pre-multiplied by $\bm{G}^{-1}(\omega = 0)$. -The diagonal elements of the shaped plant are shown in Figure [[fig:plant_centralized_diagonal_SD]]. +The diagonal and off-diagonal elements of the shaped plant are shown in Figure [[fig:plant_centralized_SD]]. #+begin_src matlab G0 = G*inv(freqresp(G, 0)); @@ -996,7 +948,7 @@ The diagonal elements of the shaped plant are shown in Figure [[fig:plant_centra figure; - ax1 = subplot(2, 1, 1); + ax1 = subplot(2, 2, 1); hold on; for i = 1:6 plot(freqs, abs(squeeze(freqresp(G0(i, i), freqs, 'Hz')))); @@ -1004,37 +956,21 @@ The diagonal elements of the shaped plant are shown in Figure [[fig:plant_centra hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax2 = subplot(2, 2, 3); hold on; for i = 1:6 - plot(freqs, 180/pi*angle(squeeze(freqresp(G0(i, i), freqs, 'Hz'))), 'DisplayName', ['$G_0(' num2str(i) ',' num2str(i) ')$']); + plot(freqs, 180/pi*angle(squeeze(freqresp(G0(i, i), freqs, 'Hz'))), 'DisplayName', sprintf('$G_0(%i,%i)$', i, i)); end hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - legend(); + legend('location', 'northwest'); - linkaxes([ax1,ax2],'x'); -#+end_src - -#+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_centralized_diagonal_SD.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") -< > -#+end_src - -#+name: fig:plant_centralized_diagonal_SD -#+caption: Diagonal Elements of the plant $\bm{G} \bm{G}^{-1}(\omega = 0)$ ([[./figs/plant_centralized_diagonal_SD.png][png]], [[./figs/plant_centralized_diagonal_SD.pdf][pdf]]) -[[file:figs/plant_centralized_diagonal_SD.png]] - -#+begin_src matlab :exports none - freqs = logspace(1, 4, 1000); - - figure; - - ax1 = subplot(2, 1, 1); + ax3 = subplot(2, 2, 2); hold on; for i = 1:5 for j = i+1:6 @@ -1046,8 +982,9 @@ The diagonal elements of the shaped plant are shown in Figure [[fig:plant_centra hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Off-Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax4 = subplot(2, 2, 4); hold on; for i = 1:5 for j = i+1:6 @@ -1062,17 +999,17 @@ The diagonal elements of the shaped plant are shown in Figure [[fig:plant_centra ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - linkaxes([ax1,ax2],'x'); + linkaxes([ax1,ax2,ax3,ax4],'x'); #+end_src #+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/plant_centralized_off_diagonal_SD.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") +#+begin_src matlab :var filepath="figs/plant_centralized_SD.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") < > #+end_src -#+name: fig:plant_centralized_off_diagonal_SD -#+caption: Off Diagonal Elements of the plant $\bm{G} \bm{J}^{-T}$ ([[./figs/plant_centralized_off_diagonal_SD.png][png]], [[./figs/plant_centralized_off_diagonal_SD.pdf][pdf]]) -[[file:figs/plant_centralized_off_diagonal_SD.png]] +#+name: fig:plant_centralized_SD +#+caption: Diagonal and off-diagonal elements of the plant $\bm{G} \bm{G}^{-1}(\omega = 0)$ ([[./figs/plant_centralized_SD.png][png]], [[./figs/plant_centralized_SD.pdf][pdf]]) +[[file:figs/plant_centralized_SD.png]] *** Controller Design We have that: @@ -1296,14 +1233,14 @@ Let's identify the transfer function from $\bm{\tau}$ to $\bm{L}$. #+end_src *** Obtained Plant -The diagonal elements of the plant are shown in Figure [[fig:hybrid_control_Kl_plant_diagonal]] while the off diagonal terms are shown in Figure [[fig:hybrid_control_Kl_plant_off_diagonal]]. +The obtained plant is shown in Figure [[fig:hybrid_control_Kl_plant]]. #+begin_src matlab :exports none freqs = logspace(1, 4, 1000); figure; - ax1 = subplot(2, 1, 1); + ax1 = subplot(2, 2, 1); hold on; for i = 1:6 plot(freqs, abs(squeeze(freqresp(Gl(i, i), freqs, 'Hz')))); @@ -1311,36 +1248,21 @@ The diagonal elements of the plant are shown in Figure [[fig:hybrid_control_Kl_p hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax2 = subplot(2, 2, 3); hold on; for i = 1:6 - plot(freqs, 180/pi*angle(squeeze(freqresp(Gl(i, i), freqs, 'Hz')))); + plot(freqs, 180/pi*angle(squeeze(freqresp(Gl(i, i), freqs, 'Hz'))), 'DisplayName', sprintf('$\\epsilon_{\\mathcal{L}_%i}/\\tau_%i$', i, i)); end hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); + legend('location', 'northwest'); - linkaxes([ax1,ax2],'x'); -#+end_src - -#+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/hybrid_control_Kl_plant_diagonal.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") -< > -#+end_src - -#+name: fig:hybrid_control_Kl_plant_diagonal -#+caption: Diagonal elements of the plant for the design of $\bm{K}_\mathcal{L}$ ([[./figs/hybrid_control_Kl_plant_diagonal.png][png]], [[./figs/hybrid_control_Kl_plant_diagonal.pdf][pdf]]) -[[file:figs/hybrid_control_Kl_plant_diagonal.png]] - -#+begin_src matlab :exports none - freqs = logspace(1, 4, 1000); - - figure; - - ax1 = subplot(2, 1, 1); + ax3 = subplot(2, 2, 2); hold on; for i = 1:5 for j = i+1:6 @@ -1352,8 +1274,9 @@ The diagonal elements of the plant are shown in Figure [[fig:hybrid_control_Kl_p hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('Off-Diagonal elements of the Plant'); - ax2 = subplot(2, 1, 2); + ax4 = subplot(2, 2, 4); hold on; for i = 1:5 for j = i+1:6 @@ -1368,17 +1291,17 @@ The diagonal elements of the plant are shown in Figure [[fig:hybrid_control_Kl_p ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); - linkaxes([ax1,ax2],'x'); + linkaxes([ax1,ax2,ax3,ax4],'x'); #+end_src #+header: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/hybrid_control_Kl_plant_off_diagonal.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") +#+begin_src matlab :var filepath="figs/hybrid_control_Kl_plant.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") < > #+end_src -#+name: fig:hybrid_control_Kl_plant_off_diagonal -#+caption: Off-diagonal elements of the plant for the design of $\bm{K}_\mathcal{L}$ ([[./figs/hybrid_control_Kl_plant_off_diagonal.png][png]], [[./figs/hybrid_control_Kl_plant_off_diagonal.pdf][pdf]]) -[[file:figs/hybrid_control_Kl_plant_off_diagonal.png]] +#+name: fig:hybrid_control_Kl_plant +#+caption: Diagonal and off-diagonal elements of the plant for the design of $\bm{K}_\mathcal{L}$ ([[./figs/hybrid_control_Kl_plant.png][png]], [[./figs/hybrid_control_Kl_plant.pdf][pdf]]) +[[file:figs/hybrid_control_Kl_plant.png]] *** Controller Design We apply a decentralized (diagonal) direct velocity feedback.