Power spectrum analysis could tell us whether there are modes in the plasma and how their frequencies evolve with time. However, linear (1st order) spectrum analysis method like Power Spectrum Density (PSD) could not tell the interaction between these modes. Higher order spectrum analysis method could help to reveal this secret. Bicoherence analysis is one of the commonly used 2nd order spectrum method.

Class of 2nd order spectrum analysis methods

Bispectrum [1]

Before conduction the coherence analysis, first we need to get bispectrum as [3]:

B(f1,f2)=X(f1)X(f2)X(f1+f2)B(f_1, f_2) = X(f_1) X(f_2) X^*(f_1 + f_2)

Here, X(f) is the Fourier components of the real signal s(t).

Meaningful region of bispectrum{width=300px}

This figure shows the meaningful region of bi-spectrum. The full plot of bi-spectrum will make up a [Fs/2,Fs/2]2[-Fs/2, Fs/2]^2 region. Where the upper right and lower left corner of the figure are beyond the Niquist frequency limit with f1+f2>fNiquist|f_1 + f_2| > f_{Niquist}. Due to the symmetry of the positive and negative frequency, only a quarter of the area is non-duplicated meaningful region [5].

Bicoherence

Bicoherence is a bit difference from bispectrum. You may calculate bispectrum with only one period of signal. But to investigate Bicoherence, you have to divide you signal into many small parts. Otherwise you will got the wrong normalization.

Wrong normalization

Because for only a single pair of complex numbers, this normalization will be constant unity value:

Z1=A1eiϕ1, Z2=A2eiϕ2Z_1 = A_1 e^{i\phi_1},\ Z_2 = A_2 e^{i\phi_2}

Z1Z2Z1Z2=A1A2ei(ϕ1ϕ2)A1A2=ei(ϕ1ϕ2)=1\frac{|Z_1*Z_2^*|}{|Z_1||Z_2|} = \frac{A_1 A_2 e^{i(\phi_1 - \phi_2)}}{A_1 A_2} = |e^{i(\phi_1 - \phi_2)}| = 1

Thus the normalization for only one signal slice without summation for many time slids is a total failure.

b2(f1,f2)X(f1)X(f2)X(f1+f2)2X(f1)X(f2)2X(f1+f2)2=1b^2(f_1, f_2) \neq \frac{|X(f_1) X(f_2) X^*(f_1 + f_2)|^2}{|X(f_1)X(f_2)|^2|X^*(f_1 + f_2)|^2} = 1

Correct normalization

Suppose the signal has been buffered into N periods, the related Bicoherence is defined like this [1] [7]:

b2(f1,f2)=k=1NBk(f1,f2)2sk(f1)sk(f2)2sk(f1+f2)2b^2(f_1, f_2) = \frac{|\sum_{k=1}^{N}B_k(f_1, f_2)|^2}{\sum|s_k(f_1)s_k(f_2)|^2 \sum|s_k^*(f_1 + f_2)|^2}

Since we defined the Bicoherence, we should also prove that it is normalized with maximum value of 1 and minimum value of 0. This can be concretely proven in math. Remember the definition of Bicoherence:

b2(f1,f2)=k=1NBk(f1,f2)2sk(f1)sk(f2)2sk(f1+f2)2b^2(f_1, f_2) = \frac{|\sum_{k=1}^{N}B_k(f_1, f_2)|^2}{\sum|s_k(f_1)s_k(f_2)|^2 \sum|s_k^*(f_1 + f_2)|^2}

To prove this, we can make some simplifications. Since the Fourier components of fif_i is a complex value, we can set: sk(f1)sk(f2)=Z1s_k(f_1)s_k(f_2) = Z_1, sk(f1+f2)=Z2s_k^*(f_1 + f_2) = Z_2. Then the Bicoherence becomes:

b2(f1,f2)=Z11Z12+Z21Z22+Z31Z32+...+ZN1ZN22(Z112+Z212...+ZN12)(Z122+Z222+...+ZN22)b^2(f_1, f_2) = \frac{|Z_{11}Z_{12} + Z_{21}Z_{22} + Z_{31}Z_{32} + ... + Z_{N1}Z_{N2}|^2}{(|Z_{11}|^2 + |Z_{21}|^2 ... + |Z_{N1}|^2)(|Z_{12}|^2 + |Z_{22}|^2 + ... + |Z_{N2}|^2)}

We need to prove that b21b^2 \leq 1. For simplicity, we start from the case with N = 2, and mark the terms as: Z11=A1,Z21=A2,Z12=B1,Z22=B2Z_{11} = A_1, Z_{21} = A_2, Z_{12} = B_1, Z_{22} = B_2. Then the relation becomes:

b2=A1B1+A2B22(A12+A22)(B12+B22)1b^2 = \frac{|A_1 B_1 + A_2 B_2|^2}{(|A_1|^2 + |A_2|^2)(|B_1|^2 + |B_2|^2)} \leq 1

From the property of complex number, we have the relation that:
A1B1A1B1A_1 B_1 \leq |A_1||B_1|, A2B2A2B2A_2 B_2 \leq |A_2||B_2|, then we have: A1B1+A2B22(A1A2+B1B2)2(A12+A22)(B12+B22)|A_1 B_1 + A_2 B_2|^2 \leq (|A_1||A_2| + |B_1||B_2|)^2 \leq (|A_1|^2 + |A_2|^2)(|B_1|^2 + |B_2|^2). With this key relation, we can easily prove that the above inequality relation is correct. The minimum value appear when the the modes, f1, f2 and f3 do not satisfy the coupling relation, where the complex vector group Z11,Z21Z_{11}, Z_{21} (Fourier coefficients) are independent/vertical to the other vector group Z12,Z22Z_{12}, Z_{22}. Then bispectrum is 0 as (A1B1+A2B2=0A_1 B_1 + A_2 B_2 = 0). The maximum value take as the two vector group are the same with b2=1b^2 = 1. Thus the Bicoherence takes value within the range [0, 1], which means it is normalized to 1.

Normalization of Bicoherence{width=300px}

This relation could also be extended to the case with more than 2 terms. So that, we have the inequality relation as:

b2=nZn1Zn22Zn12Zn22b^2 = \frac{|\sum_n Z_{n1} Z_{n2}|^2}{\sum|Z_{n1}|^2\sum|Z_{n2}|^2}

Which is equivalent to:

b2(f1,f2)=nXn(f1)Xn(f2)Xn(f1+f2)2(Xn(f1)Xn(f2)2)(Xn(f1+f2)2)1b^2(f_1, f_2) = \frac{|\sum_n X_n(f_1) X_n(f_2) X_n^*(f_1 + f_2)|^2}{(\sum |X_n(f_1)X_n(f_2)|^2)(\sum|X_n^*(f_1 + f_2)|^2)} \leq 1

With the coherence inside the range: b2(f1,f2)[0,1]b^2(f_1, f_2)\in [0, 1].

Test data generation

When you code is ready, be careful with generation of white noise. numpy.random.random([Nt]) will introduce positive valued white noise with very strong zero frequency component. It will pose very strong interference to your coherence spectrum. White noise generated with numpy.random.randn(Nt) has rather even frequency components, which will reduce this interference. In python, the test data can be generated via these codes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if i_test == 1:
print('test data is used.')
dt = 0.0003
t = numpy.arange(1, 1.5, dt)
f1 = 100
f2 = 300
f3 = f1 + f2
f4 = 1200
phi_1 = pi/12
phi_2 = pi/3
phi_3 = phi_1 + phi_2
phi_4 = 0
# f3 is coupling of f1 and f3, while f4 is independ signal frequency
# random noise is also added to the signal
sig = numpy.cos(2*pi*f1*t + phi_1) + numpy.cos(2*pi*f2*t + phi_2)\
+ numpy.cos(2*pi*f3*t + phi_3) + 1*numpy.cos(2*pi*f4*t + phi_4)\
+ 0.1*numpy.random.randn(len(t))

Numerical calculation

The Bicoherence spectrum for the above data using python is like this:

bicoherence of test data: full region{width=300px} bicoherence of test data: meaningful region{width=300px}

The result figures show that in the test signal data, there are coupling between f1=100 Hz, f2 = 300 Hz, f3 = 400 Hz, but there is no coupling with f4 = 1200 Hz.

Reference

[1] https://en.wikipedia.org/wiki/Bicoherence

[2] http://fusionwiki.ciemat.es/wiki/Bicoherence

[3] Shigeru INAGAKI et al. (2012). Bicoherence analysis of fluctuations with long distance correlation in toroidal plasmas. Journal of the Physical Society of Japan, 81(3), 1-5

[4] B.Ph. van Milligen et al, Wavelet bicoherence: a new turbulence analysis tool, Phys. Plasmas 2, 8 (1995) 3017

[5] Van Milligen, et al (2008). Bicoherence during confinement transitions in the TJ-II stellarator. Nuclear Fusion, 48(11).

[7] Hagihira, S., Takashina, M., Mori, T., Mashimo, T., Yoshiya, I., Many, H., & Are, E. (2001). Practical Issues in Bispectral Analysis of, 966–970.