主要内容

Slider-Crank (AB-PB)

R2026b

Position-and-angle-based slider-crank mechanism

Since R2026b

  • Slider-Crank (AB-PB) block

Libraries:
Simscape / Foundation Library / Mechanisms

Description

The Slider-Crank (AB-PB) block represents an ideal slider-crank mechanism that converts between the continuous rotational motion of the crank and the oscillating translational motion of the slider.

Slider-crank schematic

The block uses the equations

lProjected=Rcos(θ)+lRod2−R2sin2(θ)

lProjected=xFt−xBt

t=fdlProjecteddθ

dlProjecteddθ=−Rsin(θ)−R2sin(θ)cos(θ)lRod2−R2sin2(θ)

fSide=ftan(ϕ)

ϕ=asin(RlRodsin(θ))

where:

  • R is the crank radius.

  • lRod is the rod length.

  • lProjected is the distance between the crank axle and the slider.

  • θ is the crank angle relative to top dead center. When θ is 0, the slider-crank mechanism is at maximum projected length.

  • Φ is the rod obliquity angle.

  • t is the torque of the rotational network acting on the crank axle. Positive torque drives the crank in the positive rotational direction.

  • f is the force of port Bt acting on port Ft.

  • fSide is the side force, that is, the normal force between the slider and the rail that it slides on.

The angle-based rotational ports Br and Fr are rigidly connected to each other and represent the crank axle. The position-based translational ports Bt and Ft represent the axle and the slider. Use the Translational port for slider (graphical) parameter to specify which of these ports corresponds to the slider.

To model friction effects on the slider, select Enable side force output and connect the Fs port to port N of a Translational Friction (PB) block.

The block does not model crank inertia, slider stiffness, or slider damping. To avoid computational issues:

  • To help the mechanism maintain momentum as it passes through top dead center and bottom dead center, attach an Inertia (AB) block to the crank axle.

  • To avoid numerical instability, attach a Rotational Damper (AB) block to the crank axle.

  • When driving the system with a torque source, attach a rotational load, such as inertia or damper, to the torque source, as well as to the Slider-Crank (AB-PB) block, because the slider-crank does not absorb torque at top dead center (θ = 0 deg) and bottom dead center (θ = 180 deg).

  • When driving the system with a torque source, initialize the crank at an angle other than 0 deg or 180 deg, so that the system can apply a force to the slider.

Variables

To set the priority and initial target values for the block variables prior to simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.

Nominal values provide a way to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. Nominal values can come from different sources, one of which is the Nominal Values section in the block dialog box or Property Inspector. For more information, see Modify Nominal Values for a Block Variable.

Examples

Ports

Conserving

expand all

Angle-based rotational conserving port that represents the base connection.

Dependencies

To enable this port, set the Visible rotational ports parameter to either Br and Fr or Br.

Angle-based rotational conserving port that represents the follower connection, rigidly connected to the base rotational port.

Dependencies

To enable this port, set the Visible rotational ports parameter to either Br and Fr or Fr.

Position-based translational conserving port that represents the base connection.

Position-based translational conserving port that represents the follower connection.

Output

expand all

Physical signal port that outputs the side force between the slider and its rail. To model friction effects on the slider, connect this port to port N of a Translational Friction (PB) block.

Dependencies

To enable this port, select the Enable side force output check box.

Parameters

expand all

Geometry

Radius of the crank.

Length of the rod connecting the crank and the slider. The parameter value must be greater than the value of the Crank radius parameter.

Ports

To improve block diagram readability, specify the rotational ports to display. The two rotational ports are rigidly attached to each other, so the effect is purely graphical and the block functions exactly the same whether it has one or two ports. Select the rotational ports visible on the block icon:

  • Br and Fr — Expose both ports, Br and Fr.

  • Br — Expose only port Br.

  • Fr — Expose only port Fr.

To improve block diagram readability, specify which of the translational ports corresponds to the slider. The effect is purely graphical. Select the translational port to use:

  • Ft — Attach port Ft to the slider.

    Block icon display with port Ft representing the slider

  • Bt — Attach port Bt to the slider.

    Block icon display with port Bt representing the slider

Select this check box to enable the physical signal output port Fs, which outputs the side force between the slider and its rail. Use this signal to model the friction effects on the slider.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2026b