Gaussian Pulse to Drive Voltage source

8 views (last 30 days)
Lakerpurp24
Lakerpurp24 on 14 Feb 2020
Commented: darova on 20 Feb 2020
I need to develop a gaussian pulse to drive a voltage source for an FDTD simulation. The pulse is defined by the pulse half width t_w and the pulse delay t0.
the function is defined as: V_gauss(t) = e^ ( (t - t0)^2 / (t_w)^2 )
heres where im at:
t=-100:0.01:100;
t0=20;
t_w=2*pi*150/400; %% im assuming by "pulse half width" my professor is talking about center frequency?
Gpulse=exp((t - t0)^2 / (t_w)^2)
figure(2)
plot(t,Gpulse);
gpulse=fftshift(fft(Gpulse));
V_gauss=abs(gpulse);
figure(3)
plot(t,V_gauss,'-o');
xlim([-100 100])
i have also found the following code:
tc = gauspuls('cutoff',50e3,0.6,[],-40);
t1 = -tc : 1e-6 : tc;
y1 = gauspuls(t1,50e3,0.6);
t2 = linspace(-5,5);
y2 = sinc(t2);
subplot(2,1,1)
plot(t1*1e3,y1)
xlabel('Time (ms)')
ylabel('Amplitude')
title('Gaussian Pulse')
subplot(2,1,2)
plot(t2,y2)
xlabel('Time (sec)')
ylabel('Amplitude')
title('Sinc Function')
but dont know how to model it to what I need using the gauspuls function. Just posting this as well in case it helps.
I haven't actually learned about the intricacies of a gaussian pulse, it's simply a piece of a larger project and not the focus.

Answers (1)

Raunak Gupta
Raunak Gupta on 17 Feb 2020
Hi,
The function V_gauss(t) correctly represent a gaussian function just the (t - t0)^2 must be -(t - t0).^2.
Also the V_gauss calculated usign fft represents the frequency domain equivalent of a gaussian pulse so if only time domain output is required (value of 1 at center frequency), you may avoid using the fft.
The gauspuls that is mentioned in the question is a gaussian modulated sinusoidal signal and is different from a gaussian pulse.

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!