Design Ideas: July 6, 1995
| Listing 1--VCO behavioral model |
|---|
|
.SUBCKT VCO 1 2 PARAMS:A=1, Fc=1, K=1
E 2 0 VALUE={A*SIN(6.283*TIME*(Fc+K*V(1,0))) .ENDS VCO |
The model expresses these equations using a VALUE description of a voltage-controlled voltage source. Note that the parameter TIME in the model represents the PSpice internal sweep variable used in transient analysis. To simplify use of the model, describe it as a parameterized subcircuit called VCO, whose input is at node 1 and whose output is at node 2. Describe the model function using the three parameters A, fC, and K. You must give the subcircuit parameters initial values to satisfy the .SUBCKT statement requirement. In this example, I arbitrarily set them to one; you'll change them to the required values when the program calls the subcircuit.
To use the model to simulate a VCO circuit, specify the parameters A, fC, and K. For example, if A=2V, fC=10 kHz, K=5 kHz/V, and the input control voltage ranges from +1 to 1V, the output frequency changes from 15 to 5 kHz, as Fig 1 shows. Listing 2 gives the PSpice netlist of the VCO circuit. (DI ##1726)
| Listing 2--VCO-circuit PSpice netlist |
|---|
|
.LIB C:\PSPICE\MODELS ;VCO model location
V 1 0 PULSE(-1 1 0 10ns 10ns 0.5ms 1ms) ;control input signal .TRAN 0.01m 2ms 0m 0.01m ;transient analysis range X 1 2 VCO PARAMS:A=1, Fc=10K,K=5K ;call VCO subcircuit .PROBE V(1),V(2) ;graphic input & output signals .END ;end of netlist |