Fast Planning of Well Conditioned Trajectories for Model Learning Cong Wang, Yu Zhao, Chung-Yen Lin, and Masayoshi Tomizuka Abstract— This paper discusses the problem of planning well conditioned trajectories for learning a class of nonlinear models such as the imaging model of a camera and the multibody dynamic model of a robot. In such model learning problems, the model parameters can be linearly decoupled from system variables in the feature space. The learning accuracy and robustness against measurement noise and unmodeled response depend largely on the condition number of the data matrix. A new method is proposed to plan well conditioned trajectories efficiently by using low-discrepancy sequences and matrix subset selection. Application examples show promising results. I. INTRODUCTION Proper modeling is important to the control of mechatronic systems. Torque feedforward control based on an accurate dynamic model largely reduces the trajectory tracking error of servo systems. In iterative learning control and disturbance observer control, the bandwidth of effective disturbance rejection is largely determined by the accuracy of the model. In visual servoing, an inaccurate camera model might lead to undesired response and even instability. In system diagnose, model learning with high accuracy is needed for telling the health of the system. A model with high fidelity is also indispensable to virtual development based on computer simulations. In general, system behavior can be modeled as y = g (x, Z ), where x R s includes the minimum number of system variables that can fully describe the system status (e.g., position, velocity, and acceleration of a point mass), y R o includes the system variables that are determined or required by x, and Z R p consists of p model parameters to be learned. Besides the linear models that can be transformed into transfer functions, many important models are nonlinear and cannot be identified using frequency response. Such models include, but not limited to the imaging model of a camera and the multibody dynamic model of a robot. There are often two major steps in learning those models. First, the model is transformed to the form of y = f (x) Z (1) where the system variables and model parameters are de- coupled linearly. f R o×p is called a regressor. Such transformation can be done in a lot of cases. A conventional challenge in this step is deriving the symbolic expression of f . Our previous work in [1] presents a machine learning approach that can obtain the expression without much sym- bolic computation. The second step is designing a trajectory The authors are with the Department of Mechanical Engineering, Uni- versity of California, Berkeley, CA 94720-1740, USA {wangcong, yzhao334, chung yen, tomizuka}@berkeley.edu of x. The response of the system is measured when it is driven through the trajectory. Then, model learning can be formulated as an optimization problem min Z F (X ) Z Y (2) with F (X )= f (x 1 ) f (x 2 ) f (x 3 ) . . . , Y = y 1 y 2 y 3 . . . (3) where x i ’s and y i ’s are the measurements of the system variables. Depending on the sensing noise, unmodeled re- sponse, and the way that data are collected, different learning methods can be applied to estimate Z . In general, all methods require the data matrix F (X ) to be well conditioned. Other- wise, some parameters might even become not identifiable. Various approaches have been adopted to plan trajecto- ries that give well conditioned data matrices. In [2], an optimal trajectory is designed for learning camera param- eters. The trajectory is derived symbolically by requiring the data matrix to be orthonormal. The method requires nontrivial effort of ad hoc analysis and can be hard to be applied to different problems. In [3], optimal trajectories for learning the multibody dynamic models of robots are generated by solving an optimal control problem, with the cost function as the condition number of the data matrix. Numerical optimization is used to solve the optimal control problem. [4] also deals with generating well conditioned trajectories for learning multibody dynamic models. The trajectory is parameterized by a certain number of via-points in the robot workspace. Numerical optimization is used to adjust the positions and velocities of those points so that the data matrix has a minimized condition number. In [5], the optimal trajectory is parameterized as a finite Fourier series, with the Fourier coefficients optimized numerically. A recent work in [6] follows a similar method with the trajectory parameterized as B-splines. These representative works have drawn much attention over the years. Their success, however, depends largely on a good initial design of the trajectory because numerical optimization based on gradient estimation often gets trapped at local optima. In regard to these limits, this paper presents a different type of method using low-discrepancy sequences and matrix subset selection. The method can be easily applied to various model learning problems.