Text this: On-line fault detection and end-of-batch quality prediction for batch processes incorporating on-line synchronisation and phase identification