Specify Joint Motion Profile
In this tutorial, you prescribe the time-varying crank angle of a four-bar linkage using a Revolute Joint block. Then, during simulation, you sense the actuation torque at the same joint corresponding to the prescribed motion.
At the MATLAB® command prompt, enter
smdoc_four_bar. A four-bar model opens. This is the model you create in tutorial Model a Closed-Loop Kinematic Chain.
In the dialog box of the Base-Crank Revolute Joint block, specify the following parameters settings.
Parameter Setting Actuation > Torque
Actuation > Motion
Provided by Input
Sensing > Actuator Torque Selected
The joint block displays two physical signal ports. Input port q accepts the joint angular position. Output port t provides the joint actuation torque required to achieve that angular position.
In each of the four Revolute Joint block dialog boxes, set Internal Mechanics > Damping Coefficient to
N*m/(deg/s). During simulation, damping forces between the joint frames account for dissipative losses at the joints.
Drag the following blocks into the model. These blocks enable you to specify an actuation torque signal and plot the joint position.
Block Library Simulink-PS Converter Simscape > Utilities PS-Simulink Converter Simscape > Utilities Scope Simulink > Sinks Signal Builder Simulink > Sources
Connect the blocks as shown in the figure.
In the Input Handling tab of the Simulink-PS Converter block dialog box, specify the following block parameters.
Parameter Value Filtering and derivatives
Input filtering order
In the Signal Builder window, specify the joint angular trajectory as shown in the figure.
This signal corresponds to a constant angular speed of 1 rad/s from t = 1s onwards.
Run the simulation. Mechanics Explorer opens with a dynamic display of the four-bar model.
Open the Scope window. The scope plot shows the joint actuation torque with which you can achieve the motion you prescribed.