Quadratic stabilization of linear networked control systems via simultaneous protocol and controller design