Anti-windup synthesis via sampled-data piecewise affine optimal control