+
+We now compute the PSD of the measured motion by the inertial sensors during the huddle test.
+
+
+
ht = load('./mat/huddle_test.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
+
+
+
+
+
[p_d, f] = pwelch(ht.d, win, [], [], 1/Ts);
+[p_acc1, ~] = pwelch(ht.acc_1, win, [], [], 1/Ts);
+[p_acc2, ~] = pwelch(ht.acc_2, win, [], [], 1/Ts);
+[p_geo1, ~] = pwelch(ht.geo_1, win, [], [], 1/Ts);
+[p_geo2, ~] = pwelch(ht.geo_2, win, [], [], 1/Ts);
+
+
+
+
+Using an estimated model of the sensor dynamics from the documentation of the sensors, we can compute the ASD of the motion in \(m/\sqrt{Hz}\) measured by the sensors.
+
+
+
G_acc = 1/(1 + s/2/pi/2500); % [V/(m/s2)]
+G_geo = -120*s^2/(s^2 + 2*0.7*2*pi*2*s + (2*pi*2)^2); % [V/(m/s)]
+
+
+
+
+
+
+
+From the ASD of the motion measured by the sensors, we can create an excitation signal that will generate much motion motion that the motion under no excitation.
+
+
+
+We create G_exc
that corresponds to the wanted generated motion.
+
+
+
G_exc = 0.2e-6/(1 + s/2/pi/2)/(1 + s/2/pi/50);
+
+
+
+
+And we create a time domain signal y_d
that have the spectral density described by G_exc
.
+
+
+
Fs = 1/Ts;
+t = 0:Ts:180; % Time Vector [s]
+u = sqrt(Fs/2)*randn(length(t), 1); % Signal with an ASD equal to one
+
+y_d = lsim(G_exc, u, t);
+
+
+
+
+
[pxx, ~] = pwelch(y_d, win, 0, [], Fs);
+
+
+
+
+
+
+
+
+We can now generate the voltage signal that will generate the wanted motion.
+
+
+
y_v = lsim(G_exc * ... % from unit PSD to shaped PSD
+ (1 + s/2/pi/50) * ... % Inverse of pre-filter included in the Simulink file
+ 1/G_d_est * ... % Wanted displacement => required voltage
+ 1/(1 + s/2/pi/5e3), ... % Add some high frequency filtering
+ u, t);
+
+
+
+
+
+