antennaparams = calculate_antenna_params('./Bowtie.out')
Vtotal = antennaparams['Vtotal'] # Output using TL model
Vinc = antennaparams['Vinc'] # Incident wave
Vref = Vx - Vinc # Vref =
Vtotal - Vinc also gives the same result via the antenna parameter calculation script of gprMax
freqs = np.fft.fftfreq(Vinc.size, d=dt)
with np.errstate(divide='ignore'):
s11 = np.abs(np.fft.fft(Vref) / np.fft.fft(Vinc))
s11 = 20 * np.log10(s11)
plt.plot(freqs[0:200], s11[0:200])
S11 calculations with Voltage Source:
rf = h5py.File('./Bowtie.out', 'r')
# read the spatial resolutions of the model and simulations
dxdydz = rf.attrs['dx_dy_dz']
# read the time resolution
dt = rf.attrs['dt']
# read number of iterations
iterations = rf.attrs['Iterations']
# simulation time array
time = np.linspace(0, (iterations - 1) * dt, num=iterations)
# simulation frequency resolution
df = 1 / np.amax(time)
#rx path in the results file
rxpath = '/rxs/rx1/'
#get E-fields
Ex = rf[rxpath + 'Ex'][:]
Ey = rf[rxpath + 'Ey'][:]
Ez = rf[rxpath + 'Ez'][:]
#calculate Vx, Vy, Vz
Vx = -1*Ex*dxdydz[0]
Vy = -1*Ey*dxdydz[1]
Vz = -1*Ez*dxdydz[2]
#impulse is not recorded in the Vx, so we can use Vx directly to calculate the S11
fftVx = np.fft.fft(Vx)
s11x = 20 * np.log10(fftVx)
freqs = np.fft.fftfreq(Vx.size, d=dt)
plt.plot(freqs[0:200], s11x[0:200])
Note:
1. In transmission line model, Vx (obtained via Rx with Ex-field) and Vtotal (obtained through the transmission line) are exactly the same so I believe I do not have any problem with obtaining the received/total wave voltage.
2. Although the transmission line is fed by an impulse, Vinc is not impulse as shown in the figure below. So, I guess incident wave using voltage source might also be different.
Best regards,
Murat