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

@ -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'); save('mat/nass_disturbances.mat', 'Dwx', 'Dwy', 'Dwz', 'Fty_x', 'Fty_z', 'Frz_z', 'Fd', 'Ts', 't');
#+end_src #+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 * Initialize Elements
:PROPERTIES: :PROPERTIES:
:ID: a0819dea-8d7a-4d55-b961-2b2ca2312344 :ID: a0819dea-8d7a-4d55-b961-2b2ca2312344
@ -1311,21 +1371,22 @@ This Matlab function is accessible [[file:../src/initializeSample.m][here]].
#+begin_src matlab #+begin_src matlab
function [sample] = initializeSample(sample) function [sample] = initializeSample(sample)
arguments arguments
sample.radius (1,1) double {mustBeNumeric, mustBePositive} = 100 sample.radius (1,1) double {mustBeNumeric, mustBePositive} = 100 % [mm]
sample.height (1,1) double {mustBeNumeric, mustBePositive} = 300 sample.height (1,1) double {mustBeNumeric, mustBePositive} = 300 % [mm]
sample.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 sample.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 % [kg]
sample.offset (1,1) double {mustBeNumeric} = 0 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] sample.color (1,3) double {mustBeNumeric} = [0.45, 0.45, 0.45]
end 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.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.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); sample.c.z = 0.1*sqrt(sample.k.z*sample.mass);
%% Save %% 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