You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make changes, update the MATLAB code and republish this document.
9
-
--><title>Bouncing Ball With Zero Crossings</title><metaname="generator" content="MATLAB 9.14"><linkrel="schema.DC" href="http://purl.org/dc/elements/1.1/"><metaname="DC.date" content="2023-03-17"><metaname="DC.source" content="sm_contact_ball.m"><styletype="text/css">
</style></head><body><divclass="content"><h1>Bouncing Ball With Zero Crossings</h1><!--introduction--><p>This example models a ball bouncing on a floor using the Spatial Contact Force block. MATLAB scripts explore the effect of enabling and disabling zero crossings and the effect of solver settings on the simulation results.</p><!--/introduction--><h2>Contents</h2><div><ul><li><ahref="#1">Model</a></li><li><ahref="#2">Simulation Results from Simscape Logging</a></li><li><ahref="#4">Simulation Results from Simscape Logging: Effect of Zero Crossings</a></li><li><ahref="#6">Simulation Results from Simscape Logging: Thin Floor</a></li><li><ahref="#8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</a></li></ul></div><h2id="1">Model</h2><imgvspace="5" hspace="5" src="sm_contact_ball_01.png" alt=""><h2id="2">Simulation Results from Simscape Logging</h2><p>This plot shows the height of the ball with time.</p><imgvspace="5" hspace="5" src="sm_contact_ball_02.png" alt=""><h2id="4">Simulation Results from Simscape Logging: Effect of Zero Crossings</h2><p>This plot shows the height of the ball with time with zero crossings enabled and disabled.</p><imgvspace="5" hspace="5" src="sm_contact_ball_03.png" alt=""><h2id="6">Simulation Results from Simscape Logging: Thin Floor</h2><p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Enabling zero-crossings can help but may not guarantee the event of the ball hitting the floor will always be captured.</p><imgvspace="5" hspace="5" src="sm_contact_ball_04.png" alt=""><h2id="8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</h2><p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Limiting the maximum step size is a better way to ensure the event will be captured.</p><imgvspace="5" hspace="5" src="sm_contact_ball_05.png" alt=""><pclass="footer">Copyright 2019-2023 The MathWorks, Inc.<br><ahref="https://www.mathworks.com/products/matlab/">Published with MATLAB® R2023a</a><br></p></div><!--
<p>This example models a ball bouncing on a floor using the Spatial Contact Force block. MATLAB scripts explore the effect of enabling and disabling zero crossings and the effect of solver settings on the simulation results.</p>
82
+
<!--/introduction-->
83
+
<h2>Contents</h2>
84
+
<div>
85
+
<ul>
86
+
<li>
87
+
<ahref="#1">Model</a>
88
+
</li>
89
+
<li>
90
+
<ahref="#2">Simulation Results from Simscape Logging</a>
91
+
</li>
92
+
<li>
93
+
<ahref="#4">Simulation Results from Simscape Logging: Effect of Zero Crossings</a>
94
+
</li>
95
+
<li>
96
+
<ahref="#6">Simulation Results from Simscape Logging: Thin Floor</a>
97
+
</li>
98
+
<li>
99
+
<ahref="#8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</a>
100
+
</li>
101
+
</ul>
102
+
</div>
103
+
<h2id="1">Model</h2>
104
+
<imgvspace="5" hspace="5" src="sm_contact_ball_01.png" alt=""><h2id="2">Simulation Results from Simscape Logging</h2>
105
+
<p>This plot shows the height of the ball with time.</p>
106
+
<imgvspace="5" hspace="5" src="sm_contact_ball_02.png" alt=""><h2id="4">Simulation Results from Simscape Logging: Effect of Zero Crossings</h2>
107
+
<p>This plot shows the height of the ball with time with zero crossings enabled and disabled.</p>
108
+
<imgvspace="5" hspace="5" src="sm_contact_ball_03.png" alt=""><h2id="6">Simulation Results from Simscape Logging: Thin Floor</h2>
109
+
<p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Enabling zero-crossings can help but may not guarantee the event of the ball hitting the floor will always be captured.</p>
110
+
<imgvspace="5" hspace="5" src="sm_contact_ball_04.png" alt=""><h2id="8">Simulation Results from Simscape Logging: Thin Floor, Maximum Step Size</h2>
111
+
<p>This plot shows the height of the ball with time if the test is conducted with a thin floor. If the step size is too large, the ball can pass through the floor between simulation steps. Limiting the maximum step size is a better way to ensure the event will be captured.</p>
112
+
<imgvspace="5" hspace="5" src="sm_contact_ball_05.png" alt=""><pclass="footer">Copyright 2019-2023 The MathWorks, Inc.<br>
113
+
<ahref="https://www.mathworks.com/products/matlab/">Published with MATLAB® R2023b</a>
0 commit comments