Interactive fNIRS Signal Simulator: Hemodynamics, Beer-Lambert Law & BCIs | BioniChaos
Watch on YouTubeVideo summary
The video introduces an interactive functional near-infrared spectroscopy (fNIRS) signal simulator available on the BioniChaos website, a platform hosting over 200 tools for medical data visualization and brain-computer interface development. This synthetic signal generator allows users to explore how optical neuroimaging works by shining light through the skull to measure blood flow in real-time. The demonstration features a visual interface where two undulating lines represent oxygenated hemoglobin in red and deoxygenated hemoglobin in blue, illustrating the dynamic changes in cerebral blood volume as a proxy for brain activity.
The core mechanism behind the simulation is explained through the modified Beer-Lambert law, which describes how near-infrared light travels through scattering tissue like human skin and bone. When this light encounters blood, oxygenated and deoxygenated hemoglobin absorb specific wavelengths at different rates, allowing sensors to calculate blood concentration. The video highlights the concept of neurovascular coupling, where increased neural activity triggers a surge of fresh, oxygen-rich blood that registers as a rise in the red line while simultaneously washing out deoxygenated blood, causing the blue line to dip. This process naturally introduces a delay between neural firing and the vascular response, distinguishing fNIRS from direct electrical measurements like EEG.
To provide a realistic training environment for developers working with wearable BCIs, the simulator incorporates complex physiological noise such as motion artifacts and Mayer waves, which are natural blood pressure fluctuations occurring around 0.1 hertz. Users can manipulate various parameters, including toggling specific optode channel pairs to isolate different regions of the prefrontal cortex, adjusting playback speeds to better visualize vascular peaks, and even enabling hemodynamic sonification to hear the data as acoustic symphonies. These features are designed to prepare researchers for the messy reality of real-world clinical data, forcing them to confront interference that often masks subtle brain signals in actual experiments.
The video concludes by emphasizing the potential future applications of such technology, suggesting that real-time feedback loops could eventually help individuals consciously rewire their brains to manage focus, stress, or emotions. While the current demo mode offers a robust foundation for understanding fNIRS principles, the creators invite user feedback to enhance features like adding distinct cognitive tasks that match synthetic patient activity and improving the visualization of channel pairs. By bridging the gap between theoretical physics and practical application, this tool serves as an essential educational resource for anyone interested in the field of optical neuroimaging and brain-computer interfaces.
Read the full video transcript
Yeah, we're going to be reviewing this
new tool.
It's uh
fNIRS simulation
functional near-infrared spectroscopy.
It's a synthetic signal generator,
essentially.
Everything we do is available on body
kills.com. Go check out the website.
There's more than 200 tools,
spectrograms,
generators,
and data processing, signal processing,
and medical data viewers,
BCI brain computer interfaces,
simulators,
EMG hand simulation tool.
Some fun things as well, like drawing,
uh music generator. Check it
out as well.
So, it's currently playing, so you can
just do the drawing, it will turn it
into
into music.
So, you can play
multiple streams at the same time.
Change your
major minor scale.
Yes, you get
I think you get the picture. Let me know
if you tried it out, if it's any if it's
useful for you or not. Actually, have
another one if you're already on it.
This is more of a possible to get in a
double touch on
on a touch screen.
>> Yes, it's full a full-fledged musical
instrument cuz you can
change your harmonic keys.
Yes, you go check it out as well.
But currently we'll focus
on this F knees simulator.
I will put it in full screen. Yes,
there's a description at the bottom of
the page.
I'll put it in full screen.
So, you can play with yourself. And this
demo mode will actually play a
demonstration as well, like a visual. It
actually show what the controller is
doing and what this simulation tool is
capable of.
And we have this overview by
a notebook.
It's not notebook 11 anymore. I don't
know what it's called.
A Gemini notebook.
Yes, so we'll listen to it while
the the page itself will be in demo mode
changing parameters and things so you
can see
how to use it and what you can do with
it.
>> If you break your arm, an X-ray gives
you like a jagged white line.
It says structural, binary, and honestly
comforting because we can clearly see
the hardware.
>> It's very straightforward.
>> Yeah, but today we're looking at the
software. We are looking at a way to
literally watch the brain think
in real time just by shining a beam of
light through the skull.
Welcome to this deep dive.
>> It's such an amazing concept.
>> is. Today we're exploring the
interactive simulation tool over at
bionikaios.com
pronounced bionic chaos. Our mission is
to act as your audio guide to this
optical neuroimaging simulator.
>> Exactly.
>> So, if you're running the application's
automated demo mode right now, just sit
back and watch the canvas as we decode
what you are actually seeing.
>> And it's an incredibly detailed model
you're looking at. On that main canvas,
the most prominent features are, well,
those two moving lines undulating across
the screen.
>> and blue ones.
>> Yeah, exactly. The red line represents
oxygenated hemoglobin, and the blue line
is for deoxygenated hemoglobin.
>> I know this is simulating fNIRS, or
functional near-infrared spectroscopy,
but before we get into the specific
controls on the dashboard, how does
shining a light at a head give us, you
know, two distinct measurements of
blood?
>> So, it all comes down to the modified
Beer-Lambert law.
>> Okay.
>> This law describes how light travels
through a scattering medium like human
tissue.
So, near-infrared light actually passes
safely through the scalp and skull.
>> Just right through the bone?
>> Yeah, right through. But, the crucial
part is what happens when it hits your
blood. Oxygenated and deoxygenated
hemoglobin actually absorb different
wavelengths of near-infrared light at
different rates.
>> Oh, wow.
>> So, by measuring the specific light that
bounces back to the sensors, the tool
calculates exactly how much fresh blood
is present in that area.
>> Let me make sure I have this mechanism
right. It's almost like a microscopic
traffic report.
>> That is a really good way to put it,
yeah.
>> Like a region of the cortex works hard,
demands energy, and then triggers a
massive delivery of fresh oxygen-rich
blood, right? And that surge registers
as our red line.
Then that rush of fresh blood physically
washes away the old deoxygenated
traffic, which causes the blue line to
dip.
>> You nailed it. That dynamic is called
neurovascular coupling.
>> Neurovascular coupling?
>> Yeah. It as the physiological signature
of actual cognitive effort. It basically
separates true brain activity from just
like random physiological noise.
>> Wait, if we are measuring blood flow,
isn't there a delay? I mean, blood
doesn't move at the speed of an
electrical thought.
>> Good catch. Yeah, there is.
The vascular response actually peaks a
few seconds after the initial neural
firing.
>> Makes sense.
>> So, it's a proxy for brain activity
rather than a direct electrical
measurement, but it provides highly
localized and really reliable spatial
data.
>> Okay, that makes total sense. And as the
demo mode runs for you all listening,
you'll notice it interacting with the
control panel on the right. You can
actually manipulate the entire 300
second session.
>> Yeah, like toggling specific optode
channel pairs to isolate different
physical source detector geometries on
the head.
>> Which is super cool. Like, when it
selects pairs like FP1-F3 and FP2-F4,
it's actually isolating the left and
right sides of the prefrontal cortex.
>> Exactly. And the vital takeaway on the
canvas there is the resulting bilateral
symmetry.
>> Right. You see the blood flow for both
regions moving in tandem.
>> Yeah, proving that both hemispheres are
teaming up to handle the mental
workload.
>> You can also speed up the playback, too.
>> Right, absolutely. Scrubbing through it
two or five times speed makes those
vascular peaks much easier to spot
visually.
>> Totally.
Another layer to this is the hemodynamic
sonification toggle.
When you turn the audio on, the web tool
translates the subtle amplitudes of the
red oxygenated blood flow into pitch
shifts.
>> Yeah, shifting between 100 and 800
hertz, it literally turns the vascular
data into a real-time acoustic symphony.
>> It sounds wild.
>> It really does. But, it's important to
clarify that this entire setup isn't
just, you know, a clever visualization
trick. The synthetic data engine driving
this simulation is actually modeling
real-world interference.
>> Interference like, uh, motion artifacts
from someone just moving their head
around.
>> Sometimes, yeah, but also much deeper
physiological noise. The simulation
specifically includes Mayer waves.
>> Wait, Mayer waves?
>> Yeah, they are natural systemic blood
pressure fluctuations that occur around
0.1 hertz.
>> Oh, wow. So, it's that detailed.
>> Very. In real clinical data, Mayer waves
can easily mask the subtle brain signals
you're actually trying to extract. So,
this tool forces researchers to confront
that messy reality.
>> So, it's like a training ground.
>> Exactly. It's designed to prep
developers for the Bionic Cloud SDK
where they'll be tasked with integrating
real wearable brain computer interfaces.
>> So, you train here on the simulator to
prepare for the live noisy data coming
from actual human heads. That is
incredible.
>> It is a massive step for developers, for
sure.
>> It really is. And that brings up a
larger implication for you to consider
as you watch those red and blue waves
roll by. If a simple web application can
map the hidden blood flow of our
cognitive effort and translate it into
visible charts and audible tones, how
long until we use these exact real-time
feedback loops to consciously rewire how
our own brains process focus, stress, or
even joy?
>> Okay, so that was a noble lamb. Good
over stay.
Improve that demo mode. It should have
showcased more things.
Like adding different and removing up to
channel pairs.
Uh scrolling fast and slow.
So, we have oxygenation, deoxygenation
and deoxygenation. You can
choose which one you want to see.
Yeah, that's pretty much keep it keep it
simple like like that.
And do let me know if you tried it. If
you have any questions, comments,
anything we can improve, do let me know.
Could perhaps simulate a real task
of actually do like a cognitive task.
So, it matches
the activity of brain in brain. The
blood oxygen oxygenation deoxygenation
is actually matches the
the cognitive task uh
synthetic patient is doing.
Yes, you can check this tool on the
bodycal.com/fNIRS.
Check out all the other tools we have.
And I'll see you next time.