Almost all neurofeedback uses simple IIR filters, typically Butterworth with say 3, 4, or 5th order. The delay is reasonable, only a couple hundred milliseconds.
There are many DSP tutorials on the web, some geared to Python scipy, etc.
The reason you were seeing huge delays was your FIR filter with 100+ taps. That is just not something that is generally done.
All Butterworth bandpass filters will have different "rolloff" bandpass skirts, depending on the order of the filter. Higher order gives you sharper edges on the bandpass. Another strategy you can use is just two successive filters, a highpass at say .5 hz, then a notch at 50 hz. In that case you do not need a bandpass filter.
Do you understand the way the SRB2 bus works? It connects in common all the IN1P, IN2P, IN3P, etc. pins as the reference. Then all the IN1N, IN2N, IN3N pins are your channels. So yes, P is positive, N is negative, of the differential amplifier. It's not "upside down".
There is nothing wrong with your waveform, you just need to invert it. The 'bottom' or 'closest to board' row of pins are the IN*N pins. The bottom SRB is SRB2. 'Top' row of pins are IN*P pins. Top SRB is SRB1. See TI data sheet if you want more specifics. You should never use AGND as 'Ground', that is the function of Bias.
Please re-read what I said on the last post. Your waveform is explained by the fact that SRB2 is a bus for the positive pins / electrodes. And IN*N pins are negative pins.
But I'm not familiar with electrical engineering, I couldn't read the circuit.
Let me confirm the function of ADS1299.
I read 9.3.1.2 Analog Input and 10.2.2 Detailed Design Procedure of the data sheet.
ADS1299 is the fully differential amplifier.
There are two montages; one is a sequential montage and another is a referential montage.
When I want to use the sequential montage, I should use SRB2(bottom).
When I want to use the referential montage, I should use SRB1(top).
In the sequential montage, I should connect the left ear clip to SRB2, and the right ear clip to BIAS2.
In this montage, each channel represents the voltage difference between IN*P and IN*N ( IN1P-IN1N, IN2P-IN2N, ... )( Figure 72 ).
In the referential montage, I should connect the left ear clip to SRB1, and the right ear clip to BIAS1.
In this montage, I should connect the electrode to IN*P only( Figure 73 ).
The above is my understanding. Please point out if I misunderstood.
Then, what I want to do is to measure the voltage of one electrode ( in this case, Fz ).
The below is what I tried. Tell me what is the best way.
Firstly, I tried to the referential montage. I connected
- the left ear clip to SRB1,
- the right ear clip to BIAS1, and
- Fz to IN1P.
But the voltage of Fz was displayed as RAILED when I used OpenBCI_GUI.
Secondly, I tried to the sequential montage while I wanted to the voltage not inverted, I connected
- the left ear clip to SRB2,
- the right ear clip to BIAS2, and
- Fz to IN1P.
Again, the voltage of Fz was displayed as RAILED.
Thirdly, I added the P7 electrode and connected it to IN1N.
- the left ear clip to SRB2,
- the right ear clip to BIAS2,
- Fz to IN1P, and
- P7 to IN1N.
Then, the voltage of Fz is displayed as expected, and I think the measured voltage is Fz - P7.
The third configuration might work for me, but I have several questions.
- Why the first configuration does not work?
- Why the second configuration does not work?
- If the second configuration doesn't work, why it works when I connect Fz to IN1N, not IN1P? I can't understand the difference between (none - IN1N) and (IN1P - none). I think they are the same except the polarity.
- Why it does work when I connect the electrode only IN*N in the sequential montage? It requires at least two electrodes to measure the difference between them.
- I don't want to use P7 if possible since the noise from P7 is contaminated. Then, the best way is, to use the sequential montage(SRB2) and connect Fz to IN1N and invert the voltage?
Whew. Please don't make this more complicated that you need. I suggest just using the default Cyton electrode setup as documented in the tutorials. And the same one you have been using: SRB2 is your reference, IN*N (bottom row) pins are your channels, Bias is your ground. That will give you AN INVERTED ERP signal, because your channels are on the negative side of the differential amplifier, and the references are all on the positive side of the differential amplifier.
Please don't use SRB1 or the top row of pins. Your montage is referential (common reference on SRB2) and not sequential nor per channel differential.
Comments