Anyone experienced with NDT/NDE simulations on MATLAB?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi all,
I've been trying to work on this article(attached) for quite a few weeks now and I'm facing a few issues in section 2.
1) The Gaussian windowed tone burst is non-causal, I've tried multiple means of shifting it into the positive time domain but still unable to do so. 2) At the end of section 2, I'm supposed to acquire data from Full Matrix Capture(FMC) which has the tx,rx and t (MxNxP) data in a 3D Matrix form. Does anyone know how I can create a 3d Matrix based on the codes I have? I know there is the remap and reshape functions but I'm uncertain how to use them as the Matlab examples are too confusing. Please take a look, if there are any other issues other than the ones I addressed, your input would certainly be very helpful to me! Thank you for taking your time to read this.
Here are the codes:
clear all
close all
%Element Parameters
No_elements=1;
Elem_width=0.53e-3;
a = Elem_width;
L=5e-3;
Elem_pitch=0.63e-3;
lambda=1.26e-3;
theta=[0,30,90];
%Signal Parameters
tc = gauspuls('cutoff',5e6,0.5,[],-40);
t = -tc : 1e-8 : tc;
yi = gauspuls(t,5e6,0.5);
figure(1);
plot(t, yi);
title('Gaussian windowed tone burst');
%Signal is non-causal, needs to be causal.
%Defining the equations.
%Position of a single point reflector.
%Constants used.
Xref = 4; %co-odinates of the reflector
Yref = 0; %co-odinates of the reflector
Zref = 3; %co-odinates of the reflector
Xtx = 1; %co-odinates of the transmitter
Xrx = 8; %co-odinates of the Receiver
%tx = linspace(0,0); %co-odinates of the transmitter
%rx = linspace(5,0);
%co-odinates of the Receiver
%Equation 1
%Propagation distance
dtx= sqrt((Xref-Xtx).^2+(Zref).^2) + sqrt((Xref-Xrx).^2+ (Zref).^2);
drx= sqrt((Xref-Xtx).^2+(Zref).^2) + sqrt((Xref-Xrx).^2+ (Zref).^2);
%Defining aluminium properties
C1=6300; %speed in m/s
ttx =(dtx)/(C1);
trx =(drx)/(C1);
%Equation 2
fyi = fft(yi);
n = 91;
fs = 100000000;
f = (0:n-1)*(fs/n);
Fw = abs(fyi);
figure(2);
plot(f,(Fw));
title('FFTed Toneburst');
%Equation 3
w = 31415926.52; %2*pi*fc
%Defining complex spectrum
Gtx = Fw*exp(((-w*1i)/C1).*dtx);
Grx = Fw*exp(((-w*1i)/C1).*drx);
%Equation 4
%ptheta_phi = sinc{(pi*a*sin(theta)*cos(30))/lambda}.*sinc((pi.*L.*sin(theta).*si n(30))/lambda);
%Unsure of what parameters to input into the variables in this equation, I
%don't see how it affects the rest of the equations.
%Equation 5
%Directivity of transmitter
Ptx = sinc((pi*Elem_width*sind(45))/(lambda));
%Directivity of receiver
Prx = sinc((pi*Elem_width*sind(53))/(lambda));
%Equation 6
%Amplitude of the signal propagation
Ao = 1; %Advised by supervisor to set this value to 1
%A0=signal amplitude at unity propagation distance
Atx = Ao/(sqrt(dtx*drx));%Amplitude of the signal
Arx = Ao/(sqrt(dtx*drx));%Amplitude of the signal
%Equation 7
%Spectrum for transmitter-receiver
Htx = Ptx*Prx*Atx*Gtx;
Hrx = Ptx*Prx*Arx*Grx;
%Equation 8
iHtx = abs(ifft(Htx));
figure(4);
plot(t, real(iHtx));
title('Output Transmit');
iHrx = abs(ifft(Hrx));
figure(5);
plot(t, real(iHrx));
title('Output Receive');
%3D FMC Matrix dataset
fmcHtx = iHtx(:,:,1);
fmcHrx = iHrx(:,:,1);
time = t(:,:,1);
%This is still wrong. Still unable to produce 3D Matrix. Are the codes for this correct? I need to have fmxHtx X fmcHrx x time (MxNxP)
1 Commento
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!