Model-based Optimal Control for Rigid-Soft Underactuated Systems Daniele Caradonna 1 2 , Nikhil Nair 3 , Anup Teejo Mathew 4 5 , Daniel Feliu Talegón 3 , Imran Afgan 4 5 , Egidio Falotico 1 2 , and Cosimo Della Santina 3 6 , Federico Renda 4 5 Abstract Continuum soft robots are inherently underactuated and subject to intrinsic input constraints, making dynamic control particularly challenging, especially in hybrid rigid–soft robots. While most existing methods focus on quasi-static behaviors, dynamic tasks such as swing-up require accurate exploitation of continuum dynamics. This has led to studies on simple low-order template systems that often fail to capture the complexity of real continuum deformations. Model-based optimal control offers a systematic solution; however, its application to rigid–soft robots is often limited by the computational cost and inaccuracy of numerical differentiation for high-dimensional models. Building on recent advances in the Geometric Variable Strain model that enable analytical derivatives, this work investigates three optimal control strategies for underactuated soft systems—Direct Collocation, Differential Dynamic Programming, and Nonlinear Model Predictive Control—to perform dynamic swing-up tasks. To address stiff continuum dynamics and constrained actuation, implicit integration schemes and warm-start strategies are employed to improve numerical robustness and computational efficiency. The methods are evaluated in simulation on three Rigid-Soft and high-order soft benchmark systems—the Soft Cart-Pole, the Soft Pendubot, and the Soft Furuta Pendulum—highlighting their performance and computational trade-offs. DoFs Degrees of Freedom CSR Continuum Soft Robot CSM Continuum Soft Manipulator CRT Cosserat Rod Theory PDE Partial Differential Equation ODE Ordinary Differential Equation ISP Implicit Strain Parameterization DER Discrete Elastic Rod GVS Geometrically Variable Strain PCS Piecewise Constant Strain PLS Piecewise Linear Strain PAS Piecewise Affine Strain PCC Piecewise Constant Curvature PAC Piecewise Affine Curvature SoRoSim Soft Robot Simulator RNEA Recursive Newton-Euler Algorithm OCP Optimal Control Problem LQR Linear Quadratic Regulator TO Trajectory Optimization DC Direct Collocation NLP Nonlinear Programming IP Interior-Point SQP Sequential Quadratic Programming DP Dynamic Programming DDP Differential Dynamic Programming IDDP Implicit Differential Dynamic Programming Box-DDP Box-Differential Dynamic Programming Box-IDDP Box-Implicit Differential Dynamic Programming Box-FDDP Box-Feasibility-driven Differential Dynamic Programming MPC Model Predictive Control NMPC Nonlinear Model Predictive Control MRPAC Model Reference Predictive Adaptive Control ILC Iterative Learning Control SMC Sliding Mode Control NN Neural Network FEM Finite Element Method CC Constant Curvature VC Variable Curvature CS Constant Strain VS Variable Strain I Introduction CSR exhibit continuous, highly deformable behavior due to their theoretically infinite DoFs ( DoFs ), enabling dexterity and adaptability beyond rigid robots. These properties make them attractive for applications such as medical devices [ 7 ] , search and rescue [ 35 ] , and human–robot interaction [ 9 ] . However, despite their infinite-dimensional configuration space, CSR are actuated through a finite number of inputs, rendering them inherently underactuated and significantly complicating the modeling and control tasks [ 10 , 13 ] . Consequently, most control approaches for CSR are limited to quasi-static behaviors, leaving their dynamic potential largely unexplored. For underactuated systems, reaching unstable equilibria requires explicit exploitation of dynamics, making swing-up tasks [ 11 , 6 ] canonical benchmarks for dynamic control. Additional challenges arise from soft actuation, which imposes intrinsic box constraints on the control inputs due to their unidirectional and distributed nature, which are typically neglected by control methods developed for rigid robots. Fig. 1: Model-based optimal controllers (a–c) applied to soft underactuated systems (d–f). Direct Collocation (a), Differential Dynamic Programming (b), and Model Predictive Control (c) are utilized to perform swing-up tasks on the Soft Cart-Pole (d), Soft Pendubot (e), and Soft Furuta Pendulum (f). Model-based optimal control provides a principled framework to address these challenges by explicitly exploiting system dynamics while handling input constraints. However, its application to dynamic soft robotic systems remains limited, primarily due to the reliance on simplified or low-dimensional models adopted to reduce computational cost. While effective in quasi-static regimes, such approximations are inadequate for highly dynamic maneuvers, where accurate continuum dynamics are essential. This paper addresses this limitation by leveraging a physically accurate modeling framework based on the GVS ( GVS ) formulation [ 27 ] , employing variable strain models. Derived from CRT ( CRT ), GVS captures all strain modes and complex continuum deformations using a limited number of generalized coordinates, making it well suited for optimal control. Recent advances provide analytical derivatives of the GVS dynamics [ 26 ] , enabling efficient gradient-based optimization for high- DoFs continuum models. Building on this framework, we investigate model-based optimal control for dynamic swing-up tasks in rigid-soft underactuated systems. Three model-based optimal control methods— DC ( DC ), DDP ( DDP ), and NMPC ( NMPC )—are evaluated on soft continuum counterparts of classical benchmarks: the Soft Cart-Pole, Soft Pendubot, and Soft Furuta Pendulum (Fig. 1 ). These case studies confirm the framework’s capacity to handle non-minimum phase behaviors, complex out-of-plane deformations, and soft-link interactions. All controllers operate on high- DoFs continuum models, without quasi-static assumptions or pseudo-rigid approximations. The dynamics of CSR are governed by high-dimensional and stiff differential equations, which necessitate advanced numerical integration schemes [ 3 ] and handling of input constraints. To enable the application of DDP under these conditions, we combine box-constrained control input with implicit integration by adapting the Box-DDP ( Box-DDP ) [ 36 ] framework within an IDDP ( IDDP ) [ 5 , 23 ] formulation. The resulting approach, referred to as Box-IDDP ( Box-IDDP ), allows efficient optimization of constrained, high- DoFs continuum models. Furthermore, a resolution-based warm-start strategy exploiting the structure of the GVS model is further introduced to accelerate the convergence of model-based optimal control methods, thereby enhancing computational efficiency. II Related Works II-A DC ( DC ) DC has been extensively adopted for motion planning for CSR using PCC ( PCC ) [ 39 ] , pseudo-rigid [ 40 ] , and full FEM ( FEM )-based models [ 1 , 14 ] . When high-fidelity FEM formulations are employed, implicit or semi-implicit integration schemes are typically adopted to cope with stiff dynamics and contact interactions [ 1 , 37 , 14 ] . Specifically, [ 1 ] and [ 14 ] demonstrated accurate locomotion and manipulation planning using implicit FEM -based optimization, while [ 37 ] proposed a reduced piecewise-affine FEM model solved via sequential convex programming. To mitigate computational complexity, simplified models have also been explored. For instance, [ 39 ] employed a PCC -based DC formulation for energy-efficient motion planning, whereas [ 40 ] adopted a pseudo-rigid model for shape-memory-alloy-driven soft arms. II-B DDP ( DDP ) Compared to DC , DDP has received limited attention in the context of CSR . This is mainly due to the difficulty of deriving analytical derivatives for highly nonlinear continuum models, as well as challenges in simulating their dynamics using explicit integration schemes. Early applications of DDP relied on simplified modeling assumptions. In [ 6 ] , the Authors applied Box-FDDP ( Box-FDDP ) [ 25 ] to an articulated soft robot performing a swing-up task, using a pseudo-rigid model with variable stiffness actuators and analytically derived derivatives to improve computational efficiency. Similarly, [ 33 ] addressed optimal motion planning for a flexible fishing rod using a lumped-mass model, solved via Box-FDDP and combined with an ILC ( ILC ) scheme for trajectory tracking. More recent works have begun to reconcile model fidelity and computational tractability. In [ 30 ] , a TO ( TO ) framework based on condensed semi-implicit FEM dynamics was proposed, projecting high-dimensional continuum models onto a low-dimensional effector–actuator space. By combining full FEM simulation in the forward pass with a condensed linearized model in the backward pass, this approach enables the application of DDP to soft robots with hundreds of DoFs . Across these studies, explicit or semi-implicit integration schemes are consistently adopted, and constrained variants such as Box-DDP [ 36 ] or Box-FDDP are preferred to explicitly enforce actuator limits. II-C MPC ( MPC ) MPC is the most widely studied optimal control framework for CSR due to its ability to explicitly handle constraints and uncertainties. However, real-time requirements have often limited its deployment to simplified or linearized internal models. Early studies primarily relied on linear MPC formulations based on reduced-order analytical models. For instance, [ 2 ] incorporated simplified pressure dynamics into the state of a pneumatic humanoid soft robot, demonstrating improved closed-loop performance. To improve model fidelity, data-driven approaches have gained increasing attention. Neural-network-based models were embedded in MPC using analytically computed gradients in [ 17 ] . In parallel, Koopman-based methods have been widely adopted to obtain linear representations of nonlinear soft robot dynamics [ 4 , 34 , 19 ] , enabling efficient control via linear MPC and LQR ( LQR ), even in highly dynamic regimes [ 19 ] . Several MPC extensions have been proposed to enhance robustness and adaptability. These include robust MPC based on linearized actuation–deformation mappings [ 32 ] , adaptive linear MPC with online parameter updates from PCC regressors ( MRPAC ( MRPAC )) [ 21 ] , and auto-tuning frameworks leveraging learned dynamics and barrier functions for constraint enforcement [ 31 ] . Fully NMPC approaches remain relatively rare and are typically restricted to simplified models. Representative examples include a kinematic PCC -based NMPC for a growing robot with obstacle avoidance [ 12 ] , and a dynamic PCC -based NMPC explicitly modeling hydrodynamic effects for underwater disturbance rejection [ 38 ] . II-D Contributions of this work This work enables the optimal control of rigid-soft robots by leveraging analytical derivatives of the GVS model, which render the optimization of high-dimensional continuum models computationally tractable. To address stiff differential equations and actuation limits, we introduce Box-IDDP , an algorithm combining the implicit integration stability of IDDP [ 23 ] with the constraint handling of Box-DDP [ 36 ] . We further introduce a resolution-based warm-start strategy that exploits the GVS structure to accelerate the convergence of model-based solvers. Validations on the Soft Cart-Pole, Pendubot, and Furuta Pendulum demonstrate the framework’s applicability to complex rigid-soft systems exhibiting non-minimum phase behaviors and out-of-plane deformations. III Theoretical Background III-A Differentiable GVS ( GVS ) The GVS approach [ 27 ] extends classical rigid-body dynamics to hybrid systems, offering a unified CRT -based framework for rigid joints and slender soft bodies. The method reduces the governing PDE to a finite set of ODE by parameterizing the strain field. In this work, this is achieved through a truncated expansion of Legendre polynomial basis functions. A key feature for control applications is the ability to selectively activate or deactivate individual strain modes (i.e., bending, twisting, stretching, and shearing) and to independently choose the number of DoFs associated with each mode. Moreover, GVS describes the forward dynamics of a hybrid rigid–soft linkage in a classical Lagrangian form, such as \bm{M}\left(\bm{q}\right)\ddot{\bm{q}}+\bm{h}\left(\bm{q},\dot{\bm{q}}\right)=\bm{B}\left(\bm{q}\right)\bm{u}\,, (1) where \bm{q},\dot{\bm{q}},\ddot{\bm{q}}\in\mathbb{R}^{n} denote the generalized coordinates and their derivatives, and \bm{u}\in\mathbb{R}^{m} represents the actuation input. The vector \bm{q} encodes both joint variables and soft-link deformations, including bending, twisting, stretching, and shearing. In ( 1 ), \bm{M}\in\mathbb{R}^{n\times n} denotes the generalized mass matrix, \bm{h}\in\mathbb{R}^{n} collects the Coriolis, gravitational, stiffness, and damping terms, and \bm{B}\in\mathbb{R}^{n\times m} is the input matrix. By solving ( 1 ) for \ddot{\bm{q}} , the forward dynamics can be compactly expressed as \begin{bmatrix}\dot{\bm{x}}_{1}\\ \dot{\bm{x}}_{2}\end{bmatrix}=\begin{bmatrix}\bm{x}_{2}\\ \textnormal{FD}\left(\bm{x}_{1},\,\bm{x}_{2},\,\bm{u}\right)\end{bmatrix}=\bm{f}\left(\bm{x},\,\bm{u}\right)\,, (2) where \bm{x}_{1}=\bm{q} , \bm{x}_{2}=\dot{\bm{q}} , \bm{x}=\begin{bmatrix}\bm{x}^{\top}_{1}&\bm{x}^{\top}_{2}\end{bmatrix}^{\top} , and \textnormal{FD}=\bm{M}^{-1}\left(\bm{B}\bm{u}-\bm{h}\right) . Equation ( 2 ) can be analytically differentiated using the adapted RNEA ( RNEA ) for GVS introduced in [ 26 ] , obtaining \bm{\nabla}_{\bm{q}}\,\textnormal{FD},\,\bm{\nabla}_{\dot{\bm{q}}}\,\textnormal{FD}\in\mathbb{R}^{n\times n} . III-B Implicit Time Integration To solve the TO problem, the continuous-time dynamics in ( 2 ) must be discretized. In the literature, time-integration schemes are generally categorized into two classes: explicit and implicit. Explicit methods compute the next state \bm{x}_{k+1} directly as a function \bm{f}_{d} of the current state \bm{x}_{k} and input \bm{u}_{k} , i.e., \bm{x}_{k+1}=\bm{f}_{d}(\bm{x}_{k},\bm{u}_{k}) . In contrast, implicit methods are formalized as \bm{g}\left(\bm{x}_{k+1},\bm{x}_{k},\bm{u}_{k}\right)=\bm{0}\,, (3) where \bm{g}(\cdot) is the method-specific residual function. Unlike explicit schemes, ( 3 ) generally cannot be solved in closed form for nonlinear systems. Therefore, iterative techniques are required, such as the Newton-Raphson method [ 15 , Chap. 5] . For high-order models of CSR , implicit integration is often mandatory [ 3 ] . These systems are governed by stiff ODE with high-frequency dynamics, which cause explicit solvers to diverge unless extremely small time steps are used. Implicit methods, by contrast, remain stable for significantly larger time steps, making them more suitable for simulation and control. Although each implicit step is computationally more expensive, the restrictive time-step requirements of explicit schemes make them impractical for real-time optimal control. Furthermore, the availability of analytical derivatives significantly enhances the efficiency of implicit integration, as iterative solvers can exploit exact gradients of the dynamics for faster and more accurate convergence. IV Model-based Optimal Controllers IV-A OCP ( OCP ) Statement Given the dynamic model ( 2 ) and the initial condition \bm{x}_{0} , the goal of the TO problem is to compute an optimal policy \bm{u}^{*}(t) that solves \begin{aligned} \min_{\bm{u}}\quad&\ell_{f}\left(\bm{x}\left(t_{f}\right)\right)+\int_{0}^{t_{f}}\ell\left(\bm{x}\left(t\right),\bm{u}\left(t\right)\right)\,\textnormal{d}t\\ \textnormal{s.t.}\quad&\dot{\bm{x}}=\bm{f}\left(\bm{x}\left(t\right),\bm{u}\left(t\right)\right)\quad t\in[0,\,t_{f}]\\ &\bm{u}_{\textnormal{lb}}\leq\bm{u}_{k}\leq\bm{u}_{\textnormal{ub}}\quad t\in[0,\,t_{f}]\end{aligned}\,, (4) where \ell:\mathbb{R}^{2n}\times\mathbb{R}^{m}\rightarrow\mathbb{R}^{+} is the cost, and \ell_{f}:\mathbb{R}^{2n}\rightarrow\mathbb{R}^{+} is the terminal cost. Furthermore, the vectors \bm{u}_{\textnormal{lb}},\bm{u}_{\textnormal{ub}}\in\mathbb{R}^{m} define lower and upper bounds on the control input, commonly referred to as box constraints. The OCP in ( 4 ) can generally be further constrained by imposing nonlinear inequality or equality constraints on the state and input. To formalize ( 4 ) as a numerical optimization problem, the OCP is discretized using two main approaches: (i) direct transcription and (ii) direct shooting. In direct transcription, the discrete-time states \bm{x}_{k} and inputs \bm{u}_{k} are treated as decision variables, leading to a large but sparse NLP ( NLP ) in which the system dynamics are enforced as constraints at each time step. In contrast, direct shooting considers only the input trajectory as decision variables, while the state trajectory is obtained by integration of the discretized dynamics. IV-B DC ( DC ) To reduce the number of decision variables in the direct transcription of ( 4 ), DC [ 20 ] approximates the state and control trajectories using piecewise polynomial functions, while enforcing the system dynamics as algebraic constraints at a finite set of collocation points. In this work, we adopt the trapezoidal collocation scheme, which leads to the following NLP formulation \begin{split}\min_{\bm{x},\bm{u}}\quad&\ell_{f}\left(\bm{x}_{N}\right)+\sum_{k=0}^{N-1}\frac{h}{2}\left(\ell_{k}+\ell_{k+1}\right)\\ \textnormal{s.t.}\quad&\bm{x}_{k+1}=\bm{x}_{k}+\frac{h}{2}\left(\bm{f}_{k}+\bm{f}_{k+1}\right)\quad k\in[0,N-1]\\ &\bm{u}_{\textnormal{lb}}\leq\bm{u}_{k}\leq\bm{u}_{\textnormal{ub}}\quad k\in[0,N-1]\end{split}\,, (5) Here, h denotes the integration time step, and the collocation points are located at the midpoints between two consecutive time instants t_{k} and t_{k+1} . The resulting NLP in ( 5 ) can be solved using standard optimization methods such as IP ( IP ) or SQP ( SQP ). Given the complexity of the high-order rigid-soft models, we selected the IP algorithm due to its suitability for large-scale problems. Additionally, analytical gradients were employed to enhance both solution accuracy and computational efficiency. The main advantage of direct collocation lies in its simplicity and its ability to naturally handle nonlinear constraints on both inputs and states, making it well-suited for offline trajectory planning. However, DC produces an optimal open-loop solution \{\bm{x}^{*},\bm{u}^{*}\} , and thus does not inherently provide robustness to model uncertainties or external disturbances. As a result, convergence to the desired trajectory \bm{x}^{*} is not guaranteed in closed-loop execution. Moreover, despite the reduction in decision variables compared to full direct transcription, the computational burden of DC grows rapidly with the number of DoFs , limiting its applicability to low-dimensional systems. IV-C Box-IDDP ( Box-IDDP ) By decomposing the original problem into a sequence of smaller subproblems, DDP [ 29 , 22 ] solves the OCP by recursively applying Bellman’s principle of optimality backward in time. Unlike DC , which formulates the problem as a large-scale NLP , DDP employs a direct shooting approach that iteratively improves the solution through two main phases: a backward pass and a forward pass. In the backward pass, the algorithm constructs quadratic approximations of the cost-to-go function to compute local optimal control policies. In the forward pass, these policies are applied to the nonlinear system dynamics to generate an updated trajectory. Classical DDP , however, assumes explicit time discretization and does not account for box constraints on the control inputs. These assumptions are not suitable for CSR , which typically require implicit time integration and bounded actuation. To address these limitations, we combine Box-DDP [ 36 ] , which enforces box input constraints, with IDDP [ 5 , 23 ] , which extends DDP to implicitly discretized dynamics. We refer to the resulting method as Box-IDDP . The backward pass begins with the Bellman equation at time step k , given by V\left(\bm{x}_{k}\right)=\min_{\bm{u}_{k}}\left(\ell\left(\bm{x}_{k},\bm{u}_{k}\right)+V\left(\bm{x}_{k+1}\right)\right), (6) where V(\cdot) denotes the value function. Let Q\left(\delta\bm{x}_{k},\delta\bm{u}_{k}\right) be the local variation of the argument of the minimization in ( 6 ), expressed in terms of perturbations around the nominal trajectory. A second-order Taylor expansion of Q yields Q\left(\delta\bm{x},\delta\bm{u}\right)\approx\frac{1}{2}\begin{bmatrix}1\\ \delta\bm{x}\\ \delta\bm{u}\end{bmatrix}^{\!\top}\begin{bmatrix}0&\bm{Q}_{x}^{\top}&\bm{Q}_{u}^{\top}\\ \bm{Q}_{x}&\bm{Q}_{xx}&\bm{Q}_{xu}\\ \bm{Q}_{u}&\bm{Q}_{ux}&\bm{Q}_{uu}\end{bmatrix}\begin{bmatrix}1\\ \delta\bm{x}\\ \delta\bm{u}\end{bmatrix}, (7) where the matrices \bm{Q}_{(\cdot)} collect the first- and second-order derivatives of the cost and dynamics with respect to the state and control. To accommodate implicit time integration, IDDP modifies the computation of the Q -function derivatives to account for the implicit integration scheme in ( 3 ). In particular, the first-order derivatives are given by \bm{Q}_{\bm{x}}=\bm{\ell}_{\bm{x}}+\mathbf{f}_{\bm{x}}^{\top}\bm{V}_{\bm{x}_{k+1}}\,,\quad\bm{Q}_{\bm{u}}=\bm{\ell}_{\bm{u}}+\mathbf{f}_{\bm{u}}^{\top}\bm{V}_{\bm{x}_{k+1}}\,, (8) where \mathbf{f}_{\bm{x}}=-\bm{g}^{-1}_{\bm{x}_{k+1}}\bm{g}_{\bm{x}_{k}}\,,\quad\mathbf{f}_{\bm{u}}=-\bm{g}^{-1}_{\bm{x}_{k+1}}\bm{g}_{\bm{u}_{k}}\,. (9) In ( 9 ), the subscript \bm{g}_{\left(\cdot\right)} stands to \partial\bm{g}/\partial\left(\cdot\right) . For conciseness, we report only the first-order derivatives, while the second-order terms are reported in the Supplementary Materials. To enforce box constraints on the control inputs, Box-DDP computes the locally optimal control variation by solving a constrained quadratic program. Specifically, the backward pass computes \begin{aligned} \delta\bm{u}_{k}=&\arg\min_{\delta\bm{u}_{k}}Q\left(\delta\bm{x}_{k},\delta\bm{u}_{k}\right)=\bm{l}_{k}+\bm{L}_{k}\,\delta\bm{x}_{k}\\ &\text{s.t.}\quad\bm{u}_{\mathrm{lb}}\leq\bm{u}_{k}+\delta\bm{u}_{k}\leq\bm{u}_{\mathrm{ub}}\end{aligned}\,, (10) where the feedforward term \bm{l}_{k}\in\mathbb{R}^{m} and the feedback gain \bm{L}_{k}\in\mathbb{R}^{m\times 2n} are computed using the Box-QP algorithm [ 36 ] . This procedure is applied recursively from the terminal time step to the initial one. Consequently, during the forward pass, the system is rolled out using a line search on the feedforward term \bm{l}_{k} , scaled by a factor \alpha\in(0,1] , while integrating the dynamics using the implicit scheme ( 3 ). At convergence, the method returns a nominal trajectory \{\bm{x}^{*},\bm{u}^{*}\} together with a time-varying linear feedback law \bm{u}_{k}=\bm{u}_{k}^{*}+\bm{L}_{k}\left(\bm{x}_{k}^{*}-\bm{x}_{k}\right) , which enables local trajectory tracking within the region of validity of the second-order approximation. Compared to DC , DDP directly yields a locally optimal feedback controller with significantly lower computational complexity, since it optimizes only over the control sequence. However, due to its reliance on local approximations of the cost and dynamics, DDP is highly sensitive to the initial guess, making effective warm-start strategies essential for practical applications. IV-D NMPC ( NMPC ) NMPC [ 18 ] solves the TO problem online over a finite prediction horizon using state feedback. At each time step, only the first control input of the optimized sequence is applied to the system, and the optimization problem is subsequently resolved in a receding-horizon fashion, warm-started from the previously computed solution. At each time step k , given the feedback \bm{x}_{k} , the NMPC solves the following finite-horizon TO problem \begin{aligned} \min_{\begin{subarray}{c}\bm{x}_{k+1},\dots,\bm{x}_{k+p+1},\\ \bm{u}_{k},\dots,\bm{u}_{k+p}\end{subarray}}\quad&\ell_{f}\left(\bm{x}_{k+p+1}\right)+\sum_{i=k}^{k+p}\ell\left(\bm{x}_{i},\bm{u}_{i}\right)\\ \textnormal{s.t.}\quad&\bm{g}\left(\bm{x}_{i},\bm{x}_{i+1},\bm{u}_{i}\right)=\bm{0}\quad i\in[k,\,k+p]\\ &\bm{u}_{\textnormal{lb}}\leq\bm{u}_{i}\leq\bm{u}_{\textnormal{ub}}\quad i\in[k,\,k+p]\end{aligned}\,, (11) Here, p\in\mathbb{N} denotes the prediction horizon length. The optimization problem in ( 11 ) can be solved using either DC or DDP -based methods. By exploiting state feedback, NMPC provides robustness to disturbances and model uncertainties. However, its closed-loop performance and convergence properties are strongly influenced by the choice of hyperparameters, such as the prediction horizon p , and by the quality of the initial guess used to warm-start the solver. In this work, we implement NMPC by solving the underlying TO problem using Box-IDDP , leveraging its computational efficiency and faster convergence compared to DC , particularly when a suitable warm-start is available. IV-E Warm-start Strategy To improve the convergence rate and computational efficiency of optimal control algorithms, we propose a warm-start strategy tailored to hybrid rigid–soft robots modeled using the GVS approach. The main idea is to first solve the TO problem on a reduced-order model and then progressively increase the model order until the desired fidelity is reached. This strategy is based on the observation that gradually increasing the number of DoFs within the GVS framework only marginally affects the system dynamics. As a result, the solution of a reduced-order problem provides an effective warm start for higher-order models. This behavior stems from the strain parameterization adopted in the GVS formulation, where the strain field is represented as a truncated expansion [ 27 ] , whose higher-order terms have a progressively diminishing influence on the overall dynamics. Furthermore, as mentioned in Sec. III-A , the GVS approach also allows enabling specific strain modes. Notably, this capability is inherent to the strain-based parameterization and is not available in other methods, such as DER ( DER ) [ 16 ] . Fig. 2 illustrates the proposed warm-start scheme. The algorithm starts by solving the TO problem for the equivalent rigid system. The resulting solution is then transferred to a soft model with a constant-curvature parameterization, i.e., with only curvature enabled and assumed constant along the link body. This represents the simplest soft formulation and enables a smooth transition from the rigid case. After solving the TO problem, the curvature DoFs are increased to the desired order. In this work, the curvature is expanded up to the second order of the Legendre polynomial basis. Finally, the linear strain modes are introduced at the desired resolution, using the solution of the previous case as an initial guess. As for the curvature, second-order expansions are also adopted for the linear modes. The proposed sequence is motivated by the following considerations. For rod-like bodies, bending is the dominant strain mode, which justifies the gradual introduction of DoFs starting from curvature. Moreover, the constant-curvature assumption geometrically constrains the soft link to circular-arc shapes, making the link virtually stiffer. This parameterization, therefore, provides a natural transition between rigid and soft models. By relaxing these geometric constraints through the addition of curvature DoFs , the model allows for more complex deformations and more accurately captures the system behavior. Finally, introducing the linear strain modes enables fully realistic behavior by accounting for all strain components. In the examined systems, although linear strain modes (stretch and shear) typically have a smaller influence than angular modes, they are essential for accurately capturing complex interactions, particularly in dynamic tasks. Fig. 2: Representative scheme of the proposed warm-start strategy. The initial guess for the optimal controllers is obtained by solving simplified versions of the system, starting from the rigid equivalent model and then gradually adding the DoFs . V Case Studies on Rigid-Soft Systems The model-based optimal controllers are evaluated on three high-order systems of increasing complexity. These range from the Soft Cart-Pole, with a single planar soft link, to the Soft Pendubot, composed of two planar soft links, and finally the Soft Furuta Pendulum—a full three-dimensional hybrid system exhibiting all strain modes. All systems are modeled using the GVS approach within the Differentiable SoRoSim ( SoRoSim ) framework [ 28 , 26 ] . The soft links are cylindrical with length L=$1.0\text{\,}\mathrm{m}$ , cross-section radius R_{\textnormal{cs}}=$0.03\text{\,}\mathrm{m}$ , density \bar{\rho}=$1000\text{\,}\mathrm{k}\mathrm{g}\mathrm{/}\mathrm{m}^{3}$ , Young’s modulus E=$1.0\text{\,}\mathrm{M}\mathrm{P}\mathrm{a}$ , Poisson ratio \nu=0.5 , damping \beta=$0.01\text{\,}\mathrm{M}\mathrm{P}\mathrm{a}\cdot\mathrm{s}$ , stress-free strain \bm{\xi}^{*}=[0,0,0,1,0,0]^{\top} , and joint damping \beta_{r}=$0.05\text{\,}\mathrm{N}\text{\,}\mathrm{m}$ . Each soft link is parameterized via second-order Legendre polynomials, yielding 3 DoFs for each strain mode. The target configuration \bar{\bm{q}} corresponds to the unstable swing-up equilibrium, with target state \bm{x}_{\textnormal{target}}=[\bar{\bm{q}}^{\top},\bm{0}^{\top}]^{\top}\in\mathbb{R}^{2n} . Swing-up control uses a quadratic cost \ell=\frac{1}{2}(\bm{e}^{\top}\bm{Q}\bm{e}+\bm{u}^{\top}\bm{R}\bm{u}) , \ell_{f}=\frac{1}{2}\bm{e}_{f}^{\top}\bm{Q}_{f}\bm{e}_{f} , with state error \bm{e}=\bm{x}_{\textnormal{target}}-\bm{x} and box-constrained inputs -u_{\max}\leq u\leq u_{\max} . Weights \left(\bm{Q}_{f},\bm{Q},\bm{R}\right) are identical across methods. Concerning time discretization, DC [ 24 ] utilizes trapezoidal integration with N=100 nodes over t_{f}=$2\text{\,}\mathrm{s}$ , whereas Box-IDDP and NMPC employ implicit Euler integration with a step size of h=$0.01\text{\,}\mathrm{s}$ . The latter methods solve ( 3 ) using the trust-region dogleg algorithm [ 8 ] , leveraging the analytical derivatives of ( 2 ). Additionally, NMPC uses a prediction horizon of 1.0\text{\,}\mathrm{s} ( p=100 ). The warm-start strategy is implemented by sequentially solving the reduced-order parameterizations detailed in Sec. IV-E . Figs. 3 – 5 illustrate the swing-up tasks across the different systems. For each optimal controller, we show the control inputs and joint trajectories. To better isolate the strain modes, we report the spatially averaged strain of the soft links rather than the full configuration vector. Furthermore, for brevity, only the final results for the high-order systems are shown. V-A Soft Cart-pole Fig. 3: Swing-up Task using DC (a-e), Box-IDDP (f-j), and NMPC (k-o) on the Soft Cart-pole. The Soft Cart-Pole (Fig. 1 d) consists of a rigid cart that translates along a single axis under the action of an external force F(t)\in\mathbb{R} , producing a displacement d(t)\in\mathbb{R} . A soft link is connected to the cart via a revolute joint with angle \theta(t)\in\mathbb{R} , subject to rotational damping \beta_{r} . The configuration vector is defined as \bm{q}=\begin{bmatrix}d&\theta&\bm{q}_{\bm{\xi}}^{\top}\end{bmatrix}^{\top}\in\mathbb{R}^{n} , where \bm{q}_{\xi} denotes the configuration of the soft link, and n=11 . The swing-up task is achieved when the soft link reaches the upright and straight configuration, corresponding to \theta=\pi . The target equilibrium \bar{\bm{q}} is defined with d=0 and the associated static equilibrium of the soft link. Moreover, the input is subject to a box constraint with F_{\max}=$200\text{\,}\mathrm{N}$ . Fig. 3 illustrates the application of DC (a–e), Box-IDDP (f–j), and NMPC (k–o) to the Soft Cart-pole. All methods produce optimal policies that successfully drive the system to perform the swing-up maneuver. Due to input saturation, the controllers exhibit characteristic non-minimum phase behavior, driving the cart in the opposite direction to accumulate energy. This strategy leverages the combined effects of inertia and elasticity to propel the soft link to the upright configuration. Concerning the DC and Box-IDDP controllers, the final phase of the optimal policy consists of rapid oscillatory inputs to counteract the gravity-induced bending of the soft link due to its own weight. Conversely, NMPC exploits a larger cart displacement, allowing the system to converge smoothly to the target, at the cost of a slower settling time. V-B Soft Pendubot Fig. 4: Swing-up Task using DC (a-e), Box-IDDP (f-j), and NMPC (k-o) on the Soft Pendubot. The Soft Pendubot (Fig. 1 e) is an open kinematic chain composed of two soft links, each of length L/2 . These are connected by revolute joints \theta_{1}\in\mathbb{R} and \theta_{2}\in\mathbb{R} . The first joint, located at the base, is actuated by a torque input \tau\in\mathbb{R} , with \tau_{\max}=$10\text{\,}\mathrm{N}$ , while the second joint is passive. The full configuration vector of the Soft Pendubot is defined as \bm{q}=\begin{bmatrix}\theta_{1}&\bm{q}_{\bm{\xi},1}^{\top}&\theta_{2}&\bm{q}_{\bm{\xi},2}^{\top}\end{bmatrix}^{\top}\in\mathbb{R}^{n} , with n=20 . The Swing-up configuration correspond to the unstable equilibrium for \theta_{1}=\pi and \theta_{2}=0 . Fig. 4 illustrates the application of DC (a–e), Box-IDDP (f–j), and NMPC (k–o) to the Soft Pendubot. In this case study, the input box constraints allow the robot to be driven directly to the upright configuration without evident non-minimum phase behavior. Notably, the coupling between the links becomes significant as the robot approaches the upright configuration. The first link undergoes gravity-induced bending due to the combined load of its own mass and the second link. The optimal policies counter this deformation via a negative torque, acting to maintain the upright configuration and prevent the system from reverting to the rest configuration. V-C Soft Furuta Pendulum Fig. 5: Swing-up Task using DC (a-e), Box-IDDP (f-j), and NMPC (k-o) on the Soft Furuta pendulum. The Soft Furuta pendulum (Fig. 1 f) consists of a rigid link attached to a revolute joint \theta_{1}\in\mathbb{R} , with a soft link connected through a second revolute joint \theta_{2}\in\mathbb{R} whose rotation axis is perpendicular to that of the first joint. This configuration allows the soft link to swing freely while the rigid arm rotates in the horizontal plane. Furthermore, the soft link can exert every strain modes, including out-of-plane bending and shear, but also twisting. The configuration vector is defined as \bm{q}=\begin{bmatrix}\theta_{1}&\theta_{2}&\bm{q}_{\bm{\xi}}^{\top}\end{bmatrix}^{\top}\in\mathbb{R}^{n} , where n=20 . The target equilibrium \bar{\bm{q}} is defined with \theta_{2}=\pi and for \theta_{1}=0 and the associated static equilibrium of the soft link. The input is subject to a box constraint with \tau_{\max}=$80\text{\,}\mathrm{N}$ . Similar to the Soft Cart-Pole (Sec. V-A ), due to the input saturation, the optimal policies exhibits non-minimum phase behavior, oscillating the rigid link to accumulate energy to drive the soft link to the upright configuration. Furthermore, in this case, the out-of-plane strain act as disturbances and the optimal policy must take into account them. Unlike the previous cases, the three methods differ in the optimal strategies to perform the task. The Box-IDDP solution causes strong out-of-plane bending ( \kappa_{y} ) and torsion ( \kappa_{x} ), effectively winding the soft link into a helicoidal shape. The controller leverages the elastic energy stored during this deformation, releasing it to generate the necessary kinetic energy for the task. Once this combined bending and twisting is released, the motion is primarily characterized by in-plane bending ( \kappa_{z} ), guiding \theta_{2} to the upright position. In contrast, the DC solution excites the out-of-plane bending \kappa_{y} significantly less. Consequently, the aforementioned helicoidal effect is less pronounced, and the controller relies primarily on in-plane bending \kappa_{z} . Finally, as the NMPC relies on Box-IDDP , it inherits a similar winding strategy to accumulate energy before driving the link to the upright equilibrium. Notably, the NMPC achieves asymptotic stabilization with significantly smoother control trajectories, albeit with a slower settling time. Fig. 6: Benefits of the warm-start strategy and performance comparison. (a) Cost over iterations for the Soft Furuta Pendulum using Box-IDDP , comparing pseudo-random initialization (dotted) vs. warm-start (solid). (b–c) Comparison between DC and Box-IDDP on the Soft Cart-Pole: (b) cost convergence using identical pseudo-random initial guesses, and (c) average computational time per iteration. V-D Discussions The case studies validate the proposed method across high-order hybrid systems of increasing complexity. The Soft Cart-Pole highlights non-minimum phase behavior under input constraints, while the Soft Pendubot demonstrates policy adaptation to dynamic interactions between soft links. Finally, the Soft Furuta Pendulum extends this to a three-dimensional system, exploiting complex out-of-plane deformations for swing-up maneuvers. This final case also reinforces the non-minimum phase characteristics seen in Sec. V-A , requiring strategic energy accumulation to reach the upright configuration. V-D 1 Benefits of the Warm-start Strategy We evaluated the benefits of the proposed warm-start strategy within the model-based optimization framework. In particular, we focus on the Box-IDDP algorithm, which is the most sensitive to the choice of the initial guess among the considered methods. Fig. 6 a reports the cost evolution over iterations for the Soft Furuta Pendulum under different initialization strategies. The algorithm is initialized either with a pseudo-random control sequence or with the warm-strategy described in Sec. IV-E . As shown in Fig. 6 a, the warm-start strategy consistently yields faster cost convergence than pseudo-random initialization, highlighting its effectiveness in improving the convergence speed of the optimization process. V-D 2 Comparison between DC and Box-IDDP To compare the two open-loop control methods, we performed an additional comparative study on the Soft Cart-Pole system. Both DC and Box-IDDP were applied without a warm-start strategy, using the same initial guess: a pseudo-random control sequence as in the previous numerical example. The hyperparameters of the optimal controllers were kept the same as in the case studies. We tracked the evolution of the cost over iterations and computed the average computational time per iteration, as shown in Fig. 6 b–c. The computational time was measured using MATLAB 2025a on a laptop equipped with an Intel Core i7-12700H processor (2.30 GHz) and 16 GB of RAM. Notably, the cost of Box-IDDP decreases more rapidly than that of DC . The DC cost increases temporarily to satisfy constraints within the large NLP . However, Box-IDDP converges to a suboptimal solution, yielding a higher final cost than DC . Regarding computational efficiency, DC is significantly slower, requiring 2.9 times the computational time per iteration compared to Box-IDDP . Although Box-IDDP risks entrapment in local minima, it outperforms DC in convergence speed and computational efficiency, making it the superior choice for real-time control, such as NMPC applications. Conversely, DC is computationally heavier for high-order models but offers a robust framework for complex state and input constraints. Thus, DC remains the preferred method for offline planning scenarios requiring sophisticated constraints, such as collision avoidance. VI Conclusion This paper presented a model-based optimal control framework for underactuated rigid-soft robots using the GVS approach. This formulation enables efficient gradient-based optimization on full continuum dynamics, avoiding quasi-static or pseudo-rigid approximations. We validated DC , DDP , and NMPC on the Soft Cart-Pole, Soft Pendubot, and Soft Furuta Pendulum. These case studies confirmed the framework’s capacity to handle non-minimum phase behaviors, complex out-of-plane deformations, and soft-link interactions. Crucially, the derivation of analytical gradients rendered the optimization of these high-order models computationally tractable; in their absence, such optimization problems would have been computationally prohibitive. To ensure numerical stability and feasibility, we introduced Box-IDDP , combining implicit time integration with input box constraints. Finally, we exploited the GVS strain parameterization to implement a resolution-based warm-start strategy. By hierarchically increasing model fidelity, this approach enhanced convergence, which in turn led to a reduction in computational time. Future works will focus on experimental validations of the benchmark systems, assessing real-time performance and robustness to model uncertainties. Appendix A Derivatives of the Q -function for Box-IDDP Let \bm{\nabla}_{\bm{x}}\bm{f}\left(\bm{x},\bm{u}\right)\in\mathbb{R}^{2n\times 2n} and \bm{\nabla}_{\bm{u}}\bm{f}\left(\bm{x},\bm{u}\right)\in\mathbb{R}^{2n\times m} be the analytical derivatives of the continuous-time dynamics, and let \bm{g}\left(\bm{x}_{k},\bm{x}_{k+1},\bm{u}_{k}\right)=\bm{0} be the implicit discrete-time system. For the sake of readability, we refer to \bm{x}_{k+1} as \bm{x}^{\prime} , while \bm{x}_{k} and \bm{u}_{k} will be referred to as \bm{x} and \bm{u} , respectively. For instance, we denote \bm{g}_{\bm{x}\bm{x}^{\prime}}=\partial^{2}\bm{g}/\partial\bm{x}_{k}\bm{x}_{k+1} . The first- and second-order derivatives of the Q -function are listed below. \bm{Q}_{\bm{x}}=\bm{\ell}_{\bm{x}}+\mathbf{f}_{\bm{x}}^{\top}\bm{V}^{\prime}_{\bm{x}^{\prime}}\,, (A1) \bm{Q}_{\bm{u}}=\bm{\ell}_{\bm{u}}+\mathbf{f}_{\bm{u}}^{\top}\bm{V}^{\prime}_{\bm{x}^{\prime}}\,, (A2) \bm{Q}_{\bm{xx}}=\bm{\ell}_{\bm{xx}}+\mathbf{f}_{\bm{x}}^{\top}\bm{V}^{\prime}_{\bm{x}^{\prime}\bm{x}^{\prime}}\mathbf{f}_{\bm{x}}+\bm{V}^{\prime}_{\bm{x}^{\prime}}\mathbf{f}_{\bm{xx}}\,, (A3) \bm{Q}_{\bm{uu}}=\bm{\ell}_{\bm{uu}}+\mathbf{f}_{\bm{u}}^{\top}\bm{V}^{\prime}_{\bm{x}^{\prime}\bm{x}^{\prime}}\mathbf{f}_{\bm{u}}+\bm{V}^{\prime}_{\bm{x}^{\prime}}\mathbf{f}_{\bm{uu}}\,, (A4) \bm{Q}_{\bm{ux}}=\bm{\ell}_{\bm{ux}}+\mathbf{f}_{\bm{u}}^{\top}\bm{V}^{\prime}_{\bm{x}^{\prime}\bm{x}^{\prime}}\mathbf{f}_{\bm{x}}+\bm{V}^{\prime}_{\bm{x}^{\prime}}\mathbf{f}_{\bm{ux}}\,, (A5) \bm{V}_{\bm{x}}=\bm{Q}_{\bm{x}}-\bm{Q}^{\top}_{\bm{ux}}\bm{Q}^{-1}_{\bm{uu}}\bm{Q}_{\bm{u}}\,, (A6) \bm{V}_{\bm{xx}}=\bm{Q}_{\bm{xx}}-\bm{Q}^{\top}_{\bm{ux}}\bm{Q}^{-1}_{\bm{uu}}\bm{Q}_{\bm{ux}}\,. (A7) In ( A1 )-( A7 ), the first-order derivatives of the implicit discrete-time dynamics \mathbf{f}_{\bm{x}}\in\mathbb{R}^{2n\times 2n} and \mathbf{f}_{\bm{u}}\in\mathbb{R}^{2n\times m} can be computed as follows, according to [ 5 ] . \mathbf{f}_{\bm{x}}=\bm{g}_{\bm{x}^{\prime}}^{\dagger}\bm{g}_{\bm{x}}\,,\quad\mathbf{f}_{\bm{u}}=\bm{g}_{\bm{x}^{\prime}}^{\dagger}\bm{g}_{\bm{u}}\,, (A8) where \bm{g}_{\bm{x}^{\prime}}^{\dagger}=-\bm{g}^{-1}_{\bm{x}^{\prime}} . Moreover, the second-order derivatives of the discrete-time dynamics \mathbf{f}_{\bm{xx}}\in\mathbb{R}^{2n\times 2n\times 2n} , \mathbf{f}_{\bm{xu}}\in\mathbb{R}^{2n\times 2n\times m} , and \mathbf{f}_{\bm{uu}}\in\mathbb{R}^{2n\times m\times m} are shown below. \mathbf{f}_{\bm{xx}}=\bm{g}_{\bm{x}^{\prime}}^{\dagger}\left(\mathbf{f}^{\top}_{\bm{x}}\bm{g}_{\bm{x^{\prime}x^{\prime}}}\mathbf{f}_{\bm{x}}+\mathbf{f}^{\top}_{\bm{x}}\bm{g}_{\bm{x^{\prime}x}}+\bm{g}_{\bm{x^{\prime}x}}^{\top}\mathbf{f}_{\bm{x}}+\bm{g}_{\bm{xx}}\right), (A9) \mathbf{f}_{\bm{uu}}=\bm{g}_{\bm{x}^{\prime}}^{\dagger}\left(\mathbf{f}^{\top}_{\bm{u}}\bm{g}_{\bm{x^{\prime}x^{\prime}}}\mathbf{f}_{\bm{u}}+\mathbf{f}^{\top}_{\bm{u}}\bm{g}_{\bm{x^{\prime}u}}+\bm{g}_{\bm{x^{\prime}u}}^{\top}\mathbf{f}_{\bm{u}}+\bm{g}_{\bm{uu}}\right), (A10) \mathbf{f}_{\bm{xu}}=\bm{g}_{\bm{x}^{\prime}}^{\dagger}\left(\mathbf{f}^{\top}_{\bm{x}}\bm{g}_{\bm{x^{\prime}x^{\prime}}}\mathbf{f}_{\bm{u}}+\mathbf{f}^{\top}_{\bm{x}}\bm{g}_{\bm{x^{\prime}u}}+\bm{g}_{\bm{x^{\prime}x}}^{\top}\mathbf{f}_{\bm{u}}+\bm{g}_{\bm{xu}}\right). (A11) In this work, we employ the implicit Euler solver, defined as \bm{g}\left(\bm{x},\bm{x}^{\prime},\bm{u}\right)=\bm{x}^{\prime}-\bm{x}-h\bm{f}\left(\bm{x}^{\prime},\bm{u}\right)\,, (A12) where h\in\mathbb{R}^{+} is the integration step. The first-order derivatives of ( A12 ) can be computed as \bm{g}_{\bm{x}^{\prime}}=\bm{I}-h\bm{\nabla}_{\bm{x}}\bm{f}\left(\bm{x}^{\prime},\bm{u}\right)\,, (A13) \bm{g}_{\bm{x}}=-\bm{I}\,, (A14) \bm{g}_{\bm{u}}=-h\bm{\nabla}_{\bm{u}}\bm{f}\left(\bm{x}^{\prime},\bm{u}\right)\,. (A15) Finally, the second-order derivatives of ( A12 ) can be computed as \bm{g}_{\bm{x}^{\prime}\bm{x}^{\prime}}=-h\bm{\nabla}^{2}_{\bm{x}\bm{x}}\bm{f}\left(\bm{x}^{\prime},\bm{u}\right)\,, (A16) \bm{g}_{\bm{u}\bm{u}}=-h\bm{\nabla}^{2}_{\bm{u}\bm{u}}\bm{f}\left(\bm{x}^{\prime},\bm{u}\right)\,, (A17) \bm{g}_{\bm{x}^{\prime}\bm{u}}=-h\bm{\nabla}^{2}_{\bm{x}\bm{u}}\bm{f}\left(\bm{x}^{\prime},\bm{u}\right)\,, (A18) while the remaining mixed derivatives are zero.