How can I produce a Heat/Contour map of energy distribution within a vessel

3 vues (au cours des 30 derniers jours)
Oliver Mashari
Oliver Mashari le 10 Mar 2018
Hi, I have these excel files that contain data obtained from an oscilloscope. This data is in the time domain I have converted it to the time domain using the following code:
clc
close all
clear all
% Load data from excel
Ts=xlsread('D:\NPL\Cav400H\c1.csv','A3:A1002');
A=xlsread('D:\NPL\Cav400H\c1.csv','A3:B1002');
% Sampling frequency
Fs = 1/(Ts(2)-Ts(1));
% L = length(Ts);
L = 10000;
FT = fft(A(:,2),L);
FT = FT(1:L/2)/L;
% RMS Value
FAmp = abs(FT.*conj(FT));
% Frequency axis
FBase = ((0:(L/2)-1)/(L/2)) * (Fs/ 2);
% BIE Limits
Fmin = 1e6; % minimum integral limit
Fmax = 5e6; % maximum integra limit
Flim = 5e6; % plotting limit
% Temporary values
[tmp FminTemp]=min(abs(FBase-Fmin));
[tmp FmaxTemp]=min(abs(FBase-Fmax));
[tmp FlimTemp]=min(abs(FBase-Flim));
% Calculate the RMS value of the siganl in dB
dBV = 10*log10(FAmp);
% Plot the signal in frequency domain
figure;
plot(FBase(1:FlimTemp), dBV(1:FlimTemp));
grid on;
xlabel('Frequency, [Hz]');
ylabel('Amplitude, [dB]');
I am using a technique called the broadband energy technique to calculate the strength of the energy:
Df = FBase(2) - FBase(1);
energy = sum(abs(FAmp(FminTemp:FmaxTemp))*Df);
How would I move on and create an 2D energy map like such:
The vessel dimensions are 410x160mm I have also attached one of the excel files (I have 27)
Thanks for the help in advance! Sorry if the question has been poorly laid out.

Réponses (1)

Abraham Boayue
Abraham Boayue le 11 Mar 2018
% Start by making the following changes
Fs = 1/(max(Ts)-min(Ts)); % Your sampling frequency was infinite, change it to this line.
% You will need two sets of time axis to plot the 2D image shown, as an example,
% try these few lines in your code.
figure
h = dBV;
tt = 0:1/Fs:(length(dBV)-1)/Fs;
tyc = 0:1/Fs:(length(dBV)-1)/Fs;
imagesc(tt, tyc, h)
  2 commentaires
Abraham Boayue
Abraham Boayue le 11 Mar 2018
I hope these few lines will help you get the results that you are looking for. Good luck for now.
Oliver Mashari
Oliver Mashari le 12 Mar 2018
Modifié(e) : Oliver Mashari le 12 Mar 2018
Hi thanks for this. It helps but I'm still having problems. I would like to ask for more advice but I'm not even sure how I would start. But thanks again for your time!

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by