CN108563588B - Multi-rate interface design method of active power distribution network real-time simulator based on FPGA - Google Patents

Multi-rate interface design method of active power distribution network real-time simulator based on FPGA Download PDF

Info

Publication number
CN108563588B
CN108563588B CN201810221838.1A CN201810221838A CN108563588B CN 108563588 B CN108563588 B CN 108563588B CN 201810221838 A CN201810221838 A CN 201810221838A CN 108563588 B CN108563588 B CN 108563588B
Authority
CN
China
Prior art keywords
simulation
data
fpga
time
subsystem
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810221838.1A
Other languages
Chinese (zh)
Other versions
CN108563588A (en
Inventor
李鹏
王智颖
王成山
富晓鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin University
Original Assignee
Tianjin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin University filed Critical Tianjin University
Priority to CN201810221838.1A priority Critical patent/CN108563588B/en
Publication of CN108563588A publication Critical patent/CN108563588A/en
Application granted granted Critical
Publication of CN108563588B publication Critical patent/CN108563588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/105Program control for peripheral devices where the programme performs an input/output emulation function
    • G06F13/107Terminal emulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

基于FPGA的有源配电网实时仿真器多速率接口设计方法,包括:1)将各子系统信息下载到对应FPGA中,子系统m与子系统n相连,子系统m的仿真步长是子系统n仿真步长的整数倍;2)设置仿真时刻t=0,启动仿真;3)仿真时间向前推进一个步长,t=t+Δt;4)各子系统完成仿真计算并交互仿真接口数据;5)子系统m将接收到的仿真接口数据送入平均单元,子系统n将接收到的仿真接口数据送入插值单元;6)判断物理时间是否达到t,如达到则进入7),否则实时仿真器待机至t后,进入7);7)判断仿真时间t是否达到仿真终了时刻,如达到则仿真结束,否则返回3)。本发明的多速率接口设计方法,有效提高了基于多FPGA的有源配电网实时仿真器的仿真速度。

Figure 201810221838

The multi-rate interface design method of real-time simulator for active distribution network based on FPGA includes: 1) downloading the information of each subsystem to the corresponding FPGA, the subsystem m is connected to the subsystem n, and the simulation step size of the subsystem m is System n is an integer multiple of the simulation step size; 2) Set the simulation time t=0, start the simulation; 3) The simulation time advances by one step, t=t+Δt; 4) Each subsystem completes the simulation calculation and interacts with the simulation interface data; 5) subsystem m sends the received simulation interface data into the averaging unit, and subsystem n sends the received simulation interface data into the interpolation unit; 6) judges whether the physical time reaches t, and if it reaches 7), Otherwise, after the real-time simulator waits until t, enter 7); 7) judge whether the simulation time t reaches the end of the simulation, if so, the simulation ends, otherwise return to 3). The multi-rate interface design method of the present invention effectively improves the simulation speed of a real-time simulator of an active distribution network based on multiple FPGAs.

Figure 201810221838

Description

Multi-rate interface design method of active power distribution network real-time simulator based on FPGA
Technical Field
The invention relates to a multi-rate interface of a real-time simulator. In particular to a multi-rate interface design method of an active power distribution network real-time simulator based on an FPGA.
Background
Along with the massive access of various power distribution side resources such as distributed power sources, energy storage devices, micro-grids and the like, the organization form and the operation characteristics of the active power distribution network are changed deeply and durably. These changes in the active power distribution network make it have greater differences and challenges in planning design, operational optimization, protection control, simulation analysis, etc. compared to conventional power distribution systems. In the aspect of simulation calculation, the dynamic characteristics of various distributed power supplies, energy storage devices, power electronic devices and other novel devices which are widely connected into an active power distribution system are more complex, the requirements cannot be met by steady-state simulation analysis of the traditional power distribution network, and the operation mechanism and the dynamic characteristics of the active power distribution network need to be deeply known by means of fine transient simulation. On this basis, the analysis and research of the detailed dynamic characteristics of the active power distribution network also need to realize the functional requirements of real-time simulation, and especially, the tests and the tests on various controllers, protection devices, intelligent terminals, novel energy management systems and the like need to be carried out in a hardware-in-the-loop (HIL) environment. Currently, the commercial real-time simulators developed abroad include RTDS, ARENE, hyperrsim, NETOMAC, RT-LAB, etc., all of which use serial processors such as dsp (digital Signal processor), cpu (central Processing unit), PowerPC, etc. as underlying hardware computing resources, and achieve computing power of real-time simulation through parallel computing of a plurality of processors.
The complex network structure and the huge system scale of the active power distribution network provide new challenges for the simulation precision, the calculation speed, the hardware resources and the like of the real-time simulator. In an active power distribution network, a power electronic switch has a high-frequency action characteristic, and a smaller simulation step length is needed for the simulation of the element; the simulation scale of the system is further increased by modeling of controllers of the distributed power supply and the energy storage element, controllers of the power electronic converter and the like, and a large burden is brought to hardware computing resources. The real-time simulator based on the serial processor is limited by the signal processing speed and the physical structure, the real-time simulation computing capacity is limited, and meanwhile, the selection of simulation step length and the numerical stability are limited by the transmission delay of data among a plurality of processors.
The FPGA has a large number of parallel bottom layer structures and distributed memories, and depth parallel calculation can be realized; meanwhile, the processing speed of the digital signal is improved by adopting a pipeline operation mode. The FPGA has rich I/O resources, comprises a full-duplex LVDS channel, a user-defined I/O interface, a high-speed transceiver and the like, and can realize board-level interaction of a large amount of data. With the development of FPGA technology, the integrated high-speed transceiver can realize 14.1Gbps data transmission rate, so that high-speed communication among multiple FPGAs becomes possible, and a solid foundation is laid for real-time simulation of a large-scale active power distribution network.
According to the structural characteristics of the active power distribution network, the resolving scale is reduced through system segmentation and parallel solving, and solving tasks of each segmented subsystem are distributed to a plurality of FPGAs, so that the method is an effective means for improving the computing speed and ensuring the real-time performance of simulation. Considering that each divided subsystem may have dynamic characteristics of different time scales, if the whole system adopts the same simulation step length, the selection of the step length size is limited by the time constant of the fast subsystem, and the real-time performance of the simulation is difficult to ensure. On the other hand, the solving scales and solving difficulty degrees of the subsystems are different, actual solving time is often different, and if a uniform simulation step length is set, the FPGAs can wait for each other until all the FPGAs finish solving tasks, so that time redundancy is caused, and the simulation time is increased. Aiming at different subsystems, the simulation step length suitable for the subsystems is adopted, so that the simulation time of the whole system can be effectively saved, and the real-time simulation requirement is met. Meanwhile, a multi-rate simulation interface adapted to the multi-rate simulation interface is required to realize a multi-rate simulation function.
Disclosure of Invention
The invention aims to solve the technical problem of providing a multi-rate interface design method of an active power distribution network real-time simulator based on an FPGA, which can meet the requirements of a multi-rate real-time simulation algorithm.
The technical scheme adopted by the invention is as follows: a multi-rate interface design method of an active power distribution network real-time simulator based on an FPGA comprises the following steps:
1) in an upper computer of an active power distribution network real-time simulator composed of N FPGA, wherein N>1, an active power distribution system to be simulated is divided into N subsystems after being decoupled by a Berilon circuit model according to topological connection relations and FPGA computing resources, basic parameters of elements of the subsystems are read to form a node conductance matrix of an electrical part of each subsystem and a computing matrix of a control part, relevant information of each subsystem is downloaded into the corresponding FPGA, each subsystem corresponds to one FPGA and is arranged in a descending order according to actual resolving time of each subsystem, the number of each subsystem is 1 to N, and the simulation step length of the ith FPGA is set to be tiThe simulation step length of jth FPGA is tjWherein i is 1,2, …, N, j is i +1, i +2, …, N, and t is satisfiedi=Mi,jtjWherein M isi,,jSimulation that the simulation step length of the ith FPGA is the jth FPGAM times of true step length, Mi,jTaking a positive integer;
2) defining pairs of subsystems all having a direct connection relation topologically,
Figure BDA0001600224430000021
j is i +1, i +2, …, N, if the subsystem i is directly connected to the subsystem j, the subsystem number i is added to the set phi of slow subsystem numberssIn (2), j is added to the set phi of the fast subsystem numbersfIn (3), the definition number m ∈ φsN is a set phifThe number of the subsystem pair corresponding to m one by one;
3) setting the global simulation step length of the simulator as delta t, wherein the delta t is t1The simulation time is t; defining:
d simulation step length t of mth FPGA in global simulation step length delta tmSimulation interface data required by nth FPGA simulation obtained by internal calculationm,n,dThe number of (t) is Nm,nWherein
Figure BDA0001600224430000022
Simulation interface datam,n,d(t) is represented by { a }p(t)},p=(d-1)Nm,n+1,(d-1)Nm,n+2,…,(d-1)Nm,n+Nn,n,ao(t) is emulation interface datam,n,dThe p-th data of (1);
the mth FPGA sends simulation interface Data to the nth FPGA within the global simulation step length delta tm,n(t) is
Figure BDA0001600224430000023
The qth simulation step length tmInternally transmitted emulation interface Datam,n(t) is expressed in the form of { data }m,n,q(t)},
Figure BDA0001600224430000024
The nth FPGA simulates the e-th simulation step length t in the global simulation step length delta tnM is obtained by inner calculationSimulation interface data required by FPGA simulationn,m,eThe number of (t) is Nn,mWherein
Figure BDA0001600224430000025
Simulation interface datan,m,e(t) is represented by the form { br(t)},r=(e-1)Nn,m+1,(e-1)Nn,m+2,…,(e-1)Nn,m+Nn,m,br(t) is emulation interface datan,m,eThe r-th data in (t);
the nth FPGA sends simulation interface Data to the mth FPGA within the global simulation step length delta tn,m(t) is
Figure BDA0001600224430000026
Simulation step length tnInternally transmitted emulation interface Datan,m(t) is expressed in the form of { data }n,m,s(t)},
Figure BDA0001600224430000027
The whole real-time simulator is driven by a clock clk;
4) initializing a simulator, setting the simulation time t as 0, and starting simulation;
5) the simulation time is advanced by one step length, and t is t + delta t;
Figure BDA0001600224430000031
the mth FPGA completes the simulation by using the data read from the average unit of the mth FPGA
Figure BDA0001600224430000032
After step simulation calculation task, the calculated simulation interface Data ism,n(t) sending to the nth FPGA;
Figure BDA00016002244300000316
the nth FPGA completes the simulation by using the data read from the interpolation unit of the nth FPGA
Figure BDA0001600224430000033
After step simulation calculation task, the calculated simulation interface Data isn,m(t) sending to the mth FPGA;
6)
Figure BDA0001600224430000034
the mth FPGA finishes receiving the simulation interface Data sent by the nth FPGAn,mAfter (t), simulating interface Datan,m(t) sending the average data into an average unit of the device to be processed to obtain average data;
Figure BDA0001600224430000035
the nth FPGA finishes receiving the simulation interface Data sent by the mth FPGAm,nAfter (t), simulating interface Datam,n(t) sending the data into an interpolation unit of the device to process to obtain interpolation data;
7) judging whether the physical time reaches the simulation time t, if so, entering the next step, otherwise, entering the next step after the real-time simulator is standby to the simulation time t;
8) and judging whether the simulation time T reaches the set simulation finishing time T, if so, finishing the simulation, otherwise, returning to the step 3).
The interpolation unit in the step 5) and the step 6) is a random access memory RAMm,n,1、RAMm,n,2、RAMm,n,3And RAMm,n,4Read only memory ROMm,nAnd a first-in first-out queue FIFOm,n,1Form, using emulation interface Datam,nLast N of (t-. DELTA.t)n,mSimulation interface data
Figure BDA0001600224430000036
Data of interface with simulationm,n(t) carrying out
Figure BDA0001600224430000037
Performing linear interpolation operation on the next two points, wherein interpolation data obtained by the interpolation operation of the g time is as follows:
Figure BDA0001600224430000038
wherein
Figure BDA0001600224430000039
The specific implementation mode is as follows: will Datam,n(t) write RAMm,n,1In (1), Datam,nLast N of (t-. DELTA.t)m,nSimulation interface data
Figure BDA00016002244300000310
And Datam,n(t) before
Figure BDA00016002244300000311
Simulation interface datam,n,l(t) } write into RAM sequentiallym,n,2In which
Figure BDA00016002244300000312
Respectively from RAMm,n,1And RAMm,n,2Reading out all the simulation interface data to obtain
Figure BDA00016002244300000313
And
Figure BDA00016002244300000314
computing
Figure BDA00016002244300000315
And writing the obtained result into RAMm,n,3In the process, the
Figure BDA0001600224430000041
Write RAMm,n,4In the ROMm,nData stored therein
Figure BDA0001600224430000042
Is in the format of { XcTherein of
Figure BDA0001600224430000043
XcThe number of each element in the group is equal to Nm,n(ii) a Reading ROMm,nData stored therein
Figure BDA0001600224430000044
Respectively connect the RAMm,n,3And RAMm,n,4In turn, every Nm,nEach data is a set of repeated reads
Figure BDA0001600224430000045
Then, obtain
Figure BDA0001600224430000046
And
Figure BDA0001600224430000047
and (3) calculating:
Figure BDA0001600224430000048
and writing the obtained result into FIFOm,n,1Middle, read FIFOm,n,1To obtain interpolation data.
The averaging unit in the step 5) and the step 6) is a random access memory RAMn,m,5Accumulator, FIFO queuen,m,2,FIFOn,m,3Form, simulating interface Datan,m(t) carrying out
Figure BDA0001600224430000049
And (4) performing secondary average operation, wherein average data obtained by the h-th average operation are as follows:
Figure BDA00016002244300000410
wherein
Figure BDA00016002244300000411
The specific implementation mode is as follows: will Datan,m(t) write FIFOn,m,2In, from FIFOn,m,2In the read Datan,m(t) post write RAMn,m,5,RAMn,m,5The read address addr _ r is:
Figure BDA00016002244300000412
slave RAMn,m,5In which all data are read out to obtain
Figure BDA00016002244300000413
Will be provided with
Figure BDA00016002244300000414
In turn according to each
Figure BDA00016002244300000415
The data are sent to an accumulator for accumulation to obtain
Figure BDA00016002244300000416
Personal DatasumCalculating
Figure BDA00016002244300000417
And writing the obtained result into FIFOn,m,3Middle, read FIFOn,m,3The average data is obtained.
The multi-rate interface design method of the active power distribution network real-time simulator based on the FPGA fully considers the hardware characteristics of the FPGA and the structural characteristics of the active power distribution network, effectively realizes various functional requirements of real-time multi-rate simulation of the active power distribution network by facing a multi-rate simulation algorithm, and lays a foundation for realizing the large-scale active power distribution network real-time simulation based on the FPGA.
Drawings
FIG. 1 is a diagram of an interpolation unit design;
FIG. 2 is a diagram of an averaging unit design;
FIG. 3 is a flow chart of a multi-rate interface design of an active power distribution network real-time simulator based on an FPGA;
FIG. 4 is an active power distribution network real-time simulation platform based on FPGA;
FIG. 5 is an example of a test of an active distribution network including photovoltaic, storage batteries;
FIG. 6 is a detailed structure of a photovoltaic/accumulator unit;
FIG. 7 is a detail of a single stage photovoltaic cell;
FIG. 8 is a DC voltage V of a photovoltaic/accumulator unitPV/Battery,dcA simulation result graph;
FIG. 9 shows the photovoltaic output active power P of the photovoltaic unit 1PV1A simulation result graph;
FIG. 10 shows photovoltaic cell 2 grid-connected point A phase current IPV2,aA simulation result graph;
FIG. 11 shows the grid-connected point A phase voltage V of the photovoltaic unit 2PV2,aAnd (5) a simulation result graph.
Detailed Description
The multi-rate interface design method of the active power distribution network real-time simulator based on the FPGA of the present invention is described in detail below with reference to the embodiments and the accompanying drawings.
The invention discloses a multi-rate interface design method of an active power distribution network real-time simulator based on an FPGA (field programmable gate array), belongs to the field of power system simulation, and is particularly suitable for the field of active power distribution network real-time simulation.
As shown in fig. 3, the method for designing the multi-rate interface of the real-time simulator of the active power distribution network based on the FPGA of the present invention comprises the following steps:
1) in an upper computer of an active power distribution network real-time simulator composed of N FPGA, wherein N>1, an active power distribution system to be simulated is divided into N subsystems after being decoupled by a Berilon circuit model according to topological connection relations and FPGA computing resources, basic parameters of elements of the subsystems are read to form a node conductance matrix of an electrical part of each subsystem and a computing matrix of a control part, relevant information of each subsystem is downloaded into the corresponding FPGA, each subsystem corresponds to one FPGA and is arranged in a descending order according to actual resolving time of each subsystem, the number of each subsystem is 1 to N, and the simulation step length of the ith FPGA is set to be tiThe simulation step length of jth FPGA is tjWherein i is 1,2, …, N, j is i +1, i +2, …, N, and t is satisfiedi=Mi,jtjWherein M isi,jThe simulation step length of the ith FPGA is M times of that of the jth FPGA, and M isi,jTaking a positive integer;
2) defining pairs of subsystems all having a direct connection relation topologically,
Figure BDA0001600224430000051
j is i +1, i +2, …, N, if the subsystem i is directly connected to the subsystem j, the subsystem number i is added to the set phi of slow subsystem numberssIn (2), j is added to the set phi of the fast subsystem numbersfIn (3), the definition number m ∈ φsN is a set phifThe number of the subsystem pair corresponding to m one by one;
3) setting the global simulation step length of the simulator as delta t, wherein the delta t is t1The simulation time is t; defining:
d simulation step length t of mth FPGA in global simulation step length delta tmSimulation interface data required by nth FPGA simulation obtained by internal calculationm,n,dThe number of (t) is Nm,nWherein
Figure BDA0001600224430000052
The simulation interface data datam, n, d (t) is expressed in the form of { a }p(t)},p=(d-1)Nm,n+1,(d-1)Nm,n+2,…,(d-1)Nm,n+Nm,n,ap(t) is emulation interface datam,n,dThe p-th data of (1);
the mth FPGA sends simulation interface Data to the nth FPGA within the global simulation step length delta tm,n(t) is
Figure BDA0001600224430000053
The qth simulation step length tmInternally transmitted emulation interface Datam,n(t) is expressed in the form of { data }m,n,q(t)},
Figure BDA0001600224430000054
The nth FPGA simulates the e-th simulation step length t in the global simulation step length delta tnSimulation interface data required by mth FPGA simulation obtained by internal calculationn,m,eThe number of (t) is Nn,mWherein
Figure BDA0001600224430000061
Simulation interface datan,m,e(t) is represented by the form { br(t)},r=(e-1)Nn,m+1,(e-1)Nn,m+2,…,(e-1)Nn,m+Nn,m,br(t) is emulation interface datan,m,eThe r-th data in (t);
the nth FPGA sends simulation interface Data to the mth FPGA within the global simulation step length delta tn,m(t) is
Figure BDA0001600224430000062
Simulation step length tnInternally transmitted emulation interface Datan,m(t) is expressed in the form of { data }n,m,s(t)},
Figure BDA0001600224430000063
The whole real-time simulator is driven by a clock clk;
4) initializing a simulator, setting the simulation time t as 0, and starting simulation;
5) the simulation time is advanced by one step length, and t is t + delta t;
Figure BDA0001600224430000064
the mth FPGA completes the simulation by using the data read from the average unit of the mth FPGA
Figure BDA0001600224430000065
After step simulation calculation task, the calculated simulation interface Data ism,n(t) sending to the nth FPGA;
Figure BDA0001600224430000066
nth FPGA utilizes fromThe data required by the simulation read in the interpolation unit of the self completes
Figure BDA0001600224430000067
After step simulation calculation task, the calculated simulation interface Data isn,m(t) sending to the mth FPGA;
6)
Figure BDA0001600224430000068
the mth FPGA finishes receiving the simulation interface Data sent by the nth FPGAn,mAfter (t), simulating interface Datan,m(t) sending the average data into an average unit of the device to be processed to obtain average data;
Figure BDA0001600224430000069
the nth FPGA finishes receiving the simulation interface Data sent by the mth FPGAm,nAfter (t), simulating interface Datam,n(t) sending the data into an interpolation unit of the device to process to obtain interpolation data;
7) judging whether the physical time reaches the simulation time t, if so, entering the next step, otherwise, entering the next step after the real-time simulator is standby to the simulation time t;
8) and judging whether the simulation time T reaches the set simulation finishing time T, if so, finishing the simulation, otherwise, returning to the step 3).
The interpolation units in the above steps 5) and 6) are, as shown in fig. 1, composed of a random access memory RAMm,n,1,RAMm,n,2,RAMm,n,3,RAMm,n,4Read only memory ROMm,nAnd a first-in first-out queue FIFOm,n,1Form, using emulation interface Datam,nLast N of (t-. DELTA.t)n,mSimulation interface data
Figure BDA00016002244300000610
Data of interface with simulationm,n(t) carrying out
Figure BDA00016002244300000611
Performing linear interpolation operation on the next two points, wherein interpolation data obtained by the interpolation operation of the g time is as follows:
Figure BDA0001600224430000071
wherein
Figure BDA0001600224430000072
The specific implementation mode is as follows: will Datam,n(t) write RAMm,n,1In (1), Datam,nLast N of (t-. DELTA.t)m,nSimulation interface data
Figure BDA0001600224430000073
And Datam,n(t) before
Figure BDA0001600224430000074
Simulation interface datam,n,l(t) } write into RAM sequentiallym,n,2In which
Figure BDA0001600224430000075
Respectively from RAMm,n,1And RAMm,n,2Reading out all the simulation interface data to obtain
Figure BDA0001600224430000076
And
Figure BDA0001600224430000077
computing
Figure BDA0001600224430000078
And writing the obtained result into RAMm,n,3In the process, the
Figure BDA0001600224430000079
Write RAMm,n,4In the ROMm,nData stored therein
Figure BDA00016002244300000710
Is in the format of { XcTherein of
Figure BDA00016002244300000711
XcThe number of each element in the group is equal to Nm,n(ii) a Reading ROMm,nData stored therein
Figure BDA00016002244300000712
Respectively connect the RAMm,n,3And RAMm,n,4In turn, every Nm,nEach data is a set of repeated reads
Figure BDA00016002244300000713
Then, obtain
Figure BDA00016002244300000714
And
Figure BDA00016002244300000715
and (3) calculating:
Figure BDA00016002244300000716
and writing the obtained result into FIFOm,n,1Middle, read FIFOm,n,1To obtain interpolation data.
The averaging units described in the above steps 5) and 6), as shown in FIG. 2, are implemented by a RAMn,m,5Accumulator, FIFO queuen,m,2,FIFOn,m,3Form, simulating interface Datan,m(t) carrying out
Figure BDA00016002244300000717
And (4) performing secondary average operation, wherein average data obtained by the h-th average operation are as follows:
Figure BDA00016002244300000718
wherein
Figure BDA00016002244300000719
The specific implementation mode is as follows: will Datan,m(t) write FIFOn,m,2In, from FIFOn,m,2In the read Datan,m(t) post write RAMn,m,5,RAMn,m,5The read address addr _ r is:
Figure BDA00016002244300000720
Figure BDA0001600224430000081
slave RAMn,m,5In which all data are read out to obtain
Figure BDA0001600224430000082
Will be provided with
Figure BDA0001600224430000083
In turn according to each
Figure BDA0001600224430000084
The data are sent to an accumulator for accumulation to obtain
Figure BDA0001600224430000085
Personal DatasumCalculating
Figure BDA0001600224430000086
And writing the obtained result into FIFOn,m,3Middle, read FIFOn,m,3The average data is obtained.
Specific examples are given below:
in the embodiment of the invention, the multi-FPGA-based real-time simulator adopts four Stratix V series FPGA5SGSMD5K2F40C2N of Altera company and matched official development boards thereof to complete the real-time simulation of the active power distribution network containing the photovoltaic power generation system. As shown in FIG. 4, the FPGA1 communicates with the other three FPGAs at the same time, and no data interaction exists among the FPGA2, the FPGA3 and the FPGA 4. And optical fibers are adopted among the development boards to realize communication. The whole real-time simulator is driven by a 125MHz clock, and the single-channel data transmission rate between the FPGAs is 2500 Mbps.
The test example is an IEEE 33 node system including photovoltaic cells and storage batteries, as shown in fig. 5, a photovoltaic/storage battery unit and two single-stage photovoltaic power generation units having the same structure are respectively connected to nodes 18, 22, and 33 of the IEEE 33 node system, the detailed structure of the photovoltaic/storage battery unit is shown in fig. 6, and the detailed structure of the photovoltaic power generation unit is shown in fig. 7. The photovoltaic cell is simulated by a single-diode equivalent circuit, and the storage battery adopts a general equivalent circuit model. In the photovoltaic/storage battery unit, a storage battery is connected with a photovoltaic battery in parallel through a DC/DC converter and a direct current bus, the photovoltaic battery adopts a bipolar form, the DC/DC of the photovoltaic battery is a Boost booster circuit, and the reference value of photovoltaic voltage is set to 750V. The DC/DC in the storage battery pack adopts a bidirectional Boost/Buck circuit, the storage battery is in a Boost circuit mode when discharging, the storage battery is in a Buck voltage reduction circuit mode when charging, the storage battery pack is used for maintaining the constant bus voltage, the reference value of the bus voltage is set to 750V, the inverter adopts PQ control, and the constant output active power and reactive power of the whole hybrid system are maintained. The photovoltaic unit 1 and the photovoltaic unit 2 have the same structural parameters, and the inverter adopts VdcQ control, reactive power reference set to 0 Var. And when the simulation scene is set to be 2.0s, the grid-connected point of the photovoltaic unit 2 has an A-phase grounding short-circuit fault.
The whole calculation example is simulated on a multi-FPGA real-time simulator, wherein an IEEE 33 node system occupies an FPGA1, and three photovoltaic power generation units respectively occupy an FPGA2, an FPGA3 and an FPGA 4. The simulation step lengths of the photovoltaic/storage battery system and the photovoltaic power generation unit are set to be 4 mu s, and the simulation step length of the IEEE 33 node system is set to be 8 mu s.
Simulation results of the real-time simulator based on the FPGA and the commercial software PSCAD/EMTDC are shown in fig. 8 to 11, and the PSCAD/EMTDC uses a single simulation step size of 4 μ s. As can be seen from the figure, the results given by the two simulation systems are basically consistent, so that the correctness and the effectiveness of the design of the multi-rate interface of the active power distribution network real-time simulator based on the FPGA are verified.

Claims (1)

1.一种基于FPGA的有源配电网实时仿真器多速率接口设计方法,其特征在于,包括如下步骤:1. a kind of active distribution network real-time simulator multi-rate interface design method based on FPGA, is characterized in that, comprises the steps: 1)在由N个FPGA构成的有源配电网实时仿真器的上位机中,其中N>1,将待仿真的有源配电系统依据拓扑连接关系及FPGA的计算资源,采用贝瑞隆线路模型解耦后,划分为N个子系统,读取各子系统元件的基本参数,形成各子系统电气部分的节点电导矩阵和控制部分的计算矩阵,将各子系统的相关信息分别下载到对应的FPGA中,每个子系统对应一个FPGA,根据各子系统的实际解算时间进行降序排列,各子系统的编号为1到N,设置第i个FPGA的仿真步长为ti,第j个FPGA的仿真步长为tj,其中i=1,2,…,N,j=i+1,i+2,…,N,且满足ti=Mi,jtj,其中Mi,j表示第i个FPGA的仿真步长是第j个FPGA的仿真步长的M倍,Mi,j取正整数;1) In the host computer of the active power distribution network real-time simulator composed of N FPGAs, where N>1, the active power distribution system to be simulated is based on the topology connection relationship and the computing resources of the FPGA, using the Beryllon circuit. After the model is decoupled, it is divided into N subsystems, the basic parameters of each subsystem element are read, the node conductance matrix of the electrical part of each subsystem and the calculation matrix of the control part are formed, and the relevant information of each subsystem is downloaded to the corresponding In the FPGA, each subsystem corresponds to an FPGA, which is arranged in descending order according to the actual solution time of each subsystem. The number of each subsystem is from 1 to N, and the simulation step size of the i-th FPGA is set to t i , and the j-th FPGA The simulation step size is t j , where i=1,2,...,N, j=i+1,i+2,...,N, and t i =M i,j t j , where M i,j Indicates that the simulation step size of the i-th FPGA is M times the simulation step size of the j-th FPGA, and M i,j is a positive integer; 2)定义全部在拓扑上具有直接连接关系的子系统对,
Figure FDA00027593338000000112
若子系统i与子系统j直接相连,则将子系统编号i加入到慢子系统编号的集合
Figure FDA0002759333800000011
中,将j加入到快子系统编号的集合
Figure FDA0002759333800000012
中,定义编号
Figure FDA0002759333800000013
编号n为集合
Figure FDA0002759333800000014
中与m一一对应的子系统对的编号;
2) Define pairs of subsystems that are all topologically directly connected,
Figure FDA00027593338000000112
If subsystem i is directly connected to subsystem j, add subsystem number i to the set of slow subsystem numbers
Figure FDA0002759333800000011
, add j to the set of fast subsystem numbers
Figure FDA0002759333800000012
, define the number
Figure FDA0002759333800000013
The number n is the set
Figure FDA0002759333800000014
The number of the subsystem pair corresponding to m one-to-one in ;
3)设置仿真器全局仿真步长为Δt,Δt=t1,仿真时刻为t;定义:3) Set the global simulation step size of the simulator as Δt, Δt=t 1 , and the simulation time as t; define: 第m个FPGA在全局仿真步长Δt内的第d个仿真步长tm内计算得到的第n个FPGA仿真所需的仿真接口数据datam,n,d(t)的个数为Nm,n,其中
Figure FDA0002759333800000015
仿真接口数据datam,n,d(t)的表示形式为{ap(t)},p=(d-1)Nm,n+1,(d-1)Nm,n+2,…,(d-1)Nm,n+Nm,n,ap(t)为仿真接口数据datam,n,d的第p个数据;
The number of simulation interface data data m,n,d (t) required for the nth FPGA simulation calculated by the mth FPGA within the dth simulation step tm within the global simulation step Δt is N m ,n , where
Figure FDA0002759333800000015
The representation of the simulation interface data data m,n,d (t) is {a p (t)}, p=(d-1)N m,n +1,(d-1)N m,n +2, ...,(d-1)N m,n +N m,n , a p (t) is the p-th data of the simulation interface data data m,n,d ;
第m个FPGA在全局仿真步长Δt内发送到第n个FPGA的仿真接口数据Datam,n(t)的个数为
Figure FDA0002759333800000016
第q个仿真步长tm内发送的仿真接口数据Datam,n(t)的表示形式为{datam,n,q(t)},
Figure FDA0002759333800000017
The number of simulation interface data Data m,n (t) sent by the mth FPGA to the nth FPGA within the global simulation step size Δt is:
Figure FDA0002759333800000016
The representation of the simulation interface data Data m,n (t) sent within the qth simulation step size t m is {data m,n,q (t)},
Figure FDA0002759333800000017
第n个FPGA在全局仿真步长Δt内第e个仿真步长tn内计算得到的第m个FPGA仿真所需的仿真接口数据datan,m,e(t)的个数为Nn,m,其中
Figure FDA0002759333800000018
仿真接口数据datan,m,e(t)的表示形式为{br(t)},r=(e-1)Nn,m+1,(e-1)Nn,m+2,…,(e-1)Nn,m+Nn,m,br(t)为仿真接口数据datan,m,e(t)中的第r个数据;
The number of simulation interface data data n,m,e (t) required for the mth FPGA simulation calculated by the nth FPGA within the eth simulation step tn within the global simulation step Δt is N n, m , where
Figure FDA0002759333800000018
The representation of the simulation interface data data n,m,e (t) is {br (t)}, r =(e-1)N n,m +1,(e-1)N n,m +2, ...,(e-1)N n,m +N n,m , br (t) is the rth data in the simulation interface data data n,m,e (t);
第n个FPGA在全局仿真步长Δt内发送到第m个FPGA的仿真接口数据Datan,m(t)的个数为
Figure FDA0002759333800000019
第s个仿真步长tn内发送的仿真接口数据Datan,m(t)的表示形式为{datan,m,s(t)},
Figure FDA00027593338000000110
The number of simulation interface data Data n,m (t) sent by the nth FPGA to the mth FPGA within the global simulation step size Δt is:
Figure FDA0002759333800000019
The representation of the simulation interface data Data n,m (t) sent within the sth simulation step t n is {data n,m,s (t)},
Figure FDA00027593338000000110
整个实时仿真器以时钟clk驱动;The entire real-time simulator is driven by the clock clk; 4)初始化仿真器,并设置仿真时刻t=0,启动仿真;4) Initialize the simulator, and set the simulation time t=0 to start the simulation; 5)仿真时间向前推进一个步长,t=t+Δt;
Figure FDA00027593338000000111
第m个FPGA利用从自身的平均单元中读取的仿真所需的数据,完成
Figure FDA0002759333800000021
步仿真计算任务后,将计算得到的仿真接口数据Datam,n(t)发送到第n个FPGA;
Figure FDA0002759333800000022
第n个FPGA利用从自身的插值单元中读取的仿真所需的数据,完成
Figure FDA0002759333800000023
步仿真计算任务后,将计算得到的仿真接口数据Datan,m(t)发送到第m个FPGA;
5) Advance the simulation time by one step, t=t+Δt;
Figure FDA00027593338000000111
The mth FPGA uses the data required for the simulation read from its own averaging unit to complete
Figure FDA0002759333800000021
After simulating the calculation task step by step, send the calculated simulation interface data Data m,n (t) to the nth FPGA;
Figure FDA0002759333800000022
The nth FPGA uses the data required for the simulation read from its own interpolation unit to complete
Figure FDA0002759333800000023
After performing the simulation task step by step, send the calculated simulation interface data Data n,m (t) to the mth FPGA;
6)
Figure FDA0002759333800000024
第m个FPGA完成接收第n个FPGA发送的仿真接口数据Datan,m(t)后,将仿真接口数据Datan,m(t)送入自身的平均单元进行处理,得到平均数据;
Figure FDA0002759333800000025
第n个FPGA完成接收第m个FPGA发送的仿真接口数据Datam,n(t)后,将仿真接口数据Datam,n(t)送入自身的插值单元进行处理,得到插值数据;
6)
Figure FDA0002759333800000024
After the mth FPGA finishes receiving the simulation interface data Data n,m (t) sent by the nth FPGA, it sends the simulation interface data Data n,m (t) into its own averaging unit for processing to obtain average data;
Figure FDA0002759333800000025
After the nth FPGA finishes receiving the simulation interface data Data m,n (t) sent by the mth FPGA, it sends the simulation interface data Data m,n (t) into its own interpolation unit for processing to obtain interpolation data;
7)判断物理时间是否达到仿真时刻t,如达到仿真时刻t,则进入下一步,否则实时仿真器待机至仿真时刻t后,进入下一步;7) Judging whether the physical time reaches the simulation time t, if it reaches the simulation time t, then enter the next step, otherwise the real-time emulator waits until the simulation time t, and then enters the next step; 8)判断仿真时刻t是否达到设定的仿真终了时刻T,如达到设定的仿真终了时刻T,则仿真结束,否则返回步骤3);8) Judging whether the simulation time t reaches the set simulation end time T, such as reaching the set simulation end time T, the simulation ends, otherwise return to step 3); 步骤5)和步骤6)中所述的插值单元,是由随机存储器RAMm,n,1、RAMm,n,2、RAMm,n,3和RAMm,n,4,只读存储器ROMm,n和先入先出队列FIFOm,n,1构成,利用仿真接口数据Datam,n(t-Δt)的最后Nn,m个仿真接口数据
Figure FDA0002759333800000026
与仿真接口数据Datam,n(t)进行
Figure FDA0002759333800000027
次两点线性插值运算,第g次插值运算得到的插值数据为:
The interpolation unit described in step 5) and step 6) is composed of random access memory RAM m,n,1 , RAM m,n,2 , RAM m,n,3 and RAM m,n,4 , read-only memory ROM m,n is composed of FIFO m,n,1 , and the last N n,m simulation interface data of simulation interface data Data m,n (t-Δt) are used.
Figure FDA0002759333800000026
with the simulation interface data Data m,n (t)
Figure FDA0002759333800000027
The second two-point linear interpolation operation, the interpolation data obtained by the gth interpolation operation is:
Figure FDA0002759333800000028
Figure FDA0002759333800000028
其中
Figure FDA0002759333800000029
具体实现方式为:将Datam,n(t)写入RAMm,n,1中,将Datam,n(t-Δt)的最后Nm,n个仿真接口数据
Figure FDA00027593338000000210
与Datam,n(t)的前
Figure FDA00027593338000000211
个仿真接口数据{datam,n,l(t)}依次写入RAMm,n,2中,其中
Figure FDA00027593338000000212
分别从RAMm,n,1与RAMm,n,2中读出所有仿真接口数据,得到
Figure FDA00027593338000000213
Figure FDA00027593338000000214
计算
Figure FDA00027593338000000215
并将得到的结果写入RAMm,n,3中,将
Figure FDA00027593338000000216
写入RAMm,n,4中,ROMm,n中存储的数据
Figure FDA0002759333800000031
的格式为{Xc},其中
Figure FDA0002759333800000032
Figure FDA0002759333800000033
Xc中各元素的个数等于Nm,n;读取ROMm,n中存储的数据
Figure FDA0002759333800000034
分别将RAMm,n,3与RAMm,n,4中的数据依次按每Nm,n个数据为一组重复读取
Figure FDA0002759333800000035
次,得到
Figure FDA0002759333800000036
Figure FDA0002759333800000037
计算:
Figure FDA0002759333800000038
Figure FDA0002759333800000039
并将得到的结果写入FIFOm,n,1中,读取FIFOm,n,1中的数据,得到插值数据;
in
Figure FDA0002759333800000029
The specific implementation method is: write Data m,n (t) into RAM m,n,1 , and write the last N m,n simulation interface data of Data m,n (t-Δt)
Figure FDA00027593338000000210
with Data m,n (t) before
Figure FDA00027593338000000211
The simulation interface data {data m,n,l (t)} are written into RAM m,n,2 in turn, where
Figure FDA00027593338000000212
Read all simulation interface data from RAM m, n, 1 and RAM m, n, 2 respectively, and get
Figure FDA00027593338000000213
and
Figure FDA00027593338000000214
calculate
Figure FDA00027593338000000215
and write the obtained results into RAM m, n, 3 , and
Figure FDA00027593338000000216
Write the data stored in RAM m,n,4 and ROM m,n
Figure FDA0002759333800000031
is of the form {X c }, where
Figure FDA0002759333800000032
Figure FDA0002759333800000033
The number of elements in X c is equal to N m,n ; read the data stored in ROM m,n
Figure FDA0002759333800000034
Respectively read the data in RAM m, n, 3 and RAM m, n, 4 in turn by repeating each N m, n data as a group
Figure FDA0002759333800000035
times, get
Figure FDA0002759333800000036
and
Figure FDA0002759333800000037
calculate:
Figure FDA0002759333800000038
Figure FDA0002759333800000039
And write the obtained result into FIFO m, n, 1 , read the data in FIFO m, n, 1 , and get the interpolation data;
步骤5)和步骤6)中所述的平均单元,是由随机存储器RAMn,m,5,累加器,先入先出队列FIFOn,m,2,FIFOn,m,3构成,将仿真接口数据Datan,m(t)进行
Figure FDA00027593338000000310
次平均运算,第h次平均运算得到的平均数据为:
The averaging unit described in step 5) and step 6) is composed of random access memory RAM n,m,5 , accumulator, first-in-first-out queue FIFO n,m,2 , FIFO n,m,3 , and the simulation interface Data Data n,m (t) is carried out
Figure FDA00027593338000000310
The average data obtained by the h-th averaging operation is:
Figure FDA00027593338000000311
Figure FDA00027593338000000311
其中
Figure FDA00027593338000000312
具体实现方式为:将Datan,m(t)写入FIFOn,m,2中,从FIFOn,m,2中读出数据Datan,m(t)后写入RAMn,m,5,RAMn,m,5的读地址addr_r为:
in
Figure FDA00027593338000000312
The specific implementation method is: write Data n,m (t) into FIFO n,m, 2, read out data Data n,m (t) from FIFO n,m,2 and write into RAM n,m,5 , the read address addr_r of RAM n, m, 5 is:
Figure FDA00027593338000000313
Figure FDA00027593338000000313
从RAMn,m,5中读出全部数据,得到
Figure FDA00027593338000000314
Figure FDA00027593338000000315
依次按每
Figure FDA00027593338000000316
个数据为一组送入累加器中进行累加,得到
Figure FDA00027593338000000317
个数据Datasum,计算
Figure FDA00027593338000000318
并将得到的结果写入FIFOn,m,3中,读取FIFOn,m,3中的数据,得到平均数据。
Read all data from RAM n,m,5 , get
Figure FDA00027593338000000314
Will
Figure FDA00027593338000000315
press each
Figure FDA00027593338000000316
A group of data is sent to the accumulator for accumulation to get
Figure FDA00027593338000000317
Data sum , calculate
Figure FDA00027593338000000318
And write the obtained results into FIFO n, m, 3 , read the data in FIFO n, m, 3 , and get the average data.
CN201810221838.1A 2018-03-18 2018-03-18 Multi-rate interface design method of active power distribution network real-time simulator based on FPGA Active CN108563588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810221838.1A CN108563588B (en) 2018-03-18 2018-03-18 Multi-rate interface design method of active power distribution network real-time simulator based on FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810221838.1A CN108563588B (en) 2018-03-18 2018-03-18 Multi-rate interface design method of active power distribution network real-time simulator based on FPGA

Publications (2)

Publication Number Publication Date
CN108563588A CN108563588A (en) 2018-09-21
CN108563588B true CN108563588B (en) 2021-02-02

Family

ID=63531881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810221838.1A Active CN108563588B (en) 2018-03-18 2018-03-18 Multi-rate interface design method of active power distribution network real-time simulator based on FPGA

Country Status (1)

Country Link
CN (1) CN108563588B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131812B (en) * 2020-08-12 2023-10-27 北京华电天仁电力控制技术有限公司 Multi-step long parallel power real-time simulation system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306078A (en) * 2011-08-09 2012-01-04 河北省电力建设调整试验所 Power grid information three-dimensional display method based on multiple display diagram types
CN103455668A (en) * 2013-08-23 2013-12-18 中国南方电网有限责任公司电网技术研究中心 Electromagnetic transient simulation interpolation method of state variable oriented nodal analysis combination frame
CN104537233A (en) * 2014-12-23 2015-04-22 国家电网公司 Distribution network pseudo measurement generating method based on kernel density estimation
CN104715103A (en) * 2015-01-12 2015-06-17 国家电网公司 Photovoltaic cell real-time simulation model design method based on FPGA

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030182639A1 (en) * 2002-03-25 2003-09-25 International Business Machines Corporation Circuit simulator system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306078A (en) * 2011-08-09 2012-01-04 河北省电力建设调整试验所 Power grid information three-dimensional display method based on multiple display diagram types
CN103455668A (en) * 2013-08-23 2013-12-18 中国南方电网有限责任公司电网技术研究中心 Electromagnetic transient simulation interpolation method of state variable oriented nodal analysis combination frame
CN104537233A (en) * 2014-12-23 2015-04-22 国家电网公司 Distribution network pseudo measurement generating method based on kernel density estimation
CN104715103A (en) * 2015-01-12 2015-06-17 国家电网公司 Photovoltaic cell real-time simulation model design method based on FPGA

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Synchronisation mechanism and interfaces design of multi-FPGA-based real-time simulator for microgrids;Peng Li等;《The Institution of Engineering and Technology 2017》;20171231;第11卷(第12期);3088-3096 *
基于RTDS的有源配电网暂态实时仿真与分析;于力;《电力系统及其自动化学报》;20150430;第27卷(第4期);18-25 *

Also Published As

Publication number Publication date
CN108563588A (en) 2018-09-21

Similar Documents

Publication Publication Date Title
CN103942372B (en) Multi-rate interface method for transient real-time simulation of active power distribution network based on FPGA
CN106844256B (en) A Design Method of Internal Interface of Active Distribution Network Real-time Simulator Based on Multiple FPGAs
CN102436534B (en) Simulating method for electric power system
US11476667B2 (en) Hybrid electromagnetic transient simulation method for microgrid real-time simulation
CN107423476B (en) Parallel communication method for real-time simulators of active power distribution network based on multiple FPGA
CN103077268B (en) Towards the state space method for automatic modeling of electromagnetic transient in power system emulation
CN106649927A (en) Real-time simulation combined modeling method for power electronic elements based on FPGA
Sun et al. Real-time electromagnetic transient simulation of multi-terminal hvdc–ac grids based on gpu
CN108063456A (en) The grid-connected planing method of distributed photovoltaic power generation and terminal device
CN105427063A (en) Micro-grid scheduling decision method and micro-grid scheduling decision system
CN107122562B (en) Serial communication method of real-time simulator for active distribution network based on multi-FPGA
CN108520105B (en) A multi-rate real-time simulation method for active distribution network based on FPGA
Scheibe et al. A novel co-simulation concept using interprocess communication in shared memory
CN104715103B (en) Photovoltaic cell Real-Time Model design method based on FPGA
CN108563588B (en) Multi-rate interface design method of active power distribution network real-time simulator based on FPGA
CN108021741A (en) Based on more FPGA active power distribution networks multi tate real-time simulator synchronization mechanism design methods
CN101404040A (en) Computation resource partition method for power system real-time simulation based on subgraph omorphism
CN109002660B (en) A generalized design method for real-time simulation solver of active distribution network based on FPGA
CN114741956A (en) A Graph Neural Network Based Carbon Emission Flow Tracking Method
CN110489798B (en) A fine-grained and efficient design method for solvers for real-time simulation of active distribution networks
Debnath Real-time simulation of modular multilevel converters
Wang et al. Improved numerical methodologies on power system dynamic simulation using gpu implementation
CN114142460A (en) Energy storage double-layer target optimization configuration method and terminal in comprehensive energy system
CN107330231B (en) Control system real-time simulation framework design method based on FPGA
Abhyankar et al. Parallel-in-space-and-time scheme for implicitly coupled electromechanical and electromagnetic transients simulation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant