0% found this document useful (0 votes)
38 views10 pages

Eeng 417 Assignment

The document contains MATLAB code for calculating and plotting the relationship between lagging current (la) and input current (If) as well as power factor (pf) in an electrical system. It includes calculations for various power factors and generates plots to visualize the results. The code demonstrates how to compute these values based on given voltage and power parameters.

Uploaded by

KATAKURI - SAMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
38 views10 pages

Eeng 417 Assignment

The document contains MATLAB code for calculating and plotting the relationship between lagging current (la) and input current (If) as well as power factor (pf) in an electrical system. It includes calculations for various power factors and generates plots to visualize the results. The code demonstrates how to compute these values based on given voltage and power parameters.

Uploaded by

KATAKURI - SAMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0-$ Laggin S-3Vp, Tan lo Cae i S 5 oom /eeey Wari(nere\ «Was a Ota a 3 = one [365% vy Fp + oven Leui(s59 8) Bev w fw els a= BED a5 jy Va Fi a Cee (7-7) as he Te p-2sMW Conductance Swseptawe BS al by J OR as oss © ib: aor ~ ets 6! ~P. 2% 9IMi-VE Gs |-sx DVESi§ SS -P. 9ly* Vews |- bVESus =25 = 300s | 2 - Cz) 248) Gs(5)] ~32eote)() O54) Sul 6 ) 25 = 3.45 - 92-04 Cs(S ) SiS) Suet Gal )4 12.46 Ge(6) — 3.9243 C8) = in) Conon S089 coon — — = cocts —» Buna / abs Ale: 2rnet SO PE = CesCo- see) = 0548 Lanes (oestrone Pic mx @ §:% =A La. zsuks 7. gueiesasen - Gb25, ay -P-JV-VEGss |-bVE sing P =-9Y QUE Gs6 + bYE SHS eo Suh xbV, NESS A ome “ERS Seen ee tae y tan (S28) » 68.76" Puoxces ox) \o4.4 aw a) E -25.¢ (0.991) = 20.34KU P=YomwW —4o = 3+ oors| 3% - Ly Go) G{5)]- Sx Cette) ()& 34) Sul) - How Bay - 428 Os (S )— tot Sal & ) BS NC2I Car Co 6) cae Doe ae Noe car (aea Vind (S) wing Nevlen Rephsem Meflod- Snay = Su — SO $s) o ume \S.= Assume (S21) in Rad Pr lng, ny) ee eC 5 34.134 Te ra = 0.3345 —, A\G it) Si = 8 — EDS agus - Ea 8a) ‘BB. O26 —» 2\.\094 3266 wi ee wi) $i, > Bs Tg £694 —» VUAZRI tu qos Earner ) See Pim ee eg SCR — abs UAC ¢ \ixlot 3 Ta: SHLUD Ye ER Ssej4 P= Cs(o-(5 24) =-0.0965 Landy eC) Ph =o Lag — 64 Lecd P-BIe Kk Gs@ [P= Geese eos Prot (VLG aa ee Tas -ts(ox) 664 eA, ca dea) -\ E20, +2) = FH +Gsej9\(\ A LUA) = 35.5 i kw ets a - ples 0 fir Pleo Leodeg Tesco Og | Coe 66.4 i WGsexy wie, EU, + 2G) ~ ZsGsaja( V2. Lie) = 13.43 [423" ww Tp ES GD Lay es 3464 We task flils ove dove by 0 MATLAB Cole: The code: cle; clear; %\Values in Question VL = 30; Vph = 30/ sqrt(3); P=40; Xs = 9i; resyer Z=r+Xs; % Yer % Power factor range pf_values = [0.4:0.1:1, -0.9:0.1:-0.4]; Yona Yor a %An embty arrays to use them as la, If & pf values storage la_magnitudes = []; If_magnitudes = []; pf_list=[]; nr — %This loop is for determining different values of theta as pf varies f_values % Determine if leading or lagging if pf<1 theta =-acos(pf); % Lagging else theta = 0; % Unity pf end % Current la la_mag = P / (sqrt(3) * VL * pf); la = la_mag * exp(-1i * theta); % To store la Values in the array la_magnitudes = [la_magnitudes, abs(la)]; ee ———— % Voltage E Erect = Vph + Z * la; 20 nn a % Current If If = Erect * sqrt(3) / 3.464; % To store If Values in the array If_magnitudes = [If_magnitudes, abs(If)]; Yy- _ %To store pf in the array pf_list = [pf_list, abs(pf)]; a a % Display the results fprintf(‘pf: %.1f\n’, pf); fprintf(‘la: %.1f\n’, abs(la)); fprintf(‘If: %.1f\n', abs(If)); disp( ‘); % Plot [la] vs. [If] figure; plot(If_magnitudes, la_magnitudes, 'o-’); xlabel(‘If (Magnitude)); ylabel(‘la (Magnitude)’); title(‘la vs If Plot); grid on; xlim({min(If_magnitudes)-0.5, max(If_magnitudes)+0.5]); ylim([min(la_magnitudes)-0.5, max(la_magnitudes)+0.5]); — — a panna panne % Plot [ pf] vs. [If] figure; plot(If_magnitudes, pf_list, 'o-’); xlabel(‘If (Magnitude)); ylabel(‘pf’); title(‘pf vs If Plot’); grid on; xlim({min(If_magnitudes)-0.5, max(If_magnitudes)+0.5]); ylim({min(pf_list)-0.5, max(pf_list)+0.5]); The Answers: pf: 0.4 la vs If Plot la (Magnitude) 8 10 Umi}y 12 14 if (Maanitude) 14 16 8 pf vs If Plot 12 If (Magnitude) 10

You might also like