A Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis

The behavioral richness exhibited in natural human motion results from the complex interplay of biomechanical and neurological factors. The biomechanical factors involve the kinematics and dynamics of the musculoskeletal system while the neurological factors involve the sensorimotor integration performed by the central nervous system (CNS). An adequate understanding of these factors is a prerequisite to understanding the overall effect on human motion as well as providing a means for synthesizing human motion. The fields of neuroscience, biomechanics, robotics, and computer graphics provide motivation, as well as tools, for understanding human motion. In neuroscience, fundamental scientific understanding drives the motivation to understand human motion, whereas, in biomechanics, clinical applications often form the driving motivation. These clinical applications involve the use of movement analysis and simulation tools to help direct patient rehabilitation as well as predict the effects of surgery on movement. In addition to the clinical desire to analyze movement there has been an emerging desire in recent years to synthetically generate human-like motion in both simulated and physical settings. In computer graphics this desire is directed toward autonomously generating realistic motion for virtual actors. The intent is to direct these virtual actors using high-level goal directed commands for which low-level motion control is automatically generated. Motivated by similar desires, the robotics community seeks a high-level control framework for robotic systems. With the recent advent of complex humanoid robots this challenge has grown more demanding. Consistent with their anthropomorphic design, humanoid robots are intended to operate in a human-like manner within man-made environments and to promote interaction with their biological counterparts. To achieve this, common control strategies have involved generating joint space trajectories or learning specific motions, but these approaches require extensive motion planning computations and do not generalize well to related tasks.


Introduction
The behavioral richness exhibited in natural human motion results from the complex interplay of biomechanical and neurological factors.The biomechanical factors involve the kinematics and dynamics of the musculoskeletal system while the neurological factors involve the sensorimotor integration performed by the central nervous system (CNS).An adequate understanding of these factors is a prerequisite to understanding the overall effect on human motion as well as providing a means for synthesizing human motion.The fields of neuroscience, biomechanics, robotics, and computer graphics provide motivation, as well as tools, for understanding human motion.In neuroscience, fundamental scientific understanding drives the motivation to understand human motion, whereas, in biomechanics, clinical applications often form the driving motivation.These clinical applications involve the use of movement analysis and simulation tools to help direct patient rehabilitation as well as predict the effects of surgery on movement.In addition to the clinical desire to analyze movement there has been an emerging desire in recent years to synthetically generate human-like motion in both simulated and physical settings.In computer graphics this desire is directed toward autonomously generating realistic motion for virtual actors.The intent is to direct these virtual actors using high-level goal directed commands for which low-level motion control is automatically generated.Motivated by similar desires, the robotics community seeks a high-level control framework for robotic systems.With the recent advent of complex humanoid robots this challenge has grown more demanding.Consistent with their anthropomorphic design, humanoid robots are intended to operate in a human-like manner within man-made environments and to promote interaction with their biological counterparts.To achieve this, common control strategies have involved generating joint space trajectories or learning specific motions, but these approaches require extensive motion planning computations and do not generalize well to related tasks.

Human motion control
The basic constituents of the human motor system include the biomechanical plant and the CNS.A high-level block diagram, sufficient for our present purposes, is depicted in Fig. 1.Based on some specified task the CNS performs motor planning which culminates in low-level control issued as a motor command to the biomechanical plant.This motor planning and control occurs based on the integration of sensory information from proprioceptors distributed throughout the musculoskeletal system.Some knowledge of the biomechanical plant is also assumed to be encoded in the CNS.Fig. 1.Motor control involves the task-driven action of the central nervous system (CNS) on the biomechanical plant.Given proprioceptive information the CNS performs motor planning which results in the issuance of motor commands.
While the biomechanical plant can be decomposed and understood in reasonable detail the processes of the CNS are understood more vaguely.As a consequence, while Fig. 1 provides a conceptual framework, with regard to the CNS it lacks enough precision to be useful as a functional model.For this reason it is appropriate to consider some more basic analogs.To this end we will consider the most basic analog which is still useful, that of a joint space model, followed by task/posture analogs.

Joint space motion control
Joint space control is the earliest and still most common form of feedback control in robotic systems.In this scheme a task is specified in some natural coordinate system associated with the robot and environment.Based on a knowledge of the robot kinematics, the robot controller performs inverse kinematic computations to arrive at a posture or trajectory in terms of joint angles.The joint command is issued to the servo motors which execute the motion.While this method of controlling a robot is effective it requires the computation of inverse kinematics.Additionally, it does not make use of any knowledge of the robot's dynamics.The method of computed torque is an enhancement of the basic joint space control approach in which the controller does make use of the robot's dynamics.However, the control is still encoded in joint space rather than a more natural task space description.As an analog to the human motor system this joint space encoding may constitute a deficiency since a number of studies, Buneo et al. (2002); Sabes (2000); Scholz & Schöner (1999); Shenoy et al. (2003), suggest a task-oriented spatial encoding of planning and control.Rather than using inverse kinematic transformations this task-oriented encoding is accomplished through visumotor transformations from retinal coordinates to hand-or body-centered spatial coordinates.

Task/posture motion control
Motivated by evidence for a task-oriented spatial encoding of motion by the CNS we now consider a task/posture control model.This is depicted in Fig. 2 and represents a generalization beyond a strict joint space motor control model.In this case the control is encoded in the same native space in which the task is expressed.This obviates the need for inverse kinematics to convert the task description into a joint space description.The dynamics of the robot plant are expressed in task space with a complementary description of the posture (see Fig. 3).The controller exploits this decomposed structure to yield separate task and posture control terms.As such, the posture term can be chosen to minimize some criterion, consistent with the execution of the task.The motor command can then be issued in the appropriate actuator space (e.g., motor torques).Fig. 2. Task space motion control model where the dynamics are decomposed into complementary task and posture spaces.The posture control can be chosen using an auxiliary criterion which can be optimized consistent with the execution of the task (image courtesy of NASA).
As alluded to earlier this task/posture model represents a more general abstraction than the joint space model, and may be more suitable for purposes of modeling and understanding human motor control.The notions of task and posture are directly applicable to human motion control and, as we shall see, can be specifically interpreted in terms of physiological criteria.

Task/posture approach for biomechanical systems
Up to this point we have considered robotic control models as a means of addressing human motor control.In a more general sense the challenge of synthesizing low-level human motion control from high-level commands can be addressed by integrating approaches from the Fig. 3.A task description with complementary task consistent postures.Redundancy with respect to task introduces task dynamics as well as posture dynamics.
biomechanics and robotics communities.The biomechanics community has investigated the phenomenon of neuromuscular dynamics and control through the use of computational muscle models.This characterization allows for the description of muscle strength limitations, activation delays, and overall muscle contraction dynamics.Properly accounting for these characteristics is critical to authentically simulating human motion.In a complementary manner, the robotics community has investigated the task-level feedback control of robots using the operational space approach.This approach recasts the dynamics of the robotic system into a relevant task space description.This provides a natural mechanism for specifying high-level motion commands that can be executed using feedback control.Fig. 4 depicts a task/posture model of motor control which integrates robotic and biomechanical approaches.In this model the CNS is seen to affect motor control using task/posture decomposition.While the control is task-driven the task consistent postures are driven by neuromuscular criteria.In other words, while the CNS issues motor commands to achieve some task it is assumed that this is being done in a way that minimizes some neuromuscular cost (subject to the task requirements).While the precise nature of what, if anything, is being minimized by the CNS is difficult to directly infer, computational muscle models can be used to evaluate particular hypothetical effort criteria.Predicted postural behavior associated with minimizing these criteria can then be compared with actual postures from subject trials to validate the applicability of the criteria.Through the combined utilization of task-level constrained motion strategies and computational muscle models this chapter addresses motion control with application to human motion synthesis.A coherent framework is presented for the management of motion tasks, physical constraints, and neuromuscular criteria.The subsequent sections will address the constituent elements of this framework and will be divided into (i) task-based modeling and analysis and (ii) posture-based modeling and analysis.

Task-based modeling and analysis of biomechanical systems
In this section we present a task-based formulation for application to biomechanical systems.In the overall framework this addresses the highlighted element of Fig. 5.The focus is on task control in the presence of constraints.* Fig. 5. Task/posture motion control model for biomechanical systems highlighting task control in the presence of constraints.In this chapter the human shoulder complex will be investigated using this approach.

Configuration space dynamics
The equations of motion for a multibody system that is unconstrained with respect to configuration space can be expressed by the Euler-Lagrange equations, where L = L(q,q) is the Lagrangian of the system, q ∈ R n is the vector of generalized coordinates, and τ ∈ R n is the vector of generalized actuator forces (torques).In standard matrix form the equations of motion can be expressed as, M (q) q + b(q,q)+f (q,q)=B(q,q) T u,( 2 ) where u ∈ R k is the vector of control inputs, B(q,q) T ∈ R n×k is the matrix mapping control inputs to generalized actuator forces, M (q) ∈ R n×n is the configuration space mass matrix, b(q,q) ∈ R n is the vector of centrifugal and Coriolis terms, and f (q,q) ∈ R n is the vector of generalized applied forces.We will often use a modified and more specialized form of (2) commoninrobotics, M (q) q + b(q,q)+g(q)=τ ,( 3 ) where g(q) ∈ R n is the vector of gravity terms.The form of (3) assumes that the generalized actuator forces can be directly interpreted as control inputs; that is, τ = B T u = u, i.e., B T = 1.Additionally, the generalized applied forces are assumed to be restricted to gravity terms; that is, f (q,q)=g(q).We now introduce a set of m C holonomic and scleronomic constraint equations, φ(q The gradient of φ yields the constraint matrix, Adjoining the constraints to (3) by introducing a set of constraint forces yields the dynamic equation in the familiar multiplier form, where λ is a vector of unknown Lagrange multipliers.

Task space dynamics and control
In the previous section we considered configuration space descriptions of the dynamics of constrained multibody systems.Our objective is to reformulate these descriptions in the context of task space, Khatib (1987); Khatib (1995).This will provide the foundation for constrained task-level control to be discussed in the next section.Given a branching chain system and defining a set of m task, or operational space, coordinates, x ∈ R m we define the task Jacobian as, The generalized force (or control torque) in (3) can then composed as J T f ,w h e r ef ∈ R m is the task, or operational space, force.In the redundant case an additional term needs to complement the task term in order to realize any arbitrary generalized force.We will refer to this term as the null space term and it can be composed as N T τ o ,whereτ o is an arbitrary generalized force and N (q) T ∈ R n×n is the null space projection matrix.We then have the following set of unconstrained task, or operational space, equations of motion, Khatib (1987), where Λ(q) ∈ R m×m is the operational space mass matrix, μ(q,q) ∈ R m is the operational space centrifugal and Coriolis force vector, and p(q) ∈ R m is the operational space gravity vector.These terms are given by, Thus, the overall dynamics of our multibody system, given by, can be mapped into task space, where J is the dynamically consistent inverse of the task Jacobian, In a complementary manner the overall dynamics can be mapped into the task consistent null space (or self-motion space) using N T .

8
Human Musculoskeletal Biomechanics www.intechopen.com The overall dynamics can be expressed as, A controller employing (8) would be assumed to have imperfect knowledge of the system.Therefore, (8) should reflect estimates for the inertial and gravitational terms.Additionally, a control law needs to be incorporated.To this end we replace ẍ in ( 8) with the input of the decoupled system, Khatib (1995) f ⋆ , to yield the dynamic compensation equation, where the .represents estimates of the dynamic properties.Thus our control torque is, Any suitable control law can be chosen to serve as input of the decoupled system.In particular, we can choose a linear proportional-derivative (PD) control law of the form, where x d are reference values for the task coordinates and K p and K v are gain matrices.As we introduced a set of m C holonomic and scleronomic constraint equations to the configuration space dynamics we can do the same for the task space dynamics.Mapping ( 5) and ( 6) into an appropriate task/constraint space yields, De Sapio et al. ( 2006), The term α(q,q) ∈ R m C is the vector of centrifugal and Coriolis forces projected at the constraint, and ρ(q) ∈ R m C is the vector of gravity forces projected at the constraint.These terms are given by, where H(q) ∈ R m C ×m C is the constraint space mass matrix which reflects the system inertia projected at the constraint, The constraint null space projection matrix, Θ(q) T ∈ R n×n ,isgivenby , where, Φ, is the dynamically consistent inverse of Φ, The control equation can be expressed as, where the linear control law of ( 19) can be used.

9
A Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.com It is noted that (20) does not expose the constraint forces (Lagrange multipliers).An alternate form of the constrained task space dynamics is, De Sapio & Park (2010); De Sapio (2011), The term Λ c (q) ∈ R m×m is the task/constraint space mass matrix, μ c (q,q) ∈ R m is the task/constraint space centrifugal and Coriolis force vector, p c (q) ∈ R m is the task/constraint space gravity vector, and N c (q) T ∈ R n×n is the task/constraint null space projection matrix.These terms are given by, Equation ( 27) expresses the control torque as a function of the task accelerations, ẍ,t h e kinematic and dynamic properties, and the constraint forces, λ.The control equation can be expressed as, where the linear control law of ( 19) can be used.These equations need to be complemented by a passivity condition on any unactuated joints, where S p ∈ R (n−k)×n is a selection matrix that identifies the passive (unactuated) joints.
We can express (32) as, where S c ∈ R (k−p)×m C is a selection matrix used to select the controlled constraint forces and S u ∈ R (n−k)×m C is a selection matrix used to select the uncontrolled constraint forces.The terms λ c d and λ u are the vectors of controlled and uncontrolled constraint forces, respectively, selected out of the full vector of constraint forces.The term λ c d is specified as part of the control reference, along with x d , ẋd ,andẍ d .We can solve for the control torque, where,

Task-level control applied to biomechanical Systems
In this section we apply the task-level control formulation, presented in the previous section, to a biomechanical subsystem.This formulation possesses particular efficacy in addressing 10 Human Musculoskeletal Biomechanics www.intechopen.comcomplicated systems that involve holonomic constraints.We will choose the human shoulder complex as an illustrative example of this.Perhaps the most kinematically complicated subsystem in the human skeletal system is the shoulder complex.While the purpose of the shoulder complex is to produce spherical articulation of the humerus, the resultant motion does not exclusively involve motion of the glenohumeral joint.The shoulder girdle, which is comprised of the clavicle and scapula, connects the glenohumeral joint to the torso and produces some of the motion associated with the overall movement of the humerus.While this motion is small compared to the glenohumeral motion its impact on overall arm function is significant, Klopčar & Lenarčič (2001); Lenarčič et al. (2000).This impact is not only associated with the influence of the shoulder girdle on the skeletal kinematics of the shoulder complex, but also its influence on the routing and performance of muscles spanning the shoulder.As a consequence, shoulder kinematics is tightly coupled to the behavior of muscles spanning the shoulder.In turn, the action of these muscles (moments induced about the joints) influences the overall musculoskeletal dynamics of the shoulder.For the aforementioned reasons, when modeling the human shoulder it is important to model the kinematically coupled interactions between the shoulder girdle and the glenohumeral joint.
We can apply a constrained task-level approach to the control of a holonomically constrained shoulder model.This is based on work of De Sapio et al. ( 2006).The constrained task-level formulation has been updated to the one presented in the previous section.We reparameterized the model of Holzbaur et al. (2005) to include a total of n = 13 generalized coordinates (9 for the shoulder complex and 4 for the elbow and wrist) to describe the unconstrained configuration of the arm.As shown in Fig. 6, the coordinates q 6 , q 7 ,a n dq 9 correspond to the independent coordinates for the shoulder complex used in Holzbaur et al. shoulder complex and 4 for the elbow and wrist).These constraint equations, φ(q)=0,a r e given by.
where the constraint constants, b and c, associated with the dependency on humerus elevation plane and elevation angle were obtained from the regression analysis of de Groot and Brand de Groot & Brand (2001).

Simulated control implementation
Defining a humeral orientation, or pointing, task we have, x(q)= q 6 q 7 q 9 T .(38) We will not control any of the constraint forces so our control equations consist of, where S p accounts for the unactuated (passive) joints, q 1 , ••• , q 5 ,andq 8 , Fig. 7 displays simulation plots for the shoulder complex under a goal position command.The controller was applied to both the constrained shoulder model and a simple model with only glenohumeral articulation (motion of the scapula and clavicle not coupled to glenohumeral motion).The glenohumeral joint control torques associated with the constrained and simple shoulder models, performing identical humeral pointing tasks, differ over their respective time histories.This is particularly true for shoulder elevation angle and elevation plane.

Muscle-based actuation
In the previous section the simulation of the shoulder complex was actuated with joint torque actuators.In reality biomechanical systems are actuated by a set of musculotendon actuators.Hill-type lumped parameter models for muscle-tendon pairs yield equations of state which The inclusion of shoulder girdle constraints influences the resulting torques, particularly for shoulder elevation plane, q 6 , and elevation angle, q 7 .describe musculotendon behavior, Zajac (1993).Given a set of r musculotendon actuators we can express the vector of musculotendon forces as f = f (l, l, a) ∈ R r ,w h er el ∈ R r are the muscle lengths whose behavior is described by a state equation and a ∈ R r are the muscle activations, which reflect the level of motor unit recruitment for a given muscle.Activation is a normalized quantity, that is a i ∈ [0, 1].By using either a stiff tendon model or a steady state evaluation of the musculotendon forces we can express f = f (q,q, a)=F (q,q)a,w h e r e F (q,q) ∈ R r×r is a diagonal matrix mapping muscle activation, a, to muscle force, f .T h e joint moments induced by these musculotendon forces are, where L(q)=∂l/∂q ∈ R r×n is the musculotendon path Jacobian and B(q,q) T ∈ R n×r maps muscle activation, a,tojointtorque,τ .Equation ( 5) can thus be expressed in terms of muscle actuation, We can then express the control equation as (26),  Due to both kinematic redundancy and actuator redundancy there will typically be many solutions for a.Using a static optimization procedure, Thelen et al. (2003), this can be resolved by finding the solution which minimizes a 2 given a i ∈ [0, 1].This corresponds to minimizing the instantaneous muscle effort.The use of a 2 and similar cost measures have been suggested in a number of sources, Anderson & Pandy (2001); Crowninshield & Brand (1981).
In Section 2.4 we observed that the constrained shoulder model, which involves kinematic coupling between the humerus, scapula and clavicle, differs from the simple shoulder model with regard to the control torques that are required to achieve a desired motion control task.
The constrained model also differs from the simple model in the degree to which the system of muscles are able to generate control forces to achieve a desired motion control task.This is due to the influence of the constrained motion between the humerus, scapula and clavicle on the muscle forces and muscle moment arms about the glenohumeral joint (see Fig. 8).
An example of this is shown in  for the constrained model.This is critical in various applications involving the study and synthesis of human movement, Khatib et al. (2004).

Posture-based modeling and analysis of biomechanical systems
In this section we present a muscle effort criterion for the prediction of upper limb postures.
In the overall framework this addresses the highlighted element of Fig. 10.The focus is on developing a neuromuscular criterion and a methodology for synthesizing posture in the presence of that criterion.
A particularly relevant class of human movements involves targeted reaching.Given a specific target the prediction of kinematically redundant upper limb motion is a problem of choosing one of a multitude of control solutions, all of which yield kinematically feasible configurations.It has been observed that humans resolve this redundancy problem in a relatively consistent manner, Kang et al. (2005); Lacquaniti & Soechting (1982).For this reason general mathematical models have proven to be valuable tools for motor control prediction across human subjects.Approaches for predicting human arm movement have been categorized into posture-based and trajectory-based (or transport-based) models, Hermens & Gielen (2004); Vetter et al. (2002).Posture-based models are predicated upon the assumption of Donders' law.Specifically, Donders' law postulates that final arm configuration is dependent only on final hand position and is independent of initial (or past) arm configurations.Thus, the fundamental characteristic of posture-based models is path independence in predicting equilibrium arm postures.In these models the postulated behavior of the central nervous system (CNS) can be said to execute movements based strictly on control variables (e.g., hand position).Conversely, trajectory-based models, which include the minimum work model, Soechting et al. (1995), and the minimum torque-change model, Uno et al. (1989), are characterized by dependence of final arm configuration on the final hand position, the starting configuration, and the choice of a specific optimal path parameterized over time (i.e., past arm configurations).Many of the models for predicting human arm movement, including the minimum work model and the minimum torque-change model, do not involve any direct inclusion of muscular properties such as routing kinematics and strength properties.Even models described as employing biomechanical variables, Kang et al. (2005), typically employ only variables derivable purely from skeletal kinematics and not musculoskeletal physiology.It is felt that the utilization of a model-based characterization of muscle systems, which accounts for muscle kinematic and strength properties, is critical to authentically simulating human motion since all human motion is predicated upon physiological capabilities.

Biomechanical effort minimization
We begin with a general consideration of biomechanical effort measures.An instantaneous effort measure can be used in a trajectory-based model of movement by seeking a trajectory, consistent with task constraints, that minimizes the integral of that measure over the time interval of motion.Alternatively, the instantaneous effort measure can be used in a posture-based model by seeking a static posture, consistent with the target constraint, which minimizes the static form of the measure.Proceeding from Section 2.5 we express the joint torques in terms of muscle activations, Due to the fact that there are typically more muscles spanning a set of joints than the number of generalized coordinates used to describe those joints this equation will have an infinite set of solutions for a. Choosing the solution, a o , which has the smallest magnitude (least norm) yields, where B T+ is the pseudoinverse of B T .Our instantaneous muscle effort measure can then be expressed as, Expressing this effort measure in constituent terms and dissecting the structure we have, This allows us to gain some physical insight into what is being measured.The terms inside the brackets represent a measure of the net capacity of the muscles.This is a combination of the force generating kinetics of the muscles as well as the mechanical advantage of the muscles, as determined by the muscle routing kinematics.The terms outside of the brackets represent the kinetic torque requirements of the task and posture.
It is noted that the solution of ( 46) expressed in ( 47) corresponds to a constrained minimization of a 2 , however, this solution does not enforce the constraint that muscle activation must be positive (muscles can only produce tensile forces).Imposing inequality constraints, 0 ≤ a i ≤ 1, on the activations requires a quadratic programming (QP) approach for performing the constrained minimization.In this case the solution of ( 46) which minimizes a 2 and satisfies 0 ≤ a i ≤ 1 can be represented in shorthand as, where QP( ) represents the output of a quadratic programming function (e.g., quadprog() in the Matlab optimization toolbox).Our muscle effort criterion is then U = a o 2 ,w h e r e a o is given by ( 50).Despite the preferred use of quadratic programming for computational purposes, (49) provides valuable insights at a conceptual level.

Posture-based criteria
For posture-based analysis the static form of the instantaneous muscle effort measure can be constructed by noting that q → 0, thus eliminating the dependency of U on q.T h i sa l s o implies that τ → g.Thus, the static form, U(q), of ( 48) is, Alternatively, imposing the inequality constraints on the activations we have U = a o 2 where, a o = QP(B(q) T , g(q), a 2 ,0 ≤ a i ≤ 1).( 52) To find a task consistent static configuration which minimizes U(q),w efi r s td e fi n et h e self-motion manifold associated with a fixed task point, x o .T h i si sg i v e nb yM(x o )= {q | x(q)=x o } where x(q) is the operational point of the kinematic chain (e.g., the position of the hand).For each q on M(x o ) we can compute U(q)= a o 2 by solving the quadratic programming problem of ( 52).The minimal effort task consistent configuration is then the configuration, q,forwhichU(q) is minimized on M(x o ). Figure 11 illustrates changes in the predicted posture associated with minimal muscle effort as weight at the hand is varied.

17
A Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.comFig. 11.Muscle effort variation and predicted minimal efforts associated with different weights in hand.The weight at the hand was projected into joint space and added to the gravity vector associated with the limb segments.The effect is that the predicted posture, associated with the minimum of the muscle effort curve, shifts as weight is added.Each point on each of the curves was computed by solving a quadratic programming problem.

Sphere methods for quadratic programming
Quadratic programming addresses the general minimization of a quadratic function subject to a combination of equality and inequality constraints.It can be formally stated as: Minimize the objective function, z(x),withrespecttox,where, subject to, We assume that D is symmetric positive definite and that the polytope defined by Ax ≥ b is convex.In the case of muscle effort minimization we have the specific form, subject to, where 1 r×r is the r × r identity matrix, 0 r×1 is a column vector of zeros,and1 r×1 is a column vector of ones.Clearly, the quadratic form ( 56) is positive definite and the polytope (57) is convex.For the procedure of muscle effort minimization this QP problem is repeatedly solved for different values of q on M(x o ), generating the function U(q).A line search over M(x o ) then yields q o where U(q o ) represents the minimum of U on the self-motion manifold.
Since this QP problem needs to be solved repeatedly we would like an efficient method for solving it.There are a number of interior point method (IPM) solvers that addresses QP problems.We have implemented one based on the sphere method approach.This approach was initially developed for linear programming (LP) problems, Murty (2006); Murty (2010b), but has been extended for QP problems, Murty (2010a).Our implementation of the sphere method approach for QP will be described here and is based on the approach of Murty et al.
We begin with the general problem of minimizing (53) subject to ( 54) and ( 55).It is noted that the equality constraints, Cx = y, can be represented as the inequality constraints.
where ǫ is a vector of small positive tolerances.Consequently, we consider all constraints, both equality and inequality, as being represented by Ax ≥ b.These constraints describe a polytope K.A simple check can be made to determine if the unconstrained minimum of the objective function is interior to the polytope.If this is the case then the solution to the QP problem is trivial.Assuming that this is not the case we proceed by noting that the facetal hyperplanes defined by, Ax = b, can be represented as, where {v 1 , ••• , v m } are the inward normals of the facetal planes and, We normalize (61) by dividing both sides by v i .T h u s , Following these normalizations we perform centering steps from some initial point, x i , interior to the polytope.Two types of centering steps are performed.One is termed a line search from facetal normals (LSFN), the other is termed a line search from computed profitable directions (LSCPD).First, the touching set, T(x),a tt h ec u r r e n tp o i n t ,x (initially x i ) is computed.This is the set of facetal hyperplanes which are touched by the largest hypersphere that can be inscribed in the polytope, centered at the current point, x.
For the LSFN step the facetal unit normals, { v1 , and such that it reduces the objective function, that is, where ∇z(x)=Dx + d.Given a profitable direction, ŷ, that meets these criteria a line search is performed to move along this profitable direction until a point is reached for which

19
A Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.com the inscribed sphere at that point is a maximum.A backtracking line search has been implemented for this.The line search is terminated at any point where ( 65) is not satisfied (no longer descending).This LSFN step is repeated as long as profitable directions meeting the criteria are found.
For the LSCPD step the linear system, is solved for a direction y 1 and the linear system, is solved for a direction y 2 .Backtracking line searches are performed sequentially in both of these unit directions, ŷ1 and ŷ2 , until a point is reached for which the inscribed sphere at that point is a maximum.Again, the line search is terminated at any point where ( 65) is not satisfied.This LSCPD step is repeated until the incremental reduction in the objective function falls below some tolerance.The final output of the centering steps will be labeled x r .Following the centering steps, descent steps are performed.For a given iteration, a single descent step is chosen based on the best performance of a set different descent steps, in reducing the objective function.All of these descent steps terminate at the boundary of the polytope.Given a unit descent direction ŷ the distance along this direction to the polytope boundary is given by, These candidate descent directions are as follows: • D1: Choose y = −∇z(x r ).Mov ef r o mx r along ŷ to the boundary of K.
• D2: Choose y to be the direction defined by the displacement vector between the previous two centering locations, y = x r − x r−1 .Mov efr omx r along ŷ to the boundary of K. • D3: Define directions associated with projecting −∇z(x r ) on each of the facetal hyperplanes in the touching set.These directions are given by, Move from x r along ŷi , ∀i ∈ T(x r ),totheboundaryofK.Oft h e s e|T(x r )| descents retain the one that results in the greatest reduction in the objective function.• D4: Choose y to be the average of the directions from D3. Move from x r along ŷ to the boundary of K.The average of the directions from D3 is given by, • D5: Compute the touching point, x i r associated with x r .This is the point on each facetal hyperplane in the touching set where the maximum inscribed hypersphere, centered at x r , touches.These points are given by, The near touching point is defined as a point on the line segment between x r and x i r . xi where epsilon is a small tolerance (e.g., ≈ 0.1).Projecting −∇z( xi r ) on each of the facetal hyperplanes in the touching set yields, Move from xi r along ŷi , ∀i ∈ T(x r ),totheboundaryofK.Oft h e s e|T(x r )| descents retain the one that results in the greatest reduction in the objective function.
The output of D1 through D5 that results in the greatest reduction in the objective function is used to yield the new point x.The centering and descent steps are repeated until some solution tolerance is met.In subsequent iterations the feasible set K shrinks based on the objective tangent hyperplane passing thorough x.That is, the constraints are appended to include the objective tangent hyperplane passing through the current x, Fig. 12 illustrates some of the general steps for centering and descent in this algorithm.The algorithm has been implemented in Matlab and in C++ on problems involving thousands of variables and constraints.It performs favorably in terms of accuracy and speed as compared with Matlab's quadprog() IPM routine.Quantitative benchmarking is planned for the future. Fig.
12.An illustration of the centering and descent steps associated with the sphere method implemented for QP problems.

Least action of cost criteria
We now pose the problem of minimizing a cost criterion subject to a motion control task.This is detailed in De Sapio et al. (2008).We can perform this for an instantaneous potential-based

21
A Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.comcriterion, U(q), by using a gradient descent method in conjunction with the task/posture decomposition of (13).Given our overall control torque, the posture term, τ p , can be chosen to correspond to the gradient descent, −∂U/∂q,o fo u r cost criterion.In this case the equations of motion are, subject to the task ẍ(q)= ẍd (t).We complement (76) with the task space control law given by ( 17) and ( 19).Gradient descent seeks to reduce an instantaneous criterion rather than extremize a criterion over an integration interval.To address this latter case we define the action integral associated with a cost criterion, as in De Sapio et al. (2008), If no task trajectory constraints are specified we have, Equations ( 77) and ( 78) result in the Euler-Lagrange equations, Imposing rheonomic task trajectory constraints, x(q)=x d (t), implies, which yields the system, d dt or, subject to ẍ(q)= ẍd (t).Projecting (82) into task space yields the operational space equations for this system, Λ U (q,q) ẍ + μ U (q,q)+p U (q)=λ, where Λ U , μ U ,andp U are analogous to Λ, μ,andp,butwithM , b,andg replaced by M U , b U ,andg U .Applying constraint stabilization, the trajectory constraints can be expressed as,

22
Human Musculoskeletal Biomechanics www.intechopen.comand the constraint stabilized system is, Two examples from De Sapio et al. ( 2008) can be used to illustrate the approaches described.
First we consider a simplified n = 3 degree-of-freedom model of the human arm actuated by r = 14 muscles.The system is kinematically redundant with respect to the m = 2 degree-of-freedom task of positioning the hand.The muscle attachment and force-length data were taken from the study of Holzbaur et al. (2005).We wish to control the hand to move to a target location, x f , while minimizing an instantaneous muscle effort criterion defined as, where B(q)=−L(q) T F (q) and the muscle forces are modeled as f (q, a)=F (q)a,where, The term, f o i , represents the maximum isometric force for the ith muscle and l o i represents the optimal fiber length for the ith muscle.No task trajectory, x d (t), will be specified, just the final target location, x f .We have the following control equations, In this case no model of the dynamic properties is included in (??).Also, the terms ẍd (t) and ẋd (t) have been omitted in (88) and x d (t) has been replaced by the final target location, x f , since the goal is to move to a target location without specifying a trajectory.To the posture space portion of (89) we have added a dissipative term, k d q, and a gain, k e , on the gradient descent term.Finally, the gravity vector, g, is perfectly compensated for in the overall control.Fig. 13 displays time histories of joint motion, hand motion, and muscle effort for a simulation run.We can see that the controller achieves the final target objective while the null space control simultaneously seeks to reduce the instantaneous muscle effort (consistent with the task requirement).It is recalled that no compensation for the dynamics (except for gravity) was included in (89).Thus, there is no feedback linearization present in the control.Normally, perfect feedback linearization without explicit trajectory tracking would produce straight line motion to the goal.In the absence of feedback linearization non-straight line motion results.We now seek a trajectory which moves the hand to a target location (see Fig. 14), while extremizing muscle action, In this case we will define the instantaneous muscle effort criterion as,

23
A Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.comFig. 13.A redundant muscle-actuated model of the human arm.Initial and final configurations, q(t o ) and q(t f ), associated with gradient descent movement to a target, x f , are shown.(Top) Time history of the arm motion to the target.Motion corresponds to gradient descent of the muscle effort, subject to the task requirement.(Bottom) Time history of hand trajectory and muscle effort criterion, U(q)=g T (B T B) −1 g, associated with gradient descent for human arm model.The null space control seeks to reduce the muscle effort but is also constrained by the task requirement.
where l o i represents the optimal fiber length for the ith muscle and v o i represents the maximum contraction velocity for the ith muscle.Under task constraints the system which extremizes the muscle action is given by, and ( 82).The solution yields the muscle action extremizing path between configurations q(t o ) and q(t f ), given the hand target constraint.Fig. 14 displays time histories of joint motion, hand motion, and muscle effort for a simulation run.The straight line motion of the hand results from the feedback linearization employed.

Task/posture control for neural prosthetics
If we return to our initial description of the human motor system depicted in Fig. 1 we can add an outer loop associated with the high-level task reasoning and planning functions of the brain.This is depicted in Fig. 15.In this abstraction motion control is divided into a task generative phase and a motor execution phase.The abstraction depicted in Fig. 15 has relevance not only to the basic understanding of the biomechanics and control of movement but also to the design of engineered systems that augment physiological systems.
Neural prosthetics and brain-computer interfaces have emerged as compelling technologies for the inference of cognitive motor intent using neuroimaging techniques.These techniques can be invasive, as in the case of a brain implant, or non-invasive, as in the case of electroencephalography (EEG).In either case the goal of these techniques is to restore or augment a degree of motor functionality to an individual.This is accomplished through the prediction of motor intent, based on inference from neuroimaging data, and subsequent realization of that intent through a robotic prosthesis.This inference involves decoding the neural encoding manifested in the neuroimaging data.As referenced earlier, current research suggests a task-oriented spatial encoding of motor intent.Based on this premise exciting work has been done to control robotic devices by decoding motor intent.Current breakthroughs in motor-based brain-computer interfaces can be furthered by the implementation of more sophisticated control theoretic algorithms.Using existing invasive or non-invasive neuroimaging techniques it is believed that the performance of computer controlled robotic devices can be enhanced using a task/posture control framework where, in addition to the inference of task-oriented objectives, postural control objectives can also  be inferred from the neuroimgaing data and used as the control reference for the robotic prosthesis.Some of the approaches presented in the previous sections are relevant to the realization of such a neural-based task/posture control framework, as depicted in Fig. 16.
Fig. 16.Task and postural motion intent is inferred from the brain using neuroimaging technologies.The prosthesis controller realizes this intent using a task/posture decomposition.Ultimately, the motor commands are used to control a robotic prosthesis (robot prosthesis image courtesy of DARPA).
Such a framework would involve two principal components: (1) the application of existing signal processing and machine learning methods to the inference of both task-level motor intent as well as postural intent/behavior from neuroimaging data, and (2) control system design and implementation to realize the inferred motor intent on a robotic prosthesis.To complement the neuroimaging data both neuromuscular data in the form of electromyography (EMG) measurements, as well as computational neuromuscular models can be employed in such a framework.This would allow inference and synthesis of control laws based on neuromuscular criteria such as the minimization of neuromuscular effort, etc.

Conclusion
A framework has been presented for the analysis and synthesis of human motion through the management of motion tasks, physical constraints, and neuromuscular criteria.The constituents of this framework include a task-level control methodology for constrained systems as well as a muscle effort criterion for the prediction of postures.The constrained task-level control methodology presented exploits the symmetry between task-level control and constrained dynamics.This approach can be applied to the motion control of systems with persistent holonomic constraints as well as to the motion control of systems which undergo intermittent contact with the environment, as in locomotive biomechanical and robotic systems which make intermittent ground contact.
With regard to posture synthesis a posture-based muscle effort criterion for predicting upper limb motion has been implemented.This criterion characterizes effort expenditure in terms of musculoskeletal parameters, rather than just skeletal parameters as with many previous criteria.As with any posture-based model this one is based upon the assumption of Donders' Law.In other words, the final arm configuration is assumed to be independent of initial or prior arm configurations and is only dependent on hand position (the control variable) and the instantaneous physiological criterion.Good correlation between natural reaching postures and those predicted by the proposed posture-based muscle effort criterion have been shown De Sapio, Warren & Khatib (2006); Khatib et al. (2009).Additionally, an analytical procedure has been outlined for the analysis of trajectory-based effort minimization using gradient descent and least action methods.We have also outlined how our task/posture approach might be employed in neural prosthetics and brain-computer interfaces.

Fig. 4 .
Fig. 4. Task/posture motion control model for biomechanical systems.In addition to task control, neuromuscular criteria are used to control the posture by minimizing neuromuscular cost, consistent with the execution of the task.

Fig. 6 .
Fig. 6.Reparameterization of the model of Holzbaur et al.Five holonomic constraints couple the movement of the shoulder girdle with the glenohumeral rotations.
(2005); elevation plane, elevation angle, and shoulder rotation, respectively.Five holonomic constraints need to be imposed to properly constrain the motion of the shoulder girdle.With an additional constraint at the glenohumeral joint we have a total of m C = 6 constraints.This yields p = n − m C = 7 degrees of kinematic freedom (3 for the 11 A Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.com

Fig. 7 .
Fig. 7. (Top) Time response of humeral pointing during execution of a goal command for constrained and simple shoulder models.Appropriate dynamic compensation accounts for the control task, x, and the shoulder girdle constraints, φ.The control gains are k p = 100 and k v = 20.(Bottom) Glenohumeral joint control torques as predicted by the constrained and simple shoulder models.The inclusion of shoulder girdle constraints influences the resulting torques, particularly for shoulder elevation plane, q 6 , and elevation angle, q 7 .
Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.com

Fig. 8 .
Fig. 8. Muscle paths spanning the shoulder complex.Muscle moment arms are determined from the muscle path data Holzbaur et al. (2005).The motion of the shoulder girdle influences the moment arms about the glenohumeral joint.

Fig. 9 .
Predicted muscle moment arms, muscle forces, and moment generating capacities for the deltoid muscles are compared for the simple and constrained shoulder models.The muscle path and force-length data were taken from the study ofHolzbaur et al. (2005).In the constrained shoulder model the motions of the scapula and clavicle are highly coupled to humerus elevation angle (q 7 coordinate), whereas, in the simple shoulder model the motion of the scapula and clavicle are not coupled to glenohumeral motion.The paths of the deltoid muscles are affected by the constrained motion of the humerus, scapula, and clavicle.This results in significant differences in moment arms predicted by the two models, with the constrained model often generating moment arms of substantially larger magnitude than the simple model.Additionally, the predicted isometric muscle forces (computed at full activation) generated by the two models differ.The resulting moment generating capacities of the constrained model are often substantially larger in magnitude than the simple model.This implies that the simple model, which excludes the constrained shoulder girdle motion, typically underestimates the moment generating capacities of muscles that span the shoulder, sinceHolzbaur et al. (2005) demonstrated correlation between predicted and experimental moment generating capacities 14 Human Musculoskeletal Biomechanics www.intechopen.com

Fig. 9 .
Fig. 9. (Top) Muscle moment arms for the deltoid muscles, as predicted by the constrained and simple shoulder models.The constrained model typically generates moment arms of substantially larger magnitude than those of the simple model.(Bottom) Muscle forces and moment generating capacities for the deltoid muscles.The resulting moment generating capacities associated with the constrained model are typically larger in magnitude than those associated with the simple model.

Fig. 10 .
Fig. 10.Task/posture motion control model for biomechanical systems highlighting posture control from neuromuscular criteria.

Fig. 14 .
Fig. 14. (Top) Time history of the arm motion between configurations q(t o ) and q(t f ).Motion corresponds to extremization of the muscle effort action integral.(Bottom) Time history of hand trajectory for human arm model and time history of muscle effort criterion associated with extremizing the action integral of (91).

25A
Task-Level Biomechanical Framework for Motion Analysis and Control Synthesis www.intechopen.com

Fig. 15 .
Fig. 15.An outer loop represents the high-level task reasoning and planning functions of the brain.This feeds into the lower-level motor control functions involving the task-driven action of the central nervous system (CNS) on the biomechanical plant.