Dynamically modify the parameters of the standard example (1. Simulink simulates this parameter 2. Matpower modifies runpf.m, and modifies the data of the loaded standard example before each power flow calculation)

     For example: I want to perform power flow calculation on IEEE39 nodes, and case39 in matpower gives various types of data for this standard example. What I want to do now is to modify the parameters of all load nodes in this standard example to achieve continuous growth of the total load, and to observe the results of its power flow calculation, such as the changes in node voltages of all nodes. Some people say that it can be achieved by building a simulation model through simulink, and I have tried the same.

    Let's write about the problems I have with simulink first, which are to be solved. It is not difficult to build a model, the trouble is the parameter settings of each module. As a novice with knowledge of power system, parameter setting is really a big problem. After I honestly finished Yu Qun's "MATLAB-Simulink Power System Modeling and Simulation", I finally got a little clue. Well, I barely set all the parameters.

    But how to continuously increase the actual load? Modify the parameters manually every time after the run ends? No, I wouldn't use such a stupid plan!

    Looking for information, I first control the simulation run and pause through set_parameter , and then also modify the parameters of the load module through this function. The problem appeared "the parameters cannot be modified during the simulation process", and I thought about using the S function , but it did not meet my expectations. Later, I found out that the module I used does not seem to be able to modify the parameters during operation. Then, I found a dynamic load module . Voila! Listening to the name is like being able to fulfill my needs. I happily joined the block, and immediately an error appeared " modeled as a current source, cannot be connected in series with the inductive element of the second block. Add a high-value resistance in parallel with one of the two block. You can also specify high-value resistive snubbers if th parallel large resistance .) Click to open the link.  I started the simulation with high expectations, but the voltage waveforms are all messy. Check the information, the device that introduces dynamic load is equivalent to a Controlled current source. The article "Improved control strategy of dynamic load components in real-time simulator developed based on Simulink" Wang Shibiao mentioned related content. I have no solution to this problem, so I put it on hold.


    In terms of matpower, this thing is really useful.

    In order to achieve my purpose, my idea is to write a function file to control multiple power flow calculations, and the parameters of each power flow calculation are different. To do this, open the runpf.m file and find the following line of code:

   Sbus = @(Vm)makeSbus(baseMVA, bus, gen, mpopt, Vm);

What this line of code implements is to read in the data.

Then our operation is written before this code, and the data in the bus gen can be modified. Such as:

  bus(operate_num,3)=  percent*bus(operate_num,3);       
  bus(operate_num,4)=  percent*bus(operate_num,4);  
Among them, operate_num is the number of nodes I want to modify, and percent is the modified proportional coefficient given by the function I wrote to control the loop. The above two lines of code implement the modification of the active and reactive power of a given node.

    The above are some results that I generated after 125 cycles. The load node of each cycle increases by 0.2% on the original basis. bus_cell is a cell array that holds the result data for each bus for 125 loops. Other data have similar meanings, so I won't say much here.

    After uploading the relevant code, leave a memory. The problem of simulink still has to struggle!

    Be a salted fish with dreams, over!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324770198&siteId=291194637