Feedback Control Design for Robust Comfortable Sit-to-Stand Motions of 3D Lower-Limb Exoskeletons

Lower-limb exoskeletons provide people who suffer from lower limb impairments with an opportunity to stand up and ambulate. Standing up is a crucial task for lower-limb exoskeletons as it allows the user to transfer to the exoskeleton from a wheelchair, with no assistance, and can be a precursor to walking. Achieving a safe sit-to-stand motion for the exoskeleton + user system can be challenging because of the need to balance user comfort while respecting hardware bounds and being robust to changes in the user characteristics and the user’s environment. We successfully achieve safe sit-to-stand motions by using constrained optimization to generate two types of dynamic sit-to-stand motions based on two hybrid system descriptions for the exoskeleton, Atalante. Due to the highly constrained nature of the equations of motions, we introduce a method to systematically design virtual constraints for highly constrained systems. We also design two quadratic program-based computed-torque controllers to achieve the sit-to-stand motion and to safely come to a stop in a standing position. We then analyze the closed-loop behaviors of the two sit-to-stand motions under the two controllers using physically motivated robustness tests. The criteria used to determine a successful sit-to-stand motion are: tracking error, the pitch acceleration of the torso, the amount of user force needed to perform the motion, and the adherence to the Zero Moment Point (ZMP), friction, and joint constraints.


I. INTRODUCTION A. MOTIVATION
Lower-limb exoskeletons are assisting patients with mobility impairments, such as the elderly or people with paraplegia. Mobility restoration is achieved by the exoskeleton acting in parallel with the user's limbs and augmenting their joint torques [1]. This external assistance is allowing patients to carry out day-to-day activities that would be otherwise difficult to autonomously achieve in a wheelchair. Various studies have shown that allowing a user to stand and ambulate has positive psychological and physical benefits [2]- [5].
Lower-limb exoskeletons can be active or passive, stationary or non-stationary, and crutch-assisted or hands-free The associate editor coordinating the review of this manuscript and approving it for publication was Ning Sun .
(aka, crutchless). Furthermore, the assistance provided by the exoskeleton can be in the form of assist-as-needed or complete assistance. Assist-as-needed exoskeletons require the user to have some mobility in their lower limbs. Most if not all of the lower-limb exoskeletons on the market require the user to have good control over their upper body [6]- [9].
To enable a user to make the transition from a wheelchair to a lower-limb exoskeleton without any outside assistance, the exoskeleton needs to start from a sitting position. As a result, it's imperative to develop proper trajectories and algorithms that will enable the exoskeleton to stand up in a robust manner. In this study, robustness will be interpreted as (i) insensitivity to variations in user mass and inertia properties, (ii) operability over a range of chair heights, (iii) functions for a range of patient spasticity, and (iv) the ability to handle variations in the torque provided by the powertrain of the exoskeleton.

B. LITERATURE REVIEW
It is convenient to divide algorithms for sit-to-stand into three main parts: A) modeling the exoskeleton + human system (exo-system), B) generating the motion, and C) executing the motion.
The model of the exo-system can be based either on an approximation of its full dynamics or on a significantly simplified representation. Arguing that the sit-to-stand motion occurs mostly in the sagittal plane, the literature mostly models the exo-system as a planar 3-link inverted pendulum consisting of either the shank, thigh and HAT (head, arm, and trunk) [10]- [15] or the shank, thigh, HAT, and feet [13], [16]- [23]. The underlying assumptions for these simplifications are joint symmetry, feet fixed on the ground, and no movement of the neck and head relative to the torso.
While these low degree-of-freedom models simplify the sit-to-stand problem, they typically prevent the assessment of the full capabilities of the exoskeleton. Furthermore, it may not be possible to explicitly apply some design constraints and thus one cannot truly ensure that real hardware requirements are respected. This work will therefore use a high degree-of-freedom 3D model of the exoskeleton and will, for instance, be able to assess the effect of asymmetry in patient spasticity.
When formulating a sit-to-stand controller design, it is very important to determine whether the exoskeleton will be providing complete assistance or only assistance as needed. Trajectory tracking is generally employed to achieve standing motions for complete assistance, whereas, with assistance as needed, it is important to first estimate the user's intent and then complement the user's effort [16], [19], [24], [25]. This paper focuses on complete assistance.
Numerous approaches to generating trajectories for tracking have been followed in the literature, such as basing the motion on previously recorded human movement [26]- [29], using hand-crafted trajectories [10], [18], [19], [30], [31], or trajectories generated through optimization or dynamic movement primitives. Generating trajectories based on human motion is applicable only if the exo-system does not have significantly different kinematic and mass properties in comparison to a human. Hand-crafted trajectories are applicable when only a few joint trajectories are needed, such as with simplified models; of course, they may not take full advantage of the exoskeleton's capabilities. The use of dynamic movement primitives [15] or optimization methods such as the minimum jerk criterion [17], [30], constrained optimization [32], [33], or genetic algorithms [14], [34], have been employed to address the disadvantages of other methods. For instance, a constrained optimization problem can ensure that a designed sit-to-stand motion explicitly accounts for torque bounds. In addition, Zero moment point (ZMP) or Center of Pressure (CoP) bounds can be included to ensure that the generated trajectory is feasible [19], [27], [31], [35] in terms of foot roll. This paper will use constrained trajectory optimization on a high degree-of-freedom model and nonlinear control for implementing the trajectories. The complexity of the resultant trajectory design problem will be addressed through a recent tool, Fast Robotics Optimization and Simulation Toolbox (FROST) [36]. The challenges of the nonlinear control of an over actuated highly constrained motion will be addressed through computed-torque control and a quadratic program (QP) [37]- [43] for torque distribution while respecting constraints.
Most exoskeletons are not able to support a sit-to-stand motion without outside assistance. In fact, to the authors' best knowledge there are only two hands-free exoskeletons on the market: REX [44], and Atalante [45]. This paper focuses on Atalante because a detailed model has been generously shared with the authors. Moreover, because Atalante has been explicitly designed for dynamic walking [46], it is interesting to seek dynamic standing trajectories that can be achieved with minimal user assistance, and no other assistance, or even no user assistance at all. A static sit-to-stand motion requires intermediate poses to be stable throughout the motion, while dynamic motion refers to a continuous trajectory, which, like a dynamic walking gait, does not guarantee stability at intermediate points of time. Even though the ''inherent stability'' of a static motion appears to be more desirable than a dynamic motion, the severe constraints required by the trajectory are often incompatible with hardware limitations (e.g., joint torque limits). External force from the user, either by pushing downward on the arms of a chair, crutches, or FES [12], have been used to achieve assisted sit-to-stand motions. Allowing for the user to apply an external force can enhance stability of the motion as well as user confidence in the motion.
Counting on an external force, however, comes at the cost of adding complexity to the design of the control system. This paper will assess the effects of imperfect application of the user's force and will seek to limit the force demands on the user.

C. CONTRIBUTIONS
The objective of the present work is to design user-assisted feedback-stabilized dynamic sit-to-stand trajectories for the exoskeleton, Atalante, shown in Figure 1, using its full dynamic model. This is a challenging design problem due to the complexity of the dynamical system and considerations such as user comfort and safety-critical constraints.
To address this challenge, innovations must be made in the three areas identified in Section I-B, namely modeling the VOLUME 9, 2021 exo-system, generating the motion, and executing the motion. Our contributions include: 1) Modeling the Exo-System • Our Contributions: Modeling the sit-to-stand motion using the full 3D exo-system.
• Literature: Only the sagittal plane portion of the sit-to-stand motion is captured, which leaves out the torque requirements on actuators in the frontal and transverse planes. 2) Generating the Motion • Our Contributions: An analysis of two types of dynamic sit-to-stand motions, chair-to-stand and chair-to-crouch-to-stand, based on hybrid system models and constrained optimization. The two motions are similar when the exo-system is sitting in the chair but differ when the exo-system is off the chair. The chair-to-stand motion simultaneously extends the joints and shifts the CoM forward, while the CoM is first shifted forward and then the joints extended in chair-to-crouchto-stand. The chair-to-stand motion is symmetrical and consists of motion mainly in the sagittal plane.
• Literature: The motions are generated for a simplified model of the exo-system. While both quasi-static and dynamic motions are studied, the dynamic motions are most similar to chair-tostand.

3) Executing the Motion
Control Objectives: • Our Contributions: We provide a novel and systematic way of choosing the control objectives for highly constrained systems in such a way that the objectives are not in conflict with the contact constraints. Since the resulting closed-loop system is underdetermined (aka, over actuated) and must satisfy real-time constraints on joint limits, torque bounds, and ground reaction forces, we combine quadratic programming with input-output linearization (QP I/O) to (robustly) achieve the sit-to-stand motion and to safely come to a stop.
• Literature: To the best of our knowledge, there currently isn't a way of systematically choosing control objectives for highly constrained systems. When we use the control objectives in [10], [14], [16]- [19], [22], [28], [49] and a QP-enhanced input-output linearizing controller from [10], [19], we find that a 0.02 m increase in chair height results in foot contact violations of over 100 N. Robustness Tests --Our Contributions: Physically motivated perturbation tests that help us analyze and compare the two sit-to-stand motions. In our tests, we subject our controller to the following perturbations: different users in the exoskeleton, different chair heights, zero user force, spasticity in the knee joints, and asymmetric motor torque outputs. From these tests we are able to assess ranges of variations in which the exoskeleton can operate. These ranges can be used to inform new hardware design or to further robustify the controller. The main results from the tests are: -It is possible to achieve unassisted sit-to-stand motions that meet user comfort constraints. However, we forgo this approach because the inclusion of user force gives the user confidence. -The chair-to-stand motion is better at handling changes in the chair height. -The chair-to-crouch-to-stand motion is better at rejecting perturbations that result in asymmetry such as spasticity in the knee joints, and asymmetric torque outputs -Both motions are equally capable of handling different users in the exoskeleton.
• Literature: The robustness tests do not cover the user or their affordances. Our method outlined in the contributions above, can be easily applied to other exoskeletons or humanoids. For instance, our novel way of choosing control objectives can be applied in [50] to choose objectives that are not in conflict with contact constraints in the double support phase. Additionally, our formulation for incorporating the user force can be extended to other motions with multiple contact points.

D. ASSUMPTIONS USED THROUGHOUT THE MANUSCRIPT
For clarity, we list in one place the assumptions used throughout the manuscript. The reasons behind individual assumptions are treated as they appear in the manuscript.
Assumptions made while generating the exo-system model: • rigid links • rigid drivetrain • the user does not generate a moment (in the body frame) when applying forces to the arms of the chair • at least 10 cm of space between the front of the chair and the back of the feet Assumptions made when generating the optimal motion: • a friction coefficient of 0.9 between each foot and the ground • a friction coefficient of 0.5 between the exoskeleton and the chair • a torsional friction coefficient of 100 between each foot and the ground Assumptions made in the execution of the motion: • after using the exoskeleton several times, the user will learn to provide the nominal force predicted by optimization • the controller must be robust to mismatches in the applied user force

E. OVERVIEW: MANUSCRIPT ORGANIZATION
We begin by discussing the dynamic model and the hybrid system problem formulation in Section II. We then utilize this information to form a constrained optimization problem in Section III. In Section IV, we introduce our method for systematically choosing control objectives. With the control objectives and constrained optimization problem defined, we generate the sit-to-stand motions and present them in Section V. Next, we design our controllers and prove their stability in Section VI. Finally, we analyze the robustness of the controllers in Section VII, compare our choice of control objectives to the literature in Section VIII, and discuss our conclusions and future work in Section IX.

II. DYNAMIC MODEL AND PROBLEM FORMULATION
In this section, we give a brief description of the exoskeleton Atalante and summarize our modeling approach. More specifically, we introduce two hybrid systems models along with a floating-base Lagragian model and stability constraints to ensure feasible sit-to-stand motions.

A. HARDWARE OVERVIEW
Atalante is a fully actuated hands-free lower-limb exoskeleton developed by Wandercraft for patients with paraplegia [45]. Each leg has six actuated joints: Encoders are located on each actuated joint and an inertial measurement unit is located at the torso; see Figure 1. The adjustable thigh and shank links on Atalante allow it to be worn by users ranging from 1.55 to 1.90 m and 50-90 kg. The Henke axis on Atalante is defined as a 38 o deviation from the horizontal axis of the foot's sagittal plane. There are four force sensors on the corner of each foot that allow for the detection of ground reaction forces (GRF). The exoskeleton is attached to the user via multiple straps on each leg and foot, and a belt/jacket set on the torso [45]. Atalante has been certified for use in the European Union (CE Marking), and is operational in various rehabilitation centers in France.

B. DYNAMIC MODEL
The floating base model of the exoskeleton has 18 degrees of freedom: the usual six degrees of freedom for position and rotation in 3D-space, plus the six degrees of freedom for each leg. The links are assumed to be rigid and the drivetrain from each motor to the corresponding joint is assumed to be rigid as well. Motor inertia and gearing are reflected to the associated link using standard methods [51]. In this study, the user is modeled by including additional mass and inertia rigidly attached to the exoskeleton's torso and legs and hence  [45]. the exo-system has the same number of degrees of freedom as the exoskeleton.
The overall floating-base Lagragian model takes the form where q is the vector of generalized coordinates, u is the torque input vector, D, C, and G are the inertia, Coriolis, and gravity matrices/vector, respectively, B is the torque distribution matrix, J is the Jacobian mapping the contact wrenches to the generalized coordinates, is the contact wrench associated with the exoskeleton's contact with the floor and the seat of the chair, ζ is the force provided by the user, and J ext is the jacobian that maps the provided user force to the generalized coordinates. Equation (2) gives the lagrange multipliers ( ) that are necessary to enforce the contact constraints. Note that (1) and (2) are similar to the equations presented in Chapter 6 of Murray et al [52].
The generalized coordinates are taken as where the first six elements are the components of the special Euclidean group, SE (3), with respect to a fixed (world) frame, and the next 12 are body coordinates representing the relative angles of the joints comprising the two legs; each of these joints is actuated. The assistive force from the user is defined to act at the top of the torso in the torso's body coordinate frame with components in the x, y, and z axes. It is assumed that there is no net moment generated by the user.

C. HYBRID MODELS
We first discuss the chair-to-stand motion, which is based on a hybrid system model with two domains, the sitting domain and the standing domain. A specific reference point on the exoskeleton, called the sitting-point, is used to establish the point of application of the contact wrench from the seat. The contact with the seat is modeled as a point contact and thus the contact wrench from the seat of the chair consists only of the contact force. The sitting domain has three contact points (chair, right foot, and left foot) while the standing domain has two (right foot and left foot). The standing domain is entered when the exoskeleton is no longer in contact with the seat.
Equations (1) and (2) (4) in the standing domain, and J = J sit := J stand J chair (5) in the sitting domain, where J right foot , J left foot , and J chair are the geometric contact constraint jacobians for the right foot, left foot, and chair respectively. The guard function that triggers the transition between the two domains is defined as follows where F z chair is the vertical component of the force from the seat. Since there is no impact during the transition from the sitting domain to the standing domain, the reset map is an identity matrix. The hybrid model for chair-to-stand is depicted in Figure 2. We next discuss a dynamic chair-to-stand motion similar to the quasi-static motion used in the literature, where the CoM is first shifted over the feet and then the joints are extended [10], [14]. In this case, the standing domain is divided into two separate domains governed by the same equations of motions, standing shift and standing extend. Note that the transition between the sitting domain and the stand shift domain is equivalent to the transition between the sitting and standing domain in the chair-to-stand hybrid model. The transition from standing shift to standing extend occurs after the ZMP is in the feet polygon; see Figure 4b. The reset map during this transition is the identity. We will refer to this hybrid model as chair-to-crouch-to-stand. The hybrid model for chair-to-crouch-to-stand is given in Figure 3. The motions derived from the chair-to-stand and chair-to-crouchto-stand hybrid system models are later compared for user comfort.

D. CONTACT FORCES AND MOMENTS
In all domains, constraints are imposed on contact forces and moments. For example, the vertical components of all contact forces must be non-negative, and in the sitting domain, there must be a minimum amount of weight supported by the feet so that the legs can contribute to a lifting motion, viz where F z feet is the total vertical component of the ground reaction force.
To avoid sliding and yawing, a linear friction cone and torsional friction constraints are used in all domains where F x · , F y · and F z · denote the components of the contact forces associated with the chair or the feet, µ · is an assumed friction coefficient for the chair or feet, γ feet is a torsional friction coefficient for the feet, and M z feet and F z feet are the moments about and forces along the z-axis for the feet.
To prevent the feet from rolling or pitching, the ZMP 1 [53], [54] must lie strictly within the appropriate support polygon (SP). When a user force exists or there is contact with the chair, the support polygon is given by the convex hull of the feet of the exoskeleton and those of the chair. Here, there is assumed to be at least 10 cm of open space between the front of the chair and the back of the feet. When there is neither an applied user force nor contact with the chair, the support polygon is given by the convex hull of the feet. We will refer to the support polygon of the feet and the chair as SP both . The support polygon of the feet will be called SP feet . An example of the two support polygons that will used in this work are depicted in Figure 4. . An example of the support polygons that will be used. The brown rectangle is the chair while the blue rectangles are the feet. Even though the chair is depicted as being wider than the feet in (a), the width of the feet is not predetermined; it will be solved for via optimization. The bold black line in (a) and (b) encompasses the support polygon of the chair and the feet, and just the feet respectively. The chair is set to be 10 cm behind the feet.
To calculate the ZMP, the external wrenches (ground reaction, applied user force, and chair) are converted to the spatial frame using their respective adjoint matrices [52], [55]. Once everything is expressed in the spatial frame, the ZMP, denoted P * , can then be calculated as the point on the ground about which the x and y total moment equals zero [53], [54]. The total moment τ = [τ x , τ y , τ z ] is given by where • N is the number of active contact points is the sum of all external moments , is the point of application of the i-th contact force F i is the unique point on the ground resulting in τ = [0, 0, τ z ] . That is, at P * the moment is acting about an axis normal to the ground plane. We note that (12) simplifies to (13) and (14) if ∀ i, P i is located at the origin (which is the case for us), yielding where F z total is the sum of all the vertical components of the contact forces.

III. MOTION GENERATION THROUGH CONSTRAINED OPTIMIZATION
Motion generation is posed as a constrained optimization problem for the full-dimensional floating-base hybrid models described in Section II-C. State trajectories, motor torques, and external wrenches are computed with the open-source package FROST [36]. FROST also provides for computing the terms in the Lagrangian model given in (1) and (2), from the universal robot description file (URDF) of the exoskeleton and user.
Once the cost function, unilateral (i.e., inequality) constraints, and holonomic (i.e, equality) constraints are posed, FROST transcribes this data and the dynamic model into a direct collocation problem with analytic derivatives and solves it with IPOPT. Computation times for the native MATLAB implementation of FROST are discussed in [36]. There is a C++ companion, called C-FROST, that provides for parallel executions and more [56].

A. COST FUNCTION
The cost function, J (x, u), consists of a running cost, L(x, u), and a final cost that can depend on the domain, terminal cost F i (x), and the duration of the domain, t i , While FROST allows a different running cost to be specified for each hybrid domain, this flexibility was not used. For both the chair-to-crouch-to-stand and chair-to-stand motions, the running cost is where θ denotes the torso pitch angle and k is a weighting vector with components k i . The squared Euclidean norms of u and ζ are present to reduce motor effort and user effort, respectively. The inclusion of torso angular velocity and acceleration is for tuning user comfort. The terminal costs are all zero with one exception: in the chair-to-crouch-to-stand motion, the terminal cost of the standing shift domain (the second domain in chair-to-crouchto-stand) is the difference between the final and initial knee angles, where q Knee is the vector of the knee angles and k 5 is a weight. The final cost encourages a solution that ''rolls'' the exo-system from the chair to a crouching position, without extending the legs.

B. SUMMARY OF PHYSICAL CONSTRAINTS FOR DYNAMIC FEASIBILITY AND USER COMFORT
In addition to implementing ZMP and friction constraints for dynamic feasibility as discussed in Section II-D, additional constraints are implemented to ensure that the desired optimal motion can be realized. These additional constraints VOLUME 9, 2021 ensure feasibility of the motion in terms of user comfort and hardware limitations, while meeting design specifications. A summary of the constraints is provided here; a more detailed description, including tables with the numerical values of the constraints, can be found in Section IX-A of the Appendix.
Anticipating that the feedback controller will need robustness margins, for both motions, the ZMP is constrained to be within a strict subset of SP both and SP feet when the exo-system is in contact with the chair, and no longer in contact with the chair, respectively. The state bounds for the actuated joints are set to be stricter than the hardware bounds to ensure user safety and comfort. Optimization is allowed to use the maximum torque value a motor can output for each actuated joint except the ankle, which is set to a smaller nominal value. These design choices are possible because the real-time quadratic program used in the control implementation is effective at managing torque limits; see Section VI.
Both motions are designed to start and end in statically stable positions with zero user force. Therefore, to guarantee a feasible final pose for both motions, the ZMP needs to be within SP feet at the end of the motion. Since the ZMP and CoM are coincident at the end of the motion when the exo-system is static, it is sufficient to constrain the final CoM to be within SP feet . The chair-to-stand motion is constrained to be symmetric while the chair-to-crouch-to-stand motion is not. Therefore, to encourage the optimizer to find a chair-tocrouch-to-stand motion with the CoM near the middle of the feet at the end of the motion, the CoM is constrained to be in a smaller polygon between the feet.

IV. DESIGNING CONTROL OBJECTIVES FOR A HIGHLY CONSTRAINED SYSTEM
The primary objective here is to introduce a new method for designing control objectives for systems that are highly constrained, such as a full assist exoskeleton in a chair-to-stand or chair-to-crouch-to-stand motion. For a computed-torque controller, we show how to select control objectives h 0 (q) that are ''orthogonal'' to the system's contact constraints and ''aligned'' with the torque distribution matrix, B. The meaning of the terms ''orthogonal'' and ''aligned'' will be clarified in the text.

A. VIRTUAL CONSTRAINTS AND COMPUTED-TORQUE CONTROL
We pose our control objectives in the form of virtual constraints, which are relations on the state variables of the robot's model that are achieved through the action of actuators and feedback control instead of physical contact forces and moments. They are called virtual because they can be re-programmed on the fly without modifying any physical connections among the links of the robot or its environment. If it is known in advance that virtual constraints will be used, FROST allows them to be designed in parallel with the optimal motion for the mechanism. We assume a virtual constraint of the form where h 0 (q) is a vector of variables to be ''controlled'' or ''regulated' and h d (t) is the desired evolution. The control objective is y(t) = 0, and thus if q * (t) is an optimal motion of the robot, we define The basic idea of computed-torque control, or input-output linearization, is to design the control input u = (x, t) such thatÿ where K p > 0 and K d > 0 are selected so that y converges sufficiently rapidly and ''smoothly'' to zero.
If h d (t) is at least twice differentiable, computingÿ is done exactly as if one were imposing a contact constraint, where In the case of contact constraints, the term J (q)D −1 (q)J (q) is square and invertible if, and only if, J (q) has full row rank. For virtual constraints, the analogous term, J h (q)D −1 (q)B, may not be square, and even if J h (q) is full row rank, J h (q)D −1 (q)B may be rank deficient. Hence, one must choose carefully the controlled variables, h 0 (q), so that there indeed exists u satisfying (18). This is addressed next for highly constrained motions such as chair-to-stand and chair-to-crouchto-stand.

B. CONTACT INTERACTION MATRIX
Placing the contact and virtual constraints together, and dropping the arguments for compactness of notation, yields where the matrix captures the coupling or interaction of the contact wrenches and the motor torques in achieving the contact and virtual constraints. Hence, we call it the constraint interaction matrix. Settingc = 0 to impose the contact constraint and y =ÿ d − K dẏ − K p y to impose the virtual constraints, we have Equation (23) allows us to understand how the motor torques and contact wrenches interact along trajectories of the exosystem. An interesting question is how to select the virtual constraints so that they ''do not fight'' the contact constraints.

C. DESIGN PHILOSOPHY FOR THE VIRTUAL CONSTRAINTS
The blocks of I are generalized inner products with positive-definite weight matrix D −1 (q). Fix q = q 0 , a point along a designed motion, and writē where n h , n u , n v , and m are the number of contact constraints, actuators, virtual constraints, and generalized coordinates respectively; note thatB = (D(q 0 )) −(1/2) B. With these definitions, the constraint interaction matrix becomes The elements forming the top row of A are fixed by the dynamic model and the contact constraints. We propose to design the Jacobian matrixJ h arising from the virtual constraints so thatJ h is orthogonal toJ and the rows ofJ hB are VOLUME 9, 2021 FIGURE 7. Chair-to-Stand: The evolution of the ZMP (red circles) from the user being in contact with the chair to letting go. The brown rectangle and the blue rectangles are the chair and feet respectively. The bold black line encompasses the support polygon of the chair and the feet, while the cyan rectangle depicts the support polygon, SP both_opt , that is used in optimization. The green rectangle represents SP feet _opt ; it is the target location for the ZMP at the end of the standing domain when the user is no longer in contact with the chair.

FIGURE 8. Chair-to-Stand:
The optimal vertical contact forces show a smooth transfer of weight from the chair to the feet. The left foot vertical GRF is omitted because it is similar to the right foot vertical GRF. The blue and yellow lines are for the sitting and standing domain respectively. linearly independent. The reasoning is that (a) if the virtual constraints are orthogonal to the contact constraints, then the controller is not acting in the directions of the contact conditions, and (b) if the rows ofJ hB are linearly independent, then there exists u such that (18) is satisfied. On the other hand, if the columns ofJ hB are linearly dependent, then u is not unique and a means of choosing u needs to be provided. The linear dependence of the rows ofJ hB arises from the highly constrained nature of a standing motion. In Section VI, this aspect of imposing the virtual constraints will be addressed.
In some situations, it would also be beneficial to select virtual constraints that actively fight against undesired contact constraints while respecting desired contact constraints. For instance, in the sitting domain the exo-system is actively trying to break the contact with the chair without slipping in the chair. Therefore, the desired contact constraints in the sitting domain are the feet on the ground and the contact with the chair in the transverse plane. The undesired contact constraint is the chair contact constraint in the z-axis. The question then becomes how to design virtual constraints that respect wanted contact constraints while fighting unwanted contact constraints. In Section IX-B of the Appendix, we provide guidelines for how to go about this.

D. FROM JACOBIANS TO FUNCTIONS
In this section, we show how to design functions h 0 (q) whose Jacobians approximately satisfy . Chair-to-Stand: The optimal spatial force the user needs to provide with both arms along the x and z axes. The user force along the y axis is omitted because it is zero throughout the motion. The blue and yellow lines are for the sitting and standing domain respectively. The maximum spatial user force required for the entire motion along the x and z axes are small, since they amount to about 3 kg and 1.6 kg respectively.
To do this, we propose to include linear and quadratic terms in h 0 (q), namely, and to select the coefficients to minimize Here, H is the collection of coefficients in (29) and q(t i ) are points along a designed motion of the exo-system. The constraint (31) is necessary to avoid H * = 0 as a solution to the objective function (30), while the tuning parameter κ > 1 bounds the condition number of M (q); see (22).
Remarks: 1) For non-sitting domains, the contact Jacobian, J , in (30) is given by J stand in (4). 2) For the sitting domain, the contact Jacobian in (30) is (28), (31), and (32) per If feasible, the constrained optimization problem posed in this manner will return three virtual constraints that are (approximately) orthogonal to the foot constraints and the horizontal components of the chair constraint, but not to the vertical component of the chair constraint. Hence, the controls may assist in driving the chair's vertical force to zero for transitioning to the next domain. Moreover, through the choice of M , the three virtual constraints will be independent of all 15 contact constraints.

V. OPTIMIZATION FOR NOMINAL SIT-TO-STAND AND SIT-TO-CROUCH BEHAVIORS
This section presents the results of performing optimization to design the chair-to-stand and chair-to-crouch-tostand behaviors, using the cost functions and constraints described in Section III and the control objectives presented in Section IV. The optimal motions are derived using: • A user who is 1.73 m tall and weighs 73 kg, for a total weight of the exo-system of 147.4 kg.
• A chair height of 0.6 m.
• A friction coefficient of the chair of 0.5. This value was chosen by using the friction coefficient of leather and oak for guidance [57]. Even though a friction coefficient of 0.5 is probably smaller than the friction coefficient of an average chair, by using a smaller friction coefficient, we encode robustness to slipping in the optimal trajectory.
• A friction coefficient of the feet of 0.9. The virtual constraints imposed during the optimization are derived from the optimization problem posed in (30) - (32). However, because there is relatively little joint displacement in the sitting domain of the chair-to-stand motion, a linear virtual constraint is used. To find the corresponding (constant) matrix, we 1) solve (30) -(32) for H * , 2) replace H with H * in (29) and solve for h 0 (q) at all the time steps in the trajectory (note that H 0 (q) is the first m columns of H * , and that H ij is evaluated from the remaining columns), 3) iteratively evaluate the condition number of (22) with J h = h 0 (q) throughout the entire motion, and 4) choose the h that induces the minimum condition number It should be noted that for both optimal motions, there is an interplay between the torso pitch acceleration, the user force, and the motor torques. This interplay comes about from (a) the inverse relationship of motor torque and user force: the VOLUME 9, 2021 FIGURE 12. Chair-to-Crouch-to-Stand: The evolution of the ZMP (red circles) from the user being in contact with the chair to letting go. The brown rectangle and the blue rectangles are the chair and feet respectively. The bold black line encompasses the support polygon of the chair and the feet, while the cyan rectangle depicts the support polygon, SP both_opt , that is used in optimization. The green rectangle represents SP feet _opt ; it is the target location for the ZMP at the end of the standing shift domain and throughout the standing extend domain. We note that the user force is zero at the end of the standing shift domain and for the entirety of the standing extend domain. more the user contributes by pushing with their arms, the less the motors need to contribute; and (b) taking advantage of the exo-system's dynamics (e.g., generating forward momentum through rapid torso pitch displacement) reduces the demands on motor torque and user force. We also note that the figures referenced in this section have been grouped by motion type, but are discussed in order of relevance.

1) USER COMFORT
To ascertain user comfort, 3 in terms of pitch acceleration, we use maximum and minimum torso pitch acceleration values (Max : 494 deg s 2 , and Min : −660 deg s 2 ) reported as comfortable by the nominal user. The torso pitch acceleration for both motions, in all domains, is below these thresholds. 3 To evaluate user comfort, we use the pitch acceleration of the torso and the user force. These indexes were chosen based on a previous experiment done by one of the authors, Mungai.
During the sitting domain, for both chair-to-stand and chairto-crouch-to-stand, the support of the exo-system transitions from the chair, user, and the feet-with the chair initially supporting the majority of the weight-to the feet and the user. Figure 8 and Figure 13 depict the chair and feet GRF for chair-to-stand and chair-to-crouch-to-stand respectively. Figures 9 and 14 show that the user force is always below 25.5 N in each hand, in all domains, for both motions.

2) CHAIR-TO-STAND
The optimal chair-to-stand trajectory respects left-right symmetry for the majority of the motion. The majority of the joint displacement occurs in the sagittal knee and hips, though all of the actuated sagittal joints do contribute. The joint and torque trajectories shown in Figure 10 and Figure 11, respectively, respect the constraints imposed in the optimization; the henke and sagittal ankle both hit their optimization FIGURE 13. Chair-to-Crouch-to-Stand: The optimal vertical contact forces show a smooth transfer of weight from the chair to the feet. The blue, yellow, and light blue lines are for the sitting, standing shift, and standing extend domains respectively. lower bounds during the motion. The entire chair-to-stand motion takes four seconds to complete, with the majority of the time spent in the standing domain (three seconds). The ZMP, shown in Figure 7, stays well within the support polygon throughout the entire motion, and is contained in the support polygon of the feet at the end of the motion. With an absolute maximum torso pitch acceleration of 58.6236 deg s 2 and maximum norm of the user force of 16.6 N for each hand, the chair-to-stand motion is comfortable for the user. Figure 9 depicts the spatial user force.

3) CHAIR-TO-CROUCH-TO-STAND
In contrast to the chair-to-stand trajectory, the chair-tocrouch-to-stand trajectory was allowed to be asymmetric; see Section IX-A. Chair-to-crouch-to-stand has a longer duration at approximately six seconds. Furthermore, all of the motor joints (not just those in the sagittal plane) contribute a significant amount to the trajectory. Similar to chair-to-stand the joint and torque trajectories for chair-to-crouch-to-stand respect the optimization and hardware bounds. The left frontal hip and sagittal ankles both hit their optimization bounds. The sagittal ankle, left henke ankle, and transverse hip motors hit their respective motor torque bounds imposed in the optimization. However, as previously mentioned, this can be rectified by increasing the user force. The torque, and joint profiles are depicted in Figure 15 and Figure 16. The asymmetry observed in the joint and torque profiles result in the ZMP, shown in Figure 12, being off centered in the support polygon. The ZMP motion along the y-axis observed in the standing extend domain is a result of the CoM constraint implemented at the end of the domain. The maximum norm of the user force per hand (see Figure 14) and absolute maximum torso pitch acceleration for the entire motion are 25.37 N and 106.2 deg s 2 respectively. Even though the absolute maximum torso pitch acceleration for the entire chair-to-crouch-to-stand motion is larger than that of chair-tostand, the chair-to-crouch-to-stand motion is still comfortable for a user. VOLUME 9, 2021 FIGURE 14. Chair-to-Crouch-to-Stand: The optimal spatial force the user needs to provide with both arms along the x and z axes. The user force along the y axis is omitted because it is zero throughout the motion. The blue, yellow, and light blue lines are for the sitting, standing shift, and standing extend domains respectively. The maximum spatial user force required for the entire motion along the x and z axes are small, since they amount to about 4.4 kg and 2.7 kg respectively.

VI. TORQUE DISTRIBUTION FOR OVER-ACTUATED SYSTEMS
Along the nominal (feasible) motions determined through optimization, the conditions in (23) for the contact and virtual constraints are satisfied, as well as the design constraints given in Tables 9, 10, 11, and 12 in the Appendix. To enable the exoskeleton to safely perform a stand up motion and come to a stop, even in off-nominal conditions, two controllers of similar architecture are designed and implemented. The first controller that tracks the desired virtual constraints obtained from an optimal trajectory during the initial stages of standing was partially designed in Section IV-A and will be completed here; it will be be called the standing up controller, or SU for short. The second controller is active in the final stage of standing and is designed to achieve a constant set-point. This controller has not been discussed yet. It will be called the standing in place controller, or SP for short. We will refer to the final stage of standing where the SP controller is active as the stopping domain.
A key issue for each of these two controllers is that due to the large number of contact constraints, the system of equations (23) is underdetermined for the motor torques and is hence an over-actuated system. This will be addressed through a real-time quadratic program (QP), as in [40]- [43] A. DESIGN OF THE SU CONTROLLER Our objective is to select at each time instance, t, the motor torques u(t) of minimum norm such that: (a)ÿ+K dẏ +K p y = 0, and thus disturbances to the nominal motion are attenuated; and (b) the user force, ζ (t), that is required to satisfy the contact constraints and the above virtual constraints remains as close as possible to the nominal force, ζ * (t), that was determined in optimization, even in off-nominal conditions.
The motivation in (b) is that we do not want the controller relying on the user to make corrections to the trajectory.
On the other hand, if torque or joint constraints limit the controller's ability to meet all of the contact constraints, we want the user to be able to contribute, but only if absolutely necessary. To meet the above objectives, we rewrite (23) in terms of motor torques u and user force ζ as where, At timet, let u * (t) and ζ * (t) be the control signal and user force along the optimal trajectory. The applied control signal and ''estimated user force'' for the SU controller will be determined by the following QP,    ≤ 0, where F • · denotes the components of the contact forces along the x or y axis that are associated with the feet or chair. Therefore, a value above zero violates the friction constraint.
The inclusion of ||ζ − ζ * || 2 2 in the cost ensures feasibility of the constraints in (34), while a large value of α > 0 encourages solutions where the user force ζ ''assumed by the controller'' remains close to its designed value. Of course, the user of the exoskeleton has no knowledge of this calculation and will assist in the standing process ''as best as they can''. We choose to implement the user force in this manner because we assume that by using the exoskeleton several times the user will eventually learn to provide the external force needed at the ''right'' time. In other words, after several attempts the user provided assistance should be close to the optimal value assumed by the controller. To better mimic the user force from the user, one can take advantage of the various learning algorithms to design a controller for the user force which interacts with QP I/O control; Aroche et al. [10] approximated the user force using an iterative learning control. Robustness of the control actions to varying user force will be checked in the results section. To ensure that the solutions of the QP are feasible even in the presence of perturbations, the ZMP is constrained to be within the appropriate support polygon. We first define SP as the compact set of all the points in the desired support polygon. We then require P x * and P y * to be inside the set SP at all times; this is done by using half planes.

B. DESIGN OF THE SP CONTROLLER
The set-point for the SP controller regulates the variables  The SP controller is expressed in the form of a QP in a similar manner to the SU controller. The formulation can be found in Section IX-C of the Appendix.

C. STABILITY ANALYSIS OF THE TWO STANDING CONTROLLERS
The overall controller for each motion is hybrid, consisting of (short-duration) transient phases of trajectory tracking that guide the exo-system from the chair to a transition point where a standing controller, SP, takes over and must assure steady-state stability. Here, we analyze the local exponential stability of the standing controller's equilibrium point, which we denote by x eq .
For each of the chair-to-stand and chair-to-crouch-tostand motions, the Jacobian linearization of the closed-loop floating base model about x eq is estimated using symmetric differences. So that the contact constraints are respected, perturbations are only applied in the null space of the contact Jacobians. The control algorithm automatically computes corrections 4 to the nominal control signal when the TABLE 2. User Characteristics: A comparison of the closed-loop chair-to-crouch-to-stand and chair-to-stand trajectories obtained from the SU and SP controllers for different users in the exoskeleton. The characteristics of the users are described in Table 1. The user force displayed in the table is the total force the user needs to provide using both arms. For all the values of interest, except for the steady state error of SP, the Domain/Virtual constraint gives the domain where the maximum value occurs. For the steady state error of SP, the virtual constraints where the maximum error occurs are instead given in the Domain/Virtual constraint. The errors are displayed as maximum position and angle errors. Recall that the first two components of (35) are positions and the rest are angles.

TABLE 3. Various Chair Heights:
A comparison of the closed-loop chair-to-crouch-to-stand and chair-to-stand trajectories obtained from the SU and SP controllers for chair heights ranging from 0.45-0.75m. Recall that the nominal chair height is 0.6m. The user force displayed in the table is the total force the user needs to provide using both arms. perturbations are applied to the equilibrium point, x eq . The resulting matrix is then orthogonally projected to the null space of the contact Jacobians, giving us a square matrix A lin corresponding to the Jacobian of the reduced-order model one would obtain if the contact constraints were eliminated. For both sit-to-stand motions, chair-to-stand and chair-tocrouch-to-stand, the eigenvalues of A lin have negative real parts. Therefore, from Theorem 4.6 and 4.7 in Khalil [58], we conclude that x eq is a locally exponentially stable equilibrium point.
The Remark: It is well known that performing the above analysis would provide very conservative estimates of the domain of attraction. One could attempt to use other methods such as reachability analysis or barrier functions, however, with the current techniques available it is not feasible to analytically calculate the range of operability for high-order nonlinear systems. Therefore, to circumvent these obstacles, we find the range of operability of the proposed closed-loop system using robustness tests.

D. NOMINAL SIMULATION OF THE TWO STANDING CONTROLLERS
Here we present the nominal closed-loop standing behaviors for both chair-to-stand and chair-to-crouch-to-stand of the exo-system under the action of the SU and SP controllers during nominal conditions. The simulation is performed using the ideal simulator in FROST. 5 The SU controller is able to maintain low tracking error and the SP controller is able to achieve the desired set point values. To conserve space and due to the fact that the tracking and steady state errors for chair-to-stand and chair-to-crouch-to-stand are similarly sized, we only include the error plots for chair-to-crouch-tostand in Figure 6.

VII. ROBUSTNESS TESTS
This section assesses the ability of the two closed-loop behaviors to tolerate a range of perturbations. The perturbations are: (1) different users in the exoskeleton (this perturbation can be thought of as a weight and height perturbation. Weight is the primary perturbation we will focus on.), (2) variations to chair height (both higher and lower than the nominal chair height), (3) zero user force which creates a discrepancy between the external force the controller expects and the one that's provided, (4) spasticity in the knee joints, and (5) asymmetric motor torque outputs which will help us understand a controller's sensitivity to asymmetry.
These robustness tests will help us ascertain differences in the two types of standing motions. They will also help us determine how many nominal trajectories one may need in a gait library to expand the controllers' range of operability.
To make the controllers more impervious to perturbations and for ease of implementation, the controller and simulation architecture are modified slightly. These modifications are discussed in detail in Section IX-D of the Appendix. 5. User Spasticity:A comparison of the closed-loop chair-to-crouch-to-stand and chair-to-stand trajectories obtained from the SU and SP controllers when spasticity is induced in the right knee, left knee, and both knees. The user force displayed in the table is the total force the user needs to provide using both arms. For all the values of interest, except for the steady state error of SP, the Domain/Virtual constraint gives the domain where the maximum value occurs. For the steady state error of SP, the virtual constraints where the maximum error occurs are instead given in the Domain/Virtual constraint column. The errors are displayed as maximum position and angle errors. Recall that the first two components of (35) are positions and the rest are angles.
For the reader's convenience, we recall the following values: The criteria that we use to determine the success of the standing motions under perturbations are: (1) tracking and steady state error of the SU and SP controllers respectively, (2) torso pitch acceleration, (3) user force expected by the controller, (4) ZMP constraint violation, (5) friction constraint violations (we will consider even small violations of the feet friction constraints to be a failure), (6) joint angle limit violation, and (7) motor limit violation. The tracking and steady state error allows us to confirm whether or not the desired standing motion has been achieved by the controller. A relatively low torso pitch acceleration and required user force ensure user comfort. The maximum (494 deg s 2 ) and minimum (−660 deg s 2 ) torso pitch acceleration thresholds used for optimization are utilized here as well. The ZMP and friction constraints, and joint angle and motor limits ensure the feasibility of the motion in terms of stability and hardware limitations. Note that the friction constraint consists of both the friction cone and torsional friction constraint, and that the joint angle limits are only explicitly implemented in the SP controller. The friction cone constraint is calculated using |F ≤ 0, where F • · denotes the components of the contact forces along the x or y axis that are associated with the feet or chair.
With these criteria in mind, the results that we will show indicate that both motions are equally capable at handling weight variations and user force disparities. However, the chair-to-crouch-to-stand motion is better at handling asymmetric motions and spasticity, while the chair-to-stand TABLE 6. A comparison of the closed-loop chair-to-crouch-to-stand and chair-to-stand trajectories obtained from the SU and SP controllers for torque asymmetry in the sagittal (sag.) knee motor, sagittal knee and hip motors, and all the motors.Even though asymmetry in all motors is unlikely, it is an interesting case to study. The user force displayed in the table is the total force the user needs to provide using both arms. For all the values of interest, except for the steady state error of SP, the Domain/Virtual constraint gives the domain where the maximum value occurs. For the steady state error of SP, the virtual constraints where the maximum error occurs are instead given in the Domain/Virtual constraint column. The errors are displayed as maximum position and angle errors. Recall that the first two components of (35) are positions and the rest are angles. motion can handle a broader range of chair heights. Under all of the perturbations, the closed-loop trajectories of both motions respect the ZMP and motor limit constraints. A large friction coefficient between the chair and the exo-system can be used to increase the robustness of the motions against torque asymmetry, spasticity, and variations to the user characteristics. The data that led to these conclusions is presented in the following subsections.

B. USER CHARACTERISTICS
URDFs were generated for additional users to test the sensitivity of the motions to weight and height. The weight and height of these additional users can be found in Table 1.
Note that our analysis will focus on the weight of the user. The various users in the exoskeleton result in various plant models. To enforce this perturbation, we introduce a discrepancy in the plant model used for simulation, while the controller is always based on the nominal model.
The results for both motions exhibit no joint angle violations. However, both motions violate the friction cone constraint in the sitting domain for some users. This violation occurs, even though the friction constraints are explicitly implemented in the controllers, because of the model error.
With the nominal value of µ chair = 0.5, chair-to-stand has a friction constraint violation for User 1 and User 3. Chair-to-crouch-to-stand on the other hand, has friction  ≤ 0, where F • · denotes the components of the contact forces along the x or y axis that are associated with the feet or chair. Therefore, a value above zero violates the friction constraint.
constraint violations for all the non-nominal users. For User 1, the feet and chair friction constraints are violated for chair-tostand, while only the chair friction constraint is violated for chair-to-crouch-to-stand. Due to the large chair friction cone constraint violations during chair-to-crouch-to-stand and feet friction cone constraint violation during chair-to-stand (see Table 2, Figure 17, and Figure 18), the SU controller is unable to successfully get the lightest user (User 1) to stand up. Even though there are other users for which the friction constraint is violated, we only consider User 1 a failed case because the violations for the other users are only observed for the chair and are fairly small. In fact, these friction constraint violations can be mitigated by the user exerting the necessary additional force or by using a chair with a higher friction coefficient. For instance, by setting µ chair = 0.6 and µ chair = 0.7 for User 3, we are able to stop the exo-system from slipping in the chair for chair-to-stand and chair-to-crouch-to-stand respectively.
With User 1 out, the maximum torso pitch acceleration for chair-to-stand occurs for User 3 during the standing domain and is 120 deg s 2 . The maximum torso pitch acceleration for chair-to-crouch-to-stand is 174 deg s 2 and it is observed for User 2 during the standing shift domain. Even though the chair-tostand motion has a lower maximum torso pitch acceleration, the results from both motions should be comfortable for the user. As a result, we can conclude that the performance of both motions is equal in terms of torso pitch acceleration. The torso pitch acceleration profiles can be found in Figure 19 and Figure 20. The tracking and steady state errors for both controllers for both motions are small. The resulting user force from the chair-to-stand motion is close to the nominal values. The user force for chair-to-crouch-to-stand is similar to the nominal value except for User 3 whose results require an additional user force norm of 12 N during the standing shift domain; see Figure 21.  Table 1. The jump in acceleration observed between the plots is caused by the transition between domains.
The SU and SP controllers are unable to perform a successful standing motion for users who weigh significantly less than the nominal user. The range of users that can stand up successfully is the same for both controllers, 68 kg to 90 kg. Note that 90 kg is the heaviest user that Atalante can handle. Therefore, we can conclude that both motions perform equally with various plant models. A summary of the results can be found in Table 2.

C. VARYING CHAIR HEIGHT
Simulations for chair heights ranging from 0.45 to 0.75 m are run for both motions. The trajectories resulting from the chair-to-stand motion violate the upper bound of the sagittal knee and hip joints for chair heights below 0.47 m; the maximum constraint violation occurs at 0.45 m and is 4.6 deg. The trajectories obtained from the chair-to-crouchto-stand motion violate the sagittal ankle joint upper bound at chair heights greater than 0.67 m; the maximum constraint violation is observed at 0.75 m and is 8.6 deg. Therefore, the range of operability for the chair-to-stand and chair-tocrouch-to-stand motions based on joint bounds is 0.47-0.75 m and 0.45-0.67 m, respectively. Even though the chair-tocrouch-to-stand motion has a lower ranger than the chairto-stand motion, the 2 cm difference is small enough to consider the two motions as having the same lower range. The trajectories for the joints whose limits are violated can be found in Figure 22 and Figure 23. Note that to conserve space only the respective left joint trajectories are plotted for the symmetric chair-to-stand motion. We continue our analysis using only the results within each motion's range of operability based on joint angle constraints.
The friction constraint is respected for both motions while the required user force for both motions remains close to the nominal value. For both motions, the results for the torso pitch acceleration from the various chair heights exhibit a mirror like pattern across the x axis with respect to the nominal VOLUME 9, 2021 FIGURE 20. User characteristics for Chair-to-Stand: The torso pitch acceleration during the SITTING and STANDING domains for different users in the exoskeleton. The characteristics of the users are described in Table 1. The jump in acceleration observed between the two plots is caused by the transition between the two domains.

FIGURE 21. User characteristics for Chair-to-Crouch-to-Stand and Chair-to-Stand:
The user force during the STANDING SHIFT and STANDING domains for different users in the exoskeleton. The characteristics of the users are described in Table 1. The depicted user force is the combined force the user would have to apply with both hands.
pitch acceleration values in the sitting domain. The chair-tostand motion has similar maximum torso pitch acceleration values for its lowest (0.47 m) and highest (0.75 m) chair height. This maximum value occurs in the sitting domain and is 223.8 deg s 2 and −231 deg s 2 . The maximum torso pitch acceleration values for chair-to-crouch-to-stand for the lowest and highest chair values occur in the sitting and standing shift domain and are 147.8 deg s 2 and 120 deg s 2 . The torso pitch acceleration profiles for the sitting and standing shift domains can be found in Figure 24 and Figure 25. The torso pitch acceleration values are within the threshold and the tracking and steady state errors are essentially zero for both motions. Therefore, we can conclude that the chair-to-stand motion is better at handling chair height variations than the chair-to-crouch-to-stand motion. More detailed information on the resulting motions can be found in Table 3.

D. ZERO USER FORCE
To test the SU and SP controllers' sensitivity to the user force provided, we run a simulation where the user provides no assistance despite the controllers expecting one. The results, which can be found in Table 4, show that the controllers are able to achieve both motions with zero user force throughout the entire trajectory. With no state bound and friction constraint violations, minimal tracking error, and absolute maximimum torso pitch acceleration values of 60.3 deg s 2 and 128.4 deg s 2 for chair-to-stand and chair-to-crouch-to-stand respectively, the resulting trajectories for both motions are successful. Therefore, we can conclude that the controllers are not sensitive to the user force and that they are able to compensate for misalignments in the user provided assistance.

E. USER SPASTICITY
We apply a 15 Nm flexion on individual knee angles and in pairs to simulate spasticity. The value of 15 Nm is chosen based on the study by Franzoi et al [59] where the maximum torque flexion observed for SCI at 60 deg s was 8 NM . Since the maximum knee velocity for both motions does not exceed 60 deg s (31.5 deg s and 30.7 deg s for the nominal simulation results during chair-to-crouch-to-stand and chair-to-stand respectively), 15 Nm is more than sufficient for testing. For both motions, there are no joint angle and ZMP constraint violations, and the tracking and steady state errors are small. Additionally, the user force for both motions is near the nominal value. See Table 5 for more details.
Both motions, however, do exhibit friction cone constraint violations. When the 15 Nm is applied to the right knee and both knees the chair-to-crouch-to-stand motion exhibits chair slipping along the x axis in the sitting domain. This slipping, however, as was discussed before, can be alleviated by using a chair with a higher friction coefficient. The maximum value of the friction constraint violation is 20.7 N , and 19.7 N when the spasticity occurs in the right and both knees respectively. No friction bound constraint violations are observed when spasticity occurs in the left knee. For chair-to-stand the left foot slips for all the spasticity tests. The highest friction constraint violation for the left foot slipping are 0.16 N , 55.3 N , and 59.8 N for spasticity on the right knee, left knee, and both knees respectively. Therefore, since the constraint violation is quite large for the left and both knees we consider the chair-to-stand motion to have failed the spasticity test for both of these situations. The friction cone constraint can be found in Figure 19 and Figure 20.
We continue our analysis looking at just the chairto-stand results from spasticity on the right knee and   chair-to-crouch-to-stand on the right, left, and both knees. The maximum torso pitch acceleration observed for both motions, −242.72 deg s 2 , occurs during the standing extend domain of chair-to-crouch-to-stand for spasticity on both knees and is well below our threshold for user comfort. We can now conclude that the chair-to-crouch-to-stand motion deals with spasticity better than chair-to-stand can.

F. ASYMMETRIC MOTOR TORQUE
To mimic asymmetry in motor torque, a 15% motor deficiency is introduced in the right sagittal knee, right sagittal knee and hip, and all the right motors. For both motions, there is no joint angle constraint violation. The maximum torso pitch acceleration for both motions, 139.7.4 deg s 2 for chair-tocrouch-to-stand and 64.2 deg s 2 for chair-to-stand, occur with the asymmetry in all the right motors. Since these values are below our threshold, and the resulting user force for both motions is close to the nominal value, both motions should be comfortable for the user. The tracking and steady state error for both motions are small.
Slipping is observed in the right foot and the chair along the x axis when the torque reduction is applied on the right knee motor for chair-to-stand. The right foot friction constraint violation of 14 N is significant enough for us to consider the chair-to-stand motion to have failed for motor asymmetry in the right knee. The chair-to-stand motion also violates the friction cone constraint of the chair when asymmetry occurs in all motors. However, the chair friction constraint violation is small. When the asymmetry occurs both in the right sagittal knee and hip, the chair-to-stand motion does not violate the friction constraint. In comparison, the chairto-crouch-to-stand motion exhibits no friction constraint violations when there's torque reduction in the right sagittal knee, and right sagittal knee and hip. Chair-to-crouch-tostand, however, does experience slipping in the chair along the x and y axis when the torque reduction is present in all right motors. The maximum value of the chair friction cone constraint violation is 42.2 N . Even though the violation of the friction cone constraint of the chair can be eliminated by using a chair with higher friction coefficient and by the user exerting the necessary force, a violation of 42.2 N is significant enough for us to consider the chair-to-crouch-tostand motion to have failed the robustness test when the motor deficiency occurs on all right motors.
Due to the fact that it's highly unlikely to have asymmetry occur in all motors simultaneously, we can conclude, if we remove the results for asymmetry in all motors, that the chair-to-crouch-to-stand motion is better at handling torque asymmetry. For more details, see Table 6, Figure 28, and Figure 29. ≤ 0, where F • · denotes the components of the contact forces along the x or y axis that are associated with the feet or chair. Therefore, a value above zero violates the friction constraint. ≤ 0, where F • · denotes the components of the contact forces along the x or y axis that are associated with the feet or chair. Therefore, a value above zero violates the friction constraint.

VIII. COMPARING OUR CONTROLLER's PERFORMANCE TO THE LITERATURE
In this section, we compare the SU controller of Section VI to related work in the literature. We seek to highlight the utility of the design philosophy in Section IV-C, where control objectives were selected to have minimal conflict with the contact constraints of the exo-system, while ensuring that the actuators of the exoskeleton are effectively 6 used to implement the constraints. The comparison will be done with respect to perturbations in the chair height and the user mass-inertia parameters. We selected these two perturbations because they are likely to be encountered in practice. The nominal values used here are the same as those used in Section VII.
The controller objectives in the literature consist of a combination of the exo-system's CoM and the (relative) joint angles of the exoskeleton. Moreover, they are applied to planar models. To account for the full 3D setting of our work, we selected two sets of control objectives from [10], [14], [16]- [19], [22], [28], [49], as follows, Here θ, ϕ, and ψ are the torso pitch, roll, and yaw angle respectively. ≤ 0, where F • · denotes the components of the contact forces along the x or y axis that are associated with the feet or chair. Therefore, a value above zero violates the friction constraint. ≤ 0, where F • · denotes the components of the contact forces along the x or y axis that are associated with the feet or chair. Therefore, a value above zero violates the friction constraint. VOLUME 9, 2021 To implement control objectives in (36) we design a QP nput-output linearizing controller based on [10], [19]. The QP minimizes the error between the nominal and applied motor torques, and the nominal and applied user force, similar to our SU controller. The QP also implements the dynamic constraints and torque bounds. We will refer to the two control objectives and the QP-based controller from the literature as the baseline control objectives and the baseline controller, respectively.
For both sit-to-stand motions, our control objectives are better at respecting the contact constraints and they result in lower torso pitch acceleration. We conjecture that the latter is because our control objectives are more effective at deploying the motor torques due to the bound on the condition number. The lower torso pitch acceleration augments user comfort. For brevity, we only present the data for chair-tostand that led us to these conclusions. All control objectives function correctly under nominal conditions. At a chair height of 0.62 m, that is 0.02 m above the nominal value of 0.60 m, y lit 1 results in a force violation at the feet of 134 N, y lit 2 results in a violation of 174 N, while our constraints (under the same baseline QP-IO controller as used for y lit−1 and y lit−2 ), results in a violation 7 of 8 N. When the user model is perturbed, the baseline control objectives are unable to achieve the sit-tostand motion with any of the users due to large friction constraint violations. Our control objectives, however, are able to successfully achieve the sit-to-stand motion with User 3, with a maximum torso pitch acceleration of only 69.8 deg s 2 , which is less than 20% of the allowed upper bound.
We conclude that the baseline QP-IO controller and control objectives are neither robust to variations in chair height nor to users lighter than the nominal user. Therefore, in comparison to the baseline controller, our controller, SU, is able to reject more perturbations.

IX. CONCLUSION
In this paper, we designed and analyzed two motions, chairto-stand and chair-to-crouch-to-stand, for the exoskeleton Atalante, that successfully performed fully assisted sit-tostand motions even in the presence of perturbations. Constrained optimization, performed using FROST, was utilized to ensure that the open-loop behavior of the two motions were feasible. Feasibility was defined in terms of user comfort, dynamic feasibility, and hardware limitations. We derived the dynamic equations using the full dynamic model of the exoskeleton, and incorporated the user force in the equations of motion. The equations of motion for both the, chairto-stand and chair-to-crouch-to-stand motions were highly constrained, due to the various contact points, and therefore underdetermined with respect to the motor torques.
To address this, we developed, for a computed-torque controller, a novel way of systematically designing virtual constraints so that they ''do not fight'' the contact constraints for highly constrained systems. Along the way, we also introduced a formulation that allowed the control actions to ''fight'' against a specific contact constraint to induce a domain transition, while respecting other, desired contact constraints.
To analyze and compare the closed-loop behavior of the two motions, we designed two QP-based computed-torque controllers and conducted physically motivated robustness tests. The choice of a QP-based controller allowed to select the vector of motor torques of smallest norm that satisfied the control objectives, as expressed by a set of virtual constraints. Our results indicated that both motions can equally handle variations to user characteristics and user force disparities. In fact, our analysis showed that it is possible to successfully stand up with no user force under both motions. The chairto-crouch-to-stand motion, however, was more well equipped to handle asymmetric perturbations, while the chair-to-stand excelled at handling variations to the chair height. To improve the operational range of either motion, for perturbations that result in incorrect contact forces, a chair with a high friction coefficient could be specified or the motion could be redesigned for the new environmental conditions.
To check the effectiveness of our method, we compared our control objectives and sit-to-stand controller to those found in the literature. From our analysis, we found that our control objectives were better at respecting contact constraints and resulted in motions that required less torso pitch acceleration. Additionally, our sit-to-stand controller was better equipped at handling perturbations.
Even though the methods presented in this paper are illustrated using the sit-to-stand motion and for Atalante, our methodology can easily be adopted for other motions with multiple contact points and other exoskeletons or humanoids. The next steps for this work would be implementation on hardware.

A. DETAILED DESCRIPTION OF THE PHYSICAL CONSTRAINTS FOR DYNAMIC FEASIBILITY AND USER COMFORT
Here we present in full detail, the additional constraints that are implemented to achieve the desired motions. For clarity, the constraints are divided into two categories, boundary and path constraints. Boundary constraints are implemented only at the beginning and end of a domain, while path constraints are present throughout the entire domain.

1) PATH CONSTRAINTS
Anticipating that the feedback controller will need robustness margins, the ZMP is constrained to be within SP both_opt , a strict subset of SP both , for the entire chair-to-stand motion, and the sit and standing shift domains of chair-to-crouchto-stand, as illustrated in Figure 7 and Figure 12. Similarly, during the standing extend domain, the ZMP is constrained to be within a smaller polygon, SP feet_opt ⊂ SP feet . We note that there is no contact with the chair during the standing extend domain. Motor torque bounds, joint bounds, and a minimum distance between the feet are introduced to respect hardware bounds. The minimum distance between the feet prevents the exoskeleton from colliding with itself. The torque and state bounds are implemented in all domains while the distance between the feet constraint is only implemented in the sitting domain. However, the distance between the feet established in the sitting domain is maintained in all domains due to the feet contact constraint. The state bounds for the actuated joints are set to be stricter than the hardware bounds to ensure user safety and comfort. These joint limits can be found in Table 7.
Optimization is allowed to use the maximum torque value a motor can output for each actuated joint except the ankle, which is set to the smaller nominal value; see Table 8. These design choices are possible because the real-time quadratic program used in the control implementation is effective at managing torque limits; see Section VI.
In order to generate realistic motions, the rate of change of the chair force component in the z direction (Ḟ z chair ) is bounded. The bound forḞ z chair is defined as follows: where t sit min is the minimum desired duration of the sitting domain and F z chair 0 is the initial vertical force exerted by the chair. To achieve a symmetric motion, a torque difference constraint between the right and left actuated joints is implemented only for chair-to-stand. An equal knee angle and negative knee angle velocity constraints are implemented to prevent the exoskeleton from swaying side to side and oscillating up and down. A minimum knee angle constraint is implemented in all domains for user comfort. As a design choice, the y component of the spatial user force is constrained to zero for the entire motion. The lower and upper bounds for the x and z components are set to zero and the total weight of the user (TW user ) respectively. The path constraints are summarized in Table 9 and Table 10.

2) BOUNDARY CONSTRAINTS
For the exoskeleton to start at the desired sitting pose, for both motions, the chair height is set by constraining the initial sitting-point height. In addition, an initial torso pitch and knee angle constraint are implemented. A final torso pitch, and knee angle constraint are implemented at the final domains of both motions. The chair is constrained to support at least 80% of the exo-system's total weight (TW ) at the beginning of the sitting domain in both motions.
The chair-to-stand and chair-to-crouch-to-stand motions are both constrained to start and end in a statically stable position. The user force is set to zero at the beginning of the sitting domain for both motions, and at the end of the stand and standing shift domain for the chair-to-stand and chair-tocrouch-to-stand motions respectively. Therefore, to guarantee a stable static final pose for chair-to-stand, the ZMP needs to be within SP feet at the end of the motion. However, since the ZMP and CoM are coincident when the exo-system is static, it is sufficient to constrain the final CoM to be within SP feet ; we constrain the final CoM to be in SP feet_opt . Even though at the end of the standing shift domain the exo-system will have no contact with the chair (the user force is constrained to be zero), it is not necessary to explicitly constrain the ZMP or CoM to be inside SP feet . This is because the event that triggers the transition from the standing shift domain to the standing extend domain, ZMP ∈ SP feet , is set up such that it constrains the ZMP to be in SP feet_opt at the end of the standing shift domain. To encourage the optimizer to find a chair-to-crouch-to-stand motion with the CoM near the middle of the feet at the end, the CoM is constrained to be in SP feet_SS ⊂ SP feet_opt . The boundary constraints are summarized in Table 11 and Table 12.

B. DESIGNING THE VIRTUAL CONSTRAINTS USING QR FACTORIZATION
In this section, we provide guidelines on how to obtain virtual constraints using QR factorization based on the philosophy presented in Section IV-C. Note that our analysis in this section is dependent on a fixed point q.

1) NON-SITTING DOMAINS
Here, J is given by (4). Performing a QR-factorization of [J B ] yields where the orthonormal matrix Q and the upper triangular matrix R have been partitioned conformally with the size VOLUME 9, 2021 TABLE 9. Equality path constraints for both the chair-to-stand and chair-to-crouch-to-stand motions. ofJ . Then, because R is upper triangular, R 21 = 0 and thus we haveJ Hence, a choice ofJ h that is orthogonal toJ and full row rank isJ Indeed, with this choice, The (row) rank of R 22 gives the number of virtual constraints that can be used in the controller design.

2) SITTING DOMAIN: ACTIVELY Fighting AGAINST CONSTRAINTS
In the sitting domain, the exo-system's motion is actively seeking to break contact with the chair by driving the vertical force from the chair to zero. It is desirable that control actions do not promote sliding in the chair, while aiding in lifting from the chair. The virtual constraints should therefore be designed as orthogonal to the x and y components of J chair , the seat Jacobian, but not to its vertical component. We start our analysis by first noting the similarities between the contact and virtual constraint definitions as described in (41) Contact Constraint Virtual Constraint  where c 0 and c d are the current and desired positions of the contact respectively, and J := ∂c 0 ∂q . We assume c d is a constant, and hencec d = 0. As previously demonstrated in Section II-B and IV-A, the contact and virtual constraints, are both implemented at the acceleration level and are achieved when y ≡ 0 and c ≡ 0. In particular, a contact constraint is not identically satisfied when either c = 0,ċ = 0, orc = 0. Similarly, a virtual constraint is not identically satisfied when either y = 0,ẏ = 0, orÿ = 0. When the virtual constraints are not satisfied, we use control action to mitigate the error. In a similar manner, we can use control action to inducec = 0, thereby fighting the contact constraint. In our case, we want to fight against the vertical component of the chair contact constraint to achieve c 0 > c d , which gives c > 0. Therefore, to achieve virtual constraints that are orthogonal to all the contact constraints except for the vertical component of the chair constraint, we modify (37) to whereJ r andJ v are the Jacobian matrices of the contact constraints we want to be orthogonal to and non-orthogonal to respectively. Similar to before, R 21 = 0, R 31 = 0 and VOLUME 9, 2021 R 32 = 0. Note that Q 2 is in the span ofJ v . Since at the fixed point q, Q 2 is a constant matrix, we can now definė The first step for designing control actions that are not only non-orthogonal to the vertical component of the chair constraint but also actively fight against it, is to design J h such that it's orthogonal toJ r and aligned withB. Note that choosing J h = Q T 3 as was done previously does not work here because n v will be less than the difference between the DoF of the unconstrained system and the DoF of the constrained system. To properly design J h , an optimization problem is necessary. The formulation of this optimization problem can be found in Section IV-D. Once J h is found, all that is left to do is to get rid of the undesired contact constraint from the controller and introduce Q 2q > 0 as a constraint in the QP when one decides to start ''fighting'' the contact constraint. We note that since our controller is tracking an optimal trajectory that achieves the sit-tostand motion, it is sufficient to have control actions that are non-orthogonal to the vertical component of the chair constraint.

C. THE SP CONTROLLER IN THE QP FORM
The SP controller is expressed as a QP in the form u(t) ζ (t) := arg min u∈R 12 ,ζ ∈R 3 ||u|| 2 2 + α||ζ || 2 2 subject to A eq (q(t)) u ζ =b eq (q(t),q(t)) Remarks: The SP controller is similar to the SU controller except for the addition of an integral term for the average knee angle virtual constraint and state bound constraints for the exo-system's position, q. These additional constraints guarantee that the exoskeleton stops at the desired height without violating any joint bounds. The bounds for q could have been implemented in the SU controller as well, however, since the SU controller tracks the optimal trajectory via virtual constraints, these constraints were inactive along the nominal trajectory. Note that since the SP controller tracks a set point, u * (t) = 0 and ζ * (t) = 0.

D. ENHANCING PERFORMANCE IN OFF-NOMINAL CONDITIONS
The domain definition for the chair-to-stand motion is modified so that it is compatible with the chair-to-crouch-tostand motion, allowing a unified control architecture. The hybrid closed-loop system is represented by a directed acyclic graph with four domains as shown in Figure 5: sitting, stand 1, stand 2, and stopping. For more information on the domains see Section IX-D1. The SU and SP controllers act in the sitting, stand 1, and stand 2; and stopping domains respectively.
The desired evolution of the virtual constraints for the SU controller, h d (t) are represented using a Bezier polynomial [60], [61] of 5 th degree for the sitting domain and 6 th degree for the stand 1 and stand 2 domains. The desired virtual constraints are time based and are parametrized using In order to start at the beginning of the desired virtual constraint profile even with perturbations, (45) is modified such that t bez = 0 at the beginning of all domains except the stand 2 domain during chair-to-stand; this will be discussed further in Section IX-D1. To handle a variety of off nominal conditions, the Bezier coefficients at the beginning of each domain are modified such that y(t 0 ) = 0 while still maintaining the same value forẏ(t 0 ). Additionally, if the number of iterations in the QP exceeds an allowed maximum number of iterations, u * and ζ * are replaced with the QP's output and the QP is rerun with the modified objective function. For each motion, the desired torque profile is the torque profile from optimization. It is passed to the controller as a spline and is generated using Matlab's curve fitting tool.

1) CONTROL DOMAIN UNIFICATION
The standing domain from the chair-to-stand optimization is split into three domains, in a similar manner to how the chair-to-crouch-to-stand hybrid model was obtained in Section II-C, stand 1, stand 2, and stopping. This is done for three reasons: (a) to allow both the chair-to-stand and chair-to-crouch-to-stand motions to be addressed with the same simulation and control architecture, (b) to ensure the transition from stand 2 to stopping occurs after the ZMP is within the feet support polygon, and (c) to allow the implementation of additional constraints and modifications to the equations of motion towards the end of the motion that ensure the exo-system safely comes to a stop (see Section VI-B). As the stand 1, stand 2, standing shift, and standing extend domains are all governed by the same dynamic equations (the equations of motion during the standing domain), they are all equivalent domains. Therefore, the stand 1 and stand 2 domains can be thought of as the standing shift and standing extend domains respectively during chair-to-crouch-to-stand.
It is important to note that for chair-to-stand the SU controller tracks the same virtual constraints during the stand 1 and stand 2 domains. However, for chair-to-crouchto-stand the SU controller tracks different virtual constraints. This difference is caused by the original domain definition of the chair-to-stand and chair-to-crouch-to-stand motions which result in 2 optimal virtual constraints for the chair-tostand motion (for the sitting and standing domains) and 3 for the chair-to-crouch-to-stand motion (for the sitting, standing shift, and standing extend domains). As a result, for chairto-crouch-to-stand the SU controller tracks the virtual constraints obtained from the standing shift and standing extend domains during the stand 1 and stand 2 domains respectively. On the other hand, for chair-to-stand the SU controller tracks the virtual constraint obtained from the Standing domain during both the stand 1 and stand 2 domains. In fact, t bez is not reset to zero between the the stand 1 and stand 2 domains for the chair-to-stand motion. This allows the SU controller to seamlessly continue tracking the virtual constraint profile in the stand 2 domain.
The transitions among the various domains in Figure 5 are highlighted here.
• Sitting to stand 1: The transition from the sitting domain to the stand 1 domain happens when the chair supports 25 percent or less of the total exo-system weight and t bez = 1. In other words, the transition happens when the feet are supporting most of the exo-system weight and when the SU controller reaches the end of the desired virtual constraint trajectory. The chair forces can be estimated from the ground reaction forces or measured directly.
• stand 1 to stand 2: The transition from the stand 1 domain to stand 2 domain happens after the ZMP is within the feet support polygon.
• Control Action in the Subsequent Domains after stand 1: The ZMP is constrained by the controller to be within the feet support polygon irrespective of whether the user is in contact with the chair or not. In other words, the chair is ignored in the calculation of the support polygon.
• stand 2 to Stand in Place: The transition from the stand 2 domain to the stopping domain happens when t bez = 0.95. This ensures that the exo-system is still in motion when the stopping domain begins.
• Dynamics of stand 1 and stand 2: Since for the chair-to-stand motion the stand 1 and stand 2 domains track the same virtual constraints, and are governed by the same dynamic equations, the transition to the stopping domain can be thought of occuring after the ZMP is within the feet support polygon (and) when t bez ≤ 0.95.