How to perform clutter removal on this signal?

10 visualizaciones (últimos 30 días)
Deepshikha Bhargava
Deepshikha Bhargava el 9 de Feb. de 2021
Comentada: Adam Danz el 11 de Feb. de 2021
Hello everyone,
I am trying to perform clutter removal on this signal attached below.
I want to set the signals to zero except a higher peak region in the middle like shown below.
Any suggestions would be appreciated. The higher peak in the middle have values both in positive as well as negative directions. Signals beyond that regions are set to zero. I am attaching the excel data sheet for this signal.
Attaching two more pictures (from literature, not mine). I am trying to doing something like this.
  8 comentarios
Deepshikha Bhargava
Deepshikha Bhargava el 10 de Feb. de 2021
You are right. xaxis would play a role in preserving that higher peak region. The signal also has some higher peak in the starting (x=0) that we want to set to zero. But want to preserve the peak between x= 0.005 to 0.01 (roughly).
The graphs from literature also has some higher peak in the starting (x=0). They set them to zero and kept the peaks between x= 0.1 to 0.15 (roughly).
Adam Danz
Adam Danz el 11 de Feb. de 2021
Looks like you have some good advice below in the answers section.

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 10 de Feb. de 2021
Try this:
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 22;
fprintf('Beginning to run %s.m ...\n', mfilename);
% Read in data.
x=readmatrix('xaxis_data.xlsx')';
y=readmatrix('yaxis_data.xlsx');
[rows, columns] = size(y)
% Define limits of the range we want to view.
lowerLimit = 0.005;
highLimit = 0.010;
% Find the indexes where x is outside the limits because we want to erase there.
badIndexes = x < lowerLimit | x > highLimit;
% Make a copy of the array that will be zeroed out outside of the good range.
cleanedY = y;
cleanedY(badIndexes, :) = 0; % Zero outside the good range.
% Plot the cleaned data.
for k = 1 : size(y, 2)
plot(x,cleanedY(:,k), '-');
hold on;
end
grid on;
xlim([0, 0.015]);
xlabel('x', 'FontSize', 20);
ylabel('y', 'FontSize', 20);
% Put lines on either side of the good range.
darkGreen = [0, 0.7, 0];
xline(lowerLimit, 'Color', darkGreen, 'LineWidth', 3);
xline(highLimit, 'Color', darkGreen, 'LineWidth', 3);
% NOTE: there are no data points exactly at the lower and upper limits.
% so if you want it to be zero EXACTLY up to that point, you'll have to insert those points into the data.
fprintf('Beginning to run %s.m ...\n', mfilename);
NOTE: there are no data points exactly at the lower and upper limits, so if you want it to be zero EXACTLY up to that point, you'll have to insert those points into the data. If you can't figure that out, let me know and I'll do it.
  1 comentario
Image Analyst
Image Analyst el 10 de Feb. de 2021
Alright, you just add this:
% Insert points that are zero exactly at the limits.
x = [x; lowerLimit; highLimit];
y(end+1:end+2, :) = 0;
[x, sortOrder] = sort(x, 'ascend');
y = y(sortOrder, :);
The full demo is attached.

Iniciar sesión para comentar.


KALYAN ACHARJYA
KALYAN ACHARJYA el 10 de Feb. de 2021
Editada: KALYAN ACHARJYA el 10 de Feb. de 2021
@Adam Danz clearly stated, If you know the x range, which is to be set to zero, then you can directly locate the indices of the corresponding x value range. Which I have shown in my code below. If you are looking for both the peaks and the x data range, then you also have to look for the y data. But there should be a clear definitive understanding of which values need to be set to zero.
x=readmatrix('xaxis_data.xlsx');
y=readmatrix('yaxis_data.xlsx');
temp_y=y;
temp_y(x>0.025 & x<0.18,:)=0;
for i=1:size(y,2)
plot(x,temp_y(:,i));
hold on;
end
grid on;
I hope, you can modify it and get your desired result, hence I posted this as an answer.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by