Least squares algorithm for an input nonlinear system with a dynamic subspace state space model