Switched LQR control: Design of a general framework