Transient Analysis With Time Varying Sources

advertisement

Transient Analysis With Time Varying Sources

EE210 – Circuits and Systems

Tony Richardson

In this short tutorial you will learn how to set up various time-varying voltage sources for use in transient analysis. The example circuit shown in Figure 1 will be used. We want to compare the output voltage (the voltage across R3) to the input voltage (the voltage across voltage source V3).

Notice that the pin names for R3 are shown. This is done so that the op amp output voltage matches the polarity of the voltage across R3.

Figure 1: Example Circuit

Let us set up source V3 to generate a 1 kHz (1ms period) sine wave with a 1 V amplitude. Double click on the source in the MicroCap schematic window and Voltage Source parameter selection window shown in Figure 2 appears. A series of tabbed windows will be in the botton portion of this window. Click on the Sin tab to set up a sinusoidal source. The DC , AC magnitude , and AC phase are ignored in transient analysis. The other parameters are used to simulate a sinusoid according to the following equation: v  t = V0  VA e − DF  t − TD  sin  2  F0  t − TD  PH  u  t − TD 

V0 is the DC offset in volts, VA is the amplitude in volts, F0 is the frequency in Hertz (the reciprocal of the period), TD is the time delay before the sine wave source turns on in seconds, DF is the damping factor in reciprocal seconds, and PH is the phase shift in degrees. u ( t ) is the unit step function. The damping factor is a reciprocal time constant so the sine wave will decay to 0 V in approximately 5/DF seconds.

10/22/2007 Page 1 of 6

We want to generate a sinusoid of the form: v  t = sin  2  1000 t  u  t  so set VA to 1, F0 to 1000 and set all other parameters to 0. These parameter settings are shown in

Figure 2.

Figure 2: Setting up the Sine Wave Voltage Source

After setting up the voltage source, select Transient Analysis from the Analysis menu. The

Transient Analysis Limits window shown in Figure 3 should appear. Here a Time Range of 10 ms has been selected. This corresponds to 10 periods of the input waveform. The voltage across the input voltage source V3 and the voltage across the output resistor R3 have been selected for plotting.

The results are shown in Figure 4. The smaller input waveform oscillates between -1 V and 1 V while the larger output waveform swings between -10 V and 10 V. The theoretical voltage gain of the circuit is -10 V/V. It can clearly be seen from the simulation that the output is indeed negative when the voltage is positive.

10/22/2007 Page 2 of 6

Figure 3: The Transient Analysis Limits Window

Figure 4: Sine Wave Source Results

Now lets change the voltage source to generate a square wave that swings from -1 V to 1 V with a period of 1 ms. Double click on the voltage source in the schematic window and click on the pulse tab in the bottom portion of the window. The Voltage Source parameter selection window should appear as in Figure 6. The parameters are defined as in Figure 5. V1 and V2 are the pulse low and high voltage values. TD is the time until the pulse waveform begins, TR is the pulse rise time (here defined as the time it takes for the voltage to change from V1 to V2), PW is the time that the pulse is at voltage V2, TF is the pulse fall time, and PER is the period of the waveform. The values in

Figure 6 defines a pulse waveform that swings from -1 V to 1 V with a period of 1 ms. Notice that

10/22/2007 Page 3 of 6

TD, TR, TF are all equal to 0. The simulation results are shown in Figure 7. Again, it is easy to see that the output voltage waveform is -10 times the input voltage.

V2

V1

TD TR PW TF

PER

Figure 5: Definition of Pulse Parameters

10/22/2007

Figure 6: Pulse Waveform Parameters

Page 4 of 6

Figure 7: Square Wave Source Results

A triangular waveform can be generated by setting PW equal to 0 and using values of TR and TF equal to one-half the period. Figure 8 shows parameter values for a traingular waveform that swings from -1 V to 1 V with a period of 1 ms. The resulting input and output waveforms are shown in Figure 9.

Figure 8: Triangular Waveform Parameters

The PWL (piecewise linear) source type allows you to generate any sort of voltage waveform that consists of straight line segments. You enter the time and corresponding voltage as a pair of comma-separated values. You can use a REPEAT keyword to repeat a portion of a waveform a number of times or to create a periodic waveform by repeating it forever. The PWL parameter settings shown in Figure 10 create a triangular waveform identical to the one produced by the pulse parameter settings in Figure 8. The simulation results are identical to those in Figure 9.

10/22/2007 Page 5 of 6

Figure 9: Triangular Waveform Results

Figure 10: Piecewise-Linear (PWL) Parameters

10/22/2007 Page 6 of 6

Download