where s P is the constraint correction displacement vector and s Q is the optimization step displacement vector, and s P ⊥ s Q . This method was chosen as it reduces the dimensionality of the optimization problem by the size of the space spanned by the constraint equations. The vector s P is defined as the least-squares solution to equation 22,