For a general class of constrained uncertain nonlinear discrete-time systems, and a general class of observers, it is developed bilinear matrix inequalities whose solution gives gain matrices used in a piecewise affine observer/controller structure. The closed-loop system is robustly quadratically stable with a region of attraction larger than a prescribed ellipsoidal region. It is also developed a second-order algorithm for solving these inequalities locally.