├── README.md ├── 002多时间尺度源储荷协调调度+日前日内实时+需求响应 ├── main.m ├── main2.m ├── main3.m ├── mainsj.m ├── getConsEES.m ├── getConsGen1.m ├── getConssGen.m ├── getMbdMatrix.m ├── getMbgMatrix.m ├── 考虑特性分布的储能电站接入的电网多时间尺度源储荷协调调度策略_金力 (1).pdf ├── getYbusMatrix.m ├── consequtiveON.m └── case30.m └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # 002-Multi-time-scale-source-storage-and-load-coordinated-dispatch 2 | 002多时间尺度源储荷协调调度+日前日内实时+需求响应 3 | -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/main.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/main.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/main2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/main2.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/main3.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/main3.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/mainsj.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/mainsj.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/getConsEES.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/getConsEES.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/getConsGen1.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/getConsGen1.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/getConssGen.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/getConssGen.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/getMbdMatrix.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/getMbdMatrix.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/getMbgMatrix.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/getMbgMatrix.m -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/考虑特性分布的储能电站接入的电网多时间尺度源储荷协调调度策略_金力 (1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VG-TechCenter/002-Multi-time-scale-source-storage-and-load-coordinated-dispatch/HEAD/002多时间尺度源储荷协调调度+日前日内实时+需求响应/考虑特性分布的储能电站接入的电网多时间尺度源储荷协调调度策略_金力 (1).pdf -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/getYbusMatrix.m: -------------------------------------------------------------------------------- 1 | function Ybus = getYbusMatrix(caseName) 2 | bus = caseName.bus; 3 | brch = caseName.branch; 4 | nbus = size(bus,1); 5 | nbrch = size(brch,1); 6 | f = brch(:,1); 7 | t = brch(:,2); 8 | r = brch(:,3); 9 | x = brch(:,4); 10 | zb = r + 1j.*x; 11 | Ys = 1./zb; 12 | Ytt = Ys; 13 | Yff = Ytt; 14 | Yft = -Ys; 15 | Ytf = -Ys; 16 | Cf = sparse(1:nbrch,f,ones(nbrch,1),nbrch,nbus); 17 | Ct = sparse(1:nbrch,t,ones(nbrch,1),nbrch,nbus); 18 | i = [1:nbrch;1:nbrch]'; 19 | Yf = sparse(i,[f;t],[Yff;Yft],nbrch,nbus); 20 | Yt = sparse(i,[f;t],[Ytf;Ytt],nbrch,nbus); 21 | Ybus = Cf' * Yf + Ct' * Yt ; -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/consequtiveON.m: -------------------------------------------------------------------------------- 1 | function C = consequtiveON(x,minup) 2 | if min(size(x))==1 3 | x = x(:)'; 4 | end 5 | if size(x,1) ~= size(minup,1) 6 | error('MINUP should have as many rows as X'); 7 | end 8 | Horizon = size(x,2); 9 | C = []; 10 | for k = 2:size(x,2) 11 | for unit = 1:size(x,1) 12 | % indicator will be 1 only when switched on 13 | indicator = x(unit,k)-x(unit,k-1); 14 | range = k:min(Horizon,k+minup(unit)-1); 15 | % Constraints will be redundant unless indicator = 1 16 | affected = x(unit,range); 17 | if strcmp(class(affected),'sdpvar') 18 | % ISA behaves buggy, hence we use class+strcmp 19 | C = [C, affected >= indicator]; 20 | end 21 | end 22 | end -------------------------------------------------------------------------------- /002多时间尺度源储荷协调调度+日前日内实时+需求响应/case30.m: -------------------------------------------------------------------------------- 1 | function mpc = case30 2 | %CASE30 Power flow data for 30 bus, 6 generator case. 3 | % Please see CASEFORMAT for details on the case file format. 4 | % 5 | % Based on data from ... 6 | % Alsac, O. & Stott, B., "Optimal Load Flow with Steady State Security", 7 | % IEEE Transactions on Power Apparatus and Systems, Vol. PAS 93, No. 3, 8 | % 1974, pp. 745-751. 9 | % ... with branch parameters rounded to nearest 0.01, shunt values divided 10 | % by 100 and shunt on bus 10 moved to bus 5, load at bus 5 zeroed out. 11 | % Generator locations, costs and limits and bus areas were taken from ... 12 | % Ferrero, R.W., Shahidehpour, S.M., Ramesh, V.C., "Transaction analysis 13 | % in deregulated power systems using game theory", IEEE Transactions on 14 | % Power Systems, Vol. 12, No. 3, Aug 1997, pp. 1340-1347. 15 | % Generator Q limits were derived from Alsac & Stott, using their Pmax 16 | % capacities. V limits and line |S| limits taken from Alsac & Stott. 17 | 18 | % MATPOWER 19 | 20 | %% MATPOWER Case Format : Version 2 21 | mpc.version = '2'; 22 | 23 | %%----- Power Flow Data -----%% 24 | %% system MVA base 25 | mpc.baseMVA = 100; 26 | 27 | %% bus data 28 | % bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin 29 | mpc.bus = [ 30 | 1 3 0 0 0 0 1 1 0 135 1 1.05 0.95; 31 | 2 2 21.7 12.7 0 0 1 1 0 135 1 1.1 0.95; 32 | 3 1 2.4 1.2 0 0 1 1 0 135 1 1.05 0.95; 33 | 4 1 7.6 1.6 0 0 1 1 0 135 1 1.05 0.95; 34 | 5 1 0 0 0 0.19 1 1 0 135 1 1.05 0.95; 35 | 6 1 0 0 0 0 1 1 0 135 1 1.05 0.95; 36 | 7 1 22.8 10.9 0 0 1 1 0 135 1 1.05 0.95; 37 | 8 1 30 30 0 0 1 1 0 135 1 1.05 0.95; 38 | 9 1 0 0 0 0 1 1 0 135 1 1.05 0.95; 39 | 10 1 5.8 2 0 0 3 1 0 135 1 1.05 0.95; 40 | 11 1 0 0 0 0 1 1 0 135 1 1.05 0.95; 41 | 12 1 11.2 7.5 0 0 2 1 0 135 1 1.05 0.95; 42 | 13 2 0 0 0 0 2 1 0 135 1 1.1 0.95; 43 | 14 1 6.2 1.6 0 0 2 1 0 135 1 1.05 0.95; 44 | 15 1 8.2 2.5 0 0 2 1 0 135 1 1.05 0.95; 45 | 16 1 3.5 1.8 0 0 2 1 0 135 1 1.05 0.95; 46 | 17 1 9 5.8 0 0 2 1 0 135 1 1.05 0.95; 47 | 18 1 3.2 0.9 0 0 2 1 0 135 1 1.05 0.95; 48 | 19 1 9.5 3.4 0 0 2 1 0 135 1 1.05 0.95; 49 | 20 1 2.2 0.7 0 0 2 1 0 135 1 1.05 0.95; 50 | 21 1 17.5 11.2 0 0 3 1 0 135 1 1.05 0.95; 51 | 22 2 0 0 0 0 3 1 0 135 1 1.1 0.95; 52 | 23 2 3.2 1.6 0 0 2 1 0 135 1 1.1 0.95; 53 | 24 1 8.7 6.7 0 0.04 3 1 0 135 1 1.05 0.95; 54 | 25 1 0 0 0 0 3 1 0 135 1 1.05 0.95; 55 | 26 1 3.5 2.3 0 0 3 1 0 135 1 1.05 0.95; 56 | 27 2 0 0 0 0 3 1 0 135 1 1.1 0.95; 57 | 28 1 0 0 0 0 1 1 0 135 1 1.05 0.95; 58 | 29 1 2.4 0.9 0 0 3 1 0 135 1 1.05 0.95; 59 | 30 1 10.6 1.9 0 0 3 1 0 135 1 1.05 0.95; 60 | ]; 61 | 62 | %% generator data 63 | % bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2 Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf 64 | mpc.gen = [ 65 | 1 23.54 0 150 -20 1 100 1 80 0 0 0 0 0 0 0 0 0 0 0 0; 66 | 2 60.97 0 60 -20 1 100 1 80 0 0 0 0 0 0 0 0 0 0 0 0; 67 | 22 21.59 0 62.5 -15 1 100 1 50 0 0 0 0 0 0 0 0 0 0 0 0; 68 | 27 26.91 0 48.7 -15 1 100 1 55 0 0 0 0 0 0 0 0 0 0 0 0; 69 | 23 19.2 0 40 -10 1 100 1 30 0 0 0 0 0 0 0 0 0 0 0 0; 70 | 13 37 0 44.7 -15 1 100 1 40 0 0 0 0 0 0 0 0 0 0 0 0; 71 | ]; 72 | 73 | %% branch data 74 | % fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax 75 | mpc.branch = [ 76 | 1 2 0.02 0.06 0.03 130 130 130 0 0 1 -360 360; 77 | 1 3 0.05 0.19 0.02 130 130 130 0 0 1 -360 360; 78 | 2 4 0.06 0.17 0.02 65 65 65 0 0 1 -360 360; 79 | 3 4 0.01 0.04 0 130 130 130 0 0 1 -360 360; 80 | 2 5 0.05 0.2 0.02 130 130 130 0 0 1 -360 360; 81 | 2 6 0.06 0.18 0.02 65 65 65 0 0 1 -360 360; 82 | 4 6 0.01 0.04 0 90 90 90 0 0 1 -360 360; 83 | 5 7 0.05 0.12 0.01 70 70 70 0 0 1 -360 360; 84 | 6 7 0.03 0.08 0.01 130 130 130 0 0 1 -360 360; 85 | 6 8 0.01 0.04 0 32 32 32 0 0 1 -360 360; 86 | 6 9 0 0.21 0 65 65 65 0 0 1 -360 360; 87 | 6 10 0 0.56 0 32 32 32 0 0 1 -360 360; 88 | 9 11 0 0.21 0 65 65 65 0 0 1 -360 360; 89 | 9 10 0 0.11 0 65 65 65 0 0 1 -360 360; 90 | 4 12 0 0.26 0 65 65 65 0 0 1 -360 360; 91 | 12 13 0 0.14 0 65 65 65 0 0 1 -360 360; 92 | 12 14 0.12 0.26 0 32 32 32 0 0 1 -360 360; 93 | 12 15 0.07 0.13 0 32 32 32 0 0 1 -360 360; 94 | 12 16 0.09 0.2 0 32 32 32 0 0 1 -360 360; 95 | 14 15 0.22 0.2 0 16 16 16 0 0 1 -360 360; 96 | 16 17 0.08 0.19 0 16 16 16 0 0 1 -360 360; 97 | 15 18 0.11 0.22 0 16 16 16 0 0 1 -360 360; 98 | 18 19 0.06 0.13 0 16 16 16 0 0 1 -360 360; 99 | 19 20 0.03 0.07 0 32 32 32 0 0 1 -360 360; 100 | 10 20 0.09 0.21 0 32 32 32 0 0 1 -360 360; 101 | 10 17 0.03 0.08 0 32 32 32 0 0 1 -360 360; 102 | 10 21 0.03 0.07 0 32 32 32 0 0 1 -360 360; 103 | 10 22 0.07 0.15 0 32 32 32 0 0 1 -360 360; 104 | 21 22 0.01 0.02 0 32 32 32 0 0 1 -360 360; 105 | 15 23 0.1 0.2 0 16 16 16 0 0 1 -360 360; 106 | 22 24 0.12 0.18 0 16 16 16 0 0 1 -360 360; 107 | 23 24 0.13 0.27 0 16 16 16 0 0 1 -360 360; 108 | 24 25 0.19 0.33 0 16 16 16 0 0 1 -360 360; 109 | 25 26 0.25 0.38 0 16 16 16 0 0 1 -360 360; 110 | 25 27 0.11 0.21 0 16 16 16 0 0 1 -360 360; 111 | 28 27 0 0.4 0 65 65 65 0 0 1 -360 360; 112 | 27 29 0.22 0.42 0 16 16 16 0 0 1 -360 360; 113 | 27 30 0.32 0.6 0 16 16 16 0 0 1 -360 360; 114 | 29 30 0.24 0.45 0 16 16 16 0 0 1 -360 360; 115 | 8 28 0.06 0.2 0.02 32 32 32 0 0 1 -360 360; 116 | 6 28 0.02 0.06 0.01 32 32 32 0 0 1 -360 360; 117 | ]; 118 | 119 | %%----- OPF Data -----%% 120 | %% generator cost data 121 | % 1 startup shutdown n x1 y1 ... xn yn 122 | % 2 startup shutdown n c(n-1) ... c0 123 | mpc.gencost = [ 124 | 2 0 0 3 0.02 2 0; 125 | 2 0 0 3 0.0175 1.75 0; 126 | 2 0 0 3 0.0625 1 0; 127 | 2 0 0 3 0.00834 3.25 0; 128 | 2 0 0 3 0.025 3 0; 129 | 2 0 0 3 0.025 3 0; 130 | ]; 131 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | --------------------------------------------------------------------------------