Regulation of gas exchange in artificial lungs (oxygenators) during cardiopulmonary bypass is normally achieved by manual control of the gas composition and flow in response to intermittent sampling of the arterial partial pressures of oxygen (PaO2) and carbon dioxide (PaCO2). Manual control often results in abnormal blood gases which have been implicated in patient morbidity as well as influencing perfusion safety. Fine control of PaO2 and PaCO2 may be achieved by a combination of an in-line blood gas monitoring system and a membrane type oxygenator which is automatically regulated. The overall dynamics of the oxygenation process and control system components are complex and have nonlinear, multivariable and time-varying characteristics. Consequently, an adaptive control system approach is necessary. The implementation of a digital self-tuning control regime for PaO2 is described here. The controller is based on an explicit Linear Quadratic Gaussian (LQG) self-tuning control design which is presented using a polynomial equation approach. The controller performance was investigated in in vitro experiments. The self-tuner performed satisfactority with various sensor/oxygenator combinations for blood flow and temperature load disturbances. In contrast, a nonadaptive (proportional-integral, PI) type of control system was found to be unsuitable.