Successfully reported this slideshow.
Upcoming SlideShare
×

# Tutorial simulations-elec 380

516 views

Published on

Published in: Technology
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

### Tutorial simulations-elec 380

1. 1. ELEC 380 Electronic Circuits IITutorial and Simulations for Micro-Cap IVByAdam Zielinski(Posted at: http://wwwece.uvic.ca/~adam/)Version: August 22, 2002
2. 2. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-1TUTORIALThis manual is written for Micro-Cap IV - Electronic Circuit Analysis Programfor Macintosh computers. The PC Version of the program is available at:www.spectrum-soft.com. Prior to proceeding please familiarize yourself withthe Simulation Tutorial for ELEC 330 posted at:http://www.ece.uvic.ca/~adam/. In this Tutorial we will explore otherinteresting features of the Micro-Cap IV that are relevant to the material coveredin the class. The simulations #1 to #6 are part of preparation to the laboratorysessions and must be completed before the laboratory and obtained presented tothe laboratory instructor.1. AC AnalysisThe AC analysis allows us to see a frequency response or AC transfer functionH(jω) of a linear circuit. You can imagine that a sinusoidal voltage source withamplitude 1 volt is applied to a specified node of a circuit (input) and thatvoltage and relative phase is measured at a different specified node (output) ofthe same circuit. The voltage ratio or voltage gain and relative phase shiftbetween these two voltages depend on frequency applied. The gain (oftenexpressed in decibels or dBs) and phase are plotted vs. frequency over thespecified frequency range. Frequency often is displayed in logarithmic scale. Insuch scale distance between two frequencies, one 10 times larger than the other isconstant irrespective of absolute frequency and is called a decade. Similarly,distance between two frequencies - one twice the other is constant irrespectivelyof absolute frequency and is called an octave. Such plots are called frequencyresponses (amplitude and phase) of a linear circuit.In electronic circuits we frequently encounter nonlinear elements such astransistors. For frequency response analysis (AC analysis) such elements arelinearized prior to AC analysis. Any nonlinear circuit can be approximated by alinear circuit if the signal applied is sufficiently small.As an illustration let us consider a simple RC circuit shown in Figure T1.10k0.5uE11 2.MODEL E1 SIN (F=32 A=1 DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)Figure T1. RC CircuitThe voltage source should be added but will not play a role in AC analysis. Theoutput voltage phasor V(2) at node 2 is equivalent to H(jω), which is a complexquantity. To get the amplitude response, we need to plot magnitude of H(jω) ormag(V(2)) which is most frequently expressed in dB. This is reflected in thedialog box shown in Figure T2 that also includes phase response PH(V(@)). The
3. 3. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-2frequency range set is from 100 kHz to 1 Hz (if you think that this is a strangeorder, I agree)Figure T2. Dialog BoxThe resulting plot in logarithmic frequency axis is shown in Figure T3 with thecursor.1 10 100 1K 10K-40.00-32.00-24.00-16.00-8.000.0020*log(mag(v(2)))F1 10 100 1K 10K-90.00-72.00-54.00-36.00-18.000.00PH(V(2))FExpression Left Right Delta SlopeExpression Left Right Delta Slope20*log(mag(v(2))) -3.032 -49.943 -46.911 -4.706mF 0.032K 10.000K 9.968K 1Figure T3. The frequency response; amplitude and phaseWe can observe that the amplitude frequency response represents a low-passfilter that attenuates signal at higher frequencies. At a certain frequency theresponse reaches linear asymptote with slope of -20dB/decade. We also can seethat a –3dB-point occurs at 32 Hz. This is consistent with so-called 3dB or cornerfrequency for RC circuit fc = 1/2πRC. This result can be verified in time domainby performing transient analysis for signal frequency at fc=32 Hz with set up asshown in dialog box in Figure T4.
4. 4. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-3Figure T4 Dialog BoxThe results are shown in Figure T5 with cursor activated. We can see that theoutput waveform - v(2) has reduced amplitude to 0.707 volts, which correspondsto 3 dB attenuation as expected. Note also a phase shift between waveforms.Figure T5 Time domain responses2. Spectral AnalysisSpectral analysis of a periodic waveform can be performed on time domain datax(t) using Fast Fourier Transform FFT(x) algorithm. You can think of FFT as aFourier Series of an infinite duration periodic waveform made of infiniterepetitions of the time domain waveform of duration T. The fundamentalfrequency of Fourier Series of such constructed waveform is equal to 1/T. Thiswill determine the frequency resolution of spectral analysis based on FFT, that is∆F=1/T. In order to obtain valid results using FFT it is important to placecomplete number of cycles of the waveform within the observation window T.0m 20m 40m 60m 80m 100m-1.00-0.60-0.200.200.601.00v(1)Tv(2)Expression Left Right Delta Slopev(1) 0.705 0.951 0.246 4.318T 42.984m 100.000m 57.016m 1v(2) 0.705 0.318 -0.387 -6.783
5. 5. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-4FFT calculates complex numbers and often only its magnitude is of interest.Function MAG(FFT(x)) calculates the magnitude.Lets illustrate these points using two sinusoidal waveforms f1=1000Hz withamplitude 1 and another at f2=2000Hz with amplitude 0.5 as shown in Figure T6V1 10k V2 10k.MODEL V1 SIN (F=1000 A=1 DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0).MODEL V2 SIN (F=2000 A=0.5 DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)Figure T6 Two sinusoidal waveformsThe dialog box in Figure T7 leads to the results shown in Figure 8Figure T7 Dialog Box
6. 6. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-5Figure T8 Spectral representation of two harmonic signalsThe frequency points are separated by ∆F = 100Hz as expected. Each frequencycomponent is represented by only one point in the spectrum (triangular shape isdue to the way the points are joined by lines) and two waveforms are fullyresolved. The absolute amplitude of spectral components is related to samplingfrequency of the time-domain waveforms – the higher the sampling rate, thelarger the spectral amplitude. The relative amplitudes and frequency positions ofthe two spectral components are as expected.3. TolerancesValue of parameters of any physical electronic component is given within certainlimits defined by tolerances. For instance, set of resistors with tolerances 10% (or10 % lot) means that an actual individual resistor will have a random valuebetween +/- 10% of its nominal value. Simulation allows us to investigate finitetolerances effect on overall performance of circuit built using real components.Several simulations are to be performed and a random value of a componentwithin specified tolerances is assigned at each run. This is so called Monte Carlomethod (guess where the name came from?). For Worst Case option theparameter is assigned randomly but only at limits of its tolerances. For Nparameters this gives 2^N possible combinations. To establish good confidencelevel, the number of simulations n > 2^N.
7. 7. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-6As an illustration lets go back to the simple circuit from Figure T1 but assumethat the resistor is from 10% lot. With this modification the circuit becomes asshown in Figure T9.10k LOT=10%0.5uE11 2.MODEL E1 SIN (F=32 A=1 DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)Figure T9 RC Circuit with uncertain resistor valueWe will proceed to investigate its frequency response as in Figure T3.The dialog box for Monte Carlo analysis is shown in Figure T10 and the resultsare shown in Figure T11.Figure T10 Dialog Box for Random Simulation n=10Figure T11 Amplitude frequency response for n=10 simulations
8. 8. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-74. Temperature effectsAll real electronic elements change their parameters with temperature changes.This applies to passive elements like resistors as well as to active ones liketransistors or Operational Amplifier. Simulation is an ideal and simple method todetermine the effect of temperature on a circuit. Consider a simple voltagedivider shown in Figure T12.R1R2101 2.Define R2 100K.Define R1 100K TC=0.001Figure T12 Voltage divider circuitHere we use symbols for resistors that need to be defined. Nominal value forboth resistors is 100 kohms but resistor R1 changes its value with temperature asdetermined by its temperature coefficient TC= 0.001. This coefficient specifieshow much the resistance will change from its nominal value at nominaltemperature for a one degree Centigrade of the difference between the nominaltemperature (27 degrees) and the actual one. We will illustrate this by running atransient analysis with printout. The dialog box is shown in Figure T13.Figure T13 Dialog box for temperature variation
9. 9. ELEC 380 Electronic Circuits II - TutorialELEC 380 Tutorial and SimulationsAdam Zielinski  August 20021-8The simulation is run from temperatures –27 degrees to 27 degrees in steps of 27.The numerical results obtained are shown in Figure T14Micro-Cap IVTransient Analysis Limits of TemperatureDate 8/8/02 Time 10:21 PMTemperature= -27 Case= 1T v(2)(uSec) (V)0.000 5.1390.200 5.1390.400 5.1390.600 5.1390.800 5.1391.000 5.139Temperature= 0 Case= 1T v(2)(uSec) (V)0.000 5.0680.200 5.0680.400 5.0680.600 5.0680.800 5.0681.000 5.068Temperature= 27 Case= 1T v(2)(uSec) (V)0.000 5.0000.200 5.0000.400 5.0000.600 5.0000.800 5.0001.000 5.000Figure T 14 The temperature effectsWe can see that the divider functions properly only for the nominal temperatureof 27 degrees but the voltage is higher for other temperatures. This is due to alower resistance of R2 at lower temperatures.
10. 10. ELEC 380 Electronic Circuits II — Simulation #1ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20022-1SIMULATION #1Small Signal AmplifiersThis simulation is part of preparation to the Laboratory Session #1.1. Design the CE amplifier shown in Figure 1-1 for biasing current IE=1mA andgain of 36 (31.1dB) at frequency 1kHz. Note that components values shown inFigure 1-1 are not unique.56k10k9101uF62uF151.5k2N3904MV1.MODEL 2N3904 NPN (BF=378.5 BR=2 IS=15.8478P CJC=3.62441P CJE=4.35493PRC=1.00539U VAF=101.811 TF=666.564P TR=173.154N MJC=300M VJC=770.477MMJE=403.042M VJE=1 NF=1.34506 ISE=61.1468P ISC=0.00155473F IKF=14.2815MIKR=35.709 NE=2.02174 RE=1.10494 VTF=10 ITF=9.79838M XTF=499.979M).MODEL MV1 SIN (F=1K A=5M DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)V iVsVccVoVeFigure 1-1 CE Amplifier2. Select the proper values for the ac source (10mVp-p, f=1kHz) and transistor(beta= BF= 150).3. Set the proper simulation parameters for transient analysis (see dialogbox shown in Figure 1-2) and confirm the dc and ac conditions bysimulation.Figure 1-2 Dialog Box
11. 11. ELEC 380 Electronic Circuits II — Simulation #1ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20022-2Note that under the Transient – Option menu the option of calculating theoperating dc-point was selected. This allows us to see the waveforms in steadystate. Shown in Figure 1-3 is a result:0m 1m 2m 3m 4m 5m-5.00m-3.00m-1.00m1.00m3.00m5.00mVsT0m 1m 2m 3m 4m 5m13.8513.9314.0114.0914.1714.25VoTFigure 1-3 Transient AnalysisAfter running transient analysis select the “state variables” under TransientAnalysis Menu. You can read numerical values of dc for all nodes: In thisparticular case we got:Figure 1-4 State VariablesThis feature is very convenient to verify the dc-analysis. Alternatively, you canselect Node voltages and Node numbers as shown in Figure 1-5
12. 12. ELEC 380 Electronic Circuits II — Simulation #1ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20022-3Figure 1-5 Node Voltages and Node NumbersYou may observe that a waveform at node 3 (output waveform) do not oscillateexactly around 14V, as we would expect. Can you explain it?3. To see the gain vs. frequency we should run an ac analysis. Let us selectthe following parameters shown in Figure 1-6Figure 1-6 Dialog Box
13. 13. ELEC 380 Electronic Circuits II — Simulation #1ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20022-4The result is shown in Figure 1-7100 1K 10K 100K25.0026.0027.0028.0029.0030.00dB(Vo/Vi)FFigure 1-7 Frequency responseYou can see from the graph the gain becomes independent of frequency fromapproximately 1kHz.The lower freq. of operation is frequently defined asfrequency when the gain drops by 3dB compare to the flat portion of thefrequency response. In this case we have the lower frequency of operation at 150Hz.5. Investigate the effects of temperature on the gain by ac analysis andtemperature variation from 0 to 100 degrees in 50 degree steps. Whatparameters in the circuit is temperature dependent? The results are shown inFigure 1-8
14. 14. ELEC 380 Electronic Circuits II — Simulation #1ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20022-5100 1K 10K 100K25.0026.0027.0028.0029.0030.00dB(Vo/Vi)FExpression Left Right Delta SlopedB(Vo/Vi) 25.669 27.355 1.686 16.879uF 0.100K 100.000K 99.900K 1Figure 1-8 Frequency response with a realistic component
15. 15. ELEC 380 Electronic Circuits II —Simulation #2ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20023-1SIMULATION #2Large Signal AmplifiersThis simulation replaces the Procedures part of the Laboratory Session #3 andshould be done prior to the lab. We will introduce here the Fourier Analysis(FFT) in Micro-Cap IV1. Consider the same circuit as in Simulation #1 and shown in Figure 2-1R1R2RCC1C2VCCREC3RLV s2N3904.MODEL Vs SIN (F=10K A=15M DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0).MODEL 2N3904 NPN (BF=378.5 BR=2 IS=15.8478P CJC=3.62441P CJE=4.35493PRC=1.00539U VAF=101.811 TF=666.564P TR=173.154N MJC=300M VJC=770.477MMJE=403.042M VJE=1 NF=1.34506 ISE=61.1468P ISC=0.00155473F IKF=14.2815MIKR=35.709 NE=2.02174 RE=1.10494 VTF=10 ITF=9.79838M XTF=499.979M)VoV iVeVc.DEFINE RL 1K.DEFINE RC 5K.DEFINE RE 1K.DEFINE VCC 9f=10kHzFigure 2-1 Large Signal AmplifierDesign the amplifier shown in Figure 2-1 for the maximum output compliance.Note: the analytic results in this case will not be accurate because of largedistortion present for a large signal applied to CE amplifier. Assume: RL=1k,RC=5k, RE=1k and frequency of operation f=10kHz. In this simulation the valuesof some resistors and capacitors are not given and must be found to obtain:Voltage gain: 42.2 or 32.2dBOutput compliance: PP=2.2V2. Simulate the circuit you have designed. Investigate the gain of the amplifierand all dc-voltages in the circuit.First we check the frequency response of the circuit using ac analysis. Result isshown in Figure 2-2.
16. 16. ELEC 380 Electronic Circuits II —Simulation #2ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20023-2100 1K 10K 100K20.0024.0028.0032.0036.0040.00dB(Vo/Vi)FExpression Left Right Delta SlopedB(Vo/Vi) 3.085 28.874 25.790 258.155uF 0.100K 100.000K 99.900K 1Figure 2-2 Frequency Response of the AmplifierAs we can see the amplifier has the gain is 29 dB, which is less than expected.Investigate and comment of this discrepancy possibly caused by an error in thesoftware.2. Now perform the transient analysis.3.The maximum calculated input signal to avoid output clipping is 55 mV p-p butwe will drive the input with signal 30mVp-p. In simulation select the dc-pointcalculation in order to avoid transients due to capacitances in the circuit.The result are shown in Figure 2-3
17. 17. ELEC 380 Electronic Circuits II —Simulation #2ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20023-30u 60u 120u 180u 240u 300u-15.00m-9.00m-3.00m3.00m9.00m15.00mVs1T0u 60u 120u 180u 240u 300u1.001.401.802.202.603.00VcTFigure 2-3 Input and output signalsNote that the output waveform is quite distorted. This is due to nonlinearcharacteristic of the transistor that shows up for large signal operation. The peak-to-peak output in this case is 0.8 Vp-p.4. Spectral (Fourier) Analysis5.The Fourier analysis performs Fourier series expansion of the analyzed signalusing FFT algorithm as discussed in Tutorial. As noted it is important that youselect a complete number of cycles to assure smooth boundary betweenrepetitions. If the boundary contains discontinuity, higher order harmonics willbe computed which are not present in the actual waveform.Perform the transient analysis and select the following parameters as shown inFigure 2-4. The display will show magnitude of FFT vs. selected range offrequencies.Figure 2-4 Parameters for FFT
18. 18. ELEC 380 Electronic Circuits II —Simulation #2ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20023-4The result is shown in Figure 2-50K 10K 20K 30K 40K 50K0.00140.00280.00420.00560.00700.00mag((FFT(Vc)))FFigure 2-5 The Results of FFTWe can see a dc-component is present at zero frequency; fundamental frequencycomponent is present at 10kHz and higher harmonics at multiple of 10 kHz. Wecan access the numerical values by selecting the “N” option in “TransientAnalysis Limits” and the results are shown in Figure 2-6Figure 2-6 The numerical Results of FFTYou can see that the second harmonic distortion in this case is (4.281/52.49) x100% = 8%. Would you by a stereo with such distortion? What is the acceptablevalue?
19. 19. ELEC 380 Electronic Circuits II — Simulation #3ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20024-1SIMULATION #3Frequency ResponseThis simulation is part of preparation to the laboratory Session #4.1. Consider the circuit similar to that used in Simulation #2 and shown in Figure3-1:R1R2RCC1C2V sVCC1KC31K2N390450f=10kHz.MODEL 2N3904 NPN (BF=378.5 BR=2 IS=15.8478P CJC=3.62441P CJE=4.35493PRC=1.00539U VAF=101.811 TF=666.564P TR=173.154N MJC=300M VJC=770.477MMJE=403.042M VJE=1 NF=1.34506 ISE=61.1468P ISC=0.00155473F IKF=14.2815MIKR=35.709 NE=2.02174 RE=1.10494 VTF=10 ITF=9.79838M XTF=499.979M).MODEL Vs SIN (F=10K A=15MV DC=0 PH=0 RS=50 RP=0 TAU=0 FS=0)V iVoVcVeVs1Figure 3-1 AmplifierThe input is Vs1 and the output is Vo. The resistor Rs=50 represents the internalresistance of the driving source.2. Design the amplifier for 3dB lower frequency fL=10 kHz and midbandgain Vo/Vs of 20 (or 26dB). Assume and set the following parameters forthe transistor.3. Confirm you design by simulation.Simulations.Run the ac analysis. Figure 3-2 shows what you might obtain
20. 20. ELEC 380 Electronic Circuits II — Simulation #3ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20024-21K 10K 100K 1M10.0014.0018.0022.0026.0030.00dB(Vo/Vi)FExpression Left Right Delta SlopedB(Vo/Vi) -2.735 23.182 25.917 25.942uF 0.001M 1.000M 0.999M 1Figure 3-2 Frequency Response of the amplifier4. Assume the transistor parameters as given in the model and predict theupper frequency of operation of your amplifier. Compare it with the resultobtained by simulation and shown in Figure 3-3:1K 10K 100K 1M 10M 100M 1G10.0014.0018.0022.0026.0030.00dB(Vo/Vi)FExpression Left Right Delta SlopedB(Vo/Vi) 23.178 8.186 -14.991 -14.994nF 0.199M 1000.000M 999.801M 1Figure 3-3 Lower and upper frequency of operation
21. 21. ELEC 380 Electronic Circuits II - Simulation #4ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20025-1SIMULATION #4Differential AmplifiersThis simulation is part of preparation to the laboratory Session #5.Consider the differential amplifier that will be used in the laboratory and shownin Figure 4-1:1.5K10MV1547 472N3904 2N39042.2K-15.MODEL 2N3904 NPN (BF=378.5 BR=2 IS=15.8478P CJC=3.62441P CJE=4.35493PRC=1.00539U VAF=101.811 TF=666.564P TR=173.154N MJC=300M VJC=770.477MMJE=403.042M VJE=1 NF=1.34506 ISE=61.1468P ISC=0.00155473F IKF=14.2815MIKR=35.709 NE=2.02174 RE=1.10494 VTF=10 ITF=9.79838M XTF=499.979M).MODEL 10MV SIN (F=1K A=10MV DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)V iVoFigure 4-1 Differential amplifier1. Perform the transient and frequency analysis using Vi as the input Vo as theoutput. The results are shown in Figure 4-2 and Figure 4-30m 0.60m 1.20m 1.80m 2.40m 3m-10.00m-6.00m-2.00m2.00m6.00m10.00mViT0m 0.60m 1.20m 1.80m 2.40m 3m10.1210.1710.2110.2610.3110.36VoTFigure 4-2 Transient analysis
22. 22. ELEC 380 Electronic Circuits II - Simulation #4ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20025-21K 10K 100K 1M 10M 100M10.0014.0018.0022.0026.0030.00dB(Vo/Vi)FFigure 4-3 AC Analysis2. Modify the circuit as shown in Figure 4-4 and repeat the measurements:1.5K10MV1547 472N3904 2N39042.2K-15.MODEL 2N3904 NPN (BF=378.5 BR=2 IS=15.8478P CJC=3.62441P CJE=4.35493PRC=1.00539U VAF=101.811 TF=666.564P TR=173.154N MJC=300M VJC=770.477MMJE=403.042M VJE=1 NF=1.34506 ISE=61.1468P ISC=0.00155473F IKF=14.2815MIKR=35.709 NE=2.02174 RE=1.10494 VTF=10 ITF=9.79838M XTF=499.979M).MODEL 10MV SIN (F=1K A=10MV DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)V iVoFigure 4-4 Modified Circuit
23. 23. ELEC 380 Electronic Circuits II - Simulation #4ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20025-30m 0.60m 1.20m 1.80m 2.40m 3m-10.00m-6.00m-2.00m2.00m6.00m10.00mViT0m 0.60m 1.20m 1.80m 2.40m 3m10.1110.1610.2110.2610.3110.36VoTFigure 4-5 Transient analysis1K 10K 100K 1M 10M 100M10.0014.0018.0022.0026.0030.00dB(Vo/Vi)FExpression Left Right Delta SlopedB(Vo/Vi) 21.834 16.438 -5.395 -53.952nF 0.001M 100.000M 99.999M 1Figure 4-6 AC analysis3. Modify the circuit as shown in Figure 4-7 and perform the time and the frequencyanalysis (note that we have to increase amplitude of the input signal).
24. 24. ELEC 380 Electronic Circuits II - Simulation #4ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20025-41.5K1000MV1547 472N3904 2N39042.2K-15.MODEL 2N3904 NPN (BF=378.5 BR=2 IS=15.8478P CJC=3.62441P CJE=4.35493PRC=1.00539U VAF=101.811 TF=666.564P TR=173.154N MJC=300M VJC=770.477MMJE=403.042M VJE=1 NF=1.34506 ISE=61.1468P ISC=0.00155473F IKF=14.2815MIKR=35.709 NE=2.02174 RE=1.10494 VTF=10 ITF=9.79838M XTF=499.979M).MODEL 1000MV SIN (F=1K A=1000MV DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)V iVoFigure 4-7 Modified Circuit0m 0.60m 1.20m 1.80m 2.40m 3m-1.00-0.60-0.200.200.601.00ViT0m 0.60m 1.20m 1.80m 2.40m 3m9.9110.0410.1710.3010.4410.57VoTFigure 4-8 Transient analysis
25. 25. ELEC 380 Electronic Circuits II - Simulation #4ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20025-51K 10K 100K 1M-20.00-16.00-12.00-8.00-4.000.00dB(Vo/Vi)FExpression Left Right Delta SlopedB(Vo/Vi) -9.612 -9.602 0.010 10.186nF 0.001M 1.000M 0.999M 1Figure 4-9 AC analysis4. Interpret all the results obtained and compare them with calculations
26. 26. ELEC 380 Electronic Circuits II - Simulation #5ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20026-1SIMULATION #5Instrumentation Amplifier using Op. AmpThis simulation is part of preparation to the Laboratory Session #7. We willinvestigate the effects of finite tolerances on the circuit performance.The basic data for a general purpose Op. Amp like LM 741 and for comparisonfor a better performance LM 107 are given in Figure 5-1Figure 5-1 LM741 and LM 107 Data SheetsTask:An instrumentation amplifier with differential gain of 10 is required to operate inthe frequency band from 1kHz to 10kHz. Design such an amplifier using 1%resistors and 741 Op. Amp with finite tolerances of its parameters.Confirm is operation and specify the tolerance of the differential gain and theminimum CMRR your amplifier can provide within the specified band.
27. 27. ELEC 380 Electronic Circuits II - Simulation #5ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20026-21. We will start by designing a simple instrumentation amplifier and check itsdifferential gain using the circuit below. The first stage serves only as aninverter to generate inverted signal needed to drive the amplifier with thedifferential signal only. You might check that it does not introduce any errorin the frequency band of interest.LM74110K10K1K1K 10K10KVLM301A18181818.MODEL V SIN (F=1MEG A=1 DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)Vs Vo.MODEL LM741 OPA (LEVEL=2 ROUTAC=50 ROUTDC=75 IOFF=20N IBIAS=80NVEE=-18 VCC=18 VPS=16 VNS=-16 CMRR=31.6228K).MODEL LM301A OPA (LEVEL=2 TYPE=3 A=160K ROUTAC=50 ROUTDC=75VOFF=2M IOFF=3N IBIAS=70N VEE=-18 VCC=18 VPS=14 VNS=-14)Figure 5-2 Instrumentation AmplifierIts frequency response is shown in Figure 5-3.
28. 28. ELEC 380 Electronic Circuits II - Simulation #5ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20026-3100 1K 10K 100K10.0014.0018.0022.0026.0030.00db(vo/vs)FFigure 5-3 Frequency Response2. Proceed by allowing finite tolerance in the components used to built theamplifier.This is done by specifying the value of a component (resistors in our case) from a5% LOTProceed with the simulation. If only one run is selected, the nominal values forcomponents are assumed. For M runs tolerance limits are randomly selected. ForN parameters this gives 2^N possible combinations. To establish a goodconfidence level M>>2^N.The result obtained for 30 runs is shown in Figure 5-4.
29. 29. ELEC 380 Electronic Circuits II - Simulation #5ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20026-4100 1K 10K 100K10.0014.0018.0022.0026.0030.00DB(Vo/Vs)FFigure 5-4 Frequency response with random parameters3. Modify the circuit as shown in Figure 5-5 to drive it with common modesignal only and perform the ac analysis:
30. 30. ELEC 380 Electronic Circuits II - Simulation #5ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20026-5LM74110K10K1K1K 10K10KVLM301A18181818.MODEL V SIN (F=1MEG A=1 DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)Vs Vo.MODEL LM741 OPA (LEVEL=2 ROUTAC=50 ROUTDC=75 IOFF=20N IBIAS=80NVEE=-18 VCC=18 VPS=16 VNS=-16 CMRR=31.6228K).MODEL LM301A OPA (LEVEL=2 TYPE=3 A=160K ROUTAC=50 ROUTDC=75VOFF=2M IOFF=3N IBIAS=70N VEE=-18 VCC=18 VPS=14 VNS=-14)Figure 5-5 Common Mode SignalThe Common Mode AC response is shown in Figure 5-6.100 1K 10K 100K-110.00-95.00-80.00-65.00-50.00-35.00db(vo/vs)FFigure 5-6 Common Mode response4. From your plots deduce all the required parameters of the inst. amp andcomment on the results obtained.
31. 31. ELEC 380 Electronic Circuits II —Simulation #6ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20027-1SIMULATION #6Design of a low – pass filterThis simulation replaces Laboratory Session #10.Tasks:1. Design the 3rdorder LP Butterworth filter with 3dB bandwidth of 10kHz andgain of 102. Check your design by simulation with the exact component values.3. Select components with 5% tolerances and check the envelope of the frequencyresponse for 50 runs.4. Apply square waveform of 8kHz to your filter and observe the output.Shown in Figure 6-1 is a sample circuit:10K10K10K10K40K10K1.59NF1.59NF1.59NF10KVLM741LM74118181818.MODEL V SIN (F=1MEG A=1 DC=0 PH=0 RS=1M RP=0 TAU=0 FS=0)VsVo.MODEL LM741 OPA (LEVEL=2 ROUTAC=50 ROUTDC=75 IOFF=20N IBIAS=80NVEE=-18 VCC=18 VPS=16 VNS=-16 CMRR=31.6228K)Figure 6-1 Low-pass filter
32. 32. ELEC 380 Electronic Circuits II —Simulation #6ELEC 380 Tutorial and SimulationsAdam Zielinski  August 20027-2The frequency response for the exact components’ values is presented inFigure 6-2.1K 10K 100K2.006.0010.0014.0018.0022.00db(Vo/Vs)FFigure 6-2 Frequency response of the filterFilter response with the 5% components and 50 runs with randomly varyingparameters is shown in Figure 6-31K 10K 100K2.006.0010.0014.0018.0022.00db(Vo/Vs)FFigure 6-3 Frequency response with finite tolerances