Online identification of continuous bimodal and trimodal piecewise affine systems