Odd frequency spikes

edited November 2024 in Cyton

Hi
I've been using my Cyton board as part of a home sleep lab for several months now. My data usually looks like this, pre-filtering:

So a couple of frequency spikes at 50 and 100Hz due to power lines, which are easily removed with a bandstop at 30Hz. I have months of graphs that look like this.
However, ever since a few nights ago (it started on the 20th), my pre-filter data looks like this (4 nights shown):



Note the new evenly spaced frequency spikes, which look like they're harmonics or something of the power spikes. These would be trickier to filter out as two of them are in the 0.1-30Hz range I'm interested in for sleep. Yes I could notch filter - but it may be a little destructive, and I'd prefer to try and find and eliminate the root cause first.
(That last image, with the much worse data, is when I tried plugging the dongle directly into a laptop without the usual USB extension cable. So can see the big difference that makes in data quality.)

I've tried a few things over the last few nights:

  • Changed to fresh gold cup electrodes (my old set are getting a bit worn).
  • Capturing on two different machines, in different room corners.
  • With and without a USB extension cable.
  • Two different Cyton boards.

So the only things that have remained constant are my capture code, and the dongle.

I can't think of anything that changed on the 20th - the batteries died during that night, is all, as I'd forgotten to charge them.
Any thoughts?

Comments

  • ... and as standard, manage to figure it out a few minutes after posting asking for help. (But I'll leave it up, in case it helps someone else)

    I realised what changed: it's got cold in the UK, and we've started using a heated electric blanket overnight. Even with the recording machine quite far from the bed (the last image), it's still enough to substantially affect the recordings.

  • wjcroftwjcroft Mount Shasta, CA

    re: "So a couple of frequency spikes at 50 and 100Hz due to power lines, which are easily removed with a bandstop at 30Hz."

    Hmm, your graphs show power line harmonics at 50 Hz multiples. And your mains frequency is 50 Hz. So that is where you want your bandstop / notch filter set.

  • Hi @wjcroft. I filter at this low level in line with the AASM recommendations for sleep scoring, and also because YASA is going to do the same anyway.

    (And also now I've seen how bad the data is when the dongle is plugged directly into the laptop rather than on its usual USB extension cable, I realise that when I was setting all this filtering up I was wrestling with that. A bandstop at 30 Hz gets rid of most of that junk. My actual night recordings are on the extension cable, are much cleaner, and yes could be bandstopped at a higher threshold.)

    I'm currently looking at a few options in parallel. Help with any or all would be appreciated! These are largely new areas to me.
    1. Whether I can add some sort of EMF shielding around the Cyton, that will allow the 2.4Ghz Bluetooth signal (I've given up on SD cards..) but remove very low frequencies.
    2. On similar lines, see if there's a full EMF shielding layer I can place on top of the electric blanket.
    3. See if I can physically position the Cyton further away from the EMF source.
    4. Notch filtering (though it seems quite destructive to the signal).

  • wjcroftwjcroft Mount Shasta, CA
    edited November 2024

    Hi,

    Here are the types of DSP filters: bandpass (specifying a range), low pass, high pass, bandstop (or notch). You apparently have a bandpass from say .4 Hz to 30 Hz. DSP filters also have a 'type' such as Butterworth or Bessel, etc. And an 'order' (or 'poles'), which, when higher have sharper bandwidth edges and more rejection outside the bandpass.

    Your graphs are clearly showing heavy mains frequency contamination, with harmonics and sub harmonics. The normal and recommended way to remove these is with BOTH (additive) a bandpass (say .5 Hz to 45 Hz) AND a specific notch filter at the mains frequency. This is what the GUI does and MANY other applications. I do not get your reference that a mains notch is 'destructive'. This practice is widely used in EEG.

    re: AC electric blanket. These are notorious for their mains fields. There are also DC electric blankets. Such as this model:

    https://www.amazon.com/gp/product/B00ZHMUVEG/
    "Beautyrest Heated Electric Blanket for Cold Weather, Fast Heating Heated Blanket, Auto Shut Off, Virtually Zero EMF"

    So I would highly recommend you ditch your noisy blanket. That may be sufficient, though the notch is standard procedure.

    Regards, William

  • wjcroftwjcroft Mount Shasta, CA

    This is a good overview article.

    https://www.sciencedirect.com/science/article/pii/S0896627319301746
    "[Primer] Filters: When, Why, and How (Not) to Use Them"

    Regarding 'shielding'. Mains EMF electromagnetic field interference, cannot be effectively shielded in EEG applications. The only recourse is to get away from the field source. Field strength drops off rapidly after about 3 feet distance. With your blanket, the EMF is very near the electrodes. So moving the Cyton mainboard (or 'shielding' it) will not address this.

  • wjcroftwjcroft Mount Shasta, CA

    https://www.google.com/search?q=android+app+measure+emf+radiation

    These require a phone that has a built-in magnetometer (compass) chip. Many mid-range phones have it. Same are available for iPhone. There are also non-phone EMF meters.

    https://www.google.com/search?q=low+cost+emf+meter

  • I forgot to update here: I found that the electric blanket only chucks out loads of EMF radiation when it's in a mid setting. At off or full on, it's fine (no frequency spikes). So I have it on full blast to warm up, and then off overnight.

    @wjcroft thank you for the links. I looked for a zero-EMF electric blanket here in the UK but couldn't find one. I use the Cyton itself as an EMF detector, using a real-time power spectral density graph.

    Your graphs are clearly showing heavy mains frequency contamination, with harmonics and sub harmonics. The normal and recommended way to remove these is with BOTH (additive) a bandpass (say .5 Hz to 45 Hz) AND a specific notch filter at the mains frequency. This is what the GUI does and MANY other applications. I do not get your reference that a mains notch is 'destructive'. This practice is widely used in EEG.

    Yes, I use both, bandpass filtering at 0.3 to 35 (in line with AASM recommendation), and notch at 50 + 100. When I said that a notch filter would be destructive, I was speaking too broadly: I meant that I would prefer instead to eliminate the source of the non-mains frequencies spikes (which I've been able to). It's those that were destructive to the data, rather than the filters.

  • I have an unrelated (I think) question about low-frequency noise, which I'll post separately.

Sign In or Register to comment.