Complete state vector information is necessary for implementing the state feedback control via algebraic Riccati equation (ARE). However, all the states are usually not available for feedback because it is often expensive and impractical to include a sensor for each variable. Hence, to estimate the unmeasured variables, a state estimation technique is formulated to estimate all the states of the process. One of the major problems of closed-loop optimal control design is the choice of weighted matrices, which will result in optimal response. The conventional approach involves trial-and-error method to choose the weighted matrices in the cost function to determine the state feedback gain. Some of the drawbacks of this method are as follows: it is tedious, time-consuming, optimal response is not obtained, and manual selection of weighting matrices is also not straightforward. To overcome the above shortcomings, swarm intelligence is used to obtain the optimal weights, which provide superior performance than the conventional trial-and-error approach. The proposed approach performance is assessed by weight selection using PSO, which is compared with manual tuning that satisfies the closed-loop stability criteria. Further, the proposed controller performance is evaluated not only for stabilizing the disturbance rejection, but also for tracking the given reference temperature in a continuous stirred tank reactor (CSTR). © 2018, Springer Nature Singapore Pte Ltd.