Jason K. Moore
Ton van den Bogert
July 10, 2015
ISB TGCS 2015, Edinburgh, UK
Find the parameters $\mathbf{p}$ such that the difference between the model simulation, $\mathbf{y}$, and measurements, $\mathbf{y}_m$ is minimized.
where $$J(\mathbf{p}) = \int [\mathbf{y}_m - \mathbf{y}(\mathbf{p})]^2 dt$$
Vyasarayani, Chandrika P., Thomas Uchida, Ashwin Carvalho, and John McPhee.
"Parameter Identification in Dynamic Systems Using the Homotopy Optimization Approach". Multibody System Dynamics 26, no. 4 (2011): 411-24.
$\dot{\mathbf{x}} = \begin{bmatrix} \dot{\theta}(t) \\ \dot{\omega}(t) \end{bmatrix} = \begin{bmatrix} \omega(t) \\ -p \sin{\theta}(t) \end{bmatrix}$
$J(p) = \min\limits_{p} \int_{t_0}^{t_f} [\theta_m(t) - \theta(\mathbf{x}, p, t)]^2 dt$
Betts, J., and W. Huffman. “Large Scale Parameter Estimation Using Sparse Nonlinear Programming Methods.” SIAM Journal on Optimization 14, no. 1 (January 1, 2003): 223–44. doi:10.1137/S1052623401399216.
No need to solve for $\dot{\mathbf{x}}$.
$$\mathbf{f}(\dot{\mathbf{x}}, \mathbf{x}, \mathbf{r}, \mathbf{p}, t) = 0$$Backward Euler:
$\mathbf{f}(\frac{\mathbf{x}_i - \mathbf{x}_{i-1}}{h} , \mathbf{x}_i, \mathbf{r}_i, \mathbf{p}, t_i) = 0$
Midpoint Rule:
$\mathbf{f}(\frac{\mathbf{x}_{i + 1} - \mathbf{x}_i}{h}, \frac{\mathbf{x}_i + \mathbf{x}_{i + 1}}{2}, \frac{\mathbf{r}_i + \mathbf{r}_{i + 1}}{2}, \mathbf{p}, t_i) = 0$
Paraphrased from https://github.com/csu-hmc/opty/blob/master/examples/vyasarayani2011.py
# Specify symbols for the parameters
p, t = symbols('p, t')
# Specify the functions of time
theta, omega, theta_m = symbols('theta, omega, theta_m', cls=Function)
# Specify the symbolic equations of motion
eom = (Matrix([theta(t), omega(t)]).diff(t) -
Matrix([omega(t), -p * sin(theta(t))]))
# Specify the symbolic objective function
obj = Integral((theta_m(t) - theta(t))**2, t)
# Choose discritzation values
num_nodes = 1000
interval = 0.01 # seconds
# Form the problem
prob = Problem(obj, eom, (theta(t), omega(t)), num_nodes, interval,
known_trajectory_map={y1_m(t): measured_data},
integration_method='midpoint')
# Set an initial guess
initial_guess = random(prob.num_free)
# Solve the system
solution, info = prob.solve(initial_guess)
$$\dot{\mathbf{x}} = \mathbf{f}_o(\mathbf{x}, \mathbf{r}_c, \mathbf{r}_k, \mathbf{p}_k, t)$$
Given noisy measurements of the states, $\mathbf{x}_m$, and the platform acceleration, $a_m$, can we identify the controller parameters $\mathbf{K}$?
$$\min\limits_\theta J(\mathbf{\theta}), \quad J(\mathbf{\theta})= \sum_{i=1}^N h [\mathbf{x}_{mi} - \mathbf{x}_i]^2$$where
$$ \mathbf{\theta} = [\mathbf{x}_1, \ldots, \mathbf{x}_N, \mathbf{p}_u] $$Subject to the constraints:
$$\mathbf{f}_{c}(\mathbf{x}_i, \mathbf{x}_{i+1}, a_{mi}, a_{mi+1}, \mathbf{p}_u)=0, \quad i=1 \ldots N$$And the initial guess:
$$\mathbf{\theta}_0 = [\mathbf{x}_{m1}, \ldots, \mathbf{x}_{mN}, \mathbf{0}]$$For, $N$ = 6000:
Converges in 11 iterations in 2.8 seconds of computation time.
Known | Identified | Error | |
---|---|---|---|
$k_{00}$ | 950 | 946 | -0.4% |
$k_{01}$ | 175 | 177 | 1.4% |
$k_{02}$ | 185 | 185 | -0.2% |
$k_{03}$ | 50 | 55 | 9.4% |
$k_{10}$ | 45 | 45 | 1.1% |
$k_{11}$ | 290 | 289 | -0.3% |
$k_{12}$ | 60 | 59 | -2.1% |
$k_{13}$ | 26 | 27 | 4.2% |