# Math Help - System of equations help

1. ## System of equations help

Hi there,
I am struggling to set up a system and would appreciate any guidance.

I am trying to come up with a new price model for energy usage. Here is some background:

The first 700 cost X1, the next 700 to 1300 cost X2 and everything else X3. As a result, the bill is equal to the sum X11*kWh1 + X21*kWh2 + X31*kWh3.

I need to introduce a new demand charge that is multiplied by the maximum kW demand that month which ranges from 1-7 usually, so a few orders of magnitudes less than the kWh. The new bill will look like Demand*kW + X12*kWh1 + X22*kWh2 +X 32*kWh3.

Notice, one costumer can fall into all three of these tiers. The first is typically flat with no slope, the next has a steep slope up to the next tier and the last has a little slope and tapers off. For example, if a costumer used 2300 we have X11*700 + 600*X12 + 1000*X13.

The problem is, I need to come up with new charges Demand, X12, X22, X32 such that average costumer bill with these new coefficients is equal to old bill with charges with X11, X21, X31.

I am working with Excel Solver to come up with a solution. I was thinking I could set up the problem by setting the sums equal for each tier (i.e, first 700, next 700-1300, over 1300) like so:

SUM Demand*kW + X12*kWh1 = SUM X11*kWh1
SUM Demand*kW + X22*kWh2 = SUM X21*kWh2
SUM Demand*kW + X32*kWh3 = SUM X31*kWh3

And minimize the squared error between the old bill and new bill.

This gives me sensible answers for the new X11, X12, X13, but blows up the Demand charge or sets it to zero and that is because I have 4 variables and 3 equations, but I can’t think of a fourth equation to obtain the solution I am looking for.

thanks

2. ## Re: System of equations help

IM not totally convinced your 3 equations are correct, but assuming they are...

Your solver is presumably setting the demand factor to zero because this is the trivial solution to your minimisation problem, ie if demand factor=0, x12=x11, x22=x21,x32=x31 then the tarrif is exactly as before and so the squared error will be zero.

You could add a constraint to make the demand factor bigger than some trivial value (you choose) and then do the minimisation again, alternatively you could set a "budget" for the size of square error that is acceptable to you, then find the largest demand factor that keeps the errors within your budget.

3. ## Re: System of equations help

Hey, thanks for the reply. I am not sure my set up is 100% correct either. I have tried setting arbitrary limits on the demand variable, but the solver solution forces it be on the boundary and adjusts the others accordingly. I understand why everything I have explained is happening, I just don't know what to fix it.

What would you suggest instead of the sums I have proposed? A colleague mentioned something about choosing prices so that shift in price maintains an equal area under the demand curve, but I am not sure how derive the necessary equations from that.

Can you possible expand on the idea of budgeting the squared error? Would this be a sub-problem? I still need to set the problem up so that the average revenue from the new price scheme is equal to the average value of the old. How would you budget the demand error without arbitrarily setting the X1-X3 first? I am not sure how I would partition the error.

4. ## Re: System of equations help

Would it be as simple as setting up the following problem in solver?

Max Demand
Subject to
Squared Error < Max Error (my choice)
Mean1 = Mean2
X1 < X2 < X3
Demand, X1, X2, X3 > 0

5. ## Re: System of equations help

lets start by redefining notation so we are definately talking about the same things.

At the moment there are 3 tarriffs: Low/Med/High.

Let:
$P_L,P_M,P_H$ be the price per kWH on each tarrif.
$X_{iL}, X_{iM}, X_{iH}$ be the amount of kWH consumed by customer $i$ on each tarrif
$Z_i$ be the total bill for customer i.
$A$ be the 1-7 demand rating
$P_D$ be the demand surcharge tarrif

Finally, let * denote any variable in the new fee structure.

So the current bill paid by each customer is
$Z_i = P_L X_{iL} + P_M X_{iM} + P_H X_{iH}$

MY interpretation of post #1 is that the bill under the new structure is, assuming electricity consumption is unchanged:
$Z_i^* = P_L^* X_{iL} + P_M^* X_{iM} + P_H^* X_{iH} + (X_{iL} + X_{iM} + X_{iM})AP^*_d$

Factorising:
$Z_i^* = X_{iL}(P_L^* + AP^*_d) + X_{iM}(P_M^* + AP^*_d) + X_{iH}(P_H^* + AP^*_d)$

Problem
Your objective is to minimise $\sum_i (Z_i^* - Z_i)^2$

Subject to what constraints exactly?

6. ## Re: System of equations help

By 1-7 I mean a continuous variable in the interval [1,7]. I apologize for being unclear about that.

I was given some further information:

X1 < X2 < X3 with X2 - X1 = 0.01 and X3 - X2 = 0.02.

So I have the following incomplete system:

d * X0 + a1 * X1 + b1 * X2 + c1 * X3 = a0 * X1 + b0 * X2 + c0* X3

b1 - a1 = 0.01

c1 - b1 = 0.02

with d < 8.5

Where a0,b0,c0 are the known current prices and X0 is the sum of demand (kW) and X1-X3 the sum of energy (kWh). d is the new and unknown demand price along with a1,b1,c2.

Again, I want the average cost of the new demand scheme to equal the old cost, that is purpose of the first equation.

I think I can solve this analytically, but I am not sure how to come up with the fourth equation.

I haven't thought about partitioning the demand charge like you did.

7. ## Re: System of equations help

i dont think im adding much value here so im going to bow out of this thread. good luck with your problem.