ece 468 lab project 2

24
Lab Project 2 Lakshmi Yasaswi Kamireddy 651771619 Part I The objective of the first part of the laboratory assignment is to work with the subcircuit of CCVS and to observe the transfer function of the circuit in Figure1. Figure 1 1. Netlist Representation in Hspice ****************************************************** **** options section ****************************************************** .options post=1 ****************************************************** **** subcircuit section ****************************************************** .subckt my_ccvs in+ in- out ref .param transresistance=100 Ra in+ int 1e-3 vsens int in- dc 0V H1 out ref vsens MAX=5V MIN=-5V transresistance .ends ****************************************************** ****circuit description ****************************************************** rspar in inp 50 x1 inp inm out gnd my_ccvs rfpar out inm 10k in in in gn gn gn gn ou in

Upload: lakshmi-yasaswi-kamireddy

Post on 23-Feb-2017

236 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: ECE 468 Lab Project 2

Lab Project 2Lakshmi Yasaswi Kamireddy651771619

Part I

The objective of the first part of the laboratory assignment is to work with the subcircuit of CCVS and to observe the transfer function of the circuit in Figure1.

Figure 1

1. Netlist Representation in Hspice********************************************************** options section******************************************************.options post=1********************************************************** subcircuit section******************************************************.subckt my_ccvs in+ in- out ref.param transresistance=100 Ra in+ int 1e-3vsens int in- dc 0VH1 out ref vsens MAX=5V MIN=-5V transresistance.ends**********************************************************circuit description******************************************************rspar in inp 50x1 inp inm out gnd my_ccvsrfpar out inm 10kr2par inm gnd 1kc2par inm gnd 10propar out ino 1kclpar ino gnd 100p

in inp

inm

gnd

gnd

gnd

gnd

out ino

Page 2: ECE 468 Lab Project 2

**********************************************************parameters section******************************************************.param transresistance=1e10**********************************************************sources section******************************************************v1 in gnd ac 1**********************************************************specify nominal temperature of circuit in degrees C******************************************************.TEMP= 60********************************************************** analysis section******************************************************.ac dec 10 10k 10e9.print ac gaindB=par('20*log10(v(out)/v(in))').print ac gaindB=par('20*log10(v(ino)/v(in))').alter.param transresistance=1e8.alter.param transresistance=1e7.alter.param transresistance=1e6.alter.param transresistance=1e5.END

2. Transfer Function Plot:Figure 2 shows the transfer function plot of the circuit plotted using data obtained by .print ac gaindB=par ('20*log10(v(ino)/v(in))') command. It is plotted for limited values for observation as values up to 10Ghz does not show a clear difference.

Figure 3 shows transfer function with respect to the output from CCVS.

Observe that as the gain at CCVS increases the gain at the output decreases due to the feedback.

0 20 40 60 80 100 120-20

02040

Output of the circuit

TF1 TF2 TF3 TF4 TF5

Frequency

dB

Figure 2

Page 3: ECE 468 Lab Project 2

0 2000 4000 6000 8000 10000 120000

1020304050607080

Output at the CCVS

TF1 TF2 TF3 TF4 TF5

FrequencydB

Figure 3

5. As seen from the Figure 4 we can observe that greater the value of R greater will be the output at the CCVS. As the voltage across CCVS increases the output of the circuit also increases and hence the gain also increases with increase in transresistance. This can be observed in Figure 2.

Figure 4

Part II

The main objective of this part of the lab is to get used to the circuits designed using the opamps as sub circuits. An inverting amplifier and a low pass filter are designed.A.1. The figure shows the netlist

Figure 5

inm

out

in

Page 4: ECE 468 Lab Project 2

2. Hpsice netlist

********************************************************** options section******************************************************.options post=1 ********************************************************** subcircuit section taken from the handout******************************************************.subckt my_opamp in+ in- out gain=opamp_gainRin in+ in- 1GRout out A0v 1mE1 A0v 0 in+ in- gain MAX=12 MIN=-12.ends********************************************************** circuit description******************************************************r1 in inm 2kx1 gnd inm out my_opamp gain=opamp_gainr2 out inm 4k********************************************************** parameters section******************************************************.param opamp_gain=2e5********************************************************** sources section******************************************************v1 in gnd sin(0V 2.5V 10k)********************************************************** specify nominal temperature of circuit in degrees C******************************************************.TEMP= 27********************************************************** analysis section******************************************************.tran 0.01ms 2ms.print V(out) V(in).print V(in).END

Page 5: ECE 468 Lab Project 2

3. Results:

0 0.2 0.4 0.6 0.8 1 1.2

-6

-4

-2

0

2

4

6

Opamp inverting amplifier

Vout Vin

Time(ms)

Volta

ge

Figure 6

B.4. The figure shows the netlist

Figure 7

5. Hspice Netlist

********************************************************** options section******************************************************.options post=1 ********************************************************** subcircuit section******************************************************

out

inmin

gndgnd

Page 6: ECE 468 Lab Project 2

.subckt my_opamp in+ in- out gain=opamp_gainRin in+ in- 1GRout out A0v 1mE1 A0v 0 in+ in- gain MAX=12 MIN=-12.ends********************************************************** circuit description******************************************************r1 in inm 500x1 inm gnd out my_opamp gain=opamp_gainr2 out inm 2.5kc1 out inm 0.01u

********************************************************** parameters section******************************************************.param opamp_gain=2e5********************************************************** sources section******************************************************v1 in gnd ac 0.5V********************************************************** specify nominal temperature of circuit in degrees C******************************************************.TEMP= 27********************************************************** analysis section******************************************************.ac dec 100 1k 100k.print ac gaindB=par('20*log10(v(out)/v(in))').print v(out) v(in).END

6. Results:Figure 8 shows that approximately from 6KHZ the gain starts falling and approximately at 30 KHz the gain is zero. Until 6Khz the gain is around 13.9 which matches with the theoretical results.

The transfer function analysis shows that the circuit acts as a Low pass filter.

Page 7: ECE 468 Lab Project 2

0 20000 40000 60000 80000 100000 120000

-15

-10

-5

0

5

10

15

20

Transfer Function

Frequency

dB

Figure 8:

Appendix:Part 1:

freq TF1 TF2 TF3 TF4 TF50.01 20.8277 20.8268 20.8185 20.7365 19.9565

0.012589 20.8276 20.8267 20.8184 20.7364 19.95640.015849 20.8274 20.8265 20.8183 20.7363 19.95630.019953 20.8272 20.8263 20.818 20.736 19.9560.025119 20.8268 20.8259 20.8176 20.7356 19.95560.031623 20.8261 20.8252 20.817 20.735 19.9550.039811 20.8252 20.8242 20.816 20.734 19.9540.050119 20.8236 20.8227 20.8144 20.7324 19.95240.063096 20.8211 20.8202 20.8119 20.7299 19.94990.079433 20.8171 20.8162 20.808 20.726 19.946

0.1 20.8109 20.81 20.8017 20.7197 19.93970.125893 20.801 20.8001 20.7918 20.7098 19.92980.158489 20.7853 20.7844 20.7762 20.6942 19.91420.199526 20.7607 20.7598 20.7515 20.6695 19.88950.251189 20.7219 20.721 20.7127 20.6307 19.85070.316228 20.6611 20.6602 20.652 20.57 19.78990.398107 20.5665 20.5656 20.5574 20.4754 19.69540.501187 20.4208 20.4199 20.4116 20.3296 19.54960.630957 20.1995 20.1986 20.1904 20.1084 19.32840.794328 19.8708 19.8699 19.8617 19.7797 18.9997

1 19.3969 19.396 19.3878 19.3058 18.52581.25893 18.7399 18.739 18.7307 18.6487 17.86871.58489 17.8712 17.8702 17.862 17.78 17

Page 8: ECE 468 Lab Project 2

1.99526 16.7817 16.7808 16.7726 16.6906 15.91062.51189 15.4869 15.486 15.4778 15.3958 14.61583.16228 14.0231 14.0222 14.014 13.932 13.1523.98107 12.4393 12.4384 12.4301 12.3481 11.56815.01187 10.7891 10.7882 10.7799 10.6979 9.91796.30957 9.1267 9.1258 9.1176 9.0356 8.25557.94328 7.5063 7.5054 7.4971 7.4151 6.6351

10 5.9819 5.981 5.9728 5.8908 5.110712.58925 4.6055 4.6046 4.5964 4.5144 3.734315.84893 3.4203 3.4194 3.4112 3.3292 2.549119.95262 2.4519 2.451 2.4427 2.3607 1.580625.11886 1.7021 1.7012 1.6929 1.6109 0.83070231.62278 1.1501 1.1492 1.1409 1.0589 0.27856939.81072 0.7608655 0.759959 0.751716 0.669712 -0.1108650.11872 0.495614 0.494706 0.486464 0.404456 -0.3764363.09573 0.3193391 0.318432 0.31019 0.228175 -0.5532279.43282 0.2042487 0.203342 0.195099 0.113075 -0.66913

100 0.1300016 0.129094 0.120852 0.038813 -0.74467125.8925 0.0824821 0.081575 0.073331 -0.00873 -0.79424158.4893 0.0522241 0.051317 0.043073 -0.03903 -0.82774199.5262 0.0330223 0.032115 0.023871 -0.05829 -0.85209251.1886 0.0208616 0.019954 0.01171 -0.07055 -0.87238316.2278 0.0131719 0.012265 0.004017 -0.0784 -0.89293398.1072 0.0083116 0.007405 -0.00084 -0.0835 -0.91809501.1872 0.0052434 0.004336 -0.00392 -0.08696 -0.95314630.9573 0.003305 0.002398 -0.00586 -0.08951 -1.0053794.3282 0.002082 0.001175 -0.00709 -0.09171 -1.0849

1000 0.0013105 0.000403 -0.00788 -0.09403 -1.20721258.93 0.00082389 -8.4E-05 -0.00839 -0.09697 -1.39341584.89 0.00051601 -0.00039 -0.00874 -0.10116 -1.67281995.26 0.00032231 -0.00059 -0.009 -0.1075 -2.08162511.89 0.00019963 -0.00071 -0.00922 -0.11735 -2.65953162.28 0.00012287 -0.00079 -0.00945 -0.1328 -3.44213981.07 7.3986E-05 -0.00084 -0.00975 -0.15709 -4.45045011.87 4.3195E-05 -0.00087 -0.01018 -0.19528 -5.68366309.57 2.3927E-05 -0.0009 -0.01083 -0.25509 -7.11937943.28 1.1659E-05 -0.00092 -0.01184 -0.34822 -8.7214

10000 4.1913E-06 -0.00095 -0.01342 -0.49182 -10.4501Part 2:1.

Time(ms) Vout Vin0 0 0

0.01 -2.9327 1.46640.02 -4.7308 2.36550.03 -4.7439 2.3720.04 -2.9305 1.46530.05 1.6081E-15 -8E-160.06 2.9365 -1.4683

Page 9: ECE 468 Lab Project 2

0.07 4.7308 -2.36540.08 4.7439 -2.3720.09 2.9305 -1.4653

0.1 -3.2162E-151.61E-

150.11 -2.9365 1.46830.12 -4.7308 2.36540.13 -4.7439 2.3720.14 -2.9305 1.46530.15 7.0447E-15 -3.5E-150.16 2.9365 -1.46830.17 4.7308 -2.36540.18 4.7439 -2.3720.19 2.9305 -1.4653

0.2 -6.4324E-153.22E-

150.21 -2.9365 1.46830.22 -4.7308 2.36540.23 -4.7439 2.3720.24 -2.9305 1.4653

0.25 -3.0616E-151.53E-

150.26 2.9365 -1.46830.27 4.7308 -2.36540.28 4.7439 -2.3720.29 2.9305 -1.4653

0.3-1.40894E-

147.04E-

150.31 -2.9365 1.46830.32 -4.7308 2.36540.33 -4.7439 2.3720.34 -2.9305 1.46530.35 1.34771E-14 -6.7E-150.36 2.9365 -1.46830.37 4.7308 -2.36540.38 4.7439 -2.3720.39 2.9305 -1.4653

0.4-1.28648E-

146.43E-

150.41 -2.9365 1.46830.42 -4.7308 2.36540.43 -4.7439 2.3720.44 -2.9305 1.46530.45 1.22525E-14 -6.1E-150.46 2.9365 -1.46830.47 4.7308 -2.36540.48 4.7439 -2.3720.49 2.9305 -1.4653

0.5 6.1231E-15 -3.1E-15

Page 10: ECE 468 Lab Project 2

0.51 -2.9365 1.46830.52 -4.7308 2.36540.53 -4.7439 2.3720.54 -2.9305 1.46530.55 1.10278E-14 -5.5E-150.56 2.9365 -1.46830.57 4.7308 -2.36540.58 4.7439 -2.3720.59 2.9305 -1.4653

0.6-2.81788E-

141.41E-

140.61 -2.9365 1.46830.62 -4.7308 2.36540.63 -4.7439 2.3720.64 -2.9305 1.46530.65 9.8032E-15 -4.9E-150.66 2.9365 -1.46830.67 4.7308 -2.36540.68 4.7439 -2.3720.69 2.9305 -1.4653

0.7-2.69542E-

141.35E-

140.71 -2.9365 1.46830.72 -4.7308 2.36540.73 -4.7439 2.3720.74 -2.9305 1.46530.75 1.02166E-14 -5.1E-150.76 2.9365 -1.46830.77 4.7308 -2.36540.78 4.7439 -2.3720.79 2.9305 -1.4653

0.8 8.1591E-15 -4.1E-150.81 -2.9365 1.46830.82 -4.7308 2.36540.83 -4.7439 2.3720.84 -2.9305 1.46530.85 8.9919E-15 -4.5E-150.86 2.9365 -1.46830.87 4.7308 -2.36540.88 4.7439 -2.3720.89 2.9305 -1.4653

0.9 -2.6143E-141.31E-

140.91 -2.9365 1.46830.92 -4.7308 2.36540.93 -4.7439 2.3720.94 -2.9305 1.46530.95 4.32939E-14 -2.2E-14

Page 11: ECE 468 Lab Project 2

0.96 2.9365 -1.46830.97 4.7308 -2.36540.98 4.7439 -2.3720.99 2.9305 -1.4653

1 8.9702E-15 -4.5E-151.01 -2.9365 1.46831.02 -4.7308 2.36541.03 -4.7439 2.3721.04 -2.9305 1.46531.05 7.59579E-14 -3.8E-141.06 2.9365 -1.46831.07 4.7308 -2.36541.08 4.7439 -2.3721.09 2.9305 -1.4653

1.1-2.53318E-

141.27E-

141.11 -2.9365 1.46831.12 -4.7308 2.36541.13 -4.7439 2.3721.14 -2.9305 1.4653

2.10 13.9797

10.23293 13.979610.47129 13.979610.71519 13.979610.96478 13.979611.22018 13.979611.48154 13.979611.74898 13.979612.02264 13.979612.30269 13.979612.58925 13.9796

12.8825 13.979613.18257 13.979613.48963 13.979613.80384 13.979614.12538 13.9796

14.4544 13.979614.79108 13.979615.13561 13.979615.48817 13.979615.84893 13.9796

16.2181 13.979616.59587 13.979616.98244 13.979617.37801 13.979617.78279 13.9796

Page 12: ECE 468 Lab Project 2

18.19701 13.979618.62087 13.979619.05461 13.979619.49845 13.979619.95262 13.979620.41738 13.979620.89296 13.979621.37962 13.979621.87762 13.979622.38721 13.979622.90868 13.979623.44229 13.979623.98833 13.979624.54709 13.979625.11886 13.979625.70396 13.979626.30268 13.979626.91535 13.979627.54229 13.979628.18383 13.979628.84032 13.979629.51209 13.979630.19952 13.979630.90295 13.979631.62278 13.979632.35937 13.979533.11311 13.979533.88442 13.979534.67369 13.979535.48134 13.979536.30781 13.979537.15352 13.979538.01894 13.979538.90451 13.979539.81072 13.979540.73803 13.979541.68694 13.979542.65795 13.979543.65158 13.979544.66836 13.979445.70882 13.9794

1949.84 13.59021995.26 13.57272041.74 13.5544

2089.3 13.53542137.96 13.51552187.76 13.49482238.72 13.4733

Page 13: ECE 468 Lab Project 2

2290.87 13.45082344.23 13.42742398.83 13.4032454.71 13.37772511.89 13.3512

2570.4 13.32382630.27 13.29522691.53 13.26542754.23 13.23452818.38 13.20232884.03 13.16892951.21 13.13423019.95 13.0982

3090.3 13.06073162.28 13.02193235.94 12.98153311.31 12.93973388.44 12.89633467.37 12.85143548.13 12.80483630.78 12.75663715.35 12.70663801.89 12.65493890.45 12.60153981.07 12.5462

4073.8 12.4894168.69 12.4299

4265.8 12.36894365.16 12.3064466.84 12.2414570.88 12.1744677.35 12.1049

4786.3 12.03374897.79 11.96055011.87 11.8855128.61 11.80745248.07 11.72765370.32 11.64555495.41 11.56135623.41 11.4747

5754.4 11.38595888.44 11.2949

6025.6 11.20156165.95 11.10586309.57 11.00796456.54 10.90766606.93 10.80516760.83 10.7002

Page 14: ECE 468 Lab Project 2

6918.31 10.5937079.46 10.48367244.36 10.3719

7413.1 10.25797585.78 10.14177762.47 10.0232

28183.83 0.84093828840.32 0.65043629512.09 0.45952730199.52 0.26822630902.95 0.0765531622.78 -0.1154932359.37 -0.3078733113.11 -0.5005833884.42 -0.693634673.69 -0.8869335481.34 -1.080636307.81 -1.274537153.52 -1.468638018.94 -1.66338904.51 -1.857739810.72 -2.052640738.03 -2.247741686.94 -2.443142657.95 -2.638643651.58 -2.834444668.36 -3.030345708.82 -3.226446773.51 -3.422747863.01 -3.619148977.88 -3.815750118.72 -4.012551286.14 -4.209452480.75 -4.406453703.18 -4.603654954.09 -4.800856234.13 -4.998357543.99 -5.195858884.37 -5.393460255.96 -5.5912

61659.5 -5.78963095.73 -5.986964565.42 -6.18566069.34 -6.3831

67608.3 -6.581369183.1 -6.7796

70794.58 -6.977972443.6 -7.1764

Page 15: ECE 468 Lab Project 2

74131.02 -7.374975857.76 -7.573477624.71 -7.7721