In this note, we study locally controlled synchronization of a dynamical network by introducing a distributed controller which has a different network structure from the original network. We refer to this configuration as a feedback network. To reflect practical reality, a cost function is considered to constrain the controller, and then the constrained controller design problem is transformed into a mixed-integer nonlinear optimization problem. In addition, when a single controller cannot be found under the constraint, a switching controller is designed by a Lyapunov function method. The convex combination technique is used to design the synchronizing switching signal between the candidate controllers, and its coefficients are given by the solution of a convex optimization problem. We also provide a feasible way to construct the candidate controllers, and give a numerical example which demonstrates the effectiveness of the proposed results.