Problem 7.1 - Unit Step Function Waveforms and PROBE Display
*
* NOTE: This is a three-part problem.
* 1. Use the PWL waveform function to generate v(t) = u(t).
* 2. Use the PWL waveform function to generate v(t) = u(t-1).
* 3. Use the PWL waveform function to generate v(t) = 4.5u(t-2.5).
* For each of the waveforms generated above:
* Use the .TRAN command with a time interval 0 < t < 10 seconds,
* and use .PROBE to display a graph of the voltages V(1) and V(2).
*
* NOTES ON THE PWL FUNCTION: (See Appendix A for additional information.)
* 1. The PWL (piecewise linear) function describes waveforms in
* straight line segments from one "corner point" to another corner.
* 2. The waveform cannot be double-valued. That is, it cannot have
* zero rise-time. If you attempt to define a waveform wherein one
* segment of the waveform stops at a time t=tx and another segment
* starts at the same time t=tx but with a different value (such as
* a jump from 0 to 5 volts in a pulse or square wave), then the
* PSice run will be aborted, and you will receive the printed error
* message in your output (.OUT) file: "time must be increasing."
* 3. There are a limited number of ways in which you can use the PWL
* function to describe a step waveform in an approximate way. The
* most usual way is to choose a rise or fall time for the step to
* be much shorter than either the transient interval or the time
* constant of the circuit. For example, if the shortest time
* constant of a circuit is 20 milliseconds, then a pulse rise time
* of (20E-3)/1000 = 20 microseconds would not be seen on a PROBE
* graph in comparison with the circuit response. Likewise, if the
* transient period is 10 seconds and a pulse rise time is a small
* fraction of 10 seconds, say 1 millisecond, then it would appear
* to have an instantaneous rise when viewed on a PROBE graph.
*
* Part 1 of the program below is complete and ready to run. It is
* given to use as a guide when completing Parts 2 and 3.
*
.OPT NOPAGE
V1 1 0 PWL(0,0,1E-3,1) ; PWL waveform has value of zero at t=0,
; rises to 1 volt in 1 millisecond. It
; remains at 1 volt for the duration of
; the .TRAN analysis period.
; NOTE: This wave could also be described
; as PWL(0,1), which is a straight line at
; 1 volt starting at t=0. You might try it
; and observe the difference in the graph.
; ALSO, changing the y-axis scale on the
; graph will make a more readable output.
; Select "Y_axis" and "Set_range." Enter
; a new range of 0,1.5 for a good display.
R1 1 2 1K
R2 2 0 3K
.TRAN .2 10 0 .1 UIC ; This command calls for a printer-plot data
; interval of .2 second (if a printer-plot
; is called for), a total duration of 10
; seconds, zero time delay from the start
; of the transient analysis to the first
; printed data point, and .1 second
; maximum time step for the PROBE graph
; data. The UIC statement is included to
; suppress the .TRAN command bias point
; calculation. You might omit this
; statement and observe the difference on
; the PSpice status screen.
.PROBE
.END
Problem 7.1, Part 2. Unit Step Waveforms and PROBE Display
*
* Write a PWL description of the waveform v(t) = u(t-1).
*
.OPT NOPAGE
V1 1 0 PWL(0 0 ??????????????)
R1 1 2 1K
R2 2 0 3K
.TRAN ??? ??? ??? ??? UIC ; Complete the .TRAN command statement.
.PROBE
*.PLOT TRAN V(1) V(2) ; This is an optional printer-plot command.
; You may use it, delete it, or ignore it.
.END
Problem 7.1, Part 3. Unit Step Function Waveforms and PROBE Display
*
* Write a PWL description of the waveform v(t) = 4.5u(t-2.5).
*
.OPT NOPAGE
V1 1 0 PWL(0 0 ??????????????????)
R1 1 2 1K
R2 2 0 3K
.TRAN ??? ??? ??? ??? UIC ; Complete the .TRAN command statement.
.PROBE
.END