to measure emg activity of the diaphragm 11 ( emgdi ) of a human patient 14 , an array of electrodes such as 12 ( fig1 and 2 ) are mounted on the free end section 15 of an oesophageal catheter 13 , with a constant inter - electrode distance d ( fig2 ). as shown in fig1 , the catheter 13 is introduced into the patient &# 39 ; s oesophagus through one nostril or the mouth until the array of electrodes 12 are situated at the level of the gastro esophageal junction . the diaphragm 11 and / or the oesophagus slightly move during breathing of the patient 14 whereby the array of electrodes 12 also slightly moves about the diaphragm 11 . as will be explained in the following description , automatic compensation for this displacement is provided . to mount an electrode 12 on the free end section 15 of the catheter 13 , stainless steel wire ( not shown ) may be wound around the catheter 13 . the wound stainless steel wire presents a rough surface smoothed out by solder , which in turn is electroplated with nickel , copper and then gold or silver . of course , emg signals from other muscles and other constructions of electrodes can be implemented . electric wires ( not shown ) interconnect each pair of successive electrodes such as 1 – 7 ( fig2 ) with a respective one of a group of differential amplifiers 16 . this defines an overlap array . obviously , these electric wires follow the catheter 13 from the respective electrodes 12 to the corresponding amplifiers 16 , and are preferably integrated to the catheter 13 . preferably , the electric wires transmitting the emgdi signals collected by the various pairs 1 – 7 of electrodes 12 are shielded to reduce the influence of external noise , in particular disturbance from the 50 or 60 hz current and voltage of the electrical mains . the group of differential amplifiers 16 amplifies ( first subtraction step of the double subtraction technique ) and band - pass filters each emgdi signal . this first subtraction step may also be carried out in the personal computer 19 when the amplifiers 16 are single - ended or equivalently designed amplifiers ( monopolar readings ). in the example illustrated in fig1 and 2 , the free end section 15 of the catheter 13 is provided with an array of eight electrodes 12 defining seven pairs 1 , 2 , 3 , 4 , 5 , 6 and 7 of successive electrodes 12 respectively collecting seven different emgdi signals . although it has been found that emg activity of the diaphragm ( emgdi ) can be measured accurately with an oesophageal catheter 13 provided on the free end section 15 thereof with an array of eight electrodes 12 , a different number and / or configuration of pairs of electrodes 12 can be contemplated depending on the patient &# 39 ; s anatomy and movement of the diaphragm . also , the pairs 1 – 7 do not need to be pairs of successive electrodes ; fig3 illustrates an array of nine electrodes to form seven overlapping pairs of electrodes 1 – 7 . a major problem in recording emgdi signals is to maintain the noise level as low and as constant as possible . since the electric wires transmitting the emgdi signals from the electrodes 12 to the differential amplifiers 16 act as an antenna , it is crucial , as indicated in the foregoing description , to shield these electric wires to thereby protect the emgdi signals from additional artifactual noise . also , the package enclosing the differential amplifiers 16 is preferably made as small as possible ( miniaturized ) and is positioned in close proximity to the patient &# 39 ; s nose to decrease as much as possible the distance between the electrodes 12 and the amplifiers 16 . the amplified emgdi signals are supplied to a personal computer 19 through respective isolation amplifiers of a unit 18 . unit 18 supplies electric power to the various electronic components of the differential and isolation amplifiers while ensuring adequate isolation of the patient &# 39 ; s body from such power supply . the unit 18 also incorporates bandpass filters included in the respective emgdi signal channels to eliminate the effects of aliasing . the emgdi signals are then digitally processed into the personal computer 19 after analog - to - digital conversion thereof . this analog - to - digital conversion is conveniently carried out by an analog - to - digital converter implemented in the personal computer 19 . the personal computer 19 includes a monitor 40 and a keyboard 31 . it is believed to be within the capacity of those of ordinary skill in the art to construct suitable differential amplifiers 16 and an adequate isolation amplifiers and power supply unit 18 . accordingly , the amplifiers 16 and the unit 18 will not be further described in the present specification . an example of the seven emgdi signals collected by the pairs 1 – 7 of successive electrodes 12 ( fig1 and 2 ) and supplied to the computer 19 is illustrated in fig4 . as the diaphragm is generally perpendicular to the longitudinal axis of the oesophageal catheter 13 equipped with an array of electrodes 12 , only a portion of the electrodes 12 are situated in the vicinity of the diaphragm . it is therefore important to determine the position of the diaphragm with respect to the oesophageal electrode array . the portion of the crural diaphragm 11 which forms the muscular tunnel through which the oesophageal catheter 13 is passed is referred to the “ diaphragm depolarizing region ” ( ddr ). the thickness of the ddr is 20 – 30 mm . it can be assumed that , within the ddr , the distribution of active muscle fibers has a center from which the majority of the emgdi signals originate , i . e . the “ diaphragm depolarizing region center ” ( ddr center ). therefore , emgdi signals detected on opposite sides of the ddr center will be reversed in polarity with no phase shift ; in other words , emgdi signals obtained along the electrode array are reversing in polarity at the ddr center . moving centrally from the boundaries of the ddr , emgdi power spectrums progressively attenuate and enhance in frequency . reversal of signal polarity on either side of the electrode pair 4 with the most attenuated power spectrum confirms the position from which the emgdi signals originate , the ddr center . referring to fig5 a , the first task of the computer 19 is to determine the center of the ddr . the center of the ddr is repeatedly determined at predetermined time intervals . for that purpose , slow trend is first removed from each emgdi signal ( step 500 ). to carry out such trend removal , the processing conducted by the computer 19 on each emgdi signal is equivalent to high - pass filtering each emgdi signal at a transition frequency of about 20 hz . in particular , step 500 will remove the direct current component of the emgdi signals to enable the computer 19 to evaluate the polarities of the emgdi signals relative to each other . in step 501 , the emgdi signals are cross - correlated in pairs . as well known to those of ordinary skill in the art , cross - correlation is a statistical determination of the phase relationship between two signals and essentially calculates the similarity between two signals in terms of a correlation coefficient r ( step 502 ). a negative correlation coefficient r indicates that the cross - correlated signals are of opposite polarities . fig6 shows curves of the value of the correlation coefficient r versus the midpoint between the pairs of electrodes from which the correlated emgdi signals originate . in this example , the inter - electrode distance is 10 mm . curves are drawn for distances between the correlated pairs of electrodes 12 of 5 mm ( curve 20 ), 10 mm ( curve 21 ), 15 mm ( curve 22 ) and 20 mm ( curve 23 ). one can appreciate from fig5 a that negative correlation coefficients r are obtained when emgdi signals from respective electrode pairs situated on opposite sides of the electrode pair 4 are cross - correlated . it therefore appears that the change in polarity occur in the region of electrode pair 4 , which is confirmed by the curves of fig4 . accordingly , it can be assumed that the center of the ddr is situated substantially midway between the electrodes 12 forming pair 4 . for example , the center of the ddr can be precisely determined by interpolation ( step 503 of fig5 a ) using a square law based fit of the three most negative correlation coefficients of curve 21 obtained by successive cross - correlation of the emgdi signals from each electrode pair to the emgdi signals from the second next electrode pair . association of the center of the ddr to a pair of electrodes 12 provides a “ reference position ” from which to obtain emgdi signals within the ddr . such control is essential in overcoming the artifactual influence on the emgdi power spectrum . it has been experimentally demonstrated that emgdi signals recorded in the oesophagus are satisfactory as long as they are obtained from electrode pairs ( with an inter - electrode distance situated between 5 and 20 mm ) positioned at a distance situated between 5 and 30 mm on the opposite sides of the ddr center ( the inter - pair distance being therefore situated between 5 and 30 mm ). although emgdi signals obtained from these positions offers a clear improvement in acceptance rate , the signal - to - noise ratio during quiet breathing still tends to remain unsatisfactorily low . in another embodiment of the invention , step 500 can be eliminated and steps 501 , 502 and 503 could be implemented immediately after step 505 . for example , in fig4 , the emgdi signals originating from the electrode pairs 3 and 5 situated respectively 10 mm below and 10 mm above the ddr are strongly inversely correlated at zero time delay . in contrast to the inversely correlated emgdi signals , the noise components for electrode pairs 3 and 5 are likely to be positively correlated . hence , as illustrated in fig7 , subtraction of the emgdi signals 24 and 25 from electrode pairs 3 and 5 will result into an addition of the corresponding emgdi signals ( signal 26 of fig6 ) and into a subtraction , that is an elimination of the common noise components . this technique will be referred to as “ the double subtraction technique ” ( step 504 of fig5 a ). subtraction step 504 ( second subtraction step of the double subtraction technique ) can be carried out either in the time domain , or after conversion of signals 24 and 25 in the frequency domain . double subtraction technique can be performed by subtracting other combinations of signals , for example by subtracting the emgdi signal from electrode pair 2 from the emgdi signal from electrode pair 5 ( fig4 ), by subtracting signal from electrode pair 6 from the signal from electrode pair 3 and by adding these differences , etc . other means for reducing the effect of electrode filtering can be applied . the double subtraction technique is carried out in step 504 on the pair of emgdi signals ( for example the signals from electrode pairs 3 and 5 shown in fig4 ) identified in step 503 , after appropriate filtering of these emgdi signals in step 505 . filtering step 505 will remove from each emgdi signal the motion artifacts , the electrocardiogram ( ecg ) component , and the disturbance from the electrical mains . motion artifacts are induced by motion of the electrodes . more generally , motion artifacts are defined as a low frequency fluctuation of the emgdi signals &# 39 ; dc level induced by mechanical alterations of the electrode metal to electrolyte interface i . e . changes in electrode contact area and / or changes in pressure that the tissue exerts on the electrode . the graph of fig8 a shows the power density spectrum of the above defined electrode motion artifacts , the power density spectrum of ecg , and the power density spectrum of emgdi signals . the graph of fig8 b shows an example of transfer function for a filter ( the dashed line showing the optimal transfer function , and the solid line the transfer function implemented by the inventors ) to be used in step 505 for filtering out the electrode motion artifacts , ecg , and the 50 or 60 hz disturbance from the electrical mains . processing of the emgdi signals by the computer 19 to follow as closely as possible the optimal transfer function of fig8 b will conduct adequately filtering step 505 . referring back to fig5 a , step 506 calculates the rms ( root - mean - square ) value of the double - subtracted signal produced in step 504 . the increase in amplitude obtained with the double subtraction technique is associated with a twofold increase in rms values . rms values obtained with the double subtraction technique are closely and linearly related to the original signals . the rms value can be replaced by any other value representative of the strength of the double - subtracted signal , for example mean , median , peak or total signal amplitudes . the double subtraction technique compensates for the changes in signal strength and frequency caused by movement of the diaphragm 11 ( fig1 ) and / or the oesophagus during breathing of the patient 14 causing movement of the array of electrodes 12 with respect to the diaphragm 11 . referring to fig9 , off center of the array of electrodes 12 ( electrode - position - induced filter effect ) causes a variation of center frequency values ( see curves 27 and 28 ) for the emgdi signals from the electrode pairs 3 and 5 . the double subtraction technique eliminates such variation of center frequency values as indicated by curve 29 as well as variation of signal strength . therefore , the reciprocal influence of the position of the ddr center on the emgdi signal frequency content is eliminated by the double subtraction technique . it has been found that the double subtraction technique may improve the signal - to - noise ratio by more than 2 db ratio and reduce an electrode - position - induced filter effect . double subtraction technique is also responsible for a relative increase in acceptance rate by more than 30 %. cross - talk signals from adjacent muscles are strongly correlated at zero time delay and equal in polarity between all pairs of electrodes 12 . hence , these cross - talk signals appear as a common mode signal for all electrode pairs and therefore , are eliminated by the double subtraction technique . referring to fig5 b , a target drive signal is set by an operator at step 601 . the output of block 601 is therefore the target drive signal 602 . the value of the target drive signal 602 is determined by a person skilled in the art . the target drive signal 602 can be any signal which is representative of respiratory drive output . in a preferred embodiment of the invention , this signal can be any signal representative of the electrical activity of a muscle ( i . e ., electromyographic signal ) that reflects the global respiratory drive . the target drive signal 602 can therefore be quantified as , among others , the mean , the median , the total or the peak of the emgdi signal . the target drive signal 602 is then compared to the rms value on line 508 in block 604 . if the present breath rms value on line 508 is greater than the target drive signal 602 , this indicates that there is a trend for a change in diaphragm electrical activity ( emgdi ) indicating an increase in respiratory drive and requiring a progressive increase in ventilatory assistance . the result of the decision block 604 will be positive until the emgdi 508 returns to the target level 602 . in this case , the stored gain ( k ) will be increased in block 606 . the gain ( k ) 610 will then be recorded in block 611 and outputted as signal 613 . returning now to block 604 , if the present breath rms value on line 508 is not greater than the target drive signal 602 , it may be equal or smaller . in block 605 , it is determined if the present breath rms value 508 is equal to the target drive signal 602 . if it is equal , the gain value ( k ) does not change . if the present breath rms value 508 is not equal to the target drive signal 602 , then it is smaller than the target drive signal 602 , and this indicates a decrease in diaphragm electrical activity ( emgdi ) resulting in reduced respiratory drive . it will therefore be necessary to progressively decrease the ventilatory assist until the diaphragm electrical activity ( emgdi ) 508 returns to the target level 602 . in this case , the result from decision block 604 will be negative resulting in a decrease in the stored gain ( k ) in block 608 . the gain ( k ) 609 will then be stored at step 611 and outputted as signal 613 . those skilled in the art will understand that the amount of the change ( increase , step 606 , or decrease , step 608 ) in ventilatory assistance is derived from experience , the patient &# 39 ; s condition , the environment , etc . the amount of change can therefore be adjusted on a case by case basis . also , in a particular embodiment of the invention , the increase or decrease in ventilatory assistance could be a relative value ; that is , a fraction or percentage multiplied by , for example , the target drive signal , the signal representative of respiratory drive output , or a difference between the amplitude of the signal representative of respiratory drive output and the amplitude of the target drive signal . those skilled in the art will also understand that the test at steps 604 and 605 can include a certain range of amplitudes for the target drive signal 602 ( whether they are absolute or relative amplitudes ); that is , for example , the target drive signal could be x plus or minus a predetermined value . therefore , at step 604 , the present breath rms value 508 needs to be greater than x plus the predetermined value in order to proceed to step 606 . in the same way , at step 605 , the present breath rms value 508 needs to be smaller than x minus the predetermined value in order to proceed to step 608 . finally , the present rms value on line 508 will be multiplied by the gain ( k ) 613 in block 612 to produce a control signal 614 . the control signal 614 will be the input to lung ventilator 54 of fig1 . fig1 illustrates a possible physical embodiment of steps 604 , 605 , 606 , 608 , 611 , and 612 of fig5 b . a gain controller 620 and a gain multiplier 628 are provided . a first input to gain controller 620 is the rms value on line 508 , a second input to gain controller 620 is target drive signal 602 , and the output of gain controller 620 is gain ( k ) 613 value . the gain ( k ) 613 value is then inputted to the gain multiplier 628 where it is multiplied by the rms value on line 508 for the present inspiration ( step 612 of fig5 b ) resulting in a control signal 614 . the gain controller 620 further comprises a comparator 624 and a gain adjustment block 626 . the comparator 624 implements steps 604 and 605 and the gain adjustment block 626 implements steps 606 , 608 and 611 of fig5 b . referring to fig5 c , the target drive signal is set by an operator in block 601 . the output of block 601 is therefore the target drive signal 602 . the value of the target drive signal 602 is determined by a person skilled in the art . as indicated in the foregoing description , the target drive signal 602 can be any signal representative of respiratory drive output . in an illustrative embodiment , this signal can be any signal representative of the electrical activity of a muscle ( i . e . electromyographic signal ) that reflects the global respiratory drive . the target drive signal 602 can therefore be quantified as , among others , the mean , the median , the total or the peak of the emgdi signal . the target drive signal 602 is then compared to the rms value on line 508 in block 604 . if the present breath rms value on line 508 is greater than the target drive signal 602 , this indicates that there is a trend for a change in diaphragm electrical activity ( emgdi ) indicating an increase in respiratory drive and requiring an increase in ventilatory assistance . block 701 then commands block 700 to produce an increase of the ventilatory support , for example pressure support , through an increase of the level of the ventilatory support control signal 614 . the function of block 700 is to produce this ventilatory support control signal 614 . in other words block 701 commands block 700 to increase the level of the ventilatory support control signal 614 by a given amount . returning to block 604 , if the present breath rms value on line 508 is not greater than the target drive signal 602 , it may be equal or smaller . in block 605 , it is determined if the present breath rms value 508 is equal to the target drive signal 602 . if it is equal , block 605 commands block 700 to keep the level of the ventilatory support control signal 614 constant . detection by block 605 that the present breath rms value 508 is smaller than the target drive signal 602 indicates a decrease in diaphragm electrical activity ( emgdi ) resulting in reduced respiratory drive . block 703 then commands block 700 to produce a decrease of the ventilatory support , for example pressure support , through a decrease of the level of the ventilatory support control signal 614 . in other words block 703 commands block 700 to decrease the level of the ventilatory support control signal 614 by a given amount . those of ordinary skill in the art will understand that the amount of the change ( increase or decrease ) in ventilatory assistance is derived from experience , the patient &# 39 ; s condition , the environment , etc . the amount of change can therefore be adjusted on a case by case basis . those of ordinary skill in the art will also understand that the test at blocks 604 and 605 can include a certain range of amplitudes for the target drive signal 602 ( whether they are absolute or relative amplitudes ); for example , the target drive signal could be x plus or minus a predetermined value . therefore , at block 604 , the present breath rms value 508 needs to be greater than x plus the predetermined value in order to proceed to block 701 . in the same way , at step 605 , the present breath rms value 508 needs to be smaller than x minus the predetermined value in order to proceed to step 703 . fig1 illustrates a lung ventilator 54 capable of being controlled by the multiplied , rms value 614 of the double - subtracted signal produced in step 612 of fig5 b . although an air - flow - based pressure ventilator is illustrated as an example in fig1 , it should be kept in mind that the rms value of the double subtracted signal can be used for controlling any other lung ventilator . ventilator 54 shown in fig1 as an illustrative example only comprises a flow control unit 53 , a flow pump 55 , a patient &# 39 ; s respiratory ( inspiratory and expiratory ) implement 56 such as a mask , a tracheal tube connector , or any other respiratory implement , a pressure sensor 57 , a pressurizing valve 58 , and a depressurizing valve 59 . the flow pump 55 produces a constant air flow and supply of this air flow to the patient &# 39 ; s respiratory accessory 56 is controlled through the pressurizing valve 58 . the patient is allowed to breathe out through the respiratory accessory 56 and the depressurizing valve 59 . the pressurizing and depressurizing valves 58 and 59 are controlled by the flow control unit 53 . the pressure sensor 57 is connected close to the respiratory implement 56 through a line 60 . the pressure sensor 57 produces a corresponding respiratory pressure representative signal 61 supplied to the flow control unit 53 . accordingly , the pressure sensor 57 provides feedback of actual respiratory pressure close to the respiratory implement 56 . the flow control unit 53 is also supplied with the multiplied , rms value 614 of the double - subtracted signal delivered on line 62 ( fig1 ) by step 612 of fig5 b . those of ordinary skill in the art know that the amplitude of the multiplied , rms value 614 of the double - subtracted signal delivered on line 62 is a representation of the demand to breathe from the brain . when the rms value 614 supplied to the flow control unit 53 is higher than the amplitude of the pressure representative signal 61 , this indicates that the demand to breath from the brain is higher than the air actually breathed by the patient . inspiratory assist is then required and the flow control unit 53 will open pressurizing valve 58 to supply air flow from the pump 55 to the patient &# 39 ; s respiratory accessory ( depressurizing valve 59 being closed ) until the amplitude of the pressure representative signal 61 is equal to the multiplied , rms value 614 . the flow control unit 53 will continue to control the position of valve 58 to maintain the amplitude of the pressure representative signal 61 equal to the multiplied , rms value 614 during all the inspiratory cycle . during the inspiratory cycle , when the multiplied , rms value 614 falls slightly below the amplitude of the pressure representative signal 61 , depressurizing valve 59 can be opened to correct the situation and maintain the amplitude of the pressure representative signal 61 equal to the multiplied , rms value 614 . when the multiplied , rms value 614 drops below a given threshold , this indicates the beginning of an expiratory cycle . then , the flow control unit 53 closes pressurizing valve 58 and opens depressurizing valve 59 to allow the patient to breath out through the respiratory accessory 56 and the depressurizing valve 59 . in another example embodiment of the invention , in order to obtain correct proportionality between the pressure representative signal 61 and the multiplied , rms value 614 , a gain adjustment is introduced for example in sensor 57 or on the line 62 to adequately control pressure assist to the respiratory implement 56 in function of the multiplied , rms value 614 . accordingly , the subject invention presents a major advantage over the prior art . indeed , the degree of inspiratory assist is adjusted in relation to the real need of the patient . in other words , assist is proportional to the difference between the pressure representative signal 61 and the multiplied , rms value 614 . inspiratory assist is therefore provided only to compensate for the degree of incapacity of the patient . the patient still contributes to inspiration as a function of his capacity to prevent the lung ventilator to further reduce the patient &# 39 ; s inability to breathe . requiring breathing efforts from the patient usually accelerates recovery of the patient and faster disconnection of the patient from the lung ventilator . although the present invention has been described herein above with reference to preferred embodiments thereof , these embodiments can be modified at will , within the scope of the appended claims , without departing from the spirit and nature of the subject invention .
a gain controller and method for controlling the value of a gain is used in conjunction with an electrode array for detecting a signal representative of respiratory drive output of a patient during inspiration , and a lung ventilator for assisting inspiration of the patient . the gain controller comprises an input for receiving the signal representative of respiratory drive output ; a comparator for determining whether the signal representative of respiratory drive output is higher or lower than a target drive signal ; and a gain adjustment unit for increasing the value of a gain when the amplitude of the signal representative of respiratory drive output is higher than the amplitude of the target drive signal and for decreasing the value of this gain when the amplitude of the signal representative of respiratory drive output is lower than the amplitude of the target drive signal . the gain is applied to the signal representative of respiratory drive output to produce an amplified respiratory drive output representative signal used for controlling the lung ventilator . the advantage of target drive ventilation is that this mode of ventilation does not depend on pressure , flow or volume measurements . a leaky ventilatory line will introduce a change in respiratory drive which will change the ventilatory assist in order to return the respiratory drive to its target level . also , changes in the patient &# 39 ; s metabolic or patho - physiological status which result in altered respiratory drive will be compensated .