 Kinematic analysis deals with time dependent functions, such as velocity and acceleration of linkages. LinkageDesigner provides a number of functions that helps analyse the translational and angular velocity, acceleration and also higher order derivatives of any links.
LinkageData by default does not contains kinematic records, because the basic analysis does not requires it. In order to calculate the velocity or acceleration, the linkage should be converted into a time dependent linkage. As the linkage is converted into time dependent linkage LinkageDesigner recalculates and stores the required records in the LinkageData.
There are principally two ways to convert linkages into time dependent ones:
• Express every driving variables with the explicit function of the time variables and use the time as the only one driving variable.
• Specify first derivatives of the independent driving variables by setting the velocity values for every driving variables.
 ToTimeDependentLinkage[linkage,t] Converts linkage into a time dependent mechanism. The function determines the time-dependent variables of the linkage and calculates symbolically the first derivatives of these variables with respect to t symbol. NToTimeDependentLinkage[linkage,t] Converts linkage into a time dependent mechanism. The function determines the time-dependent variables of the linkage and calculates numerically the first derivatives of these variables with respect to t symbol.

Convert linkages into time dependent ones.

In this tutorial the kinematic analysis of the double cardan shaft linkage will be presented. This mechanism is often used in machines, cars, boats etc to transmit rotation and torques between two shafts whose axes are not coinciding. Double cardan shaft mechanism

The double cardan shaft has a peculiar kinematic feature. If the input and output axes are parallel or perpendicular, coplanar and the angular velocity of the input shaft is constant, than the angular velocity of the output shaft is also constant. In this configuration the double cardan shaft is a so called CV joint ( Constant Velocity joint). Any other relative orientation of the input and output axes result a "jerky rotation" in the output shaft.
To analyse the above mentioned kinematic feature, two double cardan mechanisms are built. The first one having parallel and coplanar input-output axes, while the second one is slightly misaligned from the parallel axis. The angular velocity of the output axis are plotted for one whole rotation of the input axis. This way the raise of the "jerky rotation" can be explored.

## Define the cardan shaft linkage

The cardan shaft mechanism is used to transmit rotation ( and torque ) between two non-coaxial shaft. If the driving and driven axis is connected with one universal joint the angular velocity of the driven shaft would oscillate, even if the angular velocity of the driving shaft is constant. These variations in velocity give rise to inertia forces, torques, noise, and vibration. By using a double joint the variation of angular motion can be avoided, provided that :
• The two forks of the intermediate shaft (link2) lies in the same plane.
• The angle between the first shaft (link1) and the intermediate shaft (link2) must exactly be the same with that between the intermediate shaft (link2) and the last shaft (link3)
In order to model the different configuration of the double cardan shaft linkage, the linkage definition is divided into two steps. First the open chain double cardan shaft is defined without defining the loop closing rotational joint of the output axis (link3). This mechanism having 5 DOF that is used to align the output axis to the required direction and measure the position and orientation of the end point marker. Using the measured marker the loop closing rotational joint is defined and the resulted LinkageData is assigned to a new variable.
 In:=
The main design rules of the linkage definition:
1. The input axis ( link1) rotates around the x-axis of the reference frame
Define the open chain double cardan shaft
 Out= The linkage definition above contains two fixed joints. The first fixed joint connects S link to link2. This joint is introduced to move and rotate the z-axis of link2 in the position where the second universal joint can be defined. The second fixed joint connects E link to link3. The LLRF of E link is positioned and rotated in a posture, where the rotational joint of the output axis will be defined.
Display the kinematic graph of the linkage
 Out= Out= There are predefined geometries stored in the STL subdirectory of the \$LinkageExamplesDirectory. These geometries can be imported with the standard Import function and assigned to the \$LDLinkGeometry record of the LinkageData.
Import and color and assign solid geometry to the links
 In:=
Since the LLRF of E link is defined as the joint marker of the rotational joint, which connects the output link to the workbench, the loop closing rotational joint can be easily defined. To determine the joint markers on both links it is enugh to measure LLRF of E with respect to the reference frame.
Move the open double cardan linkage into a posture where the input and output axis are parallel and coplanar. Set the angle of the input and intermediate shaft to 15°.
 Out= Measure the LLRF of "E" link in this posture
 Out//MatrixForm= Display the open double cardan shaft in this posture
 Out= Kinematic pair definition.

 option name default value CheckRedundantEquations False Enables/disables the redundant equation checking. ConstraintWorkingPrecision 16 Sets the working precision for the generated loop closing constraint equations. Verbose False Enables/disables verbose constraint definition. If it is enabled the function prints log messages. SimplifyEquation True Enables/disables simplification of generated transformations and loop closing equations.

Constraint generation options.

Define the loop closing kinematic pair and assign the resulted linkage to linkage1      Out= The loop closing kinematic pair removes 4 variables and leave only one driving variable, which is the joint variable of the first rotational joint. This implies that the mobility of the double cardan shaft mechanism is 1.
 Out= Similarly as linkage1 was defined from linkage, a second mechanism could be defined. This mechanism hovewer have only coplanar but NOT parallel input and output axes. The angle between the input and output axes is set to be 5°.
Move the open double cardan linkage into a posture where the input and output axis are at angle 5° and coplanar.
 Out= Measure the LLRF of "E" link in this posture
 Out//MatrixForm= Define the loop closing kinematic pair and assign the resulted linkage to linkage2      Out= Display the projected front view of linkage2 as 2D Graphics object
 Out= ## Define time dependent double cardan shafts

In order to calculate the derivatives of the motion, the linkage has to be converted into a time dependent linkage. This can be done with the help of ToTimeDependentLinkage or NToTimeDependentLinkage functions. The primary task of these functions is to calculate the first derivatives of all time dependent variables and store them in the \$LDTimeDependentVariables record.
 ToTimeDependentLinkage[linkage,t] Calculates the first derivatives of the time dependent variables with respect to t and fill up the \$LDTimeDependentVariables and \$LDDrivingVelocities records of linkage. NToTimeDependentLinkage[linkage,t] Generates the equations of the first derivatives of the time dependent variables with respect to t. The generated equations are appended to the \$LDDerivedParametersB record.

Convert linkages into time dependent ones.

Even if in theory the first derivative of the time dependent variables can always be solved in closed form, sometimes the expressions are so big, that the solution would require considerable time and memory resources. To overcome this problem the NToTimeDependentLinkage function was introduced. This function only generates the set of linear equations but do not solve them parametrically. The equations determining the first derivatives are appended to the \$LDDerivedParametersB record and solved simultaneously with the other constraint equations. The equations of this record are solved numerically with the FindRoot function, which is usually much more faster than the closed form solution in case of large expressions.
Convert linkage1 to time dependent linkage. Make sure that t is symbol
 Out= \$LDTimeDependentVariables contains the contains the first derivative of the time dependent variables with respect to the time symbol. \$LDDrivingVelocities stores the velocity values of the driving variables. \$LDDerivedParametersB stores the list of implicitly derived dependent parameter record of the linkage.

Browse the time dependent records of LinkageData
 Out= Out=   