A dual control system for assisting respiration