Next Article in Journal
A Review on Design, Modeling and Control Technology of Cable-Driven Parallel Robots
Previous Article in Journal
Robot Learning from Teleoperated Demonstrations: A Pilot Study Towards Automating Mastic Deposition in Construction Sites
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Chain Rule-Based Generalized Framework for Efficient Dynamic Analysis of Complex Robotic Systems

by
Takashi Kusaka
*,† and
Takayuki Tanaka
Faculty of Information Science and Technology, Hokkaido University, Sapporo 060-0814, Japan
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Robotics 2025, 14(9), 115; https://doi.org/10.3390/robotics14090115
Submission received: 1 July 2025 / Revised: 18 August 2025 / Accepted: 22 August 2025 / Published: 25 August 2025
(This article belongs to the Section AI in Robotics)

Abstract

System representation via computational graphs has become a cornerstone of modern machine learning, underpinning the gradient-based training of complex models. We have previously introduced the Partial Lagrangian Method—a divide-and-conquer approach that decomposes the Lagrangian into link-wise components—to derive and evaluate the equations of motion for robot systems with dynamically changing structures. That method leverages the symbolic expressiveness of computational graphs with automatic differentiation to streamline dynamic analysis. In this paper, we advance this framework by establishing a principled way to encode time-dependent differential equations as computational graphs. Our approach, which augments the state vector and applies the chain rule, constructs fully time-independent graphs directly from the Lagrangian, eliminating the erroneous time-derivative embeddings that previously required manual correction. Because our transformation is derived from first principles, it guarantees graph correctness and generalizes to any system governed by variational dynamics. We validate the method on a simple serial-link robotic arm, showing that it faithfully reproduces the standard equations of motion without graph failure. Furthermore, by compactly representing state variables, the resulting computational graph achieves a seven-fold reduction in evaluation time compared to our prior implementation. The proposed framework thus offers a more intuitive, scalable, and efficient design and analysis of complex dynamic systems.

1. Introduction

Computational graphs are powerful tools, especially in machine learning, for representing complex models and their input–output relationships. They enable efficient gradient computation and capture intricate dependencies among variables [1,2,3]. In robotics, the use of computational graphs is rapidly expanding, with applications in control system design [4,5,6] and constraint management via graph structures [7,8]. Furthermore, efficiently handling graph structures is a crucial technology in robotics—such as in UAV (Unmanned Aerial Vehicle) and MSV (Marine Surface Vehicle) path planning—and graph-based theoretical designs enable swarm control and collision avoidance among individual robots [9,10]. This study applies computational graphs to differential equations with time-dependent states with the aim of leveraging the powerful representational capacity of automatic differentiation inherent in computational graphs for analyzing the equations of motion of robotic systems.
When considering the implementation of dynamics in a robotic system, the Featherstone’s algorithms based on the RNEA (Recursive Newton–Euler Algorithm) and ABA (Articulated-Body Algorithm) are known to be extremely efficient. If the system’s structure is fully specified in advance, these methods represent the optimal choice for dynamics computation in robotics. However, we focus on scenarios where the robot’s configuration can change flexibly and its internal structure is not fixed. To address this, we have developed an approach that dynamically constructs the equations of motion using computational graphs. Our method builds on the analytically derived Lagrangian equations of motion, allowing rapid extension or modification of the system’s dynamics whenever its configuration evolves [11,12,13].
We have investigated the potential of computational graphs for representing robotic system dynamics, as their ability to map one-to-one with symbolic expressions and support automatic differentiation makes them highly capable of representing differential equations. Our proposed Partial Lagrangian Method, founded on a divide-and-conquer paradigm, lets us design and analyze each subgraph to understand force transmission [11]. It also allows us to model system branching and dynamic structural changes by connecting or separating those subgraphs. From a graph-theoretic standpoint, this approach opens up new avenues of analysis that were not apparent in traditional differential-equation formulations. By embedding the Lagrangian into the graph and using automatic differentiation, we automatically derived equations of motion, enabling both the design and analysis of robotic systems. Conventional graph-based representations of differential equations, however, struggle with time-dependent states, hindering accurate modeling and analysis.
Traditionally, computational graphs have been used to analyze various physical phenomena. For example, their use in gravitational-wave analysis has been reported [14] as well as in computational fluid dynamics [15]. With rapid advances in AI, computational-graph frameworks and their underlying automatic-differentiation techniques have matured, leading to the widespread adoption across diverse fields [16,17,18]. Despite these applications, the field of robotics has yet to establish a scheme for applying computational graphs to the design and analysis of robotic systems. Furthermore, directly applying traditional robotics approaches to computational graphs can introduce invalid connections within the graph. To address this, we propose a method for transforming the equations of motion so that no theoretically incorrect connections can arise. By describing the system according to our proposed scheme, the correct equations of motion can be expressed directly as a computational graph. By combining our previously proposed Partial Lagrangian Method with the present approach, even the equations of motion for complex, structurally reconfigurable robotic systems can be represented as computational graphs easily and without error.
The main contributions of this study are outlined below:
  • A generalized framework for solving differential equations with time-evolving states using computational graphs and the chain rule.
  • Demonstration of the framework’s effectiveness in robotic systems, showcasing its ability to handle complex dynamics and time-dependent relationships.
  • Insights into the implications of our approach for future research in dynamic systems and computational graph-based analysis.
The remainder of this paper is organized as follows. Section 2 details our proposed method, including the chain-rule transformation of differential equations. Section 3 applies the method to robotic systems, highlighting its effectiveness for time-varying states. Section 4 analyzes computational costs and identifies minimal components of the equations of motion for a divide-and-conquer strategy. Finally, Section 5 concludes and outlines directions for future work.

2. Methods

We propose a framework for designing and analyzing robotic systems using computational graphs, which is a paradigm widely adopted in machine learning. In particular, we introduce a method that leverages automatic differentiation to concisely formulate the equations of motion for multi-degree-of-freedom systems. Automatic differentiation systematically computes exact derivatives by traversing computational graphs, enabling the efficient differentiation of complex, multivariate functions [19,20]. Building on this foundation, we have developed an approach that partitions the computational graph via a divide-and-conquer strategy applied to the Lagrangian equations of motion for robotic systems [21,22]. This strategy allows us to handle changes in a robot’s degrees of freedom—such as those arising from extension or disassembly—without compromising computational efficiency.
A key feature of our method is the automatic embedding of differential relationships into the computational graph. By simply specifying the system’s Lagrangian, AD constructs the full computational graph of the dynamics. Consequently, users are relieved from manually expanding intricate motion equations and need only provide the Lagrangian (i.e., the system’s energy) to generate the equations of motion.

2.1. Problems with Embedding Time-Derivative Relationships in Computational Graphs

While computational graphs facilitate analytical operations via automatic differentiation, their underlying purely algebraic structure can present challenges when handling dynamic behaviors like complex control flow or time-varying systems.
For instance, embedding a time-varying system relationship like Euler’s method into a computational graph is a straightforward way to represent a time-derivative relationship for a state variable.
θ = θ ˙ d t + θ o l d θ ˙ = d θ d t
This definition integrates the θ - θ ˙ dependency into the graph so that chain-rule analysis becomes possible.
Despite enabling differentiation, this embedding introduces unintended couplings during automatic differentiation. Consider differentiating the Lagrangian
L = 1 2 I θ ˙ 2 1 2 k θ 2
first with respect to θ ˙ and then with respect to time:
d d t L θ ˙ = d d t θ ˙ 1 2 I θ ˙ 2 1 2 k θ 2 = I θ ¨
where I and k denote the moment of inertia and stiffness, respectively, and we assume θ = 0 at the equilibrium. Crucially, θ and θ ˙ must be independent so that the potential-energy term does not affect the partial derivative with respect to θ ˙ .
If instead the time-derivative relation is embedded as above, the same differentiation yields
d d t L θ ˙ = d d t θ ˙ 1 2 I θ ˙ 2 1 2 k θ 2 d d t θ ˙ 1 2 I θ ˙ 2 1 2 k ( θ ˙ d t + θ o l d ) 2 = d d t I θ ˙ k ( θ ˙ d t + θ o l d ) d t = I θ ¨ k ( θ ¨ d t 2 + 2 θ ˙ d t + θ o l d ) Unnecessary terms
which contains clearly unnecessary terms. These spurious contributions arise because variables that should be independent become coupled in the graph. Consequently, a mismatch appears between the algebraic graph definition and the analytical operations performed by automatic differentiation. Figure 1 shows the computational graph generated directly from Equation (3).
To avoid this issue, we define and differentiate the kinetic energy K and the potential energy P separately without constructing the full Lagrangian subgraph. In particular, the velocity-derivative term in Lagrange’s equation can be written as
d d t L θ ˙ = d d t K θ ˙ .
Figure 2 depicts the resulting computational graph. Because P is excluded from this definition, no spurious connections arise, and the calculation remains correct. In our prior work, this approach yielded mathematically equivalent equations of motion and posed no problems for robotic-system design and analysis.
While this workaround avoids erroneous connections in practice, it disregards the theoretical unity of the Lagrangian formulation and is not fundamental. To address the root cause, we propose in the next section a chain-rule-based transformation of differential equations that preserves theoretical consistency while eliminating unnecessary graph couplings.

2.2. Eliminating Differential Relationships from Computational Graphs Using the Chain Rule

The root of the problem resides in the need to embed explicit time-derivative relationships of state variables into the computational graph. Computational graphs themselves are defined algebraically, whereas automatic differentiation performs analytical operations on those algebraic expressions. This duality introduces spurious couplings when state variables are intended to remain independent.
To overcome this issue, we propose a formulation of differential equations that exploits the chain rule in tandem with an augmented state-variable vector. The chain rule is a fundamental operation for differentiating composite functions [23,24]. By computing the gradient in the vector field spanned by the state variables and contracting it with their known time derivatives, we can resolve the embedding problem in a fully equivalent manner.
Let the expanded state vector
x = θ 1 , , θ n , θ ˙ 1 , , θ ˙ n T
have dimension 2 n . Denote this extended state x R 2 n . For any scalar function y ( x ) , its time derivative can be written as
y ˙ = d y d t = y x · d x d t = x y · x ˙ ,
where
x : = x = θ 1 , , θ n , θ ˙ 1 , , θ ˙ n .
In (4), the left-hand side corresponds to a time-dependent graph, while the right-hand side admits a time-independent construction whenever x ˙ is known. Crucially, in initial-value problems, y ˙ is unknown but x ˙ is prescribed by the dynamics.
This transformation offers three principal advantages when representing differential equations as computational graphs:
  • Time-derivative dependencies of the parameters need not be explicitly embedded in the graph.
  • The independence of θ i and θ ˙ i is inherently preserved.
  • The term x y corresponds directly to a gradient computation, allowing immediate evaluation via automatic differentiation.
By applying only simple algebraic manipulations and incorporating the state vector, we can eliminate all explicit time dependence from the equations of motion. Because computational graphs must be built from algebraic expressions, this transformation yields an optimal equation-of-motion form for direct graph embedding. Moreover, the same procedure applies generally to any system that admits a Lagrangian formulation.
As an illustrative example, consider the inertial term in Lagrange’s equation:
d d t L θ ˙ = x L θ ˙ · x ˙ = θ L θ ˙ θ ˙ = 0 + θ ˙ L θ ˙ θ ¨ Obtained graph = I θ ¨
Applying our chain-rule transformation yields the computational graph shown in Figure 3. Although this graph is built from the full Lagrangian L, it remains free of any potential-energy interference and is fully time-independent.
By eliminating unnecessary time-dependent connections, the resulting graph is simpler, reducing both computational cost and memory usage, and enhancing the performance of automatic differentiation [25,26,27].

3. Results

Generalized Analysis of Robotic Arm Mechanics

In our prior work, we used computational graphs to analyze robotic systems. However, during implementation, we embedded the Lagrange equations by handling the kinetic energy K and potential energy P separately instead of directly using the full Lagrangian L. We applied a divide-and-conquer strategy by decomposing L into partial Lagrangians L i for each degree of freedom, which provided an abstract, system-level view. Nevertheless, discrepancies in the implementation of velocity and time derivatives prevented us from employing these abstracted partial Lagrangians L i directly.
By removing these implementation-specific constraints, our computational-graph approach to the equations of motion naturally extends to general differential equations. In particular, we have generalized the algebraic construction of computational graphs while preserving the analytical independence inherent in variationally derived equations.
To demonstrate the generality and validity of the proposed method, we consider the equations of motion for a robotic arm with n degrees of freedom. The standard Lagrangian formulation is
τ = d d t L θ ˙ L θ
Rewriting this in a time-independent form gives
τ = d d x L θ ˙ · d x d t L θ = x L θ ˙ · x ˙ L θ
The key step is to replace explicit time derivatives with gradients over the state space x and the known state derivatives x ˙ , thereby eliminating time-differentiation operators from the computational graph.
We validate our approach on a three-link manipulator modeled as a triple pendulum in free fall, facilitating comparison with existing results [28,29,30]. Using a fourth-order Runge–Kutta integrator, we simulate the motion by automatically generating the equations of motion via the proposed computational graph. Figure 4 presents snapshots of the manipulator’s configuration at selected time points.
The model used in Figure 4 consists of link 1 (purple) with mass 1.0 and length 1.0; link 2 (blue) with mass 0.8 and length 0.8; and link 3 (red) with mass 0.7 and length 0.7. The viscous damping at all joints was set to 0.1. For this simple simulation, only gravity was assumed. However, previous research has confirmed that even when joint actuation forces or external loads are applied, the forward dynamics and control systems implemented through computational graphs operate correctly.
The close agreement between our computational-graph-based simulation and established analytical methods confirms that the equations of motion are generated correctly via automatic differentiation and validates the proposed framework for robotic-system design and analysis.

4. Discussion

4.1. Validation of the Computational-Graph-Based Construction of Equations of Motion

The equations of motion can be generated automatically by constructing a computational graph in the form of Equation (4) and applying automatic differentiation. In our prior implementation, we needed to manually verify the correctness of graph connections and used ad hoc transformations to eliminate errors. By instead formulating the graph according to Equation (4), we can theoretically guarantee an error-free topology. To validate this, we compare the trajectories produced by our computational-graph-derived equations of motion with those from the MuJoCo physics simulator (Mujoco, DeepMind Technologies Ltd., London, UK) rather than a physical robot. The same physical parameters as in the previous section are used for this comparison.
The behavior analysis results obtained with the physics simulator are shown in Figure 5. Figure 5 shows screenshots of the simulator at each time step. Compared with these results, the computational graph in Figure 4 is shown to construct valid equations of motion, and the forward dynamics analysis using the Runge–Kutta method also functions appropriately.
In conventional physics simulators, the equations of motion are treated as opaque numerical integrators, and their underlying analytical structure is lost. In contrast, our approach encodes these equations in a computational graph, preserving all symbolic dependencies. This representation not only underlies the Runge–Kutta integration used in our experiments but also makes it possible to derive impedance-control laws directly from the graph’s structure. By leveraging the modular decomposition of the Partial Lagrangian Method, we can furthermore perform theoretical analyses of how each link’s force is transmitted to its joints when the system topology changes. Indeed, in prior work, we adaptively formulated the equations of motion for branched mechanisms using the Partial Lagrangian Method and analyzed their dynamic behavior with the same computation-graph-based framework introduced here.

4.2. Acceleration of Analysis Using Computational Graphs

Simplifying the computational graph greatly reduces complexity as system degrees of freedom increase. Here, we compare three implementations on the three-link manipulator from Section 3.
Table 1 and Figure 6 report the mean and standard deviation of single-step computation times over 1000 iterations for the following:
  • Direct implementation of d d t L θ ˙ (“by-definition”);
  • Our previous ad hoc method d d t K θ ˙ ;
  • The proposed chain-rule formulation x L θ ˙ · x ˙ .
Note that the by-definition approach produces incorrect results due to unremoved, unnecessary terms.
In the ad hoc method (middle column), the computation time decreases only by eliminating the unnecessary terms present in the by-definition graph. The proposed method (right column) achieves a substantial speed-up by removing the need to embed time derivatives into the graph, thereby reducing the number of graph edges.
As degrees of freedom n grow, the cost of connecting time-derivative relationships scales approximately as O ( n 2 ) . By contrast, our algebraically simplified graph has no explicit time derivatives or crossing dependencies, suggesting an O ( n ) complexity. Thus, the proposed method not only generalizes computational-graph-based solvers for differential equations but also delivers significant reductions in computational complexity.

4.3. Affinity with Decomposition by Partial Lagrangian Method

We previously introduced the Partial Lagrangian Method as a divide-and-conquer approach for formulating and analyzing Lagrangian equations of motion [11]. In this method, the total Lagrangian is split into link-wise components, thereby partitioning the computational graph and streamlining the derivation of the equations of motion. For each link i, we define a partial Lagrangian
L i = K i P i ,
so that summing over all links recovers the standard Lagrangian:
L = K P = i K i i P i = i ( K i P i ) = i L i .
This decomposition permits multi-degree-of-freedom systems to be handled via smaller, independent computational graphs.
Automatic differentiation applied to these partial Lagrangians achieves an optimally efficient form. Since each subgraph is independent, the contribution to the equations of motion can be written as
x L θ ˙ · x ˙ = i x L i θ ˙ · x ˙ Minimal component of Equation of motion for divide-and-conquer
The Partial Lagrangian Method and the rapid computational graph processing technique proposed in this work exhibit strong synergy. Unlike our earlier ad hoc approach—which used kinetic energy K in place of the full Lagrangian—the current method constructs a correct computational graph directly from L. This aligns with our guiding philosophy: by abstractly modeling a robotic system and delegating implementation details to the computational graph, we enable a more intuitive design and analysis of robot dynamics.

5. Conclusions

In this paper, we proposed a chain-rule-based framework for casting differential equations into computational graphs. By systematically removing redundant time-derivative dependencies, our method constructs fully time-independent graphs that both generalize the solution of differential equations and dramatically reduce computational complexity as the number of degrees of freedom grows. We validated its effectiveness and efficiency on the equations of motion for a three-link manipulator, confirming significant speed-ups without sacrificing accuracy.
Since the proposed method is theoretically formulated, our scheme for embedding the equations of motion into computational graphs is applicable to any robotic system that can be expressed in Lagrangian form. This enables, in conjunction with our prior Partial Lagrangian Method, the implementation of robotic-system extensions within a computational graph framework and the design and analysis of these systems from a graph-theoretic perspective.
The proposed approach is readily extendable to a wide range of differential-equation-driven problems in robotics, physics, and engineering. By abstracting system dynamics within a computation-graph paradigm, it offers a more intuitive and scalable route to understanding and solving complex dynamic systems.
In particular, this paper proposes a method for representing robotic systems as computational graphs by focusing on the Lagrange equations of motion. From a graph-structural perspective, the Lagrangian—as a second-order differential equation—manifests its formulaic structure in the computational graph’s depth. Conversely, the Hamiltonian—as a system of first-order differential equations—is expected to be captured not through depth but through parallelism within the graph. Because such a representation could yield a more compact graph and accelerate computation, future work will pursue the construction of a Hamiltonian computational graph.

Author Contributions

Conceptualization, T.K.; methodology, T.K.; software, T.K.; validation, T.K.; formal analysis, T.K.; investigation, T.K.; writing—original draft preparation, T.K.; writing—review and editing, T.T.; visualization, T.K.; supervision, T.T. 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 contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zhang, H.; Yu, Z.; Dai, G.; Huang, G.; Ding, Y.; Xie, Y.; Wang, Y. Understanding GNN Computational Graph: A Coordinated Computation, IO, and Memory Perspective. Proc. Mach. Learn. Syst. 2022, 4, 467–484. [Google Scholar]
  2. Margossian, C.C. A review of automatic differentiation and its efficient implementation. WIREs Data Min. Knowl. Discov. 2019, 9, e1305. [Google Scholar] [CrossRef]
  3. Streeter, M.; Dillon, J.V. Automatically Bounding the Taylor Remainder Series: Tighter Bounds and New Applications. arXiv 2023, arXiv:2212.11429. [Google Scholar] [CrossRef]
  4. Bernreiter, L.; Khattak, S.; Ott, L.; Siegwart, R.; Hutter, M.; Cadena, C. Collaborative Robot Mapping using Spectral Graph Analysis. arXiv 2022, arXiv:2203.00308. [Google Scholar] [CrossRef]
  5. Zhao, A.; Du, T.; Xu, J.; Hughes, J.; Salazar, J.; Ma, P.; Wang, W.; Rus, D.; Matusik, W. Automatic Co-Design of Aerial Robots Using a Graph Grammar. In Proceedings of the 2022 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Kyoto, Japan, 23–27 October 2022; pp. 11260–11267. [Google Scholar] [CrossRef]
  6. Bernreiter, L.; Khattak, S.; Ott, L.; Siegwart, R.; Hutter, M.; Cadena, C. A framework for collaborative multi-robot mapping using spectral graph wavelets. Int. J. Robot. Res. 2024, 43, 2070–2088. [Google Scholar] [CrossRef]
  7. Pistilli, F.; Averta, G. Graph learning in robotics: A survey. arXiv 2023, arXiv:2310.04294. [Google Scholar] [CrossRef]
  8. Alwafi, F.A.S.; Xu, X.; Saatchi, R.; Alboul, L. Development and Evaluation of a Multi-Robot Path Planning Graph Algorithm. Information 2025, 16, 431. [Google Scholar] [CrossRef]
  9. Fu, J.; Sun, G.; Liu, J.; Yao, W.; Wu, L. On Hierarchical Multi-UAV Dubins Traveling Salesman Problem Paths in a Complex Obstacle Environment. IEEE Trans. Cybern. 2024, 54, 123–135. [Google Scholar] [CrossRef] [PubMed]
  10. Zhu, C.; Wang, W.; Zhou, B.; Qin, H.; Miao, J. Weight-Based Distributed Flocking Control for Multiple Electric Marine Surface Vehicles Under Fully Intermittent Communications. IEEE Internet Things J. 2025, 12, 11754–11766. [Google Scholar] [CrossRef]
  11. Kusaka, T.; Tanaka, T. Partial Lagrangian for Efficient Extension and Reconstruction of Multi-DoF Systems and Efficient Analysis Using Automatic Differentiation. Robotics 2022, 11, 149. [Google Scholar] [CrossRef]
  12. Kusaka, T.; Tanaka, T. Partial Torque Tensor and Its Building Block Representation for Dynamics of Branching Structures Using Computational Graph. Robotics 2025, 14, 31. [Google Scholar] [CrossRef]
  13. Gunji, H.; Kusaka, T.; Tanaka, T. A Motion Propagation Force Analysis of Multi-DoF Systems Using the Partial Lagrangian Method. Robotics 2025, 14, 54. [Google Scholar] [CrossRef]
  14. Besiahgari, D. Leveraging Automatic Differentiation for Efficient Gravitational Wave Data Analysis. In Proceedings of the 2025 International Conference on Emerging Systems and Intelligent Computing (ESIC), Bhubaneswar, India, 8–9 February 2025; pp. 415–418. [Google Scholar] [CrossRef]
  15. Zubair, M.; Ranjan, D.; Walden, A.; Nastac, G.; Nielsen, E.; Diskin, B.; Paterno, M.; Jung, S.; Davis, J.H. Efficient GPU Implementation of Automatic Differentiation for Computational Fluid Dynamics. In Proceedings of the 2023 IEEE 30th International Conference on High Performance Computing, Data, and Analytics (HiPC), Goa, India, 18–21 December 2023; pp. 377–386. [Google Scholar] [CrossRef]
  16. Pan, R.; Wang, Z.; Wei, Y.; Gao, H.; Ou, G.; Cao, C.C.; Xu, J.; Xu, T.; Chen, W. Towards Efficient Visual Simplification of Computational Graphs in Deep Neural Networks. IEEE Trans. Vis. Comput. Graph. 2024, 30, 3359–3373. [Google Scholar] [CrossRef] [PubMed]
  17. Fan, W.; Wang, S.; Huang, J.; Chen, Z.; Song, Y.; Tang, W.; Mao, H.; Liu, H.; Liu, X.; Yin, D.; et al. Graph Machine Learning in the Era of Large Language Models (LLMs). arXiv 2024, arXiv:2404.14928. [Google Scholar] [CrossRef]
  18. Dighe, K. Fast Multistage Compilation of Machine Learning Computation Graphs. Master’s Thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, 2024. [Google Scholar]
  19. Harrison, D. A Brief Introduction to Automatic Differentiation for Machine Learning. arXiv 2021, arXiv:2110.06209. [Google Scholar] [CrossRef]
  20. Baydin, A.G.; Pearlmutter, B.A.; Radul, A.A.; Siskind, J.M. Automatic Differentiation in Machine Learning: A Survey. J. Mach. Learn. Res. 2018, 18, 43. [Google Scholar]
  21. Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithms, 3rd ed.; The MIT Press: Cambridge, MA, USA; London, UK, 2009. [Google Scholar]
  22. Knuth, D.E. The Art of Computer Programming; Addison-Wesley Pub. Co.: Reading, MA, USA, 1968. [Google Scholar]
  23. Learned-Miller, E. Vector, Matrix, and Tensor Derivatives. Available online: https://cs231n.stanford.edu/vecDerivs.pdf (accessed on 1 July 2025).
  24. Multivariable Chain Rule, Simple Version (Artykuł). Available online: https://pl.khanacademy.org/math/multivariable-calculus/multivariable-derivatives/differentiating-vector-valued-functions/a/multivariable-chain-rule-simple-version (accessed on 1 July 2025).
  25. Wu, F.; Souza, A.; Zhang, T.; Fifty, C.; Yu, T.; Weinberger, K. Simplifying Graph Convolutional Networks. In Proceedings of the 36th International Conference on Machine Learning. PMLR, Long Beach, CA, USA, 9–15 June 2019; pp. 6861–6871. [Google Scholar]
  26. Aggarwal, C.C. Optimization in Computational Graphs. In Linear Algebra and Optimization for Machine Learning: A Textbook; Aggarwal, C.C., Ed.; Springer International Publishing: Cham, Switzerland, 2020; pp. 447–482. [Google Scholar] [CrossRef]
  27. Ma, L.; Pal, S.; Zhang, Y.; Torr, P.H.S.; Coates, M. Plain Transformers Can be Powerful Graph Learners. arXiv 2025, arXiv:2504.12588. [Google Scholar] [CrossRef]
  28. Motion of a Triple Rod Pendulum. Available online: https://www.authorea.com/users/259349/articles/412491-motion-of-a-triple-rod-pendulum (accessed on 19 September 2022).
  29. Triple Pendulum CHAOS!|Pythonic Perambulations. Available online: https://jakevdp.github.io/blog/2017/03/08/triple-pendulum-chaos/ (accessed on 19 September 2022).
  30. Yesilyurt, B. Equations of Motion Formulation of a Pendulum Containing N-point Masses. arXiv 2020, arXiv:1910.12610. [Google Scholar] [CrossRef]
Figure 1. An example of a computational graph defined exactly as it is in textbooks. Although it is intended to derive inertial force from kinetic energy, a computational graph for potential energy is mistakenly connected on the left side. Using this graph would lead to incorrect calculation results. ω , α , I, k, τ , and d t represent the angular velocity, angular acceleration, moment of inertia, stiffness, torque, and infinitesimal time, respectively.
Figure 1. An example of a computational graph defined exactly as it is in textbooks. Although it is intended to derive inertial force from kinetic energy, a computational graph for potential energy is mistakenly connected on the left side. Using this graph would lead to incorrect calculation results. ω , α , I, k, τ , and d t represent the angular velocity, angular acceleration, moment of inertia, stiffness, torque, and infinitesimal time, respectively.
Robotics 14 00115 g001
Figure 2. This describes the calculation of the Lagrange equation using kinetic energy K instead of the Lagrangian L for the velocity derivative, as per its definition. Since the potential energy is not included in this definition, the calculation yields correct results. ω , α , I, τ , and d t represent the angular velocity, angular acceleration, moment of inertia, torque, and infinitesimal time, respectively.
Figure 2. This describes the calculation of the Lagrange equation using kinetic energy K instead of the Lagrangian L for the velocity derivative, as per its definition. Since the potential energy is not included in this definition, the calculation yields correct results. ω , α , I, τ , and d t represent the angular velocity, angular acceleration, moment of inertia, torque, and infinitesimal time, respectively.
Robotics 14 00115 g002
Figure 3. The computational graph has become time-independent due to the gradient in the space spanned by the state vector and the time derivative of the state vector. ω , α , I, and τ represent angular velocity, angular acceleration, moment of inertia, and torque, respectively.
Figure 3. The computational graph has become time-independent due to the gradient in the space spanned by the state vector and the time derivative of the state vector. ω , α , I, and τ represent angular velocity, angular acceleration, moment of inertia, and torque, respectively.
Robotics 14 00115 g003
Figure 4. Simulated motion of the three-link manipulator under free-fall conditions obtained by the proposed computational-graph method and integrated with a Runge–Kutta scheme. The curves connected to each joint represent their respective trajectories.
Figure 4. Simulated motion of the three-link manipulator under free-fall conditions obtained by the proposed computational-graph method and integrated with a Runge–Kutta scheme. The curves connected to each joint represent their respective trajectories.
Robotics 14 00115 g004
Figure 5. Simulated behavior of the three-link manipulator obtained with the MuJoCo physics simulator. Purple, blue, and red represent the first, second, and third links, respectively. The end of the purple link at the center of the image is the base. Images (af) correspond to those in Figure 4.
Figure 5. Simulated behavior of the three-link manipulator obtained with the MuJoCo physics simulator. Purple, blue, and red represent the first, second, and third links, respectively. The end of the purple link at the center of the image is the base. Images (af) correspond to those in Figure 4.
Robotics 14 00115 g005
Figure 6. Computation speed using chain rule-based symbolic expansion. The values represent the average time required for calculating the equations of motion for a 3-link manipulator over 1000 trials.
Figure 6. Computation speed using chain rule-based symbolic expansion. The values represent the average time required for calculating the equations of motion for a 3-link manipulator over 1000 trials.
Robotics 14 00115 g006
Table 1. Details of the computational speed test. Each value represents the computation time for a single step, and the mean and variance are calculated over 1000 iterations.
Table 1. Details of the computational speed test. Each value represents the computation time for a single step, and the mean and variance are calculated over 1000 iterations.
Calculation Time (Average ± S.D.)Note
Definition of Lagrange equation: d d t L θ ˙ 51.7 ± 9.62 msIncorrect result due to unnecessary terms
Our previous method: d d t K θ ˙ 43.8 ± 8.03 msAccurate results by symptomatic treatment
Proposed method: x L θ ˙ · x ˙ 6.29 ± 1.15 msAccurate results with broad applicability
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

Kusaka, T.; Tanaka, T. A Chain Rule-Based Generalized Framework for Efficient Dynamic Analysis of Complex Robotic Systems. Robotics 2025, 14, 115. https://doi.org/10.3390/robotics14090115

AMA Style

Kusaka T, Tanaka T. A Chain Rule-Based Generalized Framework for Efficient Dynamic Analysis of Complex Robotic Systems. Robotics. 2025; 14(9):115. https://doi.org/10.3390/robotics14090115

Chicago/Turabian Style

Kusaka, Takashi, and Takayuki Tanaka. 2025. "A Chain Rule-Based Generalized Framework for Efficient Dynamic Analysis of Complex Robotic Systems" Robotics 14, no. 9: 115. https://doi.org/10.3390/robotics14090115

APA Style

Kusaka, T., & Tanaka, T. (2025). A Chain Rule-Based Generalized Framework for Efficient Dynamic Analysis of Complex Robotic Systems. Robotics, 14(9), 115. https://doi.org/10.3390/robotics14090115

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