Add .mat files
This commit is contained in:
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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;
|
||||
Reference in New Issue
Block a user