Trigonometric Tidbits: Synchronization of Neuronal Firing as a Sum of Sinusoids and Lagrange's Identity.

 
Today I am going to derive Lagrange's trigonometric identities for $\sum^N_{k=0} \sin(k \theta)$ and $\sum^N_{k=0} \cos(k \theta)$ using the series $\sum^N_{k=0} e^{i k \theta}$. This expression can then be used to conceptualize a metric for synchronization of neurons.

Let us begin by remembering that any complex number can be written in the following forms. $a+bi = r e^{i \theta} = r(\cos(\theta) + i \sin(\theta))$. Thus we can conceptualize the sums $\sum^N_{k=0} \cos(k \theta)$ and $i \sum^N_{k=0} \sin(k \theta)$ as the sum of complex points uniformly distributed on the surface of the unit circle. 


 

Because these are complex points. We can just add up the points, and then the real part will be the sum of the $\cos$ terms and the imaginary parts will be the sum of the $\sin$ terms. Thus we can reduce our problem to solving 

$$\sum^N_{k=0} e^{i k \theta}$$

Notice however that this can be written as the familiar geometric series 

$$ \sum^N_{k=0} (e^{i \theta})^k =\sum^N_{k=0}x ^k $$ with $x = e^{i \theta}$

We know that  $$\sum^N_{k=0}x ^k = \frac{1-x^{N+1}}{1-x}$$

$$\frac{1- e^{i (N+1) \theta}}{1- e^{i \theta}}$$

 We can then calculate the real and complex parts fairly easily. To make the denominator is real we can easily just multiply top and bottom by $e^{-i\frac{ \theta}{2}}$ yielding


$$\frac{1- e^{i (N+1) \theta}}{1- e^{i \theta}}\frac{e^{-i\frac{ \theta}{2}}}{e^{-i\frac{ \theta}{2}}}$$

$$\frac{e^{-i\frac{ \theta}{2}}-e^{-i\frac{ \theta}{2}} e^{i (N+1) \theta}}{e^{-i \frac{\theta}{2}}-e^{i\frac{\theta}{2}}}$$

$$\frac{e^{-i\frac{ \theta}{2}}- e^{i (N+\frac{1}{2}) \theta}}{e^{-i \frac{\theta}{2}}-e^{i\frac{\theta}{2}}}$$

Notice that the denominator is just $e^{-i \frac{\theta}{2}}-e^{i\frac{\theta}{2}} = \frac{2\sin(\frac{\theta}{2})}{i}$


Cleaning everything up we get

$$i\frac{\cos(\frac{\theta}{2})-i\sin(\frac{\theta}{2})-\cos((\frac{1}{2}+N) \theta)-i \sin((\frac{1}{2}+N) \theta)}{2\sin{\frac{\theta}{2}}}$$

Distributing the $i$ inside

$$\frac{ i \cos(\frac{\theta}{2})+\sin(\frac{\theta}{2})-i \cos((\frac{1}{2}+N) \theta)+ \sin((\frac{1}{2}+N) \theta)}{2\sin{\frac{\theta}{2}}}$$

Thus the real part is

$$\sum^N_{k=0} \cos(k\theta) = \frac{+\sin(\frac{\theta}{2})+ \sin((\frac{1}{2}+N) \theta)}{2\sin{\frac{\theta}{2}}}$$


$$\sum^N_{k=0} \sin(k \theta) = \frac{ \cos(\frac{\theta}{2})-\cos((\frac{1}{2}+N) \theta)}{2\sin{\frac{\theta}{2}}}$$

Thus completing the identities.

However, this equation has a few interesting consequences.  A plot of the function (at least the cosine term) yields some pretty useful information. Notice that when all the dots are equally spaced around the circle, the sum is $0$ but when they are all bunched up it is $N$.

 

 




This allows us to define a synchronization measure. If all the dots line up, they will have sum $N$ if they don't line up, the sum will be smaller. Moreover, if they are perfectly out of phase, then the sum will be zero.

 

 


The more general way to do this is to consider the sum
$$\rho e^{i \Phi} = \frac{1}{N} \sum^N_{k=0} e^{i k \theta_k}$$
 where $\theta_k$ is the $k^{th}$ oscillator. This is known as the order parameter, and is often used when analyzing the Kuramoto model. When we evaluate this sum, $\rho$ will be a number between $0$ and $1$. If the oscillators are all in phase, then the sum will be $1$ (or near $1$), and $\rho$ will be near $0$ if the oscillators are not in phase. $\Phi$ will be the average phase of the system. In our simple case $\Phi=0$ but that is not necessarily the case, for arbitrary oscillators.
 
This can be very useful when analyzing neurons, where the spike time can be converted into a phase variable. Some neuron models like the Kuramoto model, and Theta model, already have a phase variable and can be put into this framework directly.  
It is a bit trickier to convert a spike time train into this model. However a first approximation can be made if the frequencies of all the neurons are the same (or some multiple of the frequency). Take a single neuron with the slowest firing rate ($f_0$). Define its spike time as $\theta_0 =0$. Then all other spiking neurons spike timings $x_k$ can be defined relative to this neuron. That is $\theta_k = \mod(\frac{x_k}{f_0},2\pi)$. Note however that this only works if the firing rate stays stationary. There is a different metric for spike synchrony that works in a more general setting. Perhaps I will visit that metric at a different date.


Author: Alexander White

留言