A digital dual-mode linear quadratic regulator (LQR) with feedforward optimal controller is presented, which allows voltage control of a boost converter for wide-load-range condition, whether in continuous conduction mode (CCM) or in discontinuous conduction mode (DCM). Based on the conventional LQR method, the proposed controller is designed and makes the following two improvements. First, in order to eliminate the phase error caused by right-half-phase zero emerged in non-minimum phase boost converter, a feedforward controller is implemented by zero phase error tracking control technique because the inverse of non-minimum phase system is unstable. Second, since the models of DC-DC converter in CCM or DCM are different, the proposed control strategy allows boost converter to autonomously operate in CCM or DCM controller by utilising a mode detector. The proposed mode detector greatly enhances the control performance in both operating modes. Finally, the proposed controller has been implemented for voltage control of a boost converter. The simulation and experimental results show the proposed controller offers better performance in both transient response and frequency response than the conventional LQR controller.