Peak Detection in ICP signal

In summary, peak detection in ICP (intracranial pressure) signal involves identifying the maximum points or peaks in a waveform to analyze the brain's functioning and diagnose abnormalities. It is typically done using computer algorithms that use mathematical techniques to accurately detect the peaks. This is important for diagnosing conditions and monitoring changes over time. The main challenge is differentiating between true peaks and noise, which can be improved by using advanced signal processing techniques and multiple sensors.
  • #1
EE_ROB
2
0

Homework Statement



I have the task of finding the first peak (percussion peak) per each period of a ICP signal. I was told to filter the signal to get rid of some noise and a dc offset, find the percussion peak indicies and then plot those back onto the original signal. I am unable to only plot the first peak, my code plots both peaks. I am not sure why my code is not differentiating between the indicies of relavence. Any help with the code below would help,

Homework Equations





The Attempt at a Solution


clc; close all;

load icpComposite
x = icpcomposite;
k = 1:length(x);

%% filtering

b = fir1(200,30/(fs/2));
y1 = filtfilt(b,1,x);

%% Detrending

b = fir1(300,0.5/(fs/2),'high');
y2 = filtfilt(b,1,y1);

figure;
plot(y2);

%% Peak Detection

L = 1:length(y2);
[ymax,imax] = extrema(y2);
figure;
plot(L,y2,L(imax),ymax,'r.');

%% Error Correction

imd = diff(imax);
imdm = median(imd);

mdt = 0.5*imdm;
mdind = find(imdm<mdt);

mdind = mdind+1;
imax(mdind) = 0;
imax = unique(imax);

figure;
plot(k,x,imax,x(imax),'r.');
 

Attachments

  • extrema.m
    3.6 KB · Views: 546
Physics news on Phys.org
  • #2


Your code looks good overall, but I can see a few potential issues that may be causing your code to plot both peaks instead of just the first one. Here are some suggestions for troubleshooting:

1. Check your peak detection method: Make sure that your code for detecting peaks is working correctly. You can do this by plotting the indices of the peaks (imax) on top of the original signal (x) and making sure that they are accurately identifying the first peak in each period. If not, you may need to adjust your peak detection algorithm.

2. Double check your error correction: It looks like you are trying to remove any peaks that are too close together (within a certain threshold, mdt). However, in your code, you are only adding 1 to the indices of the peaks that are too close together, which may not be enough to actually remove them from the final set of peak indices. You may want to try increasing the amount you add to the indices to make sure they are being removed.

3. Check for any other potential sources of error: Make sure that your code is not accidentally plotting all the peaks instead of just the first one. This could be caused by a typo or incorrect variable assignment somewhere in your code.

Overall, it seems like you are on the right track and just need to fine-tune your code a bit to accurately identify and plot only the first peak in each period. Good luck!
 

1. What is peak detection in ICP signal?

Peak detection in ICP (intracranial pressure) signal is the process of identifying the maximum points or peaks in a waveform that represents the pressure inside the skull. These peaks can provide valuable information about the brain's functioning and help diagnose any abnormalities.

2. How is peak detection done in ICP signal?

Peak detection in ICP signal is typically done using computer algorithms that analyze the waveform and identify the highest points in the signal. These algorithms use mathematical techniques such as differentiation and thresholding to accurately detect the peaks.

3. Why is peak detection important in ICP signal?

Peak detection in ICP signal is important because it can provide crucial information about the brain's functioning and help diagnose conditions such as head injuries, brain tumors, and hydrocephalus. It also allows for monitoring of changes in intracranial pressure over time.

4. What are the challenges in peak detection in ICP signal?

The main challenge in peak detection in ICP signal is accurately differentiating between true peaks and noise in the signal. This can be particularly difficult when the signal is weak or distorted due to factors such as movement artifacts or electrical interference.

5. How can peak detection in ICP signal be improved?

Peak detection in ICP signal can be improved by using advanced signal processing techniques, such as wavelet analysis, that are better able to filter out noise and extract the true peaks. Additionally, using multiple sensors and averaging the signals from different locations can also improve the accuracy of peak detection.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
1K
Replies
2
Views
567
  • Engineering and Comp Sci Homework Help
Replies
16
Views
91K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • Electrical Engineering
2
Replies
43
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Programming and Computer Science
Replies
5
Views
2K
Back
Top