Why is the mains voltage generally above the nominal value?
I am not talking about power spikes, which leave the margins. We are talking about standard operations. By design, the power is set closer to the top margin than to the middle. These are the reasons:
Standard power generators all run with a certain rotational speed which is synchronized with the grid frequency. The rotational frequency of the generator also depends on how many poles it is equipped with, all 4-pole generators in 50Hz grids run with 1500/min, for instance.
Grid frequency is just about the only persistently constant value you can expect from the grid.
At the fixed speed, the power output of a generator is regulated by the excitation of the field coils and the mechanical input at the turbine or engine. Both values must be regulated in unison. If you increase the excitation without increasing mechanical input, the machine will slow down, and come out of sync, which must be prevented.
Some kinds of power plants run asynchronous (flywheel, solar, wind mostly) which means their power output has to be electronically regulated to fit it onto the grid.
For several reasons the power suppliers will regulate towards the upper end.
First, they can react more quickly to reduce power output: Divert some steam, reduce excitation, done. To react upwards, they must first make more steam, which takes time. So it is safer to be on the top limit.
Secondly, the same power can be more efficiently be transported when the Voltage is higher. Losses almost exclusively come from current, higher voltage means less current, so less loss, bigger percentage of voltage arrives at the customer, and only power that arrives will be paid.
Lastly, a part of the used power is pure electrical resistance, which consumes more power with higher voltage, leading to higher consumption and higher sales. I suppose this is not a big deal.
Now the power suppliers know very well how much power will be consumed on average. They know how much more will be needed on special days like thanksgiving (every stove is in action that day), or on superbowl day. They will plan ahead for quite a while.
The quality of the grid lines is taken into consideration here: If they know the voltage drop within a neighborhood rather high, the supply to that neighborhood will be set up so the planned voltage arrives at the customers, if possible. Transformators between the high/medium/low voltage networks can be regulated to some degree. (see ULTC at http://en.wikipedia.org/wiki/Tap_%28transformer%29)
Therefore voltage drops and also phase shifts are the bane of the suppliers: These two factors lead to bigger losses in the lines, which they have to pay for themselves.
To solve this problem you should look at the ODE solvers in MATLAB.
Note that your function does not describe what the response of the system is to a variation in input power Pm.
Below I have written up an implementation, based on the example in http://www.its.caltech.edu/~ae121/ae121/ode45_Ref2.pdf . In my example I have added a term Pm to the differential equations, so you can see how a disturbance might affect the dynamics.
Unfortunately I don't have MATLAB installed so I can't check whether there are any errors in this, but the idea should be clear.
function main
% a simple example to solve ODE's
% Uses ODE45 to solve
% dx_dt(1) = 1*x(1)+2*x(2)+3*x(3)+4*x(4)
% dx_dt(2) = 5*x(1)+6*x(2)+7*x(3)+8*x(4)+Pm
% dx_dt(3) = 9*x(1)+1*x(2)+2*x(3)+3*x(4)
% dx_dt(4) = 4*x(1)+5*x(2)+6*x(3)+7*x(4)
%set an error
options=odeset('RelTol',1e-6);
%initial conditions
X0 = [0;0;0;0];
Pm0=1;
%before disturbance
tspan1 = [-1,0];
[t1,X1] = ode45('system',tspan1,X0,options,Pm0);
%during disturbance
tspan2 = [0,1];
[t2,X2] = ode45('system',tspan2,X1(end),options,1.3*Pm0);
%after disturbance
tspan3 = [1,3];
[t3,X3] = ode45('system',tspan3,X2(end),options,Pm0);
time=[t1,t2,t3];
X=[X1,X2,X3];
%plot the results
figure
hold on
plot(time,X)
legend('x1','x2','x3','x4');ylabel('x');xlabel('t')
return
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [dx_dt]= system(t,x,Pm)
%a function which returns a rate of change vector
A = [1,2,3,4;
5,6,7,8;...
9,1,2,3;
4,5,6,7]
P=[0;Pm;0;0]
dx_dt = A*x+P;
return
Best Answer
The way to model the system and solve the system is the following:
My best suggestion is that you try to get this book: Schaum's Outline of Electrical Power Systems. It has everything you need in an easy to understand format.