diff --git a/docs/identification.html b/docs/identification.html index c61662e..3e79141 100644 --- a/docs/identification.html +++ b/docs/identification.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-We would like to extract a state space model of the Stewart Platform from the Simscape model. -
- --The inputs are: -
-Symbol | -Meaning | -
---|---|
\(\bm{\mathcal{F}}_{d}\) | -External forces applied in {B} | -
\(\bm{\tau}\) | -Joint forces | -
\(\bm{\mathcal{F}}\) | -Cartesian forces applied by the Joints | -
\(\bm{D}_{w}\) | -Fixed Based translation and rotations around {A} | -
-The outputs are: -
-Symbol | -Meaning | -
---|---|
\(\bm{\mathcal{X}}\) | -Relative Motion of {B} with respect to {A} | -
\(\bm{\mathcal{L}}\) | -Joint Displacement | -
\(\bm{F}_{m}\) | -Force Sensors in each strut | -
\(\bm{v}_{m}\) | -Inertial Sensors located at \(b_i\) measuring in the direction of the strut | -
-- - - --An important difference from basic Simulink models is that the states in a physical network are not independent in general, because some states have dependencies on other states through constraints. -
-
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'); ++
stewart = initializeStewartPlatform(); -stewart = initializeFramesPositions(stewart); -stewart = generateGeneralConfiguration(stewart); -stewart = computeJointsPose(stewart); -stewart = initializeStrutDynamics(stewart); -stewart = initializeCylindricalPlatforms(stewart); -stewart = initializeCylindricalStruts(stewart); -stewart = computeJacobian(stewart); -stewart = initializeStewartPose(stewart); --
%% Options for Linearized options = linearizeOptions; options.SampleTime = 0; %% Name of the Simulink File -mdl = 'stewart_platform_identification'; +mdl = 'stewart_platform_model'; %% Input/Output definition clear io; io_i = 1; -io(io_i) = linio([mdl, '/tau'], 1, 'openinput'); io_i = 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; -io(io_i) = linio([mdl, '/Vm'], 1, 'openoutput'); io_i = io_i + 1; -io(io_i) = linio([mdl, '/Taum'], 1, 'openoutput'); io_i = io_i + 1; -io(io_i) = linio([mdl, '/Lm'], 1, 'openoutput'); io_i = io_i + 1; - -%% Run the linearization -G = linearize(mdl, io, options); -G.InputName = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6', ... - 'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'}; - -G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', ... - 'Vm1', 'Vm2', 'Vm3', 'Vm4', 'Vm5', 'Vm6', ... - 'taum1', 'taum2', 'taum3', 'taum4', 'taum5', 'taum6', ... - 'Lm1', 'Lm2', 'Lm3', 'Lm4', 'Lm5', 'Lm6'}; --
stewart = initializeStewartPlatform(); -stewart = initializeFramesPositions(stewart); -stewart = generateGeneralConfiguration(stewart); -stewart = computeJointsPose(stewart); -stewart = initializeStrutDynamics(stewart); -stewart = initializeCylindricalPlatforms(stewart); -stewart = initializeCylindricalStruts(stewart); -stewart = computeJacobian(stewart); -stewart = initializeStewartPose(stewart); --
%% Options for Linearized -options = linearizeOptions; -options.SampleTime = 0; - -%% Name of the Simulink File -mdl = 'stewart_platform_identification_simple'; - -%% Input/Output definition -clear io; io_i = 1; -io(io_i) = linio([mdl, '/tau'], 1, 'openinput'); io_i = io_i + 1; -io(io_i) = linio([mdl, '/X'], 1, 'openoutput'); io_i = io_i + 1; -io(io_i) = linio([mdl, '/Xdot'], 1, 'openoutput'); io_i = 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); @@ -541,8 +373,8 @@ And indeed, we obtain 12 states.
We can perform the following transformation using the ss2ss
command.
[V,D] = eig(Gt.A);@@ -604,38 +436,38 @@ Gt = ss(At, Bt, Ct, Dt);
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).
@@ -744,359 +576,11 @@ Save the movie of the mode shape.%% Options for Linearized -options = linearizeOptions; -options.SampleTime = 0; - -%% Name of the Simulink File -mdl = 'stewart_platform_identification'; - -%% Input/Output definition -clear io; io_i = 1; -io(io_i) = linio([mdl, '/tau'], 1, 'openinput'); io_i = io_i + 1; -io(io_i) = linio([mdl, '/Lm'], 1, 'openoutput'); io_i = io_i + 1; - -%% Run the linearization -G = linearize(mdl, io, options); -% G.InputName = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6'}; -% G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', 'Vdx', 'Vdy', 'Vdz', 'Vrx', 'Vry', 'Vrz'}; --
size(G) --
At = G.C*G.A*pinv(G.C); - -Bt = G.C*G.B; - -Ct = eye(12); -Dt = zeros(12, 6); --
Gt = ss(At, Bt, Ct, Dt); --
size(Gt) --
open 'stewart_identification_simple.slx'
-
-stewart = initializeStewartPlatform(); -stewart = initializeFramesPositions(stewart); -stewart = generateGeneralConfiguration(stewart); -stewart = computeJointsPose(stewart); -stewart = initializeStrutDynamics(stewart); -stewart = initializeCylindricalPlatforms(stewart); -stewart = initializeCylindricalStruts(stewart); -stewart = computeJacobian(stewart); -stewart = initializeStewartPose(stewart); --
stateorder = {... - 'stewart_platform_identification_simple/Solver Configuration/EVAL_KEY/INPUT_1_1_1',... - 'stewart_platform_identification_simple/Solver Configuration/EVAL_KEY/INPUT_2_1_1',... - 'stewart_platform_identification_simple/Solver Configuration/EVAL_KEY/INPUT_3_1_1',... - 'stewart_platform_identification_simple/Solver Configuration/EVAL_KEY/INPUT_4_1_1',... - 'stewart_platform_identification_simple/Solver Configuration/EVAL_KEY/INPUT_5_1_1',... - 'stewart_platform_identification_simple/Solver Configuration/EVAL_KEY/INPUT_6_1_1',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.cylindrical_joint.Rz.q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_2.Subsystem.cylindrical_joint.Rz.q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_3.Subsystem.cylindrical_joint.Rz.q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_4.Subsystem.cylindrical_joint.Rz.q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_5.Subsystem.cylindrical_joint.Rz.q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_6.Subsystem.cylindrical_joint.Rz.q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.cylindrical_joint.Pz.p',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_2.Subsystem.cylindrical_joint.Pz.p',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_3.Subsystem.cylindrical_joint.Pz.p',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_4.Subsystem.cylindrical_joint.Pz.p',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_5.Subsystem.cylindrical_joint.Pz.p',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_6.Subsystem.cylindrical_joint.Pz.p',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.cylindrical_joint.Rz.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_2.Subsystem.cylindrical_joint.Rz.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_3.Subsystem.cylindrical_joint.Rz.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_4.Subsystem.cylindrical_joint.Rz.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_5.Subsystem.cylindrical_joint.Rz.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_6.Subsystem.cylindrical_joint.Rz.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.cylindrical_joint.Pz.v',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_2.Subsystem.cylindrical_joint.Pz.v',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_3.Subsystem.cylindrical_joint.Pz.v',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_4.Subsystem.cylindrical_joint.Pz.v',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_5.Subsystem.cylindrical_joint.Pz.v',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_6.Subsystem.cylindrical_joint.Pz.v',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.spherical_joint_F.S.Q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_2.Subsystem.spherical_joint_F.S.Q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_3.Subsystem.spherical_joint_F.S.Q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_4.Subsystem.spherical_joint_F.S.Q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_5.Subsystem.spherical_joint_F.S.Q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_6.Subsystem.spherical_joint_F.S.Q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_2.Subsystem.spherical_joint_F.S.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_3.Subsystem.spherical_joint_F.S.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_4.Subsystem.spherical_joint_F.S.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_5.Subsystem.spherical_joint_F.S.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_6.Subsystem.spherical_joint_F.S.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.spherical_joint_F.S.w',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.spherical_joint_M.S.Q',... - 'stewart_platform_identification_simple.Stewart_Platform.Strut_1.Subsystem.spherical_joint_M.S.w'}; --
%% Options for Linearized -options = linearizeOptions; -options.SampleTime = 0; - -%% Name of the Simulink File -mdl = 'stewart_platform_identification_simple'; - -%% Input/Output definition -clear io; io_i = 1; -io(io_i) = linio([mdl, '/tau'], 1, 'openinput'); io_i = io_i + 1; -io(io_i) = linio([mdl, '/X'], 1, 'openoutput'); io_i = io_i + 1; -io(io_i) = linio([mdl, '/Xdot'], 1, 'openoutput'); io_i = io_i + 1; - -%% Run the linearization -G = linearize(mdl, io, options); -G.InputName = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6'}; - -G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', 'Vdx', 'Vdy', 'Vdz', 'Vrx', 'Vry', 'Vrz'}; --
size(G) --
G.StateName --
-From a force applied in the Cartesian frame to a displacement in the Cartesian frame. -
-figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_cart(1, 1), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_cart(2, 1), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_cart(3, 1), freqs, 'Hz')))); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude'); --
figure;
-bode(G.G_cart, freqs);
-
-figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_forc(1, 1), freqs, 'Hz'))), 'k-', 'DisplayName', '$F_{m_i}/F_{i}$'); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [N/N]'); -legend('location', 'southeast'); --
figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_forc(1, 1), freqs, 'Hz'))), 'k-', 'DisplayName', '$F_{m_i}/F_{i}$'); -plot(freqs, abs(squeeze(freqresp(G.G_forc(2, 1), freqs, 'Hz'))), 'k--', 'DisplayName', '$F_{m_j}/F_{i}$'); -plot(freqs, abs(squeeze(freqresp(G.G_forc(3, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -plot(freqs, abs(squeeze(freqresp(G.G_forc(4, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -plot(freqs, abs(squeeze(freqresp(G.G_forc(5, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -plot(freqs, abs(squeeze(freqresp(G.G_forc(6, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [N/N]'); -legend('location', 'southeast'); --
figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_legs(1, 1), freqs, 'Hz'))), 'k-', 'DisplayName', '$D_{i}/F_{i}$'); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [m/N]'); --
figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_legs(1, 1), freqs, 'Hz'))), 'k-', 'DisplayName', '$D_{i}/F_{i}$'); -plot(freqs, abs(squeeze(freqresp(G.G_legs(2, 1), freqs, 'Hz'))), 'k--', 'DisplayName', '$D_{j}/F_{i}$'); -plot(freqs, abs(squeeze(freqresp(G.G_legs(3, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -plot(freqs, abs(squeeze(freqresp(G.G_legs(4, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -plot(freqs, abs(squeeze(freqresp(G.G_legs(5, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -plot(freqs, abs(squeeze(freqresp(G.G_legs(6, 1), freqs, 'Hz'))), 'k--', 'HandleVisibility', 'off'); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [m/N]'); -legend('location', 'northeast'); --
figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_tran(1, 1), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_tran(2, 2), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_tran(3, 3), freqs, 'Hz')))); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [m/m]'); --
figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_tran(4, 4), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_tran(5, 5), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_tran(6, 6), freqs, 'Hz')))); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [$\frac{rad/s}{rad/s}$]'); --
figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_tran(1, 1), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_tran(1, 2), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_tran(1, 3), freqs, 'Hz')))); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [m/m]'); --
-From a force applied in the Cartesian frame to a relative displacement of the mobile platform with respect to the base. -
- -figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_comp(1, 1), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_comp(2, 2), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_comp(3, 3), freqs, 'Hz')))); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [m/N]'); --
-From a force applied on the Cartesian frame to the absolute displacement of the mobile platform. -
- -figure; -hold on; -plot(freqs, abs(squeeze(freqresp(G.G_iner(1, 1), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_iner(2, 2), freqs, 'Hz')))); -plot(freqs, abs(squeeze(freqresp(G.G_iner(3, 3), freqs, 'Hz')))); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frequency [Hz]'); ylabel('Amplitude [m/N]'); --
Created: 2020-02-11 mar. 17:51
+Created: 2020-02-13 jeu. 15:44