Change indentation
This commit is contained in:
parent
2285284e91
commit
e02f522e81
@ -938,11 +938,12 @@ xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
||||
legend('location', 'southeast');
|
||||
ylim([1e-8, 1e0]);
|
||||
|
||||
% SVD decoupling performances :noexport:
|
||||
% SVD decoupling performances
|
||||
% As the SVD is applied on a *real approximation* of the plant dynamics at a frequency $\omega_0$, it is foreseen that the effectiveness of the decoupling depends on the validity of the real approximation.
|
||||
|
||||
% Let's do the SVD decoupling on a plant that is mostly real (low damping) and one with a large imaginary part (larger damping).
|
||||
|
||||
la = l/2; % Position of Act. [m]
|
||||
ha = 0; % Position of Act. [m]
|
||||
% Start with small damping, the obtained diagonal and off-diagonal terms are shown in Figure [[fig:gravimeter_svd_low_damping]].
|
||||
|
||||
c = 2e1; % Actuator Damping [N/(m/s)]
|
||||
|
||||
@ -970,6 +971,37 @@ H1 = pinv(D*real(H1'*diag(exp(j*angle(diag(H1*D*H1.'))/2))));
|
||||
[U,S,V] = svd(H1);
|
||||
Gsvd = inv(U)*G*inv(V');
|
||||
|
||||
figure;
|
||||
|
||||
% Magnitude
|
||||
hold on;
|
||||
for i_in = 1:3
|
||||
for i_out = [1:i_in-1, i_in+1:3]
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvd(i_out, i_in), freqs, 'Hz'))), 'color', [0,0,0,0.2], ...
|
||||
'HandleVisibility', 'off');
|
||||
end
|
||||
end
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvd(i_out, i_in), freqs, 'Hz'))), 'color', [0,0,0,0.2], ...
|
||||
'DisplayName', '$G_{svd}(i,j)\ i \neq j$');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
for i_in_out = 1:3
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvd(i_in_out, i_in_out), freqs, 'Hz'))), 'DisplayName', sprintf('$G_{svd}(%d,%d)$', i_in_out, i_in_out));
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
||||
legend('location', 'northwest');
|
||||
ylim([1e-8, 1e0]);
|
||||
|
||||
|
||||
|
||||
% #+name: fig:gravimeter_svd_low_damping
|
||||
% #+caption: Diagonal and off-diagonal term when decoupling with SVD on the gravimeter with small damping
|
||||
% #+RESULTS:
|
||||
% [[file:figs/gravimeter_svd_low_damping.png]]
|
||||
|
||||
% Now take a larger damping, the obtained diagonal and off-diagonal terms are shown in Figure [[fig:gravimeter_svd_high_damping]].
|
||||
|
||||
c = 5e2; % Actuator Damping [N/(m/s)]
|
||||
|
||||
%% Name of the Simulink File
|
||||
@ -996,63 +1028,6 @@ H1 = pinv(D*real(H1'*diag(exp(j*angle(diag(H1*D*H1.'))/2))));
|
||||
[U,S,V] = svd(H1);
|
||||
Gsvdd = inv(U)*G*inv(V');
|
||||
|
||||
JMa = [1 0 -h/2
|
||||
0 1 l/2
|
||||
1 0 h/2
|
||||
0 1 0];
|
||||
|
||||
JMt = [1 0 -ha
|
||||
0 1 la
|
||||
0 1 -la];
|
||||
|
||||
GM = pinv(JMa)*G*pinv(JMt');
|
||||
GM.InputName = {'Fx', 'Fy', 'Mz'};
|
||||
GM.OutputName = {'Dx', 'Dy', 'Rz'};
|
||||
|
||||
figure;
|
||||
|
||||
% Magnitude
|
||||
hold on;
|
||||
for i_in = 1:3
|
||||
for i_out = [1:i_in-1, i_in+1:3]
|
||||
plot(freqs, abs(squeeze(freqresp(GM(i_out, i_in), freqs, 'Hz'))), 'color', [0,0,0,0.2], ...
|
||||
'HandleVisibility', 'off');
|
||||
end
|
||||
end
|
||||
plot(freqs, abs(squeeze(freqresp(GM(i_out, i_in), freqs, 'Hz'))), 'color', [0,0,0,0.2], ...
|
||||
'DisplayName', '$G_x(i,j)\ i \neq j$');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
for i_in_out = 1:3
|
||||
plot(freqs, abs(squeeze(freqresp(GM(i_in_out, i_in_out), freqs, 'Hz'))), 'DisplayName', sprintf('$G_x(%d,%d)$', i_in_out, i_in_out));
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
||||
legend('location', 'southeast');
|
||||
ylim([1e-8, 1e0]);
|
||||
|
||||
figure;
|
||||
|
||||
% Magnitude
|
||||
hold on;
|
||||
for i_in = 1:3
|
||||
for i_out = [1:i_in-1, i_in+1:3]
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvd(i_out, i_in), freqs, 'Hz'))), 'color', [0,0,0,0.2], ...
|
||||
'HandleVisibility', 'off');
|
||||
end
|
||||
end
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvd(i_out, i_in), freqs, 'Hz'))), 'color', [0,0,0,0.2], ...
|
||||
'DisplayName', '$G_x(i,j)\ i \neq j$');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
for i_in_out = 1:3
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvd(i_in_out, i_in_out), freqs, 'Hz'))), 'DisplayName', sprintf('$G_x(%d,%d)$', i_in_out, i_in_out));
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
||||
legend('location', 'southeast');
|
||||
ylim([1e-8, 1e0]);
|
||||
|
||||
figure;
|
||||
|
||||
% Magnitude
|
||||
@ -1064,13 +1039,13 @@ for i_in = 1:3
|
||||
end
|
||||
end
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvdd(i_out, i_in), freqs, 'Hz'))), 'color', [0,0,0,0.2], ...
|
||||
'DisplayName', '$G_x(i,j)\ i \neq j$');
|
||||
'DisplayName', '$G_{svd}(i,j)\ i \neq j$');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
for i_in_out = 1:3
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvdd(i_in_out, i_in_out), freqs, 'Hz'))), 'DisplayName', sprintf('$G_x(%d,%d)$', i_in_out, i_in_out));
|
||||
plot(freqs, abs(squeeze(freqresp(Gsvdd(i_in_out, i_in_out), freqs, 'Hz'))), 'DisplayName', sprintf('$G_{svd}(%d,%d)$', i_in_out, i_in_out));
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
||||
legend('location', 'southeast');
|
||||
legend('location', 'northwest');
|
||||
ylim([1e-8, 1e0]);
|
||||
|
686
index.html
686
index.html
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user