# [Eeglablist] convert EEG montage from bipolar to unipolar

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Thu May 25 12:35:12 PDT 2017

```Dear colleagues,

Update--
because I got an inquiry about it off the list.
He said that he would use it only to draw a scalp topography, and
performing signal processing using the 'recovered' full-channel signal is
not recommended.

Again, let X be the (single-channel referenced) original EEG data and Xb
the bipolar-montage version of it.
Using a bipolar-referencing transform matrix M, the relation of X and Xb
can be written as

Xb = M * X

Suppose X has 6 channels F1, F2, C1, C2, P1, P2, and bipolar-referencing
was done with F1-F2, C1-C2, P1-P2.
Then, Xb is 3*t, M is 3*6, and X is 6*t (t is time).
The matrix M is

1 -1 0 0 0 0
0 0 1 -1 0 0
0 0 0 0 1 -1

(sorry but I don't have code)
To compute M^-1, one should use pinv() (i.e. pseudo-inverse) and the
recovered full-channel data are NOT full-ranked (and this is NOT the only
solution)
To recover full channel data, you also need to have something like F1-C1,
C2-P1, P2-F2 so that the matrix is full-ranked and square, but such data
are not usually available (as far as I know, Paul Sajda presented such a
complicated reference system to address high-amplitude artifact in
simultaneous fMRI-EEG recording).

So the recommended use of this solution is just to draw scalp topography
for convenience.

Accordingly, let me correct my previous statement.

> Thus, by multiplying the inverse matrix of the known bipolar-referencing
transform matrix M, you obtain the original signal.

This is true ONLY IF you have redundantly referenced channels (which is
very rare). Otherwise, it does NOT properly convert standard bipolar
montage to a single-referenced data (because M is not square), therefore
analyzing the 'recovered' data should be limited to specific purposes only.

Sorry if my previous writing was misleading.

Makoto

On Fri, May 12, 2017 at 4:26 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
wrote:

> Dear Mubaraki,
>
> Ok this is the solution I learned from my colleague.
> Let X be the (single-channel referenced) original EEG data and Xb be the
> bipolar-montage version of it.
> Using a bipolar-referencing transform matrix M, the relation of X and Xb
> can be written as
>
> Xb = M * X
>
> Now M is a known matrix: if your bipolar montage is referenced as F1 - F3
> for example, then F1 is 1 and F3 is -1. I guess the directions of the signs
> do not matter as long as they are consistent with other pairs, such as
> C1-C3 etc.
> After making M, you multiply M^-1 from left, you obtain
>
> X = M^-1 * Xb
>
> Thus, by multiplying the inverse matrix of the known bipolar-referencing
> transform matrix M, you obtain the original signal.
>
> What a smart solution! I'm proud of him.
>
> Makoto
>
>
> On Wed, May 10, 2017 at 1:45 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> wrote:
>
>> Dear Mubaraki,
>>
>> I've recently seen a solution (and a surprisingly simple solution) one of
>> my colleague used in SCCN. I'll ask him about it and will get back to you.
>>
>> Makoto
>>
>> On Tue, Feb 14, 2017 at 7:12 PM, Ibtissem KHOUAJA <
>> ibtissem.Khouaja at live.fr> wrote:
>>
>>>
>>> Dear Mubaraki,
>>>
>>>
>>> I think it will be not the same.
>>>
>>>
>>> The EEG, in this case, records the potential difference between two
>>> active electrodes.
>>>
>>>
>>>
>>> Yours, Ibtissem
>>>
>>>
>>>
>>> ----------------
>>> ------------------------------------------
>>> ----------------------------------------------------------
>>> PhD in computer science
>>> Speciality: Biomedical Signal Processing
>>> Laboratory: LTIM, University of Monastir, Tunisia
>>> http://www.labtim.org/accueil.php
>>> Laboratory: LIGM, Univerisity of Paris-East, France
>>> http://ligm.u-pem.fr/
>>>
>>>
>>> ------------------------------
>>> *De :* eeglablist-bounces at sccn.ucsd.edu <eeglablist-bounces at sccn.ucsd.
>>> edu> de la part de Mubaraki A.A.H. <aahm1v15 at soton.ac.uk>
>>> *Envoyé :* lundi 13 février 2017 12:06:13
>>> *À :* EEGLAB List ‎[eeglablist at sccn.ucsd.edu]‎
>>> *Objet :* [Eeglablist] convert EEG montage from bipolar to unipolar
>>>
>>> I am using data from https://physionet.org/pn6/chbmit/ for EEG research
>>> on EEGLAB. The channels here are provided in terms of a bipolar montage
>>> (ex: FP1-F7 instead of FP1). How can I convert this bipolar montage to the
>>> standard, unipolar channel data
>>> _______________________________________________
>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
>>> sd.edu
>>> For digest mode, send an email with the subject "set digest mime" to
>>> eeglablist-request at sccn.ucsd.edu
>>>
>>> _______________________________________________
>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
>>> sd.edu
>>> For digest mode, send an email with the subject "set digest mime" to
>>> eeglablist-request at sccn.ucsd.edu
>>>
>>
>>
>>
>> --
>> Makoto Miyakoshi
>> Swartz Center for Computational Neuroscience
>> Institute for Neural Computation, University of California San Diego
>>
>
>
>
> --
> Makoto Miyakoshi
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
>

--
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170525/caf45f89/attachment.html>
```