Add stiffness to flexible joints
This commit is contained in:
parent
f06a119922
commit
b4957079f5
@ -105,6 +105,19 @@ An important difference from basic Simulink models is that the states in a physi
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* States as the motion of the mobile platform
|
* States as the motion of the mobile platform
|
||||||
|
** Matlab Init :noexport:ignore:
|
||||||
|
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||||
|
<<matlab-dir>>
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none :results silent :noweb yes
|
||||||
|
<<matlab-init>>
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :results none :exports none
|
||||||
|
simulinkproject('./');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Initialize the Stewart Platform
|
** Initialize the Stewart Platform
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
stewart = initializeFramesPositions();
|
stewart = initializeFramesPositions();
|
||||||
|
@ -5,27 +5,46 @@ function [stewart] = initializeJointDynamics(stewart, args)
|
|||||||
%
|
%
|
||||||
% Inputs:
|
% Inputs:
|
||||||
% - args - Structure with the following fields:
|
% - args - Structure with the following fields:
|
||||||
% - Kbi [6x1] - Rotational Stiffness for each top spherical joints [N/rad]
|
% - Ksbi [6x1] - Bending (Rx, Ry) Stiffness for each top Spherical joints [N/rad]
|
||||||
% - Cbi [6x1] - Damping of each top spherical joint [N/(rad/s)]
|
% - Csbi [6x1] - Bending (Rx, Ry) Damping of each top Spherical joint [N/(rad/s)]
|
||||||
% - Kti [6x1] - Rotational Stiffness for each bottom universal joints [N/rad]
|
% - Ksti [6x1] - Torsion (Rz) Stiffness for each top Spherical joints [N/rad]
|
||||||
% - Cti [6x1] - Damping of each bottom universal joint [N/(rad/s)]
|
% - Csti [6x1] - Torsion (Rz) Damping of each top Spherical joint [N/(rad/s)]
|
||||||
|
% - Kubi [6x1] - Bending (Rx, Ry) Stiffness for each bottom Universal joints [N/rad]
|
||||||
|
% - Cubi [6x1] - Bending (Rx, Ry) Damping of each bottom Universal joint [N/(rad/s)]
|
||||||
|
% - disable [true/false] - Sets all the stiffness/damping to zero
|
||||||
%
|
%
|
||||||
% Outputs:
|
% Outputs:
|
||||||
% - stewart - updated Stewart structure with the added fields:
|
% - stewart - updated Stewart structure with the added fields:
|
||||||
% - Kbi [6x1] - Rotational Stiffness for each top spherical joints [N/rad]
|
% - Ksbi [6x1] - Bending (Rx, Ry) Stiffness for each top Spherical joints [N/rad]
|
||||||
% - Cbi [6x1] - Damping of each top spherical joint [N/(rad/s)]
|
% - Csbi [6x1] - Bending (Rx, Ry) Damping of each top Spherical joint [N/(rad/s)]
|
||||||
% - Kti [6x1] - Rotational Stiffness for each bottom universal joints [N/rad]
|
% - Ksti [6x1] - Torsion (Rz) Stiffness for each top Spherical joints [N/rad]
|
||||||
% - Cti [6x1] - Damping of each bottom universal joint [N/(rad/s)]
|
% - Csti [6x1] - Torsion (Rz) Damping of each top Spherical joint [N/(rad/s)]
|
||||||
|
% - Kubi [6x1] - Bending (Rx, Ry) Stiffness for each bottom Universal joints [N/rad]
|
||||||
|
% - Cubi [6x1] - Bending (Rx, Ry) Damping of each bottom Universal joint [N/(rad/s)]
|
||||||
|
|
||||||
arguments
|
arguments
|
||||||
stewart
|
stewart
|
||||||
args.Kti (6,1) double {mustBeNumeric, mustBeNonnegative} = zeros(6,1)
|
args.Ksbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e+1*ones(6,1)
|
||||||
args.Cti (6,1) double {mustBeNumeric, mustBeNonnegative} = zeros(6,1)
|
args.Csbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-4*ones(6,1)
|
||||||
args.Kbi (6,1) double {mustBeNumeric, mustBeNonnegative} = zeros(6,1)
|
args.Ksti (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e+0*ones(6,1)
|
||||||
args.Cbi (6,1) double {mustBeNumeric, mustBeNonnegative} = zeros(6,1)
|
args.Csti (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-3*ones(6,1)
|
||||||
|
args.Kubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e+1*ones(6,1)
|
||||||
|
args.Cubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-4*ones(6,1)
|
||||||
|
args.disable logical {mustBeNumericOrLogical} = false
|
||||||
end
|
end
|
||||||
|
|
||||||
stewart.Kti = args.Kti;
|
if args.disable
|
||||||
stewart.Cti = args.Cti;
|
stewart.Ksbi = zeros(6,1);
|
||||||
stewart.Kbi = args.Kbi;
|
stewart.Csbi = zeros(6,1);
|
||||||
stewart.Cbi = args.Cbi;
|
stewart.Ksti = zeros(6,1);
|
||||||
|
stewart.Csti = zeros(6,1);
|
||||||
|
stewart.Kubi = zeros(6,1);
|
||||||
|
stewart.Cubi = zeros(6,1);
|
||||||
|
else
|
||||||
|
stewart.Ksbi = args.Ksbi;
|
||||||
|
stewart.Csbi = args.Csbi;
|
||||||
|
stewart.Ksti = args.Ksti;
|
||||||
|
stewart.Csti = args.Csti;
|
||||||
|
stewart.Kubi = args.Kubi;
|
||||||
|
stewart.Cubi = args.Cubi;
|
||||||
|
end
|
||||||
|
@ -874,11 +874,11 @@ This Matlab function is accessible [[file:src/initializeJointDynamics.m][here]].
|
|||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
arguments
|
arguments
|
||||||
stewart
|
stewart
|
||||||
args.Ksbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-1*ones(6,1)
|
args.Ksbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e+1*ones(6,1)
|
||||||
args.Csbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-4*ones(6,1)
|
args.Csbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-4*ones(6,1)
|
||||||
args.Ksti (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-2*ones(6,1)
|
args.Ksti (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e+0*ones(6,1)
|
||||||
args.Csti (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-4*ones(6,1)
|
args.Csti (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-3*ones(6,1)
|
||||||
args.Kubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-1*ones(6,1)
|
args.Kubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e+1*ones(6,1)
|
||||||
args.Cubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-4*ones(6,1)
|
args.Cubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e-4*ones(6,1)
|
||||||
args.disable logical {mustBeNumericOrLogical} = false
|
args.disable logical {mustBeNumericOrLogical} = false
|
||||||
end
|
end
|
||||||
@ -890,12 +890,12 @@ This Matlab function is accessible [[file:src/initializeJointDynamics.m][here]].
|
|||||||
:END:
|
:END:
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
if args.disable
|
if args.disable
|
||||||
stewart.Ksbi = 0;
|
stewart.Ksbi = zeros(6,1);
|
||||||
stewart.Csbi = 0;
|
stewart.Csbi = zeros(6,1);
|
||||||
stewart.Ksti = 0;
|
stewart.Ksti = zeros(6,1);
|
||||||
stewart.Csti = 0;
|
stewart.Csti = zeros(6,1);
|
||||||
stewart.Kubi = 0;
|
stewart.Kubi = zeros(6,1);
|
||||||
stewart.Cubi = 0;
|
stewart.Cubi = zeros(6,1);
|
||||||
else
|
else
|
||||||
stewart.Ksbi = args.Ksbi;
|
stewart.Ksbi = args.Ksbi;
|
||||||
stewart.Csbi = args.Csbi;
|
stewart.Csbi = args.Csbi;
|
||||||
|
Loading…
Reference in New Issue
Block a user