Skip to content

Commit 4147414

Browse files
committed
Initial commit v1p*8
1 parent 4a95cdd commit 4147414

File tree

286 files changed

+151550
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+151550
-1
lines changed
112 KB
Binary file not shown.

Models/Cosim/B3D_Bucket/Models_B3D/Bucket_Box.inp

Lines changed: 6055 additions & 0 deletions
Large diffs are not rendered by default.

Models/Cosim/B3D_Bucket/Models_B3D/Bucket_Dig_Cycle.inp

Lines changed: 14380 additions & 0 deletions
Large diffs are not rendered by default.

Models/Cosim/B3D_Bucket/Models_B3D/Bucket_Dig_Cycle_cohesive.inp

Lines changed: 14382 additions & 0 deletions
Large diffs are not rendered by default.

Models/Cosim/B3D_Bucket/Models_B3D/Bucket_Dig_Cycle_rocks.inp

Lines changed: 4091 additions & 0 deletions
Large diffs are not rendered by default.
39.5 KB
Binary file not shown.
69.5 KB
Binary file not shown.
219 KB
Binary file not shown.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
% Code to plot simulation results from Excavator_Motion
2+
%% Plot Description:
3+
%
4+
% The plot below shows the force required of the actuators to complete the test.
5+
6+
% Copyright 2016-2025 The MathWorks, Inc.
7+
8+
% Generate new simulation results if they don't exist or if they need to be updated
9+
%if ~exist('simlog', 'var'))
10+
% sim('Excavator_Motion')
11+
% % Model StopFcn callback adds a timestamp to the Simscape simulation data log
12+
%end
13+
14+
15+
% Get simulation results
16+
simlog_DEMLoads_f = simOut.logsout_Excavator_Motion_B3D.get('DEMLoads_f');
17+
simlog_DEMLoads_m = simOut.logsout_Excavator_Motion_B3D.get('DEMLoads_m');
18+
19+
% Reuse figure if it exists, else create new figure
20+
if ~exist('h1_Excavator_B3D_DEM', 'var') || ...
21+
~isgraphics(h1_Excavator_B3D_DEM, 'figure')
22+
h1_Excavator_B3D_DEM = figure('Name', 'Excavator_B3D_DEM');
23+
end
24+
figure(h1_Excavator_B3D_DEM)
25+
clf(h1_Excavator_B3D_DEM)
26+
27+
temp_colororder = get(gca,'defaultAxesColorOrder');
28+
29+
% Plot results
30+
simlog_handles(1) = subplot(2, 1, 1);
31+
plot(simlog_DEMLoads_f.Values.Time, squeeze(simlog_DEMLoads_f.Values.Data(:,1)),...
32+
'LineWidth', 1,'DisplayName','Lateral');
33+
hold on
34+
plot(simlog_DEMLoads_f.Values.Time, squeeze(simlog_DEMLoads_f.Values.Data(:,2)),...
35+
'LineWidth', 1,'DisplayName','Longitudinal');
36+
plot(simlog_DEMLoads_f.Values.Time, squeeze(simlog_DEMLoads_f.Values.Data(:,3)),...
37+
'LineWidth', 1,'DisplayName','Vertical');
38+
hold off
39+
grid on
40+
title('DEM Loads on Bucket CG')
41+
ylabel('Force (N)')
42+
legend('Location','Best')
43+
44+
simlog_handles(2) = subplot(2, 1, 2);
45+
plot(simlog_DEMLoads_m.Values.Time, squeeze(simlog_DEMLoads_m.Values.Data(:,1)),...
46+
'LineWidth', 1,'DisplayName','Global X');
47+
hold on
48+
plot(simlog_DEMLoads_m.Values.Time, squeeze(simlog_DEMLoads_m.Values.Data(:,2)),...
49+
'LineWidth', 1,'DisplayName','Global Y');
50+
plot(simlog_DEMLoads_m.Values.Time, squeeze(simlog_DEMLoads_m.Values.Data(:,3)),...
51+
'LineWidth', 1,'DisplayName','Global Z');
52+
hold off
53+
grid on
54+
ylabel('Moment (N*m)')
55+
xlabel('Time (s)')
56+
linkaxes(simlog_handles,'x')
57+
legend('Location','Best')
58+
59+
% Remove temporary variables
60+
clear simlog_t simlog_handles temp_colororder
29.2 KB
Loading

0 commit comments

Comments
 (0)