UP | HOME

Identification of the Stewart Platform using Simscape

Table of Contents

1 Modal Analysis of the Stewart Platform

1.1 Initialize the Stewart Platform

stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'none');

1.2 Identification

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

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

%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'],              1, 'openinput');  io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'],  1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
io(io_i) = linio([mdl, '/Relative Motion Sensor'],  2, 'openoutput'); io_i = io_i + 1; % Velocity of {B} w.r.t. {A}

%% Run the linearization
G = linearize(mdl, io);
% G.InputName  = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6'};
% G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', 'Vdx', 'Vdy', 'Vdz', 'Vrx', 'Vry', 'Vrz'};

Let’s check the size of G:

size(G)
size(G)
State-space model with 12 outputs, 6 inputs, and 18 states.
'org_babel_eoe'
ans =
    'org_babel_eoe'

We expect to have only 12 states (corresponding to the 6dof of the mobile platform).

Gm = minreal(G);
Gm = minreal(G);
6 states removed.

And indeed, we obtain 12 states.

1.3 Coordinate transformation

We can perform the following transformation using the ss2ss command.

Gt = ss2ss(Gm, Gm.C);

Then, the C matrix of Gt is the unity matrix which means that the states of the state space model are equal to the measurements \(\bm{Y}\).

The measurements are the 6 displacement and 6 velocities of mobile platform with respect to \(\{B\}\).

We could perform the transformation by hand:

At = Gm.C*Gm.A*pinv(Gm.C);

Bt = Gm.C*Gm.B;

Ct = eye(12);
Dt = zeros(12, 6);

Gt = ss(At, Bt, Ct, Dt);

1.4 Analysis

[V,D] = eig(Gt.A);
Mode Number Resonance Frequency [Hz] Damping Ratio [%]
1.0 780.6 0.4
2.0 780.6 0.3
3.0 903.9 0.3
4.0 1061.4 0.3
5.0 1061.4 0.2
6.0 1269.6 0.2

1.5 Visualizing the modes

To visualize the i’th mode, we may excite the system using the inputs \(U_i\) such that \(B U_i\) is co-linear to \(\xi_i\) (the mode we want to excite).

\[ U(t) = e^{\alpha t} ( ) \]

Let’s first sort the modes and just take the modes corresponding to a eigenvalue with a positive imaginary part.

ws = imag(diag(D));
[ws,I] = sort(ws)
ws = ws(7:end); I = I(7:end);
for i = 1:length(ws)
i_mode = I(i); % the argument is the i'th mode
lambda_i = D(i_mode, i_mode);
xi_i = V(:,i_mode);

a_i = real(lambda_i);
b_i = imag(lambda_i);

Let do 10 periods of the mode.

t = linspace(0, 10/(imag(lambda_i)/2/pi), 1000);
U_i = pinv(Gt.B) * real(xi_i * lambda_i * (cos(b_i * t) + 1i*sin(b_i * t)));
U = timeseries(U_i, t);

Simulation:

load('mat/conf_simscape.mat');
set_param(conf_simscape, 'StopTime', num2str(t(end)));
sim(mdl);

Save the movie of the mode shape.

smwritevideo(mdl, sprintf('figs/mode%i', i), ...
             'PlaybackSpeedRatio', 1/(b_i/2/pi), ...
             'FrameRate', 30, ...
             'FrameSize', [800, 400]);
end

mode1.gif

Figure 1: Identified mode - 1

mode3.gif

Figure 2: Identified mode - 3

mode5.gif

Figure 3: Identified mode - 5

Author: Dehaeze Thomas

Created: 2020-02-13 jeu. 15:44