I was doing some reading on transient signals. When transient signals is analysed by DFT, there are some non-physical peaks from the Fourier transform process (on the figure below). I understand this is because the DFT analysing the transient signal as a periodic signals. But Is there a way to get rid of those peaks.
You might be referring to windowing artifacts, which are caused by a the finite length default rectangular window or other window applied to segment your signal for a finite length FFT. Such artificial windowing artifacts can be removed by using an infinite length FT (for integrable functions), or the full length of time of the existence of the transmitter process for natural windows. Windowing artifacts can be reduced, but not always removed, by using a longer FFT that is a large integer multiple of both the carrier period and any data packet or perturbation periodicities.