diff --git a/active_damping/index.html b/active_damping/index.html index 71b9f98..6611a2f 100644 --- a/active_damping/index.html +++ b/active_damping/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Active Damping @@ -280,78 +280,82 @@ for the JavaScript code in this tag.

Table of Contents

-First, in section 1, we will looked at the undamped system. +First, in section 1, we will looked at the undamped system.

Then, we will compare three active damping techniques:

@@ -371,19 +375,26 @@ The disturbances are:

  • Motion errors of all the stages
  • -
    -

    1 Undamped System

    +
    +

    1 Undamped System

    - +

    +
    +

    +All the files (data and Matlab scripts) are accessible here. +

    + +

    We first look at the undamped system. The performance of this undamped system will be compared with the damped system using various techniques.

    -
    -

    1.1 Init

    + +
    +

    1.1 Init

    We initialize all the stages with the default parameters. @@ -391,7 +402,8 @@ The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.

    -
    initializeGround();
    +
    initializeInputs();
    +initializeGround();
     initializeGranite();
     initializeTy();
     initializeRy();
    @@ -421,8 +433,8 @@ save(
    -

    1.2 Identification

    +
    +

    1.2 Identification

    We identify the various transfer functions of the system @@ -431,79 +443,91 @@ We identify the various transfer functions of the system

    G = identifyPlant();
     
    -
    -
    -
    -

    1.3 Sensitivity to disturbances

    -

    -The sensitivity to disturbances are shown on figure 1. +And we save it for further analysis.

    - - -
    -

    sensitivity_dist_undamped.png -

    -

    Figure 1: Undamped sensitivity to disturbances (png, pdf)

    -
    -
    -
    - -
    -

    1.4 Undamped Plant

    -
    -

    -The "plant" (transfer function from forces applied by the nano-hexapod to the measured displacement of the sample with respect to the granite) bode plot is shown on figure 1. -

    - - -
    -

    plant_undamped.png -

    -

    Figure 2: Transfer Function from cartesian forces to displacement for the undamped plant (png, pdf)

    -
    -
    -
    - -
    -

    1.5 Save

    -
    save('./active_damping/mat/plants.mat', 'G', '-append');
     
    + +
    +

    1.3 Sensitivity to disturbances

    +
    +

    +The sensitivity to disturbances are shown on figure 1. +

    + + +
    +

    sensitivity_dist_undamped.png +

    +

    Figure 1: Undamped sensitivity to disturbances (png, pdf)

    -
    -

    2 Integral Force Feedback

    + +
    +

    sensitivity_dist_stages.png +

    +

    Figure 2: Sensitivity to force disturbances in various stages (png, pdf)

    +
    +
    +
    + +
    +

    1.4 Undamped Plant

    +
    +

    +The "plant" (transfer function from forces applied by the nano-hexapod to the measured displacement of the sample with respect to the granite) bode plot is shown on figure 1. +

    + + +
    +

    plant_undamped.png +

    +

    Figure 3: Transfer Function from cartesian forces to displacement for the undamped plant (png, pdf)

    +
    +
    +
    +
    + +
    +

    2 Integral Force Feedback

    - +

    +
    +

    +All the files (data and Matlab scripts) are accessible here. +

    + +

    Integral Force Feedback is applied. -In section 2.1, IFF is applied on a uni-axial system to understand its behavior. +In section 2.1, IFF is applied on a uni-axial system to understand its behavior. Then, it is applied on the simscape model.

    -
    -

    2.1 One degree-of-freedom example

    + +
    +

    2.1 One degree-of-freedom example

    - +

    -
    -

    2.1.1 Equations

    +
    +

    2.1.1 Equations

    -
    +

    iff_1dof.png

    -

    Figure 3: Integral Force Feedback applied to a 1dof system

    +

    Figure 4: Integral Force Feedback applied to a 1dof system

    @@ -563,8 +587,8 @@ This is attainable if we have:

    -
    -

    2.1.2 Matlab Example

    +
    +

    2.1.2 Matlab Example

    Let define the system parameters. @@ -618,17 +642,17 @@ And the closed loop system is computed below.

    -
    +

    iff_1dof_sensitivitiy.png

    -

    Figure 4: Sensitivity to disturbance when IFF is applied on the 1dof system (png, pdf)

    +

    Figure 5: Sensitivity to disturbance when IFF is applied on the 1dof system (png, pdf)

    -
    -

    2.2 Control Design

    +
    +

    2.2 Control Design

    Let's load the undamped plant: @@ -639,14 +663,14 @@ Let's load the undamped plant:

    -Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure 5). +Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure 6).

    -
    +

    iff_plant.png

    -

    Figure 5: Transfer function from forces applied in the legs to force sensor (png, pdf)

    +

    Figure 6: Transfer function from forces applied in the legs to force sensor (png, pdf)

    @@ -658,26 +682,27 @@ The controller for each pair of actuator/sensor is:

    -The corresponding loop gains are shown in figure 6. +The corresponding loop gains are shown in figure 7.

    -
    +

    iff_open_loop.png

    -

    Figure 6: Loop Gain for the Integral Force Feedback (png, pdf)

    +

    Figure 7: Loop Gain for the Integral Force Feedback (png, pdf)

    -
    -

    2.3 Sensitivity to disturbances

    +
    +

    2.3 Identification of the damped plant

    Let's initialize the system prior to identification.

    -
    initializeGround();
    +
    initializeInputs();
    +initializeGround();
     initializeGranite();
     initializeTy();
     initializeRy();
    @@ -714,7 +739,20 @@ We identify the system dynamics now that the IFF controller is ON.
     

    -As shown on figure 7: +And we save the damped plant for further analysis +

    +
    +
    save('./active_damping/mat/plants.mat', 'G_iff', '-append');
    +
    +
    +
    +
    + +
    +

    2.4 Sensitivity to disturbances

    +
    +

    +As shown on figure 8:

    • The top platform of the nano-hexapod how behaves as a "free-mass".
    • @@ -724,10 +762,10 @@ However, as the goal is to make the relative displacement \(D\) as small as poss
    -
    +

    sensitivity_dist_iff.png

    -

    Figure 7: Sensitivity to disturbance once the IFF controller is applied to the system (png, pdf)

    +

    Figure 8: Sensitivity to disturbance once the IFF controller is applied to the system (png, pdf)

    @@ -739,56 +777,46 @@ For instance, the plots are not the same when using minreal.
    -
    +

    sensitivity_dist_stages_iff.png

    -

    Figure 8: Sensitivity to force disturbances in various stages when IFF is applied (png, pdf)

    +

    Figure 9: Sensitivity to force disturbances in various stages when IFF is applied (png, pdf)

    -
    -

    2.4 Damped Plant

    -
    +
    +

    2.5 Damped Plant

    +

    Now, look at the new damped plant to control.

    -It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure 9. +It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure 10.

    -
    +

    plant_iff_damped.png

    -

    Figure 9: Damped Plant after IFF is applied (png, pdf)

    +

    Figure 10: Damped Plant after IFF is applied (png, pdf)

    -However, it increases coupling at low frequency (figure 10). +However, it increases coupling at low frequency (figure 11).

    -
    +

    plant_iff_coupling.png

    -

    Figure 10: Coupling induced by IFF (png, pdf)

    +

    Figure 11: Coupling induced by IFF (png, pdf)

    -
    -

    2.5 Save

    -
    -
    -
    save('./active_damping/mat/plants.mat', 'G_iff', '-append');
    -
    -
    -
    -
    - -
    -

    2.6 Conclusion

    +
    +

    2.6 Conclusion

    @@ -805,31 +833,38 @@ Integral Force Feedback:

    -
    -

    3 Relative Motion Control

    +
    +

    3 Relative Motion Control

    - +

    +
    +

    +All the files (data and Matlab scripts) are accessible here. +

    + +

    In the Relative Motion Control (RMC), a derivative feedback is applied between the measured actuator displacement to the actuator force input.

    -
    -

    3.1 One degree-of-freedom example

    + +
    +

    3.1 One degree-of-freedom example

    - +

    -
    -

    3.1.1 Equations

    +
    +

    3.1.1 Equations

    -
    +

    rmc_1dof.png

    -

    Figure 11: Relative Motion Control applied to a 1dof system

    +

    Figure 12: Relative Motion Control applied to a 1dof system

    @@ -882,8 +917,8 @@ This corresponds to a gain:

    -
    -

    3.1.2 Matlab Example

    +
    +

    3.1.2 Matlab Example

    Let define the system parameters. @@ -937,17 +972,17 @@ And the closed loop system is computed below.

    -
    +

    rmc_1dof_sensitivitiy.png

    -

    Figure 12: Sensitivity to disturbance when RMC is applied on the 1dof system (png, pdf)

    +

    Figure 13: Sensitivity to disturbance when RMC is applied on the 1dof system (png, pdf)

    -
    -

    3.2 Control Design

    +
    +

    3.2 Control Design

    Let's load the undamped plant: @@ -958,14 +993,14 @@ Let's load the undamped plant:

    -Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure 13). +Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure 14).

    -
    +

    rmc_plant.png

    -

    Figure 13: Transfer function from forces applied in the legs to leg displacement sensor (png, pdf)

    +

    Figure 14: Transfer function from forces applied in the legs to leg displacement sensor (png, pdf)

    @@ -978,26 +1013,27 @@ A Low pass Filter is added to make the controller transfer function proper.

    -The obtained loop gains are shown in figure 14. +The obtained loop gains are shown in figure 15.

    -
    +

    rmc_open_loop.png

    -

    Figure 14: Loop Gain for the Integral Force Feedback (png, pdf)

    +

    Figure 15: Loop Gain for the Integral Force Feedback (png, pdf)

    -
    -

    3.3 Sensitivity to disturbances

    +
    +

    3.3 Identification of the damped plant

    Let's initialize the system prior to identification.

    -
    initializeGround();
    +
    initializeInputs();
    +initializeGround();
     initializeGranite();
     initializeTy();
     initializeRy();
    @@ -1034,40 +1070,8 @@ We identify the system dynamics now that the RMC controller is ON.
     

    -As shown in figure 15, RMC control succeed in lowering the sensitivity to disturbances near resonance of the system. +And we save the damped plant for further analysis.

    - - -
    -

    sensitivity_dist_rmc.png -

    -

    Figure 15: Sensitivity to disturbance once the RMC controller is applied to the system (png, pdf)

    -
    - - -
    -

    sensitivity_dist_stages_rmc.png -

    -

    Figure 16: Sensitivity to force disturbances in various stages when RMC is applied (png, pdf)

    -
    -
    -
    - -
    -

    3.4 Damped Plant

    -
    - -
    -

    plant_rmc_damped.png -

    -

    Figure 17: Damped Plant after RMC is applied (png, pdf)

    -
    -
    -
    - -
    -

    3.5 Save

    -
    save('./active_damping/mat/plants.mat', 'G_rmc', '-append');
     
    @@ -1075,8 +1079,43 @@ As shown in figure 15, RMC control succeed in lowering
    -
    -

    3.6 Conclusion

    +
    +

    3.4 Sensitivity to disturbances

    +
    +

    +As shown in figure 16, RMC control succeed in lowering the sensitivity to disturbances near resonance of the system. +

    + + +
    +

    sensitivity_dist_rmc.png +

    +

    Figure 16: Sensitivity to disturbance once the RMC controller is applied to the system (png, pdf)

    +
    + + +
    +

    sensitivity_dist_stages_rmc.png +

    +

    Figure 17: Sensitivity to force disturbances in various stages when RMC is applied (png, pdf)

    +
    +
    +
    + +
    +

    3.5 Damped Plant

    +
    + +
    +

    plant_rmc_damped.png +

    +

    Figure 18: Damped Plant after RMC is applied (png, pdf)

    +
    +
    +
    + +
    +

    3.6 Conclusion

    @@ -1091,31 +1130,38 @@ Relative Motion Control:

    -
    -

    4 Direct Velocity Feedback

    +
    +

    4 Direct Velocity Feedback

    - +

    +
    +

    +All the files (data and Matlab scripts) are accessible here. +

    + +

    In the Relative Motion Control (RMC), a feedback is applied between the measured velocity of the platform to the actuator force input.

    -
    -

    4.1 One degree-of-freedom example

    + +
    +

    4.1 One degree-of-freedom example

    - +

    -
    -

    4.1.1 Equations

    +
    +

    4.1.1 Equations

    -
    +

    dvf_1dof.png

    -

    Figure 18: Direct Velocity Feedback applied to a 1dof system

    +

    Figure 19: Direct Velocity Feedback applied to a 1dof system

    @@ -1131,7 +1177,7 @@ In terms of the stage deformation \(d = x - w\): (ms^2 + cs + k) d = -ms^2 w + F_d + F \end{equation}

    -The direct velocity feedback law shown in figure 18 is: +The direct velocity feedback law shown in figure 19 is:

    \begin{equation} K = -g @@ -1168,8 +1214,8 @@ This corresponds to a gain:
    -
    -

    4.1.2 Matlab Example

    +
    +

    4.1.2 Matlab Example

    Let define the system parameters. @@ -1244,20 +1290,20 @@ And the closed loop system is computed below.

    -The obtained sensitivity to disturbances is shown in figure 19. +The obtained sensitivity to disturbances is shown in figure 20.

    -
    +

    dvf_1dof_sensitivitiy.png

    -

    Figure 19: Sensitivity to disturbance when DVF is applied on the 1dof system (png, pdf)

    +

    Figure 20: Sensitivity to disturbance when DVF is applied on the 1dof system (png, pdf)

    -
    -

    4.2 Control Design

    +
    +

    4.2 Control Design

    Let's load the undamped plant: @@ -1268,69 +1314,231 @@ Let's load the undamped plant:

    -Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure 20). -

    - -

    -The plant looks to complicated to be reasonably controlled. +Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure 21).

    -
    +

    dvf_plant.png

    -

    Figure 20: Transfer function from forces applied in the legs to leg velocity sensor (png, pdf)

    -
    -
    +

    Figure 21: Transfer function from forces applied in the legs to leg velocity sensor (png, pdf)

    -
    -

    4.3 Conclusion

    -
    -

    -Direct Velocity Feedback: +The controller is defined below and the obtained loop gain is shown in figure 22.

    -
      -
    • Not usable
    • -
    -
    -
    -
    -
    - -
    -

    5 Comparison

    -
    -

    - -

    -
    - -
    -

    5.1 Comparison

    -
    -
    load('./active_damping/mat/plants.mat', 'G', 'G_iff', 'G_rmc');
    +
    K_dvf = tf(3e4);
    +
    +
    + + +
    +

    dvf_open_loop_gain.png +

    +

    Figure 22: Loop Gain for DVF (png, pdf)

    +
    +
    +
    + +
    +

    4.3 Identification of the damped plant

    +
    +

    +Let's initialize the system prior to identification. +

    +
    +
    initializeInputs();
    +initializeGround();
    +initializeGranite();
    +initializeTy();
    +initializeRy();
    +initializeRz();
    +initializeMicroHexapod();
    +initializeAxisc();
    +initializeMirror();
    +initializeNanoHexapod(struct('actuator', 'piezo'));
    +initializeSample(struct('mass', 50));
    +
    +
    + +

    +And initialize the controllers. +

    +
    +
    K = tf(zeros(6));
    +save('./mat/controllers.mat', 'K', '-append');
    +K_iff = tf(zeros(6));
    +save('./mat/controllers.mat', 'K_iff', '-append');
    +K_rmc = tf(zeros(6));
    +save('./mat/controllers.mat', 'K_rmc', '-append');
    +K_dvf = -K_dvf*eye(6);
    +save('./mat/controllers.mat', 'K_dvf', '-append');
    +
    +
    + +

    +We identify the system dynamics now that the RMC controller is ON. +

    +
    +
    G_dvf = identifyPlant();
    +
    +
    + +

    +And we save the damped plant for further analysis. +

    +
    +
    save('./active_damping/mat/plants.mat', 'G_dvf', '-append');
     
    + +
    +

    4.4 Sensitivity to disturbances

    +
    + +
    +

    sensitivity_dist_dvf.png +

    +

    Figure 23: Sensitivity to disturbance once the DVF controller is applied to the system (png, pdf)

    -
    -

    6 Conclusion

    + + +
    +

    sensitivity_dist_stages_dvf.png +

    +

    Figure 24: Sensitivity to force disturbances in various stages when DVF is applied (png, pdf)

    +
    +
    +
    + +
    +

    4.5 Damped Plant

    +
    + +
    +

    plant_dvf_damped.png +

    +

    Figure 25: Damped Plant after DVF is applied (png, pdf)

    +
    +
    +
    + +
    +

    4.6 Conclusion

    +
    +
    +

    +Direct Velocity Feedback: +

    + +
    +
    +
    +
    + +
    +

    5 Comparison

    +
    +

    + +

    +
    +
    +

    5.1 Load the plants

    +
    +
    +
    load('./active_damping/mat/plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf');
    +
    +
    +
    +
    + +
    +

    5.2 Sensitivity to Disturbance

    +
    + +
    +

    sensitivity_comp_ground_motion_z.png +

    +

    Figure 26: caption (png, pdf)

    +
    + + + +
    +

    sensitivity_comp_direct_forces_z.png +

    +

    Figure 27: caption (png, pdf)

    +
    + + +
    +

    sensitivity_comp_spindle_z.png +

    +

    Figure 28: caption (png, pdf)

    +
    + + +
    +

    sensitivity_comp_ty_z.png +

    +

    Figure 29: caption (png, pdf)

    +
    + + + +
    +

    sensitivity_comp_ty_x.png +

    +

    Figure 30: caption (png, pdf)

    +
    +
    +
    + +
    +

    5.3 Damped Plant

    +
    + +
    +

    plant_comp_damping_z.png +

    +

    Figure 31: Plant for the \(z\) direction for different active damping technique used (png, pdf)

    +
    + + +
    +

    plant_comp_damping_x.png +

    +

    Figure 32: Plant for the \(x\) direction for different active damping technique used (png, pdf)

    +
    + + +
    +

    plant_comp_damping_coupling.png +

    +

    Figure 33: Comparison of one off-diagonal plant for different damping technique applied (png, pdf)

    +
    +
    +
    +
    + +
    +

    6 Conclusion

    - +

    Author: Dehaeze Thomas

    -

    Created: 2019-10-18 ven. 17:33

    +

    Created: 2019-10-25 ven. 16:00

    Validate

    diff --git a/active_damping/index.org b/active_damping/index.org index b868e73..2149264 100644 --- a/active_damping/index.org +++ b/active_damping/index.org @@ -25,7 +25,7 @@ #+PROPERTY: header-args:matlab+ :exports both #+PROPERTY: header-args:matlab+ :eval no-export #+PROPERTY: header-args:matlab+ :output-dir figs -#+PROPERTY: header-args:matlab+ :tangle matlab/modal_frf_coh.m +#+PROPERTY: header-args:matlab+ :tangle no #+PROPERTY: header-args:matlab+ :mkdirp yes #+PROPERTY: header-args:shell :eval no-export @@ -41,79 +41,8 @@ #+PROPERTY: header-args:latex+ :output-dir figs :END: -* Analysis of the nano-hexapod transfer functions :noexport: -** Introduction :ignore: - -** Matlab Init :noexport:ignore: -#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) - <> -#+end_src - -#+begin_src matlab :exports none :results silent :noweb yes - <> -#+end_src - -#+begin_src matlab :tangle no - simulinkproject('../'); -#+end_src - -** Init -#+begin_src matlab - %% Initialize Ground - initializeGround(); - - %% Initialize Granite - initializeGranite(struct('rigid', false)); - - %% Initialize Translation stage - initializeTy(struct('rigid', false)); - - %% Initialize Tilt Stage - initializeRy(struct('rigid', false)); - - %% Initialize Spindle - initializeRz(struct('rigid', false)); - - %% Initialize Hexapod Symétrie - initializeMicroHexapod(struct('rigid', false)); - - %% Initialize Center of gravity compensation - initializeAxisc(); - - %% Initialize the mirror - initializeMirror(); - - %% Initialize the Nano Hexapod - initializeNanoHexapod(struct('actuator', 'piezo')); - - %% Initialize the Sample - initializeSample(struct('mass', 50)); -#+end_src - -#+begin_src matlab - K = tf(zeros(6)); - save('./mat/controllers.mat', 'K', '-append'); - K_iff = tf(zeros(6)); - save('./mat/controllers.mat', 'K_iff', '-append'); -#+end_src - -** Identification -#+begin_src matlab - G = identifyPlant(); -#+end_src - -** Force Sensor -#+begin_src matlab - figure; - hold on; - for i=1:6 - plot(freqs, abs(squeeze(freqresp(G.G_iff(['Fm', num2str(i)], ['F', num2str(i)]), freqs, 'Hz')))); - end - set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); - ylabel('Amplitude [N/N]'); xlabel('Frequency [Hz]'); -#+end_src * Introduction :ignore: -First, in section [[sec:undamped]], we will looked at the undamped system. +First, in section [[sec:undamped_system]], we will looked at the undamped system. Then, we will compare three active damping techniques: - In section [[sec:iff]]: the integral force feedback is used @@ -130,7 +59,26 @@ The disturbances are: - Motion errors of all the stages * Undamped System -<> +:PROPERTIES: +:header-args:matlab+: :tangle matlab/undamped_system.m +:header-args:matlab+: :comments org :mkdirp yes +:END: +<> + +** ZIP file containing the data and matlab files :ignore: +#+begin_src bash :exports none :results none + if [ matlab/undamped_system.m -nt data/undamped_system.zip ]; then + cp matlab/undamped_system.m undamped_system.m; + zip data/undamped_system \ + undamped_system.m + rm undamped_system.m; + fi +#+end_src + +#+begin_note + All the files (data and Matlab scripts) are accessible [[file:data/undamped_system.zip][here]]. +#+end_note + ** Introduction :ignore: We first look at the undamped system. The performance of this undamped system will be compared with the damped system using various techniques. @@ -157,6 +105,7 @@ We initialize all the stages with the default parameters. The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg. #+begin_src matlab + initializeInputs(); initializeGround(); initializeGranite(); initializeTy(); @@ -187,6 +136,11 @@ We identify the various transfer functions of the system G = identifyPlant(); #+end_src +And we save it for further analysis. +#+begin_src matlab + save('./active_damping/mat/plants.mat', 'G', '-append'); +#+end_src + ** Sensitivity to disturbances The sensitivity to disturbances are shown on figure [[fig:sensitivity_dist_undamped]]. @@ -225,6 +179,28 @@ The sensitivity to disturbances are shown on figure [[fig:sensitivity_dist_undam #+CAPTION: Undamped sensitivity to disturbances ([[./figs/sensitivity_dist_undamped.png][png]], [[./figs/sensitivity_dist_undamped.pdf][pdf]]) [[file:figs/sensitivity_dist_undamped.png]] +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{rz, z}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{ty, z}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{ty, x}\right|$'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_dist_stages.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_dist_stages +#+CAPTION: Sensitivity to force disturbances in various stages ([[./figs/sensitivity_dist_stages.png][png]], [[./figs/sensitivity_dist_stages.pdf][pdf]]) +[[file:figs/sensitivity_dist_stages.png]] + ** Undamped Plant The "plant" (transfer function from forces applied by the nano-hexapod to the measured displacement of the sample with respect to the granite) bode plot is shown on figure [[fig:sensitivity_dist_undamped]]. @@ -266,19 +242,37 @@ The "plant" (transfer function from forces applied by the nano-hexapod to the me #+CAPTION: Transfer Function from cartesian forces to displacement for the undamped plant ([[./figs/plant_undamped.png][png]], [[./figs/plant_undamped.pdf][pdf]]) [[file:figs/plant_undamped.png]] -** Save -#+begin_src matlab - save('./active_damping/mat/plants.mat', 'G', '-append'); +* Integral Force Feedback +:PROPERTIES: +:header-args:matlab+: :tangle matlab/iff.m +:header-args:matlab+: :comments org :mkdirp yes +:END: +<> + +** ZIP file containing the data and matlab files :ignore: +#+begin_src bash :exports none :results none + if [ matlab/iff.m -nt data/iff.zip ]; then + cp matlab/iff.m iff.m; + zip data/iff \ + mat/plant.mat \ + iff.m + rm iff.m; + fi #+end_src -* Integral Force Feedback -<> +#+begin_note + All the files (data and Matlab scripts) are accessible [[file:data/iff.zip][here]]. +#+end_note + ** Introduction :ignore: Integral Force Feedback is applied. In section [[sec:iff_1dof]], IFF is applied on a uni-axial system to understand its behavior. Then, it is applied on the simscape model. ** One degree-of-freedom example +:PROPERTIES: +:header-args:matlab+: :tangle no +:END: <> *** Equations #+begin_src latex :file iff_1dof.pdf :post pdf2svg(file=*this*, ext="png") :exports results @@ -560,9 +554,10 @@ The corresponding loop gains are shown in figure [[fig:iff_open_loop]]. #+CAPTION: Loop Gain for the Integral Force Feedback ([[./figs/iff_open_loop.png][png]], [[./figs/iff_open_loop.pdf][pdf]]) [[file:figs/iff_open_loop.png]] -** Sensitivity to disturbances +** Identification of the damped plant Let's initialize the system prior to identification. #+begin_src matlab + initializeInputs(); initializeGround(); initializeGranite(); initializeTy(); @@ -592,6 +587,12 @@ We identify the system dynamics now that the IFF controller is ON. G_iff = identifyPlant(); #+end_src +And we save the damped plant for further analysis +#+begin_src matlab + save('./active_damping/mat/plants.mat', 'G_iff', '-append'); +#+end_src + +** Sensitivity to disturbances As shown on figure [[fig:sensitivity_dist_iff]]: - The top platform of the nano-hexapod how behaves as a "free-mass". - The transfer function from direct forces $F_s$ to the relative displacement $D$ is equivalent to the one of an isolated mass. @@ -664,7 +665,7 @@ As shown on figure [[fig:sensitivity_dist_iff]]: #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/sensitivity_dist_stages_iff.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png") +#+begin_src matlab :var filepath="figs/sensitivity_dist_stages_iff.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src @@ -777,11 +778,6 @@ However, it increases coupling at low frequency (figure [[fig:plant_iff_coupling #+CAPTION: Coupling induced by IFF ([[./figs/plant_iff_coupling.png][png]], [[./figs/plant_iff_coupling.pdf][pdf]]) [[file:figs/plant_iff_coupling.png]] -** Save -#+begin_src matlab - save('./active_damping/mat/plants.mat', 'G_iff', '-append'); -#+end_src - ** Conclusion #+begin_important Integral Force Feedback: @@ -791,11 +787,34 @@ Integral Force Feedback: #+end_important * Relative Motion Control +:PROPERTIES: +:header-args:matlab+: :tangle matlab/rmc.m +:header-args:matlab+: :comments org :mkdirp yes +:END: <> + +** ZIP file containing the data and matlab files :ignore: +#+begin_src bash :exports none :results none + if [ matlab/rmc.m -nt data/rmc.zip ]; then + cp matlab/rmc.m rmc.m; + zip data/rmc \ + mat/plant.mat \ + rmc.m + rm rmc.m; + fi +#+end_src + +#+begin_note + All the files (data and Matlab scripts) are accessible [[file:data/rmc.zip][here]]. +#+end_note + ** Introduction :ignore: In the Relative Motion Control (RMC), a derivative feedback is applied between the measured actuator displacement to the actuator force input. ** One degree-of-freedom example +:PROPERTIES: +:header-args:matlab+: :tangle no +:END: <> *** Equations #+begin_src latex :file rmc_1dof.pdf :post pdf2svg(file=*this*, ext="png") :exports results @@ -1075,9 +1094,10 @@ The obtained loop gains are shown in figure [[fig:rmc_open_loop]]. #+CAPTION: Loop Gain for the Integral Force Feedback ([[./figs/rmc_open_loop.png][png]], [[./figs/rmc_open_loop.pdf][pdf]]) [[file:figs/rmc_open_loop.png]] -** Sensitivity to disturbances +** Identification of the damped plant Let's initialize the system prior to identification. #+begin_src matlab + initializeInputs(); initializeGround(); initializeGranite(); initializeTy(); @@ -1107,6 +1127,12 @@ We identify the system dynamics now that the RMC controller is ON. G_rmc = identifyPlant(); #+end_src +And we save the damped plant for further analysis. +#+begin_src matlab + save('./active_damping/mat/plants.mat', 'G_rmc', '-append'); +#+end_src + +** Sensitivity to disturbances As shown in figure [[fig:sensitivity_dist_rmc]], RMC control succeed in lowering the sensitivity to disturbances near resonance of the system. #+begin_src matlab :exports none @@ -1126,7 +1152,7 @@ As shown in figure [[fig:sensitivity_dist_rmc]], RMC control succeed in lowering plot(freqs, abs(squeeze(freqresp(G_rmc.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]'); - legend('location', 'northeast'); + legend('location', 'southeast'); subplot(2, 1, 2); title('$F_s$ to $D$'); @@ -1170,7 +1196,7 @@ As shown in figure [[fig:sensitivity_dist_rmc]], RMC control succeed in lowering #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/sensitivity_dist_stages_rmc.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png") +#+begin_src matlab :var filepath="figs/sensitivity_dist_stages_rmc.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src @@ -1252,11 +1278,6 @@ As shown in figure [[fig:sensitivity_dist_rmc]], RMC control succeed in lowering #+CAPTION: Damped Plant after RMC is applied ([[./figs/plant_rmc_damped.png][png]], [[./figs/plant_rmc_damped.pdf][pdf]]) [[file:figs/plant_rmc_damped.png]] -** Save -#+begin_src matlab - save('./active_damping/mat/plants.mat', 'G_rmc', '-append'); -#+end_src - ** Conclusion #+begin_important Relative Motion Control: @@ -1264,11 +1285,34 @@ Relative Motion Control: #+end_important * Direct Velocity Feedback +:PROPERTIES: +:header-args:matlab+: :tangle matlab/dvf.m +:header-args:matlab+: :comments org :mkdirp yes +:END: <> + +** ZIP file containing the data and matlab files :ignore: +#+begin_src bash :exports none :results none + if [ matlab/dvf.m -nt data/dvf.zip ]; then + cp matlab/dvf.m dvf.m; + zip data/dvf \ + mat/plant.mat \ + dvf.m + rm dvf.m; + fi +#+end_src + +#+begin_note + All the files (data and Matlab scripts) are accessible [[file:data/dvf.zip][here]]. +#+end_note + ** Introduction :ignore: In the Relative Motion Control (RMC), a feedback is applied between the measured velocity of the platform to the actuator force input. ** One degree-of-freedom example +:PROPERTIES: +:header-args:matlab+: :tangle no +:END: <> *** Equations #+begin_src latex :file dvf_1dof.pdf :post pdf2svg(file=*this*, ext="png") :exports results @@ -1481,8 +1525,6 @@ Let's load the undamped plant: Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure [[fig:dvf_plant]]). -The plant looks to complicated to be reasonably controlled. - #+begin_src matlab :exports none freqs = logspace(0, 3, 1000); @@ -1520,15 +1562,241 @@ The plant looks to complicated to be reasonably controlled. #+CAPTION: Transfer function from forces applied in the legs to leg velocity sensor ([[./figs/dvf_plant.png][png]], [[./figs/dvf_plant.pdf][pdf]]) [[file:figs/dvf_plant.png]] +The controller is defined below and the obtained loop gain is shown in figure [[fig:dvf_open_loop_gain]]. + +#+begin_src matlab + K_dvf = tf(3e4); +#+end_src + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + + ax1 = subplot(2, 1, 1); + hold on; + for i=1:6 + plot(freqs, abs(squeeze(freqresp(K_dvf*G.G_geoph(['Vm', num2str(i)], ['F', num2str(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(K_dvf*G.G_geoph(['Vm', num2str(i)], ['F', num2str(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/dvf_open_loop_gain.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:dvf_open_loop_gain +#+CAPTION: Loop Gain for DVF ([[./figs/dvf_open_loop_gain.png][png]], [[./figs/dvf_open_loop_gain.pdf][pdf]]) +[[file:figs/dvf_open_loop_gain.png]] + +** Identification of the damped plant +Let's initialize the system prior to identification. +#+begin_src matlab + initializeInputs(); + initializeGround(); + initializeGranite(); + initializeTy(); + initializeRy(); + initializeRz(); + initializeMicroHexapod(); + initializeAxisc(); + initializeMirror(); + initializeNanoHexapod(struct('actuator', 'piezo')); + initializeSample(struct('mass', 50)); +#+end_src + +And initialize the controllers. +#+begin_src matlab + K = tf(zeros(6)); + save('./mat/controllers.mat', 'K', '-append'); + K_iff = tf(zeros(6)); + save('./mat/controllers.mat', 'K_iff', '-append'); + K_rmc = tf(zeros(6)); + save('./mat/controllers.mat', 'K_rmc', '-append'); + K_dvf = -K_dvf*eye(6); + save('./mat/controllers.mat', 'K_dvf', '-append'); +#+end_src + +We identify the system dynamics now that the RMC controller is ON. +#+begin_src matlab + G_dvf = identifyPlant(); +#+end_src + +And we save the damped plant for further analysis. +#+begin_src matlab + save('./active_damping/mat/plants.mat', 'G_dvf', '-append'); +#+end_src + +** Sensitivity to disturbances + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + + subplot(2, 1, 1); + title('$D_g$ to $D$'); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / D_{g,x}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / D_{g,y}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / D_{g,z}\right|$'); + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); + + subplot(2, 1, 2); + title('$F_s$ to $D$'); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{s,x}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{s,y}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{s,z}\right|$'); + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_dist_dvf.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_dist_dvf +#+CAPTION: Sensitivity to disturbance once the DVF controller is applied to the system ([[./figs/sensitivity_dist_dvf.png][png]], [[./figs/sensitivity_dist_dvf.pdf][pdf]]) +[[file:figs/sensitivity_dist_dvf.png]] + + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{rz, z}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{ty, z}\right|$'); + plot(freqs, abs(squeeze(freqresp(G.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{ty, x}\right|$'); + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_dist_stages_dvf.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_dist_stages_dvf +#+CAPTION: Sensitivity to force disturbances in various stages when DVF is applied ([[./figs/sensitivity_dist_stages_dvf.png][png]], [[./figs/sensitivity_dist_stages_dvf.pdf][pdf]]) +[[file:figs/sensitivity_dist_stages_dvf.png]] + +** Damped Plant +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + + ax1 = subplot(2, 2, 1); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz')))); + plot(freqs, abs(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz')))); + plot(freqs, abs(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + + ax2 = subplot(2, 2, 2); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz')))); + plot(freqs, abs(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz')))); + plot(freqs, abs(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [rad/(Nm)]'); xlabel('Frequency [Hz]'); + + ax3 = subplot(2, 2, 3); + hold on; + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{n,x}\right|$'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{n,y}\right|$'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{n,z}\right|$'); + set(gca,'ColorOrderIndex',1); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + 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'); + + ax4 = subplot(2, 2, 4); + hold on; + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), 'DisplayName', '$\left|R_x / M_{n,x}\right|$'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz'))), 'DisplayName', '$\left|R_y / M_{n,y}\right|$'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), 'DisplayName', '$\left|R_z / M_{n,z}\right|$'); + set(gca,'ColorOrderIndex',1); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); + 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,ax3,ax4],'x'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/plant_dvf_damped.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:plant_dvf_damped +#+CAPTION: Damped Plant after DVF is applied ([[./figs/plant_dvf_damped.png][png]], [[./figs/plant_dvf_damped.pdf][pdf]]) +[[file:figs/plant_dvf_damped.png]] + ** Conclusion #+begin_important Direct Velocity Feedback: -- Not usable #+end_important * Comparison <> - +** Introduction :ignore: ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> @@ -1542,36 +1810,254 @@ Direct Velocity Feedback: cd('../'); #+end_src -** Comparison +** Load the plants #+begin_src matlab - load('./active_damping/mat/plants.mat', 'G', 'G_iff', 'G_rmc'); + load('./active_damping/mat/plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf'); #+end_src +** Sensitivity to Disturbance +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + title('$D_{g,z}$ to $D_z$'); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_gm( 'Dz', 'Dgz'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_comp_ground_motion_z.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_comp_ground_motion_z +#+CAPTION: caption ([[./figs/sensitivity_comp_ground_motion_z.png][png]], [[./figs/sensitivity_comp_ground_motion_z.pdf][pdf]]) +[[file:figs/sensitivity_comp_ground_motion_z.png]] + + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + title('$F_{s,z}$ to $D_z$'); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_fs( 'Dz', 'Fsz'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_comp_direct_forces_z.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_comp_direct_forces_z +#+CAPTION: caption ([[./figs/sensitivity_comp_direct_forces_z.png][png]], [[./figs/sensitivity_comp_direct_forces_z.pdf][pdf]]) +[[file:figs/sensitivity_comp_direct_forces_z.png]] + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + title('$F_{rz,z}$ to $D_z$'); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_dist( 'Dz', 'Frzz'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_comp_spindle_z.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_comp_spindle_z +#+CAPTION: caption ([[./figs/sensitivity_comp_spindle_z.png][png]], [[./figs/sensitivity_comp_spindle_z.pdf][pdf]]) +[[file:figs/sensitivity_comp_spindle_z.png]] + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + title('$F_{ty,z}$ to $D_z$'); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_dist( 'Dz', 'Ftyz'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_comp_ty_z.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_comp_ty_z +#+CAPTION: caption ([[./figs/sensitivity_comp_ty_z.png][png]], [[./figs/sensitivity_comp_ty_z.pdf][pdf]]) +[[file:figs/sensitivity_comp_ty_z.png]] + + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + title('$F_{ty,x}$ to $D_x$'); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_dist( 'Dx', 'Ftyx'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + legend('location', 'northeast'); +#+end_src + +#+HEADER: :tangle no :exports results :results none :noweb yes +#+begin_src matlab :var filepath="figs/sensitivity_comp_ty_x.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:sensitivity_comp_ty_x +#+CAPTION: caption ([[./figs/sensitivity_comp_ty_x.png][png]], [[./figs/sensitivity_comp_ty_x.pdf][pdf]]) +[[file:figs/sensitivity_comp_ty_x.png]] + +** Damped Plant +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + + title('$F_{n,z}$ to $D_z$'); + ax1 = subplot(2, 1, 1); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_cart( 'Dz', 'Fnz'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + legend('location', 'northeast'); + + ax2 = subplot(2, 1, 2); + hold on; + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart ('Dz', 'Fnz'), freqs, 'Hz'))), 'k-'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'k:'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'k--'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'k-.'); + 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_comp_damping_z.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:plant_comp_damping_z +#+CAPTION: Plant for the $z$ direction for different active damping technique used ([[./figs/plant_comp_damping_z.png][png]], [[./figs/plant_comp_damping_z.pdf][pdf]]) +[[file:figs/plant_comp_damping_z.png]] + #+begin_src matlab :exports none freqs = logspace(0, 3, 1000); figure; - subplot(2, 1, 1); - title('$D_g$ to $D$'); + title('$F_{n,z}$ to $D_z$'); + ax1 = subplot(2, 1, 1); hold on; - plot(freqs, abs(squeeze(freqresp(G.G_gm( 'Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', 'Undamped'); - plot(freqs, abs(squeeze(freqresp(G_iff.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', 'IFF'); - plot(freqs, abs(squeeze(freqresp(G_rmc.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G.G_cart( 'Dx', 'Fnx'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); - ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); legend('location', 'northeast'); - subplot(2, 1, 2); - title('$F_s$ to $D$'); + ax2 = subplot(2, 1, 2); hold on; - plot(freqs, abs(squeeze(freqresp(G.G_fs( 'Dx', 'Fsx'), freqs, 'Hz'))), 'DisplayName', 'Undamped'); - plot(freqs, abs(squeeze(freqresp(G_iff.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), 'DisplayName', 'IFF'); - plot(freqs, abs(squeeze(freqresp(G_rmc.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), 'DisplayName', 'RMC'); - set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); - ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); - legend('location', 'northeast'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart ('Dx', 'Fnx'), freqs, 'Hz'))), 'k-'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'k:'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'k--'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'k-.'); + 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_comp_damping_x.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:plant_comp_damping_x +#+CAPTION: Plant for the $x$ direction for different active damping technique used ([[./figs/plant_comp_damping_x.png][png]], [[./figs/plant_comp_damping_x.pdf][pdf]]) +[[file:figs/plant_comp_damping_x.png]] + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + + title('$F_{n,x}$ to $R_z$'); + ax1 = subplot(2, 1, 1); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_cart( 'Rz', 'Fnx'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'Undamped'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Rz', 'Fnx'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Rz', 'Fnx'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); + plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Rz', 'Fnx'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + legend('location', 'northeast'); + + ax2 = subplot(2, 1, 2); + hold on; + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart ('Ry', 'Fnx'), freqs, 'Hz'))), 'k-'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Ry', 'Fnx'), freqs, 'Hz'))), 'k:'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Ry', 'Fnx'), freqs, 'Hz'))), 'k--'); + plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Ry', 'Fnx'), freqs, 'Hz'))), 'k-.'); + 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_comp_damping_coupling.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:plant_comp_damping_coupling +#+CAPTION: Comparison of one off-diagonal plant for different damping technique applied ([[./figs/plant_comp_damping_coupling.png][png]], [[./figs/plant_comp_damping_coupling.pdf][pdf]]) +[[file:figs/plant_comp_damping_coupling.png]] + * Conclusion <> diff --git a/active_damping/matlab/dvf.m b/active_damping/matlab/dvf.m new file mode 100644 index 0000000..5b46df6 --- /dev/null +++ b/active_damping/matlab/dvf.m @@ -0,0 +1,241 @@ +%% Clear Workspace and Close figures +clear; close all; clc; + +%% Intialize Laplace variable +s = zpk('s'); + +open 'simscape/sim_nano_station_id.slx' + +% Control Design +% Let's load the undamped plant: + +load('./active_damping/mat/plants.mat', 'G'); + + + +% Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure [[fig:dvf_plant]]). + + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 1, 1); +hold on; +for i=1:6 + plot(freqs, abs(squeeze(freqresp(G.G_geoph(['Vm', num2str(i)], ['F', num2str(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.G_geoph(['Vm', num2str(i)], ['F', num2str(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'); + + + +% #+NAME: fig:dvf_plant +% #+CAPTION: Transfer function from forces applied in the legs to leg velocity sensor ([[./figs/dvf_plant.png][png]], [[./figs/dvf_plant.pdf][pdf]]) +% [[file:figs/dvf_plant.png]] + +% The controller is defined below and the obtained loop gain is shown in figure [[fig:dvf_open_loop_gain]]. + + +K_dvf = tf(3e4); + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 1, 1); +hold on; +for i=1:6 + plot(freqs, abs(squeeze(freqresp(K_dvf*G.G_geoph(['Vm', num2str(i)], ['F', num2str(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(K_dvf*G.G_geoph(['Vm', num2str(i)], ['F', num2str(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'); + +% Identification of the damped plant +% Let's initialize the system prior to identification. + +initializeGround(); +initializeGranite(); +initializeTy(); +initializeRy(); +initializeRz(); +initializeMicroHexapod(); +initializeAxisc(); +initializeMirror(); +initializeNanoHexapod(struct('actuator', 'piezo')); +initializeSample(struct('mass', 50)); + + + +% And initialize the controllers. + +K = tf(zeros(6)); +save('./mat/controllers.mat', 'K', '-append'); +K_iff = tf(zeros(6)); +save('./mat/controllers.mat', 'K_iff', '-append'); +K_rmc = tf(zeros(6)); +save('./mat/controllers.mat', 'K_rmc', '-append'); +K_dvf = -K_dvf*eye(6); +save('./mat/controllers.mat', 'K_dvf', '-append'); + + + +% We identify the system dynamics now that the RMC controller is ON. + +G_dvf = identifyPlant(); + + + +% And we save the damped plant for further analysis. + +save('./active_damping/mat/plants.mat', 'G_dvf', '-append'); + +% Sensitivity to disturbances + + +freqs = logspace(0, 3, 1000); + +figure; + +subplot(2, 1, 1); +title('$D_g$ to $D$'); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / D_{g,x}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / D_{g,y}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / D_{g,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + +subplot(2, 1, 2); +title('$F_s$ to $D$'); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{s,x}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{s,y}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{s,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + + + +% #+NAME: fig:sensitivity_dist_dvf +% #+CAPTION: Sensitivity to disturbance once the DVF controller is applied to the system ([[./figs/sensitivity_dist_dvf.png][png]], [[./figs/sensitivity_dist_dvf.pdf][pdf]]) +% [[file:figs/sensitivity_dist_dvf.png]] + + + +freqs = logspace(0, 3, 1000); + +figure; +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{rz, z}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{ty, z}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{ty, x}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + +% Damped Plant + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 2, 1); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz')))); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + +ax2 = subplot(2, 2, 2); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz')))); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_dvf.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [rad/(Nm)]'); xlabel('Frequency [Hz]'); + +ax3 = subplot(2, 2, 3); +hold on; +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{n,x}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{n,y}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{n,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +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'); + +ax4 = subplot(2, 2, 4); +hold on; +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), 'DisplayName', '$\left|R_x / M_{n,x}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz'))), 'DisplayName', '$\left|R_y / M_{n,y}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), 'DisplayName', '$\left|R_z / M_{n,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +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,ax3,ax4],'x'); diff --git a/active_damping/matlab/iff.m b/active_damping/matlab/iff.m new file mode 100644 index 0000000..08a56d1 --- /dev/null +++ b/active_damping/matlab/iff.m @@ -0,0 +1,281 @@ +%% Clear Workspace and Close figures +clear; close all; clc; + +%% Intialize Laplace variable +s = zpk('s'); + +open 'simscape/sim_nano_station_id.slx' + +% Control Design +% Let's load the undamped plant: + +load('./active_damping/mat/plants.mat', 'G'); + + + +% Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure [[fig:iff_plant]]). + + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 1, 1); +hold on; +for i=1:6 + plot(freqs, abs(squeeze(freqresp(G.G_iff(['Fm', num2str(i)], ['F', num2str(i)]), freqs, 'Hz')))); +end +hold off; +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]); + +ax2 = subplot(2, 1, 2); +hold on; +for i=1:6 + plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_iff(['Fm', num2str(i)], ['F', num2str(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'); + + + +% #+NAME: fig:iff_plant +% #+CAPTION: Transfer function from forces applied in the legs to force sensor ([[./figs/iff_plant.png][png]], [[./figs/iff_plant.pdf][pdf]]) +% [[file:figs/iff_plant.png]] + +% The controller for each pair of actuator/sensor is: + +K_iff = -1000/s; + + + +% The corresponding loop gains are shown in figure [[fig:iff_open_loop]]. + + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 1, 1); +hold on; +for i=1:6 + plot(freqs, abs(squeeze(freqresp(K_iff*G.G_iff(['Fm', num2str(i)], ['F', num2str(i)]), freqs, 'Hz')))); +end +hold off; +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]); + +ax2 = subplot(2, 1, 2); +hold on; +for i=1:6 + plot(freqs, 180/pi*angle(squeeze(freqresp(K_iff*G.G_iff(['Fm', num2str(i)], ['F', num2str(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'); + +% Identification of the damped plant +% Let's initialize the system prior to identification. + +initializeGround(); +initializeGranite(); +initializeTy(); +initializeRy(); +initializeRz(); +initializeMicroHexapod(); +initializeAxisc(); +initializeMirror(); +initializeNanoHexapod(struct('actuator', 'piezo')); +initializeSample(struct('mass', 50)); + + + +% All the controllers are set to 0. + +K = tf(zeros(6)); +save('./mat/controllers.mat', 'K', '-append'); +K_iff = -K_iff*eye(6); +save('./mat/controllers.mat', 'K_iff', '-append'); +K_rmc = tf(zeros(6)); +save('./mat/controllers.mat', 'K_rmc', '-append'); +K_dvf = tf(zeros(6)); +save('./mat/controllers.mat', 'K_dvf', '-append'); + + + +% We identify the system dynamics now that the IFF controller is ON. + +G_iff = identifyPlant(); + + + +% And we save the damped plant for further analysis + +save('./active_damping/mat/plants.mat', 'G_iff', '-append'); + +% Sensitivity to disturbances +% As shown on figure [[fig:sensitivity_dist_iff]]: +% - The top platform of the nano-hexapod how behaves as a "free-mass". +% - The transfer function from direct forces $F_s$ to the relative displacement $D$ is equivalent to the one of an isolated mass. +% - The transfer function from ground motion $D_g$ to the relative displacement $D$ tends to the transfer function from $D_g$ to the displacement of the granite (the sample is being isolated thanks to IFF). +% However, as the goal is to make the relative displacement $D$ as small as possible (e.g. to make the sample motion follows the granite motion), this is not a good thing. + + +freqs = logspace(0, 3, 1000); + +figure; + +subplot(2, 1, 1); +title('$D_g$ to $D$'); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / D_{g,x}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / D_{g,y}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / D_{g,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_iff.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + +subplot(2, 1, 2); +title('$F_s$ to $D$'); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{s,x}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{s,y}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{s,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_iff.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + + + +% #+NAME: fig:sensitivity_dist_iff +% #+CAPTION: Sensitivity to disturbance once the IFF controller is applied to the system ([[./figs/sensitivity_dist_iff.png][png]], [[./figs/sensitivity_dist_iff.pdf][pdf]]) +% [[file:figs/sensitivity_dist_iff.png]] + +% #+begin_warning +% The order of the models are very high and thus the plots may be wrong. +% For instance, the plots are not the same when using =minreal=. +% #+end_warning + + +freqs = logspace(0, 3, 1000); + +figure; +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{rz, z}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{ty, z}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{ty, x}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(minreal(prescale(G_iff.G_dist('Dz', 'Frzz'), {2*pi, 2*pi*1e3})), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(minreal(G_iff.G_dist('Dz', 'Ftyz')), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(minreal(G_iff.G_dist('Dx', 'Ftyx')), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + +% Damped Plant +% Now, look at the new damped plant to control. + +% It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure [[fig:plant_iff_damped]]. + + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 2, 1); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz')))); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + +ax2 = subplot(2, 2, 2); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz')))); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_iff.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [rad/(Nm)]'); xlabel('Frequency [Hz]'); + +ax3 = subplot(2, 2, 3); +hold on; +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{n,x}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{n,y}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{n,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +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'); + +ax4 = subplot(2, 2, 4); +hold on; +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), 'DisplayName', '$\left|R_x / M_{n,x}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz'))), 'DisplayName', '$\left|R_y / M_{n,y}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), 'DisplayName', '$\left|R_z / M_{n,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +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,ax3,ax4],'x'); + + + +% #+NAME: fig:plant_iff_damped +% #+CAPTION: Damped Plant after IFF is applied ([[./figs/plant_iff_damped.png][png]], [[./figs/plant_iff_damped.pdf][pdf]]) +% [[file:figs/plant_iff_damped.png]] + +% However, it increases coupling at low frequency (figure [[fig:plant_iff_coupling]]). + +freqs = logspace(0, 3, 1000); + +figure; + +for ix = 1:6 + for iy = 1:6 + subplot(6, 6, (ix-1)*6 + iy); + hold on; + plot(freqs, abs(squeeze(freqresp(G.G_cart(ix, iy), freqs, 'Hz'))), 'k-'); + plot(freqs, abs(squeeze(freqresp(G_iff.G_cart(ix, iy), freqs, 'Hz'))), 'k--'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylim([1e-12, 1e-5]); + end +end diff --git a/active_damping/matlab/rmc.m b/active_damping/matlab/rmc.m new file mode 100644 index 0000000..4d920cd --- /dev/null +++ b/active_damping/matlab/rmc.m @@ -0,0 +1,246 @@ +%% Clear Workspace and Close figures +clear; close all; clc; + +%% Intialize Laplace variable +s = zpk('s'); + +open 'simscape/sim_nano_station_id.slx' + +% Control Design +% Let's load the undamped plant: + +load('./active_damping/mat/plants.mat', 'G'); + + + +% Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure [[fig:rmc_plant]]). + + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 1, 1); +hold on; +for i=1:6 + plot(freqs, abs(squeeze(freqresp(G.G_dleg(['Dm', num2str(i)], ['F', num2str(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.G_dleg(['Dm', num2str(i)], ['F', num2str(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'); + + + +% #+NAME: fig:rmc_plant +% #+CAPTION: Transfer function from forces applied in the legs to leg displacement sensor ([[./figs/rmc_plant.png][png]], [[./figs/rmc_plant.pdf][pdf]]) +% [[file:figs/rmc_plant.png]] + +% The Relative Motion Controller is defined below. +% A Low pass Filter is added to make the controller transfer function proper. + +K_rmc = s*50000/(1 + s/2/pi/10000); + + + +% The obtained loop gains are shown in figure [[fig:rmc_open_loop]]. + + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 1, 1); +hold on; +for i=1:6 + plot(freqs, abs(squeeze(freqresp(K_rmc*G.G_dleg(['Dm', num2str(i)], ['F', num2str(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(K_rmc*G.G_dleg(['Dm', num2str(i)], ['F', num2str(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'); + +% Identification of the damped plant +% Let's initialize the system prior to identification. + +initializeGround(); +initializeGranite(); +initializeTy(); +initializeRy(); +initializeRz(); +initializeMicroHexapod(); +initializeAxisc(); +initializeMirror(); +initializeNanoHexapod(struct('actuator', 'piezo')); +initializeSample(struct('mass', 50)); + + + +% And initialize the controllers. + +K = tf(zeros(6)); +save('./mat/controllers.mat', 'K', '-append'); +K_iff = tf(zeros(6)); +save('./mat/controllers.mat', 'K_iff', '-append'); +K_rmc = -K_rmc*eye(6); +save('./mat/controllers.mat', 'K_rmc', '-append'); +K_dvf = tf(zeros(6)); +save('./mat/controllers.mat', 'K_dvf', '-append'); + + + +% We identify the system dynamics now that the RMC controller is ON. + +G_rmc = identifyPlant(); + + + +% And we save the damped plant for further analysis. + +save('./active_damping/mat/plants.mat', 'G_rmc', '-append'); + +% Sensitivity to disturbances +% As shown in figure [[fig:sensitivity_dist_rmc]], RMC control succeed in lowering the sensitivity to disturbances near resonance of the system. + + +freqs = logspace(0, 3, 1000); + +figure; + +subplot(2, 1, 1); +title('$D_g$ to $D$'); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / D_{g,x}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / D_{g,y}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / D_{g,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_gm('Dx', 'Dgx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_gm('Dy', 'Dgy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_gm('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + +subplot(2, 1, 2); +title('$F_s$ to $D$'); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{s,x}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{s,y}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{s,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_fs('Dx', 'Fsx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_fs('Dy', 'Fsy'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + + + +% #+NAME: fig:sensitivity_dist_rmc +% #+CAPTION: Sensitivity to disturbance once the RMC controller is applied to the system ([[./figs/sensitivity_dist_rmc.png][png]], [[./figs/sensitivity_dist_rmc.pdf][pdf]]) +% [[file:figs/sensitivity_dist_rmc.png]] + + +freqs = logspace(0, 3, 1000); + +figure; +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{rz, z}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{ty, z}\right|$'); +plot(freqs, abs(squeeze(freqresp(G.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{ty, x}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_dist('Dz', 'Frzz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_dist('Dz', 'Ftyz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_dist('Dx', 'Ftyx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); +legend('location', 'northeast'); + +% Damped Plant + +freqs = logspace(0, 3, 1000); + +figure; + +ax1 = subplot(2, 2, 1); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz')))); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]'); + +ax2 = subplot(2, 2, 2); +hold on; +plot(freqs, abs(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz')))); +plot(freqs, abs(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz')))); +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--'); +plot(freqs, abs(squeeze(freqresp(G_rmc.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--'); +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Amplitude [rad/(Nm)]'); xlabel('Frequency [Hz]'); + +ax3 = subplot(2, 2, 3); +hold on; +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', '$\left|D_x / F_{n,x}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dy', 'Fny'), freqs, 'Hz'))), 'DisplayName', '$\left|D_y / F_{n,y}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', '$\left|D_z / F_{n,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Dy', 'Fny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +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'); + +ax4 = subplot(2, 2, 4); +hold on; +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), 'DisplayName', '$\left|R_x / M_{n,x}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Ry', 'Mny'), freqs, 'Hz'))), 'DisplayName', '$\left|R_y / M_{n,y}\right|$'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), 'DisplayName', '$\left|R_z / M_{n,z}\right|$'); +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Rx', 'Mnx'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Ry', 'Mny'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc.G_cart('Rz', 'Mnz'), freqs, 'Hz'))), '--', 'HandleVisibility', 'off'); +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,ax3,ax4],'x'); diff --git a/figs/dvf_open_loop_gain.png b/figs/dvf_open_loop_gain.png new file mode 100644 index 0000000..68d681c Binary files /dev/null and b/figs/dvf_open_loop_gain.png differ diff --git a/figs/dvf_plant.png b/figs/dvf_plant.png index c96b506..48bd012 100644 Binary files a/figs/dvf_plant.png and b/figs/dvf_plant.png differ diff --git a/figs/iff_open_loop.png b/figs/iff_open_loop.png index b5ce866..35e05e7 100644 Binary files a/figs/iff_open_loop.png and b/figs/iff_open_loop.png differ diff --git a/figs/iff_plant.png b/figs/iff_plant.png index 4f2b918..91fc7db 100644 Binary files a/figs/iff_plant.png and b/figs/iff_plant.png differ diff --git a/figs/plant_comp_damping_coupling.png b/figs/plant_comp_damping_coupling.png new file mode 100644 index 0000000..4fa81cc Binary files /dev/null and b/figs/plant_comp_damping_coupling.png differ diff --git a/figs/plant_comp_damping_x.png b/figs/plant_comp_damping_x.png new file mode 100644 index 0000000..e93b9a7 Binary files /dev/null and b/figs/plant_comp_damping_x.png differ diff --git a/figs/plant_comp_damping_z.png b/figs/plant_comp_damping_z.png new file mode 100644 index 0000000..cb37802 Binary files /dev/null and b/figs/plant_comp_damping_z.png differ diff --git a/figs/plant_dvf_damped.png b/figs/plant_dvf_damped.png new file mode 100644 index 0000000..d57de34 Binary files /dev/null and b/figs/plant_dvf_damped.png differ diff --git a/figs/plant_iff_coupling.png b/figs/plant_iff_coupling.png index e3ed19d..95ce53c 100644 Binary files a/figs/plant_iff_coupling.png and b/figs/plant_iff_coupling.png differ diff --git a/figs/plant_iff_damped.png b/figs/plant_iff_damped.png index 9a40d34..f389db5 100644 Binary files a/figs/plant_iff_damped.png and b/figs/plant_iff_damped.png differ diff --git a/figs/plant_rmc_damped.png b/figs/plant_rmc_damped.png index 844e353..ba04855 100644 Binary files a/figs/plant_rmc_damped.png and b/figs/plant_rmc_damped.png differ diff --git a/figs/plant_undamped.png b/figs/plant_undamped.png index 8c66a36..6c2f6f9 100644 Binary files a/figs/plant_undamped.png and b/figs/plant_undamped.png differ diff --git a/figs/rmc_open_loop.png b/figs/rmc_open_loop.png index e0466ea..4633884 100644 Binary files a/figs/rmc_open_loop.png and b/figs/rmc_open_loop.png differ diff --git a/figs/rmc_plant.png b/figs/rmc_plant.png index 93d554f..a5be88c 100644 Binary files a/figs/rmc_plant.png and b/figs/rmc_plant.png differ diff --git a/figs/sensitivity_comp_direct_forces_z.png b/figs/sensitivity_comp_direct_forces_z.png new file mode 100644 index 0000000..1be45b1 Binary files /dev/null and b/figs/sensitivity_comp_direct_forces_z.png differ diff --git a/figs/sensitivity_comp_ground_motion_z.png b/figs/sensitivity_comp_ground_motion_z.png new file mode 100644 index 0000000..85d97a6 Binary files /dev/null and b/figs/sensitivity_comp_ground_motion_z.png differ diff --git a/figs/sensitivity_comp_spindle_z.png b/figs/sensitivity_comp_spindle_z.png new file mode 100644 index 0000000..1207672 Binary files /dev/null and b/figs/sensitivity_comp_spindle_z.png differ diff --git a/figs/sensitivity_comp_ty_x.png b/figs/sensitivity_comp_ty_x.png new file mode 100644 index 0000000..4e3b866 Binary files /dev/null and b/figs/sensitivity_comp_ty_x.png differ diff --git a/figs/sensitivity_comp_ty_z.png b/figs/sensitivity_comp_ty_z.png new file mode 100644 index 0000000..592a6ce Binary files /dev/null and b/figs/sensitivity_comp_ty_z.png differ diff --git a/figs/sensitivity_dist_dvf.png b/figs/sensitivity_dist_dvf.png new file mode 100644 index 0000000..7f9c955 Binary files /dev/null and b/figs/sensitivity_dist_dvf.png differ diff --git a/figs/sensitivity_dist_iff.png b/figs/sensitivity_dist_iff.png index 822bebf..04eec02 100644 Binary files a/figs/sensitivity_dist_iff.png and b/figs/sensitivity_dist_iff.png differ diff --git a/figs/sensitivity_dist_rmc.png b/figs/sensitivity_dist_rmc.png index 3585583..33f130b 100644 Binary files a/figs/sensitivity_dist_rmc.png and b/figs/sensitivity_dist_rmc.png differ diff --git a/figs/sensitivity_dist_stages.png b/figs/sensitivity_dist_stages.png new file mode 100644 index 0000000..22b34c0 Binary files /dev/null and b/figs/sensitivity_dist_stages.png differ diff --git a/figs/sensitivity_dist_stages_dvf.png b/figs/sensitivity_dist_stages_dvf.png new file mode 100644 index 0000000..b3942fb Binary files /dev/null and b/figs/sensitivity_dist_stages_dvf.png differ diff --git a/figs/sensitivity_dist_stages_iff.png b/figs/sensitivity_dist_stages_iff.png index 6741535..7b68b5d 100644 Binary files a/figs/sensitivity_dist_stages_iff.png and b/figs/sensitivity_dist_stages_iff.png differ diff --git a/figs/sensitivity_dist_stages_rmc.png b/figs/sensitivity_dist_stages_rmc.png index 8dd9797..91819b6 100644 Binary files a/figs/sensitivity_dist_stages_rmc.png and b/figs/sensitivity_dist_stages_rmc.png differ diff --git a/figs/sensitivity_dist_undamped.png b/figs/sensitivity_dist_undamped.png index 9dc6fac..f58522e 100644 Binary files a/figs/sensitivity_dist_undamped.png and b/figs/sensitivity_dist_undamped.png differ diff --git a/figs/uniaxial_sensitivity_frz.png b/figs/uniaxial_sensitivity_frz.png index 1954dce..851eec3 100644 Binary files a/figs/uniaxial_sensitivity_frz.png and b/figs/uniaxial_sensitivity_frz.png differ diff --git a/simscape/sim_nano_station_id.slx b/simscape/sim_nano_station_id.slx index a21a67e..1de857b 100644 Binary files a/simscape/sim_nano_station_id.slx and b/simscape/sim_nano_station_id.slx differ diff --git a/simscape/sim_nano_station_uniaxial.slx b/simscape/sim_nano_station_uniaxial.slx index 46307f1..6bf84c9 100644 Binary files a/simscape/sim_nano_station_uniaxial.slx and b/simscape/sim_nano_station_uniaxial.slx differ diff --git a/uniaxial/index.html b/uniaxial/index.html index 169631c..ced46eb 100644 --- a/uniaxial/index.html +++ b/uniaxial/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Simscape Uniaxial Model @@ -280,48 +280,48 @@ for the JavaScript code in this tag.

    Table of Contents

    @@ -336,11 +336,11 @@ The idea is to use the same model as the full Simscape Model but to restrict the This is done in order to more easily study the system and evaluate control techniques.

    -
    -

    1 Simscape Model

    +
    +

    1 Simscape Model

    -A schematic of the uniaxial model used for simulations is represented in figure 1. +A schematic of the uniaxial model used for simulations is represented in figure 1.

    @@ -384,7 +384,7 @@ The control signal \(u\) is: -

    +

    uniaxial-model-nass-flexible.png

    Figure 1: Schematic of the uniaxial model used

    @@ -393,11 +393,11 @@ The control signal \(u\) is:

    Few active damping techniques will be compared in order to decide which sensor is to be included in the system. -Schematics of the active damping techniques are displayed in figure 2. +Schematics of the active damping techniques are displayed in figure 2.

    -
    +

    uniaxial-model-nass-flexible-active-damping.png

    Figure 2: Comparison of used active damping techniques

    @@ -405,16 +405,16 @@ Schematics of the active damping techniques are displayed in figure -

    2 Undamped System

    +
    +

    2 Undamped System

    Let's start by study the undamped system.

    -
    -

    2.1 Init

    +
    +

    2.1 Init

    We initialize all the stages with the default parameters. @@ -426,8 +426,8 @@ All the controllers are set to 0 (Open Loop).

    -
    -

    2.2 Identification

    +
    +

    2.2 Identification

    We identify the dynamics of the system. @@ -490,19 +490,19 @@ Finally, we save the identified system dynamics for further analysis.

    -
    -

    2.3 Sensitivity to Disturbances

    +
    +

    2.3 Sensitivity to Disturbances

    We show several plots representing the sensitivity to disturbances:

    -
    +

    uniaxial-sensitivity-disturbances.png

    Figure 3: Sensitivity to disturbances (png, pdf)

    @@ -510,7 +510,7 @@ We show several plots representing the sensitivity to disturbances: -
    +

    uniaxial-sensitivity-force-dist.png

    Figure 4: Sensitivity to disturbances (png, pdf)

    @@ -518,16 +518,16 @@ We show several plots representing the sensitivity to disturbances:
    -
    -

    2.4 Plant

    +
    +

    2.4 Plant

    -The transfer function from the force \(F\) applied by the nano-hexapod to the position of the sample \(D\) is shown in figure 5. +The transfer function from the force \(F\) applied by the nano-hexapod to the position of the sample \(D\) is shown in figure 5. It corresponds to the plant to control.

    -
    +

    uniaxial-plant.png

    Figure 5: Bode plot of the Plant (png, pdf)

    @@ -536,21 +536,21 @@ It corresponds to the plant to control.
    -
    -

    3 Integral Force Feedback

    +
    +

    3 Integral Force Feedback

    - +

    -
    +

    uniaxial-model-nass-flexible-iff.png

    Figure 6: Uniaxial IFF Control Schematic

    -
    -

    3.1 Control Design

    +
    +

    3.1 Control Design

    load('./uniaxial/mat/plants.mat', 'G');
    @@ -562,7 +562,7 @@ Let's look at the transfer function from actuator forces in the nano-hexapod to
     

    -
    +

    uniaxial_iff_plant.png

    Figure 7: Transfer function from forces applied in the legs to force sensor (png, pdf)

    @@ -577,7 +577,7 @@ The controller for each pair of actuator/sensor is:
    -
    +

    uniaxial_iff_open_loop.png

    Figure 8: Loop Gain for the Integral Force Feedback (png, pdf)

    @@ -585,8 +585,8 @@ The controller for each pair of actuator/sensor is:
    -
    -

    3.2 Identification

    +
    +

    3.2 Identification

    Let's initialize the system prior to identification. @@ -669,18 +669,18 @@ G_iff.OutputName = {

    -
    -

    3.3 Sensitivity to Disturbance

    +
    +

    3.3 Sensitivity to Disturbance

    -
    +

    uniaxial_sensitivity_dist_iff.png

    Figure 9: Sensitivity to disturbance once the IFF controller is applied to the system (png, pdf)

    -
    +

    uniaxial_sensitivity_dist_stages_iff.png

    Figure 10: Sensitivity to force disturbances in various stages when IFF is applied (png, pdf)

    @@ -688,11 +688,11 @@ G_iff.OutputName = {
    -
    -

    3.4 Damped Plant

    +
    +

    3.4 Damped Plant

    -
    +

    uniaxial_plant_iff_damped.png

    Figure 11: Damped Plant after IFF is applied (png, pdf)

    @@ -700,8 +700,8 @@ G_iff.OutputName = {
    -
    -

    3.5 Conclusion

    +
    +

    3.5 Conclusion

    @@ -713,25 +713,25 @@ Integral Force Feedback:

    -
    -

    4 Relative Motion Control

    +
    +

    4 Relative Motion Control

    - +

    In the Relative Motion Control (RMC), a derivative feedback is applied between the measured actuator displacement to the actuator force input.

    -
    +

    uniaxial-model-nass-flexible-rmc.png

    Figure 12: Uniaxial RMC Control Schematic

    -
    -

    4.1 Control Design

    +
    +

    4.1 Control Design

    load('./uniaxial/mat/plants.mat', 'G');
    @@ -743,7 +743,7 @@ Let's look at the transfer function from actuator forces in the nano-hexapod to
     

    -
    +

    uniaxial_rmc_plant.png

    Figure 13: Transfer function from forces applied in the legs to leg displacement sensor (png, pdf)

    @@ -759,7 +759,7 @@ A Low pass Filter is added to make the controller transfer function proper.
    -
    +

    uniaxial_rmc_open_loop.png

    Figure 14: Loop Gain for the Integral Force Feedback (png, pdf)

    @@ -767,8 +767,8 @@ A Low pass Filter is added to make the controller transfer function proper.
    -
    -

    4.2 Identification

    +
    +

    4.2 Identification

    Let's initialize the system prior to identification. @@ -852,18 +852,18 @@ G_rmc.OutputName = { -

    -

    4.3 Sensitivity to Disturbance

    +
    +

    4.3 Sensitivity to Disturbance

    -
    +

    uniaxial_sensitivity_dist_rmc.png

    Figure 15: Sensitivity to disturbance once the RMC controller is applied to the system (png, pdf)

    -
    +

    uniaxial_sensitivity_dist_stages_rmc.png

    Figure 16: Sensitivity to force disturbances in various stages when RMC is applied (png, pdf)

    @@ -871,11 +871,11 @@ G_rmc.OutputName = {
    -
    -

    4.4 Damped Plant

    +
    +

    4.4 Damped Plant

    -
    +

    uniaxial_plant_rmc_damped.png

    Figure 17: Damped Plant after RMC is applied (png, pdf)

    @@ -883,8 +883,8 @@ G_rmc.OutputName = {
    -
    -

    4.5 Conclusion

    +
    +

    4.5 Conclusion

    @@ -896,25 +896,25 @@ Relative Motion Control:

    -
    -

    5 Direct Velocity Feedback

    +
    +

    5 Direct Velocity Feedback

    - +

    In the Relative Motion Control (RMC), a feedback is applied between the measured velocity of the platform to the actuator force input.

    -
    +

    uniaxial-model-nass-flexible-dvf.png

    Figure 18: Uniaxial DVF Control Schematic

    -
    -

    5.1 Control Design

    +
    +

    5.1 Control Design

    load('./uniaxial/mat/plants.mat', 'G');
    @@ -922,7 +922,7 @@ In the Relative Motion Control (RMC), a feedback is applied between the measured
     
    -
    +

    uniaxial_dvf_plant.png

    Figure 19: Transfer function from forces applied in the legs to leg velocity sensor (png, pdf)

    @@ -934,7 +934,7 @@ In the Relative Motion Control (RMC), a feedback is applied between the measured
    -
    +

    uniaxial_dvf_loop_gain.png

    Figure 20: Transfer function from forces applied in the legs to leg velocity sensor (png, pdf)

    @@ -942,8 +942,8 @@ In the Relative Motion Control (RMC), a feedback is applied between the measured
    -
    -

    5.2 Identification

    +
    +

    5.2 Identification

    Let's initialize the system prior to identification. @@ -1026,18 +1026,18 @@ G_dvf.OutputName = {

    -
    -

    5.3 Sensitivity to Disturbance

    +
    +

    5.3 Sensitivity to Disturbance

    -
    +

    uniaxial_sensitivity_dist_dvf.png

    Figure 21: Sensitivity to disturbance once the DVF controller is applied to the system (png, pdf)

    -
    +

    uniaxial_sensitivity_dist_stages_dvf.png

    Figure 22: Sensitivity to force disturbances in various stages when DVF is applied (png, pdf)

    @@ -1045,11 +1045,11 @@ G_dvf.OutputName = {
    -
    -

    5.4 Damped Plant

    +
    +

    5.4 Damped Plant

    -
    +

    uniaxial_plant_dvf_damped.png

    Figure 23: Damped Plant after DVF is applied (png, pdf)

    @@ -1057,8 +1057,8 @@ G_dvf.OutputName = {
    -
    -

    5.5 Conclusion

    +
    +

    5.5 Conclusion

    @@ -1069,15 +1069,15 @@ Direct Velocity Feedback:

    -
    -

    6 Comparison of Active Damping Techniques

    +
    +

    6 Comparison of Active Damping Techniques

    - +

    -
    -

    6.1 Load the plants

    +
    +

    6.1 Load the plants

    load('./uniaxial/mat/plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf');
    @@ -1086,11 +1086,11 @@ Direct Velocity Feedback:
     
    -
    -

    6.2 Sensitivity to Disturbance

    +
    +

    6.2 Sensitivity to Disturbance

    -
    +

    uniaxial_sensitivity_ground_motion.png

    Figure 24: Sensitivity to Ground Motion - Comparison (png, pdf)

    @@ -1098,21 +1098,21 @@ Direct Velocity Feedback: -
    +

    uniaxial_sensitivity_direct_force.png

    Figure 25: Sensitivity to disturbance - Comparison (png, pdf)

    -
    +

    uniaxial_sensitivity_fty.png

    Figure 26: Sensitivity to force disturbances - Comparison (png, pdf)

    -
    +

    uniaxial_sensitivity_frz.png

    Figure 27: Sensitivity to force disturbances - Comparison (png, pdf)

    @@ -1120,11 +1120,11 @@ Direct Velocity Feedback:
    -
    -

    6.3 Damped Plant

    +
    +

    6.3 Damped Plant

    -
    +

    uniaxial_plant_damped_comp.png

    Figure 28: Damped Plant - Comparison (png, pdf)

    @@ -1132,10 +1132,10 @@ Direct Velocity Feedback:
    -
    -

    6.4 Conclusion

    +
    +

    6.4 Conclusion

    - +
    @@ -1205,7 +1205,7 @@ The next step is to take into account the power spectral density of each disturb

    Author: Dehaeze Thomas

    -

    Created: 2019-10-25 ven. 12:32

    +

    Created: 2019-10-25 ven. 16:02

    Validate

    diff --git a/uniaxial/index.org b/uniaxial/index.org index ca57bb0..6c1ece8 100644 --- a/uniaxial/index.org +++ b/uniaxial/index.org @@ -2217,7 +2217,7 @@ Direct Velocity Feedback: title('$F_{rz}$ to $D$'); hold on; plot(freqs, abs(squeeze(freqresp(G ('D', 'Frz'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'OL'); - plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Frz'), freqs, 'Hz'))), 'k' , 'DisplayName', 'IFF'); + plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Frz'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF'); plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Frz'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC'); plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Frz'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF'); hold off;
    Table 1: Comparison of proposed active damping techniques