Functional modeling of electrochemical whole-cell biosensors