|
| 1 | +%% Excavator Design with Simscape(TM): Model Soil Loads on Bucket and Ground Interaction with Mevea |
| 2 | +% |
| 3 | +% <<Excavator_Mevea_Overview_Image.png>> |
| 4 | +% |
| 5 | +% (<matlab:web('Excavator_Design_Overview.html') return to Excavator Design Overview>) |
| 6 | +% |
| 7 | +% This example models an excavator acting against soil loads modeled using |
| 8 | +% Mevea software. The motion of the actuators is prescribed and the |
| 9 | +% simulation calculates the amount of force or torque required to execute |
| 10 | +% the motion. Cosimulation is used to connect the Simscape Multibody model |
| 11 | +% to Mevea. |
| 12 | +% |
| 13 | +% Additionally, terrain interaction with the tracks is modeled in Mevea. |
| 14 | +% An electric CVT is modeled in Simscape, and the shaft from that |
| 15 | +% powertrain model is connected via cosimulation to a shaft in the Mevea |
| 16 | +% model that controls the movement of the tracks. The tracks interact with |
| 17 | +% deformable terrain modeled in Mevea. |
| 18 | +% |
| 19 | +% Running this model requires Mevea software. Open the Simulink model, |
| 20 | +% start the simulation in Simulink, and when Mevea software opens press the |
| 21 | +% Start button. Both tools will be open simultaneously and the results can |
| 22 | +% be seen in both animation windows. |
| 23 | +% |
| 24 | +% Copyright 2022-2025 The MathWorks, Inc. |
| 25 | + |
| 26 | +%% Model |
| 27 | +% |
| 28 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline'); Open Model> |
| 29 | + |
| 30 | +open_system('Excavator_Mevea_BucketDriveline') |
| 31 | +ann_h = find_system('Excavator_Mevea_BucketDriveline','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'); |
| 32 | +for i=1:length(ann_h) |
| 33 | + set_param(ann_h(i),'Interpreter','off'); |
| 34 | +end |
| 35 | + |
| 36 | +%% Excavator Subsystem |
| 37 | +% |
| 38 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline');open_system('Excavator_Mevea_BucketDriveline/Excavator','force'); Open Subsystem> |
| 39 | + |
| 40 | +set_param('Excavator_Mevea_BucketDriveline/Excavator','LinkStatus','none') |
| 41 | +open_system('Excavator_Mevea_BucketDriveline/Excavator','force') |
| 42 | + |
| 43 | +%% Excavator Machine Subsystem |
| 44 | +% |
| 45 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline');open_system('Excavator_Mevea_BucketDriveline/Excavator/Machine','force'); Open Subsystem> |
| 46 | + |
| 47 | +set_param('Excavator_Mevea_BucketDriveline/Excavator/Machine','LinkStatus','none') |
| 48 | +open_system('Excavator_Mevea_BucketDriveline/Excavator/Machine','force') |
| 49 | + |
| 50 | +%% Excavator Mevea Loads |
| 51 | +% |
| 52 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline');open_system('Excavator_Mevea_BucketDriveline/Excavator/Machine/Mevea','force'); Open Subsystem> |
| 53 | + |
| 54 | +set_param('Excavator_Mevea_BucketDriveline/Excavator/Machine/Mevea','LinkStatus','none') |
| 55 | +open_system('Excavator_Mevea_BucketDriveline/Excavator/Machine/Mevea','force') |
| 56 | + |
| 57 | +%% Excavator Hydraulics Subsystem |
| 58 | +% |
| 59 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline');open_system('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics','force'); Open Subsystem> |
| 60 | + |
| 61 | +set_param('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics','LinkStatus','none') |
| 62 | +open_system('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics','force') |
| 63 | + |
| 64 | +%% Excavator Hydraulic Valve Block (Left) Subsystem |
| 65 | +% |
| 66 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline');open_system('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics/ValveBlocks/LeftValveBlock','force'); Open Subsystem> |
| 67 | + |
| 68 | +set_param('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics/ValveBlocks/LeftValveBlock','LinkStatus','none') |
| 69 | +open_system('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics/ValveBlocks/LeftValveBlock','force') |
| 70 | + |
| 71 | +%% Excavator Hydraulic Boom Cylinder Subsystem |
| 72 | +% |
| 73 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline');open_system('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics/Functions/Boom','force'); Open Subsystem> |
| 74 | + |
| 75 | +set_param('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics/Functions/Boom','LinkStatus','none') |
| 76 | +open_system('Excavator_Mevea_BucketDriveline/Excavator/Hydraulics/Functions/Boom','force') |
| 77 | + |
| 78 | +%% Excavator Controller |
| 79 | +% |
| 80 | +% <matlab:open_system('Excavator_Mevea_BucketDriveline');open_system('Excavator_Mevea_BucketDriveline/Controller/Function%20Commander','force'); Open Subsystem> |
| 81 | + |
| 82 | +set_param('Excavator_Mevea_BucketDriveline/Controller/Function Commander','LinkStatus','none') |
| 83 | +open_system('Excavator_Mevea_BucketDriveline/Controller/Function Commander','force') |
| 84 | + |
| 85 | +%% Dig Cycle Test |
| 86 | +% |
| 87 | +% Simulate a complete dig cycle and plot operator commands, actuator |
| 88 | +% positions, cylinder pressures, and the load on the bucket due to the |
| 89 | +% soil. |
| 90 | + |
| 91 | +mdl = 'Excavator_Mevea_BucketDriveline'; |
| 92 | + |
| 93 | +simOut = sim(mdl); |
| 94 | + |
| 95 | +Excavator_Complete_plot1operatorcmds |
| 96 | +Excavator_Complete_plot2position |
| 97 | +Excavator_Complete_plot3pressure |
| 98 | +Excavator_Mevea_plot4loadsoil |
| 99 | +Excavator_Energy_Calc |
| 100 | + |
| 101 | +%% |
| 102 | + |
| 103 | +%clear all |
| 104 | +close all |
| 105 | +bdclose all |
| 106 | + |
0 commit comments