Home > prediction > ccl_learna_pred_proj_lambda.m

ccl_learna_pred_proj_lambda

PURPOSE ^

N = ccl_learna_pred_proj_lambda (model, q, Iu)

SYNOPSIS ^

function N = ccl_learna_pred_proj_lambda (q, model, J, Iu)

DESCRIPTION ^

 N = ccl_learna_pred_proj_lambda (model, q, Iu)
 Prediction of the projection matrix
 Our model predicts the constraint parameters. this function is used to
 reconstuct the projection matrix from constraint paramters.

 Input:
   model                                   Parametric model parameters
   q                                       Joint state data
   Iu                                      Identity matrix

 Output:
   N                                       Null space projection

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function N = ccl_learna_pred_proj_lambda (q, model, J, Iu)
0002 % N = ccl_learna_pred_proj_lambda (model, q, Iu)
0003 % Prediction of the projection matrix
0004 % Our model predicts the constraint parameters. this function is used to
0005 % reconstuct the projection matrix from constraint paramters.
0006 %
0007 % Input:
0008 %   model                                   Parametric model parameters
0009 %   q                                       Joint state data
0010 %   Iu                                      Identity matrix
0011 %
0012 % Output:
0013 %   N                                       Null space projection
0014 
0015 Rn      = Iu ;                                  % Initial rotation matrix
0016 Lambda  = zeros(model.dim_k, model.dim_r) ;     % Initial selection matrix
0017 
0018 for k = 1:model.dim_k
0019     theta       = [pi/2 * ones(1,k-1) ,  (model.w{k} * model.phi(q) )' ] ;
0020     alpha       = ccl_math_uvec(theta) ;                      % the kth alpha_0
0021     Lambda(k,:) = alpha * Rn ;                                  % rotate alpha_0 to get the kth constraint
0022     Rn          = ccl_math_rotmat (theta, Rn, model, k) ;   % update rotation matrix for (k+1)
0023 end
0024 A = Lambda * J(q) ;
0025 N = eye(model.dim_u) - pinv(A)*A ;
0026 end

Generated on Mon 01-Jan-2018 15:49:39 by m2html © 2005