Professional Documents
Culture Documents
Ex5 (Eee412)
Ex5 (Eee412)
Lab Report
Task 1,2,3:
Code:
clear all;
close all;
clc;
% Given parameters
% Time parameters
t_fault_occurrence = 0; % Time of fault occurrence in
seconds
cycles_per_clearance = [4.5 15 30]; % Cycles per fault
clearance
t_clearance = cycles_per_clearance / f_nominal; % Convert cycles to seconds
t_res = 0.05; % Time resolution in seconds
t_simulation_end = 12; % End time for simulation in
seconds
% Initialize arrays
time_steps = 0:t_res:t_simulation_end;
angle_degrees = zeros(size(time_steps));
angle_degrees(1) = delta_initial_deg;
clearance_idx = 1;
while clearance_idx <= 3
delta_accum = 0;
time_idx = 1;
time_idx = time_idx + 1;
end
plot(time_steps, angle_degrees);
xlabel('Time (s)');
ylabel('Rotor Angle (degrees)');
title('Synchronous Generator Swing Curve'); grid on;
clearance_idx = clearance_idx + 1;
end
% Display critical angle and critical clearing time fprintf('Critical angle = %.5f
degrees\n', critical_angle_deg);
fprintf('Critical Clearing Time = %.5f sec.\n', critical_clearance_time);
Output:
Here, the fault clearing time is more than the critical clearing time of 0.25809 and is 30/60 = 0.5
seconds. This makes the system unstable. The generator's rotor angle may have swung
dramatically if the fault is not fixed within the necessary clearing period, and the system may be
forced into runaway.
Task 4:
Code:
clc;
clear all;
close all;
gamma_dr_fault = 0.755;
gamma_after_fault = 0.847;
Pm_dr_fault = 1.6955;
Pm_after_fault = 1.6696;
Pmax_dr_dault = 5.5023;
Pmax_after_dault = 6.4934;
% del_t = 0.05;
% f = 60;
k = 3.375;
for i=1:1:(length(time)-1) %delta2 iteration
if(time(i)<0.225)
pa = Pm_dr_fault - Pmax_dr_dault*sin((delta_2(i)-gamma_dr_fault)*pi/180);
else
pa = Pm_after_fault - Pmax_after_dault*sin((delta_2(i)-gamma_after_fault)*pi/180);
end
if(i==1)
Kpa = k*pa/2;
else
Kpa = k*pa;
end
Output: