Problem 14.2 - The Fourier Series of a Periodic Square Wave, Part 2.
*
* In this problem the PULSE function is used to describe a square wave
* similar to the waveform in Problem 14.1. The difference is that the
* PULSE function can be declared to be periodic, so that only one
* period of the waveform needs to be defined to make as long a train
* of pulses as is desired for this problem.
* In this case the square wave is defined over a 1-millisecond period,
* the same as in Problem 14.1. The .TRAN command calls for analysis
* over a 10-millisecond interval, or 10 periods of the square wave.
* This capability causes the "Fourier Transform" feature of PROBE to
* have a higher resolution (and a more "textbook-like" display of the
* frequency spectrum). The .FOUR command of PSpice has a poorer
* resolution because there are not as many samples taken in the one
* period of the pulse used for the .FOUR calculation. The results of
* the .FOUR for the square-wave are not as well-defined as in Problem
* 14.1.
* All of this simply means that in order to do a decent job of Fourier
* analysis with a computer program such as PSpice it is important to
* learn how they work and exploit the strong points of the program.
*
* Draw on paper the square wave described by the PULSE function in the
* listing below. Show that it is symmetric about the middle point of
* the window and meets the condition that it have the same value at
* each end.
*
.OPT NOPAGE NOBIAS
V1 1 0 PULSE(-7,+7,0,1E-6,1E-6,499E-6,1E-3)
R1 1 0 1k
.TRAN ; Complete the .TRAN command for an analysis
; period of 10 milliseconds.
.FOUR 1000 V(1)
.PROBE
.END