| SimMechanics™ | ![]() |
Specify component of vector difference of two Body CS origins as function of time
Constraints & Drivers

The Linear Driver block specifies a component of the vector difference of Body coordinate system (CS) origins as a function of time.
Let r1, r2 be the vector positions of the origins of CS1 on one Body, CS2 on the other Body, and R = r1 -r2. The Linear Driver block specifies one of the vector components of R = (X,Y,Z), projected on to the World CS axes, as a function of time:
X, Y, or Z = X(t=0), Y(t=0), or Z(t=0) + f(t)
You connect a Driver Actuator block to the Linear Driver.
The Simulink® input signal into the Driver Actuator specifies the time-dependent driving function f(t) and its first two derivatives, as well as their units. If you do not actuate Linear Driver, this block acts as a time-independent constraint that freezes the vector component between the two Body CS origins at its initial value X(t=0), Y(t=0), or Z(t=0) during the simulation.
Drivers restrict relative degrees of freedom (DoFs) between a pair of bodies as specified functions of time. Locally in a machine, they replace a Joint as the expression of the DoFs. Globally, Driver blocks must occur topologically in closed loops. Like Bodies connected to a Joint, the two Bodies connected to a Drivers are ordered as base and follower, fixing the direction of relative motion.
You can also connect a Constraint & Driver Sensor to any Driver and measure the reaction forces/torques between the driven bodies.

The dialog has two active areas, Connection parameters and Parameters.
The base (B)-follower (F) Body sequence determines the sense of positive motion. Positive translation is the follower moving in the direction of the translation axis.
When you connect the base (B) connector port on the Linear Driver block to a Body CS Port on a Body, this parameter is automatically reset to the name of this Body CS. See the following figure, Linear Driver Base and Follower Body Connector Ports.
When you connect the follower (F) connector port on the Linear Driver block to a Body CS Port on a Body, this parameter is automatically reset to the name of this Body CS. See the following figure, Linear Driver Base and Follower Body Connector Ports.
Using this spinner menu, you can set the number of extra connector ports needed for connecting Driver Actuator and Constraint & Driver Sensor blocks to this Driver. The default is 0.
To activate the Driver, connect a Driver Actuator.
Linear Driver Base and Follower Body Connector Ports

In the pull-down menu, choose the component of the vector difference R between the Body CS origins that you want to drive as a function of time. The components are measured with respect to the World CS axes. The choices are X, Y, or Z. The default is X.
Constraint & Driver Sensor, Distance Driver, Driver Actuator
See Constraining and Driving Degrees of Freedom for more on restricting DoFs with Drivers.
See Verifying Machine Topology and How SimMechanics™ Software Works.
![]() | Joint Stiction Actuator | Machine Environment | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |