Drake

Utility functions for system identification. More...
#include <drake/solvers/system_identification.h>
Classes  
struct  SystemIdentificationResult 
A helper struct to hold System ID results. More...  
Public Types  
typedef ::Polynomial< CoefficientType >  PolyType 
typedef PolyType::Monomial  MonomialType 
typedef PolyType::Term  TermType 
typedef PolyType::VarType  VarType 
typedef std::map< PolyType, VarType >  LumpingMapType 
typedef std::map< VarType, CoefficientType >  PartialEvalType 
Static Public Member Functions  
static LumpingMapType  GetLumpedParametersFromPolynomial (const PolyType &poly, const std::set< VarType > ¶meter_vars) 
Extract lumped parameters from a given polynomial. More...  
static LumpingMapType  GetLumpedParametersFromPolynomials (const std::vector< PolyType > &polys, const std::set< VarType > ¶meter_vars) 
Same as GetLumpedParametersFromPolynomial but for multiple Polynomials. More...  
static PolyType  RewritePolynomialWithLumpedParameters (const PolyType &poly, const LumpingMapType &lumped_parameters) 
Rewrite a Polynomial in terms of lumped parameters. More...  
static std::pair< PartialEvalType, CoefficientType >  EstimateParameters (const VectorXPoly &polys, const std::vector< PartialEvalType > &active_var_values) 
Estimate some parameters of a polynomial based on empirical data. More...  
static SystemIdentificationResult  LumpedSystemIdentification (const VectorXTrigPoly &polys, const std::vector< PartialEvalType > &active_var_values) 
Performs full lumpedparameter identification of a system of TrigPolys. More...  
Utility functions for system identification.
This class is a holder for templated utility methods. It should not be constructed. It must be templateinstantiated (in its cpp file) for each supported variant of Polynomial (currently only Polynomial<double>).
For the purposes of system identification we require here that the set of variables in a polynomial can be divided into two groups:
Note: The term "system identification" used throughout here refers to the process of simplifying the equations defining a physical system to a minimum number of "lumped" parameters and then estimating the values of those parameters based on empirical data.
typedef std::map<PolyType, VarType> LumpingMapType 
typedef PolyType::Monomial MonomialType 
typedef std::map<VarType, CoefficientType> PartialEvalType 
typedef ::Polynomial<CoefficientType> PolyType 
typedef PolyType::Term TermType 
typedef PolyType::VarType VarType 

static 
Estimate some parameters of a polynomial based on empirical data.
Given one or more polynomial equations Pi = 0, and measured values of some its arguments (x, y, ..., referred to as the "active variables"), estimate values for the remaining arguments (a, b, ..., referred to as the "parameters").
Measured x, y, ... is provided in a list of maps, active_var_values.
The return value is a pair, {estimates, error}, where:

static 
Extract lumped parameters from a given polynomial.
Given a Polynomial, poly, and a set of variables of poly that should be treated as parameters (that is, variables eligible to be lumped), obtain all of the unique expressions by which combinations of the remaining active variables are multiplied to form the monomials of the Polynomial.
For instance, if we have the polynomial: a*x + b*x + a*c*y + a*c*y**2 And our parameters are a, b, and c, then our lumped parameters are: lump1 == a+b ; lump2 == a*c and we return: { (a + b) > VarType("lump", 1); (a * c) > VarType("lump", 2) }
Note however that this function provides no guarantees of the lumped parameter names generated except that they are unique – "lump1" and "lump2" here are examples.

static 
Same as GetLumpedParametersFromPolynomial but for multiple Polynomials.
It is preferrable to use this if you have multiple Polynomials as it saves you from having to union the resulting LumpingMapType results together.

static 
Performs full lumpedparameter identification of a system of TrigPolys.
This is a convenience method meant to capture what is expected to be the most common usage pattern of system ID.
Given one or more TrigPoly expressions to be set equal to zero, and a list of observed values for a subset of the variables, lumps up the remaining variables into lumped parameters and estimates a value for each of those. This is broadly equivalent to calling the following methods in sequence:

static 
Rewrite a Polynomial in terms of lumped parameters.
For instance, if we have the polynomial: a*x + b*x + a*c*y + a*c*y**2 And our lumped parameters are: lump1 == a+b ; lump2 == a*c And our polynomial is now: lump1*x + lump2*y + lump2*y**2