Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Close
From: Bethel Osuagwu <b.1@re...>  20120814 15:37:22

Dear Sir, I just realized that there's no simulink block in rtsBCI for calculating the Time Domain Parameter(TDP) Features implemented in Biosig. This TDP were used in 'demo2.m' of Biosig for demonstration. I tried reading the tdp() function so that I can implement the simulink block but I could not understand some part of the function when it takes multiple derivatives. Any help for implementing this TDP as a simulink block will be most appreciated. Thanks Bethel. 
From: Alois Schloegl <alois.schloegl@is...>  20120816 08:07:09

Dear Bethel, the rtsBCI simulink implements currently only the time domain parameters of Hjorth and Barlow. Implementing tdp.m in simulink is quite simple. you just need to connect 1st order difference blocks in a sequential manner (output of pth difference block is the input of the next differential block). Then connect the output of each block, take the square, do a lowpass filter, and take the logarithm. I'll forward your request also Reinhold, the maintainer of rtsBCI. I hope this helps, Alois On 08/14/12 17:12, Bethel Osuagwu wrote: > Dear Sir, > > I just realized that there's no simulink block in rtsBCI for > calculating the Time Domain Parameter(TDP) Features implemented in > Biosig. This TDP were used in 'demo2.m' of Biosig for demonstration. > I tried reading the tdp() function so that I can implement the > simulink block but I could not understand some part of the function > when it takes multiple derivatives. Any help for implementing this > TDP as a simulink block will be most appreciated. > > Thanks Bethel. >  > > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions will include endpoint security, mobile security and the > latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ Biosiggeneral > mailing list Biosiggeneral@... > https://lists.sourceforge.net/lists/listinfo/biosiggeneral 
From: Bethel Osuagwu <b.1@re...>  20120816 16:59:46

Dear Alois, Thank you very much for your reply. I will try to implement what you described. But what I am having problem with is the line in tdp() thus: filter(B,A,d.^2)./filter(B,A,double(~isnan(d0))) where UC =0.0085; //for example B = UC; A = [1, UC1]; and d=d0 is the pth derivative The line with the filter is the line confusing me due to the division because I do not know much about filters for now. But from your description, the line is low pass filtering. So will I achieve what this line is doing if I implement a simulink filter using only 'A' and 'B' (i.e doing only filter(B,A,d.^2))or do I need to divide by an output of another filter as in ./filter(B,A,double(~isnan(d0))) ? Thank you again for you time Bethel ________________________________________ From: Alois Schloegl [alois.schloegl@...] Sent: 16 August 2012 09:06 To: Bethel Osuagwu Cc: ; Reinhold Scherer Subject: Re: [Biosiggeneral] The Time domain parameters Dear Bethel, the rtsBCI simulink implements currently only the time domain parameters of Hjorth and Barlow. Implementing tdp.m in simulink is quite simple. you just need to connect 1st order difference blocks in a sequential manner (output of pth difference block is the input of the next differential block). Then connect the output of each block, take the square, do a lowpass filter, and take the logarithm. I'll forward your request also Reinhold, the maintainer of rtsBCI. I hope this helps, Alois On 08/14/12 17:12, Bethel Osuagwu wrote: > Dear Sir, > > I just realized that there's no simulink block in rtsBCI for > calculating the Time Domain Parameter(TDP) Features implemented in > Biosig. This TDP were used in 'demo2.m' of Biosig for demonstration. > I tried reading the tdp() function so that I can implement the > simulink block but I could not understand some part of the function > when it takes multiple derivatives. Any help for implementing this > TDP as a simulink block will be most appreciated. > > Thanks Bethel. >  > > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions will include endpoint security, mobile security and the > latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ Biosiggeneral > mailing list Biosiggeneral@... > https://lists.sourceforge.net/lists/listinfo/biosiggeneral 
From: Alois Schloegl <alois.schloegl@is...>  20120817 22:16:48

On 20120816 18:59, Bethel Osuagwu wrote: > Dear Alois, > > Thank you very much for your reply. I will try to implement what you > described. But what I am having problem with is the line in tdp() > thus: > > filter(B,A,d.^2)./filter(B,A,double(~isnan(d0))) where UC =0.0085; > //for example B = UC; A = [1, UC1]; and d=d0 is the pth > derivative > > The line with the filter is the line confusing me due to the division > because I do not know much about filters for now. But from your > description, the line is low pass filtering. So will I achieve what > this line is doing if I implement a simulink filter using only 'A' > and 'B' (i.e doing only filter(B,A,d.^2)) That should to it, except when your data contains missing values encoded as NaN's. or do I need to divide by an > output of another filter as in ./filter(B,A,double(~isnan(d0))) > ? This part is only needed when your data can contain missing values encoded as NaN's. In that case, then NaN's in d need to be replaced by 0 and the denominated need to account for the fact, that some samples have been ignored. Alois > > Thank you again for you time Bethel > > ________________________________________ From: Alois Schloegl > [alois.schloegl@...] Sent: 16 August 2012 09:06 To: Bethel > Osuagwu Cc: ; Reinhold Scherer Subject: Re: [Biosiggeneral] The Time > domain parameters > > Dear Bethel, > > > the rtsBCI simulink implements currently only the time domain > parameters of Hjorth and Barlow. Implementing tdp.m in simulink is > quite simple. you just need to connect 1st order difference blocks in > a sequential manner (output of pth difference block is the input of > the next differential block). Then connect the output of each block, > take the square, do a lowpass filter, and take the logarithm. > > I'll forward your request also Reinhold, the maintainer of rtsBCI. > > > I hope this helps, Alois > > > > > > > On 08/14/12 17:12, Bethel Osuagwu wrote: >> Dear Sir, >> >> I just realized that there's no simulink block in rtsBCI for >> calculating the Time Domain Parameter(TDP) Features implemented in >> Biosig. This TDP were used in 'demo2.m' of Biosig for >> demonstration. I tried reading the tdp() function so that I can >> implement the simulink block but I could not understand some part >> of the function when it takes multiple derivatives. Any help for >> implementing this TDP as a simulink block will be most >> appreciated. >> >> Thanks Bethel. >>  >> >> > >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions will include endpoint security, mobile security and >> the latest in malware threats. >> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ Biosiggeneral >> mailing list Biosiggeneral@... >> https://lists.sourceforge.net/lists/listinfo/biosiggeneral > 
From: Bethel Osuagwu <b.1@re...>  20120818 05:22:35

Dear Alois, Thank you very much. Bethel ________________________________________ From: Alois Schloegl [alois.schloegl@...] Sent: 17 August 2012 23:18 To: Bethel Osuagwu Cc: biosiggeneral@... Subject: Re: [Biosiggeneral] The Time domain parameters On 20120816 18:59, Bethel Osuagwu wrote: > Dear Alois, > > Thank you very much for your reply. I will try to implement what you > described. But what I am having problem with is the line in tdp() > thus: > > filter(B,A,d.^2)./filter(B,A,double(~isnan(d0))) where UC =0.0085; > //for example B = UC; A = [1, UC1]; and d=d0 is the pth > derivative > > The line with the filter is the line confusing me due to the division > because I do not know much about filters for now. But from your > description, the line is low pass filtering. So will I achieve what > this line is doing if I implement a simulink filter using only 'A' > and 'B' (i.e doing only filter(B,A,d.^2)) That should to it, except when your data contains missing values encoded as NaN's. or do I need to divide by an > output of another filter as in ./filter(B,A,double(~isnan(d0))) > ? This part is only needed when your data can contain missing values encoded as NaN's. In that case, then NaN's in d need to be replaced by 0 and the denominated need to account for the fact, that some samples have been ignored. Alois > > Thank you again for you time Bethel > > ________________________________________ From: Alois Schloegl > [alois.schloegl@...] Sent: 16 August 2012 09:06 To: Bethel > Osuagwu Cc: ; Reinhold Scherer Subject: Re: [Biosiggeneral] The Time > domain parameters > > Dear Bethel, > > > the rtsBCI simulink implements currently only the time domain > parameters of Hjorth and Barlow. Implementing tdp.m in simulink is > quite simple. you just need to connect 1st order difference blocks in > a sequential manner (output of pth difference block is the input of > the next differential block). Then connect the output of each block, > take the square, do a lowpass filter, and take the logarithm. > > I'll forward your request also Reinhold, the maintainer of rtsBCI. > > > I hope this helps, Alois > > > > > > > On 08/14/12 17:12, Bethel Osuagwu wrote: >> Dear Sir, >> >> I just realized that there's no simulink block in rtsBCI for >> calculating the Time Domain Parameter(TDP) Features implemented in >> Biosig. This TDP were used in 'demo2.m' of Biosig for >> demonstration. I tried reading the tdp() function so that I can >> implement the simulink block but I could not understand some part >> of the function when it takes multiple derivatives. Any help for >> implementing this TDP as a simulink block will be most >> appreciated. >> >> Thanks Bethel. >>  >> >> > >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions will include endpoint security, mobile security and >> the latest in malware threats. >> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ Biosiggeneral >> mailing list Biosiggeneral@... >> https://lists.sourceforge.net/lists/listinfo/biosiggeneral > 
From: Bethel Osuagwu <b.1@re...>  20120827 10:37:07

Dear Alois, Thank you very much for your help. I have modified the Biosig function tdp() in order to have it give the same result with simulink inplementation. I noticed that I could not work with NaN in Simulink and therfore all my first order difference blocks have initial values of zeroes instead of NaNs as it is in the tdp() function. So I made the following changes in the tdp() function: 1: After using the diff() function, add a leading row of zeroes instaed of a leading row of NaN. ie this line: d = diff([repmat(NaN,[1,K]);d],[],1); was changed to d = diff([repmat(0,[1,K]);d],[],1); 2: The line F = log(filter(B,A,d.^2)./filter(B,A,double(~isnan(d0)))); and the kind was changed to F = log(filter(B,A,d.^2)); With these changes in place, I could test that the tdp() function and its simulink inplementation outputs the same values. My question here is, is there any thing fundamentaly wrong with what I have done? If it is wrong, I would like to go back and replace those changes and find another way to make the simulink implementation give the same values as the original tdp(). By the way in one of your papers, you showed that tdp performed better than bandpower, also in our preliminary experiment, tdp also performed better in an offline classification using Biosig. My question is, is there any known reason why we cannot implement a good online BCI using tdp? I am actully asking because I am just wondering why bandpower is still more popular than tdp. Thank you. Bethel ________________________________________ From: Alois Schloegl [alois.schloegl@...] Sent: 17 August 2012 23:18 To: Bethel Osuagwu Cc: biosiggeneral@... Subject: Re: [Biosiggeneral] The Time domain parameters On 20120816 18:59, Bethel Osuagwu wrote: > Dear Alois, > > Thank you very much for your reply. I will try to implement what you > described. But what I am having problem with is the line in tdp() > thus: > > filter(B,A,d.^2)./filter(B,A,double(~isnan(d0))) where UC =0.0085; > //for example B = UC; A = [1, UC1]; and d=d0 is the pth > derivative > > The line with the filter is the line confusing me due to the division > because I do not know much about filters for now. But from your > description, the line is low pass filtering. So will I achieve what > this line is doing if I implement a simulink filter using only 'A' > and 'B' (i.e doing only filter(B,A,d.^2)) That should to it, except when your data contains missing values encoded as NaN's. or do I need to divide by an > output of another filter as in ./filter(B,A,double(~isnan(d0))) > ? This part is only needed when your data can contain missing values encoded as NaN's. In that case, then NaN's in d need to be replaced by 0 and the denominated need to account for the fact, that some samples have been ignored. Alois > > Thank you again for you time Bethel > > ________________________________________ From: Alois Schloegl > [alois.schloegl@...] Sent: 16 August 2012 09:06 To: Bethel > Osuagwu Cc: ; Reinhold Scherer Subject: Re: [Biosiggeneral] The Time > domain parameters > > Dear Bethel, > > > the rtsBCI simulink implements currently only the time domain > parameters of Hjorth and Barlow. Implementing tdp.m in simulink is > quite simple. you just need to connect 1st order difference blocks in > a sequential manner (output of pth difference block is the input of > the next differential block). Then connect the output of each block, > take the square, do a lowpass filter, and take the logarithm. > > I'll forward your request also Reinhold, the maintainer of rtsBCI. > > > I hope this helps, Alois > > > > > > > On 08/14/12 17:12, Bethel Osuagwu wrote: >> Dear Sir, >> >> I just realized that there's no simulink block in rtsBCI for >> calculating the Time Domain Parameter(TDP) Features implemented in >> Biosig. This TDP were used in 'demo2.m' of Biosig for >> demonstration. I tried reading the tdp() function so that I can >> implement the simulink block but I could not understand some part >> of the function when it takes multiple derivatives. Any help for >> implementing this TDP as a simulink block will be most >> appreciated. >> >> Thanks Bethel. >>  >> >> > >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions will include endpoint security, mobile security and >> the latest in malware threats. >> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ Biosiggeneral >> mailing list Biosiggeneral@... >> https://lists.sourceforge.net/lists/listinfo/biosiggeneral > 
From: Alois Schloegl <alois.schloegl@is...>  20120827 14:05:48

On 08/27/12 12:36, Bethel Osuagwu wrote: > Dear Alois, > > Thank you very much for your help. > > I have modified the Biosig function tdp() in order to have it give > the same result with simulink inplementation. I noticed that I could > not work with NaN in Simulink and therfore all my first order > difference blocks have initial values of zeroes instead of NaNs as > it is in the tdp() function. So I made the following changes in the > tdp() function: 1: After using the diff() function, add a leading > row of zeroes instaed of a leading row of NaN. ie this line: d = > diff([repmat(NaN,[1,K]);d],[],1); was changed to d = > diff([repmat(0,[1,K]);d],[],1); > > 2: The line F = > log(filter(B,A,d.^2)./filter(B,A,double(~isnan(d0)))); and the kind > was changed to F = log(filter(B,A,d.^2)); > > With these changes in place, I could test that the tdp() function and > its simulink inplementation outputs the same values. My question > here is, is there any thing fundamentaly wrong with what I have done? > If it is wrong, I would like to go back and replace those changes > and find another way to make the simulink implementation give the > same values as the original tdp(). > Dear Bethel, I do not see any thing wrong here. > > By the way in one of your papers, you showed that tdp performed > better than bandpower, also in our preliminary experiment, tdp also > performed better in an offline classification using Biosig. My > question is, is there any known reason why we cannot implement a good > online BCI using tdp? I do not see any reason why this could not be done. Actually, it was developed for online BCI usage. I am actully asking because I am just wondering > why bandpower is still more popular than tdp. I see the following two reasons: 1) Bandpass filtering can have advantages when noneeg noise sources (like 1/f noise caused by amplifier provide large noise in the very low frequency range, or oversampling results in large spectral areas in the upper frequency range) contribute significantly to the total power. Therefore, the low frequency filter should not be too low (0.5 Hz or larger), and the sampling rate should not be to high. This implies also that antialiasing filter is set accordingly. This might explain way TDP or AAR does not perform well in some cases. 2) There is a long tradition in eeg analysis in bandbased spectral analysis. There is certainly some reluctance to replace this concept. The question that arises is are always what is the meaning of a high or low value of tdp(i) ? Spectral parameters have been used to quantify and characterize the EEG in huge number of research questions, and many scholares have associations with the meaning of large or small alpha activity. This is not the case for parameters like TDP or AAR. So part of the explanation is the inertia of eeg community. Of course, most of the past spectral analysis has been done by averaging multiple repeations. This is very different to online analysis were single trial analysis (i.e. without averaging) has to be done. There concept of some fixed frequency band becomes very dubious (see principle of uncertainty between time and frequency analysis). There are also studies that show shifts in the center frequency of some components, these can not be adequately captured by looking at the power of fixed frequency bands. Therefore I see a lot of reasons for going beyond bandpower analysis. Alois > > Thank you. Bethel > > ________________________________________ From: Alois Schloegl > [alois.schloegl@...] Sent: 17 August 2012 23:18 To: Bethel > Osuagwu Cc: biosiggeneral@... Subject: Re: > [Biosiggeneral] The Time domain parameters > > On 20120816 18:59, Bethel Osuagwu wrote: >> Dear Alois, >> >> Thank you very much for your reply. I will try to implement what >> you described. But what I am having problem with is the line in >> tdp() thus: >> >> filter(B,A,d.^2)./filter(B,A,double(~isnan(d0))) where UC =0.0085; >> //for example B = UC; A = [1, UC1]; and d=d0 is the pth >> derivative >> >> The line with the filter is the line confusing me due to the >> division because I do not know much about filters for now. But from >> your description, the line is low pass filtering. So will I achieve >> what this line is doing if I implement a simulink filter using only >> 'A' and 'B' (i.e doing only filter(B,A,d.^2)) > > That should to it, except when your data contains missing values > encoded as NaN's. > > or do I need to divide by an >> output of another filter as in ./filter(B,A,double(~isnan(d0))) ? > > This part is only needed when your data can contain missing values > encoded as NaN's. > > In that case, then NaN's in d need to be replaced by 0 and the > denominated need to account for the fact, that some samples have > been ignored. > > Alois > > >> >> Thank you again for you time Bethel >> >> ________________________________________ From: Alois Schloegl >> [alois.schloegl@...] Sent: 16 August 2012 09:06 To: Bethel >> Osuagwu Cc: ; Reinhold Scherer Subject: Re: [Biosiggeneral] The >> Time domain parameters >> >> Dear Bethel, >> >> >> the rtsBCI simulink implements currently only the time domain >> parameters of Hjorth and Barlow. Implementing tdp.m in simulink is >> quite simple. you just need to connect 1st order difference blocks >> in a sequential manner (output of pth difference block is the >> input of the next differential block). Then connect the output of >> each block, take the square, do a lowpass filter, and take the >> logarithm. >> >> I'll forward your request also Reinhold, the maintainer of rtsBCI. >> >> >> I hope this helps, Alois >> >> >> >> >> >> >> On 08/14/12 17:12, Bethel Osuagwu wrote: >>> Dear Sir, >>> >>> I just realized that there's no simulink block in rtsBCI for >>> calculating the Time Domain Parameter(TDP) Features implemented >>> in Biosig. This TDP were used in 'demo2.m' of Biosig for >>> demonstration. I tried reading the tdp() function so that I can >>> implement the simulink block but I could not understand some >>> part of the function when it takes multiple derivatives. Any help >>> for implementing this TDP as a simulink block will be most >>> appreciated. >>> >>> Thanks Bethel. >>>  >>> >>> >> >>> > >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security >>> and threat landscape has changed and how IT managers can >>> respond. Discussions will include endpoint security, mobile >>> security and the latest in malware threats. >>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ Biosiggeneral >>> mailing list Biosiggeneral@... >>> https://lists.sourceforge.net/lists/listinfo/biosiggeneral >> 
From: Bethel Osuagwu <b.1@re...>  20120828 13:11:45

Dear Alois, I am so grateful for your extensive answer to my question. Thank you very much. Bethel. ________________________________________ From: Bethel Osuagwu Sent: 27 August 2012 11:36 To: Alois Schloegl Cc: biosiggeneral@... Subject: RE: [Biosiggeneral] The Time domain parameters Dear Alois, Thank you very much for your help. I have modified the Biosig function tdp() in order to have it give the same result with simulink inplementation. I noticed that I could not work with NaN in Simulink and therfore all my first order difference blocks have initial values of zeroes instead of NaNs as it is in the tdp() function. So I made the following changes in the tdp() function: 1: After using the diff() function, add a leading row of zeroes instaed of a leading row of NaN. ie this line: d = diff([repmat(NaN,[1,K]);d],[],1); was changed to d = diff([repmat(0,[1,K]);d],[],1); 2: The line F = log(filter(B,A,d.^2)./filter(B,A,double(~isnan(d0)))); and the kind was changed to F = log(filter(B,A,d.^2)); With these changes in place, I could test that the tdp() function and its simulink inplementation outputs the same values. My question here is, is there any thing fundamentaly wrong with what I have done? If it is wrong, I would like to go back and replace those changes and find another way to make the simulink implementation give the same values as the original tdp(). By the way in one of your papers, you showed that tdp performed better than bandpower, also in our preliminary experiment, tdp also performed better in an offline classification using Biosig. My question is, is there any known reason why we cannot implement a good online BCI using tdp? I am actully asking because I am just wondering why bandpower is still more popular than tdp. Thank you. Bethel ________________________________________ From: Alois Schloegl [alois.schloegl@...] Sent: 17 August 2012 23:18 To: Bethel Osuagwu Cc: biosiggeneral@... Subject: Re: [Biosiggeneral] The Time domain parameters On 20120816 18:59, Bethel Osuagwu wrote: > Dear Alois, > > Thank you very much for your reply. I will try to implement what you > described. But what I am having problem with is the line in tdp() > thus: > > filter(B,A,d.^2)./filter(B,A,double(~isnan(d0))) where UC =0.0085; > //for example B = UC; A = [1, UC1]; and d=d0 is the pth > derivative > > The line with the filter is the line confusing me due to the division > because I do not know much about filters for now. But from your > description, the line is low pass filtering. So will I achieve what > this line is doing if I implement a simulink filter using only 'A' > and 'B' (i.e doing only filter(B,A,d.^2)) That should to it, except when your data contains missing values encoded as NaN's. or do I need to divide by an > output of another filter as in ./filter(B,A,double(~isnan(d0))) > ? This part is only needed when your data can contain missing values encoded as NaN's. In that case, then NaN's in d need to be replaced by 0 and the denominated need to account for the fact, that some samples have been ignored. Alois > > Thank you again for you time Bethel > > ________________________________________ From: Alois Schloegl > [alois.schloegl@...] Sent: 16 August 2012 09:06 To: Bethel > Osuagwu Cc: ; Reinhold Scherer Subject: Re: [Biosiggeneral] The Time > domain parameters > > Dear Bethel, > > > the rtsBCI simulink implements currently only the time domain > parameters of Hjorth and Barlow. Implementing tdp.m in simulink is > quite simple. you just need to connect 1st order difference blocks in > a sequential manner (output of pth difference block is the input of > the next differential block). Then connect the output of each block, > take the square, do a lowpass filter, and take the logarithm. > > I'll forward your request also Reinhold, the maintainer of rtsBCI. > > > I hope this helps, Alois > > > > > > > On 08/14/12 17:12, Bethel Osuagwu wrote: >> Dear Sir, >> >> I just realized that there's no simulink block in rtsBCI for >> calculating the Time Domain Parameter(TDP) Features implemented in >> Biosig. This TDP were used in 'demo2.m' of Biosig for >> demonstration. I tried reading the tdp() function so that I can >> implement the simulink block but I could not understand some part >> of the function when it takes multiple derivatives. Any help for >> implementing this TDP as a simulink block will be most >> appreciated. >> >> Thanks Bethel. >>  >> >> > >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions will include endpoint security, mobile security and >> the latest in malware threats. >> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ Biosiggeneral >> mailing list Biosiggeneral@... >> https://lists.sourceforge.net/lists/listinfo/biosiggeneral > 