Add functions to add platforms at .STEP files

This commit is contained in:
2020-11-03 08:50:54 +01:00
parent 58cd2026dc
commit 32330b92f0
23 changed files with 95501 additions and 99 deletions

View File

@@ -0,0 +1,48 @@
function [stewart] = initializeFlexibleStrutAndJointDynamics(stewart, args)
% initializeFlexibleStrutAndJointDynamics - Add Stiffness and Damping properties of each strut
%
% Syntax: [stewart] = initializeFlexibleStrutAndJointDynamics(args)
%
% Inputs:
% - args - Structure with the following fields:
% - K [nxn] - Vertical stiffness contribution of the piezoelectric stack [N/m]
% - M [nxn] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]
% - xi [1x1] - Vertical (residual) stiffness when the piezoelectric stack is removed [N/m]
% - step_file [6x1] - Vertical (residual) damping when the piezoelectric stack is removed [N/(m/s)]
% - Gf [6x1] - Gain from strain in [m] to measured [N] such that it matches
%
% Outputs:
% - stewart - updated Stewart structure with the added fields:
arguments
stewart
args.K double {mustBeNumeric} = zeros(6,6)
args.M double {mustBeNumeric} = zeros(6,6)
args.H double {mustBeNumeric} = 0
args.n_xyz double {mustBeNumeric} = zeros(2,3)
args.xi double {mustBeNumeric} = 0.1
args.Gf double {mustBeNumeric} = 1
args.step_file char {} = ''
end
stewart.actuators.ax_off = (stewart.geometry.l(1) - args.H)/2; % Axial Offset at the ends of the actuator
stewart.joints_F.type = 10;
stewart.joints_M.type = 10;
stewart.struts_F.type = 3;
stewart.struts_M.type = 3;
stewart.actuators.type = 4;
stewart.actuators.Km = args.K;
stewart.actuators.Mm = args.M;
stewart.actuators.n_xyz = args.n_xyz;
stewart.actuators.xi = args.xi;
stewart.actuators.step_file = args.step_file;
stewart.actuators.K = args.K(3,3); % Axial Stiffness
stewart.actuators.Gf = args.Gf;

View File

@@ -0,0 +1,30 @@
function [stewart] = initializeSolidPlatforms(stewart, args)
% initializeSolidPlatforms - Initialize the geometry of the Fixed and Mobile Platforms
%
% Syntax: [stewart] = initializeSolidPlatforms(args)
%
% Inputs:
% - args - Structure with the following fields:
% - density [1x1] - Density of the platforms [kg]
%
% Outputs:
% - stewart - updated Stewart structure with the added fields:
% - platform_F [struct] - structure with the following fields:
% - type = 2
% - M [1x1] - Fixed Platform Density [kg/m^3]
% - platform_M [struct] - structure with the following fields:
% - type = 2
% - M [1x1] - Mobile Platform Density [kg/m^3]
arguments
stewart
args.density (1,1) double {mustBeNumeric, mustBePositive} = 7800
end
stewart.platform_F.type = 2;
stewart.platform_F.density = args.density;
stewart.platform_M.type = 2;
stewart.platform_M.density = args.density;