Fault detection and diagnosis for singular stochastic systems via B-spline expansions.