Difference between revisions of "EMK:Simplifying River Chains for Dynamic Programming"
(24 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
== River Chain Simplification == | == River Chain Simplification == | ||
− | [[File:SRC Fig 1.jpg]] | + | [[File:SRC Fig 1.jpg|200px|thumb|right|Figure 1]] |
+ | Figure 1 represents a chain of reservoirs and stations, with the nodes represented by circles. | ||
+ | |||
+ | S<sub>i</sub> = the storage at node i | ||
+ | I<sub>i</sub> = the inflows to node i | ||
+ | Max<sub>i</sub> = the storage capacity at node i | ||
+ | f<sub>i</sub> = the flow from node i to node i + 1 | ||
+ | f<sub>IN</sub> = the flow into node 0 | ||
+ | M<sub>i</sub> = the generating potential from node i to node i + 1 (MW/cumec) | ||
+ | |||
+ | Instead of modelling each and every reservoir separately on this chain we will apply a constraint which requires all reservoirs to be filled to the same proportion of their capacity. So at any time: | ||
+ | |||
+ | 1. '''S<sub>i</sub> = α Max<sub>i</sub>''', for some alpha. | ||
+ | |||
+ | The behaviour of this chain is then determined by the inflows, f<sub>IN</sub> and the change in α. Change in storage ΔS<sub>i</sub> is given by change in α. | ||
+ | |||
+ | 2.''' ΔS<sub>i</sub> = [[File:lamda.jpg]] Max<sub>i</sub> ''', [[File:lamda.jpg]] = change in α | ||
+ | |||
+ | Change in storage is also related to flows and inflows: | ||
+ | |||
+ | 3. '''ΔS<sub>0</sub> = I<sub>0</sub> + f<sub>IN</sub> – f<sub>0</sub>''' | ||
+ | :'''ΔS<sub>i</sub> = I<sub>i</sub> + f<sub>i</sub> – f<sub>i +1</sub>''' , i > 0 | ||
+ | |||
+ | Combining 2. and 3. Gives: | ||
+ | |||
+ | 4. [[File:SRC E 1.jpg]] | ||
+ | |||
+ | And Generation is given by | ||
+ | |||
+ | 5. [[File:SRC E 2.jpg]] | ||
+ | |||
+ | Defining | ||
+ | |||
+ | 6. [[File:SRC E 3.jpg]] | ||
+ | |||
+ | Equation 5 becomes: | ||
+ | |||
+ | 7. [[File:SRC E 4.jpg]] | ||
+ | |||
+ | [[File:SRC Fig 2.jpg|200px|thumb|right|Figure 2]] | ||
+ | We now have the dynamics of the constrained sub-system of stations. The next step is to represent these dynamics with a simpler sub-system so the DP process can model it. The simpler system is shown in figure 2. | ||
+ | |||
+ | The first node has no storage, so there is only the storage at the second node to model. | ||
+ | In order for this sub-system to behave in the same way as the constrained sub-system it is necessary for the generation and outflow to be equal at any time. | ||
+ | |||
+ | In the simplified sub-system flows are given by: | ||
+ | |||
+ | 8. '''f<sub>A</sub> = f<sub>IN</sub> + I<sub>A</sub> ''' | ||
+ | :'''f<sub>B</sub> = f<sub>A</sub> + I<sub>B</sub> - [[File:lamda.jpg]]Max''' | ||
+ | ::'''= I<sub>A</sub> + I<sub>B</sub> + f<sub>IN</sub> - [[File:lamda.jpg]]Max''' | ||
+ | |||
+ | Since f<sub>B</sub> must equal f<sub>n</sub> for all inflow, f<sub>IN</sub> and [[File:lamda.jpg]] values, comparing Equations 8 and 4 gives: | ||
+ | |||
+ | 9. [[File:SRC E5.jpg]] ( from the inflows components ) | ||
+ | |||
+ | 10. [[File:SRC E6.jpg]] ( from the [[File:lamda.jpg]] component ) | ||
+ | |||
+ | Generation is given by: | ||
+ | |||
+ | 11.''' G* = M<sub>A</sub> f<sub>A</sub> + M<sub>B</sub> f<sub>B</sub>''' | ||
+ | ::'''= M<sub>A</sub> I<sub>A</sub> + M<sub>B</sub> (I<sub>A</sub> + I<sub>B</sub>) + (M<sub>A</sub> + M<sub>B</sub>) f<sub>IN</sub> - M<sub>B</sub> [[File:lamda.jpg]]Max''' | ||
+ | |||
+ | Since G* must equal G for all inflow, f<sub>IN</sub> and [[File:lamda.jpg]] values comparing Equations 11 and 7 gives: | ||
+ | |||
+ | 12.''' M<sub>A</sub> + M<sub>B</sub> = σ<sub>0</sub>''' ( from the f<sub>IN</sub> component ) | ||
+ | |||
+ | 13. [[File:SRC E 7.jpg]] ( from the [[File:lamda.jpg]] component ) | ||
+ | |||
+ | 14. [[File:SRC E 8.jpg]] ( from the inflows components ) | ||
+ | |||
+ | Combining 12 and 13 gives: | ||
+ | |||
+ | 15. [[File:SRC E 9.jpg]] | ||
+ | |||
+ | Combining 14 and 9 gives: | ||
+ | |||
+ | 16. [[File:SRC E 10.jpg]] | ||
+ | |||
+ | 17. [[File:SRC E 11.jpg]] | ||
+ | |||
+ | Equations 10,13,15 enable a specification of the simplified sub-system to be calculated. Equations 16 and 17 find the inflow figures to use in the system. | ||
+ | |||
+ | Once the results of a simulation with the simplified model are known they can be converted back to results for the original sub-system by calculating [[File:lamda.jpg]] and α: | ||
+ | |||
+ | [[File:lamda.jpg]] = '''( f<sub>A</sub> + I<sub>A</sub> - f<sub>B</sub> ) / Max''' | ||
+ | |||
+ | '''α = S / Max''' | ||
+ | |||
+ | Equations 1 and 4 then give the storages and flows in the original sub-system. | ||
+ | [[File:SRC Fig 3.jpg|140px|thumb|right|Figure 3]] | ||
+ | If M<sub>A</sub> = 0 for the system, then Equations 16 and 17 will not solve. This will occur only if there is zero storage in all but the last reservoirs. It is inappropriate to try and simplify this configuration, unless there are no inflows below the first node, in which case the simplified sub-system is shown in figure 3. | ||
+ | |||
+ | Where | ||
+ | |||
+ | 18. '''Max = Max<sub>0</sub>''' | ||
+ | |||
+ | 19. '''I = I<sub>0</sub>''' | ||
+ | |||
+ | 20. '''S = S<sub>0</sub>''' | ||
+ | |||
+ | 21. '''M = σ0''' | ||
+ | |||
+ | === Allocation of Spills === | ||
+ | The flow figures calculated above will match both outflow and generation, if all flows are used for generation. If however the flows are divided into generating and spill flow figures then the match will only be with ''potential'' generation, or the generation that would have occurred had all channels been generating with the given power conversion factors. It is necessary than to allocate the total f<sub>A</sub> and f<sub>B</sub> figures into f<sub>i</sub> figures for both spill and generation. If | ||
+ | |||
+ | 22. '''f<sub>A</sub> = f <sup>g</sup><sub>A</sub> + f <sup>s</sup><sub>A</sub> ''' | ||
+ | |||
+ | 23. '''f<sub>B</sub> = f <sup>g</sup><sub>B</sub> + f <sup>s</sup><sub>B</sub>''' | ||
+ | |||
+ | where f <sup>g</sup> is the flow used for generation and f <sup>s</sup> is the spill. The potential generation is: | ||
+ | |||
+ | 24. '''G* <sup>P</sup> = M<sub>A</sub> f<sub>A</sub> + M<sub>B</sub> f<sub>B</sub>''' | ||
+ | |||
+ | The real generation is given by | ||
+ | |||
+ | 25. '''G* <sup>R</sup> = M<sub>A</sub> f <sup>g</sup> <sub>A</sub> + M<sub>B</sub> f <sup>g</sup> <sub>B</sub>''' | ||
+ | |||
+ | If the resulting flows for the original sub-system are also divided into spill and generation flows: | ||
+ | |||
+ | 26. '''f<sub>i</sub> = f <sup>g</sup><sub>i</sub> + f <sup>s</sup><sub>i</sub>''' | ||
+ | |||
+ | G* <sup>P</sup> will be equal to the potential generation of the f<sub>i</sub> flows: | ||
+ | |||
+ | 27. '''G* <sup>P</sup> = G <sup>P</sup> = Σ<sub>k</sub> = <sub>0.. n</sub> f<sub>k</sub> M<sub>k</sub>''' | ||
+ | |||
+ | What we need as well as this is for the real generation figures to be equal: | ||
+ | |||
+ | 28. '''G* <sup>R</sup> = G <sup>R</sup>''' | ||
+ | |||
+ | If we force all spill to be the same proportion of the total flow in the solution. i.e. | ||
+ | |||
+ | 29. c | ||
+ | |||
+ | Then real generation in the original sub-system will be | ||
+ | |||
+ | 30. '''G<sup>R</sup> = μ Σ<sub>k = 0..n</sub> f<sub>k</sub> M<sub>k</sub>''' | ||
+ | |||
+ | Combining equations 27, 28 and 30 give: | ||
+ | |||
+ | 29. '''μ = G* <sup>R</sup> / G* <sup>P</sup>''' | ||
+ | |||
+ | This value for μ will provide spill and release figures for all nodes in the original sub-system, which match both real and potential generation. | ||
+ | |||
+ | == Using the Simplified River Chains == | ||
+ | In the short term river chain optimisation modelling, the primary advantage of simplification is that it avoids slow DP solutions. However a simplified model will result in faster solutions for any operations on the river chain. Currently the river chain is simplified for the DP and for all other operations. This simplification needs to be applied carefully to ensure solutions where the relationship in equation 1 does not hold are not valuable operational solutions for the system. | ||
+ | |||
+ | === Maximum Flows === | ||
+ | In ''EMarket'' the nodes in a chain generally have both a generating channel and a spill channel between them. If the maximum flow in one channel in the chain is set differently from the rest it is possible that that station may reach capacity before the rest. This can not be modelled easily in the simplified system. To avoid this difficulty the average maximum flow figure for f<sub>0</sub> to f<sub>n</sub> can be used as the maximum flow figure for the release from SB. This will not differ to much from the full dynamics of the system, provided all maximum flows are roughly the same. | ||
+ | |||
+ | This solution will have an effect when an outage is applied to only one of the stations. Rather than having to spill past this station, only the total capacity of the sub-system will be changed. This should be kept in mind when applying outages. | ||
+ | |||
+ | |||
+ | |||
+ | [[EMK:Technical Bulletins | Back to Technical Bulletins]] |
Latest revision as of 10:05, 4 December 2012
Introduction
If too many reservoirs are modelled in the dynamic programming phase of water value calculation, a performance hit may occur. This is the well known ‘problem of dimensionality’ in dynamic programming. It might be necessary to simplify the problem to avoid slow DP (Dynamic Programming) solutions. The following is a method for doing this on a chain of stations.
River Chain Simplification
Figure 1 represents a chain of reservoirs and stations, with the nodes represented by circles.
Si = the storage at node i Ii = the inflows to node i Maxi = the storage capacity at node i fi = the flow from node i to node i + 1 fIN = the flow into node 0 Mi = the generating potential from node i to node i + 1 (MW/cumec)
Instead of modelling each and every reservoir separately on this chain we will apply a constraint which requires all reservoirs to be filled to the same proportion of their capacity. So at any time:
1. Si = α Maxi, for some alpha.
The behaviour of this chain is then determined by the inflows, fIN and the change in α. Change in storage ΔSi is given by change in α.
Change in storage is also related to flows and inflows:
3. ΔS0 = I0 + fIN – f0
- ΔSi = Ii + fi – fi +1 , i > 0
Combining 2. and 3. Gives:
And Generation is given by
Defining
Equation 5 becomes:
We now have the dynamics of the constrained sub-system of stations. The next step is to represent these dynamics with a simpler sub-system so the DP process can model it. The simpler system is shown in figure 2.
The first node has no storage, so there is only the storage at the second node to model. In order for this sub-system to behave in the same way as the constrained sub-system it is necessary for the generation and outflow to be equal at any time.
In the simplified sub-system flows are given by:
8. fA = fIN + IA
Since fB must equal fn for all inflow, fIN and values, comparing Equations 8 and 4 gives:
9. ( from the inflows components )
Generation is given by:
11. G* = MA fA + MB fB
Since G* must equal G for all inflow, fIN and values comparing Equations 11 and 7 gives:
12. MA + MB = σ0 ( from the fIN component )
14. ( from the inflows components )
Combining 12 and 13 gives:
Combining 14 and 9 gives:
Equations 10,13,15 enable a specification of the simplified sub-system to be calculated. Equations 16 and 17 find the inflow figures to use in the system.
Once the results of a simulation with the simplified model are known they can be converted back to results for the original sub-system by calculating and α:
α = S / Max
Equations 1 and 4 then give the storages and flows in the original sub-system.
If MA = 0 for the system, then Equations 16 and 17 will not solve. This will occur only if there is zero storage in all but the last reservoirs. It is inappropriate to try and simplify this configuration, unless there are no inflows below the first node, in which case the simplified sub-system is shown in figure 3.
Where
18. Max = Max0
19. I = I0
20. S = S0
21. M = σ0
Allocation of Spills
The flow figures calculated above will match both outflow and generation, if all flows are used for generation. If however the flows are divided into generating and spill flow figures then the match will only be with potential generation, or the generation that would have occurred had all channels been generating with the given power conversion factors. It is necessary than to allocate the total fA and fB figures into fi figures for both spill and generation. If
22. fA = f gA + f sA
23. fB = f gB + f sB
where f g is the flow used for generation and f s is the spill. The potential generation is:
24. G* P = MA fA + MB fB
The real generation is given by
25. G* R = MA f g A + MB f g B
If the resulting flows for the original sub-system are also divided into spill and generation flows:
26. fi = f gi + f si
G* P will be equal to the potential generation of the fi flows:
27. G* P = G P = Σk = 0.. n fk Mk
What we need as well as this is for the real generation figures to be equal:
28. G* R = G R
If we force all spill to be the same proportion of the total flow in the solution. i.e.
29. c
Then real generation in the original sub-system will be
30. GR = μ Σk = 0..n fk Mk
Combining equations 27, 28 and 30 give:
29. μ = G* R / G* P
This value for μ will provide spill and release figures for all nodes in the original sub-system, which match both real and potential generation.
Using the Simplified River Chains
In the short term river chain optimisation modelling, the primary advantage of simplification is that it avoids slow DP solutions. However a simplified model will result in faster solutions for any operations on the river chain. Currently the river chain is simplified for the DP and for all other operations. This simplification needs to be applied carefully to ensure solutions where the relationship in equation 1 does not hold are not valuable operational solutions for the system.
Maximum Flows
In EMarket the nodes in a chain generally have both a generating channel and a spill channel between them. If the maximum flow in one channel in the chain is set differently from the rest it is possible that that station may reach capacity before the rest. This can not be modelled easily in the simplified system. To avoid this difficulty the average maximum flow figure for f0 to fn can be used as the maximum flow figure for the release from SB. This will not differ to much from the full dynamics of the system, provided all maximum flows are roughly the same.
This solution will have an effect when an outage is applied to only one of the stations. Rather than having to spill past this station, only the total capacity of the sub-system will be changed. This should be kept in mind when applying outages.