摘要
应用Matlab中的RTW(real-time workshop)模块的代码自动生成功能,借鉴PSASP用户自定义(UD)和用户程序接口(UPI)的实现方法,提出了一种将Matlab Simulink环境下搭建的模型接入PSASP潮流计算模块的方法,并在PSASP7.0版本中予以实现。通过配置RTW代码生成、编译过程,并开发相应的接口程序,可将Matlab Simulink环境下搭建的数学模型自动转换为动态链接库。根据Matlab仿真计算的特点,研究了Matlab模型在PSASP潮流计算模块中调用的流程和方式,并开发了相应的接口程序。计算结果表明,采用相同功能的Matlab模型和PSASP用户自定义模型,两者潮流计算结果一致,验证了所提出方法的正确性。
Applying the automatic source code generation function of real-time workshop (RTW) module in Matlab and using the implementation approaches of user defined (UD) modeling and user program interface (UPI) in power system analysis software package (PSASP), a new method to interface the Simulink model that is set up in the environment of Matlab with power flow computation module of PSASP is proposed and realized in PSASP 7.0. By means of configuring the generation and compilation of RTW source code as well as developing corresponding interface program, the Simulink mathematical model set up in the environment of Matlab can be automatically converted into dynamic-link library (DLL). According to the features of Matlab simulation, the flow chart and mode by which the Matlab model can be called within the power flow computation module of PSASP are researched and corresponding interface program is developed. Power flow computation results by UD model of PSASP and that by Matlab model, both of them possess the same function, are in perfect agreement, thus the correctness of the proposed method is verified.
出处
《电网技术》
EI
CSCD
北大核心
2008年第13期20-24,共5页
Power System Technology