Nerve Electrical Signal Analysis Based on Matlab

: Action potential is one of the main ways to transmit information in the nervous system. In fact, a single electrode tends to record the activities of more than one neuron, therefore, the recorded signals need to be analyzed to get the single neuron discharge sequences. This paper separates and analyzes the nerve signals of rat dorsal root ganglion by the program written in Matlab and commercial data analysis system LabChart respectively. The results showed that both of them can achieve to separate the different amplitudes signal and conduct statistical analysis, but Matlab program is simple and can directly isolate different neural signals which is easy to understand and accept, it can also process the data according to their specific characteristics and get more consistent results to the reality, while LabChart can only get the results close to the reality. In addition, LabChart can be modified to get more practical analysis through the analysis of Matlab. In a conclusion, Matlab program can satisfy the need to deal with the data independently, and it can also work as helper to improve the results of a commercial software processing.


Introduction
Action potential is one of the main ways to transmit information in the nervous system [1]. These brief action potentials can be recorded with a microelectrode, which can often pick up the signals of many neurons in a local region [2]. One of the most powerful and widely used methods for studying neuronal activity is direct electrical recording [3], the transmission and integration of neural information is usually realized by a series of action potentials. It has great significance for deep study of the nervous system to acquire the discharge signal (spike) and separate it [4]. Ideally, the results of a single microelectrode recordings of neurons should be a single-unit neuron activity signal, while actually, the single electrode often records the activities of multiple neurons, or the activities of a single neuron may be recorded simultaneously by more than one electrode. Complex signal components are recorded by electrodes, they include action potentials of the recorded neurons, action potentials of the adjacent neurons and the presence of white noises, therefore, analyzing the recorded signals and obtaining the individual neural spike sequences are required for further study [5].
What's more, the neurophysiologist may wish to sort these signals by assigning particular spikes to putative neurons, and do this with some degree of reliability.
At present, a variety of software can record and analyze neural signals [6], such as Multichannel Acquisition Processor (MAP) made by Plexon Incorporation, Cerebus™ Data Acquisition System made by Cyberkinetics Incorporation, Spike2 made by Cambridge Electronic Design Company Limited. and LabVIEW made by National Instrument Company [7], etc. These softwares provide a rich and strong functions for data recording, instrument control, signal analysis and data processing, clients only need to directly call these functions, but clients also need to master the complex instructions to complete data analysis and it will take a long time to process a large amount of data. In addition, softwares only provide the outcomes, they don't present the specific processing theory. Actually, many statistical and signal processing knowledge involved in the kernel code of these softwares [8,9], for example, spike-sorting algorithms and methods including threshold detection, principle component analysis and cluster analysis, etc [10]. Without these knowledges, clients are hard to understand the outcomes and perform further analysis. Based on mathematics software Matlab and its toolbox, this paper will separate and analyze the electrical signals recoded in the dorsal root ganglia of rats, and compare the results with the processing results performed by software LabChart, thus to comprehend the physiological characteristics of the electrical signal and to study its potential principle.

Data Record
Sprague-Dawley (SD) rats (180-230g) from the Shanghai Lab Animal Research Center, their dorsal root of spinal nerves are separated under microscope (Leica, M520) and the peripheral cut segments were placed on unipolar platinum-iridium wire recording electrodes until we recorded single unit nerve activity [11,12]. A single afferent fiber was identified by the identical shape of the discharge spikes. Single unitary potentials were amplified (DAGAN, EX4-400, Japan 300-3000Hz, Gain 500 set) to transmit to computer via multichannel recorder (powerlab16/30, ADInstruments, Australia), and were visually collected and displayed on software (verision 7.3, ADInstruments, Australia). Sampling frequency is 20kHz, sampling time is 120s. Experimental data were exported by LabChart recording, Figure 1 shows the original signals from 5s to 15s.  Figure 1 shows that the original data are multiunit signals and there exist spikes of different amplitudes (about 1.5mV and about 0.8mV). We write a program to separate these two kinds of signal directly, which not only increases the data processing speed，but also provides an intuitive and effective data analysis method for non-specialists in statistics field. Figure 2 is the algorithm flow chart. In order to show the signals clearly, Figure 3a only displays part (in 1s) of our processing data. In fact, we process the data in 10s shown in Figure 1. A spike is characterized by width (the whole time from the generation to fadeaway of a complete spike) and threshold (the value that the spike must exceed). Obviously, there are 2 kind of spikes in Figure 3a, one's amplitude is about 1.5mV and the other's amplitude is about 0.8mV, both widths is about 3ms. Using Matlab functions, we first find the data which values are over 1.1mV, then keep these data and the data information of the 3 sampling points before and after these data (the width of the spike is 3ms, that's about 5 sampling points), and all the kept data form the signal of 1.5mV spikes (Figure 3b). Figure 3c is the remained signals after subtracting the 1.5mV spikes in Figure 3b from the original data, then find the data which values are over 0.3mV in Figure 3b, keep these data and the data information of the 3 sampling points before and after these data, and all the kept data form the 0.8mV spikes (Figure 3d). For the separate spikes (Figure 3b and Figure 3d), we find the retained points and count the interspike number and interval if the interval width of the nearby points is larger than 5ms.    Figure 4a shows there're some plots whose value is obvious lower than the average, for example, some values are lower than 10ms. Figure 3b shows there are shows there is a peak at the corresponding place (marked by circles) in the 0.8mV spikes, this means the close peaks in 1.5mV spikes may come from the interference of the peak in the 0.8mV spikes signal. Increasing the threshold of the minimum interspike interval will weaken the influence of interference signals. Figure 4a shows that most of the plots scattered between 30ms and 40ms, no value is over 40ms. By resetting the threshold of the minimum value as 20ms, we got average frequency of 27.6/s, 14% lower than previous. Figure 4b is the scatter plot graph of the 0.8mV spikes' (Figure 3d) interspike interval. There are 344 interspike interval in 10s, that is the average frequency is 34.4/s. The interspike interval centers around 29ms, there's no plots whose value is less than 20ms, but there are 4 plots whose value lays between 55ms and 60ms, that is about 2 times of the most plots (29 ms). Figure 3d shows there is a peak about 04.mV (marked by circles) at about 0.2s and there is also a peak (marked by circles) at the corresponding time in Figure  3d. This peak was missing if we set the threshold of 0.8mV signal as 0.5mV, while this peak will retain if we lower the threshold of 0.8mV spikes from 0.5mV to 0.3mV. Amplifying the original signals, we can find the similar phenomenon, there's a peak of 1.5mV in the middle of these 0.8mV peaks of large interspike interval (about 60 ms). We speculate that the peaks of 1.5mV and 0.8 mV coincidence at the same time and the peak of 0.8 mV was weakened and missed when extracting the 1.5mV signal, therefore a peak is need to added and the actual number of peak spacing in 10s is 344+4=348, that the average frequency is 34.8/s.

Spike Processing
There is a Spike Module in LabChart and LabVIEW which can process the neural spikes, it can extract spike wave by setting width and threshold [13]. Figure 5a is the scatter plots by setting threshold as 0.3mV, we manually select the scatter plots that clustered as one group, that is red plots clustered as 1.5 mV spikes and blue plots clustered as 0.8mV spikes. Figure 5b shows the spike wave corresponding to the two clusters (red waves corresponding to the red plots and blue waves corresponding the blue blots in Figure 5a). It shows both of the two type of spike waves have the similar width of about 3ms, while they have different amplitude, therefore, they can be sorted out by setting different threshold.   (Figure 6a), that is the average frequency is 33.1/s, a little higher than that of Matlab program (32.2/s). We can't explain that for not knowing the underlining code of Spike Module, the most possible reason is that one spike is mistaken as two very close spikes due to the interference of the 0.8 mV spikes. The interspike interval number is 277 if subtracting the spacing whose value is lower than 20ms, which is very close to the result of Matlab processing (276). interspike interval number of the 0.8 mV spikes is 276 in 10s (Figure 6b), that is the average frequency is 27.6/s, much lower than that from Matlab program (34.5/s), Figure 6b shows most of the interspike interval concentrate on 30ms, 56 spacing is about 60ms (30ms×2) and 8 spacing is over 80ms (≈30ms × 3). Based on the analysis of Matlab program, interspike interval of about 60ms may miss 1 spike and interspike interval of bout 90ms may miss 2 spikes, then interspike interval number in 10s should be 276+56+8*2=348, that is close to the results from Matlab program.

Discussion
Matlab program is simple and can directly isolate different neural signals which is easy to understand and accept, it can also process the data according to their specific characteristics and get more consistent results to the reality. Users need not know much about statistical knowledge, the program runs fast and provides an intuitive and effective data analysis method for non-specialists in statistics field. In addition, though commercial software can give statistical results of the two different signals, it can't separate the signal directly, and human subjective effect will be included due to the complex instructions operation and manually plots selection. Though the results of commercial software are close to those from Matlab program, there are false information due to lack of careful analysis such as the over-calculated of 1.5 mV peaks and the missing of 0.8 mV peaks. To clear understand the principle of these softwares such as LabChart, statistical knowledge must be included [14]. Through the analysis of Matlab treatment, LabChart can be modified to get more practical analysis.

Conclusion
This paper analyzes the nerve signal by the program written in Matlab and commercial data analysis system LabChart respectively. The results showed that both of them can achieve to separate the different amplitudes signal and conduct statistical analysis. Matlab program is simple and can directly isolate different neural signals, it can also process the data according to their specific characteristics and get more consistent results to the reality. LabChart can only get the results close to the reality. Matlab program can not only finished the signal analysis independently, but also work as helper to improve the results of a commercial software processing. By Matlab programming, the results of commercial software can be revised to became more practical.