从CIM转换到计算模型的过程
作者:华腾开元 发表时间:2009-10-22 10:27:42 阅读:次
关键字:公共信息模型(CIM),IEEE Common Format,模型转换
CIM(Common Information Model)是国际电工委员会制定的一个关于电力数据共享的国际标准。CIM应用XML(eXtensible Markup Language)提供电力系统数据交换格式,该模型涵盖了包括电力元件、厂站等在内的电力分析控制中常用的各种对象。作为国际标准,CIM被公认为具有里程碑意义,并且已经得到了各国电力企业和开发商的积极支持:目前CIM已被ABB,Alstom,Siemens,SISCO和ICL等20多个开发商用于SCADA,NA和OTS等30多种应用[1],在国内,国家电力调度通信中心组织了5次CIM互操作实验[2~4] ,为国内主要EMS开发单位的不同自动化系统之间能够互联互通和互操作和最终实现软件的即插即用提供了实验依据。
CIM有核心包(Core),拓扑包(Topology),电线包(Wires),停运包(Outage),保护包(Protection),量测包(Meas),负荷模型包(LoadModel),发电包(Generation)和域包(Domain)共9个包组成。CIM中的每一个包都是一组类的集合,文献[1]中对每一个包的作用做了介绍。
电力系统仿真或计算软件通常使用“Bus-Branch”模型的数据格式而CIM采用的是“Node-Break”模型,因此很难直接利用CIM数据进行潮流计算、最优潮流计算和状态估计等计算,有必要开发工具包把CIM转换到IEEE common format或WSCC format等常用于电力系统仿真的格式。文献[5]对CIM转化到其他应用软件数据格式的解决方法进行了讨论,给出了使用拓扑包中ConnectivityNode、TopologicalNode和TopologicalIsland类进行拓扑分析的方法。
以CIM转到 IEEE common format为例,按照文献[5]中给出的方法形成topological islands和topological nodes之后,形成对应的IEEE通用格式中island,bus和branch的算法如下:
1 .for each of topological island;
2 .create a new island;
3 .for each of topological node of the topological island;
4 .create a new bus;
5 .add the current bus to island
6 .for each of connectivity node of the topological node;
7 .for each piece of primary equipment connected to the connectivity node;
8 .if the equipment has not been processed;
9 .make the equipment as having been processed;
10.if the equipment is a AC line segment;
11.create a new branch;
12.add the current branch to island;
13.else if the equipment is a transformer winding
14.if the physical transformer the winding is belong to is two winding transformer and the physical transformer has not been processed;
15.make the physical transformer as having been processed;
16.create a new branch;
17.add the current branch to island;
18.else if the physical transformer the winding is belong to is three winding transformer;
19.create a new branch;
20.add the current branch to island;
21.if the three winding transformer has not been processed;
22.make the physical transformer as having been processed;
23.create a new bus;
24.add the current bus to island;
25.select the next topological island and go back to step 2.
上述处理过程对每一个topological node生成相应的bus,在遍历topological node中的所有connectivity node,继而找到连接在connectivity node上的非开关设备,如果该设备是AC line segment则生成相应的branch,如果设备是transformer winding,需要分两种情况:两相变压器和三相变压器,两相变压器只对应一条branch,而三相变压器的三个transformer winding分别对应一条branch,而且还需要增加一个虚拟的bus与三条branch相连,该bus没有对应的topological node。重复此过程直到所有的topological node都处理完毕,IEEE common format中的bus和branch也全部生成了。
CIM转到IEEE common format另一个重要的工作是参数的标幺化。在CIM中描述的电力系统设备的参数都是有名值,而IEEE common format中branch的阻抗和对地电纳以及bus的接地导纳都要求用标幺值。标幺化的过程可以在上述bus和branch生成过程中同时完成,计算标幺值时功率基值一般是人为指定,高压输电网络一般可以取100MVA,每个bus的电压基值可以从CIM中的BaseVoltage对象得到,程序片断如下:
ConnectivityNode cn = topologicalNode.getConnectivityNodes().get(i);
VoltageLevel voltageLevel = (VoltageLevel)cn.getMemberOf_EquipmentContainer();
BaseVoltage base = voltageLevel.getBaseVoltage();
double baseV = base. getNominalVoltage ();
对于一些电力系统计算只有IEEE common format数据还不够,比如最优潮流计算需要可调电容组的单位电容、连接在那个bus上、已经投入的组数以及尚未投入的组数等信息;状态估计计算需要实时量测信息,实时量测主要包括bus上电压幅值量测、bus上的注入功率量测、branch上功率量测、branch上的电流幅值量测以及变压器分接头位置量测。这些额外的信息需要从CIM中导出,下面以状态估计需要的量测信息为例,说明量测信息导出过程。
CIM中的量测包中Measurement类包含了测点信息,核心包中的Equipment类与Measurement是一对多的关系,例如一条线路ACLineSegment可能有四个Measurement分别表示线路首端有功功率量测、线路首端无功功率量测、线路末端有功功率量测和线路末端无功功率量测。将CIM中的模拟量测点对应到bus和branch上的处理过程如下:
1 .create a map;
2 .for each of buses;
3 .if corresponding topological node of the current bus is not null
4 .for each of connectivity node of the current topological node;
5 .for each piece of primary equipment connected to the current connectivity node;
6 .if the equipment has not been processed;
7 .make the equipment as having been processed;
8 .for each of the current equipment’s measurements
9 .if the current measurement is not a discrete measurement
10.if the current equipment is a AC line or transformer winding;
11.put the corresponding branch of the current equipment in the map as the current measurement is the key;
12.otherwise
13.put the current bus in the map as the current measurement is the key;
14.select the next topological node and go back to step 3.
上述处理过程用一个map保存模拟量测点于bus或branch的对应关系。取出一个bus,如果该bus不是虚拟节点,得到与该bus相应的topologicalnode,遍历该topological node中的所有connectivity node,继而找到连接在connectivity node上的equipment,依次取出equipment的一个模拟量measurement,如果equipment是输电线或变压器绕组,以measurement为键,equipment对应的branch为值放入map中,否则以以measurement为键,当前的bus为值放入map。循环结束后,实际的模拟量测点和bus或branch之间的对应关系也生成了。
获得了实际测点和bus和branch的对应关系之后,将这些实际的测点转换到状态估计计算中可以使用的量测量,要进行下面的处理:
a)注入功率量测合并。节点上多个注入功率量测合并成一个注入功率量测,这是因为在状态估计中需要的节点功率注入量是净功率注入量,是节点上所包含所有元件注入功率的总和。值得注意的是,只要其中有一个元件的注入量没有量测,那么其它元件上的注入性量测失去了在状态估计中的可用性。
b)电压幅值量测合并。通过母联开关连接在一起的多个物理母线和计算模型中的一个bus对应,如果不止一个物理母线上有电压幅值量测,可以用取平均值的办法将多个实际电压幅值量测转变为一个计算用的电压幅值量测。
c)量测值标幺化。从电力系统量测系统中得到的实时量测值通常是有名值,在进行状态估计之前转变到标幺值。
至此,进行状态估计需要的电网参数数据、网络拓扑数据和实时量测数据全部生成了。为了便于离线计算,实时量测数据可以通过自定义的文件格式输出,本文给出了一种文件格式,附录中给出该格式的一个示例。本文给出的量测文件格式说明如下:
a)用bus_v,bus_p,bus_q, line_from_p,line_to_p,line_from_q,line_to_q分别表示电压幅值量测,注入有功量测,注入无关量测,线路首端有功量测,线路末端有功量测,线路首端无功量测,线路末端无功量测。
c)每一个量测包括四个内容,分别是量测所对应节点或线路的号,量测值,标准偏差,权重。在IEEE common format中bus有唯一的号而branch没有,这里用到的线路号使用对IEEE common format中所有branch按出现顺序从1开始编号得到的数。
参考文献
[1]张慎明, 刘国定. IEC 61970 标准系列简介. 电力系统自动化, 2002, 26(14): 1-6.
ZHANG Shenming, LIU Guoding. Introduction of Standard IEC 61970. Automation of Electric Power Systems, 2002, 26(14): 1-6
[2]刘崇茹, 孙宏斌, 张伯明, 等. 基于CIM XML 电网模型的互操作研究. 电力系统自动化, 2003, 27(14): 45-48,74.
LIU Chong-ru, SUN Hong-bin, ZHANG Bo-ming et al. An Investigation on a Common Information Model for Energy Management System. Automation of Electric Power Systems, 2003, 27(14): 45-48,74.
[3]全国电力系统控制及其通信标准化技术委员会EMS-API工作组. 国内第4次EMS-API互操作实验介绍. 电力系统自动化, 2004, 28(16): 1-4.
EMS-API Group of National Standardization Technical Committees of Power System Control and Associated communication. Induction of the 4th EMS-API Interoperability Test in China. Automation of Electric Power Systems, 2004, 28(16): 1-4.
[4]吴文传, 孙宏斌, 张伯明, 等. 基于IEC61970标准的EMS/DTS一体化系统的设计与开发, 电力系统自动化, 2005, 29(4):23-57.
WU Wen-chuan, SUN Hong-bin, ZHANG Bo-ming et al. Design of the Integrated EMS/DTS System Based on IEC 61970. Automation of Electric Power Systems, 2005, 29(4):23-57.
[5]Alan W.McMorran, Graham W.Ault, Ian M.Elders, Colin E.T.Foote, Graeme M.Burt, James R.McDonald. Translating CIM XML Power System Data to a Proprietary Format for System Simulation. IEEE Transaction on Power Systems, 2004,19(1):229-235.
附录:量测文件格式
position value standard deviation weight
-------------------------------------------
bus_v
1 0 1.11 0.80
3 0 1.11 0.80
-999
-------------------------------------------
bus_p
1 0 1.30 0.58
3 0 1.50 0.44
-999
-------------------------------------------
bus_q
1 0 1.40 0.50
3 0 1.43 0.48
-999
-------------------------------------------
line_from_p
1 0 1.43 0.48
2 0 1.29 0.59
4 0 2.49 0.16
-999
-------------------------------------------
line_from_q
1 0 1.42 0.49
2 0 1.18 0.71
4 0 1.63 0.37
-999
-------------------------------------------
line_to_p
2 0 1.29 0.59
3 0 1.29 0.59
-999
-------------------------------------------
line_to_q
2 0 1.24 0.64
3 0 1.44 0.48
-999