%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Xs.m - Using the OCC & SCC arrays stored, this program % plots the synchronous reactance vs. field current % of a round-rotor synchronous machine. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear; % OC Line Voltage Data Voc=[0 17.39 19.3 21.12 22.78 24.39 25.84 27.13 28.45 29.66 ... 30.78 31.65 32.52 33.66 34.08 34.43 34.78 34.95]*1000; % Field Current Ifoc=[0 350 400 450 500 550 600 650 700 750 800 850 900 ... 1000 1050 1100 1150 1200]; % SC Data, Straight line assumed Isc=8960; Ifsc=500; Isc=Isc/Ifsc*Ifoc; Q=input(' Plot OC/SC curve?( ''Y'' or ''N'' ) = '); if Q=='Y' % Plot OC & SC with air gap line for i=1:length(Voc) % Determine air gap line Vag=Voc(2)/Ifoc(2)*Ifoc(i); if Vag>max(Voc); break; end end plot(Ifoc,Voc,Ifoc,Isc,'-.',[0 Ifoc(i)],[0 Vag],'--' );grid; title('OC & SC characteristics'); xlabel('Field current, A'); ylabel('Line V_o_c, V; I_s_c, A'); legend('V_o_c', 'I_s_c', 'Air gap line', 2); else; end Xs=[]; for i=2:length(Ifoc) % Calculate Xs Xs=[Xs;Voc(i)/sqrt(3)/Isc(i)]; end Xs=[Xs(1);Xs]; figure(2); legend; plot(0,0,Ifoc,Xs); grid; title('Synchronous reactance'); xlabel('Field current, A'); ylabel('X_s, Ohms');