Parametric optimization problems are considered for serial robots with regenerative drive mechanisms. A subset of the robot joints are conventional, in the sense that external power is used for actuation. Other joints are energetically self-contained passive systems that use (ultra)capacitors for energy storage. Two different electrical interconnections are considered for the regenerative drives, a distributed and a star configuration. The latter allows for direct electric energy redistribution among joints, a novel idea shown in this paper to enable higher energy utilization efficiencies. Closed-form expressions are found for the optimal manipulator parameters (link masses, link lengths, etc.) and drive mechanism parameters (gear ratios, etc.) that maximize regenerative energy storage between any two times, given motion trajectories. A semi-active virtual control strategy previously proposed is used to achieve asymptotic tracking of trajectories. Optimal solutions are shown to be global and unique. In addition, closed-form expressions are provided for the maximum attainable energy. This theoretical maximum places limits on the amount of energy that can be recovered. The results also shed light on the comparative advantages of the star and distributed configurations. A numerical example with a double inverted pendulum and cart system is provided to demonstrate the results.

## Introduction

Efficient energy utilization is a crucial factor in the design and operation of engineering systems. In motion control systems, excess mechanical energy associated from deceleration may be partially recovered by conversion to electricity, in what is commonly referred to as regeneration. The amount of energy that can be regenerated depends on motion path, system parameters, and external forces.

With the development of *ultracapacitors* [1] (also called supercapacitors) in the last decade, efficient means of storing and reusing electrical energy have become possible. Unlike batteries, ultracapacitors can be charged and discharged at high rates, are rated for currents as high as 1000 A in either direction and have very small internal resistances. Being lightweight, inexpensive and durable are other desirable properties of ultracapacitors. The total energy that can be stored in standard ultracapacitors is significantly smaller in comparison with batteries. However, recent developments of graphene-based ultracapacitors are bridging the gap between these ultracapacitor and batteries. The highly dynamic and bidirectional power transfer characteristics of ultracapacitors offer unique opportunities for to be used for energy regeneration.

Energy storage and return is a main focus in modern prosthetics research. The pioneering work of Winter [2,3] showed that human knee motion involves an alternance of positive and negative power flows such that there is a net surplus during each normal walking cycle. As early as the 1980s, a MIT group sought to meet simultaneous control and regeneration objectives for prosthetic legs [4–6]. Interestingly, (conventional) capacitors were used as storage devices, and the results suggested the need for larger capacitances, which were not attainable at the time. More recently [7,8] have also used electrical storage for the purpose of energy regeneration in prosthetic legs. In addition to electrical storage, hydraulic accumulators [9,10] and elastic elements [11–13] have also been used.

The research literature has reported efforts to achieve energy savings in manipulators for several decades. Finding the energy-optimal trajectories for point-to-point operations appears among the earliest efforts. This includes planning strategies for cooperative multi-robots. Energy-optimal path planning is the predominant theme.

Agrawal and Agrawal [14] considered optimal design features (such as spring placement) in a two-link robot resembling a leg prosthesis in swing phase. Power consumption was minimized to reduce powered actuation requirements. Altuzarra et al. [15] formulated a multi-objective optimization problem targeting workspace volume, dexterity, and power requirements, with respect to the dimensions of a parallel manipulator. This is related to the more general parameter optimization proposed in Sec. 5. Li et al. considered a master-slave mechanism intended for rehabilitation, where power is exchanged among the master and slave motors and the user. An external supplementary power source is used. That work did not consider energy storage in ultracapacitors. Izumi and coworkers [16,17] aimed at saving energy in a robotic manipulator by minimizing dissipation losses. A capacitor was used to store energy and the author pointed out the need for larger capacitance. The problem was formulated only as optimal path planning, however, and the control aspect nor the effect of regeneration due to external forces are considered.

Recently, a framework was proposed to analyze and design ultracapacitor-based regenerative control systems in robots [18,19]. The papers consider serial manipulators where some joints are driven by ultracapacitor-based actuation systems, while external electric power is used to drive the remaining joints. The papers proposed a *semiactive virtual control* (SVC) strategy suitable for these systems. Moreover, the amount of energy stored in each ultracapacitor was determined explicitly, which leads to the tractable optimization problems presented here. Based on this framework, several papers have been published [20–22] that use evolutionary techniques to optimize drive mechanism parameters of a regenerative lower-limb prosthesis.

Using the same framework, this paper formulates and solves relevant parametric optimization problems for robots with a fairly generic type of electromechical drive system. Stored energy in a time interval is maximized with respect to robot parameters (link lengths, link masses, etc.) and the regenerative drive system parameters (gear ratios, etc.). Closed-form solutions are found for each problem. In each case, solutions are shown to be global and unique. In addition, closed-form expressions are given for the maximum attainable energy. This maximum places theoretical limits on the amount of energy that can be regenerated. The paper also extends the results of Richter [18] by introducing a new kind of electrical interconnection of the drive systems, termed *star* configuration. This configuration allows direct power transfer across robotic joints. Intuitively, power surpluses from decelerating joints may be channeled to other joints currently demanding power, thus making the system more efficient by minimizing the role of dissipation in the attainment of motion control objectives.

The rest of this paper is organized as follows: In Sec. 2, the governing equations for general robotic manipulators with regenerative drive systems are derived. Section 3 presents the semiactive virtual control strategy. In Sec. 4, explicit equations for the energy stored in the semiactive joints are derived for the two configurations. Section 5 formulates and solves the parametric optimization problems. In Sec. 6, an example is provided to demonstrate the results of the paper. Finally, Sec. 7 concludes with interpretations and remarks regarding the results obtained.

## Modeling

where *q* is the $n\xd71$ vector of joint coordinates, $D\xb0(q)$ is the inertia matrix, $C\xb0(q,q\u02d9)$ is a matrix accounting for Coriolis and centrifugal effects, $R\xb0(q,q\u02d9)$ is a general nonlinear damping term, $T$ is the vector of external forces and moments reflected to the manipulator joints, $g\xb0(q)$ is the gravity vector, and *τ* is the vector of joint forces and moments applied by a set of actuators termed joint mechanisms (JM).

In this context, JMs are considered to be *fully active* or *semiactive*. A fully active JM exchanges mechanical power with the robot and electric power with an external source. Conventional electric drives for robots are thus fully active. On the other hand, a semiactive JM only exchanges mechanical power with the robot [18]. Semi-active JMs are passive systems composed of an energy-storing element, a power conversion element (PCE), and a mechanical stage. Without the loss of generality, the first *e* joints of the robotic manipulator are assumed to be semiactive, while the remaining *n–e* joints are fully active. Figure 1 illustrates the concepts of fully active and semiactive JMs. The storage element is responsible for providing energy to the robotic manipulator or possibly storing excessive energy from the robotic manipulator through the semiactive JM. The storage element is connected to the rest of the system with a PCE for the purpose of power transmission, regulation, and possibly to convert power between two domains [19]. The robot is connected to the semiactive JM through the mechanical stage.

Depending on the arrangement of the storage elements of semiactive JMs, two configurations can be considered, the *distributed configuration* and *star configuration*. In the distributed configuration, each semiactive JM has a separate storage element which is only connected to other storage elements through dynamic interaction with the robot. In contrast, the star configuration has all the semiactive JMs connected in parallel with a single storage element. Figures 2 and 3 illustrate the distributed and star configurations for semiactive JMs.

### Semiactive Joint Mechanism Modeling.

In this paper, bond graphs [23] are used to facilitate the representation and equation derivation of interconnected subsystems. Bond graphs are a suitable tool for modeling and studying energy storage and power flow in physical systems across different domains. An electromechanical JM with an ultracapacitor as the storing element and a direct current (DC) motor/generator as the main PCE is considered. The bond graph model, however, can capture a wide variety of JMs in different domains (hydraulic, pneumatic, etc.). Figure 4 shows the bond graph model of the semiactive JM in both the star and distributed configurations. Each link of the robot with a semiactive JM is connected to a transmission with inertia *m _{j}* and viscous damping coefficient

*b*. The parameter

_{j}*n*is the velocity ratio. The output of the transmission is connected to a DC motor/generator. Parameter

_{j}*α*is the torque constant of the DC motor. The inertial and frictional effects of the motor/generator are assumed to have been reflected to the link side, and already included in

_{j}*m*and

_{j}*b*. Power transferred to the electrical side of the motor/generator is distributed as resistive losses in the armature wiring, a switchable overcharge resistor and as stored energy in the ultracapacitor (with capacitance

_{j}*C*). A power modulation element (PME) is used to control the amount and direction of power flow to the storage element. The parameter

*r*is the modulation index. Here, a DC to DC converter is used as the PME. Since the PME does not produce power, the value of the modulation index is assumed to be constrained to $[\u22121,1]$. A value $rj<0$ corresponds to reversing the polarity of the PME on the DC motor side. Dissipation on the electrical side can be increased when necessary by switching in a control resistor

_{j}*R*. This resistance can be used to limit charge buildup in the ultracapacitor.

_{sj}*y*) is chosen as the state. Using bond graph methodology, the state equation for the

_{j}*j*th semiactive JM is found to be

*s*takes on binary values to switch the overcharge resistor. For the remainder of the paper,

_{j}*s*is assumed constant for all semiactive JMs. For the star configuration, the state variable is chosen to be the charge (

_{j}*y*) of the single capacitor. The state equation for the star configuration is found to be

### Augmented Model.

*j*th semiactive joint, the interfacing torque or force

*τ*can be derived from the bond graph representation of Fig. 4

_{j}*V*

_{cap}is the capacitor voltage. For the distributed configuration $Vcap=(yj/Cj)$ and for the star configuration $Vcap=(y/C)$. Replacing

*τ*from Eq. (4) into equation Eq. (1) and absorbing the terms containing $q\u02d9$ and $q\xa8$ into the right-hand side, the augmented model is obtained

_{j}*D*and $R$ satisfy the following relations:

The *j*th fully active joint is directly controlled with *u _{j}*. For the semiactive JMs,

*u*equals $(ajrj/Rj)Vcap$, and the control is achieved with the SVC method summarized next.

_{j}## Semi-Active Virtual Control Strategy

*virtual control law*is first designed for

*u*in the augmented model of Eq. (5). Let this design be $u=\tau d$. For the fully active joints, this law is enforced directly, using externally powered servodrives. For the semiactive joints, the control input is of the form $uj=(ajrj/Rj)Vcap$. The modulation index

*r*is adjusted so that the following relation is always satisfied:

_{j}From Eq. (8), it is seen that the modulation index is always finite if the capacitor voltage is not zero. As with any system with finite on-board power storage, operation must be stopped once charge (indicated by *V*_{cap}) drops below an acceptable threshold and the system recharged. It is important to note that self-sustained operation or even charge buildup can occur, depending on system parameters and trajectories [18,19].

## Energy Storage

*y*/

_{i}*C*) to obtain

_{j}*t*

_{1}and

*t*

_{2}, yields an

*internal energy balance equation*for the

*j*th capacitor

where *P _{Rj}* is the Joule power dissipated in the resistive elements, and

*K*is the kinetic energy of the semiactive JM. It is seen from Eq. (11) that the energy stored in the capacitor equals the work done by interface torque $\u2212\tau j=Tj$ minus the sum of the energy dissipated by the JM's resistor, the kinetic energy stored in the JM, and the energy dissipated due to friction in the JM.

_{j}In this case, the energy stored in the capacitor equals the work done by all interface torques $\u2212\tau j=Tj$ minus the sum of the kinetic energy stored in all the JMs and the energy dissipated by the all the semiactive JM's as Joule losses and friction.

where *W*_{act} is the work done by the fully active JMs, *W*_{ext} is the work done by the external forces and moments, $\Delta EmT$ is the sum of the total mechanical energy of the robot and the mechanical energy of all the semiactive JMs, $\Sigma mT$ is the total mechanical dissipation in the robot and the semiactive JMs, $\Delta Es$ is the energy stored in the capacitor(s), and Σ* _{e}* is the Joule losses in the all the semiactive JMs. This equation shows that the energy stored in the capacitor(s) is the net result of

*W*

_{act},

*W*

_{ext}, and $\Delta EmT$ minus all losses.

### Star-Distributed Storage Equivalence Under Semiactive Virtual Control.

An interesting point can be inferred from comparing Eqs. (10) and (12). The energy stored in the common capacitor of the star equation is equal to the sum of the energies stored in all of the capacitors of the distributed configuration. This is a direct result of SVC. As long as perfect virtual matching is guaranteed, the energy stored does not depend on the capacitance or the configuration used. It only depends on drive mechanism parameters (*a _{j}*,

*R*), joint trajectory (

_{j}*q*), and the designed control (

_{j}*τ*). From Eq. (5),

^{d}*τ*is in turn a function of the manipulator parameters (link masses, lengths, etc., contained in

^{d}*D*, $C\xb0,\u2009R$, and $g\xb0$), drive mechanism parameters, external forces, and joint trajectories. These are the factors effecting energy storage. Finding optimum values for manipulator parameters and drive mechanism parameters when trajectories are predefined is the main focus of this paper. Finding optimal trajectories for predefined parameters is discussed in upcoming publications by the authors.

From the above discussion, the advantage of using either the star configuration or the distributed configuration is not in the amount of energy stored. Rather, practical issues like cost, size limitations, and discharge or overcharge prevention can be overriding factors. As will be seen in Sec. 6, one clear advantage of the star configuration is that the power can be redistributed among JMs, preventing capacitor discharge.

## Parametric Optimization Problems With Explicit Solutions

This section presents the formulation and explicit solution of various key parameter optimization problems for the distributed and star configurations. In all cases, the objective function is the energy stored in the capacitor(s) between any two fixed time instants. We assume that *τ ^{d}* has been designed so that

*q*asymptotically tracks a given reference trajectory

*q*. The approach of this paper is to evaluate the stored energy at $q(t)=qd(t)$ for the purposes of maximizing it. The related problems of determining optimal trajectories

^{d}*q*and optimal controls for fixed robot parameters are treated in a separate publication by the authors.

^{d}*Y*is the

_{j}*j*th row of the regressor, and $\theta p\xd71$ is the parameter vector.

*θ*contains all the physical parameters related to the robotic manipulator (link lengths, link masses, etc.). For clarity, when referring to the

*θ*parameters, we use the term

*parameter vector*and when referring to the actual masses and lengths that make up the parameter vector, we use the term

*physical parameters*. Using this equation in conjunction with Eqs. (4) and (7), any virtual control strategy that provides asymptotic tracking of reference trajectories must satisfy

In addition, to the parameter vector, Eq. (16) also contains the parameters related to the semiactive JMs (gear ratio, torque constant, etc.). We refer to these parameters as *JM parameters*. The parameter vector and JM parameters are design variables. The objective is to find optimal values for these parameters that maximize energy storage. Replacing *τ ^{d}* from Eq. (16) in Eq. (10) or Eq. (12) depending on the configuration, the energy stored in the capacitor(s) is expressed in terms of the parameter vector and JM parameters. Two problems leading to explicit solutions with global properties are considered: (i) optimization for the parameter vector Θ; (ii) optimization for JM parameters

*n*, $(\alpha j2/Rj)$. In Secs. 5.1 and 5.2, solutions to these problems are discussed. Some notations used in this paper are now introduced:

_{j}Let $G(i1:i2,j1:j2)$ denote the submatrix of *G* consisting of the intersection of rows *i*_{1} through *i*_{2} and columns *j*_{1} through *j*_{2}. $G(i1:i2,j)$ denotes the intersection of rows *i*_{1} through *i*_{2} and column *j*. In addition, $G(:,j)$ and $G(i,:)$ denote the *j*th row and *i*th column of *G*, respectively. We also use $V(i:j)$ to denote the subvector of *V* consisting of elements *i* through *j*.

### Optimization for the Parameter Vector.

In this section, two subproblems are presented: (i) optimization for a single semiactive JM, where we aim to maximize the energy stored by the *j*-th JM, (ii) optimization for all semiactive JMs, where we aim to maximize the energy storage of all JMs. These two problems can be defined for both configurations. For the distributed configuration, Problem (i) is equivalent to maximizing the energy stored in the capacitor of the *j*th semiactive JM. Problem (ii) is equivalent to maximizing the energy stored in all the JM capacitors. Pertinent to the star configuration, Problem (i) is equivalent to maximizing the energy flowing through the *j*th semiactive JM and stored in the common capacitor, and Problem (ii) is equivalent to maximizing the energy stored in the common capacitor.

#### Optimization for a Single Semiactive Joint Mechanism.

*I*is

*θ*. Therefore, this problem admits a unique global maximum provided $G$ is positive definite. A closer inspection of $G$ reveals that it has the form of a Gram matrix. The Gram matrix is a square matrix

Thus, $G$ is always positive-definite and invertible as long as $Yj1\u2026Yjp$ are linearly independent.

*Y*. Note that if any of the elements

_{ji}*Y*are zero, then, the stored energy is independent of the parameter

_{ji}*θ*, and the optimization problem is ill-defined. Initially, optimization with respect to the whole parameter vector is considered. The case of optimizing with respect to a subvector of the parameter vector is considered afterward. From the above discussion, we conclude that as long as the elements $Yji\u22600$ optimization with respect to the whole parameter vector is well defined and admits a unique global maximum. By taking the derivative of Eq. (18) with respect to the parameter vector and equating it to zero, the optimal parameter vector $\theta *$ is obtained

_{i}The above equation provides a limit on the maximum amount of energy that can be stored by varying the parameter vector. If this value is negative, capacitors will always discharge, regardless of how the parameter vector is chosen, signaling fundamental limitations (induced by the reference trajectories, external forces, and JM parameters). In these situations, the optimal parameter vector will move toward physically unrealizable or impractical values.

*θ*s (corresponding to

_{i}*Y*= 0). For these cases, it is necessary to consider the problem of optimizing with respect to part of the parameter vector. The parameter vector

_{ji}*θ*can be rearranged as $\theta p\xd71=[\theta \xafz\xd71,\theta 0]T$, where $\theta \xaf=\theta (1:z)$ contains the entries to be optimized. $G$ can also be partitioned as

*I*can also be partitioned as $I=[I1,I2]T$, where $I1=I(1:z)$ and $I2=I(z+1:p)$. The stored energy of Eq. (18) can be written as

*θ*, and the optimization problem is ill-defined. The

_{i}*θ*s corresponding to zero elements of $Y\xaf$ should be placed in

_{i}*θ*

_{0}. Taking the derivative of Eq. (28) with respect to $\theta \xaf$ and equating to zero, the optimal parameters $\theta \xaf*$ is obtained

#### Optimization for all Semiactive Joint Mechanisms.

It is worth noting that these results can also be extended to the case of optimizing for more than one but not all the JMs by simply changing the value of *e* to the number of JMs of interest.

*θ*is rearranged as $\theta p\xd71=[\theta \xafz\xd71,\theta 0]T$, where $\theta \xaf=\theta (1:z)$ contains the entries to be optimized. $G\u0302$ is partitioned according to Eq. (27), and the vectors $H$ and

*I*are partitioned as before. The storage energy of Eq. (31) can be written as

*θ*corresponding to zero columns of $Y\xaf$ should be placed in

_{i}*θ*

_{0}. Taking the derivative of Eq. (36) with respect to $\theta \xaf$ and equating to zero, the optimal parameters $\theta \xaf*$ is obtained

Equation (38) indicates that $\theta *$ is a weighted average of $\theta (j)*$ s where the weights are $(2Rj/aj2)G(j)$.

*Practical considerations*: This section provided closed from, global and unique solutions to the problem of finding the optimal parameter vector that maximizes energy storage. In some cases, however, the optimal parameter vector might not be physically realizable. The problem of finding a set of physical parameters from the parameter vector is in general a nonlinear problem that could have one, infinite, or no solution. To guarantee a physically realizable solution to the parameter vector, constraints could be defined. However, feasibility constraints are in general nonconvex. Solving a quadratic convex optimization problem with nonconvex constraints is considered to be NP hard [27], and it inherits all the problems associated with nonlinear nonconvex optimization problems (uniqueness, local optima, etc.). However, unfeasible solutions are still of significant value. They provide the direction in which the parameter vector can be changed in order to increase the amount of energy storage. Since the objective functions of Eqs. (30) and (17) are convex with respect to the parameter vector, moving toward the respective global optimum will always increase the amount of energy storage.

Unfeasible solutions could also be an indication of unsuitable reference trajectories and or a poor selection of JM parameters. Equation (34) shows that varying the JM parameters can move the optimal parameter vector in the parameter space, possibly from an unfeasible region into a feasible region. Modifying the JM parameters and reference trajectories could be an alternative approach when faced with unfeasible solutions.

### Optimizing With Respect to Joint Mechanism Parameters.

This section presents and explicitly solves the problem of maximizing the energy storage with respect to *j*th semiactive JM parameters. These parameters include the gear ratio *n _{j}* and composite parameter, $\gamma =(\alpha j/Rj)$, referred to as the

*DC motor parameter*. For the distributed configuration, the problem is formulated as in Eq. (17). For the star configuration, since the semiactive JM parameters only show up in the

*j*th term of Eq. (12), the problem is equivalent to that of the distributed configuration. For the distributed configuration, this problem corresponds to maximizing the energy stored in the capacitor of the

*j*th semiactive JM. It also corresponds to maximizing the portion of the energy stored by the

*j*th semiactive JM in the common capacitor of the star configuration.

#### Optimizing With Respect to the Gear Ratio.

*n*and equating to zero (note that $aj=\alpha jnj$), the optimum gear ratio can be found as

_{j}The above expression in the parenthesis is equal to the denominator of Eq. (40). We conclude that if a solution exists for the first-order condition, such a solution will also be a maximum. The only points where the derivative does not exist is at *n _{j}* = 0 and $nj=+\u221e$. As $nj\u21920,\u2009\Delta Esj\u2192\u2212\u221e$. For the case where $nj\u2192+\u221e$, as long as the denominator of Eq. (40) is negative, $\Delta Esj\u2192\u2212\u221e$. Therefore, we conclude that when the denominator of Eq. (40) is negative, the optimal gear ratio calculated from Eq. (40) is a global maximum. In the case where the denominator of Eq. (40) is positive, there is no real solution to the first-order optimality condition. This implies that $(d\Delta Esj/dnj)$ is either strictly positive or strictly negative. As long as the denominator of Eq. (40) is positive, $(d\Delta Esj/dnj)$ is strictly positive. We can conclude that $\Delta Esj$ is an increasing function with respect to the gear ratio. Therefore, a larger gear ratio will result in a larger amount of energy regeneration in this case.

#### Optimization With Respect to the Direct Current Motor Parameter.

We see that the $(d\Delta Esj/d\gamma )>0$ indicating that $\Delta Esj$ is a increasing function with respect to *γ*. This means that a larger value for *γ* will result in a larger amount of energy regeneration. This fact helps us greatly in the selection of DC machines to enhance energy regeneration.

## Simulation Studies

Most industrial manipulators at the present time have three main degrees-of-freedom, and three degrees-of-freedom related to the wrist joint. These manipulators are usually classified based on the first three degrees-of-freedom of the arm [24]. The three main degrees-of-freedom are the ones with the most potential for energy regeneration. For these reasons, we consider a double inverted pendulum and cart, as shown in Fig. 5. The double inverted pendulum and cart example has complex coupled dynamics to show how energy can (directly and indirectly) flow through the robot and yet is clear enough to demonstrate the results of the paper. In addition, with minimal modifications, this example can represent an industrial SCARA robot moving on a slider. Assume that *q*_{3} is fully active, while *q*_{1} and *q*_{2} are semiactive. No external forces or moments are applied in this example. The regressor matrix *Y* and the parameter vector *θ* for this system are given in the appendix. An inverse dynamics controller [28] is used as the virtual design for asymptotic tracking. In the absence of uncertainties, inverse dynamics is a valid choice to meet the tracking objective. However, the results of this paper are valid for any controller capable of achieving asymptotic tracking. The reference trajectories are shown in Fig. 6. For reasons explained in Sec. 5, these trajectories have been chosen so that the parameter vector optimization results in a positive energy storage. The initial parameter vector *θ*_{0} for this system is given by

The initial semiactive JM parameters are identical with $R=0.3\Omega ,\u2009\alpha =0.0302$ Nm/A, and $m=1\xd710\u22125$ kg/m^{2} (after typical commercial values). The gear ratios are chosen to be $n1=10$ and $n2=30$. JM friction is assumed to be negligible. The system is simulated with the initial parameter vector and JM parameters in the distributed and star configurations. The change in energy of the capacitors is shown in Fig. 7 for both configurations. It can be seen that as expected, because of perfect matching in SVC, the energy stored in the capacitor of the star configuration is equal to the sum of the energies stored in the capacitors of the distributed configuration. For the sake of conciseness, only the final energy storage results for the distributed configuration are reported here. In the nonoptimized case of the distributed configuration, the change in energy of the first- and second-semiactive JM capacitors are equal to −181.1 J and −1.23 J, respectively, for the period of the simulation. The modulation index histories for both semiactive JMs and for both configurations are also shown. It is observed that the initial charge in the capacitors is enough to keep the modulation indices between −1 and 1. Its worth noting that because of the short period of the simulation, the modulation indices for the star and distributed are very close. However, as the simulation time is increased (the capacitor voltages change by a significant amount), the differences will become more clear. Power flows according to Eq. (11) are computed for the first- and second-semiactive JMs in the distributed configuration and are shown in Fig. 7. Again SVC dictates that the power flows be exactly the same for the star configuration. Power will flow to the capacitor(s) when the power going from the manipulator to the semiactive JM ($\u2212\tau q\u02d9>0$) exceeds the losses (*P _{R}*) and the changes in kinetic energy ($dK/dt$). It is seen from this figure that for the first semiactive JM, power going from the manipulator to the semiactive JM is all lost as Joule losses in the resistor. For the second-semiactive JM, there is bidirectional of power flow between the manipulator and the JM.

*j*= 1) with respect to the first five elements of the manipulator parameter vector (

*z*= 5,

*p*= 9). The optimal parameter vector is calculated directly from Eq. (29)

Simulation results are shown in Fig. 8. It is seen that as a result of the optimization, the energy in the capacitor of JM1 is increasing. Compared to the previous case (with initial parameters), Joule losses have decreased significantly, therefore, allowing positive energy storage. However, the energy in the capacitor of JM2 is decreasing at a faster rate compared to the previous case. At the end of simulation, the energy stored in the capacitors of JM1 and JM2 are equal to 1.48 J and −14.57 J, respectively. The problem of finding physical parameters from the parameter vector does not admit a unique solution. The feasibility conditions for this system can be expressed as

It can be verified that $\theta case1*$ satisfies the above conditions. After finding the physical parameters corresponding to the parameter vector, the external energy balance is computed according to Eq. (14) and is shown in the Sankey diagram [29] of Fig. 9. From this figure, it can be seen that most of the energy being injected to the system is being dissipated as electrical losses (86.28%) and only a small portion (7.84%) is stored in the capacitor of JM1.

*e*= 2,

*z*= 5,

*p*= 9). The objective function is defined as in Eq. (30). The optimal parameters are calculated from Eq. (34)

Simulation results for case 3 are shown in Figs. 10 and 11. Compared to case 1, electrical losses of JM1 and JM2 have decreased, resulting in a significant decrease in total losses. At the end of simulation, the change in energy of the capacitors is equal to −1.82 J for JM1 and 0.84 J for JM2. The external energy input has also decreased significantly, from 18.85 J for case 1 to 3.38 J for the current case. Even with the decrease of input energy, the losses consist of $42.58%$ of the input energy, which is a significant decrease compared to $86.28%$ for case 1.

*e*= 2,

*z*= 5, and

*p*= 9

*n*

_{2}. At the end of simulation, the change in energy of the capacitor for JM1 is 1.25 J. For JM2, the change in energy is −0.59 J. A total of 0.66 J energy is gained. The main advantage of using the star configuration over the distributed configuration is clear in this example. Using the distributed configuration results in a charge build up in JM1 and a decrease in the charge of JM2. This trend will continue until exact virtual control matching according to Eq. (8) is no longer possible. This occurs if $Vcap=0$ or $|r|>1$. Using the star configuration, power regenerated by JM1 into the common capacitor can be supplied to JM2. This results in a total gain of energy 0.66 J for the capacitor, thus never violating the virtual matching conditions and allowing the system to work indefinitely. Figure 14 shows the current flows of the JMs in this case. In the star configuration, when the sign of the currents are opposite, current is flowing from one JM to the other.

In the previous case, it was seen that gear ratios have a great effect on energy regeneration. For case 5, we consider the problem of optimizing the gear ratios. In this case, the parameter vector is considered to be constant and equal to $\theta 4*$. The optimal gear ratios calculated from Eq. 40 are equal to $n1*=39.89$ and $n2*=158.25$. Simulation results are shown in Figs. 15 and 16. A power balance shows a further decrease in electrical losses compared to the previous cases. At the end of the simulation, the change of energy of the capacitor is 1.93 J for JM1 and −0.48 J for JM2. Th Sankey diagrams for cases 4 and 5 have the same input energies. However, in the Sankey diagram of case 5, the electrical losses have decreased from 41.15% to 14.98% of the input energies. This decrease in losses (26.17%) has led to a direct increase in storage energy (26.17%).

## Concluding Remarks

Global closed-form solutions were found for stored energy maximization with respect to the parameter vector and JM parameters. Solutions were found for two different configurations: star and distributed. It was shown that the optimization problems under consideration are equivalent for the star and distributed configurations, but have different implications for each case. For instance, maximizing the energy stored in the capacitor of the *j*th semiactive JM in the distributed configuration, is equivalent to maximizing the portion of energy stored in the common capacitor by the *j*th JM in the star configuration. This is a direct result of the exact virtual matching associated with SVC. In fact, SVC makes energy storage independent of the type of configuration and the value of capacitance used. The main advantage of using the star configuration is that energy can flow from a JM currently gaining energy to a JM currently losing energy, thus allowing for a longer periods of operation (possibly operating indefinitely). Stored energy is a function of reference trajectories, external forces, the parameter vector, and JM parameters. The problem of finding optimal parameters with predefined reference trajectories and external forces is the focus of this paper. The converse problem of optimal motion and external force trajectories with predefined parameters is the focus of upcoming publications by the authors.

An optimal solution for the parameter vector does not necessary lead to a feasible solution for the corresponding physical parameters. Defining constraints is not a viable solution to this problem since feasibility conditions are in general nonlinear and nonconvex, and solving a convex problem with nonconvex constraints is considered to be NP hard. This is a limitation of the results of this paper. However, even when the feasibility conditions fail, the unfeasible solution still provides a direction to change the parameter vector to improve regenerative energy storage. In the example, the parameter vector is varied in the direction of the unfeasible solution until one or more of the feasibility conditions fail. The resulting parameter vector, however sub-optimal, improves energy storage significantly in comparison to the baseline. In addition, unfeasible solutions can be an indication of unsuitable reference trajectories or JM parameters. An alternative approach when confronted with unsatisfactory solutions is to modify the reference trajectories and/or the JM parameters. Closed-form expressions for the optimal parameter vector show how JM parameters can be changed to move the parameter vector from an unfeasible region to a feasible region.

Closed-form expressions are also given for the optimal JM parameters. It is seen that if an optimal gear ratio exists, it is unique and corresponds to a global maximum. When the optimal gear ratio does not exist, stored energy increases monotonically with gear ratio. Energy storage was also shown to be strictly increasing with respect to DC motor parameter, *γ*. This is an important design factor for selecting DC machines for regenerative applications.

Our work assumes that all capacitors start with some initial charge. The methods and results of the paper allow to predict, and moreover, optimize the operating time before recharging becomes necessary. This corresponds to the practical case of mobile robots, which are not connected to external sources of energy. In industrial robots, some joints could be powered by external sources while others could be interconnected to capacitors using the configurations discussed in the paper. Again, the methods of the paper can be used to guide the choice of configuration and to minimize net energy consumption from external sources. When fully active joints are present, it is possible that they constantly replenish the capacitors of the semi-active joints to produce a net positive charging trend. A net charging trend could be desirable for extended operating times in systems with on-board storage, however, ultracapacitors become damaged if overcharged. To prevent over-charging, regenerated energy can be stored using an additional backup capacitor, or dissipated in a control resistor *R _{s}* by using a simple thermostat-like switching logic.

Whether a joint should be fully active or semi-active depends greatly on the manipulator, the trajectories followed and the configuration used for the semi-active joints. In general, if in the distributed configuration, the joints that have potential for energy return can be semi-active. Even if the total energy return over a complete cycle of operation is negative (the joint consumes power), external power can be used to recharge the capacitors. Because of the partial energy return, making those joints semi-active will reduce the overall energy consumption of that joint. In the star configuration, the joints with an excess of power can be connected to joints with the need for power to reduce the overall energy consumption. One can make all the joints semi-active to make power exchange possible between all the joints and use an external power supply too charge the common capacitor if its charge becomes lower than a certain threshold value. The results of this paper are useful tools for evaluating the energy regeneration capabilities of each of the joints to decide which joint should be semi-active and also what configuration should be used. Moreover, other considerations such as cost, capacitor size, and space constraints can be deciding factors in choosing between fully active and semi-active JMs.

The solutions presented in this paper are straightforward to use and eliminate or reduce the need for heuristic numerical computations. They also provide valuable insight into the limits and practicality of regenerative energy systems.

## Funding Data

National Science Foundation (Grant Nos. 1344954 and 1536035).

### Appendix

*Y*and

*θ*are given using a shorthand notation for trigonometric functions ($ci=cos(qi)$; $si=sin(qi)$; $cij=cos(qi+qj)$; $sij=sin(qi+qj)$)

where $\theta 1=h1M1\u2212l1(M1+M2),\u2009\theta 3=I1+M1(l1\u2212h1)2+l12M2,\u2009\theta 9=M1+M2+M3$ and $\theta 5=M2h22+I2$.