All About EEGs.

Ansh Kuckreja
17 min readJun 14, 2021

--

Electroencephalography, or EEG, is the study of electrical activity in the brain. For decades, EEG technology has been used to analyze sleep patterns, diagnose epilepsy and mental illnesses, and so much more. Over the years, EEG technology has proven to not only be effective, but also commercially viable and accessible. For this reason, you may already be familiar with EEGs, whether in the form of electrode caps or Muse™ headbands. In this article, you’ll learn what EEGs do and how they work. To do this, we need to start with the brain.

Neurons

You brain is an incredibly complex organ. It needs to be able to communicate and regulate sensory and motor information from all over your body. It’s no surprise then that the brain contains 86 billion nerve cells, called neurons. Neurons fire and communicate with each other any time you sense or think something, and they come in different sizes and structures, depending on their location within the nervous system. In general, neurons have three main components:

Dendrites: Tree-like branches where the neuron receives signals from other neurons.

Axon: Tail-like structure where the neuron relays signals from the dendrite. Axon Terminal: The end of an axon, where signals relayed by the axon are sent out of the neuron.

Soma / Cell Body: Connects the dendrite and axon, and contains the organelles of the nerve cell. These supply the neuron with nutrients and energy.

The basic components of neurons.

Synapse: The space between the axon terminal of a neuron and the cell the neuron is communicating with. This is often the dendrite of another neuron. The cell on the transmitting side of the synapse is called the presynaptic cell and the cell on the receiving side of the synapse is called the postsynaptic cell. Synapses are extremely important, not just for neural communication, but for the EEG technology as well.

The synapse between presynaptic and postsynaptic neurons.

Takeaways:

  • The brain contains 86 billion neurons that help coordinate and regulate all parts of your body.
  • Neurons consists of a dendrite, soma, and axon.
  • Synapses occur between the axon terminal of the presynaptic neuron and the dendrite of the postsynaptic neuron.

The Cortex and Pyramidal Neurons

EEGs are non-invasive, meaning they can work without breaking the skin barrier or entering the body. This means the brain activity it best measures is of the outermost part of the brain, or the cerebral cortex. The cortex is the largest part of the brain and is crucial in processing memory, thoughts, and language.

The cortex is the outermost part of the brain and is what is best measured by the EEG.

The most abundant neurons in the cortex are pyramidal neurons. These make up 2/3 of neurons in the cortex and thus play a key role in executing the cortex’s important functions.

Pyramidal neurons are named after the pyramid/teardrop-like shape of their soma. They have long apical dendrites coming out the pointed part of the soma that are oriented towards the scalp that then branch out at the skull. They also have branched basal dendrites coming out of the rounder part of the soma oriented away from the scalp. Apical means above and basal means below. This abundance of dendrites means there’s a lot of information entering the neuron.

To relay this information, pyramidal neurons have a very large axon coming out of the rounder end of the soma with the basal dendrites. This axon can be sent out long distances for communication, sometimes even out of the brain.

General structure of a pyramidal neuron.

What’s most fascinating about pyramidal neurons is their orientation. Their apical dendrites branch straight upwards, distributing them in parallel with each other. We’ll soon learn that this orientation is very important to EEG technology.

Parallel orientation of pyramidal neurons in the cortex.

Takeaways:

  • EEGs measure signals of pyramidal neurons in the cortex.
  • Pyramidal neurons have apical and basal dendrites and one long axon.
  • They’re concentrated and in parallel with each other with their apical dendrite directed towards the scalp.

Electrical Activity in the Brain

We’ve learned about pyramidal neurons and know that they’re extremely important for neural communication in the cortex. Now let’s learn about how neurons communicate with each other.

Information in the nervous system is found in the form of electrical signals. These signals are what propagate through neurons every time we think, speak, or sense something. There’s thus a lot of electrical activity happening in the brain at all times.

There are two main types of electrical activity associated with the brain, and they’re both concerned with communicating information.

1. Action Potentials

Action potentials (APs) are cycles of electrical activity that allow neurons to propel an electrical signal along its axon.

When a neuron is resting and not relaying a signal, its membrane is naturally polar — there are less positive charges on the inside of the membrane than on the outside. This leaves the inside negatively charged relative to the outside. This difference is called the resting membrane potential and is around -70 millivolts (mV). Notice it’s negative because the inside charge is 70 mV less than the outside charge.

Distribution of charges across resting neuron membrane.

When a significant stimulus (like a thought or sense) comes along, some positive charges are brought into the neuron. If the entry of these positive charges increases the membrane potential to a threshold of -55 mV, an action potential begins.

Once this threshold is reached, ions are exchanged between the inside and outside of the neuron membrane that creates a charge cycle. During this cycle, the membrane potential rises to +40 mV (when a bunch of positive ions move into the cell) and then dips back down to -85 mV (when a bunch of positive ions exit the cell) before returning to the resting potential of -70 mV. This voltage cycle takes a few milliseconds. An action potential is one of these cycles.

A simplified diagram of one action potential cycle.

When an action potential in one region of an axon is on the uptick (the potential is increasing), it causes the threshold potential (-55 mV) of the next region of the axon to be reached, so an action potential begins a little bit further along. This is how electrical signals are allowed to propagate along an axon, all the way from the soma to the axon terminals. The voltage changes that occur while the axon is relaying these signals contributes greatly to the electrical activity in the brain.

2. Postsynaptic Potentials

When the action potentials allow the electrical signal to reach the axon terminal, it needs to be communicated to the next cell — either another neuron or a different cell. For our understanding let’s say we want to relay the electrical signal at an axon terminal to the dendrite of another pyramidal neuron. We have an issue — this electrical signal can’t get across the synapse between the two neurons.

To communicate across a synapse, pyramidal neurons convert the electrical signals to chemical signals. When electrical signals arrive at the presynaptic axon terminal, they trigger the release of chemicals called neurotransmitters that float across the synapse from the presynaptic axon to bind to the postsynaptic dendrite.

Neurotransmitters travelling across a synapse.

The binding of neurotransmitters to the postsynaptic dendrite triggers certain ion movements that either allows for the message to continue relaying or stops it. The resulting changes in voltage that occur constitute the postsynaptic potential (PSP). If positive ions are brought into the postsynaptic cell, the binding triggered an excitatory postsynaptic potential (EPSP). If negative ions are brought into the postsynaptic cell, it’s called an inhibitory postsynaptic potential (IPSP). This makes sense, because we know that for an action potential to be able to relay a signal, a threshold potential of -55 mV has to be reached. So an EPSP will help a neuron get closer to the threshold so a signal can continue, while an IPSP will stop a neuron from reaching it.

In pyramidal neurons, the binding triggers the entry of positive ions into the neuron that bring the resting membrane potential of the postsynaptic dendrite up. If this EPSP increases enough that the membrane potential is brought up to the threshold of -55 mV, an action potential is triggered in the postsynaptic neuron that allows it to begin propagating a signal forward. If the EPSP isn’t enough to reach the threshold, the action potential won’t occur and the message won’t continue to be relayed unless another EPSP brings it up enough.

The changes in postsynaptic potential due to binding of neurotransmitters can also be detected by EEG technology.

EPSPs adding up to threshold to allow an action potential to start.

So What do EEGs measure?

Ok, what’s with all this potential talk? How does any of this relate to EEGs?

Well, despite both action potentials and postsynaptic potentials providing voltage changes that EEGs can measure, it’s mainly postsynaptic potentials that EEGs pick up. To measure the electrical activity of the brain non-invasively, EEG technology can only pick up electrical signals that are sufficiently strong and last sufficiently long.

For starters, postsynaptic potentials are known to last much longer than action potentials — one action potential lasts a few milliseconds, while postsynaptic potentials are present in the postsynaptic neuron for about 10–100 milliseconds. This vastly increases the chance that they’re picked up.

As well, while single action potentials are just one of many cycles propagating along an axon, they’re not spatially concentrated, meaning they don’t accumulate in one space long enough to be sufficiently detected. We’ve seen that a single action potential doesn’t do anything on its own — it takes multiple action potentials that are all along the length of an axon to have an effect. The signal doesn’t stay in one place. On the other hand, postsynaptic potentials are typically confined to the postsynaptic dendrites, meaning the voltage changes add up both spatially and temporally (with regards to space and time), making these much easier to pick up.

Furthermore, as we’ve seen, the apical dendrites of pyramidal neurons line up in parallel really nicely. This, however, is not the case for their axons. Due to the seemingly random orientation of pyramidal axons in the cortex, action potentials occurring in nearby axons rarely sync up in order for their voltage changes to be amplified. To imagine this, think about resonance. If two trumpet players play the same piece two seconds apart from each other, it sounds disjointed. If they play the piece together, it’s not only easier to decipher what is being played, but their sound will amplify and resonate because they’re in sync. The same idea applies to electrics. If action potentials in nearby axons were occurring in the same direction and at the same time, their voltages would amplify in that region and it would be much easier for the EEG to recognize them. On the contrary, due to the parallel orientation of the apical dendrites, postsynaptic potentials appear much more in sync and are easier to measure.

For all the reasons discussed, EEGs measure changes in post-synaptic potentials of pyramidal neurons in the cortex. All the graphs you see of EEG data are thus plots of voltage over time.

Takeaways:

  • The two main sources of electrical activity in the brain come from action potentials and postsynaptic potentials.
  • Action potentials are short cycles of voltage changes in axons that allow electrical signals to propagate along the axon to reach the axon terminal.
  • Postsynaptic potentials are voltage changes that arise when neurotransmitters released from the axon terminal bind to the postsynaptic dendrite.
  • For various reasons, EEGs mainly measure changes in postsynaptic potentials of pyramidal neurons in the cortex.

How EEGs Measure Postsynaptic Potentials

Now that we understand what EEGs measure, we can discuss how they do it.

Electrodes are the tools that measure electric potentials. They’re the small metal discs you typically associate with EEG caps or full-body motion suits. There are two types of electrodes that can be used in EEGs.

Wet electrodes are discs or pellets that connect with the skin via conductive gel, paste, or cream. These gels are typically saline-based and help gather more accurate data.

Dry electrodes, on the other hand, make direct contact with the skin without requiring any conductive electrode gel. These are typically much faster to apply, but are more prone to picking up skewed data compared to wet sensors. This is why wet sensors are more often used in professional settings.

Wet vs. dry electrodes.

The number of electrodes on a given EEG can vary quite a bit. The Muse™ headband series contain 4 electrodes on their headbands, while some precise research EEGs contain 256.

More electrodes typically means more information and more accurate information. If you’re researching a novel topic on which very little is known, 64 is a good number to start with. For beginners, it’s better to start off with less electrodes because more data can be overwhelming and also means more data cleaning. This is part of the reason so many beginner projects are done with commercial headbands — because scouring data from 4 electrodes is much simpler than doing so with 32+.

Electrode cap with 256 electrodes.

Typically, electrodes should be distributed evenly across the scalp, no matter what you’re researching. If you’re doing research on brain processes that major in the left frontal lobe, you shouldn’t put electrodes exclusively in the left frontal lobe. This is because while left frontal lobe activity changes may only be picked up by electrodes at that location, artefacts will be visible at all electrodes, irrespective of where they’ve been placed. We’ll discuss artefacts later, but essentially, having electrodes all over lets you understand what signals are actually desired brain changes and what is insignificant noise.

Takeaways:

  • Electrodes on the scalp measure changes in potential.
  • The number of electrodes used depends on the research being conducted.

Talking about Artefacts

As discussed, EEGs are subject to picking up a lot of irrelevant and unnecessary signals. This is because non-invasive electrodes pick up all nearby changes in potential; they don’t know they’re supposed to only take signals from the brain. These data flaws are known as data artefacts. Artefacts can be divided into 2 sections.

1) Physiological Artefacts

Physiological artefacts are artefacts arising from humans sources other than the brain. The most common physiological artefacts are eye blinks and muscle activity.

Muscle activity generates currents that can be picked up by electrodes. The closer the muscles are to the electrodes, the stronger the interference will be. For example, clenching your jaw or furring your eyebrows will interfere with EEG data far more than snapping your finger. To mitigate muscle artefacts, just try to stay as still as possible and ensure you’re in a relaxed position (jaw unclenched, muscles relaxed) when collecting data.

Eye movements also account for many physiological artefacts. This is because there are millions of neurons in the eye, so horizontal and vertical movements of the eyes will create charge imbalances that are picked up by EEGs.

When blinking, the eye naturally rolls upwards, so the effect is that of a sharp and strong eye movement. This is very easily seen in EEGs. It’s hard to not blink for the entire data collection process, so to mitigate these, a reference electrode can be placed at the eyes. We’ll discuss reference electrodes a little bit later, but in principle, having an electrode monitoring eye activity can help you differentiate brain from eye activity. Many modern EEG analysis softwares also have blink-detection because they’re such a common occurrence.

The effect of a blink on EEG data.

Non-Physiological Artefacts

Non-physiological artefacts are those that arise from non-human factors, namely from equipment or the surrounding environment.

Faulty electrodes and movements of electrodes are direct sources of noise. External electrical interference from power lines, internet, and personal devices is unavoidable — someone walking past an active EEG machine will interfere with the data a little bit. To overcome this, many professional EEGs record in rooms with walls that reject electrical interference.

Once the rooms have been shielded from electrical interference, the key to collecting clean data is reducing impedance. Impedance is a measure of electrical connection between electrodes and the scalp. It’s like resistance. The more resistance in a circuit, the harder for current to flow. The more impedance, the more unstable the connection between electrodes and the scalp. A high impedance means a low recording quality.

Dead skin cells, oily skin, and sweat all create a wall of electrical resistance between the scalp and electrodes, increasing impedance. Only when impedances are low can you know for sure that your data is reflective of brain alterations.

There are some measures that can be taken to decrease impedance. Participants should come to recording sessions with dry and brushed hair, and no hair products should be worn. This is because hair is a bad conductor, and moving dry hair out of the way is much easier than wet hair. Also, no hair clips or pins should be worn.

On top of this, many professional EEG machines monitor each electrode’s impedance so more accurate research can be conducted.

Takeaways:

  • Artefacts are interruptions or noise in data.
  • Physiological artefacts arise from human factors such as muscle contractions and eye movements.
  • Non-physiological artefacts arise from non-human factors including external electrical interference from handheld devices and faulty electrodes.

From Collection to Analysis.

You’ve got the electrodes hooked up and data is being collected, so now what? Well, there are three main post-collection processes that must occur between collection and analysis.

1. Signal Digitization

As the brain is constantly firing, there are continuous fluctuations and oscillations of the generated potentials — the brain isn’t an ‘on/off’ circuit. Due to this, the signals that the EEG collects are alternating current (AC) signals. For analysis, these analog signals need to be converted to digital signals. This process is called digitization.

There are many benefits to using digital signals, with the most important being that digital signals are more efficient, portable, and much easier to process.

Analog (AC) vs. Digital (DC) Signals

There are different ways to digitize analog signals. One of the simpler forms of digitization involves sampling and quantizing an AC signal.

Sampling is the process of taking discrete snapshots of the continuous-time data, producing discrete data over time. It’s essentially breaking up time into chunks. The sampling frequency is the average number of samples obtained per second, measured in hertz. So if you have a sampling frequency of 1000 Hz, that means you’re taking 1000 discrete snapshots of data every second, or 1 sample every millisecond.

Different systems have different sampling rates based on what they’re trying to accomplish. Experiments requiring higher time precision, like those studying the brain’s reactions to certain stimuli, would necessitate higher sampling rates (>500 Hz). Experiments more focussed on frequencies instead of time, like sleep studies, can use lower sampling rates (~128 Hz).

A sampled AC signal.

While sampling is happening, the signal is also being quantized. Quantization is the selection of discrete values for the amplitude of the signal. So while sampling is cutting time into discrete sets (x-axis), quantization is cutting the potential into discrete sets (y-axis). Once these quantization levels have been selected, the amplitudes of the AC signal at the sampled times are adjusted to the closest quantization level.

While EEG graphs may look analog, they’re just quantized with many quantization levels, so they look curved instead of levelled. For example, in the signal below, all the infinite points on the blue AC signal were adjusted to fit into the discrete quantization levels every 0.2 steps between 0.0 and 1.4. If the quantization levels were set to be every 0.01 steps, there would be far more levels and thus the quantized signal would look much less rigid.

A quantized AC signal.

Here is what a digitized signal looks like after sampling and quantization. The original AC signal is in grey and the digitized DC signal is in black.

Analog (grey) and digital (black) signal.

2. Amplification

Despite their aforementioned synchronization, the PSPs produced by the brain are relatively weak, and they are even weaker at the scalp where the electrodes are placed. Due to this, the signals must be amplified for appropriate processing and analysis.

EEG machines use a technique known as differential amplification to amplify the signals. This can be applied to either analog or digital signals. Differential amplification takes 2 voltage inputs, and then multiplies their difference by some constant to produce a higher output voltage. This multiplication constant is called the gain. The higher the gain, the more each signal difference is being amplified.

Simplified diagram of an analog differential amplifier.

To ensure all electrodes are amplified by a consistent amount, each electrode is typically amplified relative to the same reference electrode. The reference electrode is typically an electrode placed on the earlobes or the tip of the nose. Their signals aren’t directly affected by brain activity, but they’re still picking up all the external noise and signals that the rest of the electrodes are picking up. They’re crucial in determining what EEG activity is a result of brain activity and what is noise. To amplify relevant signals, all electrodes are put into a differential amplifier with the same reference electrode so that they’re being amplified the appropriate amount.

3. Forwarding

After being digitized and amplified, signals are forwarded to the machine recording. This is the connection between the signals and the computer, whether it’s via USB, bluetooth, or wirelessly. This part is pretty straightforward.

Takeaways:

  • Before it can be analyzed, collected electrode data must be amplified, digitized, and forwarded.
  • Digitization can be done by sampling and quantizing the analog potential signals.
  • Amplification is conducted by differential amplifiers with a common reference electrode used in each amplification.
  • Forwarding entails passing the information onto computer via cable wirelessly.

EEG Rhythms and Oscillations

We’ve now got our data collected and processed, so it’s ready for analysis. Here we’ll discuss a widely-analyzed property of EEG signals.

Oscillations are rhythmic or repetitive patterns of neural activity. Neurons naturally fire in these patterns, and oscillations are even visible in raw, unprocessed neural data. These oscillations are the “brain waves” you so often hear about, and provide the analog signals that need to be digitized for analysis.

Oscillatory behavior of neurons.

The frequency of a wave is the number of cycles it undergoes in a second, measured in hertz (Hz). The higher the frequency, the faster the wave is travelling faster and the more energy it has.

In EEG data, frequencies can be categorized into 5 widely-studied frequency bands. These 5 bands represent different cognitive or emotional states.

Delta Band (1–4 Hz): The slowest bands, known as slow-wave sleep bands. Generated during deep sleep, they are crucial to memory, healing, and regeneration.

Theta Band (5–8 Hz): Appear during lighter sleep and deep meditation. They represent a dreaming state where you’re drifting off to sleep.

Alpha Band (8–12 Hz): A calm, resting, present state. They indicate mental coordination, calmness, and being in the present. They also appear when your eyes are closed.

Beta Band (12–25 Hz): A normal waking, attentive state. Indicate the patient is alert, solving problems, making decisions, and focussed.

Gamma Band (25–80 Hz): The fastest bands. Role is not well known.

5 frequency bands of EEG signals.

So if someone is given a math problem to solve, it’s likely their neurons will be firing in the beta band, between 12 and 25 Hz. These frequency bands are used so often in EEG analysis, especially in beginners.

It’s important to note that these frequencies are not related the measured potentials. They’re just an indication of how slow or fast the potentials are oscillating. Potentials in the delta band are moving the slowest, but they’re not necessarily the weakest.

Takeaways:

  • Brain oscillatory frequencies can be divided into 5 categories, each indicating a different mental state.

TL;DR

  • Electroencephalography, or EEGs, is the study of electrical activity in the brain.
  • EEGs have a broad range of accessibility and applications, making them a popular and successful tool for brain studies.
  • In this article, we’ve discussed the brain’s electrical activity, pyramidal neurons, electrodes, analog data processing, artefacts, and the 5 EEG frequency bands.

--

--