Remove org comments in tangled matlab functions

This commit is contained in:
2019-12-11 14:46:31 +01:00
parent 89db48f81e
commit eda325fae2
27 changed files with 235 additions and 373 deletions

View File

@@ -1,14 +1,3 @@
% computePsdDispl
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/computePsdDispl.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:computePsdDispl>>
% This Matlab function is accessible [[file:../src/computePsdDispl.m][here]].
function [psd_object] = computePsdDispl(sys_data, t_init, n_av)
i_init = find(sys_data.time > t_init, 1);

View File

@@ -1,14 +1,3 @@
% computeReferencePose
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/computeReferencePose.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:computeReferencePose>>
% This Matlab function is accessible [[file:src/computeReferencePose.m][here]].
function [WTr] = computeReferencePose(Dy, Ry, Rz, Dh, Dn)
% computeReferencePose - Compute the homogeneous transformation matrix corresponding to the wanted pose of the sample
%

View File

@@ -1,14 +1,3 @@
% computeSetpoint
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/computeSetpoint.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:computeSetpoint>>
% This Matlab function is accessible [[file:../src/computeSetpoint.m][here]].
function setpoint = computeSetpoint(ty, ry, rz)
%%
setpoint = zeros(6, 1);

View File

@@ -1,14 +1,3 @@
% converErrorBasis
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/converErrorBasis.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:converErrorBasis>>
% This Matlab function is accessible [[file:../src/converErrorBasis.m][here]].
function error_nass = convertErrorBasis(pos, setpoint, ty, ry, rz)
% convertErrorBasis -
%

View File

@@ -1,14 +1,3 @@
% generateDiagPidControl
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/generateDiagPidControl.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:generateDiagPidControl>>
% This Matlab function is accessible [[file:../src/generateDiagPidControl.m][here]].
function [K] = generateDiagPidControl(G, fs)
%%
pid_opts = pidtuneOptions(...

View File

@@ -1,14 +1,3 @@
% identifyPlant
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/identifyPlant.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:identifyPlant>>
% This Matlab function is accessible [[file:../src/identifyPlant.m][here]].
function [sys] = identifyPlant(opts_param)
%% Default values for opts
opts = struct();

View File

@@ -1,14 +1,3 @@
% Function that initialize the disturbances
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initDisturbances.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initDisturbances>>
% This Matlab function is accessible [[file:src/initDisturbances.m][here]].
function [] = initDisturbances(opts_param)
% initDisturbances - Initialize the disturbances
%
@@ -17,8 +6,6 @@ function [] = initDisturbances(opts_param)
% Inputs:
% - opts_param -
% Default values for the Options
%% Default values for opts
opts = struct();
@@ -29,22 +16,13 @@ if exist('opts_param','var')
end
end
% Load Data
load('./disturbances/mat/dist_psd.mat', 'dist_f');
% We remove the first frequency point that usually is very large.
dist_f.f = dist_f.f(2:end);
dist_f.psd_gm = dist_f.psd_gm(2:end);
dist_f.psd_ty = dist_f.psd_ty(2:end);
dist_f.psd_rz = dist_f.psd_rz(2:end);
% Parameters
% We define some parameters that will be used in the algorithm.
Fs = 2*dist_f.f(end); % Sampling Frequency of data is twice the maximum frequency of the PSD vector [Hz]
N = 2*length(dist_f.f); % Number of Samples match the one of the wanted PSD
T0 = N/Fs; % Signal Duration [s]
@@ -53,8 +31,6 @@ df = 1/T0; % Frequency resolution of the DFT [Hz]
t = linspace(0, T0, N+1)'; % Time Vector [s]
Ts = 1/Fs; % Sampling Time [s]
% Ground Motion
phi = dist_f.psd_gm;
C = zeros(N/2,1);
for i = 1:N/2
@@ -77,8 +53,6 @@ Cx = [Cx; flipud(conj(Cx(2:end)))];;
u = N/sqrt(2)*ifft(Cx); % Ground Motion - z direction [m]
Dwz = u;
% Translation Stage - X direction
phi = dist_f.psd_ty; % TODO - we take here the vertical direction which is wrong but approximate
C = zeros(N/2,1);
for i = 1:N/2
@@ -90,8 +64,6 @@ Cx = [Cx; flipud(conj(Cx(2:end)))];;
u = N/sqrt(2)*ifft(Cx); % Disturbance Force Ty x [N]
Fty_x = u;
% Translation Stage - Z direction
phi = dist_f.psd_ty;
C = zeros(N/2,1);
for i = 1:N/2
@@ -103,8 +75,6 @@ Cx = [Cx; flipud(conj(Cx(2:end)))];;
u = N/sqrt(2)*ifft(Cx); % Disturbance Force Ty z [N]
Fty_z = u;
% Spindle - Z direction
phi = dist_f.psd_rz;
C = zeros(N/2,1);
for i = 1:N/2
@@ -116,13 +86,9 @@ Cx = [Cx; flipud(conj(Cx(2:end)))];;
u = N/sqrt(2)*ifft(Cx); % Disturbance Force Rz z [N]
Frz_z = u;
% Direct Forces
u = zeros(length(t), 6);
Fd = u;
% Set initial value to zero
Dwx = Dwx - Dwx(1);
Dwy = Dwy - Dwy(1);
Dwz = Dwz - Dwz(1);
@@ -130,6 +96,4 @@ Fty_x = Fty_x - Fty_x(1);
Fty_z = Fty_z - Fty_z(1);
Frz_z = Frz_z - Frz_z(1);
% Save
save('./mat/nass_disturbances.mat', 'Dwx', 'Dwy', 'Dwz', 'Fty_x', 'Fty_z', 'Frz_z', 'Fd', 'Ts', 't');

View File

@@ -1,14 +1,3 @@
% Center of gravity compensation
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeAxisc.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeAxisc>>
% This Matlab function is accessible [[file:../src/initializeAxisc.m][here]].
function [axisc] = initializeAxisc()
%%
axisc = struct();

View File

@@ -1,14 +1,3 @@
% Cedrat Actuator
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeCedratPiezo.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeCedratPiezo>>
% This Matlab function is accessible [[file:../src/initializeCedratPiezo.m][here]].
function [cedrat] = initializeCedratPiezo(opts_param)
%% Default values for opts
opts = struct();

View File

@@ -1,14 +1,3 @@
% Experiment
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeExperiment.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeExperiment>>
% This Matlab function is accessible [[file:../src/initializeExperiment.m][here]].
function [] = initializeExperiment(exp_name, sys_mass)
if strcmp(exp_name, 'tomography')
if strcmp(sys_mass, 'light')

View File

@@ -1,14 +1,3 @@
% Granite
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeGranite.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeGranite>>
% This Matlab function is accessible [[file:../src/initializeGranite.m][here]].
function [granite] = initializeGranite(opts_param)
%% Default values for opts
opts = struct('rigid', false);

View File

@@ -1,14 +1,3 @@
% Ground
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeGround.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeGround>>
% This Matlab function is accessible [[file:../src/initializeGround.m][here]].
function [ground] = initializeGround()
%%
ground = struct();

View File

@@ -1,16 +1,3 @@
% TODO Inputs
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeInputs.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeInputs>>
% - [ ] *This function should not be used anymore*. Now there are two functions to initialize disturbances and references.
% This Matlab function is accessible [[file:../src/initializeInputs.m][here]].
function [inputs] = initializeInputs(opts_param)
%% Default values for opts
opts = struct( ...

View File

@@ -1,14 +1,3 @@
% Micro Hexapod
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeMicroHexapod.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeMicroHexapod>>
% This Matlab function is accessible [[file:../src/initializeMicroHexapod.m][here]].
function [micro_hexapod] = initializeMicroHexapod(opts_param)
%% Default values for opts
opts = struct(...

View File

@@ -1,14 +1,3 @@
% Mirror
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeMirror.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeMirror>>
% This Matlab function is accessible [[file:../src/initializeMirror.m][here]].
function [] = initializeMirror(opts_param)
%% Default values for opts
opts = struct(...

View File

@@ -1,14 +1,3 @@
% Nano Hexapod
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeNanoHexapod.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeNanoHexapod>>
% This Matlab function is accessible [[file:../src/initializeNanoHexapod.m][here]].
function [nano_hexapod] = initializeNanoHexapod(opts_param)
%% Default values for opts
opts = struct('actuator', 'piezo');

View File

@@ -1,14 +1,3 @@
% Generate Reference Signals
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeReferences.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeReferences>>
% This Matlab function is accessible [[file:../src/initializeInputs.m][here]].
function [ref] = initializeReferences(opts_param)
%% Default values for opts
opts = struct( ...

View File

@@ -1,14 +1,3 @@
% Tilt Stage
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeRy.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeRy>>
% This Matlab function is accessible [[file:../src/initializeRy.m][here]].
function [ry] = initializeRy(opts_param)
%% Default values for opts
opts = struct('rigid', false);

View File

@@ -1,14 +1,3 @@
% Spindle
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeRz.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeRz>>
% This Matlab function is accessible [[file:../src/initializeRz.m][here]].
function [rz] = initializeRz(opts_param)
%% Default values for opts
opts = struct('rigid', false);

View File

@@ -1,14 +1,3 @@
% Sample
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeSample.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeSample>>
% This Matlab function is accessible [[file:../src/initializeSample.m][here]].
function [sample] = initializeSample(opts_param)
%% Default values for opts
sample = struct('radius', 100, ...

View File

@@ -1,14 +1,3 @@
% Translation Stage
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/initializeTy.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:initializeTy>>
% This Matlab function is accessible [[file:../src/initializeTy.m][here]].
function [ty] = initializeTy(opts_param)
%% Default values for opts
opts = struct('rigid', false);

View File

@@ -1,14 +1,3 @@
% Inverse Kinematics of the Hexapod
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/inverseKinematicsHexapod.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:inverseKinematicsHexapod>>
% This Matlab function is accessible [[file:src/inverseKinematicsHexapod.m][here]].
function [L] = inverseKinematicsHexapod(hexapod, AP, ARB)
% inverseKinematicsHexapod - Compute the initial position of each leg to have the wanted Hexapod's position
%

View File

@@ -1,14 +1,3 @@
% runSimulation
% :PROPERTIES:
% :header-args:matlab+: :tangle ../src/runSimulation.m
% :header-args:matlab+: :comments org :mkdirp yes
% :header-args:matlab+: :eval no :results none
% :END:
% <<sec:runSimulation>>
% This Matlab function is accessible [[file:../src/runSimulation.m][here]].
function [] = runSimulation(sys_name, sys_mass, ctrl_type, act_damp)
%% Load the controller and save it for the simulation
if strcmp(ctrl_type, 'cl') && strcmp(act_damp, 'none')