UP | HOME

# Stewart Platform - Dynamics Study

## Table of Contents

- 1. Some tests
  - 1.1. Simscape Model
  - 1.2. test
  - 1.3. Compare external forces and forces applied by the actuators
  - 1.4. Comparison of the static transfer function and the Compliance matrix
  - 1.5. Transfer function from forces applied in the legs to the displacement of the legs

## 1 Some tests

### 1.1 Simscape Model

    open('stewart_platform_dynamics.slx')

### 1.2 test

    stewart = initializeFramesPositions('H', 90e-3, 'MO_B', 45e-3);
    stewart = generateCubicConfiguration(stewart, 'Hc', 60e-3, 'FOc', 45e-3, 'FHa', 5e-3, 'MHb', 5e-3);
    stewart = computeJointsPose(stewart);
    stewart = initializeStrutDynamics(stewart, 'Ki', 1e6*ones(6,1), 'Ci', 1e2*ones(6,1));
    stewart = computeJacobian(stewart);

Estimation of the transfer function from \(\mathcal{\bm{F}}\) to \(\mathcal{\bm{X}}\):

    %% Options for Linearized
    options = linearizeOptions;
    options.SampleTime = 0;

    %% Name of the Simulink File
    mdl = 'stewart_platform_dynamics';

    %% Input/Output definition
    clear io; io_i = 1;
    io(io_i) = linio([mdl, '/F'], 1, 'openinput');  io_i = io_i + 1;
    io(io_i) = linio([mdl, '/X'], 1, 'openoutput'); io_i = io_i + 1;

    %% Run the linearization
    G = linearize(mdl, io, options);
    G.InputName  = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
    G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};

    %% Options for Linearized
    options = linearizeOptions;
    options.SampleTime = 0;

    %% Name of the Simulink File
    mdl = 'stewart_platform_dynamics';

    %% Input/Output definition
    clear io; io_i = 1;
    io(io_i) = linio([mdl, '/J-T'], 1, 'openinput');  io_i = io_i + 1;
    io(io_i) = linio([mdl, '/X'],   1, 'openoutput'); io_i = io_i + 1;

    %% Run the linearization
    G = linearize(mdl, io, options);
    G.InputName  = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
    G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};

    G_cart = minreal(G*inv(stewart.J'));
    G_cart.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};

    figure; bode(G, G_cart)

    %% Options for Linearized
    options = linearizeOptions;
    options.SampleTime = 0;

    %% Name of the Simulink File
    mdl = 'stewart_platform_dynamics';

    %% Input/Output definition
    clear io; io_i = 1;
    io(io_i) = linio([mdl, '/Fext'], 1, 'openinput');  io_i = io_i + 1;
    io(io_i) = linio([mdl, '/X'],    1, 'openoutput'); io_i = io_i + 1;

    %% Run the linearization
    Gd = linearize(mdl, io, options);
    Gd.InputName  = {'Fex', 'Fey', 'Fez', 'Mex', 'Mey', 'Mez'};
    Gd.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};

    freqs = logspace(0, 3, 1000);

    figure;
    bode(Gd, G)

### 1.3 Compare external forces and forces applied by the actuators

Initialization of the Stewart platform.

    stewart = initializeFramesPositions('H', 90e-3, 'MO_B', 45e-3);
    stewart = generateCubicConfiguration(stewart, 'Hc', 60e-3, 'FOc', 45e-3, 'FHa', 5e-3, 'MHb', 5e-3);
    stewart = computeJointsPose(stewart);
    stewart = initializeStrutDynamics(stewart, 'Ki', 1e6*ones(6,1), 'Ci', 1e2*ones(6,1));
    stewart = computeJacobian(stewart);

Estimation of the transfer function from \(\mathcal{\bm{F}}\) to \(\mathcal{\bm{X}}\):

    %% Options for Linearized
    options = linearizeOptions;
    options.SampleTime = 0;

    %% Name of the Simulink File
    mdl = 'stewart_platform_dynamics';

    %% Input/Output definition
    clear io; io_i = 1;
    io(io_i) = linio([mdl, '/F'], 1, 'openinput');  io_i = io_i + 1;
    io(io_i) = linio([mdl, '/X'], 1, 'openoutput'); io_i = io_i + 1;

    %% Run the linearization
    G = linearize(mdl, io, options);
    G.InputName  = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
    G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};

Estimation of the transfer function from \(\mathcal{\bm{F}}_{d}\) to \(\mathcal{\bm{X}}\):

    %% Options for Linearized
    options = linearizeOptions;
    options.SampleTime = 0;

    %% Name of the Simulink File
    mdl = 'stewart_platform_dynamics';

    %% Input/Output definition
    clear io; io_i = 1;
    io(io_i) = linio([mdl, '/Fext'], 1, 'openinput');  io_i = io_i + 1;
    io(io_i) = linio([mdl, '/X'],    1, 'openoutput'); io_i = io_i + 1;

    %% Run the linearization
    Gd = linearize(mdl, io, options);
    Gd.InputName  = {'Fex', 'Fey', 'Fez', 'Mex', 'Mey', 'Mez'};
    Gd.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};

Comparison of the two transfer function matrices.

    freqs = logspace(0, 4, 1000);

    figure;
    bode(Gd, G, freqs)

Seems quite similar.

### 1.4 Comparison of the static transfer function and the Compliance matrix

Initialization of the Stewart platform.

    stewart = initializeFramesPositions('H', 90e-3, 'MO_B', 45e-3);
    stewart = generateCubicConfiguration(stewart, 'Hc', 60e-3, 'FOc', 45e-3, 'FHa', 5e-3, 'MHb', 5e-3);
    stewart = computeJointsPose(stewart);
    stewart = initializeStrutDynamics(stewart, 'Ki', 1e6*ones(6,1), 'Ci', 1e2*ones(6,1));
    stewart = computeJacobian(stewart);

Estimation of the transfer function from \(\mathcal{\bm{F}}\) to \(\mathcal{\bm{X}}\):

    %% Options for Linearized
    options = linearizeOptions;
    options.SampleTime = 0;

    %% Name of the Simulink File
    mdl = 'stewart_platform_dynamics';

    %% Input/Output definition
    clear io; io_i = 1;
    io(io_i) = linio([mdl, '/F'], 1, 'openinput');  io_i = io_i + 1;
    io(io_i) = linio([mdl, '/X'], 1, 'openoutput'); io_i = io_i + 1;

    %% Run the linearization
    G = linearize(mdl, io, options);
    G.InputName  = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
    G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};

Let’s first look at the low frequency transfer function matrix from \(\mathcal{\bm{F}}\) to \(\mathcal{\bm{X}}\).

2.0e-06 | -9.1e-19 | -5.3e-12 | 7.3e-18 | 1.7e-05 | 1.3e-18
-1.7e-18 | 2.0e-06 | 8.6e-19 | -1.7e-05 | -1.5e-17 | 6.7e-12
3.6e-13 | 3.2e-19 | 5.0e-07 | -2.5e-18 | 8.1e-12 | -1.5e-19
1.0e-17 | -1.7e-05 | -5.0e-18 | 1.9e-04 | 9.1e-17 | -3.5e-11
1.7e-05 | -6.9e-19 | -5.3e-11 | 6.9e-18 | 1.9e-04 | 4.8e-18
-3.5e-18 | -4.5e-12 | 1.5e-18 | 7.1e-11 | -3.4e-17 | 4.6e-05

And now at the Compliance matrix.

2.0e-06 | 2.9e-22 | 2.8e-22 | -3.2e-21 | 1.7e-05 | 1.5e-37
-2.1e-22 | 2.0e-06 | -1.8e-23 | -1.7e-05 | -2.3e-21 | 1.1e-22
3.1e-22 | -1.6e-23 | 5.0e-07 | 1.7e-22 | 2.2e-21 | -8.1e-39
2.1e-21 | -1.7e-05 | 2.0e-22 | 1.9e-04 | 2.3e-20 | -8.7e-21
1.7e-05 | 2.5e-21 | 2.0e-21 | -2.8e-20 | 1.9e-04 | 1.3e-36
3.7e-23 | 3.1e-22 | -6.0e-39 | -1.0e-20 | 3.1e-22 | 4.6e-05

The low frequency transfer function matrix from \(\mathcal{\bm{F}}\) to \(\mathcal{\bm{X}}\) corresponds to the compliance matrix of the Stewart platform.

### 1.5 Transfer function from forces applied in the legs to the displacement of the legs

Initialization of the Stewart platform.

    stewart = initializeFramesPositions('H', 90e-3, 'MO_B', 45e-3);
    stewart = generateCubicConfiguration(stewart, 'Hc', 60e-3, 'FOc', 45e-3, 'FHa', 5e-3, 'MHb', 5e-3);
    stewart = computeJointsPose(stewart);
    stewart = initializeStrutDynamics(stewart, 'Ki', 1e6*ones(6,1), 'Ci', 1e2*ones(6,1));
    stewart = computeJacobian(stewart);

Estimation of the transfer function from \(\bm{\tau}\) to \(\bm{L}\):

    %% Options for Linearized
    options = linearizeOptions;
    options.SampleTime = 0;

    %% Name of the Simulink File
    mdl = 'stewart_platform_dynamics';

    %% Input/Output definition
    clear io; io_i = 1;
    io(io_i) = linio([mdl, '/J-T'], 1, 'openinput');  io_i = io_i + 1;
    io(io_i) = linio([mdl, '/L'], 1, 'openoutput'); io_i = io_i + 1;

    %% Run the linearization
    G = linearize(mdl, io, options);
    G.InputName  = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
    G.OutputName = {'L1', 'L2', 'L3', 'L4', 'L5', 'L6'};

    freqs = logspace(1, 3, 1000);
    figure; bode(G, 2*pi*freqs)

    bodeFig({G(1,1), G(1,2)}, freqs, struct('phase', true));

Author: Dehaeze Thomas

Created: 2020-01-22 mer. 16:31