  This paper addresses the problem of the optimal $H_2$ controller design for
compartmental systems. In other words, we aim to enhance system robustness
while maintaining the law of mass conservation. We perform a novel problem
transformation and establish that the original problem is equivalent to an new
optimization problem with a closed polyhedron constraint. Existing works have
developed various first-order methods to tackle inequality constraints.
However, the performance of the first-order method is limited in terms of
convergence speed and precision, restricting its potential in practical
applications. Therefore, developing a novel algorithm with fast speed and high
precision is critical. In this paper, we reformulate the problem using
log-barrier functions and introduce two separate approaches to address the
problem: the first-order interior point method (FIPM) and the second-order
interior point method (SIPM). We show they converge to a stationary point of
the new problem. In addition, we propose an initialization method to guarantee
the interior property of initial values. Finally, we compare FIPM and SIPM
through a room temperature control example and show their pros and cons.
