Add .mat files

This commit is contained in:
Thomas Dehaeze 2021-08-11 00:28:55 +02:00
parent 3f2d54dc7f
commit 1792ed5fb7
12 changed files with 35 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
matlab/mat/Kiff_opt.mat Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,35 @@
function [ref] = generateSpiralAngleTrajectory(args)
% generateSpiralAngleTrajectory -
%
% Syntax: [ref] = generateSpiralAngleTrajectory(args)
%
% Inputs:
% - args
%
% Outputs:
% - ref - Reference Signal
arguments
args.R_tot (1,1) double {mustBeNumeric, mustBePositive} = 10e-6 % [rad]
args.n_turn (1,1) double {mustBeInteger, mustBePositive} = 5 % [-]
args.Ts (1,1) double {mustBeNumeric, mustBePositive} = 1e-3 % [s]
args.t_turn (1,1) double {mustBeNumeric, mustBePositive} = 1 % [s]
args.t_end (1,1) double {mustBeNumeric, mustBePositive} = 1 % [s]
end
time_s = 0:args.Ts:args.n_turn*args.t_turn;
time_e = 0:args.Ts:args.t_end;
Rx = sin(2*pi*time_s/args.t_turn).*(args.R_tot*time_s/(args.n_turn*args.t_turn));
Ry = cos(2*pi*time_s/args.t_turn).*(args.R_tot*time_s/(args.n_turn*args.t_turn));
Rx = [Rx, 0*time_e];
Ry = [Ry, Ry(end) - Ry(end)*time_e/args.t_end];
t = 0:args.Ts:args.Ts*(length(Rx) - 1);
ref = zeros(length(Rx), 7);
ref(:, 1) = t;
ref(:, 5) = Rx;
ref(:, 6) = Ry;