for better understanding of the detailed description of the invention , it is necessary to present a wavelet analysis overview and terminology . wavelet analysis represents a signal as a weighted sum of shifted and scaled versions of the original mother wavelet , without any loss of information . a single wavelet coefficient is obtained by computing the correlation between the scaled and time shifted version of the mother wavelet and the analyzed part of a signal . for efficient analysis , scales and shifts take discrete values based on powers of two ( i . e ., the dyadic decomposition ). for implementation , filter bank and quadrature mirror filters are utilized for a hierarchical signal decomposition , in which a given signal is decomposed by a series of low - and high - pass filters followed by downsampling at each stage , see fig4 . this analysis is referred to as discrete wavelet transform ( dwt ). the particular structure of the filters is determined by the particular wavelet family used for data analysis and by the conditions imposed for a perfect reconstruction of the original signal . the approximation is the output of the low - pass filter , while the detail is the output of the high - pass filter . in a dyadic multiresolution analysis , the decomposition process is iterated such that the approximations are successively decomposed . the original signal can be reconstructed from its details and approximation at each stage ( e . g ., for a 3 - level signal decomposition , a signal s can be written as s = a 3 + d 3 + d 2 + d 1 ), see fig5 . the decomposition may proceed until the individual details consist of a single sample . the nature of the process generates a set of vectors ( for instance a 3 , d 3 , d 2 , and d 1 in the three level signal decomposition ), containing the corresponding coefficients . these vectors are of different lengths , based on powers of two , see fig4 . these coefficients are the projections of the signal onto the mother wavelet at a given scale . they contain signal information at different frequency bands ( e . g ., a 3 , d 3 , d 2 , and d 1 ) determined by the filter bank frequency response . dwt leads to an octave band signal decomposition that divides the frequency space into the bands of unequal widths based on powers of two , see fig6 . the stationary wavelet transform ( swt ) is obtained in a similar fashion , however , the downsampling step is not performed . this leads to a redundant signal decomposition with better potential for statistical analysis . the frequency space division is the same as for dwt , see fig6 . despite its high efficiency for signal analysis , dwt and swt decompositions do not provide sufficient flexibility for a narrow frequency bandwidth data analysis ( fig4 . a ). wavelet packets , as a generalization of standard dwt , alleviate this problem . at each stage , details as well as approximations are further decomposed into low and high frequency signal components . fig4 . b shows the wavelet packet decomposition tree . accordingly , a given signal can be written in a more flexible way than provided by the dwt or swt decomposition ( e . g ., at level 3 we have s = a 1 + ad 2 + add 3 + ddd 3 , where ddd 3 is the signal component of the narrow high frequency band ddd 3 ). wavelet packet analysis results in signal decomposition with equal frequency bandwidths at each level of decomposition . this also leads to an equal number of the approximation and details coefficients , a desirable feature for data analysis and information extraction . fig6 illustrates frequency bands for the 3 - level wavelet packet decomposition . method for the estimation of the hypnotic state using wavelet analysis of the eeg this invention relies on the wavelet decomposition of the electroencephalogram ( eeg ) recorded from a subject . specifically in our application wavelets were adopted due to their suitablity for the analysis of non - stationary or transitory features , which characterize most signals found in biomedical applications . wavelet analysis uses wavelets as basis functions for signal decomposition . wavelet analysis can be viewed as a generalization of fourier analysis since it introduces time localization in addition to frequency decomposition of a signal . instead of fourier analysis which discards time information , wavelets are capable of capturing signal features such as small - scale transients , breakpoints , discontinuities as well as general trends and self - similarity . these features cannot be measured by classical spectral techniques . in addition , wavelets — classes of wave - like functions with a finite number of oscillations , an effective length of finite duration and no offset component — form a basis for the lossless decomposition of a given signal . in the present invention the use of wavelet transform significantly reduces the computational complexity when performing the task of assessing the subjects &# 39 ; hypnotic state ( i . e ., level of consciousness ) based on their acquired eeg signal . neither a large number of reference signals nor an extensive amount of clinical eeg data is needed to produce the index of hypnosis disclosed herewith . the methodology of the present invention may also be used to ascertain the state of the brain and the well being of the cns beyond ascertaining the effects of anesthetic agents on the brain . it may also be used to discriminate between different sleep stages , to assess alertness / drowsiness levels in subjects performing safety critical activities , to evaluate cognitive states such — as postoperative and icu - related cognitive impairment or alzheimer - related impairment , to detect pre - ictal patterns in order to predict epileptic seizures , to predict seizure duration such as in electro convulsive therapy , to recognize various pathological states of the cns such as sleep disorders , depression , addiction , adhd or other psychiatric disorders , to monitor the changes in the cerebral metabolic rate , to establish the blood characteristic at the cortical level , to obtain pharmacodynamic models of anesthetic and other neurologic and psychoactive drugs , or to develop titration and dosing profiles for such drugs . the preferred embodiment disclosed below is directed towards the assessment of the patient &# 39 ; s hypnotic / consciousness level during general anesthesia . this invention involves an observed data set acquired in real - time from a subject &# 39 ; s eeg . this data set is further compared , in real time , with one or more reference data sets which characterize distinct hypnotic states . the comparison yields an index of consciousness / hypnosis that is later referred to wavelet index ( abbreviated wav ). the wavelet index can then be used to assist in distinguishing the various stages of general anesthesia , in distinguishing increasing and decreasing depths of general anesthesia , and in detecting the loss of consciousness during the induction of general anesthesia , thus providing an endpoint for individual titration of intravenous induction agents . the observed and reference data sets are statistical representations of the wavelet coefficients obtained by applying a wavelet transform onto corresponding observed and reference signals . these coefficients may be obtained through a wavelet transform of the eeg such as standard dyadic discrete wavelet transform ( dwt ), discrete stationary wavelet transform ( swt ), or wavelet packet transform . in this respect , filters yielding coefficients in a frequency band , chosen such that their statistical representation differentiates between hypnotic states , can be used for this type of analysis . also , other transforms such as short time fourier transform ( stft ), slex transform ( smooth localized complex exponentials ) or other transforms providing both time and frequency localization would yield satisfactory results . the choice of this transformation determines the computational complexity of the method and the resolution of the final index . the observed and reference data sets are obtained by calculating a statistical representation of the transformation coefficients . the methodology of this invention may also be used for extracting information from other physiological signals , such as electrocardiogram ( ecg ), representing measured cardiac activity of a subject in order to evaluate the state of the autonomous nervous system of the subject . the reference data sets represent distinct hypnotic states taken from the continuum from conscious ( i . e ., fully awake ) to isoelectric eeg ( i . e ., no more brain activity ). they are extracted off - line from a group of subjects or patients . they are then stored for real - time implementation . the transformation selected maximizes the dissimilarity between each of the reference data sets . the comparison between the observed data set against the reference data sets can be based on the computation of the correlation between these functions . however , a computationally less demanding solution is to quantify the similarity between these functions by computing the l 1 ( manhattan ), l 2 ( euclidean ), or any distance metrics . in the preferred embodiment , where two reference data sets are used , the result of this comparison yields two values , each expressing the likelihood of a patient being awake or anesthetized . these two values are further combined into a single value corresponding to a univariate index of hypnotic / consciousness state , the wavelet index . in the following , a more detailed description of the method for obtaining the hypnotic state of the patient is presented in its preferred embodiment . fig1 gives an overview of the present invention in its preferred embodiment . the invention is based on the wavelet decomposition of the eeg epoch in the wavelet analyzer unit 8 . this unit 8 applies the wavelet transform onto the epoch delivered by the preprocessing unit 7 , and then extracts the observed data set 13 correlated to the hypnotic state from the corresponding wavelet coefficients . this feature function is further delivered to the comparator unit 9 , where it is compared with two reference data sets 14 , 15 corresponding to the known hypnotic states — awake and deeply anesthetized . these reference data sets are calculated off - line and stored in 10 for the real time comparison in the comparator 9 . the result of comparison is further integrated into an index of hypnosis , which is the input of the scaling 11 and filtering 12 units . finally , the output of unit 12 is displayed by display unit 6 . to produce the awake reference signal , an eeg signal acquired from an awake subjects is used . this signal was pre - filtered to reject very low frequency components and very high frequencies , as well as the eventual electromagnetic interference due to the mains using a notch filter . the second reference signal is an isoelectric eeg signal corresponding to the deepest anesthetic state achievable . this signal can be either synthesized on a computer , or directly acquired from a subject exhibiting no brain activity . epochs of a fixed duration t e were digitized by an analog / digital converter ( adc ), and acquired at a fixed sampling rate f s . both reference signals contained m epochs with n = f s ′ t s samples and no apparent artifacts . these two signals form two training data sets that carry sufficient information to discriminate the awake baseline state from the anesthetized state . these data sets can be written as : { t w = { x w , k , k = 1 , 2 ⁢ ⁢ … ⁢ ⁢ m } ( awake ) t a = { x a , k , k = 1 , 2 ⁢ ⁢ … ⁢ ⁢ m } ( anesthetized ) ( 1 ) where the vectors x ●, k contain n samples representing the k th epoch of either the awake or anesthetized data set . subscripts w and a stand for “ awake ” and “ anesthetized ” states , respectively . to characterize the data sets , a particular feature can be extracted from each epoch . the feature extraction function , ƒ is defined as : each epoch x ●, k is associated with a feature f ●, k . this feature can be either a scalar or a vector . then , a particular state is characterized by averaging the set f ●, k over the corresponding training data set . this results in two averaged features f w and f a defined as : these are representatives of the awake and the anesthetized state . in order to assess the hypnotic state of a patient , it is sufficient to record the patient &# 39 ; s eeg and calculate the feature f for each epoch . comparing this value to f w and f a , it is possible to calculate the likelihood for the patient to be either awake or anesthetized . hence , two indexes i w ( awake ) and i a ( anesthetized ) are defined such that : { i w =  f - f w _  1 i a =  f - f a _  1 ( 4 ) the norm ∥.∥ 1 accurately quantifies the difference between f and f ● by integrating the distance between the two vectors . higher degree norms can be used for this analysis , or the correlation function between two vectors . however , they would emphasize large differences and lead to a noisier index . the main difficulty is obviously the selection of an appropriate function ƒ . as mentioned in the previous section , each eeg epoch can be decomposed using swt into a set of coefficients a and d j : where l is the level of decomposition . each vector d j represents the detail of the signal in a specific frequency band d j , and the vector a represents the signal approximation at the highest level of decomposition . as for the feature used to characterize each eeg epoch , the probability density function ( pdf ) of a chosen wavelet detail band d j is selected : this choice is motivated by the fact that the probability density function does not emphasize large nor small coefficients but , conversely , tends to focus more on the general content of each wavelet decomposition band . this property is indeed used when dealing with noise - like signals such as the eeg . another difficulty arises when selecting an appropriate wavelet filter and choosing the best detail coefficient vector d j for carrying out the analysis . to compare the effectiveness of different wavelets , it is necessary to introduce the discrimination parameter d : the discrimination parameter , d , quantifies the difference between f w and f a . obviously , to better distinguish between the awake and anesthetized states , we need to maximize d , i . e ., select the wavelet filter and coefficient band that gives the highest value for d . the wavelet selection method has been applied to training data sets obtained from awake subjects and anesthetized patients . the sets have been processed to derive the averaged features f w and f a and d . using as an example a 128 hz sampling frequency , the analysis using dwt and swt and the daubechies wavelet family has clearly singled out the probability density function of the band d 1 as the most discriminating . this result is interesting since the d 1 band corresponds to the detail in the 32 - 64 hz frequency range of the eeg signal . in neurophysiology , this particular frequency band , referred to as the γ - band , often is discarded in classical power spectral analysis since it carries a very small amount of the eeg energy . fig7 illustrates the reference data sets characterizing the awake and anesthetized states . a similar conclusion using wavelet packets can be reached . using a 3 - level decomposition , the selection for the best wavelet yielded the band dda 3 ( 48 - 56 hz ) as the most discriminating , in conjunction with the wavelet filter daubechies # 8 . in the preferred embodiment , the signal is decomposed using the swt , and the 32 - 64 hz band is selected , along with the daubechies # 14 wavelet . apparatus for the estimation of the hypnotic state using wavelet analysis of the eeg while any eeg channel would be suited for the analysis , the electrodes 1 are preferably placed on the patient &# 39 ; s 2 forehead . this implementation allows for a greater ease of use . another reason is that the frontal and prefrontal lobes ( which are at the origin of higher cognitive functions ) are located directly behind the forehead . two electrodes , with a third electrode as a common reference , form a single frontal eeg channel . this signal is input 3 into the amplifier and an analog / digital converter ( adc ) unit 4 . after amplification , the signal is pre - filtered to reject low frequency components ( e . g . & lt ; 0 . 5 hz ) and very high frequencies ( e . g . & gt ; 100 hz ), as well as the eventual electromagnetic interference due to the power network ( typically 50 hz or 60 hz ) using a notch filter . eeg epochs of a fixed duration t e are digitized by the adc and acquired at a fixed sampling rate ƒ s . in the preferred embodiment , the epoch length is typically 1 second and sampled at a frequency of 128 hz . while it is possible to sample the signal at a higher sampling rate , the use of lower sampling rates is not recommended . digitized epochs containing n = ƒ s ′ t s samples are then input , one at the time , into the digital signal processing unit 5 , where the wavelet index is calculated in real time by means of a wavelet analysis based method . this resulting index is further displayed by the display unit 6 . all parts of the digital signal processing unit 5 are detailed in the following . once an epoch has been acquired , it is sent to the preprocessing unit , see fig2 . it is first stored as a vector x 16 of length n . the mean value x = σ k = 1 n x k is removed 17 . this offset is due to the signal acquisition process as the eeg is a zero - mean signal . the root mean square amplitude 18 of the epoch is then calculated as : epochs with amplitudes greater than some maximum value ( e . g . 200 μv ) and less than some minimum value ( e . g . 2 μv ) are then rejected . it is indeed assumed that they contain either artifacts such as ocular and electrocautery artifacts or isoelectric eeg . if the amplitude is within the two bounds 19 , a flag 22 indicating that the epoch is not corrupted takes the value 1 . in this case , the epoch is normalized 23 as : the amplitude normalization allows better focus on the phase and frequency content of the eeg , rather than its amplitude . also , this eliminates the influence of electrodes &# 39 ; impedance on the calculation of the index . the apparatus then proceeds to the next stage , ( i . e . the wavelet analyzer unit denoted by 8 in fig1 ). if an artifact is present 20 , the flag is put to 0 and the algorithm proceeds to the scaling unit 11 . if an isoelectric eeg is detected 21 , it is indicative that the patient is in the deepest level of hypnosis . hence the flag takes the value 1 and the variable wav_unfilt 24 takes the value of 0 . the apparatus then proceeds to send the signal to the filtering unit 12 . note that the pre - processing unit 7 , may also utilize more sophisticated artifact removal methods , such as described in zikov et al . ( t . zikov , s . bibian , g . a . dumont , m . huzmezan , c . r . ries , “ wavelet based de - noising technique for ocular artifact correction of the electroencephalogram ,” proceedings of the 24 th annual international conference of the ieee engineering in medicine and biology society , houston , tex ., october 2002 ). after the pre - processing stage , the input of the wavelet analyzer unit 8 is a normalized epoch ( rms amplitude of 1 ) that does not contain any large artifacts . the wavelet analyzer unit 8 first calculates the wavelet coefficients applying the swt and the wavelet filter daubechies # 14 to the pre - processed eeg epoch . the coefficients are obtained by convolution of the eeg epoch with the wavelet filter . the coefficients corresponding to the band selected in the off - line analysis as the most discriminating ( in this embodiment : d 1 are then stored in a vector c . the probability density function is then obtained by calculating the histogram of the coefficients in vector c . the vector of histogram contains b coefficients , where b is chosen number of bins ( e . g . 100 ). each element of this vector is then divided by the total number of coefficients in d 1 band , i . e . by the length of a vector c . the result is a vector pdf of length b , which represents the probability density function of wavelet coefficients in d 1 band obtained by the wavelet decomposition of the epoch x . the resulting pdf vector is input into comparator unit 9 , see fig3 . this unit compares the pdf vector of a current epoch 13 with two reference vectors pdf w and pdf a representing two known hypnotic states awake 14 and anesthetized 15 . the awake reference data set 14 is derived from a combination of eeg signals obtained from a group of healthy awake subjects ( population norming ). this reference data set can be then stored on a mass storage device for future real time comparison . another possibility is to record the patient &# 39 ; s eeg while the patient is still awake , and then derive the awake reference data set ( self - norming ). the anesthetized reference data set 15 is the pdf of the wavelet coefficients of an isoelectric signal , which corresponds to the deepest level of hypnosis . all coefficients are equal to 0 . hence , this particular pdf is a dirac function centered at the origin . the comparison 25 between the pdf 13 calculated in the wavelet analyzer unit 8 and the two reference data sets pdf w 14 and pdf a 15 is achieved using the l 1 distance metric . this comparison yields two values i w 26 and i a 27 calculated as : { i w = 1 n · ∑ k = 1 b ⁢  pdf k - pdf w , k  , i a = 1 n · ∑ k = 1 b ⁢  pdf k - pdf a , k  ( 11 ) where pdƒ k , pdƒ a , k and pdƒ w , k denote the k th elements of the vectors pdf , pdf w , and pdf a respectively . an index i 29 is then generated by calculating 28 the difference between i w 26 and i a 27 : the output of the comparator unit is then input to the scaling unit 11 . the index i is scaled in order to take values between 0 % ( corresponding to isoelectric signal ) and 100 % ( corresponding to the awake baseline ) with higher values indicating higher level of consciousness or awareness : scale and offset are two fixed values calculated in the offline analysis . in the preferred embodiment , values like scale = 30 and offset = 56 . 4 produced the best results . the result of the scaling is further stored into the variable wav_unfilt 24 . the variable wav_unfilt 24 contains the unfiltered version of the final wavelet index . the random character of the eeg dictates that in order to extract a meaningful trend of the patient &# 39 ; s hypnotic state it is necessary to smooth this variable using a filter . a new value wav_unfilt is delivered by the scaling unit 11 for every epoch ( i . e . every second in the preferred embodiment ). however , note that if the current epoch is corrupted with an artifact ( flag = 0 22 ), the variable wav_unfilt can take an arbitrary value , as it will not be used to derive the final value of the index . in the preferred embodiment , the variable wav_unfilt is averaged over the past 30 seconds of data . the result of the averaging filter is stored in the variable wav . however , when calculating the average , only uncorrupted epochs are taken into account ( by investigating the corresponding flag variable ). furthermore , in order to account for poor signal quality , if more than a certain number of previous epochs during last 30 seconds are corrupted due to numerous artifacts ( e . g . 15 ), the monitor is unable to give an accurate estimate of the patient &# 39 ; s hypnotic state . in that case , the variable wav takes the value − 100 %. the output variable wav of the averaging filter is then sent to the display unit 6 . in case of poor signal quality , a message indicating the presence of numerous artifacts is sent to be displayed by the display unit . the wav variable is finally displayed to the anesthesiologist using any standard display device ( cathode ray tube ( crt ), liquid crystal display ( lcd ), printer , etc . . . . ). in the preferred embodiment , the variable is displayed as a trend , or as a number , and can further be used as a measurement signal in the context of a feedback controller which does not make the object of the current disclosure . as will be apparent to those skilled in the art in the light of the foregoing disclosure , many alterations and modifications are possible in the practice of this invention without departing from the spirit or scope thereof . accordingly , the scope of the invention is to be construed in accordance with the substance defined by the following claims .
a method and apparatus to monitor and control the anesthesia state of a patient undergoing general anesthesia is provided . previous automated systems to monitor the anesthesia state of a patient undergoing general anesthesia involve a significant time delay between the patient &# 39 ; s true anesthesia state and the computed indices . the present invention reduces this time delay by using a novel analysis technique applied to spontaneous electrophysiological activity . a transformation and statistical analysis of the observed electrophysiological activity is conducted and compared to reference data to provide numerical indicators . in addition , these indicators are consistent with the levels of depression of patients cns and ans states . this method is illustrated in detail by cns monitoring of electroencephalogram signals .