In the linear quadratic regulator (LQR) problem, the generation of control force depends on the components of the control weighting matrix R. The value of R is determined while designing the controller and remains the same later. Amid a seismic event, the responses of the structure may change depending the quasi-resonance occurring between the structure and the earthquake signal. In this situation, it is essential to update the value of R for conventional LQR controller to get optimum control force to mitigate the vibrations due to the earthquake. Further, the constant value of the weighting matrix R leads to the wastage of the resources using larger force unnecessarily where the structural responses are smaller. Therefore, in the quest of utilizing the resources wisely and to determine the optimized value of the control weighting matrix R for LQR controller in real time, a maximum predominant period τpmax and particle swarm optimization-based method is presented here. This method comprises of four different algorithms: particle swarm optimization (PSO), maximum predominant period approach τpmax to find the dominant frequency for each window, clipped control algorithm (CO) and LQR controller. The modified Bouc-Wen phenomenological model is taken to recognize the nonlinearities in the MR damper. The assessment of the advised method is done on a three-story structure having a MR damper at ground floor subjected to three different near fault historical earthquake time histories. The outcomes are equated with those of simple conventional LQR. The results establish that the advised methodology is more effective than conventional LQR controllers in reducing inter-story drift, relative displacement, and acceleration response.