Reza Sameni
email: rsameni@shirazu.ac.ir

Esmaeil Seraj
email: e.seraj@cse.shirazu.ac.ir

A Robust Statistical Framework for Instantaneous Electroencephalogram Phase and Frequency Estimation and Analysis

Keywords: Electroencephalogram phase calculation, time-domain phase synchrony, phase resetting, phase locking value, phase amplitude coupling, phase slipping

Objective: The instantaneous phase (IP) and instantaneous frequency (IF) of the electroencephalogram (EEG) are considered as notable complements for the EEG spectrum. The calculation of these parameters commonly includes narrow-band filtering, followed by the calculation of the signal's analytical form. The calculation of the IP and IF is highly susceptible to the filter parameters and background noise level, especially in low analytical signal amplitudes. The objective of this study is to propose a robust statistical framework for EEG IP/IF estimation and analysis. Approach: Herein, a Monte Carlo estimation scheme is proposed for the robust estimation of the EEG IP and IF. It is proposed that any EEG phase-related inference should be reported as an average with confidence intervals obtained by repeating the IP and IF estimation under infinitesimal variations (selected by an expert), in algorithmic parameters such as the filter's bandwidth, center frequency and background noise level. In the second part of the paper, a stochastic model consisting of the superposition of narrow-band foreground and background EEG is used to derive analytically probability density functions of the instantaneous envelope (IE) and IP of EEG signals, which justify the proposed Monte Carlo scheme. Main results: The instantaneous analytical envelope of the EEG, which has been empirically used in previous studies, is shown to have a fundamental impact on the accuracy of the EEG phase contents. It is rigorously shown that the IP/IF estimation quality highly depends on the IE and any phase/frequency interpretations in low IE are statistically unreliable and require a hypothesis test. Significance: The impact of the proposed method on previous studies, including timedomain phase synchrony, phase resetting, phase locking value and phase amplitude coupling are studied with examples. The findings of this research can set forth new standards for EEG phase/frequency estimation and analysis techniques.

Introduction

In recent decades, the instantaneous phase and frequency of the electroencephalogram (EEG) have received great attention in neuroscience and brain research communities, as notable complements for the EEG spectrum. The notion has found broad applications in brain computer interface (BCI) systems [START_REF] Picton | The use of phase in the detection of auditory steady-state responses[END_REF][START_REF] Krusienski | Value of amplitude, phase, and coherence features for a sensorimotor rhythm-based brain-computer interface[END_REF], cognitive studies [START_REF] Fell | The role of phase synchronization in memory processes[END_REF][START_REF] Siegel | Phase-dependent neuronal coding of objects in short-term memory[END_REF] and brain connectivity assessment [START_REF] Sakkalis | Review of advanced techniques for the estimation of brain connectivity measured with eeg/meg[END_REF][START_REF] Friston | Functional and effective connectivity: a review[END_REF]. Phase-related quantities have also been widely used in the analysis of clinical and pathological cerebral conditions, including epilepsy [START_REF] Chávez | Spatio-temporal dynamics prior to neocortical seizures: amplitude versus phase couplings[END_REF][START_REF] Netoff | Decreased neuronal synchronization during experimental seizures[END_REF], dementia [START_REF] Stam | EEG synchronization in mild cognitive impairment and alzheimer's disease[END_REF][START_REF] Stam | Generalized synchronization of MEG recordings in Alzheimers disease: evidence for involvement of the gamma band[END_REF], autism [START_REF] Thatcher | Autism and EEG phase reset: deficient GABA mediated inhibition in thalamo-cortical circuits[END_REF] and many more. Recent studies have also sought the relationship between the EEG phase and event-related synchronization (ERS) and desynchronization (ERD) [START_REF] Blankertz | The Berlin Brain-Computer Interface: Progress Beyond Communication and Control[END_REF][START_REF] Sturm | Interpretable Deep Neural Networks for Single-Trial EEG Classification[END_REF].

The reliable estimation of the EEG phase and frequency is an essential prerequisite for all these studies. Various techniques such as the Hilbert transform (HT), wavelet transform (WT), and other time/frequency representations have been utilized for reliable and unambiguous phase calculation. Among all, the HT has been considered the most reliable means of EEG phase estimation, as a method which does not violate the physical and theoretical conditions essential for instantaneous phase extraction [START_REF] Chavez | Towards a proper estimation of phase synchronization from time series[END_REF]. However, a major difficulty in using the HT (and other instantaneous EEG phase extraction methods) is to distinguish between physiological state transitions due to brain activity and spurious variations, spikes and phase jumps-known as "phase slipping" [START_REF] Freeman | Aperiodic phase re-setting in scalp eeg of beta-gamma oscillations by state transitions at alpha-theta rates[END_REF]. It has been previously reported that unambiguous measurements of the EEG phase cannot be made around phase slipping epochs, nor near the ends of signal segments [START_REF] Freeman | Aperiodic phase re-setting in scalp eeg of beta-gamma oscillations by state transitions at alpha-theta rates[END_REF][START_REF] Pikovsky | Synchronization: a universal concept in nonlinear sciences[END_REF]. Some minimum required signal-to-noise ratios (SNR) have also been empirically found for detecting oscillatory neural activities in presence of background noise [START_REF] Hurtado | Statistical method for detection of phaselocking episodes in neural oscillations[END_REF].

Other aspects of EEG phase extraction and analysis, such as temporal properties and band-pass filtering requirements have been investigated in [START_REF] Freeman | Aperiodic phase re-setting in scalp eeg of beta-gamma oscillations by state transitions at alpha-theta rates[END_REF][START_REF] Freeman | Fine temporal resolution of analytic phase reveals episodic synchronization by state transitions in gamma EEG[END_REF]. The authors reported notable discontinuities (phase slipping events) in the EEG phase calculated from the human scalp and attempted to minimize these effects. A comprehensive study was performed on various phase extraction tools (particularly HT and WT) and their impacts and interpretations in neural synchrony [START_REF] Van Quyen | Comparison of Hilbert transform and wavelet methods for the analysis of neuronal synchrony[END_REF]. In [START_REF] Chavez | Towards a proper estimation of phase synchronization from time series[END_REF], physical and theoretical conditions and steps required for obtaining a meaningful phase sequence were extensively studied, besides investigating the most reliable approaches for this purpose. In a recent study, the impact of narrow-band filtering was studied in true versus spurious phase synchronization using synthetic data models [START_REF] Rios Herrera | On the estimation of phase synchronization, spurious synchronization and filtering[END_REF].

Although the problem of reliable EEG phase and frequency estimation has been extensively studied in the neuroscience and brain communities, due to the lack of a stochastic framework, the results and discussions regarding the so-called phase slipping phenomenon remain qualitative and descriptive-commonly stated as a note of caution-instead of providing precise guidelines for the extraction and interpretation of the EEG phase/frequency and discriminating between true versus spurious phase jumps.

The objective of the current study is to propose a Monte Carlo estimation procedure for robust instantaneous EEG phase and frequency estimation using "minor" perturbations in the input signal and phase/frequency estimation algorithm parameters. The proposed method is very generic and does not rely on prior models for the EEG and the parameter perturbation order can be set by the expert depending on application.

In the second part of the paper, we adopt a model-based approach to justify the proposed Monte Carlo estimation procedure in a rigorous statistical framework. Using the most widely accepted EEG data model and profound theories from signal detection and estimation [START_REF] Pikovsky | Synchronization: a universal concept in nonlinear sciences[END_REF][START_REF] Boashash | Estimating and interpreting the instantaneous frequency of a signal. I. Fundamentals[END_REF][START_REF]Estimating and interpreting the instantaneous frequency of a signal. II. Algorithms and applications[END_REF][START_REF] Picinbono | On instantaneous amplitude and phase of signals[END_REF], it is shown that issues such as EEG phase slipping and phase/frequency deviations are unavoidable (yet predictable), and spurious phase variations can be probabilistically discriminated from physiologically relevant EEG phase/frequency variations. The instantaneous analytical envelope of the EEG, which has been empirically used in previous studies, is shown to have a fundamental impact on the accuracy of the EEG phase contents.

From an application viewpoint, the authors have recently shown the applicability of the hereby presented method for BCI [START_REF] Seraj | Robust electroencephalogram phase estimation with applications in brain-computer interface systems[END_REF] and sleep stage scoring [START_REF] Karimzadeh | A distributed classification procedure for automatic sleep stage scoring based on instantaneous electroencephalogram phase and envelope features[END_REF] applications.

In Section 2, the basic steps required for EEG phase extraction are reviewed. The proposed Monte Carlo phase/frequency estimation method is detailed in Sections 3-3.3. This method is statistically justified and used for deriving statistical properties of narrow-band EEG in background noise in Section 4. The practical implications of the proposed method are detailed in Section 6. Various applications of the proposed framework and its impact on previous EEG phase studies are presented in Section 5.

Instantaneous Envelope, Phase and Frequency Calculation

The classical procedure of calculating the instantaneous envelope (IE), instantaneous phase (IP) and instantaneous frequency (IF) of a signal is to use its analytical form [START_REF] Picinbono | On instantaneous amplitude and phase of signals[END_REF]. These parameters are only uniquely defined for narrow-band signals. Therefore, considering a discrete-time signal y n (such as an EEG), it is first bandpass (BP) filtered around the desired center frequency ω 0 = 2πf 0 /f s with a narrow bandwidth bw.

x n = BP(y n ; p) = y n * h n (1)
where h n is the equivalent BP filter's impulse response, * denotes convolution, f s is the sampling frequency in Hz, and

p = {type, method, ω 0 , bw, δ s , δ p , • • • } (2)
is the set of design parameters describing the BP filter, including the filter's type, design method, center frequency ω 0 , bandwidth bw, stop-band attenuation δ s , pass-band ripple δ p , etc. The parameter set p plays a fundamental role in the current study. A detailed discussion is presented in Section 3.2, regarding the parameter set selection. Next, the analytical form of the BP filtered signal is calculated using the discretetime Hilbert transform H{•}.

xn = x n + jH{x n } (3)
The IE, IP, and IF are calculated from the analytical form as follows.

A

n ∆ = Re(x n ) 2 + Im(x n ) 2 (4)
φ n ∆ = atan2[Im(x n ), Re(x n )] (5)
f n ∆ = f s 2π [φ n -φ n-1 ] mod 2π (6)
where atan2 represents the four-quadrant inverse tangent and the difference operator in ( 6) is used as an approximation for phase differentiation (cf. [START_REF]Estimating and interpreting the instantaneous frequency of a signal. II. Algorithms and applications[END_REF] for alternative approximations). In order to avoid instantaneous jumps in the IF, the IP sequence is unwrapped before calculating the difference in [START_REF] Friston | Functional and effective connectivity: a review[END_REF]. From [START_REF] Sakkalis | Review of advanced techniques for the estimation of brain connectivity measured with eeg/meg[END_REF], it is clear that in low signal amplitudes, the argument of atan2 becomes singular, as it fluctuates around zerodivided-by-zero, and a small difference in the filtering scheme or background noise can cause large phase variations (even beyond ±π) and randomize the IF. The aforementioned procedure is fully deterministic and does not account for the stochastic properties of the EEG. One can envisage that in a stochastic framework, the probability of phase jumps and the variance of the IF, somehow increase in low analytical signal envelopes. In the sequel, we seek a statistical framework for the problem of EEG IP and IF analysis, which systematically considers the effect of low/high instantaneous envelope and background noise and is robust to minor variations in filtering parameters and the phase extraction algorithm.

Method: Robust EEG Phase/Frequency Estimation

To overcome the limitations in IP and IF estimation in low SNR, we propose that IP and IF estimation should be performed under minor variations in the estimation process, including: EEG measurement quantization noise and infinitesimal variations in the filtering parameters. Our basic assumption throughout this work is that: A 1. For any significant EEG-based physiological inference, there exists a range of measurement and algorithmic parameter variations (defined by an expert), which can be considered to be irrelevant to the undergoing physiological phenomenon.

In other words, we assume that physiologically significant EEG characteristics (spectral, phase, frequency, etc.) are robust to "infinitesimal perturbations" in: 1) the signal's amplitude, and 2) the phase extraction algorithm (e.g. the bandpass filter's design parameter set). This assumption is indeed intuitive and the definition of "infinitesimal perturbations" is subjective and highly dependent on the undergoing physiological activity (brain task). Nevertheless, we assume that for any physiological experiment, the expert can set a bound on the algorithm parameters, beyond which any parameter variations are irrelevant to the underlying experiment. Assumption (A1) is supported by the fact that the sub-frequency bands defined in the EEG phase analysis literature are highly subjective and minor deviations in the center frequencies, bandwidths, and even filter design technique are implicitly assumed to be irrelevant to the phase study. To the best of the authors' knowledge, despite the rich literature on EEG phase, only some general guidelines have been proposed for the phase extraction procedure [START_REF] Freeman | Aperiodic phase re-setting in scalp eeg of beta-gamma oscillations by state transitions at alpha-theta rates[END_REF][START_REF] Freeman | Hilbert transform for brain waves[END_REF], and researchers have been basically using arbitrary and un-unified narrow-band filtering and phase extraction schemes in their studies.

Other inevitable sources of measurement variability, which are commonly neglected in practice, are the analog and digital (quantization) device noises during signal recording, plus the intrinsic background EEG noise. Apparently, if the input signal is dithered by minor additive noise, at the order of the background EEG level or at the quantization level of the analog-to-digital convertors (ADC) used for digitizing the EEG, the foreground EEG is again expected to remain consistent under such minor dithers.

Based on these assumptions we propose that:

P1. The procedure of EEG phase and frequency estimation should consist of a Monte Carlo sweep over random perturbations of measurement and algorithm parameters (background noise level, filter's bandwidth, center frequency, etc.) at a user-defined level. The estimated EEG parameters should be reported with their mean and confidence intervals over this Monte Carlo simulation.

This procedure is rather general and it can be implemented in different forms. For a given EEG signal y n , Algorithm 1 is hereby proposed as a realization of proposition (P1), to find robust values and statistical confidence intervals for IP and IF estimates. A summarized practitioners' guideline version of Algorithm 1 is listed in Table 1.

For illustration, Fig. 1 shows 30 s of a typical EEG, recorded in a BCI experiment; together with its IE, IF and unwrapped IP, calculated using Algorithm 1 for N = 50 iterations. The sampling frequency of the signal is f s = 160 Hz. For better visualization of the phase fluctuations, in Fig. 1, the unwrapped phase has been subtracted by 2π(f 0 /f s )n, which is the instantaneous phase of a sinusoidal oscillator with a fixed initial phase. The BP filter is a zero-phase forward-backward filter obtained from an order six moving average lowpass filter prototype, shown in Fig. 2 §. The center frequency of the filter is f 0 = 13.1 Hz (the local peak of the power spectral density as shown in Fig. 3) and the effective bandwidth is 1 Hz. In each of the N trials, this filter has been perturbed with random deviations of the bandwidth ranging from zero to 0.05 Hz, the center frequency f 0 has been perturbed with a uniform random value in the range of f 0 ± 10 -2 Hz, and the dither ν (k) n in each iteration is a zero-mean Gaussian random variable with a standard deviation n = 0.1, which is smaller than the quantization level of the 14-bit ADC used for sampling the EEG signal. The gray shades in Fig. 1, show the results of N trials overlaid. The average instantaneous frequency fn and the § The moving average is herein used due to its linear phase and trivial design method. Arbitrary filters can be generally used instead (cf. [START_REF] Seraj | Robust electroencephalogram phase estimation with applications in brain-computer interface systems[END_REF] for an example of IIR filters).

Algorithm 1 Robust Instantaneous EEG Phase and Frequency Estimation

Require: A filter design parameter set p as defined in [START_REF] Krusienski | Value of amplitude, phase, and coherence features for a sensorimotor rhythm-based brain-computer interface[END_REF]. Define: An algorithmic variation irrelevancy bound, including the background noise level (δλ) and filter design parameter variation range (δp). Note that the algorithm reduces to the conventional deterministic phase estimation technique by setting δλ = 0 and δp = 0.

1: for all k = 1, • • • , N do 2:
Design a bandpass filter with perturbed design parameter set p (k) = p + δρ (k) , where the parameter perturbations are |δρ (k) | ≤ δp.

3:

Add minor noise to the input EEG at an order of δλ, to obtain dithered randomized ensembles of the EEG:

d (k) n = y n + ν (k) n . We assume ν (k) n ∼ N (0, 2
n ) to be Gaussian noise and the dither variance 2 n ≤ δλ. Note that this stage may be bypassed by setting δλ = 0, if no priors exists regarding the background noise level.

4:

Filter d (k) n using bandpass filters designed with the perturbed design parameter set p (k) : x

(k) n = BP(d (k) n ; p (k) ) 5:
Calculate the analytical form of the filtered ensemble:

x(k

) n = x (k) n + jH{x (k) n } 6:
Calculate the IE, IP, and IF:

X (k) n = |x (k) n | (7)
θ (k) n = atan2[Im(x (k) n ), Re(x (k) n )] (8)
f (k) n = f s 2π [θ (k) n -θ (k) n-1 ] mod 2π (9)
7: end for 8: Find the ensemble averages and variances of the parameters

xn = E{x (k) n }, λ x n = E{(x (k) n -xn ) 2 } (10) Xn = E{X (k) n }, λ X n = E{(X (k) n -Xn ) 2 } (11) θn = E{θ (k) n }, λ θ n = E{(θ (k) n -θn ) 2 } (12) fn = E{f (k) n }, λ f n = E{(f (k) n -fn ) 2 } ( 13
)
where E{•} represents averaging over k (the N generated ensembles) ‡. 9: Calculate the confidence intervals of the estimated parameters: σ

X n = λ X n , σ θ n = λ θ n , and σ f n = λ f n .
Table 1: Practitioners' Guidelines for Robust IP and IF Calculation 1. Specify the center frequency and bandwidth of interest with tolerances, which are irrelevant for the EEG study.

2. Specify the measurement noise level of the EEG from the measurement device characteristics.

3. Repeat the following steps multiple times:

Simultaneous Envelope, Phase and Frequency Variations

The implication of the proposed framework is that the IE is highly fundamental for phase and frequency variations and these measures become unreliable in low IE. However, further considerations are required for reliable interpretation of the IE. Consider the following scenarios, which both lead to a low analytical signal envelope:

A) Stationary IF (fixed phase shift) with a dropping IE B) Stationary envelope with a varying IF (variable phase shift)

The two scenarios are shown in the short-time frequency transforms of a sample EEG segment in Fig. 4. In the first scenario, the IE is explicitly dropping; while in the second scenario, due to the variation of the IF, the signal is moving out of the narrow BP filter's pass-band, which indirectly results in an IE drop. In both cases, the estimated IP and IF become unreliable. However, only the first scenario can be considered as a statistical burden (without any physiological source); while the second scenario can frequently Notice the random ±π phase jumps around t = 13.9 s, which coincide with a notch in the IE. happen for an EEG to have minor fluctuations in the IF mode (considering the narrowband of the BP filter), as in experiments with varying levels of subject consciousness or during different stages of sleep. In order to discriminate these scenarios, the analytical signal envelope can be tracked at the output of a filter bank with three filters: a BP filter centered at f 0 and two BP filters with minor center frequency deviations, centered at f 0δf and f 0 + δf . In the first scenario the envelope at all three filter outputs will drop; while in the second scenario the envelope of the main BP filter (centered at f 0 ) will drop and the envelope of either the right or left vicinity frequency bands will increase. This simple frequency tracking scheme is a computationally efficient alternative for time-frequency analysis of the EEG over the entire Nyquist band. Due to the zero-phase (zero group-delay) property, the input and output of these filters are phase synchronous. Accordingly, Fig. 1e shows significant IE drops in all three BP filter outputs. Considering the IF of the same segment in Fig. 1h we notice the totally random behavior of the IF (positive and negative fluctuations around f 0 ), due to the very low IE of this segment. Fig. 1f shows another IE drop in all three BP filter outputs. Considering the IF in the same segment in Fig. 1i, we notice that although the IF has a high variance in this segment, but all the randomized ensembles report an instantaneous frequency drop in this segment. The same phenomenon has occurred in Fig. 1g and Fig. 1j; but this time with IF tendency towards frequencies above f 0 .

Parameter Selection

The proposed framework is generic and its parameters should be selected by an expert, per application. Various aspects of the parameter selection are discussed below.

Filter Design Scheme:

The BP filter is a linear transform. Accordingly, the phase of x n over the entire Nyquist band, is the summation of the input signal's phase and the filter's phase. Therefore, for phase-based studies, linear-phase finite impulse response (FIR) are commonly used, which preserve the input signal phase difference and do not add any phase distortions; in contrast to infinite impulse response (IIR) filters, which are nonlinear phase. However, the order of narrow-band FIR filters can become very high, resulting in long transient response effects. Moreover, the addition of even a linear phase to the input signal can cause fake phase jumps due to the phase wrapping of the filter's phase. To avoid this, one can use zero-phase forward-backward filtering (FIR or IIR) as the standard procedure , which does not cause any phase distortions and guarantees the phase synchrony between the input and output of the BP filter. This procedure is evidently non-causal, which is not a limitation for offline phase analysis.

Filter Design Parameter Set:

The BP filter specifications such as the center frequency, bandwidth, and design method are all subjective and may be selected according to physiological ground truth (as considered in all previous studies). According to Assumption 1, for each application, the parameter deviations considered during the Monte Carlo simulation are selected such that the deviated filter specifications would be physiologically "irrelevant" for the application of interest. For example, consider an EEG with a dominant 7-12 Hz (alpha-band) spectral density peak. Physiologically, many experts would consider a 0.1 Hz of filter bandwidth deviation to be irrelevant for such an experiments. Therefore, randomization of the BP filter bandwidth below this level will permit the identification of reliable and unreliable EEG parameters.

Depending on the filter design scheme, the filter's parameter variations can be done in various domains. For instance, one may prefer to perform the perturbation in the zero-pole configuration of a predefined filter (as recently proposed in [START_REF] Seraj | Robust electroencephalogram phase estimation with applications in brain-computer interface systems[END_REF]). In this case, the filter should be checked for stability after the random pole perturbations and the poles should be preserved inside the unit circle. Moreover the conjugate symmetry of the zeros and poles need to be preserved, in order to guarantee the realness of the filter coefficients.

Dither Level:

The dither level should be at the same order (or smaller than) the expected background noise. The analog noise figure and quantization noise of the ADC used in EEG sampling are inevitable sources of background noise, which can be simply found by studying the electronic specifications of the EEG measurement system. The background EEG activity is another source of background noise; however it is rather subjective and model-dependent and may be subject to a debate among experts.

Post-Processing: Temporal Filtering of Instantaneous EEG Parameters

The ensemble averaging technique proposed in Stage 8 of Algorithm (1) does not consider the temporal correlations of the IE, IP, or IF. By assuming a temporal dynamic model for these parameters, the estimation quality may be further improved by conventional filtering and smoothing schemes such as the Kalman filter or Particle filter (also known Zero-phase forward-backward filtering can be implemented using the filtfilt function in Matlab, Octave, or R. It uses the time-reversal property of the Fourier transform to perform zero-phase smoothing by processing the input signal in both the forward and reverse directions [START_REF] Seraj | Robust electroencephalogram phase estimation with applications in brain-computer interface systems[END_REF][START_REF] Oppenheim | Discrete-time signal processing[END_REF]. Therefore, regardless of the linear or nonlinear phase-response of the filter, the resulting process has a zero-phase (and zero-group delay) response. as Sequential Monte Carlo). For proof of concept, let us assume a first order autoregressive dynamic model for the IP and apply a classical Kalman filter to improve the IP and IF estimates.

θ n = θ n-1 + w n φ n = θ n + ψ n (14)
where w n ∼ N (0, γ 2 n ) is considered as process noise, and ψ n ∼ N (0, σ 2 n ) is the observation noise. For this model, it can be shown that the Kalman filter equations have a single tunable parameter σ 2 n /γ 2 n , which can be adjusted proportional to the phase and frequency variances obtained in [START_REF] Blankertz | The Berlin Brain-Computer Interface: Progress Beyond Communication and Control[END_REF] and [START_REF] Sturm | Interpretable Deep Neural Networks for Single-Trial EEG Classification[END_REF]. In Fig. 5, the IF of the sample EEG segment from Fig. 1 is shown after applying the Kalman smoother for σ 2 n = λ f n (as defined in [START_REF] Sturm | Interpretable Deep Neural Networks for Single-Trial EEG Classification[END_REF], and two values γ n = 10 -3 and γ n = 10 -5 . Apparently, the results are smoother for smaller values of γ n (the filter relies on the presumed first-order dynamics) and become closer to the observed noisy IF for larger values of γ n . This example is only shown as proof of concept. The rich literature on Kalman filtering and its extensions can be used in future studies for robust IP and IF estimation, using suitable temporal priors.

A Theoretical Model-Based Justification; Statistical Properties of Narrow-Band EEG

The method and results presented in Section 3, demonstrate the susceptibility of EEG phase and frequency estimates in low analytical signal amplitudes. However, for a formal description of these findings, a data model is required. Herein, we use the most widely accepted model in the literature [START_REF] Sauseng | Are event-related potential components generated by phase resetting of brain oscillations? a critical discussion[END_REF][START_REF] Mäkinen | Auditory event-related responses are generated independently of ongoing brain activity[END_REF][START_REF] Mazaheri | Posterior α activity is not phase-reset by visual stimuli[END_REF], to extract statistical properties of narrow-band EEG. Although, the hereby developed formulations are in accordance with empirical results on real data, the statistical framework proposed in this section is subject to debate-as with all model-based techniques-depending on the acceptance or rejection of the model for specific applications.

Data Model

An implicit assumption in most EEG phase analysis studies is that a desired (narrowband) brain activity, referred to as foreground EEG in the sequel, coexists in a pool of background EEG, considered as noise. The background EEG is considered to be spontaneous (as compared with the foreground EEG). It is the superposition of numerous simultaneous and non-coherent cortical activities, which according to the central limit theorem tends to a Gaussian distribution and is spread over the entire frequency band of study. On the other hand, the foreground EEG can be the result of some mental activity, external stimuli (audio, visual, etc.), or any other evoked activity, which discriminates it from the spontaneous EEG. Based on these assumptions, the following additive model can be considered as a generic model for the EEG signal at the BP filter output.

x n = X n cos(ω

0 n + θ n ) + v n = s n + v n ( 15
)
where the first part (s n ) models the foreground EEG, X n is the non-negative foreground envelope with slow variations (lowpass with respect to the center frequency ω 0 ), θ n is the instantaneous foreground EEG phase (again with rather slow variations), and v n is the narrow-band counterpart of the background EEG, which generally overlaps with the foreground EEG spectrum. Due to the linearity of the BP filter, the background EEG remains Gaussian through the filtering process, i.e., v n ∼ N (0, σ 2 n ). In this model, the rather slow variations of X n and θ n (approximately constant over very small temporal windows) is the main assumption that discriminates the foreground and background EEGs. The objective of EEG phase analysis is to estimate the phase signal θ n .

If the BP filter is sufficiently narrow-band (as required for a canonical definition of the IE, IP, and IF [START_REF] Boashash | Estimating and interpreting the instantaneous frequency of a signal. I. Fundamentals[END_REF][START_REF] Picinbono | On instantaneous amplitude and phase of signals[END_REF]), its analytical form can be written as follows. xn = x n + jH{x n } = X n e j(ω 0 n+θn) + η n = A n e j(ω 0 n+φn) [START_REF] Pikovsky | Synchronization: a universal concept in nonlinear sciences[END_REF] where η n = r n e j(ω 0 n+ψn) (r n ≥ 0) is the analytical form of v n -a complex valued Gaussian random process with zero-mean independent real and imaginary parts and σ 2 n variance [START_REF] Davenport | An introduction to the theory of random signals and noise[END_REF]Ch. 8]. The phasor diagram of the foreground plus background EEG is shown in Fig. 6 for illustration. This additive model is perhaps the most generic model for narrow-band EEG and in accordance with the most widely accepted data models in EEG phase analysis studies (cf. [START_REF] Sauseng | Are event-related potential components generated by phase resetting of brain oscillations? a critical discussion[END_REF] for a detailed discussion about the most common EEG phase models). Previous studies have mainly studied the narrow-band foreground part of model ( 15) within a deterministic framework; neglecting the statistical properties of the background EEG. The basic idea that is followed in this work is that the problem should be studied in a stochastic framework and the signal detectability and reliability of the desired EEG phase totally depend on the instantaneous envelopes and variances of the foreground and background EEG.

Probability Density Functions of the EEG envelope and phase

The statistical properties of the signal model in [START_REF] Freeman | Aperiodic phase re-setting in scalp eeg of beta-gamma oscillations by state transitions at alpha-theta rates[END_REF] have been extensively studied in the signal processing literature [START_REF] Davenport | An introduction to the theory of random signals and noise[END_REF][START_REF] Rice | Statistical properties of a sine wave plus random noise[END_REF]. Herein, we use some of these well-known properties to find a statistically justifiable (reliable) method for EEG phase analysis.

For simplicity, we assume the sine wave envelope X n and the noise variance σ 2 n to be known (or estimated as discussed in Section 4.4).

pdf of narrow-band background EEG:

Considering a Gaussian probability density function (pdf) for the background EEG, the magnitude and phase of its analytical form (η n = r n e j(ω 0 n+ψn) ) are independent [START_REF] Davenport | An introduction to the theory of random signals and noise[END_REF]. In absence of a foreground activity (X n = 0), the background EEG magnitude has a Rayleigh distribution and the phase is uniform over [-π, π]:

f (r n |σ 2 n ) =    r n σ 2 n exp - r 2 n 2σ 2 n , for r n ≥ 0 0, elsewhere (17)
f (ψ n |σ 2 n ) =    1 2π , for -π ≤ ψ n ≤ π 0, elsewhere (18)
4.2.2. pdf of narrow-band foreground plus background EEG: In presence of foreground EEG, due to the Gaussian assumption on the background EEG, it can be shown that the envelope and phase of the analytical form ( 16) have the following joint pdf:

f (A n , φ n , θ n |X n , σ 2 n ) = f (A n , ∆φ n |X n , σ 2 n ) = A n 2πσ 2 n exp - A 2 n + X 2 n -2X n A n cos(∆φ n ) 2σ 2 n ( 19
)
where ∆φ n = φ nθ n is the instantaneous random phase difference (error) between the noisy and noiseless sinusoidal part of the model (the observed versus foreground EEG phases in our case). In this case, the envelope and phase are no longer independent (a key point in our study). The marginal distribution of the analytical envelope has a Rician distribution.

f (A n |X n , σ 2 n ) = A n σ 2 n exp - A 2 n + X 2 n 2σ 2 n I 0 X n A n σ 2 n ( 20
)
where I 0 (•) is the modified Bessel function of the first kind [START_REF] Davenport | An introduction to the theory of random signals and noise[END_REF]Ch. 8]. Using the Bayes' rule and combining ( 19) and ( 20), the conditional pdf of the phase error ∆φ n is found.

f (∆φ n |A n , X n , σ 2 n ) = f (∆φ n |κ n ) = exp (κ n cos(∆φ n )) 2πI 0 (κ n ) ( 21
)
where

κ n ∆ = A n X n /σ 2 n . Apparently, this distribution is symmetric around zero (E{∆φ n |A n , X n , σ 2 n } = 0) and E{∆φ 2 n |A n , X n , σ 2
n } is an envelope-dependent phase-error variance. These properties support the assumptions required for the Kalman smoothing stage described in Section 3.3.

Finally, integrating [START_REF] Van Quyen | Comparison of Hilbert transform and wavelet methods for the analysis of neuronal synchrony[END_REF] over A n , the marginal distribution of the IP error is found.

f (∆φ n |X n , σ 2 n ) = f (∆φ n |ρ n ) = 1 2π exp(-ρ 2 n )[1+ √ πρ n cos(∆φ n ) erfcx (-ρ n cos(∆φ n ))] ( 22
)
where

ρ n ∆ = √ SNR n = X n / 2σ 2
n denotes the root square of the instantaneous SNR and erfcx(•) is the scaled complementary error function.

The envelope, phase error, and conditional phase error distributions of narrow-band Gaussian background EEG and foreground plus background EEG are shown in Figs. 7,8, and 9, respectively.

The calculation of the IF pdf additionally requires the joint pdf of θ n and θ n-1 . Due to the lack of ground truth regarding the temporal dependence of the EEG phase, previous results on the IF pdf of sinusoidal signals plus noise [START_REF] Rice | Statistical properties of a sine wave plus random noise[END_REF][START_REF] Raemer | The probability density of the phase difference of a narrow-band gaussian noise with sinusoidal signal (corresp.)[END_REF][START_REF] Shmaliy | Probability distributions of the envelope and phase, and their derivatives in time of the sum of a non-stationary sine signal and narrow-band gaussian noise[END_REF], which either assume a constant or fully random phase are not directly applicable in this case. A rigorous approach is to model the temporal dynamics of the IP, e.g., by assuming a Markov model for the IP, which is beyond the scope of the current study. However, as a rule of thumb, previous research have shown that the IF pdf becomes sharper around ω 0 as the IP becomes more correlated in time (has slow temporal variations) [START_REF] Raemer | The probability density of the phase difference of a narrow-band gaussian noise with sinusoidal signal (corresp.)[END_REF]. Moreover, the IF pdf is peaked around ω 0 in high SNR and it tends to a uniform distribution over [-π, π] (the entire Nyquist band) in low SNR.

These pdfs have also been used to extract lower bounds on the estimation variance of the IP and IF using different assumptions on the temporal structure of the IP [START_REF] Kay | Fundamentals of Statistical Signal Processing: Estimation Theory[END_REF][START_REF] Farquharson | Estimating the parameters of polynomial phase signals[END_REF]. Again, as a general rule of thumb, the Cramér-Rao lower bound (CRLB) of the IP error variance is commonly inversely proportional to the SNR [START_REF] Peleg | The Cramer-Rao lower bound for signals with constant amplitude and polynomial phase[END_REF]. In summery, all the probability density functions derived in this section depend on the background EEG variance and the instantaneous analytical signal envelope of the foreground EEG. Specifically, in low analytical signal envelopes (low SNR), the probability of phase error tends to a uniform distribution over [-π, π], which is in accordance with the results previously shown in Section 3.

Signal Detectability

Regardless of the presence or absence of a foreground EEG activity, the procedure of IP calculation (narrow-band BP filtering, analytical signal calculation followed by IP estimation) always produces an output; even from pure random background EEG (noise). But how can one guarantee that there has been some foreground activity? Here, we either require physiological ground truth obtained from the experimental setup or other modalities (e.g., simultaneous MEG, fMRI, etc.), or complementary information from multiple EEG leads. In absence of reliable ground truth, one faces a statistical hypothesis test. At each time instant, there are two possible hypothesis:

H 0 : x n = v n (background EEG alone) H 1 : x n = X n cos(ω 0 n + θ n ) + v n (background plus foreground EEG) (23)
The decision is apparently probabilistic. The objective is to determine the most likely hypothesis, which meets some predefined probability of detection (p d ) and probability of false alarm (p f ).

The detection of a sinusoidal in noise is a classical problem in detection theory [START_REF] Richards | Fundamentals of radar signal processing[END_REF]Ch. 6]. The hypothesis test is performed by setting an appropriate threshold th on the IE to meet the desired p d and p f . By definition and according to Fig. 7, we have

p f = ∞ th f (r n |σ 2 n )dr n p d = ∞ th f (A n |X n , σ 2 n )dA n (24)
which depend on the instantaneous foreground and background EEG levels (the SNR). The curves for p d as a function of the required SNR with p f as parameter are shown in Fig. 10, for a fixed instantaneous phase θ n = cte. The same results are approximately applicable for sinusoids with slowly varying phase (as compared with the center frequency ω 0 ), a condition that is satisfied for narrow-band BP filtered EEG. Some useful rules can be derived from Fig. 10. For example, a 10 dB SNR is required to detect a foreground signal with a probability of 90% and p f =1%. For the same p f , the probability of detection drops below 10% in zeros or negative SNR. In practice, one may fix the desired p d and p f and find the corresponding SNR value from Fig. 10. By intersecting this value with the instantaneous SNR, one can determine the time instants for which the existence of foreground EEG activity are most (least) probable. These results are in accordance with the empirical SNR levels previously proposed for the detection of neural oscillations in background EEG [START_REF] Hurtado | Statistical method for detection of phaselocking episodes in neural oscillations[END_REF].

The utilization of Fig. 10 requires the instantaneous SNR (or its estimate), which is not directly available for the EEG. A heuristic approach for estimating the EEG SNR is proposed in Section 4.4.

Foreground/Background EEG SNR Estimation

The estimation of the instantaneous SNR requires some prior assumptions regrading the foreground and background EEG. Considering the additive data model proposed in Section 4.1, and considering the foreground EEG (s n ) and background EEG (v n ) to be uncorrelated, superposition holds between their power spectral densities (PSD):

S x (f ) = S s (f ) + S v (f ) (25)
S x (f ) can be directly estimated from the raw EEG. If we further assume that the background EEG is flat over the narrow-band filter's passband, the background EEG PSD S n (f ) can be estimated from the neighborhood bands of the frequency band of interest, as shown in Fig. 11, and S s (f ) is found by subtracting S n (f ) from S x (f ). The area under these spectral estimates is equal to their total power. Therefore, the SNR in the filter's passband is obtained. The same method can be performed online, by estimating the PSD and SNR n over a sliding window of the input signal (cf. [START_REF] Hurtado | Statistical method for detection of phaselocking episodes in neural oscillations[END_REF] for a similar approach). An alternative approach for SNR estimation is to use oscillatory signal tracking schemes (similar to the one developed in [START_REF] Sameni | A Linear Kalman Notch Filter for Power-Line Interference Cancellation[END_REF] for electrocardiogram denoising applications) to estimate the foreground EEG from x n . Having an estimate of s n , the background EEG and the instantaneous SNR can be found.

Applications

The current study has significant implications in various EEG phase analysis applications. In this section, some of the major applications are studied with examples. In order to make the results reproducible, all source codes related to this study are online available in the open-source electrophysiological toolbox (OSET) [START_REF]The Open-Source Electrophysiological Toolbox (OSET)[END_REF].

Time Domain Synchrony and PLV

The synchronous firing of neurons within different brain regions has been considered as a potential source of EEG-level brain responses. Synchrony estimation consists of first calculating the phase sequences using electric or magnetic brain records and then quantifying the local stability of phase lock through computing the difference between these sequences [START_REF] Lachaux | Measuring phase synchrony in brain signals[END_REF]. In this context, phase-locking value (PLV) is one of the most common indexes used for calculating the coherency and synchrony between phase signals [START_REF] Lachaux | Measuring phase synchrony in brain signals[END_REF][START_REF] Rosenblum | Phase synchronization of chaotic oscillators[END_REF]. The index is based on the phase difference (PD) between two EEG signals.

To show the importance of the proposed statistical approach in phase synchrony studies, the IP, IF and IE of five 20 s segments of simultaneous EEG channels are shown in Fig. 12. Accordingly, the initial observation shows a great synchrony between the IP of O1, P3, C3 and partially F3 (middle panel). Moreover, considering the FP1 as a reference signal, the inter-channel phase differences (PLVs), are showing a sort of phase lock or significant phase shift in the highlighted time epochs (indicated by boxes in Fig. 12). Nevertheless, when comparing these plots with their corresponding IE (in the left panel of Fig. 12), it is noticed that the spikes in the phase indexes are concurrent with low IE. Therefore, the phase effects are side-effects of a low analytical signal envelope during the same epochs. More specifically, the boxes indicated as (a) and (b) in the left panel have been selected such that the IE captured from electrode FP1 (the reference lead) includes two notches. During the same period, two big spikes can be observed in its corresponding phase derivatives in the middle panel of FP1, which result in notable displacement (shifts) in the calculated phase differences (PLVs). On the other hand, box (c) is selected such that a low-value analytic envelope in four other electrodes is concurrent with a high envelope in FP1. Again, the phase differences are significantly affected by unreliable spikes in phase sequences due to low IE in these channels. Apparently, as discussed before, measurements of instantaneous phase in time instants with low IE are unreliable and phase-related quantities such as phase lock, phase difference, or PLV are affected by this issue. Therefore, any physiological and pathological interpretations based on these quantities require further consideration.

Phase Resetting

Phase resetting has been defined as a phase shift (PS) followed by a phase difference stability, i.e., phase lock (PL) [START_REF] Pikovsky | Synchronization: a universal concept in nonlinear sciences[END_REF]. Each pair of PS and PL, starting from the beginning of a PS and finishing by the end of a PL (beginning of the next PS), is called a phase reset (PR). Fig. 13 shows the PR, PL and PS events calculated for a typical EEG. Using the concepts presented in Fig. 13, in Fig. 14 phase shifts are estimated for segments of two EEG channels (FP1 and O1) together with their IE, IF, PD and the first order time difference of the PD. Accordingly, among all the detected phase shift events (curves crossing the green dashed threshold in the second panel), only two of them have occurred in significantly high IE (may be considered relevant). Furthermore, according to the third and fourth panels, the phase shifts calculated between two channels are only relevant only during the epochs where the IE of both channels have been above the threshold (blue boxes) and the rest of the detected phase shift events (red boxes) are unreliable, due to the low-envelope analytic signal.

Phase resetting in various frequency bands of cerebral signals have been previously correlated to different cognitive responses such as working memory [START_REF] Rizzuto | Reset of human neocortical oscillations during a working memory task[END_REF][START_REF] Tallon-Baudry | Oscillatory synchrony between human extrastriate areas during visual short-term memory maintenance[END_REF], brain development [START_REF] Thatcher | Development of cortical connectivity as measured by EEG coherence and phase[END_REF], intelligence [START_REF] Thatcher | Intelligence and EEG phase reset: A two compartmental model of phase shift and lock[END_REF][START_REF] Sauseng | Crossfrequency phase synchronization: A brain mechanism of memory matching and attention[END_REF], consciousness [START_REF] Cosmelli | Waves of consciousness: ongoing cortical patterns during binocular rivalry[END_REF][START_REF] Varela | The brainweb: phase synchronization and large-scale integration[END_REF][START_REF] John | The neurophysics of consciousness[END_REF][START_REF]From synchronous neural discharges to subjective awareness?[END_REF], sensory-motor interactions [START_REF] Vaadia | Dynamics of neuronal interactions in monkey cortex in relation to behavior events[END_REF] and many more [START_REF] Sauseng | What does phase information of oscillatory brain activity tell us about cognitive processes?[END_REF][START_REF] Kahana | The cogntivie correlates of human brain oscillations[END_REF]. While it appears that many of the phase shifts and resettings have been during unreliable IE magnitudes. This raises some reservations regarding physiological and pathological interpretations which have been based on phase resetting of brain signals and highlights the necessity of simultaneous IE analysis for such applications, either as a complement or replacement for phase analysis. One can hypothesize that many of the previous results associated to the EEG phase might have been mere side-effects of the signals envelope variations.

Phase-Amplitude Coupling (PAC)

Phase amplitude coupling (PAC) is a means of investigating the coupling between the phase of lower frequency oscillations and the power of higher frequency oscillations, i.e., synchronization of IE of faster rhythms with IP of slower rhythms [START_REF] Voytek | Shifts in gamma phase-amplitude coupling frequency from theta to alpha over posterior cortex during visual tasks[END_REF]. Due to the algorithmic details of the PAC, its study is beyond the scope of the current study. However, many aspects of PAC, including the calculation of the IP and IE in different frequency bands can be studied within the hereby proposed scheme. Specifically, the current study emphasizes the necessity of a Monte Carlo estimation of the IE, IP and IF for PAC studies to assure the statistical relevance of the calculated index.

Discussion

This study has some major impacts for a systematic interpretation of the EEG phase, which we highlight below.

(i) The confidence in signal detection, IP and IF estimations is directly related to the instantaneous SNR and envelope (X n ). In fact, considering a stationary background EEG variance (σ n = cte.), in low foreground EEG envelopes (X n ), the accuracy of signal detection drops, the probability of phase slipping increases, and the IP/IF estimation qualities degrade. This suggests that IP and IF are only reliable in high SNR, and it is not possible to validate any phase or frequency activity without simultaneously considering the instantaneous envelope of the analytical form of the EEG.

(ii) The EEG IP and IF are stochastic parameters with SNR-dependent pdfs. As random variables, they can fluctuate within the range of their pdf. The confidence intervals of these parameters imply that as far as the estimated IP and IF are within the θn ± σ θ n and fn ± σ f n ranges, the event is considered "normal". An odd event-having perhaps a physiological origin, such as phase resetting, etc.may only be reported when the IP/IF exceeds the normal range. This shows that phase/frequency jumps that occur in low analytical signal envelopes are statistically irrelevant and may not necessarily be associated to any biological origin. More rigorously, using the pdfs derived in Section 4.2, percentiles can be estimated for each of the estimated parameters to find the probability of a given IP or IF.

(iii) The randomized ensembles generated from the Monte Carlo scheme proposed in Section 3 can be considered as samples drawn from the density functions derived in Section 4.2. Considering the symmetry of the IP distribution, θn yields the maximum a posteriori (MAP) estimate of the IP. For the IE (due to the right skew of its distribution) and IF (due to its possible pdf asymmetry, which depends on the temporal dynamics of the EEG phase), instead of taking the expectation of the randomized ensembles, the sample mode can be used to obtain the MAP estimate (which are no longer equal to Xn or fn ).

(iv) Considering the fundamental role of the IE in phase analysis, a hypothesis that requires future studies is that many of the phase inferred parameters of the EEG, may in fact be associated to the analytical signal envelope, rather than the EEG phase. In other words, phase-related parameters such as phase resetting may be side effects of the signal's envelope drop, rather than being independent physiological phenomena.

Conclusion

In this study the classical procedure of instantaneous EEG phase and frequency analysis was studied in a stochastic Monte Carlo estimation framework and justified using the most widely accepted data model representing foreground and background EEG activities. The probability density functions of the instantaneous phase and envelope and their dependence on the instantaneous SNR of the EEG were derived. By using minor perturbations in the BP filtering scheme and background noise level, it was shown that the EEG phase parameters are highly dependent on the IE and are statistically unreliable in low analytical signal envelopes. The impact of this framework was shown for EEG IP and IF calculation, and well-known phase-based parameters such as phase synchrony, PLV and phase resetting. The study raises some major reservations on the interpretation of previously reported physiological factors, which have been derived from the EEG phase alone (neglecting the envelope information). Considering the high impact of the IE on IP and IF, a fundamental question is whether phase related indexes can be considered as independent cerebral factors, or they are merely side effects of the IE variations. The answer to this question requires a statistical setup on a large dataset recorded under well-defined brain experiments such as steady state audio/visual evoked potentials.

In future studies, the hereby proposed Monte Carlo randomization procedure and post-processing proposed in Section 3.3 can also be unified using particle filtering or sequential Monte Carlo filtering, which perform randomization and smoothing at the same time, to obtain sample-based MAP estimates for the EEG phase and frequency.

In case of wide acceptance, the findings of this research can set forth new standards for EEG phase/frequency estimation methods, using multiple and infinitesimal algorithm parameter variations and the necessity of reporting average and confidence intervals over these Monte Carlo sweeps, as a standard procedure.

( a ) 5 .

 a5 Design bandpass filters with randomized parameters within the specified tolerance bounds. (b) Add random noise to the original EEG segment, with amplitudes below the specified noise level. (c) Apply the designed filter to the noisy segment. (d) Extract the IP and IF using conventional methods (e.g., Hilbert transform). 4. Calculate the average and standard deviations of the estimated IP and IF over multiple iterations. Report the mean values of the IP and IF and use the standard deviations to form upper and lower confidence intervals for the estimated parameters. confidence intervals bounded by fn ±σ f n are also shown. The frequency response of the N perturbed bandpass filters are shown in Fig. 2. It is seen that although the algorithmic and noise level variations are negligible from the physiological viewpoint, the IP and IF results are significantly different, especially during the low analytical signal segments of the EEG.

Figure 1 :

 1 Figure 1: (a) A sample EEG segment; (b) the bandpass filtered signals using three BP filters with f 0 = 13.09, 13.1, 13.11 Hz and the corresponding analytical signal envelopes; (c) the unwrapped IP of fifty perturbed ensembles with their highlighted mean; (d) the IF of fifty perturbed ensembles with fn , and fn ± σ f n confidence intervals; (e)-(g) a zoom-in of three IE segments where the black, red and green traces correspond with the output of BP filters centered at f 0 , f 0δf and f 0 + δf , respectively, and envelopes shown in thick black, dashed red and dashed green; (h)-(j) zoom-in of three IF segments.Notice the random ±π phase jumps around t = 13.9 s, which coincide with a notch in the IE.

Figure 2 :

 2 Figure2: The overlaid magnitude response of N = 50 order six moving average filters obtained by perturbing the design parameters, used for the results in Fig.1. The difference between the filter responses are assumed to be irrelevant for EEG phase analysis. Refer to Section 3 for further details.

Figure 3 :

 3 Figure 3: Normalized power spectral density (PSD) of the sample EEG segment of Fig. 1

Figure 4 :

 4 Figure 4: The short-time frequency transform (STFT) of a sample EEG. The left highlighted segment shows a vanishing component at a fixed IF; the right highlighted segment shows a component with varying IF, corresponding to scenarios (A) and (B) in Section 3.1, respectively.

Fig

  Fig.1billustrates the idea. The sample EEG has been passed through three zero-phase BP filters with the same effective bandwidth 1 Hz, and center frequencies 13.09 Hz, 13.0 Hz, and 13.01 Hz (δf = 0.01 Hz). The resulting signals have been overlaid for comparison, with three highlighted segments shown in Figs. 1e, 1f and 1g. Due to the zero-phase (zero group-delay) property, the input and output of these filters are phase synchronous. Accordingly, Fig.1eshows significant IE drops in all three BP filter outputs. Considering the IF of the same segment in Fig.1hwe notice the totally random behavior of the IF (positive and negative fluctuations around f 0 ), due to the very low IE of this segment. Fig.1fshows another IE drop in all three BP filter outputs. Considering the IF in the same segment in Fig.1i, we notice that although the IF has a high variance in this segment, but all the randomized ensembles report an instantaneous frequency drop in this segment. The same phenomenon has occurred in Fig.1gand Fig.1j; but this time with IF tendency towards frequencies above f 0 .

Figure 5 :

 5 Figure 5: The estimated IF of 50 ensembles overlaid (gray shades); the average IF (black); the KF-smoothed IF with γ n = 10 -3 (blue) and γ n = 10 -5 (red).

Figure 6 :

 6 Figure 6: The phasor diagram of seventy-five data points (green) of foreground plus background EEG. The black solid circle has a radius of 2σ n . Assuming a Gaussian distribution for the background EEG, 68% of the points fall within this circle.

Figure 7 :

 7 Figure 7: Envelope distributions of Gaussian background EEG (left three curves) and foreground EEG oscillations plus Gaussian background EEG (left right curves) for X n = 4.5 and σ 2 n = 0.2, 1, 2.5, equivalent to SNR n = 17, 10, 6 dB.

Figure 8 :

 8 Figure 8: Phase distributions of foreground EEG oscillations plus Gaussian background EEG for X n = 4.5 and from top to bottom σ 2 n = 1, 2, 5, 10, 20, and 100, equivalent to SNR n = 10, 7, 3, 0, -3, and -10 dB.

Figure 9 :

 9 Figure 9: Conditional phase error distributions of foreground EEG oscillations plus Gaussian background EEG for κ n = 10, 5, 2, 1, 0.1 (from top to bottom).

Figure 10 :

 10 Figure 10: Detection probability (p d ) as a function of the required SNR with false alarm probability (p f ) as a parameter[START_REF] Richards | Fundamentals of radar signal processing[END_REF] Ch. 6]

Figure 11 :

 11 Figure 11: Normalized power spectral density (PSD) of a sample EEG segment and the estimated foreground and background EEG

Figure 12 :

 12 Figure 12: Time domain synchrony (middle panel), the corresponding PLV index (rightside panel), and the instantaneous analytical signal envelope (left-side panel). Notice the estimations affected by low values of analytic envelope .

Figure 13 :

 13 Figure 13: Illustration of Phase Resetting (PR), Phase Lock (PL) and Phase Shift (PS) events using the IF and IP of an EEG segment. The dashed green lines indicate the tunable threshold used for measuring PS [11].

Figure 14 :

 14 Figure 14: Phase resetting (phase shift) measurements affected by the low values in analytic envelope.

Acknowledgment

This research has been supported by the Cognitive Sciences and Technologies Council of Iran (COGC), under the grant number 2250.


Shaiq Engr

Engr Muhammad Ali

Iftikhar

Design and Simulation of Low Cost Pure Sin Wave Inverter Through Multivibrator Technique by Using Multisim

Keywords: PWM, Inverter, 555 timer, 4017 Decade counter, Harmonics, Filter. I

Pure sine wave transformers are very important nowadays when it comes to using ds power sources for both low and high-power applications. These inverters not only increase the efficiency of the power system but also prevent electrical components from damaging. Much work has been done in the field of pure sine wave inverter but for a waveform with low number of harmonics along with high efficiency is still an open challenge. There are techniques available to do this, but the need to adapt to a solution that is easy to implement as well as specifically for low energy applications. In this paper, a multi-vibration technique is used to generate a square wave which is then split into two square waves of the same frequency by the 4017-decade counter to hold the Hbridge inverter. The output of the H-bridge inverter contains harmonics that are filtered using a low pass filter. Thus, we get a pure sin wave in the output.

INTRODUCTION

There are two kinds of sources of power generation. One is conventional and the second is non-conventional. Today to generate most conventional power sources such as coal and gas, nuclear power generators are used. Some traditional sources of power are causing environmental pollution and are not much better because of their harmful radiation impact on humanity. Ten years later, traditional sources will not be sufficient enough to meet the demands of mankind. Therefore, some electrical energy must be generated from nonconventional energy sources such as solar and wind [START_REF] Kapadia | simulation and design of low cost single phase solar invertor[END_REF].

Renewable energy sources such as wind and solar energy are the main sources of energy used in this regard. This solar energy can be converted to electricity with the help of solar panels consisting of silicon photovoltaic cells. With a good design application, solar energy can save large amounts of energy at low cost. Power Inverter is an essential part of photovoltaic power generation. The inverter is required to convert DC into AC used in standalone mode or network application. Inverter options are often available in expensive production and poor quality production. The quality of the inverter output waveform features current harmonic content [START_REF] Sridhar Dandin | Highly Efficient Pure Sine-Wave Inverter for Photovoltaic Applications with MPPT Technique[END_REF].

The main function of the inverter is to convert DC input voltage to a AC output voltage of the desired magnitude. The output voltage waveforms of the ideal inverters should be sinusoidal, however the waveform of the practical inverters are non-sinusoidal and contains different harmonics. Square wave or quasi-square-wave voltages are acceptable only for low and medium power applications, but for high power applications low distorted sinusoidal waveforms are required. By using high speed power semi-conductor devices and by using different switching techniques we can reduce the harmonic content in output voltage. These inverters usually use pulse width modulation control signals to provide an AC output signal [START_REF] Prof | Design and analysis of various inverters using different PWM techniques[END_REF].

The paper [START_REF] Myat | Design and Implementation of Solar inverter for Pure Sine Wave Inverter[END_REF] is an approach to the DC to AC power inverter, which aims to efficiently convert the power source DC, similar to the power that will be available in the power outlet. The way in which the low voltage DC voltage is inverted is completed in two steps. The first is to convert the source of the high voltage dc to the AC waveforms using the pulse width modulation. Another way to complete the desired result would be to first convert the low voltage DC power to the AC and then use the transformer to get the desired output. Focusing on the first method is specifically described as conversion of high voltage source DC to AC [START_REF] Myat | Design and Implementation of Solar inverter for Pure Sine Wave Inverter[END_REF]. Paper [START_REF] Shahid | LM555 Timer-Based Inverter Low Power Pure Sinusoidal AC Output[END_REF] represents a duty cycle-based configuration of LM555 timer to generate an AC output of 50Hz. Two BJT transistors (NPN and PNP) are used to convert the 12V DC into 12V AC cycle. Also, a low pass filter design is tested to convert a distorted square wave to a pure sine wave with minimal ripples on any load condition. The results shown are simulated based, indicating the correct form of output with 220V AS with very less harmonics storms and noise effects.

Research has been carried out on the production of pure, cost effective and effective sine wave inverter recently and this paper offers a very useful design for low energy based applications. The paper concentrates on the use of renewable solar energy by incorporating a multi-vibrator IC (NE-555), in this case operating in a stable mode, the PWM generating technique used to drive a pure sine wave inverter. It appears that the design is easy to implement and proves to be costeffective for low power applications [START_REF] Hasan | Design & Implementation of Single Phase Pure Sine Wave Inverter Using Multivibrator IC[END_REF].

II. SRTRUCTURE OF PRPOPOSED WORK

The block diagram of the proposed circuit is shown in Figure 1. It is clear from the block diagram that the circuit is divided into five main stages. Each of these stages and their Engr Shaiq Ali, University of Engineering and Technology, Peshawar, Pakistan, Email: engineer.shaiq@yahoo.com Engr Muhammad Iftikhar, University of Engineering and Technology, Peshawar, Pakistan, Email: miftikhar@uetpeshawar.edu.pk ISSN: 2409-2770 function is discussed in details below. Pure Sine inverter may be a series of modular design and must be able to work together with competitive efficiency, cost, ease of implementation and use.

A. 555-Timer Stage

The 555-timer stage is responsible for generating the required clock pulse needed for the entire circuit. The clock pulse frequency should be higher than the frequency of outputs required because we will also use 4017-decade counter in the next stage. The pulse frequency of the clock is controlled through the resistor and capacitor values that will be connected with the timer. In order to produce a square wave of desired frequency the timer 555 is used in astable mode in this circuit. The 555-timer section of the circuit is shown in Figure 2. The frequency of the output square wave can be found by using the formula given below f = 1.44/(R2+2R1) C2

B. 4017-Decade Counter Stage

4017-decade counter is a decimal counter that can count from 0 to 9. It has ten output pins that goes high one after another. It also has clock input which determines the frequency of count pulses. The purpose of using 4017-decade counter in this paper is to get two separate clock pulses with a delay between them from a single clock pulse coming from 555 timer. The 4017-decade counter connected with 555 timer is shown in Figure 3. Pins 3 and 7 were chosen to act as triggering outputs, while pin 5 was chosen to act as a reset signal and connected to the reset input itself. This 3-5-7 combination introduces a delay in between the trigger signals, which will be very useful in achieving a pure sine wave output later on in the circuit.

C. H-bridge Inverter Stage

It is the main part of our circuit that would convert DC into AC. An H-bridge inverter consists of four switching devices (BJT in this case) connected in the form of an H bridge. The two clock pulses from 4017-decade counter will control the switching of BJTs connected in the H-bridge. The circuit of H-bridge is shown in Figure 4. The clock pulse coming from pin3 of 4017-decade counter is given to the common point of Q2 and Q5. The clock pulse coming from pin7 is given to the common point of Q3 and Q4. As there is delay between the two clock pulses hence the two pairs of transistors are switched on one after another for equal half interval of time. This creates an AC signal with an average value of zero that resembles a square wave, which makes the signal much easier to filter and turn into a pure sine wave signal.

ISSN: 2409-2770

D. Filter Stage

The square wave coming from H-bridge contains a large amount of harmonics that needs to be filtered out. For this purpose, we use filter connected in series with the H-bridge inverter. The filter stage was chosen to be a passive filter because an active filter would involve the use of op-amps, consuming more power and lowering efficiency. Since the Hbridge circuit has a two-ended output, the 4th order low pass filter consisted of 8 resistors and 4 capacitors. The transfer function of this complicated of a circuit is very difficult to calculate, so the values of the components were found through trial and error by seeing which combination produced the best output signal. The circuit of filter stage is shown in Figure 5.

E. Transformer Stage

The last stage of our circuit is the transformer stage. The peak value of the voltage at the at the filter output is very low. In order to step up it to the required value we need to connect a step-up transformer. Hence the output coming from the filter is given to a step-up transformer.

Complete Circuit Diagram

The final circuit diagram of proposed circuit is shown in Figure 6. All the above discussed stages are connected together to get the final circuit diagram.

III. SIMULATION RESULTS

The simulation results of different stages are given below. Figure 7 shows a clock pulse of frequency 250Hz. Figure 8 shows two similar waveforms each of frequency 25Hz. Figure 9 shows a square waveform of frequency 50Hz containing harmonics. Finally, in Figure 10 a pure sin wave of frequency 50Hz is shown after filtration and voltage rise through transformer of ratio 1:861 to produce a voltage of 220V RMS.

CONCLUSION

This paper focuses on the design of low-cost pure sin wave inverter. The paper discussed available techniques and tried to come up with a solution for low energy applications that are easy to implement, cost-effective and reliable from the point of view of consumers. We have tried to come up with a design for low power applications that are cheap to achieve. The proposed solution has used multivibrator technique for the generation of square wave to control the switching of Hbridge. The harmonics are removed using low pass filter. The circuit is then simulated in Multisim software.

FUTURE WORK

The paper was a general success and all requirements were met. However, the design still uses a lot of optimization. If efficiency improves, the design will be a much better alternative to existing circuits in the market. This added efficiency can even allow the circuit to use active filtration, which would give the circuit the best pure sine wave output signal. The circuit is tested on an open loop. However, it can also be tested in the future on a close loop. In order to step up the voltage boost converter can also be used instead of transformer.

ACKNOWLEDGMENT

On completion of this research, we would like to acknowledge efforts of our respected faculty member Sir Muhammad Iftikhar with appreciation whose technical support in field of inverters was very valuable in conducting research and practical implementation of inverter.

Figure 1 .

 1 Figure 1. Block diagram of proposed circuit

Figure 2 .

 2 Figure 2. 555-timer connected in Astabe mode

Figure 3 .

 3 Figure 3. Decade counter connected with 555 timer

Figure 4 .

 4 Figure 4. H-bridge circuit

Figure 5 .

 5 Figure 5. Filter circuit

Figure 6 .

 6 Figure 6. Complete circuit diagram

Figure 7 .Figure 8 .

 78 Figure 7. Simulation result of 555 timer stage

Figure 9 .

 9 Figure 9. Simulation result of H-bridge cicuit