LTspice Lesson 4b: Generate Waveforms used in Electric Circuits: PULSE

LTspice has various options to generate a custom pulse for circuit simulations.

Generating a pulse is done through an independence voltage or current source as shown below:

screen-shot-2019-03-10-at-9.07.52-pm.png

Pulse minimum voltage, maximum voltage, delay before the pulse start, rise time and fall time, on time and period can be set in the above dialog box and shown on the schematic as below equation:.

PULSE(V1 V2 Tdelay Trise Tfall Ton Tperiod Ncycles) [1]

Screen Shot 2019-12-02 at 10.43.09 AM.png

An illustrated version is shown below:

Screen Shot 2019-12-02 at 10.52.04 AM.png

Screen Shot 2019-12-02 at 10.55.42 AM.png

Now on to the simple RC example to a pulse response. First we will predict the output of the simple RC circuit for a pulse with 10ms period with 50% duty cycle and then we will verify it using LTspice simulation as well as on bench.

Same differential equation govern the behavior of this circuit except now source is a step DC voltage:

image.png

Vs=step voltage DC source

The solution for this differential equation is given below and derivation is in appendix below if you interested in math:

Vc = Vc – Vc*exp(t/RC) ———[1]

The intuition behind is simple as capacitor voltage cannot change instantaneously or in zero time because that would require infinite amount of current (i = C*dv/dt), so at the instant when step voltage is applied output voltage would be zero (assuming there is no initial voltage), but output slowly rise to its final value of Vs as capacitor charges. How slow or fast it charges is dictated by component value of resistor and capacitor, in particular their product RC called time  constant. This is precisely predicted by the above equation and demonstrated by plotting this function in matlab below. As can be seen in table below, LTspice and calculation of RC time constant are exact match as they should be. I also did this experiment on the bench and results are very close to calculation/simulation:

Screen Shot 2019-12-02 at 3.23.28 PM.png

The 2% discrepancy is most likely coming from component tolerances and oscilloscope cursor resolution.

Screen Shot 2019-12-02 at 3.23.41 PM.png

LTspice file can be downloaded here.

Appendix

Screen Shot 2019-12-02 at 9.51.37 PM.png

About ExploreSilicon

My name is Kashif. I live in the heart of silicon valley and have been living here for a very long time. My passion is engineering, technology and traveling. My email is kashifjavaid@hotmail.com. Please feel free to contact if you have any suggestion or comments on any of my posts.
This entry was posted in LTspice for EE students and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s