pyDynaMapp.identification package
Submodules
pyDynaMapp.identification.CVA module
pyDynaMapp.identification.IDIM module
- class pyDynaMapp.identification.IDIM.IDIMMLE[source]
Bases:
IDIM
Inverse dynamics identification with maximum likelihood estimation. Ref:
Fourier-based optimal excitation trajectories for the dynamic identification of robots Kyung.Jo Park - Robotica - 2006.
- class pyDynaMapp.identification.IDIM.IDIMNLS(nVars, output, identificationModel: Callable[[numpy.ndarray], numpy.ndarray], upperBound=2, lowerBound=-2, time_step=0.001)[source]
Bases:
object
Inverse Dynamics Identification Methods with Non Linear Least Square Alogrithms. The identification problem is formulated in a non linear optimisation problem :
Xopt = argmin(X) ||IDM(q, qdot, qddot, X)- tau||
- Args:
nVars : number of optimization variables in the X vector.
output : desired output vector ( Nsamples * ndof )
- identificationModelfunction that return the model computed torques.
of shape : ( Nsamples * ndof )
- computeLsCostFunction(x: numpy.ndarray)[source]
The object function to be minimized with least squares. Returns:
cost : (float)
- optimize(x0: numpy.ndarray = None, method='least_square', tol=0.0001)[source]
Optimize the cost function with NLS alorithms to mimize it value. Args:
x0 : numpy-ndarry : initial paramters values estimation.
method : optimisation algorithm
tol : optimization alorithm error stop tolerence.
- visualizeCostFunction(points_number: int = 1500) None [source]
Plot the cost function scalar variation with respect to ||x||
- visualizeError(title=None, ylabel=None) None [source]
Plot the root squred error between simulated and inputs
pyDynaMapp.identification.Kalman module
- class pyDynaMapp.identification.Kalman.Kalman(F, H, Q, R, P, x0, alpha=0.2, beta=1)[source]
Bases:
object
Classical Kalman filter identification algorithms base class.
Args:
F (np.ndarray): State transition model. H (np.ndarray): Observation model. Q (np.ndarray): Covariance of the process noise. R (np.ndarray): Covariance of the observation noise. P (np.ndarray): Initial error covariance. x0 (np.ndarray): Initial state estimate.
- Ref:
An Introduction to the Kalman Filter - Greg Welch and Gary Bishop.
- adaptNoiseCovariance(y)[source]
Adaptively update the process and observation noise covariances.
- Args:
y (np.ndarray): Innovation or measurement residual.
- evaluate(true_states, estimated_states)[source]
Evaluate the performance of the Kalman filter.
- Args:
true_states (np.ndarray): True states. estimated_states (np.ndarray): Estimated states from the filter.
- Returns:
performance (dict): Dictionary containing evaluation metrics.
- filter(observations)[source]
Apply the Kalman filter to a sequence of observations.
- Args:
observations (np.ndarray): Sequence of observations.
- Returns:
states (np.ndarray): Sequence of state estimates.
pyDynaMapp.identification.LMI module
pyDynaMapp.identification.MOESP_VAR module
- class pyDynaMapp.identification.MOESP_VAR.MOESP[source]
Bases:
object
https://people.duke.edu/~hpgavin/SystemID/References/Verhaegen-IJC-1992a.pdf http://www.diag.uniroma1.it/~batti/papers_ifsd/8.pdf https://people.duke.edu/~hpgavin/SystemID/References/DeCock-SubspaceID-EOLLS-2003.pdf https://people.duke.edu/~hpgavin/SystemID/References/DeCock-SubspaceID-EOLLS-2003.pdf
pyDynaMapp.identification.N4SID_VAR module
- class pyDynaMapp.identification.N4SID_VAR.N4SID[source]
Bases:
object
Numerical Subspace State Space System Identification This method uses input-output data to construct a state-space model by minimizing a prediction error criterion.
- Ref:
"N4SID: Subspace algorithms for the identification of combined deterministic-stochastic systems." Van Overschee, Peter, and Bart De Moor - Automatica 30.1 (1994): 75-93