DRAFT: This module has unpublished changes.

MATLAB Codes


ML1

%% Plots made at the second to last left lab bench in Senior Design. 

%%The first plot was made without recalibrating the oscilloscope with each

%%reading. 

 

f=[125, 200, 185.2, 178.6, 166.7, 161.3, 151.5, 140.8, 128.2, 119, 107.5, 98.04, 86.21, 76.92, 67.57, 58.82, 44.64, 37.59, 26.04];

V=[.686, .620, .626, .645, .645, .657, .664, .668, .687, .687, .693, .708, .699, .720, .709, .715, .739, .695, .736];

figure(1)

subplot(4,1,1)

plot(f,V)

xlabel('Frequency kHz')

ylabel('Voltage Vrms')

title('V vs F for C=510 pF and Vin ~ 735 mVrms')

 

f1=[186.6,173.6,164.5,147.1,135.1,125,116.3,106.4,94.34,86.21,78.13,72.46,65.79,

58.14,50,42.37,36.76,31.25,26.04];

v1=[634,637,658,668,675,685,688,693,713,703,724,718,718,714,717,719,714,736,715];

subplot(4,1,2)

plot(f1,v1)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=510 pF and Vin ~ 735 mVrms')

 

f2=[200,189.4,178.6,168.9,162.3,152.4,140.4,129.9,116.3,106.4,96.15,87.72,78.13,

69.44,60.24,41.14,39.68];

v2=[693,695,692,711,727,735,756,743,739,744,732,746,702,684,676,612,563];

subplot(4,1,3)

plot(f2,v2)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=390 pF and Vin ~ 735 mVrms')

 

f3=[204.9,193.8,182.5,173.6,166.7,156.3,147.9,138.9,135.1,122,117.6,108.7,102,87.72,

76.92,66.67,55.87];

v3=[709,714,703,704,725,729,734,764,738,732,736,739,727,709,711,681,631];

subplot(4,1,4)

plot(f3,v3)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=300 pF and Vin ~ 735 mVrms')

 

%% Plots made using the last right lab bench in Senior Design.

 

f4=[100,104.7,111.1,113.6,119,125,131.6,135.9,141.2,145.3,150.6];

v4=[709,696,708,706,694,699,704,677,679,688,697];

figure(2)

subplot(3,1,1)

plot(f4,v4)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=310 pF and Vin ~ 710 mVrms')

 

f5=[155.3,151.5,145.3,140.4,135.9,129.9,125,119,114.9,108.7,106.4,100];

v5=[697,695,685,676,675,702,694,691,706,703,695,701];

subplot(3,1,2)

plot(f5,v5)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=320 pF and Vin ~ 710 mVrms')

 

f6=[100,106.4,111.1,116.3,119,125,131.6,135.1,140.4,145.3,150.6];

v6=[703,696,707,706,695,699,704,676,680,689,695];

subplot(3,1,3)

plot(f6,v6)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=300 pF and Vin ~ 710 mVrms')

 

 

%% Plots made using the first lab bench on the right of 283

 

f7=[100,104,108.7,113.6,120.5,125,129.9,135.1,140.8,147.1,150.6,155.3,160.3,166.7];

v7=[688,679,690,688,673,679,683,671,669,676,677,679,675,665];

figure(3)

subplot(4,1,1)

plot(f7,v7)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=300 pF and Vin ~ 700 mVrms')

 

f8=[100,105.3,108.7,113.6,122,125,128.2,135.1,140.8,147.1,150.6,156.3,160.3,164.5];

v8=[682,673,684,683,669,673,678,666,664,671,671,674,670,659];

subplot(4,1,2)

plot(f8,v8)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=310 pF and Vin ~ 700 mVrms')

 

f9=[100,105,109.6,114.7,120.2,125,130.2,135.9,140.4,145.3,150.6,156.3,160.3,165.6];

v9=[669,684,695,697,688,674,660,651,654,662,670,672,667,657];

subplot(4,1,3)

plot(f9,v9)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=320 pF and Vin ~ 700 Vrms')

 

f10=[100,105,109.6,114.7,120.2,125,130.2,135.1,140.4,145.3,150.6,156.3,160.3,166.7];

v10=[667,681,693,695,685,670,658,650,651,660,667,670,665,654];

subplot(4,1,4)

plot(f10,v10)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=330 pF and Vin ~ 700 Vrms')

 

%% Plot made using the first lab bench on the left of 283

 

f11=[60.24,65.36,69.93,75.76,80,85.47,89.29,96.15,100,104.2,111.1,116.3,120.5,125,

131.6,135.1,139.7,146.2,150.6,155.3,160.3,164.5,170.1,176.1,181.2,185.2,190.8,

195.3,201.6,211.9];

v11=[1,1.03,1.02,1.06,1.09,1.08,1.08,1.12,1.11,1.10,1.12,1.12,1.1,1.11,1.12,1.11,1.09,1.1,

1.11,1.11,1.1,1.09,1.06,1.05,1.04,1.05,1.05,1.05,1.04,0.983];

figure(4)

plot(f11,v11)

xlabel('Frequency kHz')

ylabel('Voltage Vrms')

title('V vs F for C=390 pF and Vin ~ 1.2 Vrms')

 

%% Plots made using the second lab bench on the left of 283

%%We had attempted to go a single frequency at a time.  The equipement

%%ended up giving the same frequency over and over for some ranges of

%%picked frequencies.  Their voltages are averaged together.

 

f12=[120.5,122,123.5,125,126.6,128.2,131.6,135.1,135.9,137.4,138.1,138.9,140.4];

v12=[694,693,696,695,701,703,698,691,675,675,675,677,677];

figure(5)

subplot(2,1,1)

plot(f12,v12)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=160 pF and Vin ~ 700 mVrms')

 

f13=[120.5,122,125,126.6,128.2,131.6,135.1,135.9,137.4,138.1,138.9,140.4];

v13=[689,687,693,696,700,697,690,672,673,673,673,675];

subplot(2,1,2)

plot(f13,v13)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=170 pF and Vin ~ 700 mVrms')

 

ML2

%% Plots made at the second to last right lab bench in Senior Design. 

 

f=[50,55,60.24,65.79,70.42,75.76,80.65,86.21,90.91,96.15,100,106.4,111.1,116.3,122,

125,129.9,135.9,142,145.3,151.5,156.3,160.3,168.9,177.3,176.6,181.2,186.6,189.4,

195.3,201.6];

V=[10.2,11.6,12.6,14.1,15.1,16.7,18.7,20.4,22.2,25.3,27.4,30.1,34.7,38.7,42.4,49.2,55.9,

64.6,77.4,93.3,116,142,179,208,170,169,142,119,107,94.5,83.2];

figure(1)

subplot(2,1,1)

plot(f,V)

xlabel('Frequency kHz')

ylabel('Voltage Vrms')

title('V vs F for C=22 nF and Vin ~ 680 mVrms')

 

f1=[160.3,162.3,164.5,165.6,166.7,167.9,168.9,171.2,173.6,176.1];

v1=[167,182,194,202,205,208,208,204,195,177];

subplot(2,1,2)

plot(f1,v1)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=22 nF and Vin ~ 680 mVrms')

 

%%Approximate resonance frequency = 168.4 kHz

%%Approximate Inductance = 40.6 uH

%%Approximate Capacitance Needed for 125 kHz = 36.35 nF

 

f2=[111.1,116.3,122,125,131.6,135.1,140.4,145.3,150.6,156.3];

v2=[60.8,81.6,101,121,148,146,117,95.9,81.1,64.5];

figure(2)

subplot(2,1,1)

plot(f2,v2)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=36.3 nF and Vin ~ 680 mVrms')

 

f3=[125,128.2,131.6,133.35,135.5,138.9];

v3=[127,137.5,148,149,137,125];

subplot(2,1,2)

plot(f3,v3)

xlabel('Frequency kHz')

ylabel('Voltage mVrms')

title('V vs F for C=36.3 nF and Vin ~ 680 mVrms')

 

%%Approximate resonance frequency = 133.35 kHz

%%Approximate Inductance = 39.2 uH

%%Approximate Capacitance Needed for 125 kHz = 41.35 nF

 

%%AVERAGE VALUES: L = 39.9 uH; C = 38.85 nF

 

ML3

% First Right Lab Bench of Senior Design

%Ordered coil specification was 2.8 mH.  Corresponding capacitance is

%578.98 pF

f=[11.36,20.16,29.41,40.65,52.08,60.98,71.43,81.97,90.91,100,111,122,131.6,143.7,

150.6,160.3,171.2,181.2,192.3,201.6];

V=[571,573,568,574,561,576,559,574,564,568,572,558,566,555,565,564,546,540,548,

545];

figure(1)

plot(f,V)

xlabel('Frequency kHz')

ylabel('Voltage Vrms')

title('V vs F for C=580 pF and Vin ~ 730 mVrmsX10 probe')

 

ML4

% Coil #4 33nF

% First Right Lab Bench of Senior Design

f=[10.64, 19.23, 30.12, 40.32, 50, 60.24, 62.11, 64.1, 65.79, 66.67, 67.57, 68.49, 70.42, 71.43, 73.53, 75.19, 76.92, 78.13, 79.37, 80.65, 91.74];

V=[8.24, 14.6, 25.6, 41.4, 69, 139, 167, 200, 225, 240, 259, 265, 268, 260, 240, 218, 184, 174, 163, 145, 85.8];

figure(1)

plot(f,V)

xlabel('Frequency kHz')

ylabel('Voltage Vrms')

title('V vs F for C=33 nF and Vin ~ 730 mVrmsX10 probe')

 

ML5

% Coil #5 27nF

% First Right Lab Bench of Senior Design

f=[119,122,125,126,128.2,131.6,133.3,138.9,142];

V=[90.5,98.1,112,122,131,141,151,152,148];

figure(1)

plot(f,V)

xlabel('Frequency kHz')

ylabel('Voltage Vrms')

title('V vs F for C=27 nF and Vin ~ 730 mVrmsX10 probe')

%Fres~138.9 kHz, Therefore for 125 kHz:

%L~ 48.626 uH

%C~ 32.42 nF

 

DRAFT: This module has unpublished changes.