Data classification and parameter estimation for the identification of piecewise affine models