Loading of custom waveform takes long

106 views
Skip to first unread message

Dominik Rhiem

unread,
Apr 2, 2025, 4:05:34 AMApr 2
to gprMax-users
I simulate the signal of an FMCW radar with gprMax using a custom waveform. The waveform (as a zipped file) and the input file are attached. The following issues have arisen:
1. If the waveform's time vector is shorter than the total duration of the simulation, this error occurs:
error-gprmax.PNG
Isn't gprMax supposed to pad the signal with zeros?
2. As the time vector thus has to at least match the simulation duration, the file gets bigger. Loading in and interpolating takes ~3-4 minutes (the file size is around 10 MB unzipped!). The waveform time steps equal that of the simulation.
3. Does my waveform arise smoothly enough from zero? There is some slight high-frequency content at 200-210 GHz in the result.
4. If the waveform needs to be smoother, the waveform has to be sampled more finely, increasing file size and thus the loading/interpolation time.
5. There is a jump in the gradient of the waveform at the beginning and end. May this cause the high frequency content?

waveform_fmcw_test_langeRampe.7z
Simulation_Andre_fmcw_test_langeRampe.in

Antonis Giannopoulos

unread,
Apr 2, 2025, 9:37:07 AMApr 2
to gprMax-users
I suggest to run gprMax with an impulse source. Use the 'impulse' keyword in the waveform command. This will provide you with the impulse response of the model. This is not correct to be used directly as FDTD does not propagate correctly all frequencies. However, if you convolve this with a valid excitation function you will get the response of the model as if it was excited by that function. A critical part is the duration of the model's  impulse response. Ideally it needs to be the same as the exciting function but you can use a shorter one and zero pad it. But then there will be errors that might or might not be significant depending on the application and on how quickly your model's impulse response goes to zero. 

The convolution can happen in any post processing package you like (Python or MATLAB or R etc.)

I have done this to simulate an SFCW GPR quickly and presented the idea in our workshop videos we have in our YouTube channel and also at the EAGE NSG2023 conference. The paper link is:


Hope this helps!

Antonis

Dominik Rhiem

unread,
Apr 7, 2025, 9:51:37 AMApr 7
to gprMax-users
Hi Antonis,

first of all, thank you so much for the recommendation. I watched the YouTube video, it was really helpful and I think I managed to wrap my head around your suggestion. I have tried an SFCW implementation for the most basic case of one transmitter and receiver which are just separated by air, and the result seems reasonable to me. However, I also compared this to an analytical calculation, and there are some major discrepancies which I currently cannot get rid of. I have attached both the input file for gprMax and my Matlab script for evaluation, maybe you can have a look?
Short explanation: the antennas are separated by 0.4 meters. As you suggested, I am calculating the impulse response with gprmax. The simulation duration is roughly twice as long as the duration for the individual pulses - this is probably a bit overkill, but necessary to fully capture the pulse because its is delayed by ~1.3 nanoseconds due to its propagation (so we also have this delay represented for the mixing). I first calculate the transmitted signal for all individual pulses and convolve them with the impulse response. Here is a point where I am unsure: should I then perform the mixing already for all individual pulses, or first "unwrap" the pulses into a full signal and then do the mixing? I have implemented both versions, but the results are pretty much the same. Note also that I don't perform the I-Q-decomposition and the 90°-shifted signal, but I rather directly multiply the signals.

I then also calculate an analytical signal, which is calculated based on the travel time. This is then processed in the same way as the gprmax signal. Finally, the two signals (gprmax/analytical) are shown in plots to be compared. The main issue is that the main peak in the mixed signal is shifted between these two versions; for the analytical calculation, it is at zero (which makes me think I did something wrong), for the gprmax version, it is at ~500 kHz. But this would also be equivalent to a distance of 17.5 micro meters, which is not correct, either. Any suggestions?

Best,
Dominik
sfcw_test_trans.in
gprmax_sfcw.m
readgprmax.m

Antonis Giannopoulos

unread,
Apr 7, 2025, 10:53:20 AMApr 7
to gprMax-users
Hi Dominik,

I do not combine the received waveforms but process them one at a time. The sequence I have used is simple:

1. Run gprMax with impulse waveform normalised to 1 (although the amplitude should not be important)
2. Convolve  the impulse with the cosine function of the relevant frequency for the right duration (try with a ramp or not). This is the formal RX response 
3. Mix the RX response with the cosine function of the relevant frequency for the right duration (multiply the two together) and this is the "I" signal
4. Mix the RX response with the sine function of the relevant frequency for the right duration (multiply the two together) and this is the "Q" signal 
5. Filter the "I" and "Q" with a low pass filter and the result will be an almost constant number which is the "I" (real) and "Q" (image) values of the complex number needed to populate the frequency vector.
6. To avoid Gibbs ripples window that vector before iFFT.
7. iFFT the vector and the real part is the time trace 

To properly compare the analytical solution with this you need the impulse response of an infinite line source. This is available in free space and I think I might have the formula in my thesis. In gprMax you specify the current waveform of your sources and not the fields. The respsone is not complicated but it is not just a simple time delay of the input signal. 

Hope that helps!

Best

Antonis
Reply all
Reply to author
Forward
0 new messages