Group Abstract Group Abstract

Message Boards Message Boards

6
|
12.7K Views
|
60 Replies
|
14 Total Likes
View groups...
Share
Share this post:

[WSG24] Daily Study Group: Guiding Principles for Systems Modeling and Simulation

Posted 1 year ago
POSTED BY: Ankit Naik
60 Replies

Hello Ankit,

I am surprised not to have gotten any reply to my questions. Is this community group still active?

Carl

POSTED BY: Carl Hahn

Hey Ankit, Did I miss this? How do you save things in a Session in System Modeler / Simulation Center so that you can close them and reopen and pick up where you left off? Is there a way to do that? Carl Also, where can you go to get easy to use Modelica models for electronic components and subsystems like microwave components that can be loaded into System Modeler? Like Couplers, mixers, amplifiers etc? Do they even exist?

POSTED BY: Carl Hahn
POSTED BY: Ankit Naik

How do you save things in a Session in System Modeler / Simulation Center so that you can close them and reopen and pick up where you left off? I thought I knew how... but alas...

POSTED BY: Carl Hahn

While reviewing the "Different Models" session I would like to try the creation and simulation of the model based upon the business library. By chance do you have a list of parameters for those components? Thank you, John

POSTED BY: John Burgers
POSTED BY: Ankit Naik
Attachments:
POSTED BY: John Burgers

I agree with your observation John. For the business model, the energy difference during speed transition is not significant and not required.

POSTED BY: Ankit Naik

In the April 19 Files posted there is a "Readme" file. What is that?

POSTED BY: Carl Hahn

Not sure. That file was not used in the sessions. I will ask the our team to remove it.

POSTED BY: Ankit Naik

Hello, Ankit especially you and for sure the team must be exhausted by these sessions. Thanks a lot.

My question today is,

In the CriticalToData session I unfortunately overwrote the "inf" symbol in the totalVoters component. I wrote inf into the field but that seems to be an error. Can you say how to put infinity into a field?

Thanks, John.

POSTED BY: John Burgers
POSTED BY: Ankit Naik
Posted 1 year ago
POSTED BY: Ulf Schmidt
POSTED BY: Ankit Naik
Posted 1 year ago

After the study group's end, for how long would we still be able to re-watch the videos?

POSTED BY: Nicholas Lima

The recordings will be hosted in Wolfram U as on-demand videos after the study group is over.

POSTED BY: Ankit Naik
Posted 1 year ago

Hi Ankit,

Still no recording of yesterday's class is available (lol). I must study it before today's class. How can I do it?

POSTED BY: Soomi Cheong
POSTED BY: Ankit Naik
Posted 1 year ago
POSTED BY: Soomi Cheong
Posted 1 year ago
POSTED BY: Soomi Cheong

Hi Soomi,

We will cover SystemModelCalibrate in tomorrow's session.

@Vedat Senol was sick last week. If he feels better then he should join from tomorrow.

POSTED BY: Ankit Naik

Hi Ankit:

Has the recording from today's session (Monday, April 15th) been posted? If so, I haven't received the email link yet to view it. I usually receive it shortly after the on-line session ends, but it's now 1810 CDT (Houston). I'm trying to keep up, so I'd like to view today's session and work through the examples before tomorrow's session. Like another participant, I need to frequently pause the recording to ensure I'm making the correct entries in System Modeler and get a better understanding of what's going on. Thanks to you and all the other presenters/support staff for all the excellent content.

Regards,

Jim Kralik

POSTED BY: James Kralik
POSTED BY: Ankit Naik
POSTED BY: Carl Hahn

Also the options like Frame->None are not recognized... The word "Frame" comes out in red font. Also if I use "false" same result...

OK so I answered my second question: The suggestion bar at the bottom of the graph is not creating a list of options. If I place the curly bracket like you did manually, it will accept the Frame->False or None options. I don't know if that's a bug with WL 14 or SM 14, but it's not working the way it should. I'm running both on a MAC.

POSTED BY: Carl Hahn
POSTED BY: John Burgers

Further to the above Carl, ...

You should also ensure the the lesson library is automatically loaded when SM starts,

Tools > Options > Global > Modelica Libraries > Add a library Then navigate to the directory that contains ModelingPrinciples.mo

John

POSTED BY: John Burgers

Thank you. Re-starting the kernel did the trick. Weird, that one. But the suggestions box is still generating the wrong syntax to remove the box. Is System Modeler is violating a Mathematica syntax rule? Or is the suggestion box violating a syntax rule? Have to come back the that...

POSTED BY: Carl Hahn
POSTED BY: Ankit Naik

K. Sorry about my own syntax violations there... I was cut and pasting my thoughts and I guess I cut when I should have pasted or something like that.

POSTED BY: Carl Hahn

Hello Ankit,

I had troubles during the steps in WM 14 in the Start simple session. The solutions.step5 model crashed. Was this a common experience? Edit - I went back to this and found the problem, no need to answer.

I have a question also. Can you show how to save parameter adjustments made in Simulate back to the model?

Thank you, John

POSTED BY: John Burgers

Hi John,

In Simulation Center, go to File -> Save Experiment Settings -> Ok

POSTED BY: Ankit Naik

This has been the best set of classes on System Modeler that I've seen so far, and it's opening my eyes to what is possible. I see cool examples out of mechanical engineer and other disciplines. I'd be curious to see some canonical problems in electrical engineering solved. You can do lumped elements but I think you could create boxes that have lumped elements inside of them. RLC circuits or microwave resonator cavities. It would be fun to build a garage of "stuff". Like measure the amplitude and phase pass-band response of a band-pass filter where you can add resonators to extend it's performance and equalize its phase response. Or computing the phase noise of an analog synthesizer with a phase locked loop. And a digital version too. Quantization spurs of an ADC. Intermodulation products of an amplifier operating near compression. That sort of thing. Or maybe a test bench, where you could have a vector signal analyzer that could plot the constellation and the eye diagram of a noisy QPSK signal.

POSTED BY: Carl Hahn

Hi Carl,

I think you will enjoy reading Leonardo's blogs. I will ask Leo to attend the session on Friday (19th). He might be able to show some analysis.

https://blog.wolfram.com/2021/12/29/digital-vintage-sound-modeling-analog-drums-with-the-wolfram-language-and-system-modeler/

https://blog.wolfram.com/2020/07/23/digital-vintage-sound-modeling-analog-synthesizers-with-the-wolfram-language-and-system-modeler/

Leo is currently working on an Electric Circuits course using System Modeler which should be LIVE in 2-3 months. He probably covers some of the topics that you mentioned.

POSTED BY: Ankit Naik

Thanks! And I will definitely be looking at that circuits course.

POSTED BY: Carl Hahn

I found "Modeling and Identification of Dynamic Systems" c2021 by Ljung et all available at adlibiris.com and biblio.com, though adlibirs only seems to ship to Sweden.

POSTED BY: Jerry Dimsdale
Posted 1 year ago

I installed System Modeler version 14 and then Mathematica version 14. After that, I started System Modeler and opened ModelingPrinciples. Then,

Unresolved dependency in ModelingPrinciples ModelingPrinciples has a declared dependency on BusinessSimulation version 2.2.0-wsm. No version of BusinessSimulation is currently loaded.

Would you tell me why it occurred and how to fix it? The day before, I installed System modeler only and started the System Modeler to open ModelingPrinciples. Then, the same error occurred. I though that it might be because I did not instsall Mathamatica. However, now I know that it was not the reason for it.

I opened the ModelingPrinciples. Then, only grided blank with Model 1 shows. The same error occurred - i.e., no difference of Mathematica installation.

If anyone knows about why it occurred and how to fix it, would you help me on it?

I posted the question during the class yesterday, but did not get the answer.

Am I the only one who has the strange error?

POSTED BY: Soomi Cheong

Hi,

That is because you don't have the Business Simulation library loaded. I will show you how to load it tomorrow.

If you don't want to wait, then you can already download it from this page: https://www.wolfram.com/system-modeler/libraries/business-simulation/

POSTED BY: Ankit Naik
Posted 1 year ago

I already found it soon after I posted the question :) Now I have the Businss Simulation Library installed in System Modeler. However, I can't change the name of Model. Your Model name is "ModelingPrinciples.Coffee.Exercises.Step1." My Model was named as "Model 1" when I opened "ModelingPrinciples." I have not been able to find how to change the Model's name. I even removed System Modeler, Mathematica, and models that I created to follow your lectures and started from the first beginning to downlod them. However, I still have the same issue. Why am I the only one who raises the issue? Am I the only one who has it? Or, am I the only one who asks about it?

POSTED BY: Soomi Cheong
POSTED BY: Carl Hahn

I will try to cover this is today's session.

POSTED BY: Ankit Naik
Posted 1 year ago
POSTED BY: Soomi Cheong

Catching up with following along using my own System Modeler evaluation version.

When I first stored the plot, the text with the name of the new plot came out black in the top right hand corner, but when you did it it came out blue; and putting the cursor on the title no longer gave me any options to make changes to it, as it did when you did it live.

What is going on there?

POSTED BY: Carl Hahn
POSTED BY: Ankit Naik
Posted 1 year ago

Thanks for the trial version of SM 14 it permits easily to follow along.

Granted this question is most likely not part of this training, however I ask in case you can lead me to a good reference on structuring a new Media in Modelica. The media I'm interested in are range from in-compressible liquid, compressible single and multi-component gases, and refrigerants. I find it quite hard to work through the Modelica supplied documentation so am hoping someone on this forum can point out a more comprehensive explanation of how to create such media models (packages).

POSTED BY: Updating Name
POSTED BY: Ankit Naik

Hello Ankit, Thank you for sharing that file. Indeed, you created it after the most recent training session. It was sent to me then as well. Inspiring to say the least. At the time I was using version 13 of WM and SM so had to edited your file to work with those versions.

Still it's daunting to look through the Modelica files to understand how the equations of state were programmed, surely someone must have created a better documentation. I'll keep looking.

Great job, with this training. It's the best so far. John.

POSTED BY: John Burgers

Can you get energy flow diagrams out of System Modeler as you showed on page three the energy tab of the first lecture?

POSTED BY: Carl Hahn

Hi Carl,

Not from System Modeler, but you can create such diagrams (Sankey diagram) using the Wolfram Language.

Once you are done with the simulation, you can extract the results from your simulation in Wolfram Language. Then use the results to create such diagrams. Here are some implementations that might be useful:

https://mathematica.stackexchange.com/questions/166439/how-to-make-a-sankey-diagram https://resources.wolframcloud.com/FunctionRepository/resources/AlluvialChart/

POSTED BY: Ankit Naik

I think the fact that you used a Sankey diagram in your charts is evidence enough that Wolfram should implement a function or package to make good Sankey diagrams. I don't know why it's missing in an otherwise superb graphing capability. The code to do it myself is still a bit intimidating...

POSTED BY: Carl Hahn

I am aware of some work going on in that direction. Hopefully, in a future release.

POSTED BY: Ankit Naik

I would like to ask a question, it is not clear to me in any system or subsytems, how many variables are "inputs" and how many "outputs" and where is this defined. I understand in a simulation all variables are then calculated for the entre time span

The easiest way of recognising inputs and outputs, for example, in a give component, is by looking at the connectors that are available in the icon of the component. Depending on the physical quantity, the connectors have different graphical representations. These are usually triangles of different colours.

In a broader sense, if you write your models, you can make any variable and input, output or none. When you make a variable input or output, there are some restrictions applied to it. For example, you will get an error when trying to connect outputs to outputs. It’s like an extra level of safety when creating your model.

All the variables are calculated when simulation is running, and the inputs will be calculated based on the output that you have connected to it. There is a special case, a top-level input, which is an input in the highest hierarchy of your model. In that case, if left unconnected, it will take a default value of zero.

POSTED BY: Ankit Naik

Thank you Ankit, You are a good presenter. A couple of points I would like to ask about.

  1. I had opened the file Step 1 to create the Example 1 Coffee mug. Then saved it. Then reopened it, and using the right mouse button on it to open the class viewer. Although you had on your screen the assembled model as an icon, this was not on my screen. Can you explain why this happened?

  2. Will you be covering the create Ctrl-N , save Ctrl-S of a new model and the associated simulation (*.sme) file ? Is it customary to save the sme files in the same directory as the model files?

POSTED BY: John Burgers
POSTED BY: Ankit Naik

Thank you Ankit,

To further clarify, you were showing us that the documentation centre automatically create an icon version of the model in the documentation head. That didn't happen for me as I was following along with you.

John

POSTED BY: John Burgers

Dear Ankit Naik

Great presentation today! I kind request. If there is the opportunity, please talk about taking advantage of the large amounts of models that have been developed in Modelica language that can be imported from Wolfram SystemModeler.

Best regards

Jesus

Sure, I will. I plan to talk about it in Friday's session.

For people following this post and new to Modelica, you can learn about the Modelica language here: https://www.wolfram.com/system-modeler/resources/what-is-modelica/

POSTED BY: Ankit Naik

How does Wolfram System Modeler compare to Matlab's SimuLink?

POSTED BY: Carl Hahn
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard