diff --git a/docs/amplified_piezoelectric_stack.html b/docs/amplified_piezoelectric_stack.html index 556ee47..892d882 100644 --- a/docs/amplified_piezoelectric_stack.html +++ b/docs/amplified_piezoelectric_stack.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Amplified Piezoelectric Stack Actuator @@ -36,19 +36,27 @@ @@ -123,8 +131,8 @@ The parameters are shown in the table below.

1 Simplified Model

-
-

1.1 Parameters

+
+

1.1 Parameters

m = 1; % [kg]
@@ -154,8 +162,8 @@ IFF Controller:
 
-
-

1.2 Identification

+
+

1.2 Identification

Identification in open-loop. @@ -210,8 +218,8 @@ Giff.OutputName = {'Fs', 'x1'};

-
-

1.3 Root Locus

+
+

1.3 Root Locus

@@ -227,8 +235,8 @@ Giff.OutputName = {'Fs', 'x1'};

2 Rotating X-Y platform

-
-

2.1 Parameters

+
+

2.1 Parameters

m = 1; % [kg]
@@ -255,8 +263,8 @@ h = 0.2; % [m]
 
-
-

2.2 Identification

+
+

2.2 Identification

Rotating speed in rad/s: @@ -305,8 +313,8 @@ end

-
-

2.3 Root Locus

+
+

2.3 Root Locus

@@ -368,10 +376,115 @@ end
+ +
+

3 Stewart Platform with Amplified Actuators

+
+
+
+

3.1 Initialization

+
+
+
initializeGround();
+initializeGranite();
+initializeTy();
+initializeRy();
+initializeRz();
+initializeMicroHexapod();
+initializeAxisc();
+initializeMirror();
+
+initializeSimscapeConfiguration();
+initializeDisturbances('enable', false);
+initializeLoggingConfiguration('log', 'none');
+
+initializeController('type', 'hac-iff');
+
+
+ +

+We set the stiffness of the payload fixation: +

+
+
Kp = 1e8; % [N/m]
+
+
+
+
+ +
+

3.2 Identification

+
+
+
K = tf(zeros(6));
+Kiff = tf(zeros(6));
+
+
+ +

+We identify the system for the following payload masses: +

+
+
Ms = [1, 10, 50];
+
+
+ +

+The nano-hexapod has the following leg’s stiffness and damping. +

+
+
initializeNanoHexapod('actuator', 'amplified');
+
+
+
+
+ +
+

3.3 Controller Design

+
+ +
+

amplified_piezo_iff_loop_gain.png +

+

Figure 7: Dynamics for the Integral Force Feedback for three payload masses

+
+ + + +
+

amplified_piezo_iff_root_locus.png +

+

Figure 8: Root Locus for the IFF control for three payload masses

+
+ +

+Damping as function of the gain +

+ +
+

amplified_piezo_iff_damping_gain.png +

+

Figure 9: Damping ratio of the poles as a function of the IFF gain

+
+ +

+Finally, we use the following controller for the Decentralized Direct Velocity Feedback: +

+
+
Kiff = -1e4/s*eye(6);
+
+
+
+
+ +
+

3.4 Effect of the Low Authority Control on the Primary Plant

+
+

Author: Dehaeze Thomas

-

Created: 2020-05-20 mer. 15:49

+

Created: 2020-05-20 mer. 16:41

diff --git a/docs/figs/amplified_piezo_iff_damping_gain.pdf b/docs/figs/amplified_piezo_iff_damping_gain.pdf new file mode 100644 index 0000000..87dc4d2 Binary files /dev/null and b/docs/figs/amplified_piezo_iff_damping_gain.pdf differ diff --git a/docs/figs/amplified_piezo_iff_damping_gain.png b/docs/figs/amplified_piezo_iff_damping_gain.png new file mode 100644 index 0000000..6cc29f8 Binary files /dev/null and b/docs/figs/amplified_piezo_iff_damping_gain.png differ diff --git a/docs/figs/amplified_piezo_iff_loop_gain.pdf b/docs/figs/amplified_piezo_iff_loop_gain.pdf new file mode 100644 index 0000000..d0bec57 Binary files /dev/null and b/docs/figs/amplified_piezo_iff_loop_gain.pdf differ diff --git a/docs/figs/amplified_piezo_iff_loop_gain.png b/docs/figs/amplified_piezo_iff_loop_gain.png new file mode 100644 index 0000000..477eece Binary files /dev/null and b/docs/figs/amplified_piezo_iff_loop_gain.png differ diff --git a/docs/figs/amplified_piezo_iff_root_locus.pdf b/docs/figs/amplified_piezo_iff_root_locus.pdf new file mode 100644 index 0000000..296787c Binary files /dev/null and b/docs/figs/amplified_piezo_iff_root_locus.pdf differ diff --git a/docs/figs/amplified_piezo_iff_root_locus.png b/docs/figs/amplified_piezo_iff_root_locus.png new file mode 100644 index 0000000..e562eb6 Binary files /dev/null and b/docs/figs/amplified_piezo_iff_root_locus.png differ diff --git a/docs/optimal_stiffness_control.html b/docs/optimal_stiffness_control.html index 0298a7a..24f72b6 100644 --- a/docs/optimal_stiffness_control.html +++ b/docs/optimal_stiffness_control.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Control of the NASS with optimal stiffness @@ -41,7 +41,7 @@
  • 1.3. Controller Design
  • 1.4. Effect of the Low Authority Control on the Primary Plant
  • 1.5. Effect of the Low Authority Control on the Sensibility to Disturbances
  • -
  • 1.6. Conclusion
  • +
  • 1.6. Conclusion
  • 2. Primary Control in the leg space @@ -50,23 +50,23 @@
  • 2.2. Control in the leg space
  • 2.3. Sensibility to Disturbances and Noise Budget
  • 2.4. Simulations of Tomography Experiment
  • -
  • 2.5. Results
  • +
  • 2.5. Results
  • 2.6. Actuator Stroke and Forces
  • -
  • 2.7. Conclusion
  • +
  • 2.7. Conclusion
  • 3. Further More complex simulations @@ -79,8 +79,8 @@
  • 4.2.1. Stability
  • -
  • 4.3. Simulation
  • -
  • 4.4. Conclusion
  • +
  • 4.3. Simulation
  • +
  • 4.4. Conclusion
  • @@ -184,7 +184,7 @@ In order to choose the gain such that we obtain good damping for all the three p

    opt_stiff_dvf_root_locus.png

    -

    Figure 3: Root Locus for the DVF controll for three payload masses

    +

    Figure 3: Root Locus for the DVF control for three payload masses

    @@ -324,8 +324,8 @@ Decentralized Direct Velocity Feedback is shown to increase the effect of stages

    -
    -

    1.6 Conclusion

    +
    +

    1.6 Conclusion

    @@ -512,8 +512,8 @@ And we run the simulation for all three payload Masses.

    -
    -

    2.5 Results

    +
    +

    2.5 Results

    Let’s now see how this controller performs. @@ -572,8 +572,8 @@ Finally, the time domain position error signals are shown in Figure -

    2.7 Conclusion

    +
    +

    2.7 Conclusion

    @@ -593,8 +593,8 @@ Finally, the time domain position error signals are shown in Figure 3.1 Simulation with Micro-Hexapod Offset

    -
    -

    3.1.1 Simulation

    +
    +

    3.1.1 Simulation

    The micro-hexapod is inducing a 10mm offset of the sample center of mass with the rotation axis. @@ -622,8 +622,8 @@ sim('nass_model');

    -
    -

    3.1.2 Results

    +
    +

    3.1.2 Results

    @@ -650,8 +650,8 @@ sim('nass_model');

    3.2 Simultaneous Translation scans and Spindle’s rotation

    -
    -

    3.2.1 Simulation

    +
    +

    3.2.1 Simulation

    A simulation is now performed with translation scans and spindle rotation at the same time. @@ -674,8 +674,8 @@ initializeReferences('Rz_type', 'rotating', 'Rz_period', 1, ...

    -
    -

    3.2.2 Results

    +
    +

    3.2.2 Results

    @@ -778,11 +778,11 @@ end
    -
    -

    4.3 Simulation

    +
    +

    4.3 Simulation

    -
    -

    4.4 Conclusion

    +
    +

    4.4 Conclusion

    @@ -796,7 +796,7 @@ end

    Author: Dehaeze Thomas

    -

    Created: 2020-05-20 mer. 15:49

    +

    Created: 2020-05-20 mer. 16:41

    diff --git a/docs/simscape_subsystems.html b/docs/simscape_subsystems.html index 7cbdbae..e4507f6 100644 --- a/docs/simscape_subsystems.html +++ b/docs/simscape_subsystems.html @@ -1,10 +1,9 @@ - - + Subsystems used for the Simscape Models @@ -29,173 +28,173 @@
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [] = initializeSimscapeConfiguration(args)
     
    @@ -265,9 +264,9 @@ These functions are defined below.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.gravity logical {mustBeNumericOrLogical} = true
    @@ -277,9 +276,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +
    conf_simscape = struct();
     
    @@ -287,9 +286,9 @@ end
    -
    -

    Add Type

    -
    +
    +

    Add Type

    +
    if args.gravity
       conf_simscape.type = 1;
    @@ -301,9 +300,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +
    save('./mat/conf_simscape.mat', 'conf_simscape');
     
    @@ -320,9 +319,9 @@ end

    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [] = initializeLoggingConfiguration(args)
     
    @@ -330,9 +329,9 @@ end
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.log      char   {mustBeMember(args.log,{'none', 'all', 'forces'})} = 'none'
    @@ -343,9 +342,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +
    conf_log = struct();
     
    @@ -353,9 +352,9 @@ end
    -
    -

    Add Type

    -
    +
    +

    Add Type

    +
    switch args.log
       case 'none'
    @@ -380,9 +379,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +
    save('./mat/conf_log.mat', 'conf_log');
     
    @@ -399,9 +398,9 @@ end

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The model of the Ground is composed of:

    @@ -426,9 +425,9 @@ The model of the Ground is composed of:
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [ground] = initializeGround(args)
     
    @@ -436,9 +435,9 @@ The model of the Ground is composed of:
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type char {mustBeMember(args.type,{'none', 'rigid'})} = 'rigid'
    @@ -449,9 +448,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the granite structure.

    @@ -462,9 +461,9 @@ First, we initialize the granite structure.
    -
    -

    Add Type

    -
    +
    +

    Add Type

    +
    switch args.type
       case 'none'
    @@ -501,9 +500,9 @@ ground.density = 2800;        % [kg/m3]
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The ground structure is saved.

    @@ -523,9 +522,9 @@ The ground structure is saved.

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The Simscape model of the granite is composed of:

    @@ -554,9 +553,9 @@ The output sample_pos corresponds to the impact point of the X-ray.
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [granite] = initializeGranite(args)
     
    @@ -564,9 +563,9 @@ The output sample_pos corresponds to the impact point of the X-ray.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type          char    {mustBeMember(args.type,{'rigid', 'flexible', 'none', 'modal-analysis', 'init'})} = 'flexible'
    @@ -583,9 +582,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the granite structure.

    @@ -617,9 +616,9 @@ end
    -
    -

    Material and Geometry

    -
    +
    +

    Material and Geometry

    +

    Properties of the Material and link to the geometry of the granite.

    @@ -639,9 +638,9 @@ Z-offset for the initial position of the sample with respect to the granite top
    -
    -

    Stiffness and Damping properties

    -
    +
    +

    Stiffness and Damping properties

    +
    granite.K = args.K; % [N/m]
     granite.C = args.C; % [N/(m/s)]
    @@ -650,9 +649,9 @@ granite.C = args.C; % [N/(m/s)]
     
    -
    -

    Equilibrium position of the each joint.

    -
    +
    +

    Equilibrium position of the each joint.

    +
    if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
       load('mat/Foffset.mat', 'Fgm');
    @@ -665,9 +664,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The granite structure is saved.

    @@ -679,17 +678,17 @@ The granite structure is saved.
    -
    -

    5 Translation Stage

    +
    +

    5 Translation Stage

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The Simscape model of the Translation stage consist of:

    @@ -719,9 +718,9 @@ It is used to impose the motion in the Y direction
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [ty] = initializeTy(args)
     
    @@ -729,9 +728,9 @@ It is used to impose the motion in the Y direction
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type      char   {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis', 'init'})} = 'flexible'
    @@ -742,9 +741,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the ty structure.

    @@ -776,9 +775,9 @@ end
    -
    -

    Material and Geometry

    -
    +
    +

    Material and Geometry

    +

    Define the density of the materials as well as the geometry (STEP files).

    @@ -823,9 +822,9 @@ ty.rotor.STEP = './STEPS/ty/Ty_Motor_Rotor.STEP';
    -
    -

    Stiffness and Damping properties

    -
    +
    +

    Stiffness and Damping properties

    +
    ty.K = [2e8; 1e8; 2e8; 6e7; 9e7; 6e7]; % [N/m, N*m/rad]
     ty.C = [8e4; 5e4; 8e4; 2e4; 3e4; 2e4]; % [N/(m/s), N*m/(rad/s)]
    @@ -834,9 +833,9 @@ ty.C = [8e4; 5e4; 8e4; 2e4; 3e4; 2e4]; % [N/(m/s), N*m/(rad/s)]
     
    -
    -

    Equilibrium position of the each joint.

    -
    +
    +

    Equilibrium position of the each joint.

    +
    if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
       load('mat/Foffset.mat', 'Ftym');
    @@ -849,9 +848,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The ty structure is saved.

    @@ -863,17 +862,17 @@ The ty structure is saved.
    -
    -

    6 Tilt Stage

    +
    +

    6 Tilt Stage

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The Simscape model of the Tilt stage is composed of:

    @@ -903,9 +902,9 @@ The Ry motion is imposed by the input.
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [ry] = initializeRy(args)
     
    @@ -913,9 +912,9 @@ The Ry motion is imposed by the input.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type          char    {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis', 'init'})} = 'flexible'
    @@ -927,9 +926,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the ry structure.

    @@ -962,9 +961,9 @@ end
    -
    -

    Material and Geometry

    -
    +
    +

    Material and Geometry

    +

    Properties of the Material and link to the geometry of the Tilt stage.

    @@ -1002,9 +1001,9 @@ Z-Offset so that the center of rotation matches the sample center;
    -
    -

    Stiffness and Damping properties

    -
    +
    +

    Stiffness and Damping properties

    +
    ry.K = [3.8e8; 4e8; 3.8e8; 1.2e8; 6e4; 1.2e8];
     ry.C = [1e5;   1e5; 1e5;   3e4;   1e3; 3e4];
    @@ -1013,9 +1012,9 @@ ry.C = [1e5;   1e5; 1e5;   3e4;   1e3; 3e4];
     
    -
    -

    Equilibrium position of the each joint.

    -
    +
    +

    Equilibrium position of the each joint.

    +
    if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
       load('mat/Foffset.mat', 'Fym');
    @@ -1028,9 +1027,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The ry structure is saved.

    @@ -1042,17 +1041,17 @@ The ry structure is saved.
    -
    -

    7 Spindle

    +
    +

    7 Spindle

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The Simscape model of the Spindle is composed of:

    @@ -1078,9 +1077,9 @@ The Simscape model of the Spindle is composed of:
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [rz] = initializeRz(args)
     
    @@ -1088,9 +1087,9 @@ The Simscape model of the Spindle is composed of:
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type    char    {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis', 'init'})} = 'flexible'
    @@ -1101,9 +1100,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the rz structure.

    @@ -1135,9 +1134,9 @@ end
    -
    -

    Material and Geometry

    -
    +
    +

    Material and Geometry

    +

    Properties of the Material and link to the geometry of the spindle.

    @@ -1158,9 +1157,9 @@ rz.stator.STEP = './STEPS/rz/Spindle_Stator.STEP';
    -
    -

    Stiffness and Damping properties

    -
    +
    +

    Stiffness and Damping properties

    +
    rz.K = [7e8; 7e8; 2e9; 1e7; 1e7; 1e7];
     rz.C = [4e4; 4e4; 7e4; 1e4; 1e4; 1e4];
    @@ -1169,9 +1168,9 @@ rz.C = [4e4; 4e4; 7e4; 1e4; 1e4; 1e4];
     
    -
    -

    Equilibrium position of the each joint.

    -
    +
    +

    Equilibrium position of the each joint.

    +
    if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
       load('mat/Foffset.mat', 'Fzm');
    @@ -1184,9 +1183,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The rz structure is saved.

    @@ -1198,17 +1197,17 @@ The rz structure is saved.
    -
    -

    8 Micro Hexapod

    +
    +

    8 Micro Hexapod

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    simscape_model_micro_hexapod.png @@ -1225,9 +1224,9 @@ The rz structure is saved.

    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [micro_hexapod] = initializeMicroHexapod(args)
     
    @@ -1235,9 +1234,9 @@ The rz structure is saved.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         args.type      char   {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis', 'init', 'compliance'})} = 'flexible'
    @@ -1279,9 +1278,9 @@ end
     
    -
    -

    Function content

    -
    +
    +

    Function content

    +
    stewart = initializeStewartPlatform();
     
    @@ -1357,9 +1356,9 @@ end
     
    -
    -

    Add Type

    -
    +
    +

    Add Type

    +
    switch args.type
       case 'none'
    @@ -1380,9 +1379,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The micro_hexapod structure is saved.

    @@ -1403,9 +1402,9 @@ save('./mat/stages.mat', 'micro_hexapod', '-append');

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The Simscape model of the Center of gravity compensator is composed of:

    @@ -1430,9 +1429,9 @@ The Simscape model of the Center of gravity compensator is composed of:
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [axisc] = initializeAxisc(args)
     
    @@ -1440,9 +1439,9 @@ The Simscape model of the Center of gravity compensator is composed of:
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
    @@ -1452,9 +1451,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the axisc structure.

    @@ -1465,9 +1464,9 @@ First, we initialize the axisc structure.
    -
    -

    Add Type

    -
    +
    +

    Add Type

    +
    switch args.type
       case 'none'
    @@ -1482,9 +1481,9 @@ end
     
    -
    -

    Material and Geometry

    -
    +
    +

    Material and Geometry

    +

    Properties of the Material and link to the geometry files.

    @@ -1509,9 +1508,9 @@ axisc.gear.STEP = './STEPS/axisc/axisc_gear.STEP';
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The axisc structure is saved.

    @@ -1531,9 +1530,9 @@ The axisc structure is saved.

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The Simscape Model of the mirror is just a solid body. The output mirror_center corresponds to the center of the Sphere and is the point of measurement for the metrology @@ -1555,9 +1554,9 @@ The output mirror_center corresponds to the center of the Sphere an

    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [] = initializeMirror(args)
     
    @@ -1565,9 +1564,9 @@ The output mirror_center corresponds to the center of the Sphere an
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         args.type        char   {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'rigid'
    @@ -1581,9 +1580,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the mirror structure.

    @@ -1622,9 +1621,9 @@ mirror.freq = args.freq;
    -
    -

    Stiffness and Damping properties

    -
    +
    +

    Stiffness and Damping properties

    +
    mirror.K = zeros(6,1);
     mirror.K(1:3) = mirror.mass * (2*pi*mirror.freq(1:3)).^2;
    @@ -1636,9 +1635,9 @@ mirror.C(1:3) = 0.2 * sqrt(mirror.K(1:3).*mirror.mass);
     
    -
    -

    Equilibrium position of the each joint.

    -
    +
    +

    Equilibrium position of the each joint.

    +
    mirror.Deq = zeros(6,1);
     
    @@ -1722,9 +1721,9 @@ Finally, we close the shape.
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The mirror structure is saved.

    @@ -1736,17 +1735,17 @@ The mirror structure is saved.
    -
    -

    11 Nano Hexapod

    +
    +

    11 Nano Hexapod

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    simscape_model_nano_hexapod.png @@ -1763,9 +1762,9 @@ The mirror structure is saved.

    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [nano_hexapod] = initializeNanoHexapod(args)
     
    @@ -1773,9 +1772,9 @@ The mirror structure is saved.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         args.type      char   {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'init'})} = 'flexible'
    @@ -1790,7 +1789,13 @@ The mirror structure is saved.
         args.MR  (1,1) double {mustBeNumeric, mustBePositive} = 90e-3
         args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180)
         % initializeStrutDynamics
    -    args.actuator  char   {mustBeMember(args.actuator,{'piezo', 'lorentz'})} = 'piezo'
    +    args.actuator  char   {mustBeMember(args.actuator,{'piezo', 'lorentz', 'amplified'})} = 'piezo'
    +    args.k1  (1,1) double {mustBeNumeric} = 1e6
    +    args.ke  (1,1) double {mustBeNumeric} = 5e6
    +    args.ka  (1,1) double {mustBeNumeric} = 60e6
    +    args.c1  (1,1) double {mustBeNumeric} = 10
    +    args.ce  (1,1) double {mustBeNumeric} = 10
    +    args.ca  (1,1) double {mustBeNumeric} = 10
         args.k   (1,1) double {mustBeNumeric} = -1
         args.c   (1,1) double {mustBeNumeric} = -1
         % initializeJointDynamics
    @@ -1835,9 +1840,9 @@ end
     
    -
    -

    Function content

    -
    +
    +

    Function content

    +
    stewart = initializeStewartPlatform();
     
    @@ -1851,15 +1856,23 @@ stewart = computeJointsPose(stewart);
     
     
    if args.k > 0 && args.c > 0
    -    stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', args.c*ones(6,1));
    +    stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', args.c*ones(6,1));
     elseif args.k > 0
    -    stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1));
    +    stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1));
     elseif strcmp(args.actuator, 'piezo')
    -    stewart = initializeStrutDynamics(stewart, 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1));
    +    stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1));
     elseif strcmp(args.actuator, 'lorentz')
    -    stewart = initializeStrutDynamics(stewart, 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1));
    +    stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1));
    +elseif strcmp(args.actuator, 'amplified')
    +    stewart = initializeStrutDynamics(stewart, 'type', 'amplified', ...
    +                                      'k1', args.k1*ones(6,1), ...
    +                                      'c1', args.c1*ones(6,1), ...
    +                                      'ka', args.ka*ones(6,1), ...
    +                                      'ca', args.ca*ones(6,1), ...
    +                                      'ke', args.ke*ones(6,1), ...
    +                                      'ce', args.ce*ones(6,1));
     else
    -    error('args.actuator should be piezo or lorentz');
    +    error('args.actuator should be piezo, lorentz or amplified');
     end
     
    @@ -1915,9 +1928,9 @@ end
    -
    -

    Add Type

    -
    +
    +

    Add Type

    +
    switch args.type
       case 'none'
    @@ -1934,9 +1947,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +
    nano_hexapod = stewart;
     save('./mat/stages.mat', 'nano_hexapod', '-append');
    @@ -1954,9 +1967,9 @@ save('./mat/stages.mat', 'nano_hexapod', '-append');
     

    -
    -

    Simscape Model

    -
    +
    +

    Simscape Model

    +

    The Simscape model of the sample environment is composed of:

    @@ -1984,9 +1997,9 @@ This could be the case for cable forces for instance.
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [sample] = initializeSample(args)
     
    @@ -1994,9 +2007,9 @@ This could be the case for cable forces for instance.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type         char    {mustBeMember(args.type,{'rigid', 'flexible', 'none', 'init'})} = 'flexible'
    @@ -2012,9 +2025,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the sample structure.

    @@ -2044,9 +2057,9 @@ end
    -
    -

    Material and Geometry

    -
    +
    +

    Material and Geometry

    +

    We define the geometrical parameters of the sample as well as its mass and position.

    @@ -2072,9 +2085,9 @@ sample.offset = args.offset; % [m]
    -
    -

    Stiffness and Damping properties

    -
    +
    +

    Stiffness and Damping properties

    +
    sample.K = zeros(6, 1);
     sample.C = zeros(6, 1);
    @@ -2101,9 +2114,9 @@ sample.C(4:6) = 0.1 * sqrt(sample.K(4:6).*sample.inertia); % [N/(m/s)]
     
    -
    -

    Equilibrium position of the each joint.

    -
    +
    +

    Equilibrium position of the each joint.

    +
    if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
       load('mat/Foffset.mat', 'Fsm');
    @@ -2116,9 +2129,9 @@ end
     
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The sample structure is saved.

    @@ -2138,9 +2151,9 @@ The sample structure is saved.

    -
    -

    Function Declaration and Documentation

    -
    +
    +

    Function Declaration and Documentation

    +
    function [] = initializeController(args)
     
    @@ -2148,9 +2161,9 @@ The sample structure is saved.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
       args.type char {mustBeMember(args.type,{'open-loop', 'iff', 'dvf', 'hac-dvf', 'ref-track-L', 'ref-track-iff-L', 'cascade-hac-lac', 'hac-iff', 'stabilizing'})} = 'open-loop'
    @@ -2160,9 +2173,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the controller structure.

    @@ -2211,9 +2224,9 @@ end
    -
    -

    Save the Structure

    -
    +
    +

    Save the Structure

    +

    The controller structure is saved.

    @@ -2233,9 +2246,9 @@ The controller structure is saved.

    -
    -

    Function Declaration and Documentation

    -
    +
    +

    Function Declaration and Documentation

    +
    function [ref] = initializeReferences(args)
     
    @@ -2243,9 +2256,9 @@ The controller structure is saved.
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         % Sampling Frequency [s]
    @@ -2307,9 +2320,9 @@ H_lpf = 1/(1 + 2*xi/w0*s + s^2/w0^2);
     
    -
    -

    Translation Stage

    -
    +
    +

    Translation Stage

    +
    %% Translation stage - Dy
     t = 0:Ts:Tmax; % Time Vector [s]
    @@ -2346,9 +2359,9 @@ Dy = struct('time', t, 'signals', struct('values', Dy), 'deriv', Dyd, 'dderiv',
     
    -
    -

    Tilt Stage

    -
    +
    +

    Tilt Stage

    +
    %% Tilt Stage - Ry
     t = 0:Ts:Tmax; % Time Vector [s]
    @@ -2386,9 +2399,9 @@ Ry = struct('time', t, 'signals', struct('values', Ry), 'deriv', Ryd, 'dderiv',
     
    -
    -

    Spindle

    -
    +
    +

    Spindle

    +
    %% Spindle - Rz
     t = 0:Ts:Tmax; % Time Vector [s]
    @@ -2432,9 +2445,9 @@ Rz = struct('time', t, 'signals', struct('values', Rz), 'deriv', Rzd, 'dderiv',
     
    -
    -

    Micro Hexapod

    -
    +
    +

    Micro Hexapod

    +
    %% Micro-Hexapod
     t = [0, Ts];
    @@ -2490,9 +2503,9 @@ Rm = struct('time', t, 'signals', struct('values', Rm));
     
    -
    -

    Nano Hexapod

    -
    +
    +

    Nano Hexapod

    +
    %% Nano-Hexapod
     t = [0, Ts];
    @@ -2533,9 +2546,9 @@ Dnl = struct('time', t, 'signals', struct('values', Dnl));
     
    -
    -

    Save

    -
    +
    +

    Save

    +
        %% Save
         save('./mat/nass_references.mat', 'Dy', 'Ry', 'Rz', 'Dh', 'Dhl', 'Rm', 'Dn', 'Dnl', 'args', 'Ts');
    @@ -2554,9 +2567,9 @@ end
     

    -
    -

    Function Declaration and Documentation

    -
    +
    +

    Function Declaration and Documentation

    +
    function [] = initializeDisturbances(args)
     % initializeDisturbances - Initialize the disturbances
    @@ -2571,9 +2584,9 @@ end
     
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         % Global parameter to enable or disable the disturbances
    @@ -2780,9 +2793,9 @@ Frz_z  = Frz_z - Frz_z(1);
     
    -
    -

    Save

    -
    +
    +

    Save

    +
    save('./mat/nass_disturbances.mat', 'Dwx', 'Dwy', 'Dwz', 'Fty_x', 'Fty_z', 'Frz_z', 'Fd', 'Ts', 't', 'args');
     
    @@ -2799,9 +2812,9 @@ Frz_z = Frz_z - Frz_z(1);

    -
    -

    Function Declaration and Documentation

    -
    +
    +

    Function Declaration and Documentation

    +
    function [] = initializePosError(args)
     % initializePosError - Initialize the position errors
    @@ -2816,9 +2829,9 @@ Frz_z  = Frz_z - Frz_z(1);
     
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         args.error    logical {mustBeNumericOrLogical} = false
    @@ -2831,9 +2844,9 @@ end
     
    -
    -

    Structure initialization

    -
    +
    +

    Structure initialization

    +

    First, we initialize the pos_error structure.

    @@ -2870,9 +2883,9 @@ pos_error.Rz = args.Rz;
    -
    -

    Save

    -
    +
    +

    Save

    +
    save('./mat/pos_error.mat', 'pos_error');
     
    @@ -2948,7 +2961,7 @@ end

    Author: Dehaeze Thomas

    -

    Created: 2020-05-05 mar. 10:33

    +

    Created: 2020-05-20 mer. 16:41

    diff --git a/docs/stewart_platform.html b/docs/stewart_platform.html index a7cfb2a..0769046 100644 --- a/docs/stewart_platform.html +++ b/docs/stewart_platform.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Stewart Platform - Simscape Model @@ -36,85 +36,85 @@
    -
    -

    Documentation

    -
    +
    +

    Documentation

    +
    - -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Documentation

    -
    +
    +

    Documentation

    +
    - -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -413,9 +413,9 @@ FO_A = MO_B + FO_M; % Position of {A} with respect to {F} [m]
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    stewart.geometry.H      = H;
     stewart.geometry.FO_M   = FO_M;
    @@ -439,9 +439,9 @@ This Matlab function is accessible 
    -

    Documentation

    -
    + -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [stewart] = generateGeneralConfiguration(stewart, args)
     % generateGeneralConfiguration - Generate a Very General Configuration
    @@ -483,9 +483,9 @@ The radius of the circles can be chosen as well as the angles where the joints a
     
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -501,9 +501,9 @@ end
     
    -
    -

    Compute the pose

    -
    +
    +

    Compute the pose

    +
    Fa = zeros(3,6);
     Mb = zeros(3,6);
    @@ -520,9 +520,9 @@ end
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    stewart.platform_F.Fa = Fa;
     stewart.platform_M.Mb = Mb;
    @@ -544,9 +544,9 @@ This Matlab function is accessible here
     

    -
    -

    Documentation

    -
    +
    +

    Documentation

    +

    stewart-struts.png @@ -556,9 +556,9 @@ This Matlab function is accessible here

    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Check the stewart structure elements

    -
    +
    +

    Check the stewart structure elements

    +
    assert(isfield(stewart.platform_F, 'Fa'),   'stewart.platform_F should have attribute Fa')
     Fa = stewart.platform_F.Fa;
    @@ -664,9 +664,9 @@ end
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -749,9 +749,9 @@ end
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    stewart.actuators.Leq = dLi;
     
    @@ -772,9 +772,9 @@ This Matlab function is accessible -

    Function description

    -
    +
    +

    Function description

    +
    function [stewart] = initializeCylindricalPlatforms(stewart, args)
     % initializeCylindricalPlatforms - Initialize the geometry of the Fixed and Mobile Platforms
    @@ -808,9 +808,9 @@ This Matlab function is accessible 
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -845,9 +845,9 @@ end
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    stewart.platform_F.type = 1;
     
    @@ -883,9 +883,9 @@ This Matlab function is accessible 
    -

    Function description

    -
    +
    +

    Function description

    +
    function [stewart] = initializeCylindricalStruts(stewart, args)
     % initializeCylindricalStruts - Define the mass and moment of inertia of cylindrical struts
    @@ -918,9 +918,9 @@ This Matlab function is accessible 
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -968,9 +968,9 @@ end
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    -
    -

    Documentation

    -
    +
    +

    Documentation

    +

    piezoelectric_stack.jpg @@ -1037,9 +1037,9 @@ A simplistic model of such amplified actuator is shown in Figure -

    Function description

    -
    +
    +

    Function description

    +
    function [stewart] = initializeStrutDynamics(stewart, args)
     % initializeStrutDynamics - Add Stiffness and Damping properties of each strut
    @@ -1061,14 +1061,23 @@ A simplistic model of such amplified actuator is shown in Figure 
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    +    args.type char {mustBeMember(args.type,{'classical', 'amplified'})} = 'classical'
         args.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 20e6*ones(6,1)
         args.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 2e1*ones(6,1)
    +    args.k1 (6,1) double {mustBeNumeric} = 1e6
    +    args.ke (6,1) double {mustBeNumeric} = 5e6
    +    args.ka (6,1) double {mustBeNumeric} = 60e6
    +    args.c1 (6,1) double {mustBeNumeric} = 10
    +    args.ce (6,1) double {mustBeNumeric} = 10
    +    args.ca (6,1) double {mustBeNumeric} = 10
    +    args.me (6,1) double {mustBeNumeric} = 0.05
    +    args.ma (6,1) double {mustBeNumeric} = 0.05
     end
     
    @@ -1079,10 +1088,26 @@ end

    Add Stiffness and Damping properties of each strut

    -
    stewart.actuators.type = 1;
    +
    if strcmp(args.type, 'classical')
    +    stewart.actuators.type = 1;
    +elseif strcmp(args.type, 'amplified')
    +    stewart.actuators.type = 2;
    +end
     
     stewart.actuators.K = args.K;
     stewart.actuators.C = args.C;
    +
    +stewart.actuators.k1 = args.k1;
    +stewart.actuators.c1 = args.c1;
    +
    +stewart.actuators.ka = args.ka;
    +stewart.actuators.ca = args.ca;
    +
    +stewart.actuators.ke = args.ke;
    +stewart.actuators.ce = args.ce;
    +
    +stewart.actuators.ma = args.ma;
    +stewart.actuators.me = args.me;
     
    @@ -1101,9 +1126,9 @@ This Matlab function is accessible
    -

    Documentation

    -
    +
    +

    Documentation

    +

    An amplified piezoelectric actuator is shown in Figure 7.

    @@ -1136,9 +1161,9 @@ A simplistic model of such amplified actuator is shown in Figure -

    Function description

    -
    +
    +

    Function description

    +
    function [stewart] = initializeAmplifiedStrutDynamics(stewart, args)
     % initializeAmplifiedStrutDynamics - Add Stiffness and Damping properties of each strut
    @@ -1166,9 +1191,9 @@ A simplistic model of such amplified actuator is shown in Figure 
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -1193,9 +1218,9 @@ C = args.Ca + args.Cr;
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -1476,9 +1501,9 @@ Note that there is trade-off between:
     
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [stewart] = initializeInertialSensor(stewart, args)
     % initializeInertialSensor - Initialize the inertial sensor in each strut
    @@ -1504,9 +1529,9 @@ Note that there is trade-off between:
     
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -1547,9 +1572,9 @@ end
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    stewart.sensors.inertial = sensor;
     
    @@ -1570,9 +1595,9 @@ This Matlab function is accessible here
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -1624,9 +1649,9 @@ end
     
    -
    -

    Check the stewart structure elements

    -
    +
    +

    Check the stewart structure elements

    +
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Documentation

    -
    +
    +

    Documentation

    +
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -2188,9 +2213,9 @@ end
     
    -
    -

    Check the stewart structure elements

    -
    +
    +

    Check the stewart structure elements

    +
    assert(isfield(stewart.geometry, 'H'),   'stewart.geometry should have attribute H')
     H = stewart.geometry.H;
    @@ -2225,9 +2250,9 @@ CCm = [Cc(:,2), Cc(:,2), Cc(:,4), Cc(:,4), Cc(:,6), Cc(:,6)]; % CCm(:,i) corresp
     
    -
    -

    Compute the pose

    -
    +
    +

    Compute the pose

    +

    We can compute the vector of each leg \({}^{C}\hat{\bm{s}}_{i}\) (unit vector from \({}^{C}C_{f}\) to \({}^{C}C_{m}\)).

    @@ -2247,9 +2272,9 @@ Mb = CCf + [0; 0; args.FOc-H] + ((H-args.MHb-(args.FOc-args.Hc/2))./CSi(3,:)).*C
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    stewart.platform_F.Fa = Fa;
     stewart.platform_M.Mb = Mb;
    @@ -2271,9 +2296,9 @@ This Matlab function is accessible here.
     

    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Check the stewart structure elements

    -
    +
    +

    Check the stewart structure elements

    +
    assert(isfield(stewart.geometry, 'As'),   'stewart.geometry should have attribute As')
     As = stewart.geometry.As;
    @@ -2344,9 +2369,9 @@ Ki = stewart.actuators.K;
     
    -
    -

    Populate the stewart structure

    -
    +
    +

    Populate the stewart structure

    +
    stewart.kinematics.J = J;
     stewart.kinematics.K = K;
    @@ -2406,9 +2431,9 @@ Otherwise, when the limbs’ lengths derived yield complex numbers, then the
     
    -
    -

    Function description

    -
    +
    +

    Function description

    +
    function [Li, dLi] = inverseKinematics(stewart, args)
     % inverseKinematics - Compute the needed length of each strut to have the wanted position and orientation of {B} with respect to {A}
    @@ -2432,9 +2457,9 @@ Otherwise, when the limbs’ lengths derived yield complex numbers, then the
     
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -2446,9 +2471,9 @@ end
     
    -
    -

    Check the stewart structure elements

    -
    +
    +

    Check the stewart structure elements

    +
    assert(isfield(stewart.geometry, 'Aa'),   'stewart.geometry should have attribute Aa')
     Aa = stewart.geometry.Aa;
    @@ -2492,9 +2517,9 @@ This Matlab function is accessible he
     

    -
    -

    Function description

    -
    +
    +

    Function description

    +
    -
    -

    Optional Parameters

    -
    +
    +

    Optional Parameters

    +
    arguments
         stewart
    @@ -2529,9 +2554,9 @@ end
     
    -
    -

    Check the stewart structure elements

    -
    +
    +

    Check the stewart structure elements

    +
    assert(isfield(stewart.kinematics, 'J'),   'stewart.kinematics should have attribute J')
     J = stewart.kinematics.J;
    @@ -2586,7 +2611,7 @@ We then compute the corresponding rotation matrix.
     

    Author: Dehaeze Thomas

    -

    Created: 2020-05-20 mer. 15:49

    +

    Created: 2020-05-20 mer. 16:41

    diff --git a/mat/conf_log.mat b/mat/conf_log.mat index 7a32be6..7629589 100644 Binary files a/mat/conf_log.mat and b/mat/conf_log.mat differ diff --git a/mat/conf_simscape.mat b/mat/conf_simscape.mat index 93a7e7c..fb6c154 100644 Binary files a/mat/conf_simscape.mat and b/mat/conf_simscape.mat differ diff --git a/mat/controller.mat b/mat/controller.mat index 56b15bb..758a300 100644 Binary files a/mat/controller.mat and b/mat/controller.mat differ diff --git a/mat/nass_disturbances.mat b/mat/nass_disturbances.mat index 027ebc7..51ee095 100644 Binary files a/mat/nass_disturbances.mat and b/mat/nass_disturbances.mat differ diff --git a/mat/nass_references.mat b/mat/nass_references.mat index d2694a0..c3ff126 100644 Binary files a/mat/nass_references.mat and b/mat/nass_references.mat differ diff --git a/mat/stages.mat b/mat/stages.mat index 2660532..db0a196 100644 Binary files a/mat/stages.mat and b/mat/stages.mat differ diff --git a/matlab/nano_hexapod_strut.slx b/matlab/nano_hexapod_strut.slx index 86c1997..d470242 100644 Binary files a/matlab/nano_hexapod_strut.slx and b/matlab/nano_hexapod_strut.slx differ diff --git a/matlab/nass_model.slx b/matlab/nass_model.slx index 1425e47..5da2c10 100644 Binary files a/matlab/nass_model.slx and b/matlab/nass_model.slx differ diff --git a/org/amplified_piezoelectric_stack.org b/org/amplified_piezoelectric_stack.org index 8ef4a59..c0ace07 100644 --- a/org/amplified_piezoelectric_stack.org +++ b/org/amplified_piezoelectric_stack.org @@ -449,3 +449,423 @@ Identification #+begin_src matlab open('nass_model.slx') #+end_src + + +** Initialization +#+begin_src matlab + initializeGround(); + initializeGranite(); + initializeTy(); + initializeRy(); + initializeRz(); + initializeMicroHexapod(); + initializeAxisc(); + initializeMirror(); + + initializeSimscapeConfiguration(); + initializeDisturbances('enable', false); + initializeLoggingConfiguration('log', 'none'); + + initializeController('type', 'hac-iff'); +#+end_src + +We set the stiffness of the payload fixation: +#+begin_src matlab + Kp = 1e8; % [N/m] +#+end_src + +** Identification +#+begin_src matlab + K = tf(zeros(6)); + Kiff = tf(zeros(6)); +#+end_src + +We identify the system for the following payload masses: +#+begin_src matlab + Ms = [1, 10, 50]; +#+end_src + +#+begin_src matlab :exports none + Gm_iff = {zeros(length(Ms), 1)}; +#+end_src + +The nano-hexapod has the following leg's stiffness and damping. +#+begin_src matlab + initializeNanoHexapod('actuator', 'amplified'); +#+end_src + +#+begin_src matlab :exports none + %% Name of the Simulink File + mdl = 'nass_model'; + + %% Input/Output definition + clear io; io_i = 1; + io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs + io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1; % Force Sensors +#+end_src + +#+begin_src matlab :exports none + for i = 1:length(Ms) + initializeSample('mass', Ms(i), 'freq', sqrt(Kp/Ms(i))/2/pi*ones(6,1)); + initializeReferences('Rz_type', 'rotating-not-filtered', 'Rz_period', Ms(i)); + + %% Run the linearization + G_iff = linearize(mdl, io); + G_iff.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}; + G_iff.OutputName = {'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}; + Gm_iff(i) = {G_iff}; + end +#+end_src + +** Controller Design + +#+begin_src matlab :exports none + freqs = logspace(-1, 3, 1000); + + figure; + + ax1 = subplot(2, 1, 1); + hold on; + for i = 1:length(Ms) + plot(freqs, abs(squeeze(freqresp(Gm_iff{i}(1, 1), freqs, 'Hz')))); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]); + + ax2 = subplot(2, 1, 2); + hold on; + for i = 1:length(Ms) + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_iff{i}(1, 1), freqs, 'Hz')))), ... + 'DisplayName', sprintf('$m_p = %.0f$ [kg]', Ms(i))); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); + ylim([-270, 90]); + yticks([-360:90:360]); + legend('location', 'northeast'); + + linkaxes([ax1,ax2],'x'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/amplified_piezo_iff_loop_gain.pdf', 'width', 'full', 'height', 'full'); +#+end_src + +#+name: fig:amplified_piezo_iff_loop_gain +#+caption: Dynamics for the Integral Force Feedback for three payload masses +#+RESULTS: +[[file:figs/amplified_piezo_iff_loop_gain.png]] + + +#+begin_src matlab :exports none + figure; + + gains = logspace(2, 5, 300); + + hold on; + for i = 1:length(Ms) + set(gca,'ColorOrderIndex',i); + plot(real(pole(Gm_iff{i})), imag(pole(Gm_iff{i})), 'x', ... + 'DisplayName', sprintf('$m_p = %.0f$ [kg]', Ms(i))); + set(gca,'ColorOrderIndex',i); + plot(real(tzero(Gm_iff{i})), imag(tzero(Gm_iff{i})), 'o', ... + 'HandleVisibility', 'off'); + for k = 1:length(gains) + set(gca,'ColorOrderIndex',i); + cl_poles = pole(feedback(Gm_iff{i}, -(gains(k)/s)*eye(6))); + plot(real(cl_poles), imag(cl_poles), '.', ... + 'HandleVisibility', 'off'); + end + end + hold off; + axis square; + xlim([-400, 10]); ylim([0, 500]); + + xlabel('Real Part'); ylabel('Imaginary Part'); + legend('location', 'northwest'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/amplified_piezo_iff_root_locus.pdf', 'width', 'wide', 'height', 'tall'); +#+end_src + +#+name: fig:amplified_piezo_iff_root_locus +#+caption: Root Locus for the IFF control for three payload masses +#+RESULTS: +[[file:figs/amplified_piezo_iff_root_locus.png]] + +Damping as function of the gain +#+begin_src matlab :exports none + c1 = [ 0 0.4470 0.7410]; % Blue + c2 = [0.8500 0.3250 0.0980]; % Orange + c3 = [0.9290 0.6940 0.1250]; % Yellow + c4 = [0.4940 0.1840 0.5560]; % Purple + c5 = [0.4660 0.6740 0.1880]; % Green + c6 = [0.3010 0.7450 0.9330]; % Light Blue + c7 = [0.6350 0.0780 0.1840]; % Red + colors = [c1; c2; c3; c4; c5; c6; c7]; + + figure; + + gains = logspace(2, 5, 100); + + hold on; + for i = 1:length(Ms) + for k = 1:length(gains) + cl_poles = pole(feedback(Gm_iff{i}, -(gains(k)/s)*eye(6))); + set(gca,'ColorOrderIndex',i); + plot(gains(k), sin(-pi/2 + angle(cl_poles)), '.', 'color', colors(i, :)); + end + end + hold off; + xlabel('IFF Gain'); ylabel('Modal Damping'); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + ylim([0, 1]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/amplified_piezo_iff_damping_gain.pdf', 'width', 'full', 'height', 'full'); +#+end_src + +#+name: fig:amplified_piezo_iff_damping_gain +#+caption: Damping ratio of the poles as a function of the IFF gain +#+RESULTS: +[[file:figs/amplified_piezo_iff_damping_gain.png]] + +Finally, we use the following controller for the Decentralized Direct Velocity Feedback: +#+begin_src matlab + Kiff = -1e4/s*eye(6); +#+end_src + +** Effect of the Low Authority Control on the Primary Plant +*** Introduction :ignore: +#+begin_src matlab :exports none + %% Name of the Simulink File + mdl = 'nass_model'; + + %% Input/Output definition + clear io; io_i = 1; + io(io_i) = linio([mdl, '/Controller'], 1, 'input'); io_i = io_i + 1; % Actuator Inputs + io(io_i) = linio([mdl, '/Tracking Error'], 1, 'output', [], 'En'); io_i = io_i + 1; % Position Errror +#+end_src + +#+begin_src matlab :exports none + load('mat/stages.mat', 'nano_hexapod'); +#+end_src + +*** Identification of the undamped plant :ignore: +#+begin_src matlab :exports none + Kdvf_backup = Kdvf; + Kdvf = tf(zeros(6)); +#+end_src + +#+begin_src matlab :exports none + G_x = {zeros(length(Ms), 1)}; + G_l = {zeros(length(Ms), 1)}; +#+end_src + +#+begin_src matlab :exports none + for i = 1:length(Ms) + initializeSample('mass', Ms(i), 'freq', sqrt(Kp/Ms(i))/2/pi*ones(6,1)); + initializeReferences('Rz_type', 'rotating-not-filtered', 'Rz_period', Ms(i)); + + %% Run the linearization + G = linearize(mdl, io); + G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}; + G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'}; + + Gx = -G*inv(nano_hexapod.kinematics.J'); + Gx.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'}; + G_x(i) = {Gx}; + + Gl = -nano_hexapod.kinematics.J*G; + Gl.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'}; + G_l(i) = {Gl}; + end +#+end_src + +#+begin_src matlab :exports none + Kdvf = Kdvf_backup; +#+end_src + +*** Identification of the damped plant :ignore: +#+begin_src matlab :exports none + Gm_x = {zeros(length(Ms), 1)}; + Gm_l = {zeros(length(Ms), 1)}; +#+end_src + +#+begin_src matlab :exports none + for i = 1:length(Ms) + initializeSample('mass', Ms(i), 'freq', sqrt(Kp/Ms(i))/2/pi*ones(6,1)); + initializeReferences('Rz_type', 'rotating-not-filtered', 'Rz_period', Ms(i)); + + %% Run the linearization + G = linearize(mdl, io); + G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}; + G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'}; + + Gx = -G*inv(nano_hexapod.kinematics.J'); + Gx.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'}; + Gm_x(i) = {Gx}; + + Gl = -nano_hexapod.kinematics.J*G; + Gl.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'}; + Gm_l(i) = {Gl}; + end +#+end_src + +*** Effect of the Damping on the plant diagonal dynamics :ignore: +#+begin_src matlab :exports none + freqs = logspace(0, 3, 5000); + + figure; + + ax1 = subplot(2, 2, 1); + hold on; + for i = 1:length(Ms) + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(G_x{i}(1, 1), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(G_x{i}(2, 2), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(Gm_x{i}(1, 1), freqs, 'Hz'))), '--'); + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(Gm_x{i}(2, 2), freqs, 'Hz'))), '--'); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('$\mathcal{X}_x/\mathcal{F}_x$, $\mathcal{X}_y/\mathcal{F}_y$') + + ax2 = subplot(2, 2, 2); + hold on; + for i = 1:length(Ms) + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(G_x{i}(3, 3), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(Gm_x{i}(3, 3), freqs, 'Hz'))), '--'); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + title('$\mathcal{X}_z/\mathcal{F}_z$') + + ax3 = subplot(2, 2, 3); + hold on; + for i = 1:length(Ms) + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_x{i}(1, 1), freqs, 'Hz'))))); + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_x{i}(2, 2), freqs, 'Hz'))))); + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_x{i}(1, 1), freqs, 'Hz')))), '--'); + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_x{i}(2, 2), freqs, 'Hz')))), '--'); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); + ylim([-270, 90]); + yticks([-360:90:360]); + + ax4 = subplot(2, 2, 4); + hold on; + for i = 1:length(Ms) + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_x{i}(3, 3), freqs, 'Hz')))), ... + 'DisplayName', sprintf('$m_p = %.0f [kg]$', Ms(i))); + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_x{i}(3, 3), freqs, 'Hz')))), '--', ... + 'HandleVisibility', 'off'); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); + ylim([-270, 90]); + yticks([-360:90:360]); + legend('location', 'southwest'); + + linkaxes([ax1,ax2,ax3,ax4],'x'); +#+end_src + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 5000); + + figure; + + ax1 = subplot(2, 1, 1); + hold on; + for i = 1:length(Ms) + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(G_l{i}(1, 1), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',i); + plot(freqs, abs(squeeze(freqresp(Gm_l{i}(1, 1), freqs, 'Hz'))), '--'); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + + ax2 = subplot(2, 1, 2); + hold on; + for i = 1:length(Ms) + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_l{i}(1, 1), freqs, 'Hz')))), ... + 'DisplayName', sprintf('$m_p = %.0f [kg]$', Ms(i))); + set(gca,'ColorOrderIndex',i); + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_l{i}(1, 1), freqs, 'Hz')))), '--', ... + 'HandleVisibility', 'off'); + end + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + ylabel('Phase [deg]'); xlabel('Frequency [Hz]'); + ylim([-270, 90]); + yticks([-360:90:360]); + legend('location', 'southwest'); + + linkaxes([ax1,ax2],'x'); +#+end_src + +*** Effect of the Damping on the coupling dynamics :ignore: +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + hold on; + for i = 1:5 + for j = i+1:6 + plot(freqs, abs(squeeze(freqresp(G_x{1}(i, j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]); + plot(freqs, abs(squeeze(freqresp(Gm_x{1}(i, j), freqs, 'Hz'))), '--', 'color', [0, 0, 0, 0.2]); + end + end + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(G_x{1}(1, 1), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(Gm_x{1}(1, 1), freqs, 'Hz'))), '--'); + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + ylim([1e-12, inf]); +#+end_src + +#+begin_src matlab :exports none + freqs = logspace(0, 3, 1000); + + figure; + hold on; + for i = 1:5 + for j = i+1:6 + plot(freqs, abs(squeeze(freqresp(G_l{1}(i, j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]); + plot(freqs, abs(squeeze(freqresp(Gm_l{1}(i, j), freqs, 'Hz'))), '--', 'color', [0, 0, 0, 0.2]); + end + end + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(G_l{1}(1, 1), freqs, 'Hz')))); + set(gca,'ColorOrderIndex',1); + plot(freqs, abs(squeeze(freqresp(Gm_l{1}(1, 1), freqs, 'Hz'))), '--'); + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]); + ylim([1e-9, inf]); +#+end_src diff --git a/org/optimal_stiffness_control.org b/org/optimal_stiffness_control.org index 0477f61..c957d66 100644 --- a/org/optimal_stiffness_control.org +++ b/org/optimal_stiffness_control.org @@ -174,7 +174,7 @@ exportFig('figs/opt_stiff_dvf_plant.pdf', 'width', 'full', 'height', 'full') #+end_src #+name: fig:opt_stiff_dvf_root_locus -#+caption: Root Locus for the DVF controll for three payload masses +#+caption: Root Locus for the DVF control for three payload masses #+RESULTS: [[file:figs/opt_stiff_dvf_root_locus.png]] diff --git a/org/simscape_subsystems.org b/org/simscape_subsystems.org index 79469dc..2fe18f0 100644 --- a/org/simscape_subsystems.org +++ b/org/simscape_subsystems.org @@ -1280,12 +1280,12 @@ The =mirror= structure is saved. args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180) % initializeStrutDynamics args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz', 'amplified'})} = 'piezo' - args.ki (1,1) double {mustBeNumeric} = -1 - args.ke (1,1) double {mustBeNumeric} = -1 - args.ka (1,1) double {mustBeNumeric} = -1 - args.ci (1,1) double {mustBeNumeric} = -1 - args.ce (1,1) double {mustBeNumeric} = -1 - args.ca (1,1) double {mustBeNumeric} = -1 + args.k1 (1,1) double {mustBeNumeric} = 1e6 + args.ke (1,1) double {mustBeNumeric} = 5e6 + args.ka (1,1) double {mustBeNumeric} = 60e6 + args.c1 (1,1) double {mustBeNumeric} = 10 + args.ce (1,1) double {mustBeNumeric} = 10 + args.ca (1,1) double {mustBeNumeric} = 10 args.k (1,1) double {mustBeNumeric} = -1 args.c (1,1) double {mustBeNumeric} = -1 % initializeJointDynamics @@ -1343,15 +1343,23 @@ The =mirror= structure is saved. #+begin_src matlab if args.k > 0 && args.c > 0 - stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', args.c*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', args.c*ones(6,1)); elseif args.k > 0 - stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1)); elseif strcmp(args.actuator, 'piezo') - stewart = initializeStrutDynamics(stewart, 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1)); elseif strcmp(args.actuator, 'lorentz') - stewart = initializeStrutDynamics(stewart, 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1)); + elseif strcmp(args.actuator, 'amplified') + stewart = initializeStrutDynamics(stewart, 'type', 'amplified', ... + 'k1', args.k1*ones(6,1), ... + 'c1', args.c1*ones(6,1), ... + 'ka', args.ka*ones(6,1), ... + 'ca', args.ca*ones(6,1), ... + 'ke', args.ke*ones(6,1), ... + 'ce', args.ce*ones(6,1)); else - error('args.actuator should be piezo or lorentz'); + error('args.actuator should be piezo, lorentz or amplified'); end #+end_src diff --git a/org/stewart_platform.org b/org/stewart_platform.org index 4f45b58..5f83ebe 100644 --- a/org/stewart_platform.org +++ b/org/stewart_platform.org @@ -798,8 +798,17 @@ A simplistic model of such amplified actuator is shown in Figure [[fig:actuator_ #+begin_src matlab arguments stewart + args.type char {mustBeMember(args.type,{'classical', 'amplified'})} = 'classical' args.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 20e6*ones(6,1) args.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 2e1*ones(6,1) + args.k1 (6,1) double {mustBeNumeric} = 1e6 + args.ke (6,1) double {mustBeNumeric} = 5e6 + args.ka (6,1) double {mustBeNumeric} = 60e6 + args.c1 (6,1) double {mustBeNumeric} = 10 + args.ce (6,1) double {mustBeNumeric} = 10 + args.ca (6,1) double {mustBeNumeric} = 10 + args.me (6,1) double {mustBeNumeric} = 0.05 + args.ma (6,1) double {mustBeNumeric} = 0.05 end #+end_src @@ -808,10 +817,26 @@ A simplistic model of such amplified actuator is shown in Figure [[fig:actuator_ :UNNUMBERED: t :END: #+begin_src matlab - stewart.actuators.type = 1; + if strcmp(args.type, 'classical') + stewart.actuators.type = 1; + elseif strcmp(args.type, 'amplified') + stewart.actuators.type = 2; + end stewart.actuators.K = args.K; stewart.actuators.C = args.C; + + stewart.actuators.k1 = args.k1; + stewart.actuators.c1 = args.c1; + + stewart.actuators.ka = args.ka; + stewart.actuators.ca = args.ca; + + stewart.actuators.ke = args.ke; + stewart.actuators.ce = args.ce; + + stewart.actuators.ma = args.ma; + stewart.actuators.me = args.me; #+end_src * =initializeAmplifiedStrutDynamics=: Add Stiffness and Damping properties of each strut for an amplified piezoelectric actuator diff --git a/src/initializeNanoHexapod.m b/src/initializeNanoHexapod.m index 3f502ca..edfbf32 100644 --- a/src/initializeNanoHexapod.m +++ b/src/initializeNanoHexapod.m @@ -13,7 +13,13 @@ arguments args.MR (1,1) double {mustBeNumeric, mustBePositive} = 90e-3 args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180) % initializeStrutDynamics - args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz'})} = 'piezo' + args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz', 'amplified'})} = 'piezo' + args.k1 (1,1) double {mustBeNumeric} = 1e6 + args.ke (1,1) double {mustBeNumeric} = 5e6 + args.ka (1,1) double {mustBeNumeric} = 60e6 + args.c1 (1,1) double {mustBeNumeric} = 10 + args.ce (1,1) double {mustBeNumeric} = 10 + args.ca (1,1) double {mustBeNumeric} = 10 args.k (1,1) double {mustBeNumeric} = -1 args.c (1,1) double {mustBeNumeric} = -1 % initializeJointDynamics @@ -63,15 +69,23 @@ stewart = generateGeneralConfiguration(stewart, 'FH', args.FH, 'FR', args.FR, 'F stewart = computeJointsPose(stewart); if args.k > 0 && args.c > 0 - stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', args.c*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', args.c*ones(6,1)); elseif args.k > 0 - stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1)); elseif strcmp(args.actuator, 'piezo') - stewart = initializeStrutDynamics(stewart, 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1)); elseif strcmp(args.actuator, 'lorentz') - stewart = initializeStrutDynamics(stewart, 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1)); + stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1)); +elseif strcmp(args.actuator, 'amplified') + stewart = initializeStrutDynamics(stewart, 'type', 'amplified', ... + 'k1', args.k1*ones(6,1), ... + 'c1', args.c1*ones(6,1), ... + 'ka', args.ka*ones(6,1), ... + 'ca', args.ca*ones(6,1), ... + 'ke', args.ke*ones(6,1), ... + 'ce', args.ce*ones(6,1)); else - error('args.actuator should be piezo or lorentz'); + error('args.actuator should be piezo, lorentz or amplified'); end stewart = initializeJointDynamics(stewart, ... diff --git a/src/initializeStrutDynamics.m b/src/initializeStrutDynamics.m index 296ecc1..0b70a35 100644 --- a/src/initializeStrutDynamics.m +++ b/src/initializeStrutDynamics.m @@ -16,11 +16,36 @@ function [stewart] = initializeStrutDynamics(stewart, args) arguments stewart + args.type char {mustBeMember(args.type,{'classical', 'amplified'})} = 'classical' args.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 20e6*ones(6,1) args.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 2e1*ones(6,1) + args.k1 (6,1) double {mustBeNumeric} = 1e6 + args.ke (6,1) double {mustBeNumeric} = 5e6 + args.ka (6,1) double {mustBeNumeric} = 60e6 + args.c1 (6,1) double {mustBeNumeric} = 10 + args.ce (6,1) double {mustBeNumeric} = 10 + args.ca (6,1) double {mustBeNumeric} = 10 + args.me (6,1) double {mustBeNumeric} = 0.05 + args.ma (6,1) double {mustBeNumeric} = 0.05 end -stewart.actuators.type = 3; +if strcmp(args.type, 'classical') + stewart.actuators.type = 1; +elseif strcmp(args.type, 'amplified') + stewart.actuators.type = 2; +end stewart.actuators.K = args.K; stewart.actuators.C = args.C; + +stewart.actuators.k1 = args.k1; +stewart.actuators.c1 = args.c1; + +stewart.actuators.ka = args.ka; +stewart.actuators.ca = args.ca; + +stewart.actuators.ke = args.ke; +stewart.actuators.ce = args.ce; + +stewart.actuators.ma = args.ma; +stewart.actuators.me = args.me;