Ball on a Slope
This example shows a ball rolling down a sloped ramp under gravity. The model demonstrates:
How to set up a position-based translational network with a downward slope in the positive direction
How to use a Wheel and Axle (AB-PB) block to couple angle-based rotational and translational motion for no-slip rolling
How gravity initializes motion without external input
How to measure ball translational position, ball angle, and ground torque acting on the ball
The ramp has a 30-degree slope, and the ball starts at rest. Gravity applies a force along the slope, causing the ball to roll. A linear damper models air resistance, so the ball reaches terminal velocity when damping balances torque due to the gravitational torque.
Model
The model uses these Simscape blocks:
Inertia (AB) - Ball's rotational inertia
Mass (PB) - Ball's translational mass
Wheel and Axle (AB-PB) - Couples rotation and translation
Translational Damper (PB) - Air resistance
Mechanical Translational Properties (PB) - Defines slope angle
The positive translational direction points downhill. The slope angle is set to -30 degrees, so gravity accelerates the ball in the positive direction. The Wheel and Axle block is configured so positive rotation corresponds to positive translation.
For more information see these examples:

Physical View and Orientation
Key characteristics are:
The translational network is shown horizontally on the canvas, with the positive direction pointing to the right to represent downhill motion.
The rotational axis follows the right-hand rule: positive rotation is clockwise in the physical view.
The rotational axis translates along the slope. If the inertia were unevenly distributed or friction depended on normal force, a more complex rotational model would be required.
Sensor Subsystem
The model measures:
Ball position using a Translational Motion Sensor
Ball angle using a Rotational Motion Sensor
Ground torque acting on the ball using a Torque Sensor
The Torque Sensor is connected between the Wheel and Axle rotational port and the Inertia block. It measures the torque applied by the ground on the rest of the rotational network. Port B of the Torque Sensor is connected to the Wheel and Axle and port F of the sensor is connected to the rest of the rotational network so that the sensor measures the torque applied by the wheel on the rest of the rotational network. For more information on measuring torque, see the Interpreting Torque in the Angle-Based Rotational Domain example.

Simulation Results from Scopes
The sensed signals show:
Gravity causes the ball to accelerate downhill, producing positive translational and rotational velocities.
Torque from the ground initiates rolling and decreases over time as the ball approaches terminal velocity.
At steady state, gravitational force along the slope balances the damping force, and torque approaches zero.
