The problem i have is more or less is biology related, but I can simplify the problem as such. I have a tank of water. I try to increase the concentration level of this tank of a certain substance (X) at a fixed rate. Too fast or slow of change of concentration X is undesirable. I have infusion of concentrated X solution to the tank, with known concentration but adjustable rate. And there is a unknown leak of fluid in the tank. Every fixed amount of time, I measure the concentration of the tank, and need to change the infusion rate such that the desired rate of change is achieved.
The only mathematical relationship is as follows Concentration = solute / volume of solvent
New concentration = (tank volume x tank solute concentration + infusion rate x infusion solute concentration - loss volume x loss solute concentration ) / (tank volume + infusion rate - loss volume)
How would I design such control system?