Is there any transfer function packages available for Open Modelica? - modelica

I'm a research trainee building a model of powerplant in Open Modelica and the governing equations contain transfer fuctions in laplace transform. Can someone send a link to the laplace transform packages for open modelica ? Google dint help

Transfer functions can be simulated with Modelica.Blocks.Continuous.TransferFunction which is part of the Modelica Standard Library.
Regards
Rene Just Nielsen

Related

How to perform local sensitivity analysis in modelica

I want to do local senstivity analysis in Dymola to evaluate different parameters affecting the energy consumption in a building (for multi-familyhouse).
Can anyone give me some suggestions, how to do it in Dymola (Modelica) software?
You could export you model as FMU and then follow one of many the different paths for sensitivity analysis with FMUs:
PyFMI + SAlib Sensitivity Analysis using PyFMI - FMU in for-loop
FMI Toolbox for Excel by Modelon http://www.modelon.com/products/modelon-deployment-suite/fmi-add-in-for-excel/
openTURNS + FMI https://www.researchgate.net/publication/321624302_A_Probabilistic_take_on_system_modeling_with_Modelica_and_Python, https://github.com/openturns/otfmi, http://www.openturns.org/
...
Did you take a look at the "Design" library that comes with Dymola? It contains functions to sweep and perturb parameters.
You can load it in File -> Libraries -> Design. Some examples on how to apply the library can be found in the first chapers of the Dymola Manual 2. From the question I guess the Calibration package should be most useful for you.
One approach could be to do the modelling in Dymola (or OpenModelica, Simulation X, whatever), and then do the parameter sweep, pre- and post-processing, plotting, optimization and so on from Python. Dymola has a Python interface, so you can start simulation, read results, change parameters and so on from Python. Everything that can be done from the GUI is in theory also possible from the Python interface.
A Matlab interface and a Javascript interface are also available.

Can Simscape Multibody or Simscape Driveline generate automatically the dynamic equations of motion?

The description of the Simulink MATLAB package for Simscape Multibody says it can formulate the equations of motion for a mechanical system. I searched everywhere in the documentation and examples and I can't find a single example of how to do this, is there a specific block or does it actually mean the software calculates the equations as a black box and can't be extracted? Additionally, I'm also looking to calculate and simulate the natural frequencies of a planetary gearbox, can this packages also do this?
I'd appreciate any comments and suggestions, thank you!
https://uk.mathworks.com/help/physmod/sm/
"You can model multibody systems using blocks representing bodies, joints, constraints, force elements, and sensors. Simscape Multibody formulates and solves the equations of motion for the complete mechanical system. You can import complete CAD assemblies, including all masses, inertias, joints, constraints, and 3D geometry, into your model. An automatically generated 3D animation lets you visualize the system dynamics."
Simscape Multibody solves the equations of motions under the hood, it does not make them available to the user. It is in effect, a black box.
With regards to vibration analysis, this can be done in the Simscape Driveline package. Though the level of detail might not be high enough to do this for a single planetary gearbox.
There's a tool called simscape2casadi that, though in alpha stage, claims to be able to do what you want. A description can be found in this paper and the code can be found in this git repository. Please note that it requires Simulink Coder to generate C code from your model.

How to get differential equations from simscape system?

I have simmechanics model in simscape, I have imported it from solidworks design
I'm able to get linearized model using linmod and it is okay as any system in simulink
The problem here that I want to get the differential equations for that system, Is there any way to extract them?
The short answer: no, there is no built-in functionality.
The long answer: you'd have to parse the Simscape network, query the source equations (if the source code is visible). And stack these together. That's a pretty involved workflow.

How to choose ode solver in simulink for automobile applications

Can anyone tell me how to choose the ODE solvers in order to design a automobile model? There are various ode solvers in simulink. Can I know the differences for each ode solver and for which type of applications these solvers should be used.
It will be of great help if I get some guidance regarding this.
Thank you in advance for the well wishers.
See Choose a Solver in the Simulink documentation. If you are using Simscape or other physical modelling tools, also check out Setting Up Solvers for Physical Models in the Simscape documentation.

Any Matlab functions out there for handling Hidden Markov Models with continuous observation variables?

In the Matlab Statistics toolbox there are several functions for handling Hidden Markov Models (HMM), but they all work with discrete observation symbols. Does anyone know if there are toolboxes or functions (perhaps from a third party) that can handle continuous observation variables?
We came to an acceptable solution in the comments, so I'll post it here for future reference:
WEKA has appropriate functions for handling HMMs, and as it has a Java API it is an ideal candidate for use with MATLAB. MATLAB itself is a Java interpreter, so you can make direct calls to the WEKA api, passing and retrieving data.
Here is a matlab fileexchange example demonstrating the use of WEKA through MATLAB.
Here is a Java example showing how to use a generic WEKA classifier, which should be applicable to the third party HMM
Prof. Zoubin Ghahramani has written code for the EM algorithm:
http://mlg.eng.cam.ac.uk/zoubin/software.html