Contents

Team KAB's Analysis of Lab 4 PV Data

Programmer: Aaron Klapheck

% Lab #4 The Reciprocating Air Compressor 20-Nov-08
% Analyzing KAB_COMP_PV.xls.
clear, clc, home
fprintf('The date and time: %s \n', datestr(now))
The date and time: 12-Dec-2008 16:09:11 

Get data from the KAB_COMP_PV.xls file

% Constant data.

P_atm = 30;     % Atmospheric Pressure in inches of Hg (inHg).
T_room = 23;    % Room temperature in degrees Celcius (C).
N = 150;        % Angular acceleration in revolutions per minute (rpm).
d_low = 7;      % Diameter of low pressure piston in inches (in).
d_high = 3.125; % Diameter of high pressure piston in inches (in).
stroke = 5;     % Distance the piston travels in one direction measured
                % in inches (in) aka stroke.


% The following data was recorded over a perid of a few seconds. This data
% is time dependant and shows how the Pressure and Volume change over a
% number of complete cycles. The receiver tank pressure is at 318 psi.


numeric = [0.9766	-4.7656	161.6211
-0.4395	-5.5762	246.0938
0.1465	-5.6738	328.3691
3.4668	-4.9463	341.7969 % HP min
9.3262	-3.5938	339.8438
16.9922	-1.8896	320.5566
26.2695	0.1465	256.5918
35.8398	2.3438	174.0723
43.1152	4.2578	120.6055
47.4121	5.8057	87.1582
48.3398	6.8018	73.4863 % LP min
46.0938	7.2559	66.4063
40.8691	6.9824	63.4766 % HP max
34.1797	6.0205	63.9648
27.0996	4.5557	64.6973
19.7266	2.5928	66.6504
13.0371	0.4248	72.7539
7.1777	-1.8701	88.1348
3.125	-3.667	120.1172
0.4883	-4.9951	179.1992 % LP max
-0.4395	-5.625	270.9961
0.5371	-5.5615	333.7402
4.3457	-4.7021	340.332
10.7422	-3.2471	337.4023
19.1895	-1.3721	309.3262
28.6133	0.6982	236.5723
37.1582	2.6807	164.5508
43.9941	4.5313	114.502
47.9004	6.0791	82.2754
48.0469	6.9873	71.2891
45.1172	7.2705	66.4063
39.9414	6.8896	63.9648
33.0566	5.8252	62.9883
25.2441	4.1016	64.4531
17.627	1.958	67.8711
11.5723	-0.1074	75.6836
6.543	-2.1338	92.5293
2.6367	-3.8965	125.7324
0.1465	-5.1758	193.3594
-0.4395	-5.6787	298.3398
1.123	-5.4297	339.3555
5.127	-4.5166	342.041
11.8652	-2.998	334.7168
21.1914	-0.9473	294.9219
29.9805	1.001	224.3652
39.0625	3.1543	151.3672
44.9707	4.8486	107.666
48.0957	6.2207	79.834
47.7051	7.0898	68.3594
44.1895	7.2314	65.918
38.0371	6.626	64.4531
31.6406	5.542	64.209
24.1699	3.8184	64.209
16.6016	1.6113	67.627
10.3516	-0.5908	78.8574
5.4688	-2.6221	99.6094
2.0508	-4.2236	137.4512
-0.0488	-5.3223	205.8105
-0.293	-5.708	313.9648
1.7578	-5.3125	341.3086
6.543	-4.2041	342.041
13.4766	-2.6465	331.7871
22.4609	-0.6787	286.6211
32.1777	1.499	205.8105
40.5273	3.54	140.625
46.1426	5.2588	99.3652
48.3398	6.46	77.1484
47.3633	7.1631	67.1387
43.1641	7.1924	64.4531
37.0605	6.499	64.4531
29.834	5.1758	64.9414
22.7051	3.4424	64.9414
15.625	1.3184	68.6035
9.3262	-0.9863	80.8105
4.6387	-2.9785	105.957
1.3672	-4.5313	150.6348
-0.2441	-5.4492	226.5625
-0.1465	-5.6885	320.5566
2.2949	-5.1855	339.8438
7.5684	-3.9844	340.0879
15.625	-2.1826	326.416
24.3652	-0.2588	270.9961
33.5938	1.8066	192.3828
41.7969	3.877	130.6152
46.7773	5.5029	93.2617
48.3887	6.665	74.707
46.7773	7.207	67.1387
42.334	7.1143	63.4766
35.6445	6.2695	63.4766
28.2715	4.8193	65.1855
20.8984	2.9102	66.4063
14.3555	0.8496	70.5566
8.5449	-1.3379	83.7402
3.8574	-3.3594	112.0605
0.9277	-4.8047	163.3301
-0.4395	-5.5957	252.1973
0.1465	-5.6641	328.6133
3.125	-5.0098	341.5527
9.1797	-3.6084	339.1113
17.8223	-1.6797	316.6504
26.6602	0.2734	254.3945
35.4004	2.2852	178.2227
42.7734	4.1895	123.291
47.4609	5.8301	86.4258
48.291	6.9092	71.7773
45.9961	7.2852	67.3828
41.2598	7.041	64.209
34.5703	6.1035	62.9883
26.8066	4.4922	63.4766
19.4824	2.5146	66.6504
12.8418	0.332	73.7305
7.2754	-1.8555	88.8672
3.3203	-3.5938	116.9434
0.4883	-5.0146	177.7344
-0.4395	-5.6592	274.9023
0.6348	-5.5664	336.1816
4.0527	-4.79	341.3086
10.2539	-3.374	336.9141
19.1895	-1.3916	308.5938
28.5156	0.6738	237.5488
37.3535	2.7393	164.3066
44.1895	4.5947	114.2578
47.8027	5.9961	83.0078
48.1445	6.958	69.8242
45.3613	7.2705	65.6738
39.6973	6.8555	65.1855
32.8125	5.7764	64.209
25.6836	4.2041	63.2324
18.4082	2.1777	65.6738
11.5723	-0.1416	75.9277
6.3965	-2.2314	94.4824
2.4902	-3.9941	128.9063
0.1465	-5.21	193.3594
-0.4395	-5.7031	291.2598
1.123	-5.4541	337.6465
5.3711	-4.4824	343.0176
12.1582	-2.9297	334.7168
20.5078	-1.0889	298.8281
29.9805	1.0107	224.3652
39.0137	3.1592	151.6113
45.166	4.9414	106.4453
48.1934	6.3037	79.1016
47.8516	7.0801	68.3594
44.4824	7.2656	64.4531
38.3789	6.6992	63.9648
31.3477	5.4932	65.4297
23.8281	3.7451	64.6973
16.9922	1.748	66.4063
10.7422	-0.4346	75.9277
5.4688	-2.627	99.1211
1.9043	-4.2822	140.1367
-0.0977	-5.3613	210.9375
-0.3418	-5.7227	309.5703
1.6113	-5.3662	338.3789
6.543	-4.2188	340.5762
13.8184	-2.583	331.7871
22.8027	-0.6006	283.9355
31.8359	1.4111	208.252
40.0391	3.4082	142.8223
46.0938	5.2344	99.3652
48.3887	6.4893	77.1484
47.2656	7.1777	68.1152
43.4082	7.2021	63.9648
37.5	6.5625	63.2324
29.8828	5.1758	64.4531
22.4121	3.3594	65.6738
15.4297	1.2354	69.5801
9.668	-0.8545	79.3457
4.8828	-2.8564	102.7832
1.3672	-4.5264	151.3672
-0.2441	-5.459	230.7129
-0.0977	-5.6738	324.2188
2.2949	-5.1807	340.5762
7.4707	-3.9893	338.623
15.5762	-2.1875	327.1484
24.707	-0.1807	270.0195
33.9844	1.9092	190.6738
41.4551	3.7793	132.0801
46.6309	5.4297	93.75
48.4375	6.6699	73.9746
46.6797	7.2217	67.3828
42.1875	7.0996	63.9648
36.0352	6.3232	62.9883
28.7598	4.9316	63.2324
20.8984	2.9346	65.6738
14.1113	0.7813	71.5332
8.3496	-1.377	84.4727
4.1016	-3.2227	109.6191
1.0254	-4.707	159.1797
-0.4395	-5.5664	251.709
0.1953	-5.625	330.8105
3.3203	-4.9463	341.0645
8.8867	-3.6719	338.3789
16.7969	-1.9092	320.3125];

% P_low is the pressure in the low pressure cylinder (negative values)(psi)
% P_high is the pressure in the high pressure cylinder (psi)
% D is the displacement of the cylinder (Volts)

P_low = numeric(1:60,1);
D = numeric(1:60,2);
P_high = numeric(1:60,3);

% The following min's and maxes come form the one range of a piston stroke.
% (piston fully up to piston fully down). Measured in voltage
LP_min = 6.8018;
LP_max = -4.9951;
HP_min = -4.9463;
HP_max = 6.9824;

Calculate the Volume of both cylinders

position_LP = stroke./(LP_max-LP_min).*(D-LP_min);
position_HP = stroke./(HP_max-HP_min).*(D-HP_min);
V_low =  (pi.*d_low.^2./4).*position_LP;
V_high = (pi.*d_high.^2./4).*position_HP;

Graph of Volume vs. Low Pressure

plot(V_low, P_low), grid, xlabel('Cylinder Volume'), ...
    ylabel('Cylinder Pressure (psi)'), ...
    title('Low Pressure Cylinder vs. Cylinder Volume')

Graph of Volume vs. High Pressure

plot(V_high, P_high), grid, xlabel('Cylinder Volume'), ...
    ylabel('Cylinder Pressure (psi)'), ...
    title('High Pressure Cylinder vs. Cylinder Volume')