* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Section G7: Computer Simulation of Op-Amp Circuits
Stray voltage wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Power inverter wikipedia , lookup
Negative feedback wikipedia , lookup
Alternating current wikipedia , lookup
Electrical substation wikipedia , lookup
Ground (electricity) wikipedia , lookup
Current source wikipedia , lookup
Voltage optimisation wikipedia , lookup
Flexible electronics wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Voltage regulator wikipedia , lookup
Wien bridge oscillator wikipedia , lookup
Power electronics wikipedia , lookup
Earthing system wikipedia , lookup
Buck converter wikipedia , lookup
Surge protector wikipedia , lookup
Integrated circuit wikipedia , lookup
Signal-flow graph wikipedia , lookup
Mains electricity wikipedia , lookup
Regenerative circuit wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Two-port network wikipedia , lookup
Schmitt trigger wikipedia , lookup
Section G7: Computer Simulation of Op-Amp Circuits Your text comes with a copy of Micro-Cap 7. In your text, Table 9.2 details the 20 parameters of the Micro-Cap op-amp model and Figure 9.28 illustrates the equivalent circuits for the Level 1, 2 and 3 simulations. These are relatively straightforward, but if you have any questions (as usual), let me know. What I’m going to be concentrating on in this discussion is the simulation of op-amp circuits using PSpice. Once again, Spice (in all its incarnations) is the industry standard and seems to be the software of choice for our class. Generally, if you are comfortable with what’s truly going on with your device, circuit or system, it’s not too painful to use various simulators. I do encourage you (in your infinite spare time) to experiment with Micro-Cap (or PSpice if you are a Micro-Cap user) to get a feel for as many different packages as possible. With that said, let’s go on. What’s nice about Spice is that we can either simulate the op-amp at the transistor level – for example, using the circuit of section G5 for the 741, or we can treat the IC as a single device. The ideal op-amp may be modeled as a simple voltage controlled voltage source (VCVS), where the gain is defined as a large, but finite, value. This “almost-ideal” op-amp is usually given a gain on the order of Go=106 V/V, which is normally large enough to prevent any significant deviation from ideal behaviors. Using the VCVS model, the PSpice statement begins with the letter ‘E’, the voltage at the output nodes (n+, n-) is controlled by the voltage at the input nodes (nc+, nc-), and the e_value field defines the gain. The syntax for a generic VCVS is as follows: Ename n+ n- nc+ nc- e_value. For an ideal op-amp, the output is defined between the output terminal and ground (vout, 0), while the input is defined as between the non-inverting and inverting terminals (v+, v-)of the device. The generic VCVS statement is therefore modified to Ename vout 0 v+ v- Go. To simulate a practical device, it is necessary to include a subcircuit description that defines the characteristics of interest. The subcircuit is a separate entity within the Spice input file that is isolated from the main circuitry except through specified nodal connections. Analogous to a subroutine in a computer program, all nodes (except for the ground node 0) and element names may be local to the subcircuit. The general syntax for a subcircuit is as follows – note that the definition begins with the .SUBCKT statement and ends with the .ENDS statement. .SUBCKT subcircuit_name node_list Circuit description (same language and syntax) Power Supplies, Signal Sources Element Descriptions Model Statement .ENDS [subcircuit_name optional, but a good idea for clarity] Once a subcircuit has been created, it is used in the main circuit as a circuit element. To use a subcircuit in the main circuit, the letter ‘X’ with a unique alphanumeric name defines the element. Other components of the statement are a list of the main circuit nodes (the same number and in the same order as the subcircuit listing but possibly different node designations – except for ground, of course), and the subcircuit being used. Specifically, Xname main_circuit_nodes subcircuit_name. For example, the subcircuit describing the uA741 operational amplifier is (remember that statements beginning with an asterisk are comments): *----------------------------------------------------------------------------* connections: non-inverting input * | inverting input * | | positive power supply * | | | negative power supply * | | | | output * | | | | | .subckt uA741 1 2 3 4 5 * c1 11 12 8.661E-12 c2 6 7 30.00E-12 dc 5 53 dx de 54 5 dx dlp 90 91 dx dln 92 90 dx dp 4 3 dx egnd 99 0 poly(2) (3,0) (4,0) 0 .5 .5 fb 7 99 poly(5) vb vc ve vlp vln 0 10.61E6 -10E6 10E6 10E6 -10E6 ga 6 0 11 12 188.5E-6 gcm 0 6 10 99 5.961E-9 iee 10 4 dc 15.16E-6 hlim 90 0 vlim 1K q1 11 2 13 qx q2 12 1 14 qx r2 6 9 100.0E3 rc1 3 11 5.305E3 rc2 3 12 5.305E3 re1 13 10 1.836E3 re2 14 10 1.836E3 ree 10 99 13.19E6 ro1 8 5 50 ro2 7 99 100 rp 3 4 18.16E3 vb 9 0 dc 0 vc 3 53 dc 1 ve 54 4 dc 1 vlim 7 8 dc 0 vlp 91 0 dc 40 vln 0 92 dc 40 .model dx D(Is=800.0E-18 Rs=1) .model qx NPN(Is=800.0E-18 Bf=93.75) .ends Just as a final note. The subcircuit description for an operational amplifier does not need to be as detailed as that illustrated above. Many times, it is possible to use aspects of the ideal behavior and play with a few parameters. Also, and very nice, many commercially available operational amplifiers are predefined in PSpice for us – so it’s just a matter of including the right part! For our purposes, unless specifically indicated otherwise, the 741 is a good choice for simulations (hint, hint).