Transform a Diagraph Model into a Simulink Model.

Hello everyone,
Well i got the matpower cases as an example and my job is to export these Datas in a Diagraph. From there i need to Export the Diagraph in a Simulink Model. But which blocks do i have to take for that? Is there any Matlab Function which helps me with my Problem? Is it possible to transform a Diagraph Model into a Simulink Model?
Best Regards

2 Comments

By "diagraph" do you mean a digraph object?
Can you clarify what you mean by "the matpower cases as an example"? Do you have a link to the example to which you're referring?
I attatched an example of such a file. There you find properities of a Grid. There are three adjacency matrix in this matlab code. Those i can transform in a diagraph model see link: https://de.mathworks.com/videos/graph-and-digraph-classes-106802.html?s_tid=srchtitle.
Questtion is now. Is there any chance to transform this graph into a simulink model?.

Sign in to comment.

 Accepted Answer

There is no function specifically designed to convert a digraph object into a Simulink® model. If you know the type of block you want to use to represent each of the nodes, you could probably write such a function making use of the Simulink API functions like add_block and add_line. Add the blocks representing each node, then iterate over the nodes of the digraph and add a line connecting each node to its successors.
The tricky part will be deciding what block should represent each node. Simulink does not, as far as I'm aware, have a "general" block that is just designed to be connected to an arbitrary number of other blocks. What do you intend to use this Simulink model form of the digraph to do? If you want to simply visualize the relationship between the nodes, you don't need to use a Simulink model to do that. In that case, just plot it.

1 Comment

Thank you for your help Steven :). I try to solve the problem like you told me to do.
My exercise is just simply to read the Matpower Cases in Matlab analyse them, transform the information into a diagraph model and from there on to make a Simulink Model out of it. This needs to happen automatically for all cases. So basically i need to create a tool which analyse the Matpower Cases automatically. At the end there should be a visualization of the Grid in Simulink.
Best Regards
Baran Yardimci

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!