Next Article in Journal
Phase-Aware Complex-Spectrogram Autoencoder for Vibration Preprocessing: Fault-Component Separation via Input-Phasor Orthogonality Regularization
Previous Article in Journal
Encoding Multivariate Time Series of Gas Turbine Data as Images to Improve Fault Detection Reliability
Previous Article in Special Issue
Adaptive Trigger Compensation Neural Network for PID Tuning in Virtual Autopilot Heading Control
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Determination of the Denavit–Hartenberg Parameters for the Forward Kinematics of All Serial Robots: Novel Kinematics Toolbox

Department of Mechatronics Engineering, Kocaeli University, Kocaeli 41001, Türkiye
*
Author to whom correspondence should be addressed.
Machines 2025, 13(10), 944; https://doi.org/10.3390/machines13100944 (registering DOI)
Submission received: 2 September 2025 / Revised: 7 October 2025 / Accepted: 11 October 2025 / Published: 13 October 2025
(This article belongs to the Special Issue Control and Mechanical System Engineering, 2nd Edition)

Abstract

Traditionally, the determination of the Denavit–Hartenberg (DH) parameters for serial robotic manipulators is a manual process that depends on manufacturer documentation or user-defined conventions, often leading to inefficiency and ambiguity in DH frame placement and parameters. This study introduces a universal and systematic methodology for automatically deriving DH parameters directly from a robot’s zero configuration, using only the geometric relationships between consecutive joint axes. The approach was implemented in a MATLAB-based kinematics toolbox capable of computing both the classical and modified DH parameters. In addition to parameter extraction, the toolbox integrates workspace visualization, manipulability and dexterity analysis, and a slicing and alpha-shape algorithm for accurate workspace volume computation. Validation was conducted on multiple industrial robots by comparing the extracted parameters with the manufacturer data and the RoboDK models. Benchmark studies confirmed the accuracy of the volume estimation, yielding an absolute percentage error of less than 4%. While the current implementation relies on RoboDK models for verification and requires the manual tuning of the alpha-shape parameter, the toolbox provides a reproducible and extensible framework for research, education, and robot design.

1. Introduction

Accurate kinematic modeling of robotic manipulators is fundamental for high-precision motion control, offline programming, and overall performance optimization. This accuracy is particularly critical in tasks requiring precise absolute positioning and repeatability, where a strong correspondence between the robot’s virtual model and its real-world actions is essential.
To this end, the Denavit–Hartenberg (DH) convention, first introduced in [1], remains one of the most widely adopted standards for the analytical description of robotic geometry. By systematically assigning coordinate frames to each link, the otherwise complex forward kinematics problem of determining the end-effector pose from joint variables is simplified, making the analysis more tractable for multi-link manipulators. While foundational and widely taught using seminal texts such as [2,3,4], the classical DH framework has some notable limitations. Specifically, in configurations where consecutive joint axes are parallel or nearly parallel, the model can suffer from discontinuities and singularities, leading to numerical instability and unreliable calibration outcomes. Furthermore, the classical convention of placing each joint frame on the axis of the subsequent joint can complicate parameter assignment in certain cases.
To mitigate the limitations of the classical framework, Craig introduced the Modified Denavit–Hartenberg (MDH) convention [5], a formulation notably adopted in books such as [6,7,8]. By altering the frame assignment, the MDH provides a more robust and often simpler formulation that reduces the numerical sensitivity in problematic axis configurations. This makes it a practical alternative for accurately modeling a broader range of manipulator geometries. Consequently, the MDH convention is often preferred for computational implementations and calibration tasks.
Despite the long-standing use of both conventions, ambiguity in the literature is common, with many publications failing to specify which framework is being applied, leaving readers uncertain regarding the underlying kinematic assumptions. For example, Faria et al. [9] use the term “Standard” DH parameters, which may be misleading, as it is unclear to what the standardization refers. While some studies have sought to alleviate this confusion by clearly delineating the differences between the conventions [10,11], they often fall short of providing algorithmic implementations for systematic parameter derivations.
The need for clear and repeatable methods has motivated several efforts aiming to establish systematic procedures for the direct computation of the DH parameters. For instance, Corke [12] proposed an algebraic walkthrough to derive the parameters for either convention. Faria et al. [9] developed an automatic algorithm using dual vector algebra using the recorded end-effector positions. Rettig et al. used conformal geometric algebra to extract classical and MDH parameters [13]. Recently, Sung and Choi [14] introduced an algorithm for modeling MDH parameters using line geometry. While these contributions underscore the ongoing interest in automatic parameter computation, they pave the way for a more universal and user-friendly approach.
Beyond kinematic parameter accuracy, a robot’s workspace is a critical metric for performance optimization. The workspace defines the set of reachable poses for the end-effector and is used to identify regions of high accessibility, as highlighted by Zacharias et al. [15], who introduced a method for capturing and analyzing reachable spaces to support task-oriented design. Although established numerical techniques such as random sampling have been used to estimate workspace boundaries, as discussed by Cao et al. [16], the precise computation of the total workspace volume remains a challenge. This difficulty arises especially for complex, non-convex workspaces that include internal voids that are characteristic of serial manipulators. The importance of the workspace extends beyond geometric characterization, providing a foundation for optimal manipulator design. Vijaykumar et al. [17] demonstrated that geometric optimization using the workspace volume and dexterity indices can improve manipulator performance, while Gosselin [18] proposed new dexterity measures to guide the design and optimization of serial manipulators toward higher isotropy and operational efficiency.
Complementary to workspace analysis, accurate kinematic modeling is equally crucial for solving the inverse kinematics problem in serial manipulators. Kucuk and Bingul [19] demonstrated that the precision of inverse kinematic computations directly depends on the correctness of the Denavit–Hartenberg parameters, emphasizing the importance of precise geometric representation in industrial manipulators. They further extended their work to manipulators with offset wrists [20], showing that even small parameter deviations can lead to substantial errors in analytical solutions and reduce end-effector positioning accuracy. Zhou et al. [21] developed a MATLAB and V-REP (currently named CoppeliaSim)-based teaching framework that underscores the educational value of accurate kinematic modeling, illustrating how properly defined parameters improve the understanding and reliability of inverse kinematic computations. More recently, Niu et al. [22] proposed a general analytical framework for solving the inverse kinematics of industrial robots and explicitly highlighted that its performance fundamentally depends on the accurate identification of kinematic parameters, reaffirming the critical role of precise DH parameter determination.
Several toolboxes have also been developed to simplify kinematic simulations. Kucuk and Bingul [23] developed an offline simulation toolbox that includes a library of 16 six-degree-of-freedom industrial robots, providing users with a practical environment for studying kinematic and dynamic behavior. However, its major limitation lies in its inability to define custom robots and the lack of functionality for determining the DH parameters of arbitrary manipulators. Ozakyol et al. [24] introduced an advanced MATLAB toolbox capable of performing task and operational space trajectory simulations for arbitrary robot configurations. Although versatile, this toolbox departs from the DH formulation by using spatial vector algebra to represent joints and transformations, and it does not include built-in robot libraries or workspace analysis capabilities. Corke [25] developed the most widely recognized and comprehensive toolbox for robotics, which integrates both kinematic and dynamic simulations within MATLAB, providing a broad library of industrial robots and a foundation for modern robotic education and research. Complementary to these developments, Rajeevlochana et al. [26] presented an algorithm for the automatic extraction of DH parameters using line geometry, which is one of the earliest systematic attempts to derive such parameters computationally. Furthermore, Zlajpah [27] provided an in-depth overview of robotic simulation techniques, emphasizing the importance of simulation environments in testing kinematic algorithms and validating the control strategies before implementation.
This study addresses the following challenges and gaps in the literature. A kinematic toolbox based on DH parameters that enables the intuitive definition and modification of existing serial robotic structures and a user-friendly interface is currently lacking. Existing works [9,14] in the literature are only limited to algorithmic implementations. Their alternative formulations rely on dual vector and conformal geometric algebra approaches. A simpler method based on Cartesian geometry will be used in this study. Furthermore, the integration of the developed algorithm with an industrial robotics software such as RoboDK enhances the usage of this toolbox for industrial and educational purposes. This is an important aspect allowing robotics researchers to easily implement analysis to industrial serial robots. Thus, a solution with the following key contributions is proposed.
  • A universal and systematic methodology for the automatic determination of DH parameters for any serial robot, using only the Cartesian geometric information of the joint axes in its zero configuration without requiring prior kinematic data.
  • A MATLAB-based kinematics toolbox that implements this methodology, providing user-friendly tools for computing both classical and MDH parameters. Users can define custom robots and perform the proposed analysis in an all-in-one toolbox.
  • Integrated performance analysis features, including the visualization of the robot’s workspace, manipulability, and dexterity, alongside a numerical method for accurately computing the total workspace volume.
  • Seamless integration with RoboDK, enabling the direct import, analysis, and modification of a wide range of industrial and research robot models.
The remainder of this paper is organized as follows: Section 2 details the proposed methodology, beginning with a review of the DH conventions before presenting the universal frame assignment framework, the complete algorithm for parameter determination, and the method for workspace analysis and volume computation. Section 3 presents the validation results, in which the toolbox is applied to several industrial robots to demonstrate its accuracy and robustness. Furthermore, the proposed methodology is compared with related works. Finally, Section 4 discusses the findings and limitations of this work, and Section 5 concludes the paper.

2. Methodology

In the modeling of serial robotic manipulators, the Denavit–Hartenberg (DH) convention is a widely adopted method for systematically describing the geometric relationships between consecutive links. The original formulation introduced by Denavit and Hartenberg is commonly referred to as the classical DH convention. A modified version, later proposed by John Craig, is known as the MDH convention. It is essential to clearly distinguish between these two conventions, as even minor differences in parameter definitions can result in significant discrepancies in the derived kinematic equations and their subsequent analysis.

2.1. The Denavit–Hartenberg Conventions

In the classical DH convention, the transformation between consecutive joints i 1 and i consists of four basic transformations.
T i i 1 = Rot z ^ , θ i Trans z ^ , d i Trans x ^ , a i Rot x ^ , α i = cos ( θ i ) sin ( θ i ) cos ( α i ) sin ( θ i ) sin ( α i ) a i cos ( θ i ) sin ( θ i ) cos ( θ i ) cos ( α i ) cos ( θ i ) sin ( α i ) a i sin ( θ i ) 0 sin ( α i ) cos ( α i ) d i 0 0 0 1
The functions Rot and Trans denote rotation and translation with respect to the axis, given as the first argument by an amount determined by the second argument. The link and joint parameters are denoted as α i , a i , d i , and θ i , which are referred to as the link twist, link length, link offset, and joint angle, respectively. The joint variable is d i for a prismatic joint and θ i for a revolute joint.
In the MDH convention, the order of transformations and the numbering of joints change. This leads to the transformation given in (2).
T i i 1 = Rot x ^ , α i 1 Trans x ^ , a i 1 Trans z ^ , d i Rot z ^ , θ i = cos ( θ i ) sin ( θ i ) 0 a i 1 sin ( θ i ) cos ( α i 1 ) cos ( θ i ) cos ( α i 1 ) sin ( α i 1 ) d i sin ( α i 1 ) sin ( θ i ) sin ( α i 1 ) cos ( θ i ) sin ( α i 1 ) cos ( α i 1 ) d i cos ( α i 1 ) 0 0 0 1
A visual comparison between the two methods is presented in Figure 1.
An arbitrary transformation between two frames requires six parameters. Under the following assumptions, this is reduced to four parameters for the MDH convention, as follows:
Assumption 1. 
The z ^ i axis is perpendicular to the x ^ i 1 axis.
Assumption 2. 
The z ^ i axis intersects the x ^ i 1 axis.
The implication of Assumptions 1–2 are summarized below and the proof can be found in Appendix A.
Theorem 1 
(Four-parameter MDH representation and uniqueness). Let T i i 1 denote the MDH transform given in (2) with rotation R i i 1 and position o i i 1 . Under Assumptions 1–2, T i i 1 is fully parameterized by the four scalars ( α , a , d , θ ) and these parameters are unique.

2.2. Universal Frame Assignment Methodology

To assign frames correctly, a general method is proposed based on the relationship between consecutive joints. This method is applied from joint i 1 to i and repeated until the last joint is reached. Some preliminary concepts are introduced as follows: first, the assignment of the direction vector is defined, followed by the determination of the joint position, after which the relationships between consecutive joints are explained.
Each joint has a rotational or translational axis. To express a joint in Cartesian space, its direction and position must be defined with respect to a common coordinate frame. This coordinate frame is the reference for each joint and is defined as the world frame, which is denoted by the symbol W .
Definition 1 
(World Frame). The world frame, denoted by the symbol W , is a common coordinate frame that serves as a universal reference for all objects in the workspace, including the position and direction of each joint.
The world frame is arbitrary and can be selected in any orientation. Throughout this study, the convention is as follows: the z-axis points up, the x-axis points right, and the y-axis is the cross product of the z- and x-axes.
Definition 2 
(Direction vector of a joint). Let z ^ i W be a free unit vector; it is the direction vector of joint i if it is parallel to joint axis i.
The direction vector can be in either direction of the joint axis. The chosen direction determines the positive rotation or translation direction of the joint; however, it does not affect the resulting kinematic structure.
Definition 3 
(Position of a joint). Let p i W be a fixed vector with its origin at the world frame. This vector is the joint position if it lies on any point of the joint axis.
The joint position can be an arbitrary point on a joint axis because the computation of the consequent frame assignment and DH parameters will depend on the relationship between consecutive joint axes and not the joint positions. The joint position can easily be inferred by looking at a manufacturer’s datasheet of a robot, as the exact positions of the translational or rotational axes are always given.
From here on in this paper, whenever a reference frame is not specifically written in vector notation, it is always with respect to the world frame, for example, z ^ i W = z ^ i . Finally, a joint’s axis can be defined as a parametric function of the form
z i ( k ) = p i + z ^ i k
where k is a parametric variable and z i is a vector with its origin on the world frame and its tip at a point on the joint axis. Note that when the parametric variable k = 0 , the vector becomes the joint position.
An example is given to provide a better understanding of the definitions. Two joints are defined and shown in Figure 2, with their corresponding parametric functions being
z 1 ( k ) = p 1 + z ^ 1 k
z 2 ( s ) = p 2 + z ^ 2 s .
where k and s are parametric variables, p 1 and p 2 are the positions of joint 1 and 2, respectively, and  z ^ 1 and z ^ 2 are the direction vectors of joint 1 and 2, respectively.
The direction vector of a joint can be defined in several ways, the most intuitive of which is to define it in terms of the world frame axes. In Figure 2, the unit vector z ^ 1 is aligned with the z-axis of the world frame; thus, it can be written as z ^ 1 = 0 0 1 . The unit vector z ^ 2 is in the x–z plane of the world frame and has an angle of 45° with respect to the x-axis. Thus, it has equal components in both x and z directions, which can be written as z ^ 2 = 1 2 1 0 1 .
Another method to define the direction vector of a joint z ^ i is to express it with a series of rotations. For example, the vector z ^ 2 can be expressed as the z ^ W vector rotated along the y ^ W axis by 45 or as x ^ W rotated along the y ^ W by 45 . This is shown in the following equation:
z ^ 2 = cos 45 0 sin 45 0 1 0 sin 45 0 cos 45 0 0 1 = cos 45 0 sin 45 0 1 0 sin 45 0 cos 45 1 0 0 .
Throughout this work, the unit vector approach will be used to define the direction vector of a joint, since the authors believe it is more intuitive. The joint position and direction vectors will now be used to compute the DH frames and DH parameters. However, before placing the frames, the relationship between consecutive frames defines a framework in terms of how the origin and x-axis should be placed. In 3D space, subsequent joint axes can be in four states with each other, as follows: skew, intersecting, parallel, or collinear.
To check how consecutive joint axes are related to each other, some cases are introduced.
Characterization 1 
(Geometric Conditions Between Joint Axes). Let z ^ i and z ^ i + 1 be the direction vectors of joints i and i + 1 , respectively, and let
d i = p i + 1 p i
denote the position vector from joint i to joint i + 1 , expressed in the world frame.
The following three geometric conditions were defined:
  • Condition C1 (Axis Alignment):
    z ^ i × z ^ i + 1 = 0
    This condition holds when the joint axes are parallel or collinear.
  • Condition C2 (Coplanarity):
    d i · ( z ^ i × z ^ i + 1 ) = 0
    This condition holds true if the joint axes lie in the same plane.
  • Condition C3 (Axis Coincidence):
    d i × z ^ i = 0
    This condition holds if the origin of joint i + 1 lies along the axis of joint i.
These conditions are used throughout this study to categorize the spatial relationships between consecutive joint axes.
Now that the conditions are characterized, the state of the consecutive joints can be determined by combining these conditions. The results are presented in Table 1.
The frame placement framework based on the geometric relationship between consecutive joint axes is introduced. The process of defining the MDH frames for the intersecting joint axes is illustrated in Figure 3.
Figure 3 consists of four steps from left-to-right. After the position and direction vectors of joints i and i + 1 are determined as shown in step one of Figure 3, the origin must be placed at the intersection point, which is shown in step two. This intersection point is labeled as o i and represents the origin of the MDH frame. Then, the already determined direction vector z ^ i is placed with its origin at o i , fixing the vector in 3D space, as inferred from step three. The  x ^ i unit vector is placed normal to the plane defined by the basis vectors z ^ i and z ^ i + 1 in either direction in step four. Although not used in computations, the  y ^ i axis is defined as y ^ i = z ^ i × x ^ i . To mathematically express this process, the parametric function of the joint axes is defined as
z i ( k ) = p i + z ^ i k
z i + 1 ( s ) = p i + 1 + z ^ i + 1 s .
where k and s are parametric variables. Substracting (8) from (7) yields the following matrix equality
z ^ i z ^ i + 1 k s = d i .
Since the equality is overdetermined, a pseudoinverse can be taken that minimizes the least square error as follows
k s = z ^ i z ^ i + 1 + d i .
Now the parametric variables k and s are found, which can be used in either (7) or (8) to find the origin of the frame as
o i = z i ( k ) = z i + 1 ( s ) .
Since the joint axes are coplanar, the x-axis is placed along the normal to this plane either positively or negatively, which fully defines the MDH frame of joint i.
x ^ i = ± z ^ i × z ^ i + 1 .
The next geometric relationship involves the skew axes, which are defined as axes that do not intersect and are not parallel. The process of assigning a frame to joint i is shown in Figure 4 in a similar order as the previous case.
When the position and direction vectors of joints i and i + 1 are determined, a common orthogonal line between these axes is drawn, indicated by the brown line segment in the second step of Figure 4. The origin o i is placed at the intersection of this common orthogonal line segment and joint axis i. The origin of the z ^ i axis is fixed to o i and the x ^ i axis is placed along the common orthogonal line.
The parametric functions of the joint axes are defined similarly to (7) and (8). The vector connecting these axes is defined as the multivariable function
d ( k , s ) = z i + 1 ( s ) z i ( k ) = d i + z ^ i + 1 s z ^ i k .
To find the common orthogonal line segment, which is also the unique shortest line segment for skew axes, the minimum of (13) must be found.
min k , s D ( k , s ) = d ( k , s ) 2 = d ( k , s ) d ( k , s )
Writing (13) in (14) yields the following equation
D ( k , s ) = d i · d i + z ^ i + 1 · z ^ i + 1 s 2 + z ^ i · z ^ i k 2 + 2 d i · z ^ i + 1 s 2 d i · z ^ i k 2 z ^ i + 1 · z ^ i k s
= d i · d i + s 2 + k 2 + 2 d i · z ^ i + 1 s 2 d i · z ^ i k 2 z ^ i + 1 · z ^ i k s .
The partial derivates with respect to k and s are written and set equal to 0 to find the parametric variables that minimize D ( k , s ) .
D ( k , s ) k = 2 k 2 d i · z ^ i 2 z ^ i + 1 · z ^ i s = 0
D ( k , s ) s = 2 s + 2 d i · z ^ i 2 z ^ i + 1 · z ^ i k = 0
k z ^ i + 1 · z ^ i s = d i · z ^ i
s z ^ i + 1 · z ^ i k = d i · z ^ i
This yields the following matrix equation to find the parametric variables k and s.
k s = 1 z ^ i + 1 · z ^ i z ^ i + 1 · z ^ i 1 1 d i · z ^ i d i · z ^ i
The common orthogonal line segment d ( k , s ) is now known and the frame origin can now be obtained by substituting s into the joint axis as follows
o i = z i ( k ) .
The x-axis is placed along the common orthogonal line segment, which was defined as d ( k , s ) ; therefore, it can be written as follows
x ^ i = d ( k , s ) d ( k , s )
Next, the parallel axes were considered. A distinction between the parallel and collinear axes is made because both require different procedures to assign frames. The process for the parallel frames is shown in Figure 5.
The process for parallel axes is similar to that of skew axes; however, the common orthogonal line segment is not unique, leading to an infinite amount of common line segments. Therefore, one must be chosen to minimize the number of additional parameters. This is commonly chosen as the position of joint i. The following steps are similar to those for skew axes: the  z ^ i vector’s origin is fixed at o i and the x ^ i vector is placed along the common orthogonal.
The parametric functions are defined similarly to the previous steps and (7) and (8). Since the origin of the frame is chosen at the position of joint i as
o i = p i ,
the parameter k is zero and z i ( 0 ) = p i . This means the line segment equation can be written as follows:
d ( s ) = d i + z ^ i + 1 s .
Since the line segment must be orthogonal to the direction vector of joint i + 1 , the following equality can be derived
d ( s ) · z ^ i + 1 = 0 .
From this equality, s can be computed by substituting (25) in (26) and is obtained as follows:
s = d i · z ^ i + 1 .
This yields the following expression for the x-axis:
x ^ i = d ( s ) d ( s ) .
Collinear axes are the final geometric relationships and are the most obscure. These axes are defined as being aligned and coincident. The process of assigning the frame to joint i is illustrated in Figure 6.
Since the axes coincide, the origin is placed on an arbitrary point on the axes. As in the parallel axis case, the position of joint i is preferred.
o i = p i
The z-axis was placed along the joint axis. The  x ^ i axis is placed anywhere on the plane normal to the z ^ i axis, which makes it impossible to determine exactly. Therefore, for collinear axes, a secondary framework must be used for logical assignment.
The framework for assigning the x ^ i axis in collinear frames is divided into the following two parts: joint i being the first joint in the robot or joint i being any joint other than joint 1 in the robot. In the former case, z ^ 1 is checked to determine whether it is perpendicular to any of the main axes of the world frame. If it is perpendicular to any, the  x ^ 1 is chosen as that axis. If it is not perpendicular to any of the world frame axes, the axis with the smallest angle to z ^ 1 is chosen as the x ^ 1 axis.
In the latter case, namely, when the iteration is at a joint other than the first, the  x ^ i axis is chosen in the same direction as the previous axis x ^ i 1 .
The MDH frames for joints 1 through N-1 have been established, but the base frame and frame of the last joint remain undefined. To address this issue, two assumptions were introduced. The first assumption is that the base frame coincides with the MDH frame of joint 1 such that the origins and x- and z-axes are identical. The second assumption is that the final MDH frame N coincides with the position of the last joint while sharing the same x-axis orientation as the MDH frame of joint N-1.
Now that the MDH frames are obtained, the MDH parameters can be extracted using the following equations:
α i 1 = atan 2 ( x ^ i · z ^ i × z ^ i + 1 , z ^ i × z ^ i + 1 )
a i 1 = x ^ i o i + 1 o i
d i = z ^ i + 1 o i + 1 o i
θ i = atan 2 ( z ^ i + 1 · x ^ i × x ^ i + 1 , x ^ i × x ^ i + 1 )

2.3. Algorithm for Automatic DH Parameter Determination

The first step in determining the MDH parameters is to establish a geometric relationship between consecutive joint axes. Algorithm 1 performs this classification by analyzing the orientation vectors of each pair of consecutive joints and their relative displacements. Conditions C1, C2, and C3 are used to distinguish whether the axes are intersecting, skew, parallel, or collinear. This classification is crucial because it dictates how the coordinate frames are assigned in the next stage. Without correctly identifying these relationships, the subsequent frame placements and parameter extractions would be inconsistent and error-prone.
Algorithm 1 Axis relation classification
Require: 
Positions P R 3 × N , Orientations Z R 3 × N
Ensure: 
a x i s R e l a t i o n s { I , S , P , C } N 1
  1:
N r N 1
  2:
Initialize a x i s R e l a t i o n s as string array of length N r
  3:
for  i = 1 to N r  do
  4:
     z i Z ( : , i )                                                                            ▹ orientation of joint i
  5:
     z i + 1 Z ( : , i + 1 )                                                              ▹ orientation of joint i + 1
  6:
     d i P ( : , i + 1 ) P ( : , i )                                                         ▹ displacement vector
  7:
     c 1 ( c r o s s ( z i , z i + 1 ) ) = = 0 )
  8:
     c 2 ( d o t ( d i , c r o s s ( z i , z i + 1 ) ) = = 0 )
  9:
     c 3 ( c r o s s ( d i , z i ) = = 0 )
10:
     i s I n t e r s e c t ¬ c 1 c 2
11:
     i s S k e w ¬ c 1 ¬ c 2
12:
     i s P a r a l l e l c 1 ¬ c 3
13:
     i s C o l l i n e a r c 1 c 3
14:
    if  i s I n t e r s e c t  then
15:
         a x i s R e l a t i o n s ( i ) “I”
16:
    else if  i s S k e w  then
17:
         a x i s R e l a t i o n s ( i ) “S”
18:
    else if  i s P a r a l l e l  then
19:
         a x i s R e l a t i o n s ( i ) “P”
20:
    else if  i s C o l l i n e a r  then
21:
         a x i s R e l a t i o n s ( i ) “C”
22:
    end if
23:
end for
24:
return  a x i s R e l a t i o n s
Once the axis relationships are identified, Algorithm 2 systematically assigns frames according to the geometric state of each joint pair. For example, when two axes intersect, the origin of the frame is placed at their intersection, and the x-axis is oriented normal to the plane defined by the two z-axes. For the skew axes, the algorithm determines the shortest common orthogonal line segment and uses it to define both the frame origin and x-axis direction. In the case of parallel axes, the origin is fixed at the position of the preceding joint, whereas for collinear axes, additional rules ensure consistency across joints. Thus, this algorithm provides a universal and repeatable method for assigning MDH frames without relying on ad hoc or manual decisions, ensuring that the computed parameters remain valid for arbitrary serial robot geometries.
Algorithm 2 Find MDH-related frames from axis relations
Require: 
Positions P R 3 × N , Orientations Z R 3 × N , Axis relations A { S , I , P , C } N 1
Ensure: 
f r a m e O r i g i n s , f r a m e Z A x e s , f r a m e X A x e s
  1:
N r N 1
  2:
Initialize R O , R X , R Z 0 3 × N r
  3:
p r i o r i t y O r d e r [ S , I , P , C ]
  4:
For each i, set o r d e r I d x ( i ) to index of A ( i ) in p r i o r i t y O r d e r
  5:
s o r t e d I d x indices 1 N r sorted by o r d e r I d x
  6:
e x [ 1 , 0 , 0 ] , e y [ 0 , 1 , 0 ] , e z [ 0 , 0 , 1 ] , ε 10 9
  7:
for  i s o r t e d I d x  do
  8:
     z i Z ( : , i ) , z i + 1 Z ( : , i + 1 ) , P i P ( : , i ) , d i P ( : , i + 1 ) P ( : , i )
  9:
    switch  A ( i )  do
10:
        case “I”                        ▹ Intersecting axes
11:
            [ k , s ] pinv ( [ z i , z i + 1 ] ) d i
12:
            o r i g i n P i + k z i
13:
            x cross ( z i , z i + 1 ) / cross ( z i , z i + 1 ) ;
14:
           if  dot ( x , e x ) < 0  then  x x
15:
           end if
16:
            R O ( : , i ) o r i g i n R X ( : , i ) x R Z ( : , i ) z i         
17:
        case “S”                        ▹ Skew axes
18:
            M 1 z i z i + 1 z i z i + 1 1 d i z i d i z i + 1 r h s d i z i d i z i + 1
19:
            [ k , s ] M 1 r h s
20:
            o r i g i n P i + k z i
21:
            x d i + s z i + 1 k z i x x / x ;
22:
           if  dot ( x , z i ) < 0  then  x x
23:
           end if
24:
            R O ( : , i ) o r i g i n R X ( : , i ) x         
25:
        case “P”                        ▹ Parallel axes
26:
            o r i g i n P i x d i dot ( d i , z i ) z i + 1 x x / x
27:
           if  dot ( e z , x ) < 0  then  x x
28:
           end if
29:
            R O ( : , i ) o r i g i n R X ( : , i ) x         
30:
        case “C”                        ▹ Collinear axes
31:
            o r i g i n P i
32:
           if  i = = 1  then
33:
                u z i
34:
               if  | dot ( u , e x ) | < ε  then  v e x
35:
               else if  | dot ( u , e y ) | < ε  then  v e y
36:
               else if  | dot ( u , e z ) | < ε  then  v e z
37:
               elseChoose a { e x , e y , e z } closest to u v cross ( u , a ) / cross ( u , a )
38:
               end if
39:
                R X ( : , 1 ) v
40:
           else
41:
                R X ( : , i ) R X ( : , i 1 )
42:
           end if
43:
            R O ( : , i ) o r i g i n             
44:
end for
45:
f r a m e O r i g i n s [ R O ( : , 1 ) , R O , P ( : , e n d ) ]
46:
f r a m e Z A x e s [ Z ( : , 1 ) , Z ]
47:
f r a m e X A x e s [ R X ( : , 1 ) , R X , R X ( : , e n d ) ]
48:
return  f r a m e O r i g i n s , f r a m e Z A x e s , f r a m e X A x e s
After the frames have been assigned, Algorithm 3 obtains the MDH parameters directly from the frame origin, z-axes, and x-axes, computed using Algorithm 2. Using simple vector operations and the definitions of the twist angle ( α ), link length (a), link offset (d), and joint angle ( θ ), the algorithm iteratively computes the full MDH table. Each parameter was obtained by projecting the difference between the consecutive frame origins onto the appropriate axis or by evaluating the relative orientation between the frame axes. Importantly, this algorithm does not require any prior knowledge of the robot geometry beyond the joint axis definitions, making it generalizable to any serial manipulator. The computed parameters can then be directly used for forward kinematics and further analyses, such as workspace computation.
Algorithm 3 Compute a MDH table from frame triplets
Require: 
F O R 3 × ( N + 1 ) (frameOrigins), F X R 3 × ( N + 1 ) (frameXAxes), F Z R 3 × ( N + 1 ) (frameZAxes)
Ensure: 
M D H R N × 4                        ▹ [ α i 1 , a i 1 , d i , θ i ] per row
  1:
N cols ( F O ) 1
  2:
M D H 0 N × 4
  3:
for  i = 1 to N do
  4:
     z i F Z ( : , i ) ;     z i + 1 F Z ( : , i + 1 )
  5:
     x i F X ( : , i ) ;     x i + 1 F X ( : , i + 1 )
  6:
     O i F O ( : , i ) ;     O i + 1 F O ( : , i + 1 )
  7:
     α i 1 atan2 dot ( x i , cross ( z i , z i + 1 ) ) , dot ( z i , z i + 1 )
  8:
     a i 1 x i ( O i + 1 O i )
  9:
     d i z i + 1 ( O i + 1 O i )
10:
     θ i atan2 dot ( z i + 1 , cross ( x i , x i + 1 ) ) , dot ( x i , x i + 1 )
11:
     M D H ( i , : ) [ α i 1 , a i 1 , d i , θ i ]
12:
end for
13:
return  M D H
Because the MDH parameters are computed, forward kinematics can be performed using (2) to determine the transformations from T 1 0 to T N N 1 .

2.4. Workspace Analysis and Volume Computation

To provide a comprehensive kinematic analysis, the toolbox integrates functionalities for evaluating a robot’s workspace, including the computation of performance indices and the estimation of its total volume. The workspace is defined as the set of all reachable end-effector positions.
The analysis begins with the generation of a point-cloud representation of the workspace using the Monte Carlo method. This approach, implemented in C++, involves generating a large number of random joint configurations using a pseudorandom generator std::mt19937. For each configuration, the joint angles were sampled from a uniform distribution within their predefined limits. The forward kinematics based on the MDH are then computed to determine the resulting Cartesian position of the end-effector. This process yields a dense point cloud that effectively represents the robot’s reachable volume.
At each point in this cloud, the robot’s geometric Jacobian matrix J ( q ) is calculated to evaluate the local performance characteristics. The Jacobian is computed column by column, where each column can be found using
J i ( q ) = z ^ i 0 × o e e 0 o i 0 ξ i z ^ i
where the vector z ^ i 0 is the direction vector of joint i with respect to the base frame and can be found using the forward kinematics as the third column of the transformation matrix T i 0 , and the vector o e e 0 is the position of the end-effector if it is defined. If not defined, this is taken as the position of the last frame o N . The vector o i 0 is the origin of frame i with respect to the base frame, and  ξ i is an operator defined as follows
ξ i = 1 , if joint i is revolute , 0 , if joint i is prismatic . .
Using the defined Jacobian, two of the kinematic performance metrics can be determined as follows:
  • The manipulability index ( ω ), based on Yoshikawa’s work, quantifies the robot’s ability to move its end-effector in any direction. It is calculated as the square root of the determinant of J J T .
    ω = det ( J ( q ) J ( q ) T )
    A higher value indicates greater ease of motion, whereas a value of zero corresponds to a singularity.
  • The dexterity index, which measures the isotropy of the manipulator’s motion, is calculated as the ratio of the minimum singular value ( σ min ) to the maximum singular value ( σ max ) of the Jacobian matrix. This is equivalent to the inverse of the Jacobian condition number.
    Dexterity = σ min σ max
    A value close to 1 indicates that the end-effector can move with equal ease in all directions, whereas a value close to 0 suggests that the robot is near a singularity.
  • These indices were visualized as a color map overlaid on the workspace point cloud, offering an intuitive understanding of the robot’s performance across different regions.
The novel contribution of this study is a numerical method for computing the workspace volume. Because the workspace of a serial manipulator is often non-convex with potential voids, a simple convex hull would yield an inaccurate overestimation. To address this, our method employs a slicing technique combined with alpha-shapes. The procedure was as follows:
  • Slicing: The 3D workspace point cloud is partitioned into a series of thin, parallel slices of a uniform thickness, Δ z , along the z-axis.
  • 2D Projection and Boundary Finding: For each slice, the points contained within it are projected onto the x–y plane. An alpha shape is then generated from the 2D point set. The alpha-shape algorithm creates a tight, potentially non-convex boundary that accurately envelops the points, effectively capturing the shape of a specific cross-section, including any internal holes. The alphaRadius is a critical parameter that controls the tightness of the boundary.
  • Area and Volume Summation: The area ( A i ) of the alpha shape for each slice i is calculated. The volume of the slice ( V i ) is then approximated as V i = A i · Δ z . The total workspace volume is estimated by summing the volumes of all slices as follows:
    V total = i = 1 N V i = i = 1 N A i · Δ z
    This method provides an accurate estimation of the true workspace volume, accommodating for the complex geometries characteristic of multi-link manipulators.
Using the MDH parameters obtained from Algorithm 3, the joint types for each joint and an optional joint angle or displacement parameter θ , forward kinematics can be performed, as presented in Algorithm 4.
Algorithm 4 ForwardKinematics (MDH, cumulative)
Require: 
M D H R N × 4 with columns ( α , a , d , θ 0 ) , θ R N , j o i n t T y p e s
Ensure: 
T l i s t = [ T 0 ( 1 ) , , T 0 ( N ) ] , each 4 × 4
  1:
T I 4
  2:
for  i = 1 to N do
  3:
     ( α , a , d , θ ) M D H ( i , : )
  4:
    if  j o i n t T y p e s [ i ] = R  then
  5:
         θ θ + θ i
  6:
    else
  7:
         d d + θ i
  8:
    end if
  9:
     c θ cos θ , s θ sin θ , c α cos α , s α sin α
10:
     A c θ s θ 0 a s θ c α c θ c α s α s α d s θ s α c θ s α c α c α d 0 0 0 1
11:
     T T · A
12:
    Append T to T l i s t
13:
end for
14:
return  T l i s t
The input θ 0 represents the angles at the zero position. Using the obtained forward kinematics algorithm, the Jacobian can be obtained using Algorithm 5.
Algorithm 5 Jacobian computation
Require: 
T l i s t = [ T 0 ( 1 ) , , T 0 ( N ) ] , j o i n t T y p e s
Ensure: 
J R 6 × N
  1:
p N translation of T 0 ( N )
  2:
for  i = 1 to N do
  3:
     z i third column of T 0 ( i ) ( 1 : 3 , 1 : 3 )
  4:
     o i translation of T 0 ( i )
  5:
    if  j o i n t T y p e s [ i ] = R  then
  6:
         w i z i ;    v i z i × ( p N o i )
  7:
    else
  8:
         w i 0 ;    v i z i
  9:
    end if
10:
    Set J ( 1 : 3 , i ) v i and J ( 4 : 6 , i ) w i
11:
end for
12:
return  J
The sampling of the workspace is performed as defined in Algorithm 6, where the input S represents the number of sampled joint configurations.
The computation time for Algorithm 6 greatly depends on the number of sampled joint configurations S and the number of joints in the robot N. For the fastest computation time, Algorithms 4–6 were implemented in C++ and compiled with MinGW-w64 into MEX files for use in MATLAB. Using the obtained end-effector positions and performance indices for each joint configuration, a visualization of the workspace can be obtained. Slices can also be viewed along the xy, yz, and xz planes by indexing the positions from the algorithm at an interval of the axis normal to the sliced plane.
Algorithm 6 Workspace sampling with MDH kinematics
Require: 
M D H R N × 4 , j o i n t T y p e s { R , P } N , S N , j o i n t L i m i t s R N × 2
Ensure: 
w s P o s i t i o n s R S × 3 , m a n i p u l a b i l i t y R S , d e x t e r i t y R S
  1:
Initialize RNG
  2:
for  i = 1 to S do
  3:
    Sample  θ R N with θ j U ( j o i n t L i m i t s j , l o w , j o i n t L i m i t s j , h i g h )
  4:
     T l i s t F o r w a r d K i n e m a t i c s ( M D H , θ , j o i n t T y p e s )
  5:
     p translation of last transform in T l i s t
  6:
     w s P o s i t i o n s [ i , : ] p
  7:
     J G e o m e t r i c J a c o b i a n ( T l i s t , j o i n t T y p e s )         ▹ J R 6 × N
  8:
     M J J
  9:
     m a n i p u l a b i l i t y [ i ] det ( M )
10:
     ( σ m a x σ m i n ) SVD ( J )
11:
     d e x t e r i t y [ i ] σ m i n / σ m a x , σ m a x 0   0 , otherwise
12:
end for
13:
return  ( w s P o s i t i o n s , m a n i p u l a b i l i t y , d e x t e r i t y )
The algorithm for computing the workspace volume is presented in Algorithm 7.
Algorithm 7 Workspace volume computation
Require: 
w s P o s i t i o n s R S × 3 , s l i c e T h i c k n e s s R , a l p h a R a d i u s R
Ensure: 
w s V o l u m e R
  1:
z w s P o s i t i o n s ( : , 3 )
  2:
z min min ( z ) ,    z max max ( z )
  3:
z s l i c e s [ z min : s l i c e T h i c k n e s s : z max ]
  4:
v o l u m e 0
  5:
for  i = 1 to l e n g t h ( z s l i c e s ) 1  do
  6:
     z l o w e r z s l i c e s ( i ) ,    z u p p e r z s l i c e s ( i + 1 )
  7:
     i d x ( z z l o w e r ) ( z < z u p p e r )
  8:
     s l i c e P o i n t s w s P o s i t i o n s ( i d x , 1 : 2 )
  9:
    if  s i z e ( s l i c e P o i n t s , 1 ) 3  then
10:
         s h p A l p h a S h a p e ( s l i c e P o i n t s , a l p h a R a d i u s )
11:
         a r e a A r e a ( s h p )
12:
         v o l u m e v o l u m e + a r e a · s l i c e T h i c k n e s s
13:
    end if
14:
end for
15:
w s V o l u m e v o l u m e
16:
return  w s V o l u m e
The proposed algorithms were directly implemented in the toolbox for workspace analysis and workspace volume computation.

2.5. Linking the Toolbox with RoboDK

RoboDK is a widely used offline robotic programming and simulation software that provides tools for path planning, calibration, and robot programming across a broad range of industrial applications. One of its main advantages is the extensive built-in library of commercial robot models, which allows users to readily import manipulators from multiple manufacturers without requiring detailed kinematic specifications of the manipulators. This feature makes RoboDK an effective source for benchmarking and validating kinematic algorithms. Moreover, the availability of the MATLAB API enables seamless integration between RoboDK and external computational toolboxes, facilitating direct data exchange and joint analyses. In the context of the present work, this integration was leveraged to import robot models into the developed MATLAB toolbox, ensuring reproducibility, reducing manual input, and allowing parameter extraction and workspace analysis to be carried out consistently across different robotic platforms.
To import a robot from the RoboDK library, the user first opens the RoboDK environment and loads the desired robot model into their workspace. The joint configurations of the selected robot were then accessed via the RoboDK MATLAB API, which enabled direct programmatic interaction with the simulation environment. These joint poses were extracted and used within the developed toolbox to define the corresponding joint positions and direction vectors, thereby ensuring consistency between the RoboDK model and MATLAB-based kinematic representation. Importantly, all these steps can be performed using the free version of RoboDK. The licensed version additionally provides access to both classical and MDH parameters of the robot, which were used in this study to validate the results of the toolbox computations.

3. Results

The proposed methodology was verified using a library available in RoboDK. From this library, four different types of industrial robots were selected to ensure that all geometric conditions existed. The results were obtained for the frame placement and DH parameters, workspace analysis, and volume computation for each robot. Furthermore, to verify the results of the frame placement and DH parameters, the available manufacturer data were used. Where not available, the parameters in RoboDK were used for comparison. Finally, for the workspace volume, because manufacturer data were not available and no sources were found by the authors, analytically computable robots were created as a reference to compare the proposed methodology.

3.1. Overview of the Kinematics Toolbox

An overview of the toolbox is provided below. A detailed description of how to use the toolbox is available on Zenodo, which can be found at [28]. The toolbox consists of the following three main sections: the joint definition, DH parameter computation, and visualization sections. The visualization section consists of the following three main tabs: the Kinematics tab, the Workspace tab, and the Volume Computation tab. The toolbox with the three different tabs is presented in Figure 7.
The input panel of the interface is designated for the joint definitions, presented in Figure 7a. The user first specifies the number of joints. Once defined, a joint can be selected from the tree selection panel, and its parameters, including the joint type, limits, position, and direction vector, are entered. After completing the input, the Save Data button stores the parameters of the selected joint, which are then visualized in the Kinematics tab of the GUI, shown in Figure 7b. Following the definition of all joints, the user proceeds to the DH parameter computation section at the bottom-left of the input panel, where pressing the Compute button generates the DH parameters. By default, the MDH convention is displayed, but the user can toggle between the MDH and classical DH parameters using the adjacent checkbox.
In the Kinematics tab the robot structure can be visualized with options to adjust the scales of the joints and axes. Once the DH parameters are computed, individual joints can be highlighted to examine the frame placement. An additional feature, the Jog button, opens a separate window that allows the interactive jogging of the defined robot within the plot environment.
The Workspace tab in Figure 7c provides tools for specifying the number of randomly generated samples and slicing the workspace along the xy, yz, and xz planes. The slice positions can be adjusted using a slider, enabling the examination of different cross-sections. The user can also toggle between the manipulability and dexterity indices. A slice thickness field is available to adjust the thickness of the visualized slice, which improves the visualization quality and enables accurate volume computation.
The Volume computation tab includes the functionality for alpha-shape parameter adjustment, as shown in Figure 7d. The left plot displays the center slice, while the right plot shows a movable slice controlled by a position slider, allowing the user to observe the alpha shapes across different sections. Once the desired alpha shapes are achieved, the Compute Volume button calculates and outputs the workspace volume.
Furthermore, the interface includes an Export Figure option in the bottom-right corner, which enables the user to export the currently displayed figure from any tab using a specified file name. Furthermore, Figure 7e includes the active RoboDK window which is used to import the robot in the interface.
The developed toolbox was made available as executable MATLAB P-code files, allowing researchers and educators to use the software while preventing the direct modification of the source code. The toolbox is distributed under the CC BY-NC-ND 4.0 license and is accessible via the project’s GitHub repository [28]. This ensures the reproducibility of the results while reserving future development opportunities for the authors.

3.2. Frame Placement and DH Parameters

The ABB IRB 1100-4/0.58 (ABB Group, Zurich, Switzerland), which will be referred to as IRB 1100 from here on for simplicity, contains intersecting, parallel, skew, intersecting, and intersecting joint axes consecutively. The robot is saved in the ABB-IRB1100.mat file for verification. The results of the frame placement are presented in Figure 8. The extraction of the MDH parameters was performed using the proposed methodology, and the results are presented in Table 2.
These results show that the toolbox can successfully compute the MDH parameters. The differences between the RoboDK reference and toolbox results were due to the arbitrary direction of the z-axis. This can be inferred by looking at the last row, where the toolbox took the z-axis in the negative direction of the RoboDK result. Furthermore, the positive or negative direction of the x-axis is arbitrary, as can be seen in rows 5 and 6, where a 180 rotation only switches the direction of the x-axis. Although the computed MDH parameters are correct, their validity is questionable because both the baseline and resulting MDH parameters, which are computed through the joint poses, are derived from RoboDK, creating a dependency on a single platform. This limitation is addressed in the subsequent robot results.
To address the previously noted limitation of relying on a single platform for comparing the results, the UR10e robot was selected. For this robot, the manufacturer provided data for the classical DH parameters, enabling verification by comparing the parameters obtained from RoboDK with the independently available manufacturer specifications. The manufacturer classical, computed classical, and MDH parameters are presented in Table 3. Manufacturer data were obtained from UR support articles [29].
The MDH frame placement results for the UR10e robot are shown in Figure 9.

3.3. Workspace Analysis

Workspace analysis for the ABB IRB 1100-4/0.58 was performed by sampling 1,000,000 random joint configurations within the joint limits and performing forward kinematics to obtain the end-effector pose. The Yoshikawa manipulability index over the full workspace is shown in Figure 10.
Because the toolbox also allows the dexterity analysis to be viewed, the EPSON T3-401S (EPSON, Nagano, Japan) was sampled at 500,000 random joint configurations within the joint limits, and the end-effector’s position was obtained by performing forward kinematics. The dexterity index over the full workspace is shown in Figure 11.

3.4. Volume Computation

To verify the results of the volume computation, some benchmark robots were introduced, whose volumes were easily analytically computable. First, a robot with a spherical workspace and an empty sphere inside is introduced. Second, a robot that draws a slot shape in a plane and can translate along the axis normal to that plane is introduced. Finally, the area of the EPSON T3-401S robot along its slice was computed using Autodesk Fusion, after which it was multiplied by the distance the prismatic joint could move to obtain its volume. The MDH parameters of the defined robots are listed in Table 4. The joint limits for all revolute joints are [ 180 , 180 ] and for prismatic joints, [ 1 , 1 ] m .
To analytically obtain the area of the slot robot, the radius r was set to 2 m and the length L to 6 m. The displacement of the prismatic joint h is 2 m so the volume can be computed as
V s l o t = h 2 r ( L 2 r ) + π r 2 = 41.1327 m 3 .
By sampling 1 million joint configurations using a slice thickness of 0.025 m and an alpha value of (which results in a convex hull), the workspace volume was computed by the proposed algorithm as 39.6795 m 3 . This yielded a percentage error of 3.5331 % . Tuning the alpha value is an iterative process based on trial and error. By examining the sliced workspace in the workspace tab, users can visually determine the overall shape of the reachable region. For example, in the case of the slot robot, each slice exhibits a convex hull without internal voids, allowing an alpha value of to be selected. This corresponding alpha shape can then be visualized in the volume computation tab by moving along the z-axis using the slider. Conversely, for robots whose workspaces contain internal holes, an appropriate finite alpha value must be chosen to ensure that these cavities are accurately represented rather than filled.
Next, a spherical robot is considered. This robot has an outer ( r o ) and inner ( r i ) radius of 3 m and 1 m, respectively. Thus its volume can be easily calculated using
V s p h e r e = 4 3 π r o 3 r i 3 = 108.9085 m 3 .
By sampling 1 million joint configurations, using a slice thickness of 0.02 m and an alpha value of 0.35 , the workspace volume was computed by the toolbox as 108.3069 m 3 , which resulted in a percentage error of 0.5524 % .
Finally, the EPSON T3-401S was considered. The area drawn by this robot is obtained by drawing a slice of the robot along the prismatic joint using Fusion and is found to be 0.39915532 m 2 . Hence, the volume can be computed by multiplying the area by the maximum displacement of the prismatic joint, which is 0.15 m. The volume is thus approximated as 0.059873 m 3 . The toolbox was configured to sample 500,000 joint configurations, with a slice thickness of 0.004 m and an alpha value of 0.02 . Running the volume computation algorithm, a volume of 0.058545 m 3 is obtained, which has a 2.2180 % error compared to the approximated value.
Because the benchmark robots obtained percentage errors of less than 4%, it is assumed that when the parameters are tuned correctly in the toolbox, a workspace volume with a low error is computed. Tuning these parameters requires manually examining how the alpha-shape algorithm performs in computing the areas of a slice. This is easily performed using the visual slicing available in the toolbox.
The combined results of the volume computation algorithm for the benchmark and all other robots, with the corresponding parameters, are listed in Table 5.

3.5. Comparison with an Existing Algorithm

Verifying the results of the proposed methodology against existing studies is essential to ensure reliability. The most recent relevant algorithm is that of Sung and Choi [14]. Two robot types presented in their study are also employed in the methodology proposed in this paper. The parameters of the SCARA robot are listed in Table 6.
The results obtained from the proposed methodology and those reported in the compared study are presented in Table 7.
The results for the SCARA-type robot indicate that only the parameters of the first joint differ. This discrepancy arises from the toolbox assigning the base frame to the coordinate frame of joint 1, whereas the comparative study employs an arbitrary base frame.
Next, the results for the Kuka iiwa 14 R820 robot are presented in Table 8, for which the input parameters can be found in [14].
These results demonstrate that the proposed methodology yields identical outcomes to the comparative work, thereby confirming its correctness. However, the present approach exhibits a more consistent handling of the θ i parameters, all of which are equal to zero. Geometrically, this implies that the x-axes maintain a uniform directional orientation in the zero position, whereas the comparative method includes instances where certain x-axes are arbitrarily reversed. Additionally, the observed difference in the parameter d 7 arises from the fact that the comparative study considers the position of the last joint without accounting for the media flange, while the proposed method incorporates the flange height of 0.035 m into the calculation.

4. Discussion

The proposed methodology and toolbox enable the automatic determination of Denavit–Hartenberg parameters directly from the zero configuration of any serial manipulator. Validation across different robot types, including industrial manipulators (ABB IRB 1100, UR10e, KUKA iiwa 7, and EPSON T3-401S) and custom benchmark models, demonstrated that the approach can reliably compute both the classical and MDH parameters without manual intervention. The consistency of the computed parameters with the manufacturer data for the UR10e confirmed the correctness of the algorithm, whereas the results obtained for the ABB IRB 1100 and Epson T3-401S highlighted the general applicability of the toolbox to robots with diverse geometric configurations. Furthermore, the proposed methodology is verified by a comparative study for further validation using a SCARA-type and 7-degree-of-freedom robot.
Beyond parameter extraction, the integration of the workspace and performance analysis provides additional insight into manipulator capabilities. The manipulability and dexterity indices capture regions of high and low accessibility within the workspace, which can support design evaluation and task planning. The proposed slicing-and-alpha-shape volume estimation method further extends the analysis by quantifying the workspace volume with errors below 4% for analytically verifiable benchmarks. This indicates that the approach can achieve sufficient accuracy for comparative studies of robot reachability, although parameter tuning (slice thickness and alpha radius) remains necessary for optimal performance.
Despite these strengths, several limitations exist. First, the current validation relied in part on RoboDK models, which introduced a dependency on a single simulation environment. Although this allowed for broad testing, experimental validation using measurement-based data would further strengthen the conclusions. Second, the accuracy of the workspace volume estimation is sensitive to the choice of alpha-shape parameters, which currently require manual adjustment by the user. Automating this selection process would enhance robustness and reproducibility. Third, the methodology assumes accurate knowledge of the joint axes and positions; in practice, extracting this information from CAD models or sensor data may introduce additional uncertainty that has not yet been addressed by the toolbox. Finally, the proposed methodology is only valid for serial robotic structures, and it is not yet generalized to parallel and hybrid structures.
Compared to existing approaches for DH parameter identification, which often require manual frame assignment or specialized algebraic formalisms, the proposed methodology offers a more universal and user-accessible solution. By embedding the algorithms within a MATLAB graphical interface, the toolbox reduces the barrier to adoption in both research and education. This distinguishes it from earlier automatic algorithms, which remain primarily theoretical or require expert-level implementation efforts.
Several promising directions for future research have been identified. First, extending the proposed methodology to parallel and hybrid mechanisms would significantly broaden its applicability to modern robotic systems. Second, automating the selection of alpha-shape parameters would reduce user intervention and improve the robustness of the workspace volume estimation. Third, integrating experimental data acquisition methods, such as the vision- or sensor-based identification of joint axes, would enable the direct application of the framework to physical robots rather than being limited to simulation environments. In addition, implementing forward dynamics would allow the estimation of joint forces and torques, thereby facilitating dynamic analysis. Finally, coupling automatic kinematic model generation with dynamic model derivation would open pathways toward unified model-based control and simulation within the same toolbox.
In summary, the discussion highlights that although the proposed approach provides a reproducible and systematic solution for DH parameter extraction and workspace analysis for serial robots, future developments are necessary to fully address experimental robustness, the automation of alpha-shape parameter tuning, and generalization to broader classes of robotic systems.

5. Conclusions

This study presents a universal methodology and MATLAB-based toolbox for the automatic determination of the Denavit–Hartenberg parameters of serial manipulators. By classifying the joint axis relationships and systematically assigning frames, the toolbox computes both classical and MDH parameters without manual intervention. Integrated features for workspace analysis, manipulability and dexterity evaluation, and volume estimation extend their utility beyond parameter extraction. Validation on industrial and benchmark robots confirmed the accuracy of the approach, with workspace volume errors below 4%. The proposed framework reduces the reliance on manufacturer data, increases reproducibility, and provides an accessible platform for research, education, and design. Future extensions will address automated parameter tuning, experimental validation, and the inclusion of parallel and hybrid mechanisms in the model.

Author Contributions

Conceptualization, H.K. and Z.B.; methodology, H.K. and Z.B.; software, H.K.; validation, H.K. and Z.B.; formal analysis, Z.B.; investigation, Z.B.; resources, H.K.; data curation, Z.B.; writing—original draft preparation, H.K.; writing—review and editing, Z.B.; visualization, H.K.; supervision, Z.B.; project administration, Z.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original data presented in the study are openly available in Zenodo at 10.5281/zenodo.17248254.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Proof of Theorem 1

Proof of Theorem 1.
T i i 1 = R i i 1 o i i 1 0 0 0 1
where
R i i 1 = Rot x ^ , α Rot z ^ , θ
= cos ( θ ) sin ( θ ) 0 sin ( θ ) cos ( α ) cos ( θ ) cos ( α ) sin ( α ) sin ( θ ) sin ( α ) cos ( θ ) sin ( α ) cos ( α )
An arbitrary rotation matrix from frame i 1 to frame i can be written as in (A4).
R i i 1 = r 11 r 12 r 13 r 21 r 22 r 23 r 31 r 32 r 33
Assumption (1) states that the dot product of the two unit vectors must be equal to 0.
z ^ i i 1 · x ^ i 1 i 1 = 0 r 13 r 23 r 33 1 0 0 = 0 r 13 = 0
Both vectors are written with respect to frame i 1 , where the element z i 1 i is the third column of the rotation matrix. Because the rotation matrix is an orthonormal matrix, the following identities can be written:
r 11 2 + r 12 2 = 1 r 23 2 + r 33 2 = 1
This shows that the angles θ and α are unique since
( sin θ , cos θ ) = ( r 12 , r 11 ) ( sin α , cos α ) = ( r 23 , r 33 )
Using the properties of an orthonormal matrix on the other rows and columns of (A4), elements r 21 , r 31 , r 22 , and r 32 can be shown to have the form given in (A3).
Assumption (2) states that z i and x i 1 must be intersecting. Thus the transformation between the origins of joint i 1 and i can be written as a linear combination in terms of the axis z i and x i 1 as follows:
o i i 1 = o i i 1 + x ^ i 1 i 1 a + z ^ i i 1 d
o i i 1 = 0 0 0 + 1 0 0 a + 0 sin α cos α d = a d sin α d cos α
This demonstrates that, under the given assumption, two parameters are sufficient because (A8) is in the form of (2). □

References

  1. Denavit, J.; Hartenberg, R.S. A Kinematic Notation for Lower-Pair Mechanisms Based on Matrices. J. Appl. Mech. 1955, 22, 215–221. [Google Scholar] [CrossRef]
  2. Paul, R.P. Robot Manipulators: Mathematics, Programming, and Control, 9 printing ed.; The MIT Press Series in Artificial Intelligence; MIT Press: Cambridge, MA, USA, 1992. [Google Scholar]
  3. Spong, M.W.; Vidyasagar, M. Robot Dynamics and Control; John Wiley & Sons: Hoboken, NJ, USA, 2004. [Google Scholar]
  4. Siciliano, B. (Ed.) Robotics: Modelling, Planning and Control; Advanced Textbooks in Control and Signal Processing; Springer: London, UK, 2009. [Google Scholar]
  5. Craig, J.J. Introduction to Robotics: Mechanics and Control, 4th ed.; Pearson: New York, NY, USA, 2018. [Google Scholar]
  6. Kucuk, S.; Bingul, Z. Robot Kinematics: Forward and Inverse Kinematics; INTECH Open Access Publisher: London, UK, 2006. [Google Scholar]
  7. Siciliano, B. Springer Handbook of Robotics, 2nd ed.; Springer Handbooks Serise; Springer International Publishing AG: Cham, Switzerland, 2016. [Google Scholar]
  8. Lynch, K.; Park, F.C. Modern Robotics: Mechanics, Planning, and Control; Cambridge University Press: Cambridge, UK, 2017. [Google Scholar]
  9. Faria, C.; Vilaca, J.L.; Monteiro, S.; Erlhagen, W.; Bicho, E. Automatic Denavit-Hartenberg Parameter Identification for Serial Manipulators. In Proceedings of the IECON 2019—45th Annual Conference of the IEEE Industrial Electronics Society, Lisbon, Portugal, 14–17 October 2019; pp. 610–617. [Google Scholar] [CrossRef]
  10. A Chennakesava Reddy. Difference Between Denavit-Hartenberg (D-H) Classical and Modified Conventions for Forward Kinematics of Robots with Case Study. In Proceedings of the International Conference on Advanced Materials and manufacturing Technologies, Guangzhou, China, 18–19 January 2014. [CrossRef]
  11. Wang, H.; Qi, H.; Xu, M.; Tang, Y.; Yao, J.; Yan, X.; Li, M. Research on the Relationship between Classic Denavit-Hartenberg and Modified Denavit-Hartenberg. In Proceedings of the 2014 Seventh International Symposium on Computational Intelligence and Design, Hangzhou, China, 13–14 December 2014; pp. 26–29. [Google Scholar] [CrossRef]
  12. Corke, P. A Simple and Systematic Approach to Assigning Denavit–Hartenberg Parameters. IEEE Trans. Robot. 2007, 23, 590–594. [Google Scholar] [CrossRef]
  13. Rettig, O.; Hinderer, F.; Strand, M. Application of Conformal Geometric Algebra in Robotics: DH-Parameters Extraction from Joint Axes Poses. In Intelligent Autonomous Systems 18; Springer Nature: Cham, Switzerland, 2024; Volume 794, pp. 217–232. [Google Scholar] [CrossRef]
  14. Sung, M.; Choi, Y. Algorithmic Modified Denavit–Hartenberg Modeling for Robotic Manipulators Using Line Geometry. Appl. Sci. 2025, 15, 4999. [Google Scholar] [CrossRef]
  15. Zacharias, F.; Borst, C.; Hirzinger, G. Capturing robot workspace structure: Representing robot capabilities. In Proceedings of the 2007 IEEE/RSJ International Conference on Intelligent Robots and Systems, San Diego, CA, USA, 29 October–2 November 2007; pp. 3229–3236. [Google Scholar] [CrossRef]
  16. Cao, Y.; Lu, K.; Li, X.; Zang, Y. Accurate Numerical Methods for Computing 2D and 3D Robot Workspace. Int. J. Adv. Robot. Syst. 2011, 8, 76. [Google Scholar] [CrossRef]
  17. Vijaykumar, R.; Waldron, K.; Tsai, M. Geometric Optimization of Serial Chain Manipulator Structures for Working Volume and Dexterity. Int. J. Robot. Res. 1986, 5, 91–103. [Google Scholar] [CrossRef]
  18. Gosselin, C.M. The optimum design of robotic manipulators using dexterity indices. Robot. Auton. Syst. 1992, 9, 213–226. [Google Scholar] [CrossRef]
  19. Kucuk, S.; Bingul, Z. The inverse kinematics solutions of industrial robot manipulators. In Proceedings of the IEEE International Conference on Mechatronics, 2004—ICM ’04, Istanbul, Turkey, 3–5 June 2004; pp. 274–279. [Google Scholar] [CrossRef]
  20. Kucuk, S.; Bingul, Z. Inverse kinematics solutions for industrial robot manipulators with offset wrists. Appl. Math. Model. 2014, 38, 1983–1999. [Google Scholar] [CrossRef]
  21. Zhou, D.; Xie, M.; Xuan, P.; Jia, R. A teaching method for the theory and application of robot kinematics based on MATLAB and V-REP. Comput. Appl. Eng. Educ. 2020, 28, 239–253. [Google Scholar] [CrossRef]
  22. Niu, Q.; Zhao, J.; Liang, L.; Xing, J.; Li, H.; Wang, Z. A general framework for the analytical inverse kinematics solution of industrial robots. Proc. Inst. Mech. Eng. Part C J. Mech. Eng. Sci. 2025, 239, 4499–4511. [Google Scholar] [CrossRef]
  23. Kucuk, S.; Bingul, Z. An off-line robot simulation toolbox. Comput. Appl. Eng. Educ. 2010, 18, 41–52. [Google Scholar] [CrossRef]
  24. Ozakyol, H.; Karaman, C.; Bingul, Z. Advanced robotics analysis toolbox for kinematic and dynamic design and analysis of high-DOF redundant serial manipulators. Comput. Appl. Eng. Educ. 2019, 27, 1429–1452. [Google Scholar] [CrossRef]
  25. Corke, P.I. Robotics, Vision and Control: Fundamental Algorithms in MATLAB, 2nd revised, extended and updated ed.; Number 118 in Springer Tracts in Advanced Robotics; Springer: Cham, Switzerland, 2017. [Google Scholar]
  26. Rajeevlochana, C.G.; Saha, S.; Kumar, S. Automatic Extraction of DH Parameters of Serial Manipulators using Line Geometry. In Proceedings of the 2nd Joint International Conference on Multibody System Dynamics, Stuttgart, Germany, 29 May–1 June 2012. [Google Scholar]
  27. Žlajpah, L. Simulation in robotics. Math. Comput. Simul. 2008, 79, 879–897. [Google Scholar] [CrossRef]
  28. Karhan, H.; Bingül, Z. Automatic Determination of Denavit–Hartenberg Parameters for Serial Robots (Kinematics Toolbox for MATLAB). Dataset Zenodo 2025. [Google Scholar] [CrossRef]
  29. Universal Robotics. DH Parameters for Calculations of Kinematics and Dynamics. Available online: https://www.universal-robots.com/articles/ur/application-installation/dh-parameters-for-calculations-of-kinematics-and-dynamics/ (accessed on 1 September 2025).
Figure 1. Comparison between DH conventions. (a) Classical DH convention. (b) MDH convention.
Figure 1. Comparison between DH conventions. (a) Classical DH convention. (b) MDH convention.
Machines 13 00944 g001
Figure 2. Example of defining the position and direction vector of a joint.
Figure 2. Example of defining the position and direction vector of a joint.
Machines 13 00944 g002
Figure 3. Frame placement for intersecting axes.
Figure 3. Frame placement for intersecting axes.
Machines 13 00944 g003
Figure 4. Frame placement for skew axes.
Figure 4. Frame placement for skew axes.
Machines 13 00944 g004
Figure 5. Frame placement for parallel axes.
Figure 5. Frame placement for parallel axes.
Machines 13 00944 g005
Figure 6. Frame placement for colinear axes.
Figure 6. Frame placement for colinear axes.
Machines 13 00944 g006
Figure 7. Overview of the developed toolbox. (a) Input panel. (b) Kinematics tab. (c) Workspace tab. (d) Volume computation tab. (e) RoboDK window.
Figure 7. Overview of the developed toolbox. (a) Input panel. (b) Kinematics tab. (c) Workspace tab. (d) Volume computation tab. (e) RoboDK window.
Machines 13 00944 g007
Figure 8. MDH frame placement of the IRB 1100. (a) Full robot and frames. (b) Base and first joint frames. (c) Second joint frame. (d) Third joint frame. (e) Fourth joint frame. (f) Fifth joint frame. (g) Sixth joint frame.
Figure 8. MDH frame placement of the IRB 1100. (a) Full robot and frames. (b) Base and first joint frames. (c) Second joint frame. (d) Third joint frame. (e) Fourth joint frame. (f) Fifth joint frame. (g) Sixth joint frame.
Machines 13 00944 g008
Figure 9. MDH frame placement of the UR10e Robot. (a) Complete robot and frame placements. (b) Base frame and first frame placement. (c) Second frame placement. (d) Third frame placement. (e) Fourth frame placement. (f) Fifth frame placement. (g) Sixth frame placement.
Figure 9. MDH frame placement of the UR10e Robot. (a) Complete robot and frame placements. (b) Base frame and first frame placement. (c) Second frame placement. (d) Third frame placement. (e) Fourth frame placement. (f) Fifth frame placement. (g) Sixth frame placement.
Machines 13 00944 g009
Figure 10. Workspace analysis of the IRB 1100. (a) Slice of the xy plane. (b) Slice of the xz plane.
Figure 10. Workspace analysis of the IRB 1100. (a) Slice of the xy plane. (b) Slice of the xz plane.
Machines 13 00944 g010
Figure 11. Workspace dexterity analysis of the EPSON T3-401S. (a) Three-dimensional overview. (b) Slice of the xz plane.
Figure 11. Workspace dexterity analysis of the EPSON T3-401S. (a) Three-dimensional overview. (b) Slice of the xz plane.
Machines 13 00944 g011
Table 1. Classification of joint axis relationships based on conditions C1–C3.
Table 1. Classification of joint axis relationships based on conditions C1–C3.
Geometric RelationshipC1C2C3
IntersectingFalseTrue
SkewFalseFalse
ParallelTrueFalse
CollinearTrueTrue
Table 2. IRB 1100 DH parameters: RoboDK vs. Toolbox MDH.
Table 2. IRB 1100 DH parameters: RoboDK vs. Toolbox MDH.
JointMDH (RoboDK)MDH (Toolbox)
α i 1 [°] a i 1 [m] d i [m] θ i [°] α i 1 [°] a i 1 [m] d i [m] θ i [°]
100.00000.32700000.32700
2−900.00000.0000−90−9000−90
300.28000.0000000.280000
4−900.01000.30000−900.01000.30000
5900.00000.000009000180
6−900.00000.06401809000.06400
Table 3. UR10e DH parameters: manufacturer vs. toolbox classical and RoboDK MDH.
Table 3. UR10e DH parameters: manufacturer vs. toolbox classical and RoboDK MDH.
JointClassical (Manufacturer)Classical (Toolbox)
α i [°] a i [m] d i [m] θ i [°] α i [°] a i [m] d i [m] θ i [°]
1900.00000.18070900.00000.18070
20−0.61270.0000000.61260.0000180
30−0.57160.0000000.57130.00000
4900.00000.17420900.00000.1742−180
5−900.00000.11990−900.00000.11980
600.00000.1166000.00000.11660
JointMDH (RoboDK)MDH (Toolbox)
α i 1 [°] a i 1 [m] d i [m] θ i [°] α i 1 [°] a i 1 [m] d i [m] θ i [°]
100.00000.1807000.00000.18070
2900.00000.0000180900.00000.0000180
300.61260.0000000.61260.00000
400.57130.1742000.57130.1742−180
5−900.00000.11980900.00000.11980
6900.00000.1166180−900.00000.11660
Table 4. MDH parameters: slot robot and sphere robot.
Table 4. MDH parameters: slot robot and sphere robot.
JointSlot RobotSphere Robot
α i 1 [°] a i 1 [m] d i [m] θ i [°] α i 1 [°] a i 1 [m] d i [m] θ i [°]
100.00000.0000000.00001.00000
2900.00000.00000900.00000.000090
301.00000.0000002.00000.00000
401.00000.0000001.00000.00000
Table 5. Workspace volume estimation results for different robots.
Table 5. Workspace volume estimation results for different robots.
Robot TypeNumber of
Samples
Slice
Thickness [m]
α
(Alpha-Shape)
Comp.
Volume [ m 3 ]
Real
Volume [ m 3 ]
Error
[ % ]
Slot robot1000 k0.02541.132739.67953.5331
Sphere robot1000 k0.0200.35108.3069108.90850.5524
Epson T3-401s500 k0.0040.020.0585450.0598732.2180
ABB IRB 14001000 k0.00750.0651.0186
UR10e1000 k0.050.0510.1194
KUKA iiwa 75000 k0.010.13.0892
Table 6. Definitions of the joint position and direction vectors of the SCARA robot [14].
Table 6. Definitions of the joint position and direction vectors of the SCARA robot [14].
i01234
   p i 0 0 0 0 0 0.375 0 0.5 0.4 0.5 0.5 0.4 0.5 0.5 0.15
   z ^ i 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
Table 7. SCARA Robot MDH parameter comparison between this paper and [14].
Table 7. SCARA Robot MDH parameter comparison between this paper and [14].
JointMDH (Toolbox)MDH [14]
α i 1 [°] a i 1 [m] d i [m] θ i [°] α i 1 [°] a i 1 [m] d i [m] θ i [°]
100.00.0000000.37590
200.50.025−9000.50.025−90
300.50.000000.500
41800.00.250018000.250
Table 8. KUKA iiwa 14 R820 MDH parameter comparison between the proposed methodology and [14].
Table 8. KUKA iiwa 14 R820 MDH parameter comparison between the proposed methodology and [14].
JointMDH (Toolbox)MDH [14]
α i 1 [°] a i 1 [m] d i [m] θ i [°] α i 1 [°] a i 1 [m] d i [m] θ i [°]
1000.36000000.3600180
2−9000.000009000180
39000.420009000.42000
4−9000.000009000180
59000.400009000.40000
6−9000.000009000180
79000.126009000.08100
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Karhan, H.; Bingül, Z. Automatic Determination of the Denavit–Hartenberg Parameters for the Forward Kinematics of All Serial Robots: Novel Kinematics Toolbox. Machines 2025, 13, 944. https://doi.org/10.3390/machines13100944

AMA Style

Karhan H, Bingül Z. Automatic Determination of the Denavit–Hartenberg Parameters for the Forward Kinematics of All Serial Robots: Novel Kinematics Toolbox. Machines. 2025; 13(10):944. https://doi.org/10.3390/machines13100944

Chicago/Turabian Style

Karhan, Haydar, and Zafer Bingül. 2025. "Automatic Determination of the Denavit–Hartenberg Parameters for the Forward Kinematics of All Serial Robots: Novel Kinematics Toolbox" Machines 13, no. 10: 944. https://doi.org/10.3390/machines13100944

APA Style

Karhan, H., & Bingül, Z. (2025). Automatic Determination of the Denavit–Hartenberg Parameters for the Forward Kinematics of All Serial Robots: Novel Kinematics Toolbox. Machines, 13(10), 944. https://doi.org/10.3390/machines13100944

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop