We present an embedded feedback control strategy to control the density of a bacterial population, allowing cells to self-regulate their growth rate so as to reach a desired density at steady state. We consider a static culture condition, where cells are provided with a limited amount of space and nutrients. The control strategy is built using a tunable expression system (TES), which controls the production of a growth inhibitor protein, complemented with a quorum sensing mechanism for the sensing of the population density. We show on a simplified population-level model that the TES endows the control system with additional flexibility by allowing the set-point to be changed online. Finally, we validate the effectiveness of the proposed control strategy by means of realistic in silico experiments conducted in BSim, an agent-based simulator explicitly designed to simulate bacterial populations, and we test the robustness of our design to disturbances and parameters' variations due, for instance, to cell-to-cell variability.