Skip to content

Commit bd11067

Browse files
Add files via upload
1 parent 70f9a7d commit bd11067

17 files changed

+22657
-0
lines changed

01_BaseGP.STEP

+1,204
Large diffs are not rendered by default.

02_LiftLinkGP.STEP

+2,550
Large diffs are not rendered by default.

03_LiftCylGP.STEP

+991
Large diffs are not rendered by default.

04_LiftPistGP.STEP

+1,241
Large diffs are not rendered by default.

05_TiltCylGP.STEP

+991
Large diffs are not rendered by default.

06_TiltPistGP.STEP

+1,241
Large diffs are not rendered by default.

07_TiltLinkGP.STEP

+3,293
Large diffs are not rendered by default.

08_ExtCyl1GP.STEP

+607
Large diffs are not rendered by default.

09_ExtPist1GP.STEP

+546
Large diffs are not rendered by default.

10_ObjectGP.STEP

+8,289
Large diffs are not rendered by default.

Extr_Data_Mesh.m

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
function [xy_data] = Extr_Data_Mesh(lenX, lenY, numHx, numHy, hx, hy, varargin)
2+
%Extr_Data_Mesh Produce extrusion data for a rectangular mesh.
3+
% [xy_data] = Extr_Data_Mesh(lenX, lenY, numHx, numHy, hx, hy)
4+
% This function returns x-y data for a rectangular mesh.
5+
% You can specify:
6+
% Mesh outer width lenX
7+
% Mesh outer length lenY
8+
% Number of mesh holes along X numHx
9+
% Number of mesh holes along Y numHy
10+
% Width of mesh holes (along x) hx
11+
% Length of mesh holes (along y) hy
12+
%
13+
% To see a plot showing parameter values, enter the name
14+
% of the function with no arguments
15+
% >> Extr_Data_Mesh
16+
%
17+
% To see a plot created with your parameter values,
18+
% add 'plot' as the final argument
19+
% >> Extr_Data_Mesh(3,3,3,2,0.8,0.8,'plot')
20+
21+
% Copyright 2017 The MathWorks, Inc.
22+
23+
% Default data to show diagram
24+
if (nargin == 0)
25+
lenX = 3;
26+
lenY = 3;
27+
numHx = 3;
28+
numHy = 2;
29+
hx = 0.8;
30+
hy = 0.8;
31+
end
32+
33+
if (nargin==0 ||nargin==7)
34+
showplot = 'plot';
35+
else
36+
showplot = 'n';
37+
end
38+
39+
% Calculate extrusion data
40+
41+
tx = (lenX-(numHx*hx))/(numHx+1);
42+
ty = (lenY-(numHy*hy))/(numHy+1);
43+
44+
self_intersect_offset = min(tx,ty)/100;
45+
46+
47+
xy_data = [...
48+
0 0;
49+
lenX 0;
50+
lenX ty;
51+
tx ty];
52+
53+
for j=1:numHy
54+
for i=1:numHx
55+
append_pts = [
56+
tx*(i)+hx*(i-1) ty+(ty+hy)*(j-1)+self_intersect_offset;
57+
tx*(i)+hx*(i-1) ty+hy+(ty+hy)*(j-1);
58+
tx*(i)+hx*i ty+hy+(ty+hy)*(j-1);
59+
tx*(i)+hx*i ty+(ty+hy)*(j-1)+self_intersect_offset;
60+
];
61+
xy_data = [xy_data;append_pts];
62+
end
63+
if(i==numHx)
64+
xy_data = [xy_data;
65+
lenX hy*(j-1)+ty*j+self_intersect_offset;
66+
lenX hy*j+ty*(j+1);
67+
tx hy*j+ty*(j+1)];
68+
end
69+
if(j==numHy)
70+
xy_data=[xy_data;0 lenY];
71+
end
72+
end
73+
74+
xy_data = xy_data-[lenX/2 lenY/2];
75+
76+
% Plot diagram to show parameters and extrusion
77+
78+
if (nargin == 0 || strcmpi(showplot,'plot'))
79+
% Figure name
80+
figString = ['h1_' mfilename];
81+
% Only create a figure if no figure exists
82+
figExist = 0;
83+
fig_hExist = evalin('base',['exist(''' figString ''')']);
84+
if (fig_hExist)
85+
figExist = evalin('base',['ishandle(' figString ') && strcmp(get(' figString ', ''type''), ''figure'')']);
86+
end
87+
if ~figExist
88+
fig_h = figure('Name',figString);
89+
assignin('base',figString,fig_h);
90+
else
91+
fig_h = evalin('base',figString);
92+
end
93+
figure(fig_h)
94+
clf(fig_h)
95+
96+
% Get max axis dimension
97+
maxd = max(lenX,lenY);
98+
99+
% Plot extrusion
100+
patch(xy_data(:,1),xy_data(:,2),[1 1 1]*0.90,'EdgeColor','none');
101+
hold on
102+
plot(xy_data(:,1),xy_data(:,2),'-','Marker','o','MarkerSize',4,'LineWidth',2);
103+
104+
axis('equal');
105+
axis([-0.55 0.55 -0.55 0.55]*maxd);
106+
107+
% Show parameters
108+
109+
hold on
110+
111+
plot([-0.5 0.5]*lenX,-[1 1]*(lenY-ty)/2,'r-d','MarkerFaceColor','r');
112+
text(0,-(lenY-ty)/2,'{\color{red}lenX}');
113+
114+
plot(-[1 1]*(lenX-tx)/2,[-0.5 0.5]*lenY,'c-d','MarkerFaceColor','c');
115+
text(-(lenX-tx)/2,0,'{\color{cyan}lenY}');
116+
117+
plot([tx tx+hx]-lenX/2,[1 1]*(ty+hy/2)-lenY/2,'g-d','MarkerFaceColor','g');
118+
text((tx+hx/2)-lenX/2,(ty+hy/2)-lenY/2,'{\color{green}hx}');
119+
120+
plot([-1 -1]*(tx+hx/2)+lenX/2,-[ty ty+hy]+lenY/2,'m-d','MarkerFaceColor','m');
121+
text(-(tx+hx/2)+lenX/2,-(ty+hy/2)+lenY/2,'{\color{magenta}hy}');
122+
123+
plot([tx+hx/2 2*tx+3*hx/2]-lenX/2,-[1 1]*(ty+hy/2)+lenY/2,'k:d','MarkerFaceColor','w');
124+
text(-lenX/2+(tx+hx/2),lenY/2-(ty+hy/4),'{\color{black}numHx}','HorizontalAlignment','center');
125+
126+
title(['[xy\_data] = Extr\_Data\_Mesh(lenX, lenY, numHx, numHy, hx, hy);']);
127+
hold off
128+
box on
129+
clear xy_data
130+
131+
end

InitializeSimulationGP.m

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
% Mathematical modelling and virtual decomposition control of heavy-duty
2+
% parallel-serial hydraulic manipulators
3+
4+
% Authors: Goran Petrovic and Jouni Mattila
5+
% August 2021
6+
% Tampere University / Tampereen Yliopisto
7+
8+
% Simulation initialization file
9+
10+
%%
11+
12+
% boundary conditions
13+
D22F = [0;0;0;0;0;0];
14+
Bc1_V = [0;0;0;0;0;0];
15+
% commanded motion
16+
% Th1 = Th1B + Th1A*sin(Th1f*t) [rad]
17+
Th1A = 10*pi/180;
18+
Th1B = 20*pi/180;
19+
Th1f = 1;
20+
% Th2 = Th2B + Th2A*sin(Th2f*t) [rad]
21+
Th2A = 15*pi/180;
22+
Th2B = -70*pi/180;
23+
Th2f = 2;
24+
% x3 = x3B + x3A*sin(x3f*t) [m]
25+
x3A = 0.2;
26+
x3B = 0.3;
27+
x3f = 1;
28+
% constant lengths and angles
29+
L1 = 1.0071227324212;
30+
L11 = 0.37610632101293;
31+
x10 = 0.83;
32+
L2 = 1.132185817991;
33+
L12 = 0.30901132665325;
34+
x20 = 0.83;
35+
lc1 = 0.745;
36+
lc01 = 0.085;
37+
lc2 = 0.745;
38+
lc02 = 0.085;
39+
lc3 = 1.2;
40+
beta1 = atan2d(374.261,935)*pi/180;
41+
beta2 = atan2d(45.757,373.313)*pi/180;
42+
beta3 = atan2d(139.50,1132.19)*pi/180;
43+
beta4 = atan2d(88.061,296.198)*pi/180;
44+
alpha1 = 1.9515432018109;
45+
alpha2 = 0.24548563270531;
46+
%constant position vectors
47+
P32_r_P32D22 = [0.40499744871392; -0.13130517281345; -0.013385243295654];
48+
B52_r_B52P32 = [lc3; 0; 0];
49+
P22_r_P22P22p = [0.041; 0; 0];
50+
Tc2_r_Tc2P22 = [-0.048858374920227;0.36587359346146;0.035276938723102];
51+
B12_r_B12Tc2 = [L12;0;0];
52+
Bc2_r_Bc2B12 = [L2;0;0];
53+
B42_r_B42Tc2 = [lc2; 0; 0];
54+
B32_r_B32B32p = [lc01;0;0];
55+
Bc2_r_Bc2B32 = [0;0;0];
56+
Tc1_r_Tc1Bc2 = [0.098495302558553; 0.01838181329939; 0];
57+
B11_r_B11Tc1 = [L11; 0; 0];
58+
Bc1_r_Bc1B11 = [L1; 0; 0];
59+
Bc1_r_Bc1B31 = [0;0;0];
60+
B31_r_B31B31p = [lc02;0;0];
61+
B41_r_B41Tc1 = [lc1;0;0];
62+
BMp_r_BMpBc1 = [0.185;0;0.205];
63+
W_r_WBc1 = [0.185;0;0.205];
64+
% constant rotation matrices
65+
W_Rot_Bc1 = [cos(alpha1) -sin(alpha1) 0;...
66+
0 0 -1;...
67+
sin(alpha1) cos(alpha1) 0];
68+
BMp_Rot_Bc1 = [cos(alpha1) -sin(alpha1) 0;...
69+
0 0 -1;...
70+
sin(alpha1) cos(alpha1) 0];
71+
B31_Rot_B41 = eye(3);
72+
B11_Rot_Tc1 = eye(3);
73+
Tc1_Rot_Bc2 = [cos(alpha2) -sin(alpha2) 0;...
74+
sin(alpha2) cos(alpha2) 0;...
75+
0 0 1];
76+
B32_Rot_B42 = eye(3);
77+
B12_Rot_Tc2 = eye(3);
78+
Tc2_Rot_P22 = [0.95853460763586 -0.27664713597974 0.0683942111482;...
79+
0.28497614981675 0.93051946315663 -0.23004808784757;...
80+
0 0.23999977258511 0.9707729441837];
81+
P22_Rot_B52 = eye(3);
82+
B52_Rot_P32 = eye(3);
83+
P32_Rot_D22 = [1 0 0;...
84+
0 0.9707729441837 0.23999977258512;...
85+
0 -0.23999977258512 0.9707729441837];
86+
% auxiliary vectors
87+
xf = [1;0;0;0;0;0];
88+
zf = [0;0;1;0;0;0];
89+
ztau = [0;0;0;0;0;1];
90+
% gravity vector
91+
Wg = [0; 0; 9.8066];
92+
% masses
93+
mP32 = 570.18877059;
94+
mB52 = 6.73059863;
95+
mP22 = 9.26136143;
96+
mB12 = 33.92850233;
97+
mB42 = 10.34519231;
98+
mB32 = 17.36281648;
99+
mBc2 = 54.58702836;
100+
mB11 = 25.52660174;
101+
mB41 = 10.34519231;
102+
mB31 = 17.36281648;
103+
mBc1 = 307.29601379;
104+
% c.o.m. positions
105+
P32_r_P32C = [0.25466704; -0.13034397; -0.01302248];
106+
B52_r_B52C = [0 0 0.56802906];
107+
P22_r_P22C = [0.62192523 0 0];
108+
B12_r_B12C = [0.60504569; 0.27199376; 0.00002484];
109+
B42_r_B42C = [0.55785997 0 0];
110+
B32_r_B32C = [0.35781210 0 0];
111+
Bc2_r_Bc2C = [0.54319901; 0.10543875; 0];
112+
B11_r_B11C = [0.23805608; 0.13201777; 0];
113+
B41_r_B41C = [0.55785997 0 0];
114+
B31_r_B31C = [0.35781210 0 0];
115+
Bc1_r_Bc1C = [0.14178771; 0.16555780; 0];
116+
%inertia tensors
117+
P32cI = [46.81220713 0.38607676 -0.00453819;...
118+
0.38607676 71.92201786 -1.14320993;...
119+
-0.00453819 -1.14320993 67.38128576];
120+
B52cI = diag([0.91789884, 0.91790043, 0.00091463]);
121+
P22cI = diag([0.00662754, 1.48387017, 1.48398069]);
122+
B12cI = [1.18803886 -2.36786418 0.00280315;...
123+
-2.36786418 6.31493281 0.00022322;...
124+
0.00280315 0.00022322 7.40915161];
125+
B42cI = diag([0.00370720 0.55759812 0.55785997]);
126+
B32cI = diag([0.03150902 0.90735702 0.90763033]);
127+
Bc2cI = [0.48071390 0.52924041 0;...
128+
0.52924041 5.80912352 0;...
129+
0 0 5.97255351];
130+
B11cI = [0.28426000 -0.06487287 0;...
131+
-0.06487287 0.54237481 0;...
132+
0 0 0.67891020];
133+
B41cI = diag([0.00370720 0.55759812 0.55785997]);
134+
B31cI = diag([0.03150902 0.90735702 0.90763033]);
135+
Bc1cI = [+5.892211080 +5.476111360 -0.000019630;...
136+
+5.476111360 +28.66965601 -0.000024550;...
137+
-0.000019630 -0.000024550 +29.78955950];

SimulationParametersGP.m

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
% gravity acceleration vector
2+
g = [0; 0; 9.8066];
3+
% chassis COM displacement from the geometric centre in the x-axis
4+
% direction NB!!! If the parametrized COM position is changed here,
5+
% then all the moments of inertia would change, etc. so be careful with
6+
% this. It would be for the best to recreate the chassis CAD model such
7+
% for the own case of interest.
8+
cc = 0.0;
9+
% length l1 from the paper (longitudinal distance from the chassis COM to
10+
% the axle
11+
l1 = 1.15-cc;
12+
% length l1 from the paper (longitudinal distance from the chassis COM to
13+
% the axle
14+
l2 = 1.15+cc;
15+
% % lengths wi, i = RL, RR, FL, FR from the paper (lateral distances from
16+
% the chassis COM to the wheels
17+
wRL = 0.875;
18+
wRR = 0.875;
19+
wFL = 0.875;
20+
wFR = 0.875;
21+
% chassis mass
22+
mBC = 2200;
23+
% tensor of chassis inertia about the x,y,z axes of the BC frame
24+
BCI = diag([100 1200 1000]);
25+
% wheel masses
26+
mFL = 60;
27+
mFR = 60;
28+
mRR = 60;
29+
mRL = 60;
30+
% wheel radii
31+
R0FL = 0.35;
32+
R0FR = 0.35;
33+
R0RR = 0.35;
34+
R0RL = 0.35;
35+
% tyre relaxation time constant used in the longitudinal slip differential
36+
% equations which must be used at low velocities
37+
BFL = 0.05;
38+
BFR = 0.05;
39+
BRR = 0.05;
40+
BRL = 0.05;
41+
% chassis COM height
42+
zC = 0.45;
43+
% soil parameters
44+
betaGround = 1e6;
45+
ground_stiffness = 1e8;
46+
% parametrized manipulator base location with respect to the chassis COM
47+
xCA = 0.5;
48+
yCA = 0;
49+
zCA = .25;
50+
BC_r_BCBM = [xCA; yCA; zCA];
51+
% Common notation for parameters that have same values.
52+
w = wFL;
53+
Rw = R0FL;
54+
mw = mFL;
55+
g0 = 9.8066;
56+
% Rotation matrix per the calculation procedure proposed in the paper.
57+
BC_Rot_BM = eye(3);
58+
% Manipulator base orientation angle.
59+
gamma = pi/4;
60+
% Rotation matrix from BM' to BM as explained in the paper.
61+
BM_Rot_BMp = [cos(gamma) -sin(gamma) 0; sin(gamma) cos(gamma) 0; 0 0 1];
62+
% Frames BM' and B;M have same origins.
63+
BM_r_BMBMp = [0;0;0];
64+
%% Floor parameters
65+
% per MathWorks Student Competitions Team (2022).
66+
% MATLAB and Simulink Racing Lounge: Vehicle Modeling with Simscape Multibody
67+
% (https://www.mathworks.com/matlabcentral/fileexchange/64648-matlab-and-simulink-racing-lounge-vehicle-modeling-with-simscape-multibody),
68+
% MATLAB Central File Exchange.
69+
% Retrieved March 20, 2022.
70+
Floor.l = 1000; % m
71+
Floor.w = 1000; % m
72+
Floor.h = 0.1; % m
73+
% Grid parameters
74+
Grid.clr = [1 1 1]*1;
75+
Grid.numSqrs = 250;
76+
Grid.lineWidth = 0.02;
77+
Grid.box_h = (Floor.l-(Grid.lineWidth*(Grid.numSqrs+1)))/Grid.numSqrs;
78+
Grid.box_l = (Floor.l-(Grid.lineWidth*(1+1)))/1;
79+
Grid.extr_data = Extr_Data_Mesh(Floor.w,Floor.w,Grid.numSqrs,1,Grid.box_h,Grid.box_l);
80+
%% Sampling time
81+
dT = 0.01;

0 commit comments

Comments
 (0)