Correct Matlab scripts

This commit is contained in:
Thomas Dehaeze 2025-04-15 09:29:40 +02:00
parent 122273e102
commit b4c654a0e2
7 changed files with 98 additions and 72 deletions

View File

@ -65,11 +65,12 @@ load('meas_spindle_on.mat', 't', 'vg', 'vh');
spindle_off = load('meas_spindle_off.mat', 't', 'vg', 'vh'); % No Rotation spindle_off = load('meas_spindle_off.mat', 't', 'vg', 'vh'); % No Rotation
% Compute Power Spectral Density of the relative velocity between granite and hexapod during spindle rotation % Compute Power Spectral Density of the relative velocity between granite and hexapod during spindle rotation
Fs = 1/(t(2)-t(1)); % Sampling Frequency [Hz] Ts = t(2)-t(1); % Sampling Time [s]
win = hanning(ceil(2*Fs)); % Hanning window Nfft = floor(2/Ts);
win = hanning(Nfft);
[psd_vft, f] = pwelch(vh-vg, win, [], [], Fs); % [(m/s)^2/Hz] [psd_vft, f] = pwelch(vh-vg, win, Noverlap, Nfft, 1/Ts); % [(m/s)^2/Hz]
[psd_off, ~] = pwelch(spindle_off.vh-spindle_off.vg, win, [], [], Fs); % [(m/s)^2/Hz] [psd_off, ~] = pwelch(spindle_off.vh-spindle_off.vg, win, Noverlap, Nfft, 1/Ts); % [(m/s)^2/Hz]
% Disable the Nano-Hexpod for now % Disable the Nano-Hexpod for now
model_config = struct(); model_config = struct();

View File

@ -56,7 +56,7 @@ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude $d/x_{f}$ [m/m]'); xlabel('Frequency [Hz]'); ylabel('Amplitude $d/x_{f}$ [m/m]'); xlabel('Frequency [Hz]');
xticks([1e0, 1e1, 1e2]); xticks([1e0, 1e1, 1e2]);
leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([1, 500]); xlim([1, 500]);
%% Cumulative Amplitude Spectrum of the relative motion d, due to both the floor motion and the stage vibrations %% Cumulative Amplitude Spectrum of the relative motion d, due to both the floor motion and the stage vibrations
@ -72,7 +72,7 @@ hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('CAS [m]'); xlabel('Frequency [Hz]'); ylabel('CAS [m]'); xlabel('Frequency [Hz]');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 2); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 2);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([1, 500]); xlim([1, 500]);
ylim([1e-12, 3e-6]) ylim([1e-12, 3e-6])
@ -104,7 +104,7 @@ hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('CAS [m]'); xlabel('Frequency [Hz]'); ylabel('CAS [m]'); xlabel('Frequency [Hz]');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([1, 500]); xlim([1, 500]);
ylim([1e-12, 3e-6]) ylim([1e-12, 3e-6])

View File

@ -221,19 +221,25 @@ G_dvf_pz_heavy = feedback(G_pz_heavy, K_dvf_pz, 'name', +1);
%% Verify Stability %% Verify Stability
% IFF % IFF
isstable(G_iff_vc_light) && isstable(G_iff_vc_mid) && isstable(G_iff_vc_heavy) && ... if not(isstable(G_iff_vc_light) && isstable(G_iff_vc_mid) && isstable(G_iff_vc_heavy) && ...
isstable(G_iff_md_light) && isstable(G_iff_md_mid) && isstable(G_iff_md_heavy) && ... isstable(G_iff_md_light) && isstable(G_iff_md_mid) && isstable(G_iff_md_heavy) && ...
isstable(G_iff_pz_light) && isstable(G_iff_pz_mid) && isstable(G_iff_pz_heavy) isstable(G_iff_pz_light) && isstable(G_iff_pz_mid) && isstable(G_iff_pz_heavy))
warning("One of the damped plant with decentralized IFF is not stable.");
end
% RDC % RDC
isstable(G_rdc_vc_light) && isstable(G_rdc_vc_mid) && isstable(G_rdc_vc_heavy) && ... if not(isstable(G_rdc_vc_light) && isstable(G_rdc_vc_mid) && isstable(G_rdc_vc_heavy) && ...
isstable(G_rdc_md_light) && isstable(G_rdc_md_mid) && isstable(G_rdc_md_heavy) && ... isstable(G_rdc_md_light) && isstable(G_rdc_md_mid) && isstable(G_rdc_md_heavy) && ...
isstable(G_rdc_pz_light) && isstable(G_rdc_pz_mid) && isstable(G_rdc_pz_heavy) isstable(G_rdc_pz_light) && isstable(G_rdc_pz_mid) && isstable(G_rdc_pz_heavy))
warning("One of the damped plant with decentralized RDC is not stable.");
end
% DVF % DVF
isstable(G_dvf_vc_light) && isstable(G_dvf_vc_mid) && isstable(G_dvf_vc_heavy) && ... if not(isstable(G_dvf_vc_light) && isstable(G_dvf_vc_mid) && isstable(G_dvf_vc_heavy) && ...
isstable(G_dvf_md_light) && isstable(G_dvf_md_mid) && isstable(G_dvf_md_heavy) && ... isstable(G_dvf_md_light) && isstable(G_dvf_md_mid) && isstable(G_dvf_md_heavy) && ...
isstable(G_dvf_pz_light) && isstable(G_dvf_pz_mid) && isstable(G_dvf_pz_heavy) isstable(G_dvf_pz_light) && isstable(G_dvf_pz_mid) && isstable(G_dvf_pz_heavy))
warning("One of the damped plant with decentralized DVF is not stable.");
end
%% Save Damped Plants %% Save Damped Plants
save('./mat/uniaxial_damped_plants.mat', 'G_iff_vc_light', 'G_iff_md_light', 'G_iff_pz_light', ... save('./mat/uniaxial_damped_plants.mat', 'G_iff_vc_light', 'G_iff_md_light', 'G_iff_pz_light', ...

View File

@ -258,7 +258,7 @@ hold off;
set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin'); set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin');
xlabel('Real'); ylabel('Imag'); xlabel('Real'); ylabel('Imag');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([-3.8, 0.2]); ylim([-2, 2]); xlim([-3.8, 0.2]); ylim([-2, 2]);
axis square; axis square;
@ -279,7 +279,7 @@ hold off;
set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin'); set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin');
xlabel('Real'); ylabel('Imag'); xlabel('Real'); ylabel('Imag');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([-3.8, 0.2]); ylim([-2, 2]); xlim([-3.8, 0.2]); ylim([-2, 2]);
axis square; axis square;
@ -300,7 +300,7 @@ hold off;
set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin'); set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin');
xlabel('Real'); ylabel('Imag'); xlabel('Real'); ylabel('Imag');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([-3.8, 0.2]); ylim([-2, 2]); xlim([-3.8, 0.2]); ylim([-2, 2]);
axis square; axis square;
@ -319,7 +319,7 @@ ylabel('Loop Gain'); set(gca, 'XTickLabel',[]);
ylim([1e-3, 1e3]); ylim([1e-3, 1e3]);
yticks([1e-2, 1, 1e2]) yticks([1e-2, 1, 1e2])
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
ax2 = nexttile; ax2 = nexttile;
hold on; hold on;
@ -413,11 +413,17 @@ G_hac_iff_pz_mid = feedback(G_iff_pz_mid , K_hac_pz, 'name', -1);
G_hac_iff_pz_heavy = feedback(G_iff_pz_heavy, K_hac_pz, 'name', -1); G_hac_iff_pz_heavy = feedback(G_iff_pz_heavy, K_hac_pz, 'name', -1);
%% Verify Stability %% Verify Stability
isstable(G_hac_iff_vc_light) && isstable(G_hac_iff_vc_mid) && isstable(G_hac_iff_vc_heavy) if not(isstable(G_hac_iff_vc_light) && isstable(G_hac_iff_vc_mid) && isstable(G_hac_iff_vc_heavy))
warning("One of the damped plant with VC and decentralized IFF is not stable.");
end
isstable(G_hac_iff_md_light) && isstable(G_hac_iff_md_mid) && isstable(G_hac_iff_md_heavy) if not(isstable(G_hac_iff_md_light) && isstable(G_hac_iff_md_mid) && isstable(G_hac_iff_md_heavy))
warning("One of the damped plant with MD and decentralized IFF is not stable.");
end
isstable(G_hac_iff_pz_light) && isstable(G_hac_iff_pz_mid) && isstable(G_hac_iff_pz_heavy) if not(isstable(G_hac_iff_pz_light) && isstable(G_hac_iff_pz_mid) && isstable(G_hac_iff_pz_heavy))
warning("One of the damped plant with PZ and decentralized IFF is not stable.");
end
%% Change of sensitivity to disturbances with LAC and with HAC-LAC %% Change of sensitivity to disturbances with LAC and with HAC-LAC
figure; figure;

View File

@ -324,18 +324,18 @@ G_iff_vc_light_rigid = feedback(G_vc_light_rigid, K_iff_vc, 'name', +1);
G_iff_vc_light_soft = feedback(G_vc_light_soft , K_iff_vc, 'name', +1); G_iff_vc_light_soft = feedback(G_vc_light_soft , K_iff_vc, 'name', +1);
G_iff_vc_light_stiff = feedback(G_vc_light_stiff, K_iff_vc, 'name', +1); G_iff_vc_light_stiff = feedback(G_vc_light_stiff, K_iff_vc, 'name', +1);
isstable(G_iff_vc_light_rigid) if not(isstable(G_iff_vc_light_rigid) && isstable(G_iff_vc_light_soft) &&isstable(G_iff_vc_light_stiff))
isstable(G_iff_vc_light_soft) warning("One of the damped plant with VC and decentralized IFF is not stable.");
isstable(G_iff_vc_light_stiff) end
% Stiff Nano-Hexapod % Stiff Nano-Hexapod
G_iff_pz_light_rigid = feedback(G_pz_light_rigid, K_iff_pz, 'name', +1); G_iff_pz_light_rigid = feedback(G_pz_light_rigid, K_iff_pz, 'name', +1);
G_iff_pz_light_soft = feedback(G_pz_light_soft , K_iff_pz, 'name', +1); G_iff_pz_light_soft = feedback(G_pz_light_soft , K_iff_pz, 'name', +1);
G_iff_pz_light_stiff = feedback(G_pz_light_stiff, K_iff_pz, 'name', +1); G_iff_pz_light_stiff = feedback(G_pz_light_stiff, K_iff_pz, 'name', +1);
isstable(G_iff_pz_light_rigid) if not(isstable(G_iff_pz_light_rigid) && isstable(G_iff_pz_light_soft) && isstable(G_iff_pz_light_stiff))
isstable(G_iff_pz_light_soft) warning("One of the damped plant with PZ and decentralized IFF is not stable.");
isstable(G_iff_pz_light_stiff) end
%% Compute closed-loop plants and verify stability %% Compute closed-loop plants and verify stability
% Soft Nano-Hexapod % Soft Nano-Hexapod
@ -343,18 +343,18 @@ G_hac_iff_vc_light_rigid = feedback(G_iff_vc_light_rigid, K_hac_vc, 'name', -1);
G_hac_iff_vc_light_soft = feedback(G_iff_vc_light_soft , K_hac_vc, 'name', -1); G_hac_iff_vc_light_soft = feedback(G_iff_vc_light_soft , K_hac_vc, 'name', -1);
G_hac_iff_vc_light_stiff = feedback(G_iff_vc_light_stiff, K_hac_vc, 'name', -1); G_hac_iff_vc_light_stiff = feedback(G_iff_vc_light_stiff, K_hac_vc, 'name', -1);
isstable(G_hac_iff_vc_light_rigid) if not(isstable(G_hac_iff_vc_light_rigid) && isstable(G_hac_iff_vc_light_soft) && isstable(G_hac_iff_vc_light_stiff))
isstable(G_hac_iff_vc_light_soft) warning("One of the damped plant with VC and decentralized IFF is not stable.");
isstable(G_hac_iff_vc_light_stiff) end
% Stiff Nano-Hexapod % Stiff Nano-Hexapod
G_hac_iff_pz_light_rigid = feedback(G_iff_pz_light_rigid, K_hac_pz, 'name', -1); G_hac_iff_pz_light_rigid = feedback(G_iff_pz_light_rigid, K_hac_pz, 'name', -1);
G_hac_iff_pz_light_soft = feedback(G_iff_pz_light_soft , K_hac_pz, 'name', -1); G_hac_iff_pz_light_soft = feedback(G_iff_pz_light_soft , K_hac_pz, 'name', -1);
G_hac_iff_pz_light_stiff = feedback(G_iff_pz_light_stiff, K_hac_pz, 'name', -1); G_hac_iff_pz_light_stiff = feedback(G_iff_pz_light_stiff, K_hac_pz, 'name', -1);
isstable(G_hac_iff_pz_light_rigid) if not(isstable(G_hac_iff_pz_light_rigid) && isstable(G_hac_iff_pz_light_soft) && isstable(G_hac_iff_pz_light_stiff))
isstable(G_hac_iff_pz_light_soft) warning("One of the damped plant with PZ and decentralized IFF is not stable.");
isstable(G_hac_iff_pz_light_stiff) end
%% Cumulative Amplitude Spectrum of d - Effect of Sample's flexibility %% Cumulative Amplitude Spectrum of d - Effect of Sample's flexibility
figure; figure;

View File

@ -1500,11 +1500,12 @@ load('meas_spindle_on.mat', 't', 'vg', 'vh');
spindle_off = load('meas_spindle_off.mat', 't', 'vg', 'vh'); % No Rotation spindle_off = load('meas_spindle_off.mat', 't', 'vg', 'vh'); % No Rotation
% Compute Power Spectral Density of the relative velocity between granite and hexapod during spindle rotation % Compute Power Spectral Density of the relative velocity between granite and hexapod during spindle rotation
Fs = 1/(t(2)-t(1)); % Sampling Frequency [Hz] Ts = t(2)-t(1); % Sampling Time [s]
win = hanning(ceil(2*Fs)); % Hanning window Nfft = floor(2/Ts);
win = hanning(Nfft);
[psd_vft, f] = pwelch(vh-vg, win, [], [], Fs); % [(m/s)^2/Hz] [psd_vft, f] = pwelch(vh-vg, win, Noverlap, Nfft, 1/Ts); % [(m/s)^2/Hz]
[psd_off, ~] = pwelch(spindle_off.vh-spindle_off.vg, win, [], [], Fs); % [(m/s)^2/Hz] [psd_off, ~] = pwelch(spindle_off.vh-spindle_off.vg, win, Noverlap, Nfft, 1/Ts); % [(m/s)^2/Hz]
% Disable the Nano-Hexpod for now % Disable the Nano-Hexpod for now
model_config = struct(); model_config = struct();
@ -1696,7 +1697,7 @@ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude $d/x_{f}$ [m/m]'); xlabel('Frequency [Hz]'); ylabel('Amplitude $d/x_{f}$ [m/m]'); xlabel('Frequency [Hz]');
xticks([1e0, 1e1, 1e2]); xticks([1e0, 1e1, 1e2]);
leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([1, 500]); xlim([1, 500]);
#+end_src #+end_src
@ -1751,7 +1752,7 @@ hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('CAS [m]'); xlabel('Frequency [Hz]'); ylabel('CAS [m]'); xlabel('Frequency [Hz]');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 2); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 2);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([1, 500]); xlim([1, 500]);
ylim([1e-12, 3e-6]) ylim([1e-12, 3e-6])
@ -1789,7 +1790,7 @@ hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('CAS [m]'); xlabel('Frequency [Hz]'); ylabel('CAS [m]'); xlabel('Frequency [Hz]');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([1, 500]); xlim([1, 500]);
ylim([1e-12, 3e-6]) ylim([1e-12, 3e-6])
@ -2960,19 +2961,25 @@ G_dvf_pz_heavy = feedback(G_pz_heavy, K_dvf_pz, 'name', +1);
#+begin_src matlab #+begin_src matlab
%% Verify Stability %% Verify Stability
% IFF % IFF
isstable(G_iff_vc_light) && isstable(G_iff_vc_mid) && isstable(G_iff_vc_heavy) && ... if not(isstable(G_iff_vc_light) && isstable(G_iff_vc_mid) && isstable(G_iff_vc_heavy) && ...
isstable(G_iff_md_light) && isstable(G_iff_md_mid) && isstable(G_iff_md_heavy) && ... isstable(G_iff_md_light) && isstable(G_iff_md_mid) && isstable(G_iff_md_heavy) && ...
isstable(G_iff_pz_light) && isstable(G_iff_pz_mid) && isstable(G_iff_pz_heavy) isstable(G_iff_pz_light) && isstable(G_iff_pz_mid) && isstable(G_iff_pz_heavy))
warning("One of the damped plant with decentralized IFF is not stable.");
end
% RDC % RDC
isstable(G_rdc_vc_light) && isstable(G_rdc_vc_mid) && isstable(G_rdc_vc_heavy) && ... if not(isstable(G_rdc_vc_light) && isstable(G_rdc_vc_mid) && isstable(G_rdc_vc_heavy) && ...
isstable(G_rdc_md_light) && isstable(G_rdc_md_mid) && isstable(G_rdc_md_heavy) && ... isstable(G_rdc_md_light) && isstable(G_rdc_md_mid) && isstable(G_rdc_md_heavy) && ...
isstable(G_rdc_pz_light) && isstable(G_rdc_pz_mid) && isstable(G_rdc_pz_heavy) isstable(G_rdc_pz_light) && isstable(G_rdc_pz_mid) && isstable(G_rdc_pz_heavy))
warning("One of the damped plant with decentralized RDC is not stable.");
end
% DVF % DVF
isstable(G_dvf_vc_light) && isstable(G_dvf_vc_mid) && isstable(G_dvf_vc_heavy) && ... if not(isstable(G_dvf_vc_light) && isstable(G_dvf_vc_mid) && isstable(G_dvf_vc_heavy) && ...
isstable(G_dvf_md_light) && isstable(G_dvf_md_mid) && isstable(G_dvf_md_heavy) && ... isstable(G_dvf_md_light) && isstable(G_dvf_md_mid) && isstable(G_dvf_md_heavy) && ...
isstable(G_dvf_pz_light) && isstable(G_dvf_pz_mid) && isstable(G_dvf_pz_heavy) isstable(G_dvf_pz_light) && isstable(G_dvf_pz_mid) && isstable(G_dvf_pz_heavy))
warning("One of the damped plant with decentralized DVF is not stable.");
end
#+end_src #+end_src
#+begin_src matlab :exports none :tangle no #+begin_src matlab :exports none :tangle no
@ -4253,7 +4260,7 @@ hold off;
set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin'); set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin');
xlabel('Real'); ylabel('Imag'); xlabel('Real'); ylabel('Imag');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([-3.8, 0.2]); ylim([-2, 2]); xlim([-3.8, 0.2]); ylim([-2, 2]);
axis square; axis square;
#+end_src #+end_src
@ -4280,7 +4287,7 @@ hold off;
set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin'); set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin');
xlabel('Real'); ylabel('Imag'); xlabel('Real'); ylabel('Imag');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([-3.8, 0.2]); ylim([-2, 2]); xlim([-3.8, 0.2]); ylim([-2, 2]);
axis square; axis square;
#+end_src #+end_src
@ -4307,7 +4314,7 @@ hold off;
set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin'); set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin');
xlabel('Real'); ylabel('Imag'); xlabel('Real'); ylabel('Imag');
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
xlim([-3.8, 0.2]); ylim([-2, 2]); xlim([-3.8, 0.2]); ylim([-2, 2]);
axis square; axis square;
#+end_src #+end_src
@ -4356,7 +4363,7 @@ ylabel('Loop Gain'); set(gca, 'XTickLabel',[]);
ylim([1e-3, 1e3]); ylim([1e-3, 1e3]);
yticks([1e-2, 1, 1e2]) yticks([1e-2, 1, 1e2])
leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); leg = legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
leg.ItemTokenSize(1) = 15 leg.ItemTokenSize(1) = 15;
ax2 = nexttile; ax2 = nexttile;
hold on; hold on;
@ -4501,11 +4508,17 @@ G_hac_iff_pz_heavy = feedback(G_iff_pz_heavy, K_hac_pz, 'name', -1);
#+begin_src matlab :exports none #+begin_src matlab :exports none
%% Verify Stability %% Verify Stability
isstable(G_hac_iff_vc_light) && isstable(G_hac_iff_vc_mid) && isstable(G_hac_iff_vc_heavy) if not(isstable(G_hac_iff_vc_light) && isstable(G_hac_iff_vc_mid) && isstable(G_hac_iff_vc_heavy))
warning("One of the damped plant with VC and decentralized IFF is not stable.");
end
isstable(G_hac_iff_md_light) && isstable(G_hac_iff_md_mid) && isstable(G_hac_iff_md_heavy) if not(isstable(G_hac_iff_md_light) && isstable(G_hac_iff_md_mid) && isstable(G_hac_iff_md_heavy))
warning("One of the damped plant with MD and decentralized IFF is not stable.");
end
isstable(G_hac_iff_pz_light) && isstable(G_hac_iff_pz_mid) && isstable(G_hac_iff_pz_heavy) if not(isstable(G_hac_iff_pz_light) && isstable(G_hac_iff_pz_mid) && isstable(G_hac_iff_pz_heavy))
warning("One of the damped plant with PZ and decentralized IFF is not stable.");
end
#+end_src #+end_src
#+begin_src matlab :exports none :results none #+begin_src matlab :exports none :results none
@ -6008,18 +6021,18 @@ G_iff_vc_light_rigid = feedback(G_vc_light_rigid, K_iff_vc, 'name', +1);
G_iff_vc_light_soft = feedback(G_vc_light_soft , K_iff_vc, 'name', +1); G_iff_vc_light_soft = feedback(G_vc_light_soft , K_iff_vc, 'name', +1);
G_iff_vc_light_stiff = feedback(G_vc_light_stiff, K_iff_vc, 'name', +1); G_iff_vc_light_stiff = feedback(G_vc_light_stiff, K_iff_vc, 'name', +1);
isstable(G_iff_vc_light_rigid) if not(isstable(G_iff_vc_light_rigid) && isstable(G_iff_vc_light_soft) &&isstable(G_iff_vc_light_stiff))
isstable(G_iff_vc_light_soft) warning("One of the damped plant with VC and decentralized IFF is not stable.");
isstable(G_iff_vc_light_stiff) end
% Stiff Nano-Hexapod % Stiff Nano-Hexapod
G_iff_pz_light_rigid = feedback(G_pz_light_rigid, K_iff_pz, 'name', +1); G_iff_pz_light_rigid = feedback(G_pz_light_rigid, K_iff_pz, 'name', +1);
G_iff_pz_light_soft = feedback(G_pz_light_soft , K_iff_pz, 'name', +1); G_iff_pz_light_soft = feedback(G_pz_light_soft , K_iff_pz, 'name', +1);
G_iff_pz_light_stiff = feedback(G_pz_light_stiff, K_iff_pz, 'name', +1); G_iff_pz_light_stiff = feedback(G_pz_light_stiff, K_iff_pz, 'name', +1);
isstable(G_iff_pz_light_rigid) if not(isstable(G_iff_pz_light_rigid) && isstable(G_iff_pz_light_soft) && isstable(G_iff_pz_light_stiff))
isstable(G_iff_pz_light_soft) warning("One of the damped plant with PZ and decentralized IFF is not stable.");
isstable(G_iff_pz_light_stiff) end
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
@ -6029,18 +6042,18 @@ G_hac_iff_vc_light_rigid = feedback(G_iff_vc_light_rigid, K_hac_vc, 'name', -1);
G_hac_iff_vc_light_soft = feedback(G_iff_vc_light_soft , K_hac_vc, 'name', -1); G_hac_iff_vc_light_soft = feedback(G_iff_vc_light_soft , K_hac_vc, 'name', -1);
G_hac_iff_vc_light_stiff = feedback(G_iff_vc_light_stiff, K_hac_vc, 'name', -1); G_hac_iff_vc_light_stiff = feedback(G_iff_vc_light_stiff, K_hac_vc, 'name', -1);
isstable(G_hac_iff_vc_light_rigid) if not(isstable(G_hac_iff_vc_light_rigid) && isstable(G_hac_iff_vc_light_soft) && isstable(G_hac_iff_vc_light_stiff))
isstable(G_hac_iff_vc_light_soft) warning("One of the damped plant with VC and decentralized IFF is not stable.");
isstable(G_hac_iff_vc_light_stiff) end
% Stiff Nano-Hexapod % Stiff Nano-Hexapod
G_hac_iff_pz_light_rigid = feedback(G_iff_pz_light_rigid, K_hac_pz, 'name', -1); G_hac_iff_pz_light_rigid = feedback(G_iff_pz_light_rigid, K_hac_pz, 'name', -1);
G_hac_iff_pz_light_soft = feedback(G_iff_pz_light_soft , K_hac_pz, 'name', -1); G_hac_iff_pz_light_soft = feedback(G_iff_pz_light_soft , K_hac_pz, 'name', -1);
G_hac_iff_pz_light_stiff = feedback(G_iff_pz_light_stiff, K_hac_pz, 'name', -1); G_hac_iff_pz_light_stiff = feedback(G_iff_pz_light_stiff, K_hac_pz, 'name', -1);
isstable(G_hac_iff_pz_light_rigid) if not(isstable(G_hac_iff_pz_light_rigid) && isstable(G_hac_iff_pz_light_soft) && isstable(G_hac_iff_pz_light_stiff))
isstable(G_hac_iff_pz_light_soft) warning("One of the damped plant with PZ and decentralized IFF is not stable.");
isstable(G_hac_iff_pz_light_stiff) end
#+end_src #+end_src
#+begin_src matlab :exports none :results none #+begin_src matlab :exports none :results none