Oxygen partial pressure management and control loop design of a closed circuit rebreather