Model-Based Fault Detection and Estimation for Linear Time Invariant and Piecewise Affine Systems by Using Quadratic Boundedness