Solid Cylinder Rolling Down an Incline
This example shows how to create a system that models a wheel rolling down an inclined plane by using the Spatial Contact Force block.
Model a Rolling Wheel
To create a new Simscape™ Multibody™ model, at the MATLAB® command prompt, enter:
smnew
In the model, add:
One Rigid Transform blocks
One 6-DOF Joint block
One Cylindrical Solid block
One Spatial Contact Force block
Delete Scope, PS-Simulink Converter, and Simulink-PS Converter blocks. Rename and connect the blocks as showing in following figure.
Assign these properties to Wheel Location:
Property | Value |
---|---|
Rotation > Method | Aligned Axes |
Rotation > Pair 1 > Follower | +Z |
Rotation > Pair 1 > Base | -Y |
Rotation > Pair 2 > Follower | +X |
Rotation > Pair 2 > Base | +X |
Translation > Method | None |
Assign these properties to Ramp Incline:
Property | Value |
---|---|
Rotation > Method | Standard Axis |
Rotation > Axis | +Y |
Rotation > Angle | 5 deg |
Translation > Method | Cartesian |
Translation > Offset | [30 0 -15] cm |
Assign these properties to Cylindrical Wheel:
Property | Value |
---|---|
Geometry > Radius | 5 cm |
Geometry > Length | 4 cm |
Geometry > Export > Entire Geometry | selected |
Inertia > Type | Calculate from
Geometry |
Inertia > Based on | Density |
Inertia > Density | 650 kg/m^3 |
Graphic > Type | From Geometry |
Graphic > Visual Properties | Simple |
Graphic > Visual Properties > Color | [0.6 0.0 0.0] |
Graphic > Visual Properties > Opacity | 1.0 |
Frames > Show Port R | selected |
Assign these properties Inclined Plane:
Property | Value |
---|---|
Geometry > Dimensions | [90 20 5] cm |
Geometry > Export > Entire Geometry | selected |
Inertia > Type | Calculate from
Geometry |
Inertia > Based on | Density |
Inertia > Density | 1000 kg/m^3 |
Graphic > Type | From Geometry |
Graphic > Visual Properties | Simple |
Graphic > Visual Properties > Color | [0.4196 0.5569 0.1373] |
Graphic > Visual Properties > Opacity | 1.0 |
Frames > Show Port R | selected |
Assign these properties to Contact Force:
Property | Value |
---|---|
Normal Force > Stiffness | 1e6 N/m |
Normal Force > Damping | 1e3 N/(m/s) |
Normal Force > Normal Force: Transition Region Width | 1e-4 m |
Frictional Force > Method | Smooth Stick-Slip |
Frictional Force > Coefficient of Static Friction | 0.3 |
Frictional Force > Coefficient of Dynamic Friction | 0.3 |
Frictional Force > Critical Velocity | 0.01 m/s |
Sensing > Separation Distance | unselected |
Sensing > Normal Force | unselected |
Sensing > Frictional Force Magnitude | unselected |
On the Modeling tab, select Model Settings > Model Settings to open the Configuration Parameters. In the Solver pane, under Solver details, update the following:
Max step size: | 1e-3 |
Absolute tolerance: | 1e-3 |
At this point, both the Cylindrical Wheel block and Inclined Plane block should have a geometry port. As shown in the figure, connect the geometry ports of the Inclined Plane and Cylindrical Wheel blocks to the base and follower ports of the Spatial Contact Force block, respectively.
On the Simulation tab, click Run. In the MATLAB window, the Mechanics Explorer pane opens, and you see the cylindrical wheel roll down the surface. For a more complicated model, see Using the Spatial Contact Force Block - Bumper Car.