Problem 9.7 - Complete Response of a Circuit with Switched Source
*
* The circuit for this problem is from textbook Example 9.18.
* Use a voltage-controlled switch keyed to PWL source to simulate the
* switching action in the circuit. This is required because the source
* is switched in at a time other than t=0. (The source is switched out
* of the circuit at t=0, but that only results in initial conditions.)
* Use steady-state circuit analysis "by inspection" to determine the
* capacitance voltage at t=0.
*
* Use PROBE to obtain a graph of the complete response of the circuit.
* Print a hard copy of the graph.
* On a second graph of the complete response, add the expressions
* 10exp(-2t) and 10-6.32exp(-3(t-.5). Re-scale the y-axis to 0,10 to
* create a more informative display of the waveforms. Note that the
* first expression describes the initial response of the circuit and
* the second expression describes the response for t > .5 second. The
* two expressions are equal (as they must be) at t=.5 second.
V1 1 0 PWL(0 0 .5 ??? ???? ???) ; Complete the PWL statement.
R12 1 2 6
R3 3 0 3
C1 3 0 .166667 IC=??? ; Enter the initial voltage.
SW 2 3 ??? ??? SMOD ; Enter control node numbers.
.MODEL SMOD VSWITCH(RON=.001 ROFF=1E5 VON=30 VOFF=0)
; Consult Appendix A for a
; description of the
; VSWITCH device and its
; operation and limitations.
.TRAN ??? 2.5 0 ???? UIC ; Complete the .TRAN command.
.PROBE
.END