2020-01-22 17:42:21 +01:00
|
|
|
function [stewart] = initializeStrutDynamics(stewart, args)
|
|
|
|
% initializeStrutDynamics - Add Stiffness and Damping properties of each strut
|
|
|
|
%
|
|
|
|
% Syntax: [stewart] = initializeStrutDynamics(args)
|
|
|
|
%
|
|
|
|
% Inputs:
|
|
|
|
% - args - Structure with the following fields:
|
2020-05-04 12:03:08 +02:00
|
|
|
% - K [6x1] - Stiffness of each strut [N/m]
|
|
|
|
% - C [6x1] - Damping of each strut [N/(m/s)]
|
2020-01-22 17:42:21 +01:00
|
|
|
%
|
|
|
|
% Outputs:
|
|
|
|
% - stewart - updated Stewart structure with the added fields:
|
2020-05-04 12:03:08 +02:00
|
|
|
% - actuators.type = 1
|
|
|
|
% - actuators.K [6x1] - Stiffness of each strut [N/m]
|
|
|
|
% - actuators.C [6x1] - Damping of each strut [N/(m/s)]
|
2020-01-22 17:42:21 +01:00
|
|
|
|
|
|
|
arguments
|
|
|
|
stewart
|
2020-05-04 12:03:08 +02:00
|
|
|
args.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 20e6*ones(6,1)
|
|
|
|
args.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 2e1*ones(6,1)
|
2020-01-22 17:42:21 +01:00
|
|
|
end
|
|
|
|
|
2020-05-04 12:03:08 +02:00
|
|
|
stewart.actuators.type = 1;
|
|
|
|
|
|
|
|
stewart.actuators.K = args.K;
|
|
|
|
stewart.actuators.C = args.C;
|