Add Z-axis accelerometer and geophone subsystems

This commit is contained in:
Thomas Dehaeze 2020-01-16 11:49:13 +01:00
parent 3367cabc70
commit 6356b40f5f
8 changed files with 112 additions and 15 deletions

Binary file not shown.

Binary file not shown.

View File

@ -101,15 +101,15 @@ This Matlab function is accessible [[file:../src/initializeInputs.m][here]].
*** Initialize Parameters
#+begin_src matlab
%% Set Sampling Time
Ts = args.Ts;
Tmax = args.Tmax;
%% Set Sampling Time
Ts = args.Ts;
Tmax = args.Tmax;
%% Low Pass Filter to filter out the references
s = zpk('s');
w0 = 2*pi*10;
xi = 1;
H_lpf = 1/(1 + 2*xi/w0*s + s^2/w0^2);
%% Low Pass Filter to filter out the references
s = zpk('s');
w0 = 2*pi*10;
xi = 1;
H_lpf = 1/(1 + 2*xi/w0*s + s^2/w0^2);
#+end_src
*** Translation Stage
@ -462,6 +462,66 @@ We define some parameters that will be used in the algorithm.
save('mat/nass_disturbances.mat', 'Dwx', 'Dwy', 'Dwz', 'Fty_x', 'Fty_z', 'Frz_z', 'Fd', 'Ts', 't');
#+end_src
** Z-Axis Geophone
:PROPERTIES:
:header-args:matlab+: :tangle ../src/initializeZAxisGeophone.m
:header-args:matlab+: :comments none :mkdirp yes :eval no
:END:
<<sec:initializeZAxisGeophone>>
This Matlab function is accessible [[file:../src/initializeZAxisGeophone.m][here]].
#+begin_src matlab
function [geophone] = initializeZAxisGeophone(args)
arguments
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 1e-3 % [kg]
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 1 % [Hz]
end
%%
geophone.m = args.mass;
%% The Stiffness is set to have the damping resonance frequency
geophone.k = geophone.m * (2*pi*args.freq)^2;
%% We set the damping value to have critical damping
geophone.c = 2*sqrt(geophone.m * geophone.k);
%% Save
save('./mat/geophone_z_axis.mat', 'geophone');
end
#+end_src
** Z-Axis Accelerometer
:PROPERTIES:
:header-args:matlab+: :tangle ../src/initializeZAxisAccelerometer.m
:header-args:matlab+: :comments none :mkdirp yes :eval no
:END:
<<sec:initializeZAxisAccelerometer>>
This Matlab function is accessible [[file:../src/initializeZAxisAccelerometer.m][here]].
#+begin_src matlab
function [accelerometer] = initializeZAxisAccelerometer(args)
arguments
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 1e-3 % [kg]
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 5e2 % [Hz]
end
%%
accelerometer.m = args.mass;
%% The Stiffness is set to have the damping resonance frequency
accelerometer.k = accelerometer.m * (2*pi*args.freq)^2;
%% We set the damping value to have critical damping
accelerometer.c = 2*sqrt(accelerometer.m * accelerometer.k);
%% Save
save('./mat/accelerometer_z_axis.mat', 'accelerometer');
end
#+end_src
* Initialize Elements
:PROPERTIES:
:ID: a0819dea-8d7a-4d55-b961-2b2ca2312344
@ -1311,21 +1371,22 @@ This Matlab function is accessible [[file:../src/initializeSample.m][here]].
#+begin_src matlab
function [sample] = initializeSample(sample)
arguments
sample.radius (1,1) double {mustBeNumeric, mustBePositive} = 100
sample.height (1,1) double {mustBeNumeric, mustBePositive} = 300
sample.mass (1,1) double {mustBeNumeric, mustBePositive} = 50
sample.offset (1,1) double {mustBeNumeric} = 0
sample.radius (1,1) double {mustBeNumeric, mustBePositive} = 100 % [mm]
sample.height (1,1) double {mustBeNumeric, mustBePositive} = 300 % [mm]
sample.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 % [kg]
sample.freq (1,1) double {mustBeNumeric, mustBePositive} = 100 % [Hz]
sample.offset (1,1) double {mustBeNumeric} = 0 % [mm]
sample.color (1,3) double {mustBeNumeric} = [0.45, 0.45, 0.45]
end
%%
sample.k.x = 1e8;
sample.k.x = sample.mass * (2*pi * sample.freq)^2;
sample.c.x = 0.1*sqrt(sample.k.x*sample.mass);
sample.k.y = 1e8;
sample.k.y = sample.mass * (2*pi * sample.freq)^2;
sample.c.y = 0.1*sqrt(sample.k.y*sample.mass);
sample.k.z = 1e8;
sample.k.z = sample.mass * (2*pi * sample.freq)^2;
sample.c.z = 0.1*sqrt(sample.k.z*sample.mass);
%% Save

View File

@ -0,0 +1,18 @@
function [accelerometer] = initializeZAxisAccelerometer(args)
arguments
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 1e-3 % [kg]
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 5e2 % [Hz]
end
%%
accelerometer.m = args.mass;
%% The Stiffness is set to have the damping resonance frequency
accelerometer.k = accelerometer.m * (2*pi*args.freq)^2;
%% We set the damping value to have critical damping
accelerometer.c = 2*sqrt(accelerometer.m * accelerometer.k);
%% Save
save('./mat/accelerometer_z_axis.mat', 'accelerometer');
end

View File

@ -0,0 +1,18 @@
function [geophone] = initializeZAxisGeophone(args)
arguments
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 1e-3 % [kg]
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 1 % [Hz]
end
%%
geophone.m = args.mass;
%% The Stiffness is set to have the damping resonance frequency
geophone.k = geophone.m * (2*pi*args.freq)^2;
%% We set the damping value to have critical damping
geophone.c = 2*sqrt(geophone.m * geophone.k);
%% Save
save('./mat/geophone_z_axis.mat', 'geophone');
end