Add script to compute automatically the solution
This commit is contained in:
parent
87101b5fe9
commit
1427883583
@ -1,67 +0,0 @@
|
||||
run study_architecture.m
|
||||
format short
|
||||
%% tx
|
||||
tx=[leg_radius', max_disp(:, 1)]';
|
||||
tx1=find(tx(2,:)==max(tx(2,:)));
|
||||
tx2=max(tx(2,:));
|
||||
ltx=[tx1,tx2]
|
||||
|
||||
%% ty
|
||||
ty=[leg_radius', max_disp(:, 2)]';
|
||||
ty1=find(ty(2,:)==max(ty(2,:)));
|
||||
ty2=max(ty(2,:));
|
||||
lty=[ty1,ty2]
|
||||
|
||||
%% tz
|
||||
tz=[leg_radius', max_disp(:,3)]';
|
||||
tz1=find(tz(2,:)==max(tz(2,:)));
|
||||
tz2=max(tz(2,:));
|
||||
ltz=[tz1,tz2]
|
||||
|
||||
%% rx
|
||||
rx=[leg_radius', max_disp(:,4)]';
|
||||
rx1=find(rx(2,:)==max(rx(2,:)));
|
||||
rx2=max(rx(2,:));
|
||||
lrx=[rx1,rx2]
|
||||
|
||||
%% rx
|
||||
ry=[leg_radius', max_disp(:,5)]';
|
||||
ry1=find(ry(2,:)==max(ry(2,:)));
|
||||
ry2=max(ry(2,:));
|
||||
lry=[ry1,ry2]
|
||||
|
||||
%% rx
|
||||
rz=[leg_radius', max_disp(:,6)]';
|
||||
rz1=find(rz(2,:)==max(rz(2,:)));
|
||||
rz2=max(rz(2,:));
|
||||
lrz=[rz1,rz2]
|
||||
|
||||
%% kx
|
||||
kx=[leg_radius', stiffness(:, 1, 1)]';
|
||||
kx1=find(kx(2,:)==max(kx(2,:)));
|
||||
kx2=max(kx(2,:));
|
||||
lkx=[kx1,kx2]
|
||||
|
||||
%% ky
|
||||
ky=[leg_radius', stiffness(:, 2, 2)]';
|
||||
ky1=find(ky(2,:)==max(ky(2,:)));
|
||||
ky2=max(ky(2,:));
|
||||
lky=[ky1,ky2]
|
||||
|
||||
%% kz
|
||||
kz=[leg_radius', stiffness(:, 3, 3)]';
|
||||
kz1=find(kz(2,:)==max(kz(2,:)));
|
||||
kz2=max(kz(2,:));
|
||||
lkz=[kz1,kz2]
|
||||
|
||||
%% mx
|
||||
mx=[leg_radius', stiffness(:, 4, 4)]';
|
||||
mx1=find(mx(2,:)==max(mx(2,:)));
|
||||
mx2=max(mx(2,:));
|
||||
lkm=[mx1,mx2]
|
||||
|
||||
%% my
|
||||
my=[leg_radius', stiffness(:, 5, 5)]';
|
||||
my1=find(my(2,:)==max(my(2,:)));
|
||||
my2=max(my(2,:));
|
||||
lkm=[mx1,my2]
|
@ -1,5 +1,5 @@
|
||||
run study_architecture.m
|
||||
format short
|
||||
format shortEnG
|
||||
%% tx
|
||||
tx=[leg_radius', max_disp(:, 1)]';
|
||||
tx1=find(tx(2,:)==max(tx(2,:)));
|
||||
|
59
Test.asv
Normal file
59
Test.asv
Normal file
@ -0,0 +1,59 @@
|
||||
%% paramétres variables
|
||||
BP_leg_radius = 100:10:150;
|
||||
TP_leg_radius = 50:10:100;
|
||||
BP_leg_ang = 0:1:30;
|
||||
TP_leg_ang = 0:1:30;
|
||||
|
||||
%% intervalle
|
||||
intervalle1=10e-6;
|
||||
intervalle2=10e-3;
|
||||
% variation=1e-3;
|
||||
|
||||
%% Study the effect of the radius of the top platform position of the legs
|
||||
max_disp = zeros(length(BP_leg_radius),length(TP_leg_radius),length(BP_leg_ang),length(TP_leg_ang), 6);
|
||||
stiffness = zeros(length(BP_leg_radius),length(TP_leg_radius),length(BP_leg_ang),length(TP_leg_ang), 6, 6);
|
||||
|
||||
for Blri = 1:length(BP_leg_radius)
|
||||
for Tlri = 1:length(TP_leg_radius)
|
||||
for Blai = 1:length(BP_leg_ang)
|
||||
for Tlai = 1:length(TP_leg_ang)
|
||||
BP.leg.rad = BP_leg_radius(Blri);
|
||||
TP.leg.rad = TP_leg_radius(Tlri);
|
||||
BP.leg.ang = BP_leg_ang(Blai);
|
||||
TP.leg.ang = TP_leg_ang(Tlai);
|
||||
run stewart_init.m;
|
||||
max_disp(Blri,Tlri,Blai,Tlai, :) = getMaxPureDisplacement(Leg, J)';
|
||||
stiffness(Blri,Tlri,Blai,Tlai, :, :) = getStiffnessMatrix(Leg, J);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
%%
|
||||
M = min(min(stiffness(:, : , :, :, 1, 1), stiffness(:, : , :, :, 2, 2)), stiffness(:, : , :, :, 3, 3));
|
||||
[C,I] = max(M(:));
|
||||
|
||||
[I1,I2,I3,I4] = ind2sub(size(stiffness(:, : , :, :, 3, 3)),I);
|
||||
BP.leg.rad = BP_leg_radius(I1)
|
||||
TP.leg.rad = TP_leg_radius(I2)
|
||||
BP.leg.ang = BP_leg_ang(I3)
|
||||
TP_leg_ang(I4)
|
||||
|
||||
% %%
|
||||
% for Blri = 1:length(BP_leg_radius)
|
||||
% for Tlri = 1:length(TP_leg_radius)
|
||||
% for Blai = 1:length(BP_leg_ang)
|
||||
% for Tlai = 1:length(TP_leg_ang)
|
||||
% if max_disp==intervalle1
|
||||
% i=i+1;
|
||||
% s1(1,i)=BP_leg_radius(Blri);
|
||||
% s1(2,i)=TP_leg_radius(Tlri);
|
||||
% s1(3,i)=BP_leg_ang(Blai);
|
||||
% s1(4,i)=TP_leg_ang(Tlai);
|
||||
% else
|
||||
% end
|
||||
% end
|
||||
% end
|
||||
% end
|
||||
% end
|
||||
%
|
59
Test.m
Normal file
59
Test.m
Normal file
@ -0,0 +1,59 @@
|
||||
%% paramétres variables
|
||||
BP_leg_radius = 100:10:150;
|
||||
TP_leg_radius = 50:10:100;
|
||||
BP_leg_ang = 0:1:30;
|
||||
TP_leg_ang = 0:1:30;
|
||||
|
||||
%% intervalle
|
||||
intervalle1=10e-6;
|
||||
intervalle2=10e-3;
|
||||
% variation=1e-3;
|
||||
|
||||
%% Study the effect of the radius of the top platform position of the legs
|
||||
max_disp = zeros(length(BP_leg_radius),length(TP_leg_radius),length(BP_leg_ang),length(TP_leg_ang), 6);
|
||||
stiffness = zeros(length(BP_leg_radius),length(TP_leg_radius),length(BP_leg_ang),length(TP_leg_ang), 6, 6);
|
||||
|
||||
for Blri = 1:length(BP_leg_radius)
|
||||
for Tlri = 1:length(TP_leg_radius)
|
||||
for Blai = 1:length(BP_leg_ang)
|
||||
for Tlai = 1:length(TP_leg_ang)
|
||||
BP.leg.rad = BP_leg_radius(Blri);
|
||||
TP.leg.rad = TP_leg_radius(Tlri);
|
||||
BP.leg.ang = BP_leg_ang(Blai);
|
||||
TP.leg.ang = TP_leg_ang(Tlai);
|
||||
run stewart_init.m;
|
||||
max_disp(Blri,Tlri,Blai,Tlai, :) = getMaxPureDisplacement(Leg, J)';
|
||||
stiffness(Blri,Tlri,Blai,Tlai, :, :) = getStiffnessMatrix(Leg, J);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
%%
|
||||
M = min(min(stiffness(:, : , :, :, 4, 4), stiffness(:, : , :, :, 5, 5)), stiffness(:, : , :, :, 6, 6));
|
||||
[C,I] = max(M(:));
|
||||
|
||||
[I1,I2,I3,I4] = ind2sub(size(stiffness(:, : , :, :, 3, 3)),I);
|
||||
BP_leg_radius(I1)
|
||||
TP_leg_radius(I2)
|
||||
BP_leg_ang(I3)
|
||||
TP_leg_ang(I4)
|
||||
|
||||
% %%
|
||||
% for Blri = 1:length(BP_leg_radius)
|
||||
% for Tlri = 1:length(TP_leg_radius)
|
||||
% for Blai = 1:length(BP_leg_ang)
|
||||
% for Tlai = 1:length(TP_leg_ang)
|
||||
% if max_disp==intervalle1
|
||||
% i=i+1;
|
||||
% s1(1,i)=BP_leg_radius(Blri);
|
||||
% s1(2,i)=TP_leg_radius(Tlri);
|
||||
% s1(3,i)=BP_leg_ang(Blai);
|
||||
% s1(4,i)=TP_leg_ang(Tlai);
|
||||
% else
|
||||
% end
|
||||
% end
|
||||
% end
|
||||
% end
|
||||
% end
|
||||
%
|
@ -18,7 +18,7 @@ TP = struct();
|
||||
TP.rad.int = 0;%mm
|
||||
TP.rad.ext = 150; %mm
|
||||
TP.thickness = 10; % mm
|
||||
TP.leg.rad = 120; %mm
|
||||
TP.leg.rad = 100; %mm
|
||||
TP.leg.ang = 5; %deg
|
||||
TP.density = 8000; %kg/m^3
|
||||
TP.color = [0.5 0.5 0.5]; %rgb
|
||||
@ -54,7 +54,7 @@ SP.m = SP.density.bottom*2*pi*((SP.rad.bottom*1e-3)^2)*(SP.height.bottom*1e-3);
|
||||
SP.color.bottom = [0.5 0.5 0.5]; %rgb
|
||||
SP.color.top = [0.5 0.5 0.5]; %rgb
|
||||
SP.k.ax = 0; % N*m/deg
|
||||
SP.ksi.ax = 1;
|
||||
SP.ksi.ax = 10;
|
||||
SP = updateDamping(SP);
|
||||
|
||||
%%
|
||||
|
@ -1,9 +1,9 @@
|
||||
%%
|
||||
run stewart_parameters.m
|
||||
format short
|
||||
format shortE
|
||||
|
||||
%% Study the effect of the radius of the top platform position of the legs
|
||||
leg_radius = 50:1:150;
|
||||
leg_radius = 50:1:120;
|
||||
max_disp = zeros(length(leg_radius), 6);
|
||||
stiffness = zeros(length(leg_radius), 6, 6);
|
||||
|
||||
@ -15,39 +15,39 @@ for i_leg = 1:length(leg_radius)
|
||||
end
|
||||
|
||||
%% Plot everything
|
||||
% figure;
|
||||
% hold on;
|
||||
% plot(leg_radius, max_disp(:, 1))
|
||||
% plot(leg_radius, max_disp(:, 2))
|
||||
% plot(leg_radius, max_disp(:, 3))
|
||||
% hold off;
|
||||
% legend({'tx', 'ty', 'tz'})
|
||||
% xlabel('Leg Radius at the platform'); ylabel('Maximum translation (m)');
|
||||
%
|
||||
% figure;
|
||||
% hold on;
|
||||
% plot(leg_radius, max_disp(:, 4))
|
||||
% plot(leg_radius, max_disp(:, 5))
|
||||
% plot(leg_radius, max_disp(:, 6))
|
||||
% hold off;
|
||||
% legend({'rx', 'ry', 'rz'})
|
||||
% xlabel('Leg Radius at the platform'); ylabel('Maximum rotations (rad)');
|
||||
%
|
||||
% figure;
|
||||
% hold on;
|
||||
% plot(leg_radius, stiffness(:, 1, 1))
|
||||
% plot(leg_radius, stiffness(:, 2, 2))
|
||||
% plot(leg_radius, stiffness(:, 3, 3))
|
||||
% hold off;
|
||||
% legend({'kx', 'ky', 'kz'})
|
||||
% xlabel('Leg Radius at the platform'); ylabel('Stiffness in translation (N/m)');
|
||||
%
|
||||
% figure;
|
||||
% hold on;
|
||||
% plot(leg_radius, stiffness(:, 4, 4))
|
||||
% plot(leg_radius, stiffness(:, 5, 5))
|
||||
% plot(leg_radius, stiffness(:, 6, 6))
|
||||
% hold off;
|
||||
% legend({'mx', 'my', 'mz'})
|
||||
% xlabel('Leg Radius at the platform'); ylabel('Stiffness in rotations (N/(m/rad))');
|
||||
figure;
|
||||
hold on;
|
||||
plot(leg_radius, max_disp(:, 1))
|
||||
plot(leg_radius, max_disp(:, 2))
|
||||
plot(leg_radius, max_disp(:, 3))
|
||||
hold off;
|
||||
legend({'tx', 'ty', 'tz'})
|
||||
xlabel('Leg Radius at the platform'); ylabel('Maximum translation (m)');
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(leg_radius, max_disp(:, 4))
|
||||
plot(leg_radius, max_disp(:, 5))
|
||||
plot(leg_radius, max_disp(:, 6))
|
||||
hold off;
|
||||
legend({'rx', 'ry', 'rz'})
|
||||
xlabel('Leg Radius at the platform'); ylabel('Maximum rotations (rad)');
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(leg_radius, stiffness(:, 1, 1))
|
||||
plot(leg_radius, stiffness(:, 2, 2))
|
||||
plot(leg_radius, stiffness(:, 3, 3))
|
||||
hold off;
|
||||
legend({'kx', 'ky', 'kz'})
|
||||
xlabel('Leg Radius at the platform'); ylabel('Stiffness in translation (N/m)');
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(leg_radius, stiffness(:, 4, 4))
|
||||
plot(leg_radius, stiffness(:, 5, 5))
|
||||
plot(leg_radius, stiffness(:, 6, 6))
|
||||
hold off;
|
||||
legend({'mx', 'my', 'mz'})
|
||||
xlabel('Leg Radius at the platform'); ylabel('Stiffness in rotations (N/(m/rad))');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user