A method and apparatus for detecting breathing disorders and controlling a breathing ventilator using an artificial neural network working on signals indicative of a patient's physiological status. Preferably the artificial neural network works on a signal indicative of the pressure or flow of supplied breathing gas divided into two or more intervals ( 401, 402, 403, 404 ) indicative of patient ( 1 ) breathing cycle phases.