You are on page 1of 19

ELL 775 : Power System Dynamics

Akshay Kumar Bhyri Prof. Nilanjan Senroy


2019QIZ8449 Homework - III November 1, 2019

Problem
1. Compute the modes of oscillations for the three-machine system, you explored in the
last homework.
2. Add a small 10-MW load on bus 8, at t = 0.1s.
(a) Calculate the immediate share of this additional load on the three machines. Use
the concept of synchronizing power coefficients.
(b) Calculate the share of this additional load on the three machines after some time.
Use the concept of inertia constants.
3. Simulate the switching of the load in time-domain. Verify the above results obtained
in parts 1, 2(a) and 2(b).

Figure 1: IEEE 3-Machine 9-Bus System with Line Flow Data indicated. Voltages are in pu
while the powers are in MW and MVAR in system base of 100 MVA.

1
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Figure 2: Generator Data.

Figure 3: Network Data.

2
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Solution
Part - 1 : Modes of Oscillation
A system under natural circumstances tries to be in harmony with its surroundings and
thus has a tendency to move to a the state of equilibrium i.e. the state of minimum energy
with the surroundings. However, when subjected to an external disturbance, it experiences
dynamics by virtue of the flow of causality and tries to adjust itself accordingly by gaining
energy from this disturbance.

However, in a special case, if the disturbance is small and ephemeral, the surroundings
(which also accounts the source of disturbance) are quickly restored to some other state of
equilibrium, while the system still experiences dynamics. By virtue of the flow of causality,
the system tries to adjust itself accordingly in response to this phenomenon.

In such a case, where dynamics in surroundings have faded away while the system is still
experiencing dynamics by virtue of the excess energy gained from this disturbance, the system
at one point becomes more energetic than the surroundings. Thus the flow of causality is
reversed and the excess energy is returned back to its surroundings in order to re-create
harmony.

By virtue of its inertia, the system continues to transfer energy to the surroundings even
when it has fallen below the energy of the surroundings. Thus as soon as its dynamics die
out, the system has lost a little more energy than it was supposed to lose. Therefore, the
system tries to regain the energy deficit from the surroundings in order to re-establish the
state of harmony with its surroundings.

As the system naturally hunts for a state of equilibrium, the phenomenon occurs in multiple
cycles causing a to-and-fro motion in its energy space. This is what we call as Oscillations.

Thus, Modes of Oscillation of a system can be found out if we can re-create such a situation
and then study the dynamic aspects of this to-and-fro motion. The same can be applied to
a Power System Network also, which is the system under study in this scenario. Rest of the
entities which are present in its vicinity of the system are surroundings, including the source
of disturbance. Generally, these aspects are characterized by its Oscillation Frequency and
Damping Rate and are termed as Modes of Oscillation of that system.

3
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

From the given network, we can obtain its Modes of Oscillation as follows :-
1. Apply a small perturbation (disturbance about its point of equilibrium)to the system.
In such a case, we can use the small signal representation of the system.
2. In the standard form of a small signal model in its state space, the eigenvalues of the
state transition matrix gives the Modes of the system in Complex Form, where the real
part gives the Damping Frequency in Np/s while the imaginary part gives the Natural
Oscillation Frequency of each state.

MATLAB Code for Part-1


Algorithm 1: Calculating Modes of Oscillation
%% PSD Homework−3

%% @Akshay Bhyri, 2019QIZ8449, IIT−Delhi.

%% Legend and Conventions

% where,
% Yb = System Y−Bus matrix with PV Bus pushed to Generator Excitation Node.

%% Note

% A and B can be input through command prompt or Excel/CSV file.


% The program is user dependent and fulfills the required criteria.

%% Intro

HW2 % Recalling network data and parameters from Homework−2.

%% Part − 1 : Modes of Oscillation

% Here Modes of Oscillation of relative swings will be computed. The mode


% corresponding to the reference machine is a free parameter and the
% computed modes vary relatively.

Yr=Yrb; % Temporary Y−Bus data storage variable for computation process.

% Calculating Synchronizing Electrical Power Coefficients

Yrm=abs(Yr);

4
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Yrp=angle(Yr);
Pes=zeros(size(Peb));
Pesr=zeros(size(Yr));
aesr=zeros(size(D));
for i=1:ng
for j=1:ng
if j==i
continue;
else
aesr(i,j)=D(j)−D(i)+Yrp(i,j);
Pesr(i,j)=E(i)∗E(j)∗Yrm(i,j)∗sin(aesr(i,j));
end
end
Pes(i)=sum(Pesr(i,:)); % Multiplying Er(i) outside loop to hasten process.
end

% Relative Synchronizing Power Coefficient Matrix

A=zeros(ng);
Meb=Me;
for i=1:ng
Meb(i)=Me(i)∗G(i)/MVAbase; % Normalizing M=2∗H/w from m/c to system base.
end
nh=1; % Serial No. of Heaviest Machine;
for i=1:ng
if i˜=nh
for j=1:ng
if j˜=nh
if j==i
A(i,j)=−(Pes(i)/Meb(i)+Pesr(nh,i)/Meb(nh));
else
A(i,j)=−(Pesr(nh,j)/Meb(nh)−Pesr(i,j)/Meb(i));
end
end
end
end
end
A(:,nh)=[]; % Removing the reference machine related column to make the system full rank,
% as it is taken care of in the relative equations.
A(nh,:)=[]; % Same as above rowwise.

Am=zeros(2∗(ng−1));

5
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Am(1:ng−1,ng:end)=eye(ng−1);
Am(ng:end,1:ng−1)=A; % Am = Final Small signal state transition matrix.
ega=eig(Am); % Modes Contained in eigenvalues of Am.
sgs=real([ega(1) ega(3)]); % Damping Frequencies (Np/s)
wes=imag([ega(1) ega(3)]); % Oscillation Frequencies (rad/s)
fes=wes/2/pi; % Oscillation Frequencies (Hz)
[fes,ind]=sort(fes); % Rearranging in ascending order.
Qo=zeros(ng−1);
for i=1:ng−1
Qo(i,ind(i))=1;
end
sgs=sgs∗Qo; % Rearranging in ascending order.
wes=wes∗Qo; % Rearranging in ascending order.
tes=[1/fes(1) 1/fes(2)]; % Time Periods (sec)

6
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Part - 2 : Distribution of Power Impacts


2(a) : Immediate Distribution of Power Impacts (t=0+)

The immediate effect (assuming the network response to be fast) of the application of PL∆
is that the angle of bus - k is changed while the magnitude of its voltage Vk is unchanged,
or Vk ∠δk0 , becomes Vk ∠(δk0 + δk∆ ). Also the internal angles δ1 ..δN of the machine nodes do
not change instantly because of the rotor inertia. (Where N = No. of Machines). Therefore
from the above initial condition and the machine swing equations, we get,

PL∆ (0+)
δk∆ (0+) = − PN
i=1 Psi,k

Pi∆ (0+) = −Psi,k ∗ δk∆ (0+), i = 1..N


As asked in the question, we put PL∆ = 10M W .

MATLAB Code for Part - 2(a)

Algorithm 2: Calculating Immediate Distribution of Power Impacts (t=0+)


% Adding 10 MW load in shunt as a small change

Yrld=Ybp(1:ng+1,1:ng+1)−Ybp(1:ng+1,ng+2:n)∗((Ybp(ng+2:n,ng+2:n))\Ybp(ng+2:n,1:ng+1));
Pesd=zeros(ng+1,1);
aesd=zeros(ng+1,1);
Yrmd=abs(Yrld);
Yrpd=angle(Yrld);
for i=1:ng
aesd(i)=dpf(nd)−D(i)+Yrpd(i,ng+1);
Pesd(i)=E(i)∗vmpf(nd)∗Yrmd(i,ng+1)∗sin(aesd(i));
% if i==ng+1
% Pesr(i,j)=−Pesr(i,j); % Load bus=>−ve convention.
% end
end
Ld=10; % Specify Load Change in MW.
Pki=−Ld/MVAbase; % Load addition in pu, −ve sign depicting power demand.

% Part − 2(a) : Immediate distribution of Power Impacts (t=0+)

% At t=0+, change in load power i.e. bus−8 demand

7
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

dkd0=Pki/sum(Pesd); % Immediate change in load angle.


Pida=zeros(ng+1,1);
for i=1:ng
Pida(i)=Pesd(i)∗dkd0;
end
Pida(ng+1)=−Pki; % Immdediate Power Distribution on Small Load Change.
Pesa=Prb+Pida(1:ng); % New Power Point.
Pila=zeros(ng,1);
for i=1:ng
Pila(i)=Pida(i)/Pida(ng+1)∗100; % Percentage of Load Shared by each machine at t = 0+.
end

8
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

2(b) : Distribution of Power Impacts after a long time (t >= 5τi )

After a long time, all machines swing at a frequency close to their mean frequency ω̄. Putting
this in the dynamic swing equation, we get that Distribution of Power Impacts follow the
following relationship :-
1 dω¯∆ PL∆ (0+)
. = − PN
ωR dt i=1 2Hi
1 dω¯∆
Pi∆ (0+) = −2Hi ∗ . , i = 1..N
ωR dt

MATLAB Code for Part - 2(b)

Algorithm 3: Calculating Distribution of Power Impacts after a long time (t >= 5τmax )
% Part − 2(b) : Distribution of Power Impacts after a long time.

% Here, we assume the machines swing at mean frequency together.

Hb=Meb∗wer(1)/2;
Pidb=zeros(ng+1,1);
for i=1:ng
Pidb(i)=Hb(i)∗Pki/sum(Hb);
end
wd=Pki/2/sum(Hb);
Pidb(ng+1)=Pki; % Power Distribution on Small Load Change after a long time.
Pesb=Pes+Pidb; % New Power Point.
Pilb=zeros(ng+1,1);
for i=1:ng
Pilb(i)=Pidb(i)/Pidb(ng+1)∗100; % Pidb expressed as percentage of Load shared.
end

9
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Part - 3 : Simulation of Machine Dynamics


The dynamics of the machine under the circumstance mentioned in the question are simulated
in MATLAB environment with the help of ’ode45’ solver. This is done as follows :-

MATLAB Code for Part - 3


Algorithm 4: Simulation of Machine Dynamics on small load addition at bus - 8
%% Part − 3 : Simulation of Machine Dynamics

Yrla=Yr;
qd=0;
Sd=complex(Pida(ng+1),qd);
% Assuming load voltage magnitude doesn’t change on small disturbance.
Yd=conj(Sd)/(vmpf(nd)ˆ2); % pu Load Shunt Admittance
Yrld(ng+1,ng+1)=Yrld(ng+1,ng+1)+Yd; % New modified reduced Y−Bus after load addition.
Yrlb=Yrld(1:ng,1:ng)−Yrld(1:ng,ng+1)∗((Yrld(ng+1,ng+1))\Yrld(ng+1,1:ng));

% Using ode45 solver.

ti=1; % Time instant w.r.t. ref instant at which the load is changed.

% Initial State
tspanb = [0 ti]; % Initial state duration from time reference instant.
% Initial Condition is the previous Steady State or pre−fault condition.
yb0=[D,zeros((ng),1)]’;

% Swing Equation ODE solution in pre−fault state using ode45 solver.


[tb,yb] = ode45(@(tb,yb) swing1(tb,yb,Pm,Yr,E,ng,Me,G,MVAbase),tspanb,yb0);

%Post−Load Addition
ts=5;
tspana = [ti ti+ts]; % Obtaining post−fault response till 6s.
Yr=Yrlb;
ya0=yb(end,:)’; % Initial condition is the last during−fault condition.
% ya0(7)=ya0(7)+dkd0;

% Swing Equation ODE solving in post−fault state using ode45 solver.


[ta,ya] = ode45(@(ta,ya) swing1(ta,ya,Pm,Yr,E,ng,Me,G,MVAbase),tspana,ya0);

% Combined response plot preparation.


to=[tb;ta]; % Concatenating time axes for combined response viewing.

10
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

yo=[yb;ya]; % Concatenating solutions in different temporal zones.

% Instantaneous Power Swing

Peid=zeros(max(size(yo)),ng);
Peip=Peid;
for i=1:ng
Peid(:,i)=Pm(i)−yo(:,2∗i)∗Me(i)∗G(i)/MVAbase+Pki;
%Peip(:,i)=−Peid(:,i)/Pki∗100;
end

% Converting Rotor Angle w.r.t. slack reference angle to Electrical−deg.


yo(:,1)=yo(:,1)∗180/pi;
yo(:,3)=yo(:,3)∗180/pi;
yo(:,5)=yo(:,5)∗180/pi;
% Converting Rotor Angular Frequency Deviations to Electrical−Hz.
yo(:,2)=yo(:,2)/2/pi;
yo(:,4)=yo(:,4)/2/pi;
yo(:,6)=yo(:,6)/2/pi;

%% Plot − 1 : Absolute Swings


% Generator Load Angle Dynamics
figure();
hold(’on’);
grid(’on’);
plot(to,[yo(:,1),yo(:,3),yo(:,5)]);
title(’Dynamics of IEEE 9−Bus System Machines with ODE45 Solver’);
xlabel(’Time (sec)’);
ylabel(’Rotor Load Angles (Elec−deg)’);
legend(’Machine − 1’,’Machine − 2’,’Machine − 3’,’Location’,’northwest’);

% Generator Speed Dynamics


figure();
hold(’on’);
grid(’on’);
ym=(yo(:,2)+yo(:,4)+yo(:,6))/3;
plot(to,[yo(:,2),yo(:,4),yo(:,6),ym]);
title(’Dynamics of IEEE 9−Bus System Machines with ODE45 Solver’);
xlabel(’Time (sec)’);
ylabel(’Rotor Speed Deviations (Elec−Hz)’);
legend(’Machine − 1’,’Machine − 2’,’Machine − 3’,’Mean Frequency’,’Location’,’northwest’);

11
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

% Absolute Power Swings


figure();
hold(’on’);
grid(’on’);
plot(to,Peid);
title(’Dynamics of IEEE 9−Bus System Machines with ODE45 Solver’);
xlabel(’Time (sec)’);
ylabel(’Additional Load Serving Power Swings (pu)’);
legend(’Machine − 1’,’Machine − 2’,’Machine − 3’,’Location’,’northwest’);

%% Plot − 2 : Relative Swings

% Taking the heaviest machine i.e. Machine − 1 rotor as the swing angular
% reference (since it exhibits smallest swing w.r.t. absolute
% angular reference), we plot the relative swings.
% Generator Angle Dynamics
figure();
hold(’on’);
grid(’on’);
plot(to,[(yo(:,3)−yo(:,1)),(yo(:,5)−yo(:,1))]);
title(’Dynamics of IEEE 9−Bus System Machines with ODE45 Solver’);
xlabel(’Time (sec)’);
ylabel(’Rotor Load Angles (Elec−deg)’);
legend(’Machine − 2 w.r.t. Machine − 1’,’Machine − 3 w.r.t. Machine − 1’);

% Generator Speed Dynamics


figure();
hold(’on’);
grid(’on’);
plot(to,[(yo(:,4)−yo(:,2)),(yo(:,6)−yo(:,2))]);
title(’Dynamics of IEEE 9−Bus System Machines with ODE45 Solver’);
xlabel(’Time (sec)’);
ylabel(’Rotor Speed Deviations (Elec−Hz)’);
legend(’Machine − 2 w.r.t. Machine − 1’,’Machine − 3 w.r.t. Machine − 1’);

12
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Algorithm 5: ODE Function for Solver


function dydt = swing1(t,y,Pm,Yr,E,ng,Me,G,MVAbase)
% Dynamic Swing Equation for Synchronous Machine.
% Estimation of Rotor Dynamic States in ode45 solver.
d=[y(1);y(3);y(5)];
%Assuming classical machine model, fast exciters keeping E constant.
[Vrr,Vri]=pol2cart(d,E);
Vr=complex(Vrr,Vri);
Ir=Yr∗Vr;
Pe=zeros(ng,1);
Pas=Pe;
wd=Pas;
for i=1:ng
Pe(i)=real(Vr(i)∗conj(Ir(i))); % Electrical Power Calculation
end
Pa=Pm−Pe; % Rotor Accelerating Power in System base MVA.
for i=1:ng
% Converting Rotor Accelerating Power in Machine base MVAs.
Pas(i)=Pa(i)∗MVAbase/G(i);
wd(i)=Pas(i)/Me(i);
end
dydt=[y(2);wd(1);y(4);wd(2);y(6);wd(3)];
end

13
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Results
The above code is run in MATLAB R2018a environment. The data obtained is as follows :

1. Modes of Oscillation : [A B] = [1.3827 Hz 2.1266 Hz], where A = Swing of Machine -


2 relative to Machine - 1 and B = Swing of Machine - 2 relative to Machine - 1 swing.
2. Distribution of Power Impacts
(a) Immediate (t=0+) : [M/c-1, M/c-2, M/c-3] = [3.0152 MW, 4.0272 MW, 2.9576
MW]
(b) After long time (t >= 5τmax ) : [M/c-1, M/c-2, M/c-3] = [7.1528 MW, 1.9365
MW, 0.9107 MW]
3. Simulation and verification of the same : (See next page)

14
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

The generator rotor dynamics is simulated when a small disturbance (load change of 10 MW)
occurs at bus - 8. The change is created at t=ti =1 sec and the dynamic behaviour is simu-
lated for t=ti + ts =6 sec (slightly more than 5 times of the highest time constant).

Figure 4: Rotor Angle dynamics w.r.t. slack reference angle for all machines.

15
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Figure 5: Rotor Angle dynamics w.r.t. Heaviest Machine (Machine-1) Angle.

• We can see from the data tips that the time periods of relative oscillations w.r.t M/c -
1 comes to about 0.75 sec and 0.5 sec for M/c - 2 and 3 respectively. This is very close
to the result obtained by small signal model.

16
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Figure 6: Rotor Angular Electrical Frequency Deviation dynamics w.r.t. system base
frequency.

• We can see from the data tips that the rate of change of the mean frequency deviation
given by the slope is around 0.09 Hz/s, which agrees to the calculated value for Part -
2(b).

17
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Figure 7: Rotor Angular Electrical Frequency Deviation dynamics w.r.t. Heaviest Machine
(Machine-1) Frequency Deviation from system base frequency.

18
ELL 775 : Power System Dynamics
Akshay Kumar Bhyri Prof. Nilanjan Senroy
2019QIZ8449 Homework - III November 1, 2019

Conclusion
• From the response curves, we see that the simulated values of the Modes are very close
to the ones calculated using the small-signal model hence validating its accuracy for a
small disturbance of 10 MW load change which is 10 % of the base value of 100 MVA.

19

You might also like