Simscape Multibody Contact Forces Library
Copyright 2014-2019 The MathWorks, Inc.
This library contains contact force models for use with Simscape Multibody.
They can be used for intermittent contact (parts bouncing off each other)
and persistent contact (parts resting on each other).
You are welcome to use this library in your own projects. If you need to
include the library in your own project, run >> CFL_SaveLibsOnly.m from
the root directory of your local repository. Only the critical files
will be copied to a folder "CFL_Libs", and you can cut-and-paste that
to your own local project. Please cite
General approach for using this library:
1. Identify the parts in your system that will hit each other during simulation
2. Figure out which edges or surfaces will touch.
The contact models provided allow you to model contact between combinations
of connected circular arcs with straight lines (2D)
and spheres with flat planes or cylinders (3D).
3. Add reference frames for the lines and arcs that will touch.
4. Add the correct contact force model between the two frames.
See the examples to understand how they are used.
Recommendations:
1. Start with stiffness of 1e4 and damping of 1e2 and adjust from there.
2. Use solver ode15s, Relative Tolerance = 1e-4, Absolute Tolerance = 1e-5
and set the maximum step size to 1e-2.
3. If you get unexpected behavior (parts flying through one another,
system gaining energy) your tolerances are not small enough.
Reduce tolerances by a factor of 10 and max step size by a factor of 10
until you get expected behavior. Reducing stiffness and increasing damping
can also help.
######### Release History #########
v 4.1(R2019a) Mar 2019 Updated v4.1 for R2019a
Minor changes to accommodate physical signal units
v 4.1(R2018b) Nov 2018 Added two examples
(R2018a)
(R2017b) 1. New example Caster_4_Whl.slx
(R2017a) Models a four-wheel cart with casters on front wheels
(R2016b)
(R2016a) 2. New example sm_build_spheres_in_sphere
(R2015b) MATLAB code to automatically assemble a model that has
(R2015a) a user-defined number of spheres inside a sphere with
contact forces between all inner spheres and between
inner spheres and outer sphere.
v 4.1(R2018b) Sep 2018 Updated v4.1 for R2018b
All v4p1 have updated Extr_Data_Cam_Roller_Curve.m
(R2018a) Mar 2018 Tread example, walking robot example
(R2017b)
(R2017a) 1. Adjusted Sphere to Belt Force (in 3D, Composite Forces)
(R2016b) Changed orientation of reference frame for the two
(R2016a) Sphere to Tube Enabled Forces. Z-axis flipped 180 deg
(R2015b) so that vx and wz inputs have the same sign.
(R2015a)
2. Adjusted sm_tread_drive example.slx
Uses adjusted Sphere to Belt Force, test sequence altered
to show turning and show both treads striking bump in
forward and reverse.
3. New example sm_robot_6legs_4bar.slx
Models 6-legged robot. Legs on each side are a pair of
connected four-bar linkages. Shows how to model robot
walking on uneven surface.
4. Added CFL_contact_setModel.m
Function to select force law in all contact forces in model.
5. Additions to support Parts_Lib.slx
Extrusion file Extr_Data_TriangleRounded_Holes.m and
various images for masking parts.
v 4.0(R2018a) Mar 2018 Updated for R2018a
(R2017b)
(R2017a) 1. Added Sphere to Tube Enabled Force
(R2016b) Sphere to Tube force that can be enabled/disabled
(R2016a) and can be used to model the ends of a driven conveyor belt.
(R2015b)
(R2015a) 2. Added Sphere to Belt Force (in 3D, Composite Forces)
Used to models spheres on a moving conveyor belt. Can
also be used to model vehicles that ride on treads
like a bulldozer. See sm_tread_drive
3. New examples sm_tread_drive, Frict3D_Balls_on_Driven_Tube
These examples use Sphere to Tube Enabled Force and
Sphere to Belt Force.
4. Added sm_ball_bearing_testrig example
Models a ball bearing with variants that use
Common Gear Constraint (ideal) and contact forces
(permits vibration).
5. Added extrusion script Extr_Data_Block_NotchCircle.m
Used to calculate cross-sectional profile for inner and
outer race in Ball Bearing Testrig example
v 3.9 (R2017b) Jan 2018 Added Cam Roller Constraint
1. Added Cam Roller Constraint.
Uses Point-on-Curve Constraint to model circular
roller on a cam with arbitrary profile.
2. Added Extr_Data_Cam_Roller_Curve.m to calculate
path of Point-on-Curve Constraint.
3. Added Cam_Follower_Constraint example.
v 3.8 (R2017b) Sept 2017 Updated for R2017b
v 3.7 (R2017a) July 2017 Sphere to Cone Force, many fixes
(R2016b) Library saved in versions R2015b through R2017a
(R2016a)
(R2015b)
1. Added Sphere to Cone Force. Contact force is active on
inside and outside of cone. Also added extrusion script
Extr_Data_Frustrum_Conical.m and example
Coll3D_08_Ball_in_Spinning_Cone.slx
2. Sphere to Tube Force - fixed relative velocity calculation in
Contact_Forces_Lib/3D/Sphere to Tube Force/Forces/Ff/vTan
Previous releases delivered incorrect results if the cylinder
could spin. Added new example Coll3D_07_Balls_and_Sliding_Tube.slx
3. Extr_Data_Box.m: functional change, parameters are full width
and height instead of half width and half height. Affected
parameters within a few examples, such as Spinning Boxes
4. Extr_Data_Cam.m: Changed to Extr_Data_Cam_Circles.m, which has
two additional parameters (radii of holes). Affected example
Cam Follower and the UI for parameterizing the cam.
5. Many 2D contact forces have been modified so that they
no longer refer to the World frame. This permits them to be
used in any plane, not just the x-y plane.
6. Circle to Ring Force: calculations adjusted to use consistent
distance to contact point for circle and ring. May result in
minor changes to simulation results.
7. Mask commands adjusted - eliminated imread(), use option
"Opaque with ports" (R16a and above), and other settings.
v 3.6 (R2017a) Mar 2017 Updated for R2017a
(R2016b)
1. New example: Ball on Wheel with Controller (2D Friction Examples)
Models a ball balanced on a wheel.
2. Removed MATLAB variables from blocks in Contact_Forces_Lib.slx
Some library elements contained MATLAB variables in the dialog box
parameters on the Dimensions and Visual tab. These were replaced
with hardcoded default values to avoid warnings about undefined variables.
3. Additional parameters were added to the Sphere block in Parts_Lib.slx