|On this page…|
The four-bar linkage is a planar closed-loop linkage used extensively in mechanical machinery. This linkage has four coplanar bars that connect end-to-end with four revolute joints. In this example, you model a four-bar linkage using the Binary Link and Pivot Mount custom blocks that you created in previous examples. For an advanced application of the four-bar linkage, see the bucket actuating mechanism of the Backhoe featured example.
Before continuing, you must complete the following examples:
To model the four-bar linkage, you represent each physical component with a SimMechanics™ block. The linkage in this example has five rigid bodies—three binary links and two pivot mounts—that connect in a closed loop through four revolute joints. Two of the binary links have one peg and one hole. The third binary link has two holes. The fourth link is implicit: the fixed distance between the two coplanar pivot mounts represents this link.
You represent the binary links and pivot mounts using the custom library blocks that you created in previous examples. You represent the four revolute joints using four Revolute Joint blocks from the SimMechanics Joints library.
The two pivot mounts connect rigidly to the World frame. For this reason, the fourth (implicit) link acts as the ground link. Two Rigid Transform blocks provide the rigid connection between the two pivot mounts and the World frame. A translation offset in each Rigid Transform block displaces the two pivot mounts symmetrically along the World frame Y axis.
To guide model assembly, you can specify the desired initial state for one or more joints in the model. To do this, you use the State Targets menu of the joint blocks. The state targets that you can specify are the joint position and velocity. These are angular quantities in revolute joints. You can specify state targets for all but one of the joints in a closed loop.
To model the four-bar linkage:
Start a new model.
Drag these blocks to the model.
|Rigid Transform||SimMechanics > Frames and Transforms||2|
|World Frame||SimMechanics > Frames and Transforms||1|
|Mechanism Configuration||SimMechanics > Utilities||1|
|Solver Configuration||Simscape > Utilities||1|
Connect and name the blocks as shown in the figure. Be sure to flip the frame ports of the crank_base_transform block.
Drag four Revolute Joint blocks from the SimMechanics Second Generation (SM2G) > Joints library into the model.
Drag these custom blocks into the model. See the modeling tutorials if you have not created these custom blocks.
Connect the blocks as shown in the figure, paying close attention to the port names. Rotate the blocks as needed.
Specify the binary link dimensions and the spatial relationships between the pivot_mount blocks and the World frame.
In the Rigid Transform block dialog boxes, specify these parameters.
|Translation > Method||Standard Axis||Standard Axis|
|Translation > Axis||-Y||+Y|
|Translation > Offset||0.15||0.15|
In the binary link block dialog boxes, specify the length parameter.
|Binary Link||Length (m)|
The model is now complete. You can now specify the desired initial state for one or more joints in the model. In this example, you specify an initial angle of 30° for the Base-Crank joint. To do this:
Double-click the Base-Crank Revolute Joint block.
In the block dialog box, expand State Targets and select Position.
In Value, enter -30 and press OK.
With the model window active, press Ctrl+D.
Mechanics Explorer opens with a static display of the four-bar linkage in its initial configuration. If the joint state targets that you specified are valid and compatible, the initial configuration matches those state targets. The figure shows the static display that you see in Mechanics Explorer after updating the model.
In the Mechanics Explorer toolstrip, click the isometric view button .
You can guide assembly so that the four-bar linkage assembles in an open configuration instead. To do this, you must specify a position state target for at least one more joint. You do not have to specify this target precisely. If you have a general idea of what the target should be, you can enter an approximate value and select a low priority level for that target. The figure shows the open initial configuration that results when you specify an additional position state target of 0 degrees for the Base-Rocker Revolute Joint block.
Closed-loop kinematic chains like the four-bar linkage are especially vulnerable to assembly issues. Even when the model assembles, SimMechanics may fail to meet one or more state targets. You can check the assembly status of the model and of the joints using the Model Report tool:
In the Mechanics Explorer menu bar, click Tools > Model Report.
Scan the model report for circles that are yellow or red.
These circles identify issues in the assembly or in the joint state targets. A yellow or red circle in the Position > Status column identifies state targets that SimMechanics could not satisfy.
The figure shows the model report for the four bar linkage in the open configuration. A green circle indicates that SimMechanics satisfied the Base-Crank Revolute Joint state target precisely. A yellow circle indicates that SimMechanics satisfied the Base-Rocker Revolute Joint state target only approximately.
You can now simulate the model. To do this, In the Simulink® tool bar, click the Run button.
In a subsequent example, you actuate the four-bar linkage and sense its motion. So that you add the actuation inputs and motion sensors to this model, save it as four_bar_linkage in a convenient folder. Then, see example Prescribe Four-Bar Actuation Torque.