High speed DSP-based implementation of piecewise-affine and piecewise-quadratic fuzzy systems