A sparse MPC solver for walking motion generation (old version).
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
matrix_ecL_as Class Reference

Initializes lower diagonal matrix L and performs backward and forward substitutions using this matrix. More...

#include <matrix_ecL_as.h>

List of all members.

Public Member Functions

 matrix_ecL_as (const int)
 ~matrix_ecL_as ()
void form (const problem_parameters &)
 Builds matrix L.
void solve_backward (const int, double *)
 Solve system ecL' * x = b using backward substitution.
void solve_forward (const int, double *)
 Solve system ecL * x = b using forward substitution.

Public Attributes

double * ecL
double ** ecL_diag
double ** ecL_ndiag

Private Member Functions

void chol_dec (double *)
 Performs Cholesky decomposition of 3x3 matrix.
void form_iQBiPB (const double *, const double *, const double, double *)
 Forms matrix iQBiPB = 0.5 * inv(Q) + 0.5 * B * inv(P) * B.
void form_iQAT (const double, const double, const double *)
 Forms matrix iQAT = 0.5 * inv (Q) * A'.
void form_AiQATiQBiPB (const problem_parameters &, const state_parameters &, double *)
 Forms matrix AiQATiQBiPB = A * inv(Q) * A' + 0.5 * inv(Q) + 0.5 * B * inv(P) * B.
void form_L_non_diag (const double *, double *)
 Forms a 3x3 matrix L(k+1, k), which lies below the diagonal of L.
void form_L_diag (const double *, double *)
 Forms a 3x3 matrix L(k+1, k+1), which lies on the main diagonal of L.

Private Attributes

double * iQAT

Detailed Description

Initializes lower diagonal matrix L and performs backward and forward substitutions using this matrix.

Definition at line 41 of file matrix_ecL_as.h.


Constructor & Destructor Documentation

matrix_ecL_as::matrix_ecL_as ( const int  N)

Definition at line 24 of file matrix_ecL_as.cpp.

Definition at line 42 of file matrix_ecL_as.cpp.


Member Function Documentation

void matrix_ecL_as::chol_dec ( double *  mx9) [private]

Performs Cholesky decomposition of 3x3 matrix.

Parameters:
[in,out]mx9a pointer to matrix, the result is stored in the same place.
Attention:
Only the elements below the main diagonal are initialized.

Definition at line 68 of file matrix_ecL_as.cpp.

void matrix_ecL_as::form ( const problem_parameters ppar)

Builds matrix L.

Parameters:
[in]pparparameters.

Definition at line 232 of file matrix_ecL_as.cpp.

void matrix_ecL_as::form_AiQATiQBiPB ( const problem_parameters ppar,
const state_parameters stp,
double *  result 
) [private]

Forms matrix AiQATiQBiPB = A * inv(Q) * A' + 0.5 * inv(Q) + 0.5 * B * inv(P) * B.

Parameters:
[in]pparproblem parameters.
[in]stpstate parameters.
[out]resultresult
Attention:
Only the elements below the main diagonal are initialized.

Definition at line 143 of file matrix_ecL_as.cpp.

void matrix_ecL_as::form_iQAT ( const double  A3,
const double  A6,
const double *  i2Q 
) [private]

Forms matrix iQAT = 0.5 * inv (Q) * A'.

Parameters:
[in]A34th and 7th elements of A.
[in]A66th element of A.
[in]i2Qa vector of 3 elements, which contains diagonal elements of 0.5*inv(Q).

Definition at line 122 of file matrix_ecL_as.cpp.

void matrix_ecL_as::form_iQBiPB ( const double *  B,
const double *  i2Q,
const double  i2P,
double *  result 
) [private]

Forms matrix iQBiPB = 0.5 * inv(Q) + 0.5 * B * inv(P) * B.

Parameters:
[in]Ba vector of 3 elements.
[in]i2Qa vector of 3 elements, which contains diagonal elements of 0.5 * inv(Q).
[in]i2P0.5 * inv(P) (only one number)
[out]resultthe result
Attention:
Only the elements below the main diagonal are initialized.

Definition at line 99 of file matrix_ecL_as.cpp.

void matrix_ecL_as::form_L_diag ( const double *  ecLp,
double *  ecLc 
) [private]

Forms a 3x3 matrix L(k+1, k+1), which lies on the main diagonal of L.

Parameters:
[in]ecLpupper triangular matrix matrix lying to the left from ecLc on the same level of L
[in]ecLcthe result is stored here
Attention:
Only the elements below the main diagonal are initialized.

Definition at line 209 of file matrix_ecL_as.cpp.

void matrix_ecL_as::form_L_non_diag ( const double *  ecLp,
double *  ecLc 
) [private]

Forms a 3x3 matrix L(k+1, k), which lies below the diagonal of L.

Parameters:
[in]ecLpprevious matrix lying on the diagonal of L
[in]ecLcthe result is stored here

Definition at line 173 of file matrix_ecL_as.cpp.

void matrix_ecL_as::solve_backward ( const int  N,
double *  x 
)

Solve system ecL' * x = b using backward substitution.

Parameters:
[in]Nnumber of states in the preview window
[in,out]xvector "b" as input, vector "x" as output.

Definition at line 329 of file matrix_ecL_as.cpp.

void matrix_ecL_as::solve_forward ( const int  N,
double *  x 
)

Solve system ecL * x = b using forward substitution.

Parameters:
[in]Nnumber of states in the preview window
[in,out]xvector "b" as input, vector "x" as output (N * SMPC_NUM_STATE_VAR)

Definition at line 268 of file matrix_ecL_as.cpp.


Member Data Documentation

Definition at line 53 of file matrix_ecL_as.h.

Definition at line 54 of file matrix_ecL_as.h.

Definition at line 55 of file matrix_ecL_as.h.

double* matrix_ecL_as::iQAT [private]

Definition at line 69 of file matrix_ecL_as.h.


The documentation for this class was generated from the following files: