MATLAB Answers

Does anyone have the idea about inverting .p file into a readable .m file? powericon.p

22 views (last 30 days)
Yang Xu
Yang Xu on 5 Jun 2020
Answered: Meme Young on 30 Aug 2020
The initialization command in the mask of simulink library model will run automatically to set the preset parameter for corresponding model.
Synchronous machine use a powericon function to realize this initialization process. I want to know how these preset parameters are caculated by powericon, so i searched it under matlab file. However powericon function is stored in a encrypted p file, is there any methods to invert this .p file to a readable .m file.
Or is there any other way to understand how these preset parameters are calculated?
Thanks for ur help.

Accepted Answer

Meme Young
Meme Young on 12 Aug 2020
Nice try man, but I will tell you there is no shit in powericon() because it is just calling other functions to calculate the parameters for use under the synchronous machine mask, and you cant find these functions at all. Actually, all standard parameters will be converted to fundemental parameters for simulink simulation, but there is no explicit way in Simulink help to calculate, say, the fundemental parameters, using the standard parameters. Kundur's book 'power system stability and control' example 4.1 mentioned the conversion between funemental and standard parameters. I have tried it myself in Simulink and we can see the two synchronous machines using the two kinds of paramters in this book differ a little, but the conversion only stands for round stators. Kundur's book didnt mention the conversion of salient pole machines.
If you are not talking about the conversion between fundemental and standard paramters, there is one simulink example helping you understand the calculation of the parameters. "Interfacing Simulink Models with Simscape Electrical Specialized Power Systems" (power_SLmodeling) has a customed current-source-modeled synchronous machine with identical characteristics as synchronous machine models in the library. The parameters of the current source block is in power_SLmodeling_data and you can open it because it is a .m file. The composition of the parameters under the mask, like SM.R, SM.Linv, SM.RLinv, are all in this file. However the model is just a fundemental salient pole machine, so there is no parameter conversion, and there are some parameters missing compared with round stator machine ( Rkq2 and Lkq2 for salient pole doesnt have this 1 branch )
  2 Comments
Meme Young
Meme Young on 30 Aug 2020
How did you manage to access this matrix bro? I have tried it myself as well. When calling powericon() in codes, you can get a struct named SM in workspace. The resulted struct SM has just one char field of its name('SM') with nothing else. If you wanna access its fields like SM.Linv it will report an error because it doesnt have a field called Linv. Could you please tell me how did you access it and see its value?

Sign in to comment.

More Answers (2)

Meme Young
Meme Young on 30 Aug 2020
How did you manage to access this matrix bro? I have tried it myself as well. When calling powericon() in codes, you can get a struct named SM in workspace. The resulted struct SM has just one char field of its name('SM') with nothing else. If you wanna access its fields like SM.Linv it will report an error because it doesnt have a field called Linv. Could you please tell me how did you access it and see its value?
  1 Comment
Yang Xu
Yang Xu on 30 Aug 2020
1)open the block in another window or tab
2)copy and paste the matrix (constant values blocks) u want to know from the model
3)connect this matrix to block "To workspace"
4)and run this model for 3-4 simulation step size and u will find the value in workspace of matlab.
It is an indirect way to get the result of pu matrix and the conversion principle between fundamental and pu values still unknown.

Sign in to comment.


Meme Young
Meme Young on 30 Aug 2020
Thank you bro but the description is a bit confusing because it is in English. I think both of us come from China right? Could you please add my qq 980182570? If it is inconvenient for you, you can send me emails via 980182570@qq.com. Thank you.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!