From 0ed2768295856f092026758b002dd8d4930104d2 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Fri, 22 Nov 2019 10:39:08 +0100 Subject: [PATCH] Update stiffness of Ty stage. Add init of Cedrat actuator --- simscape/index.html | 415 +++++++++++++++++++++++--------------------- simscape/index.org | 119 ++++++++++--- src/identifyPlant.m | 66 ++++--- src/initializeTy.m | 2 +- 4 files changed, 355 insertions(+), 247 deletions(-) diff --git a/simscape/index.html b/simscape/index.html index 672cd5f..6fdfc68 100644 --- a/simscape/index.html +++ b/simscape/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Simscape Model @@ -258,68 +258,68 @@ for the JavaScript code in this tag.

Table of Contents

@@ -330,20 +330,20 @@ for the JavaScript code in this tag. This file is used to explain how this Simscape Model works.

-
-

1 Simulink Project - Startup and Shutdown scripts

+
+

1 Simulink Project - Startup and Shutdown scripts

- +

@@ -409,11 +409,11 @@ The project also permits to automatically add defined folder to the path when th

-
-

2 Simscape Multibody - Presentation

+
+

2 Simscape Multibody - Presentation

- +

@@ -425,8 +425,8 @@ A simscape model per

-
-

2.1 Solid bodies

+
+

2.1 Solid bodies

Each solid body is represented by a solid block. @@ -435,8 +435,8 @@ The geometry of the solid body can be imported using a step file. T

-
-

2.2 Frames

+
+

2.2 Frames

Frames are very important in simscape multibody, they defined where the forces are applied, where the joints are located and where the measurements are made. @@ -448,8 +448,8 @@ They can be defined from the solid body geometry, or using the -

2.3 Joints

+
+

2.3 Joints

Solid Bodies are connected with joints (between frames of the two solid bodies). @@ -459,7 +459,7 @@ Solid Bodies are connected with joints (between frames of the two solid bodies). There are various types of joints that are all described here.

- +
@@ -592,7 +592,7 @@ Joint blocks are assortments of joint primitives:
  • Constant Velocity: Allows rotation at constant velocity between intersection through arbitrarily aligned shafts: CV
  • -
    Table 1: Degrees of freedom associated with each joint
    +
    @@ -884,8 +884,8 @@ Composite Force/Torque sensing: -
    -

    2.4 Measurements

    +
    +

    2.4 Measurements

    A transform sensor block measures the spatial relationship between two frames: the base B and the follower F. @@ -909,8 +909,8 @@ If we want to simulate an inertial sensor, we just have to choose B

    -
    -

    2.5 Excitation

    +
    +

    2.5 Excitation

    We can apply external forces to the model by using an external force and torque block. @@ -923,11 +923,11 @@ Internal force, acting reciprocally between base and following origins is implem

    -
    -

    3 Simulink files and signal names

    +
    +

    3 Simulink files and signal names

    - +

    @@ -935,8 +935,8 @@ In order to "normalize" things, the names of all the signal are listed here.

    -
    -

    3.1 List of Simscape files

    +
    +

    3.1 List of Simscape files

    Few different Simulink files are used: @@ -948,7 +948,7 @@ Few different Simulink files are used:

  • control
  • -
    Table 2: Joint primitives for each joint type
    +
    @@ -1015,14 +1015,14 @@ Few different Simulink files are used: -
    -

    3.2 List of Inputs

    +
    +

    3.2 List of Inputs

    -
    -

    3.2.1 Perturbations

    +
    +

    3.2.1 Perturbations

    -
    Table 3: List of simscape files
    +
    @@ -1068,10 +1068,10 @@ Few different Simulink files are used: -
    -

    3.2.2 Measurement Noise

    +
    +

    3.2.2 Measurement Noise

    -
    Table 4: List of Disturbances
    +
    @@ -1103,10 +1103,10 @@ Few different Simulink files are used: -
    -

    3.2.3 Control Inputs

    +
    +

    3.2.3 Control Inputs

    -
    Table 5: List of Measurement Noise
    +
    @@ -1228,10 +1228,10 @@ Few different Simulink files are used: -
    -

    3.3 List of Outputs

    +
    +

    3.3 List of Outputs

    -
    Table 6: List of Control Inputs
    +
    @@ -1347,11 +1347,11 @@ Few different Simulink files are used: -
    -

    4 Simulink Library

    +
    +

    4 Simulink Library

    - +

    @@ -1359,8 +1359,8 @@ A simulink library is developed in order to share elements between the different

    -
    -

    4.1 inputs

    +
    +

    4.1 inputs

    inputs.slx @@ -1368,8 +1368,8 @@ A simulink library is developed in order to share elements between the different

    -
    -

    4.2 nass_library

    +
    +

    4.2 nass_library

    nasslibrary.slx @@ -1377,8 +1377,8 @@ A simulink library is developed in order to share elements between the different

    -
    -

    4.3 pos_error_wrt_nass_base

    +
    +

    4.3 pos_error_wrt_nass_base

    poserrorwrtnassbase.slx @@ -1386,8 +1386,8 @@ A simulink library is developed in order to share elements between the different

    -
    -

    4.4 QuaternionToAngles

    +
    +

    4.4 QuaternionToAngles

    QuaternionToAngles.slx @@ -1395,8 +1395,8 @@ A simulink library is developed in order to share elements between the different

    -
    -

    4.5 RotationMatrixToAngle

    +
    +

    4.5 RotationMatrixToAngle

    RotationMatrixToAngle.slx @@ -1405,19 +1405,19 @@ A simulink library is developed in order to share elements between the different

    -
    -

    5 Scripts

    +
    +

    5 Scripts

    - +

    -
    -

    5.1 Simulation Initialization

    +
    +

    5.1 Simulation Initialization

    - +

    @@ -1441,19 +1441,19 @@ load( -

    6 Functions

    +
    +

    6 Functions

    - +

    -
    -

    6.1 computePsdDispl

    +
    +

    6.1 computePsdDispl

    - +

    @@ -1489,11 +1489,11 @@ This Matlab function is accessible here.

    -
    -

    6.2 computeSetpoint

    +
    +

    6.2 computeSetpoint

    - +

    @@ -1565,11 +1565,11 @@ setpoint( -

    6.3 converErrorBasis

    +
    +

    6.3 converErrorBasis

    - +

    @@ -1707,11 +1707,11 @@ error_nass = [dx; dy; dz; th

    -
    -

    6.4 generateDiagPidControl

    +
    +

    6.4 generateDiagPidControl

    - +

    @@ -1741,11 +1741,11 @@ This Matlab function is accessible her

    -
    -

    6.5 identifyPlant

    +
    +

    6.5 identifyPlant

    - +

    @@ -1810,11 +1810,11 @@ This Matlab function is accessible here.

    -
    -

    6.6 runSimulation

    +
    +

    6.6 runSimulation

    - +

    @@ -1883,18 +1883,18 @@ This Matlab function is accessible here.

    -
    -

    7 Initialize Elements

    +
    +

    7 Initialize Elements

    - +

    -
    -

    7.1 Simulation Configuration

    +
    +

    7.1 Simulation Configuration

    - +

    @@ -1940,11 +1940,11 @@ This Matlab function is accessible here

    -
    -

    7.2 Experiment

    +
    +

    7.2 Experiment

    - +

    @@ -1984,11 +1984,11 @@ This Matlab function is accessible here<

    -
    -

    7.3 Inputs

    +
    +

    7.3 Inputs

    - +

    @@ -2176,11 +2176,11 @@ This Matlab function is accessible here.

    -
    -

    7.4 Ground

    +
    +

    7.4 Ground

    - +

    @@ -2204,11 +2204,11 @@ This Matlab function is accessible here.

    -
    -

    7.5 Granite

    +
    +

    7.5 Granite

    - +

    @@ -2216,26 +2216,37 @@ This Matlab function is accessible here

    -
    function [granite] = initializeGranite()
    +
    function [granite] = initializeGranite()
         %%
         granite = struct();
     
         %% Static Properties
         granite.density = 2800; % [kg/m3]
    -    granite.volume  = 0.72; % [m3] TODO - should
    +    granite.volume  = 0.749; % [m3] TODO - should
         granite.mass    = granite.density*granite.volume; % [kg]
         granite.color   = [1 1 1];
         granite.STEP    = './STEPS/granite/granite.STEP';
     
    +    granite.mass_top = 4000; % [kg] TODO
    +
         %% Dynamical Properties
    -    granite.k.x = 1e8; % [N/m]
    -    granite.c.x = 1e4; % [N/(m/s)]
    +    granite.k.x = 4e9; % [N/m]
    +    granite.c.x = 0.1*sqrt(granite.mass_top*granite.k.x); % [N/(m/s)]
     
    -    granite.k.y = 1e8; % [N/m]
    -    granite.c.y = 1e4; % [N/(m/s)]
    +    granite.k.y = 3e8; % [N/m]
    +    granite.c.y = 0.1*sqrt(granite.mass_top*granite.k.y); % [N/(m/s)]
     
    -    granite.k.z = 1e8; % [N/m]
    -    granite.c.z = 1e4; % [N/(m/s)]
    +    granite.k.z = 8e8; % [N/m]
    +    granite.c.z = 0.5*sqrt(granite.mass_top*granite.k.z); % [N/(m/s)]
    +
    +    granite.k.rx = 1e4; % [N*m/deg]
    +    granite.c.rx = 0.1*sqrt(granite.mass_top*granite.k.rx); % [N*m/(deg/s)]
    +
    +    granite.k.ry = 1e4; % [N*m/deg]
    +    granite.c.ry = 0.1*sqrt(granite.mass_top*granite.k.ry); % [N*m/(deg/s)]
    +
    +    granite.k.rz = 1e6; % [N*m/deg]
    +    granite.c.rz = 0.1*sqrt(granite.mass_top*granite.k.rz); % [N*m/(deg/s)]
     
         %% Positioning parameters
         granite.sample_pos = 0.8; % Z-offset for the initial position of the sample [m]
    @@ -2248,11 +2259,11 @@ This Matlab function is accessible here
     
    -
    -

    7.6 Translation Stage

    +
    +

    7.6 Translation Stage

    - +

    @@ -2312,18 +2323,18 @@ This Matlab function is accessible here. ty.rotor.color = [0.792 0.820 0.933]; ty.rotor.STEP = './STEPS/ty/Ty_Motor_Rotor.STEP'; - ty.m = 250; % TODO [kg] + ty.m = 1000; % TODO [kg] %% Y-Translation - Dynamicals Properties if opts.rigid ty.k.ax = 1e10; % Axial Stiffness for each of the 4 guidance (y) [N/m] else - ty.k.ax = 1e7/4; % Axial Stiffness for each of the 4 guidance (y) [N/m] + ty.k.ax = 5e7; % Axial Stiffness for each of the 4 guidance (y) [N/m] end - ty.k.rad = 9e9/4; % Radial Stiffness for each of the 4 guidance (x-z) [N/m] + ty.k.rad = 5e7; % Radial Stiffness for each of the 4 guidance (x-z) [N/m] - ty.c.ax = 100*(1/5)*sqrt(ty.k.ax/ty.m); - ty.c.rad = 100*(1/5)*sqrt(ty.k.rad/ty.m); + ty.c.ax = 0.1*sqrt(ty.k.ax*ty.m); + ty.c.rad = 0.1*sqrt(ty.k.rad*ty.m); %% Save save('./mat/stages.mat', 'ty', '-append'); @@ -2333,11 +2344,11 @@ This Matlab function is accessible here.

    -
    -

    7.7 Tilt Stage

    +
    +

    7.7 Tilt Stage

    - +

    @@ -2377,7 +2388,7 @@ This Matlab function is accessible here. ry.stage.color = [0.792 0.820 0.933]; ry.stage.STEP = './STEPS/ry/Tilt_Stage.STEP'; - ry.m = 200; % TODO [kg] + ry.m = 800; % TODO [kg] %% Tilt Stage - Dynamical Properties if opts.rigid @@ -2386,14 +2397,14 @@ This Matlab function is accessible here. ry.k.tilt = 1e4; % Rotation stiffness around y [N*m/deg] end - ry.k.h = 357e6/4; % Stiffness in the direction of the guidance [N/m] - ry.k.rad = 555e6/4; % Stiffness in the top direction [N/m] - ry.k.rrad = 238e6/4; % Stiffness in the side direction [N/m] + ry.k.h = 1e8; % Stiffness in the direction of the guidance [N/m] + ry.k.rad = 1e8; % Stiffness in the top direction [N/m] + ry.k.rrad = 1e8; % Stiffness in the side direction [N/m] - ry.c.h = 10*(1/5)*sqrt(ry.k.h/ry.m); - ry.c.rad = 10*(1/5)*sqrt(ry.k.rad/ry.m); - ry.c.rrad = 10*(1/5)*sqrt(ry.k.rrad/ry.m); - ry.c.tilt = 10*(1/1)*sqrt(ry.k.tilt/ry.m); + ry.c.h = 0.1*sqrt(ry.k.h*ry.m); + ry.c.rad = 0.1*sqrt(ry.k.rad*ry.m); + ry.c.rrad = 0.1*sqrt(ry.k.rrad*ry.m); + ry.c.tilt = 0.1*sqrt(ry.k.tilt*ry.m); %% Positioning parameters ry.z_offset = 0.58178; % Z-Offset so that the center of rotation matches the sample center [m] @@ -2406,11 +2417,11 @@ This Matlab function is accessible here.

    -
    -

    7.8 Spindle

    +
    +

    7.8 Spindle

    - +

    @@ -2453,19 +2464,19 @@ This Matlab function is accessible here. % Estimated stiffnesses rz.k.ax = 2e9; % Axial Stiffness [N/m] rz.k.rad = 7e8; % Radial Stiffness [N/m] - rz.k.rot = 100e6*2*pi/360; % Rotational Stiffness [N*m/deg] + rz.k.tilt = 1e8*(2*pi/360); % Rotational Stiffness [N*m/deg] if opts.rigid - rz.k.tilt = 1e10; % Vertical Rotational Stiffness [N*m/deg] + rz.k.rot = 1e10; % Rotational Stiffness [N*m/deg] else - rz.k.tilt = 1e2; % TODO what value should I put? [N*m/deg] + rz.k.rot = 1e6; % TODO what value should I put? [N*m/deg] end - % TODO - rz.c.ax = 2*sqrt(rz.k.ax/rz.m); - rz.c.rad = 2*sqrt(rz.k.rad/rz.m); - rz.c.tilt = 100*sqrt(rz.k.tilt/rz.m); - rz.c.rot = 100*sqrt(rz.k.rot/rz.m); + % Damping + rz.c.ax = 0.1*sqrt(rz.k.ax*rz.m); + rz.c.rad = 0.1*sqrt(rz.k.rad*rz.m); + rz.c.tilt = 0.1*sqrt(rz.k.tilt*rz.m); + rz.c.rot = 0.1*sqrt(rz.k.rot*rz.m); %% Save save('./mat/stages.mat', 'rz', '-append'); @@ -2475,11 +2486,11 @@ This Matlab function is accessible here.

    -
    -

    7.9 Micro Hexapod

    + -
    -

    7.10 Center of gravity compensation

    +
    +

    7.10 Center of gravity compensation

    - +

    @@ -2732,11 +2742,12 @@ This Matlab function is accessible here.

    -
    -

    7.11 Mirror

    + +
    +

    7.11 Mirror

    - +

    @@ -2802,11 +2813,11 @@ This Matlab function is accessible here.

    -
    -

    7.12 Nano Hexapod

    +
    +

    7.12 Nano Hexapod

    - +

    @@ -3019,11 +3030,11 @@ This Matlab function is accessible here

    -
    -

    7.13 Sample

    +
    +

    7.13 Sample

    - +

    @@ -3068,7 +3079,7 @@ This Matlab function is accessible here.

    Author: Dehaeze Thomas

    -

    Created: 2019-10-15 mar. 09:28

    +

    Created: 2019-10-16 mer. 13:20

    Validate

    diff --git a/simscape/index.org b/simscape/index.org index 66b112e..c2995af 100644 --- a/simscape/index.org +++ b/simscape/index.org @@ -655,41 +655,68 @@ This Matlab function is accessible [[file:../src/identifyPlant.m][here]]. mdl = 'sim_nano_station_id'; %% Input/Output definition - io(1) = linio([mdl, '/Fn'], 1, 'input'); % Cartesian forces applied by NASS - io(2) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion - io(3) = linio([mdl, '/Fs'], 1, 'input'); % External forces on the sample - io(4) = linio([mdl, '/Fnl'], 1, 'input'); % Forces applied on the NASS's legs - io(5) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample - io(6) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs - io(7) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs - io(8) = linio([mdl, '/Es'], 1, 'output'); % Position Error w.r.t. NASS base + io(1) = linio([mdl, '/Fn'], 1, 'input'); % Cartesian forces applied by NASS + io(2) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion + io(3) = linio([mdl, '/Fs'], 1, 'input'); % External forces on the sample + io(4) = linio([mdl, '/Fnl'], 1, 'input'); % Forces applied on the NASS's legs + io(5) = linio([mdl, '/Fd'], 1, 'input'); % Disturbance Forces + io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample + io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs + io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs + io(9) = linio([mdl, '/Es'], 1, 'output'); % Position Error w.r.t. NASS base + io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the legs %% Run the linearization - G = linearize(mdl, io, 0); + G = linearize(mdl, io, options); G.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz', ... 'Dgx', 'Dgy', 'Dgz', ... 'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz', ... - 'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}; + 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', ... + 'Frzz', 'Ftyx', 'Ftyz'}; G.OutputName = {'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz', ... 'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6', ... 'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6', ... - 'Edx', 'Rdy', 'Edz', 'Erx', 'Ery', 'Erz'}; + 'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz', ... + 'Vm1', 'Vm2', 'Vm3', 'Vm4', 'Vm5', 'Vm6'}; %% Create the sub transfer functions + minreal_tol = sqrt(eps); % From forces applied in the cartesian frame to displacement of the sample in the cartesian frame - sys.G_cart = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'})); + sys.G_cart = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'}), minreal_tol, false); % From ground motion to Sample displacement - sys.G_gm = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Dgx', 'Dgy', 'Dgz'})); + sys.G_gm = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Dgx', 'Dgy', 'Dgz'}), minreal_tol, false); % From direct forces applied on the sample to displacement of the sample - sys.G_fs = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz'})); + sys.G_fs = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz'}), minreal_tol, false); % From forces applied on NASS's legs to force sensor in each leg - sys.G_iff = minreal(G({'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'})); + sys.G_iff = minreal(G({'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}), minreal_tol, false); % From forces applied on NASS's legs to displacement of each leg - sys.G_dleg = minreal(G({'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'})); - % From forces applied on NASS's legs to displacement of each leg - sys.G_plant = minreal(G({'Edx', 'Rdy', 'Edz', 'Erx', 'Ery', 'Erz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'})); + sys.G_dleg = minreal(G({'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}), minreal_tol, false); + % From forces/torques applied by the NASS to position error + sys.G_plant = minreal(G({'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'}), minreal_tol, false); + % From forces/torques applied by the NASS to velocity of the actuator + sys.G_geoph = minreal(G({'Vm1', 'Vm2', 'Vm3', 'Vm4', 'Vm5', 'Vm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}), minreal_tol, false); + % From various disturbance forces to position error + sys.G_dist = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Frzz', 'Ftyx', 'Ftyz'}), minreal_tol, false); + + %% We remove low frequency and high frequency dynamics that are usually unstable + % using =freqsep= is risky as it may change the shape of the transfer functions + % f_min = 0.1; % [Hz] + % f_max = 1e4; % [Hz] + + % [~, sys.G_cart] = freqsep(freqsep(sys.G_cart, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_gm] = freqsep(freqsep(sys.G_gm, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_fs] = freqsep(freqsep(sys.G_fs, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_iff] = freqsep(freqsep(sys.G_iff, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_dleg] = freqsep(freqsep(sys.G_dleg, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_plant] = freqsep(freqsep(sys.G_plant, 2*pi*f_max), 2*pi*f_min); + + %% We finally verify that the system is stable + if ~isstable(sys.G_cart) || ~isstable(sys.G_gm) || ~isstable(sys.G_fs) || ~isstable(sys.G_iff) || ~isstable(sys.G_dleg) || ~isstable(sys.G_plant) + warning('One of the identified system is unstable'); + end end #+end_src + ** runSimulation :PROPERTIES: :header-args:matlab+: :tangle ../src/runSimulation.m @@ -1194,7 +1221,7 @@ This Matlab function is accessible [[file:../src/initializeTy.m][here]]. ty.k.ax = 1e12; % Axial Stiffness for each of the 4 guidance (y) [N/m] ty.k.rad = 1e12; % Radial Stiffness for each of the 4 guidance (x-z) [N/m] else - ty.k.ax = 5e7; % Axial Stiffness for each of the 4 guidance (y) [N/m] + ty.k.ax = 5e8; % Axial Stiffness for each of the 4 guidance (y) [N/m] ty.k.rad = 5e7; % Radial Stiffness for each of the 4 guidance (x-z) [N/m] end @@ -1750,7 +1777,7 @@ This Matlab function is accessible [[file:../src/initializeNanoHexapod.m][here]] SP.color.bottom = [0.7 0.7 0.7]; % [rgb] SP.color.top = [0.7 0.7 0.7]; % [rgb] SP.k.ax = 0; % [N*m/deg] - SP.ksi.ax = 3; + SP.ksi.ax = 0; SP.thickness.bottom = SP.height.bottom-Leg.sphere.bottom; % [mm] SP.thickness.top = SP.height.top-Leg.sphere.top; % [mm] @@ -1780,7 +1807,11 @@ This Matlab function is accessible [[file:../src/initializeNanoHexapod.m][here]] function [element] = updateDamping(element) field = fieldnames(element.k); for i = 1:length(field) - element.c.(field{i}) = 1/element.ksi.(field{i})*sqrt(element.k.(field{i})/element.m); + if element.ksi.(field{i}) > 0 + element.c.(field{i}) = 1/element.ksi.(field{i})*sqrt(element.k.(field{i})/element.m); + else + element.c.(field{i}) = 0; + end end end @@ -1876,6 +1907,46 @@ This Matlab function is accessible [[file:../src/initializeNanoHexapod.m][here]] end #+end_src +** Cedrat Actuator + :PROPERTIES: + :header-args:matlab+: :tangle ../src/initializeCedratPiezo.m + :header-args:matlab+: :comments org :mkdirp yes + :header-args:matlab+: :eval no :results none + :END: + <> + +This Matlab function is accessible [[file:../src/initializeCedratPiezo.m][here]]. + +#+begin_src matlab + function [cedrat] = initializeCedratPiezo(opts_param) + %% Default values for opts + opts = struct(); + + %% Populate opts with input parameters + if exist('opts_param','var') + for opt = fieldnames(opts_param)' + opts.(opt{1}) = opts_param.(opt{1}); + end + end + + %% Stewart Object + cedrat = struct(); + cedrat.k = 10e7; % Linear Stiffness of each "blade" [N/m] + cedrat.ka = 10e7; % Linear Stiffness of the stack [N/m] + + cedrat.c = 0.1*sqrt(1*cedrat.k); % [N/(m/s)] + cedrat.ca = 0.1*sqrt(1*cedrat.ka); % [N/(m/s)] + + cedrat.L = 80; % Total Width of the Actuator[mm] + cedrat.H = 45; % Total Height of the Actuator [mm] + cedrat.L2 = sqrt((cedrat.L/2)^2 + (cedrat.H/2)^2); % Length of the elipsoidal sections [mm] + cedrat.alpha = 180/pi*atan2(cedrat.L/2, cedrat.H/2); % [deg] + + %% Save + save('./mat/stages.mat', 'cedrat', '-append'); + end +#+end_src + ** Sample :PROPERTIES: :header-args:matlab+: :tangle ../src/initializeSample.m @@ -1905,13 +1976,13 @@ This Matlab function is accessible [[file:../src/initializeSample.m][here]]. %% sample.k.x = 1e8; - sample.c.x = sqrt(sample.k.x*sample.mass)/10; + sample.c.x = 0.1*sqrt(sample.k.x*sample.mass); sample.k.y = 1e8; - sample.c.y = sqrt(sample.k.y*sample.mass)/10; + sample.c.y = 0.1*sqrt(sample.k.y*sample.mass); sample.k.z = 1e8; - sample.c.z = sqrt(sample.k.y*sample.mass)/10; + sample.c.z = 0.1*sqrt(sample.k.z*sample.mass); %% Save save('./mat/stages.mat', 'sample', '-append'); diff --git a/src/identifyPlant.m b/src/identifyPlant.m index 1743247..2398e9a 100644 --- a/src/identifyPlant.m +++ b/src/identifyPlant.m @@ -1,12 +1,12 @@ % identifyPlant % :PROPERTIES: -% :header-args:matlab+: :tangle src/identifyPlant.m +% :header-args:matlab+: :tangle ../src/identifyPlant.m % :header-args:matlab+: :comments org :mkdirp yes % :header-args:matlab+: :eval no :results none % :END: % <> -% This Matlab function is accessible [[file:src/identifyPlant.m][here]]. +% This Matlab function is accessible [[file:../src/identifyPlant.m][here]]. function [sys] = identifyPlant(opts_param) @@ -28,37 +28,63 @@ function [sys] = identifyPlant(opts_param) mdl = 'sim_nano_station_id'; %% Input/Output definition - io(1) = linio([mdl, '/Fn'], 1, 'input'); % Cartesian forces applied by NASS - io(2) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion - io(3) = linio([mdl, '/Fs'], 1, 'input'); % External forces on the sample - io(4) = linio([mdl, '/Fnl'], 1, 'input'); % Forces applied on the NASS's legs - io(5) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample - io(6) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs - io(7) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs - io(8) = linio([mdl, '/Es'], 1, 'output'); % Position Error w.r.t. NASS base + io(1) = linio([mdl, '/Fn'], 1, 'input'); % Cartesian forces applied by NASS + io(2) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion + io(3) = linio([mdl, '/Fs'], 1, 'input'); % External forces on the sample + io(4) = linio([mdl, '/Fnl'], 1, 'input'); % Forces applied on the NASS's legs + io(5) = linio([mdl, '/Fd'], 1, 'input'); % Disturbance Forces + io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample + io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs + io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs + io(9) = linio([mdl, '/Es'], 1, 'output'); % Position Error w.r.t. NASS base + io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the legs %% Run the linearization - G = linearize(mdl, io, 0); + G = linearize(mdl, io, options); G.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz', ... 'Dgx', 'Dgy', 'Dgz', ... 'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz', ... - 'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}; + 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', ... + 'Frzz', 'Ftyx', 'Ftyz'}; G.OutputName = {'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz', ... 'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6', ... 'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6', ... - 'Edx', 'Rdy', 'Edz', 'Erx', 'Ery', 'Erz'}; + 'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz', ... + 'Vm1', 'Vm2', 'Vm3', 'Vm4', 'Vm5', 'Vm6'}; %% Create the sub transfer functions + minreal_tol = sqrt(eps); % From forces applied in the cartesian frame to displacement of the sample in the cartesian frame - sys.G_cart = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'})); + sys.G_cart = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'}), minreal_tol, false); % From ground motion to Sample displacement - sys.G_gm = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Dgx', 'Dgy', 'Dgz'})); + sys.G_gm = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Dgx', 'Dgy', 'Dgz'}), minreal_tol, false); % From direct forces applied on the sample to displacement of the sample - sys.G_fs = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz'})); + sys.G_fs = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz'}), minreal_tol, false); % From forces applied on NASS's legs to force sensor in each leg - sys.G_iff = minreal(G({'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'})); + sys.G_iff = minreal(G({'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}), minreal_tol, false); % From forces applied on NASS's legs to displacement of each leg - sys.G_dleg = minreal(G({'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'})); - % From forces applied on NASS's legs to displacement of each leg - sys.G_plant = minreal(G({'Edx', 'Rdy', 'Edz', 'Erx', 'Ery', 'Erz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'})); + sys.G_dleg = minreal(G({'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}), minreal_tol, false); + % From forces/torques applied by the NASS to position error + sys.G_plant = minreal(G({'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'}), minreal_tol, false); + % From forces/torques applied by the NASS to velocity of the actuator + sys.G_geoph = minreal(G({'Vm1', 'Vm2', 'Vm3', 'Vm4', 'Vm5', 'Vm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}), minreal_tol, false); + % From various disturbance forces to position error + sys.G_dist = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Frzz', 'Ftyx', 'Ftyz'}), minreal_tol, false); + + %% We remove low frequency and high frequency dynamics that are usually unstable + % using =freqsep= is risky as it may change the shape of the transfer functions + % f_min = 0.1; % [Hz] + % f_max = 1e4; % [Hz] + + % [~, sys.G_cart] = freqsep(freqsep(sys.G_cart, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_gm] = freqsep(freqsep(sys.G_gm, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_fs] = freqsep(freqsep(sys.G_fs, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_iff] = freqsep(freqsep(sys.G_iff, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_dleg] = freqsep(freqsep(sys.G_dleg, 2*pi*f_max), 2*pi*f_min); + % [~, sys.G_plant] = freqsep(freqsep(sys.G_plant, 2*pi*f_max), 2*pi*f_min); + + %% We finally verify that the system is stable + if ~isstable(sys.G_cart) || ~isstable(sys.G_gm) || ~isstable(sys.G_fs) || ~isstable(sys.G_iff) || ~isstable(sys.G_dleg) || ~isstable(sys.G_plant) + warning('One of the identified system is unstable'); + end end diff --git a/src/initializeTy.m b/src/initializeTy.m index b164a9a..ccbce0f 100644 --- a/src/initializeTy.m +++ b/src/initializeTy.m @@ -68,7 +68,7 @@ function [ty] = initializeTy(opts_param) ty.k.ax = 1e12; % Axial Stiffness for each of the 4 guidance (y) [N/m] ty.k.rad = 1e12; % Radial Stiffness for each of the 4 guidance (x-z) [N/m] else - ty.k.ax = 5e7; % Axial Stiffness for each of the 4 guidance (y) [N/m] + ty.k.ax = 5e8; % Axial Stiffness for each of the 4 guidance (y) [N/m] ty.k.rad = 5e7; % Radial Stiffness for each of the 4 guidance (x-z) [N/m] end
    Table 7: List of Outputs