|
6 | 6 | <!-- |
7 | 7 | This HTML was auto-generated from MATLAB code. |
8 | 8 | To make changes, update the MATLAB code and republish this document. |
9 | | - --><title>Excavator with Hydraulic System</title><meta name="generator" content="MATLAB 9.13"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-10-06"><meta name="DC.source" content="Excavator_Complete.m"><style type="text/css"> |
| 9 | + --><title>Excavator Design with Simscape: Hydromechanical Model with Controls</title><meta name="generator" content="MATLAB 9.13"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-12-22"><meta name="DC.source" content="Excavator_Complete.m"><style type="text/css"> |
10 | 10 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0} |
11 | 11 |
|
12 | 12 | html { min-height:100%; margin-bottom:1px; } |
|
67 | 67 |
|
68 | 68 |
|
69 | 69 |
|
70 | | - </style></head><body><div class="content"><h1>Excavator with Hydraulic System</h1><!--introduction--><p>This example models an excavator with complete hydraulic system to power cylinders for the boom, stick, and bucket, as well as the swing motor to orient the excavator. It can be used to measure the duration and efficiency of a dig cycle.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Excavator Subsystem</a></li><li><a href="#3">Excavator Machine Subsystem</a></li><li><a href="#4">Excavator Hydraulics Subsystem</a></li><li><a href="#5">Excavator Hydraulic Pump Subsystem</a></li><li><a href="#6">Excavator Hydraulic Valve Block (Left) Subsystem</a></li><li><a href="#7">Excavator Hydraulic Boom Cylinder Subsystem</a></li><li><a href="#8">Excavator Controller</a></li><li><a href="#9">Dig Cycle Test</a></li></ul></div><h2 id="1">Model</h2><pre class="codeoutput">Warning: Using find_system without the 'Variants' argument skips inactive |
71 | | -Variant Subsystem blocks in the search. This behavior will change in a future |
72 | | -release to look at all choices of the Variant Subsystem. To find blocks that are |
73 | | -active in simulation or code generation, compile the model and use the built-in |
74 | | -variant filters with the 'MatchFilter' option. To find all blocks use filter |
75 | | -'@Simulink.match.allVariants' with the 'MatchFilter' option. |
76 | | -</pre><img vspace="5" hspace="5" src="Excavator_Complete_01.png" alt=""> <h2 id="2">Excavator Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_02.png" alt=""> <h2 id="3">Excavator Machine Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Machine','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_03.png" alt=""> <h2 id="4">Excavator Hydraulics Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_04.png" alt=""> <h2 id="5">Excavator Hydraulic Pump Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics/LeftPump','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_05.png" alt=""> <h2 id="6">Excavator Hydraulic Valve Block (Left) Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics/ValveBlocks/LeftValveBlock','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_06.png" alt=""> <h2 id="7">Excavator Hydraulic Boom Cylinder Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics/Functions/Boom','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_07.png" alt=""> <h2 id="8">Excavator Controller</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Controller/Function%20Commander','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_08.png" alt=""> <h2 id="9">Dig Cycle Test</h2><img vspace="5" hspace="5" src="Excavator_Complete_09.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_10.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_11.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_12.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_13.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_14.png" alt=""> <p class="footer">Copyright 2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB® R2022b</a><br></p></div><!-- |
| 70 | + </style></head><body><div class="content"><h1>Excavator Design with Simscape: Hydromechanical Model with Controls</h1><!--introduction--><p><img vspace="5" hspace="5" src="Excavator_Complete_Overview_Image.png" alt=""> </p><p>(<a href="matlab:web('Excavator_Design_Overview.html')">return to Excavator Design Overview</a>)</p><p>This example models an excavator with complete hydraulic system to power cylinders for the boom, stick, and bucket, as well as the swing motor to orient the excavator. It can be used to measure the duration and efficiency of a dig cycle.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model</a></li><li><a href="#2">Excavator Subsystem</a></li><li><a href="#3">Excavator Machine Subsystem</a></li><li><a href="#4">Excavator Hydraulics Subsystem</a></li><li><a href="#5">Excavator Hydraulic Pump Subsystem</a></li><li><a href="#6">Excavator Hydraulic Valve Block (Left) Subsystem</a></li><li><a href="#7">Excavator Hydraulic Boom Cylinder Subsystem</a></li><li><a href="#8">Excavator Controller</a></li><li><a href="#9">Dig Cycle Test</a></li></ul></div><h2 id="1">Model</h2><img vspace="5" hspace="5" src="Excavator_Complete_01.png" alt=""> <h2 id="2">Excavator Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_02.png" alt=""> <h2 id="3">Excavator Machine Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Machine','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_03.png" alt=""> <h2 id="4">Excavator Hydraulics Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_04.png" alt=""> <h2 id="5">Excavator Hydraulic Pump Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics/LeftPump','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_05.png" alt=""> <h2 id="6">Excavator Hydraulic Valve Block (Left) Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics/ValveBlocks/LeftValveBlock','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_06.png" alt=""> <h2 id="7">Excavator Hydraulic Boom Cylinder Subsystem</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Excavator/Hydraulics/Functions/Boom','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_07.png" alt=""> <h2 id="8">Excavator Controller</h2><p><a href="matlab:open_system('Excavator_Complete');open_system('Excavator_Complete/Controller/Function%20Commander','force');">Open Subsystem</a></p><img vspace="5" hspace="5" src="Excavator_Complete_08.png" alt=""> <h2 id="9">Dig Cycle Test</h2><p>The following code runs the model and produces plots of the operator commands, actuator positions, cylinder pressures, and the load on the bucket due to the soil.</p><pre class="language-matlab">mdl = <span class="string">'Excavator_Complete'</span>; |
| 71 | +</pre><pre class="language-matlab">Excavator_Init_Params |
| 72 | +Excavator_System_params |
| 73 | +Scenario = Excavator_Test_Scenario_Define; |
| 74 | +</pre><pre class="language-matlab">Excavator_Test_Scenario_Select(<span class="string">'loadedBucketDigCycle'</span>) |
| 75 | +</pre><pre class="language-matlab">simOut = sim(mdl); |
| 76 | +</pre><pre class="language-matlab">Excavator_Complete_plot1operatorcmds |
| 77 | +Excavator_Complete_plot2position |
| 78 | +Excavator_Complete_plot3pressure |
| 79 | +Excavator_Complete_plot4loadsoil |
| 80 | +Excavator_Energy_Calc |
| 81 | +</pre><img vspace="5" hspace="5" src="Excavator_Complete_09.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_10.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_11.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_12.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_13.png" alt=""> <img vspace="5" hspace="5" src="Excavator_Complete_14.png" alt=""> <p class="footer">Copyright 2022 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB® R2022b</a><br></p></div><!-- |
77 | 82 | ##### SOURCE BEGIN ##### |
78 | | -%% Excavator with Hydraulic System |
| 83 | +%% Excavator Design with Simscape: Hydromechanical Model with Controls |
79 | 84 | % |
| 85 | +% <<Excavator_Complete_Overview_Image.png>> |
| 86 | +% |
| 87 | +% (<matlab:web('Excavator_Design_Overview.html') return to Excavator Design Overview>) |
| 88 | +% |
80 | 89 | % This example models an excavator with complete hydraulic system to power |
81 | 90 | % cylinders for the boom, stick, and bucket, as well as the swing motor to |
82 | 91 | % orient the excavator. It can be used to measure the duration and |
|
86 | 95 |
|
87 | 96 | %% Model |
88 | 97 | open_system('Excavator_Complete') |
89 | | -ann_h = find_system('Excavator_Complete','FindAll', 'on','type','annotation','Tag','ModelFeatures'); |
| 98 | +ann_h = find_system('Excavator_Complete','MatchFilter',@Simulink.match.allVariants,'FindAll', 'on','type','annotation','Tag','ModelFeatures'); |
90 | 99 | for i=1:length(ann_h) |
91 | 100 | set_param(ann_h(i),'Interpreter','off'); |
92 | 101 | end |
|
141 | 150 | open_system('Excavator_Complete/Controller/Function Commander','force') |
142 | 151 |
|
143 | 152 | %% Dig Cycle Test |
| 153 | +% |
| 154 | +% The following code runs the model and produces plots of the operator |
| 155 | +% commands, actuator positions, cylinder pressures, and the load on the |
| 156 | +% bucket due to the soil. |
| 157 | +% |
| 158 | +% mdl = 'Excavator_Complete'; |
| 159 | +% |
| 160 | +% Excavator_Init_Params |
| 161 | +% Excavator_System_params |
| 162 | +% Scenario = Excavator_Test_Scenario_Define; |
| 163 | +% |
| 164 | +% Excavator_Test_Scenario_Select('loadedBucketDigCycle') |
| 165 | +% |
| 166 | +% simOut = sim(mdl); |
| 167 | +% |
| 168 | +% Excavator_Complete_plot1operatorcmds |
| 169 | +% Excavator_Complete_plot2position |
| 170 | +% Excavator_Complete_plot3pressure |
| 171 | +% Excavator_Complete_plot4loadsoil |
| 172 | +% Excavator_Energy_Calc |
| 173 | +
|
144 | 174 | mdl = 'Excavator_Complete'; |
145 | 175 |
|
146 | 176 | Excavator_Init_Params |
|
0 commit comments