Modelica and CANBus (General, CANOpen, and/or J1939) - modelica

I have experience with Simulink and CANbus interfaces for both simulation and code generation... but I really like open source. For quite awhile Octave has qualified as a MATLAB replacement (at my usage level) but I just recently found out about Modelica. I have yet to find any information about any blocksets (what term does Modelica tend to use?) for CANbus other than the broken link for Exite from Extessy.
Can anyone provide personal experience or a reference to information on using Modelica with CANbus? I know that I could write my own blockset, but it seems like the sort of thing someone else would already have done.

The best reference I could find on this topic was this paper. It was apparently developed as part of the EuroSysLib project. I do not know if it is publicly available anywhere. I would suggest you contact the authors.

another option for simulation of entire ECUs, including CAN is described here:
http://qtronic.de/en/index_news_12_6_ATZ.html
See paper "Building Virtual ECUs Quickly and Economically" in the June 2012 issue of ATZ electronic. Use Modelica to build vehicle simulation models for export as FMU,
and the Silver Basic Software (SBS) to configure CAN emulation based on DBC files,
and run both parts closed-loop in Silver.

Related

Agent based modeling for Supply Chain Management

I am a final year student of Computer System Engineering.My FYP is Agent Based Modeling for Supply Chain Management. I don't know how to start it or which software should I use. Repast? Netlogo? Anylogic?
Please guide me how to proceed with my project.
Even though this question is opinion-based, I was part of a project whose objective was to compare exactly the softwares you mentioned here: Repast, Netlogo and AnyLogic. What I did in this study was to create AnyLogic models. Someone else was creating the models in Netlogo and Repast.
There is no paper with the conclusions yet, but the person who did this study told me that AnyLogic was better in terms of easy to use and scalability than the others and Repast has the steepest learning curve. Nevertheless for small scale projects, AnyLogic and Netlogo are equally suited so it doesn't matter which one you choose.
Nevertheless, remember that AnyLogic on its free version allows you to use only 10 agents, which is a lot, but if your project is really big and you want everything for free, you may encounter a problem there.
As a platform that allows to work with agents that include in the same platform: editing code, show the area of simulation and generate graphics. I think Netlogo platform is suitable for this reason. you can also link it with other programming languages like python and R.

How to connect SystemC model with SystemVerilog?

Say we have a SystemC model of decade counter and I want to verify SystemVerilog Counter RTL using SystemC model. How can we connect these two in SV/UVM based testbench so as to communicate between them.
Mentor developed a free package called UVMConnect that was developed specifically for the application you are asking about. See https://verificationacademy.com/topics/verification-methodology/uvm-connect. You will need a simulator that supports SystemVerilog and SystemC simulating together, like Questa.
If you're using QuestaSim I think UVM-connect from Mentor is the way to go. When I first used it(4 years ago) it was very buggy and gave the most cryptic segfault errors I've ever seen. But, with help from the Mentor support I managed to overcome them and get stuff done. It should be more stable now, but if you have problems with it don't hesitate to contact Mentor support. They are very responsive.
However, if you're using Cadence tools and/or the e language I think that UVM-ML from Cadence is a much more comprehensive solution. It allows you to connect components written in any combination of languages(SV-SC, SV-e, SC-e) and it has nicer documentation and examples. I understand it's also compatible with all simulators now. You can find it here : http://forums.accellera.org/files/file/65-uvm-ml-open-architecture/
Not sure what Synopsis folks recommend for their tool suite. Maybe someone who used them can offer more information on this. But I'm guessing that both UVM-ML and UVM-Connect could work since their makers claim that they are portable.
And lastly, if you're planning to use SystemC as a verification language(very unlikely but just for the sake of diversity) there is something called UVM-SystemC which is basically a clone of SV-UVM written in C++/SystemC. It's currently in its alpha release and it lacks many features(register modeling, constrained randomization, coverage collection, etc.). It feels a lot like SV-UVM and I think it's a nice toy to play with in your spare time if you can't afford a commercial simulator license. You can find it here http://accellera.org/images/downloads/drafts-review/uvm-systemc-1.0-alpha1.tar.gz

How to generate 3D point cloud data file from multiple images of the object?

Are there any tools or algorithm in Matlab or OpenCv, which will take multiple images of any object as input (from different location around the object) and produce the 3D coordinate of the object in the world.
Like Naveh said, in OpenCV the building blocks are there, but putting it together is something you would have to do.
That being said, people have generated a number of SfM tools in both C++ and Matlab. Depending on your goals there are a number of prepackaged things you can look at:
-There is a SfM Matlab Toolbox here, I have not personally used it but I've seen it a number of times.
-If you are just looking for a black-box solution, check out Visual SfM, it is a GUI-fied version of a common SfM workflow.
-A while ago I put together a guide for installing the Visual SfM components individually on Fedora, if you wanted to dig into them. I'm not sure how relevant it is now but it might help.
Regardless, you should certainly educate yourself on the processes involved in creating 3D structure from imagery. It is a complicated process with many details which need to be understood.
What you are asking for is a fully fledged structure from motion algorithm. I don't think such a thing exists in MATLAB or OpenCV right off the shelf. However, the building blocks required for such an algorithm are there.
I suggest you do some background reading to better understand what specific algorithm will suit your needs. A good place to start is in Richard Szeliski's textbook, chapter 7. A free draft is available here. This book is recommended both in general as a good computer vision textbook, and specifically as well for your question, in which Szeliski himself is quite an expert.

Any good library or software for queue networks simulation?

I have been trying to make work EZSIM with no luck, which is a software to build discrete event simulators in a graphical DOS environment. In this software, my simulator and many others (of the other people in the course I'm taking) don't work, but teacher's simulator (and examples of the downloaded files) does work.
So, I began to distrust of the software.
Do you know any software that resolves the same kind of problems but really works? It will be good if it is free, or I can download an evaluation copy or something like that.
If you don't know any software, do you know any library which might work? Preferably in C#, Ansi C, Java or Delphi.
This may be more than what you're looking for, but check out NS2. It's the standard for open source network simulations, and will allow you to simulate all kinds of network layer behavior.
I've also used JUNG in the past. It's very flexible, although it also doesn't offer much out of the box.
I used Möbius in my computer systems analysis class. It is free for educational use (which sounds like what you're doing). It's a Java GUI which generates C++ code.
The R package queuecomputer. queuecomputer is a computationally efficient method for simulating queues with arbitrary arrival and service times. There is a submitted paper on arXiv describing the algorithm used in the package. Examples can be found within the arXiv paper and the vignette. A web app based on the package is available at https://ace-ebert.shinyapps.io/queue_simulator_mmk/ .

Robot simulation environments

I would like to make a list of remarkable robot simulation environments including advantages and disadvantages of them. Some examples I know of are Webots and Player/Stage.
ROS will visualize your robot and any data you've recorded from it.
Packages to check out would rviz and nav_view
This made me remember the breve project.
breve is a free, open-source software package which makes it easy to build 3D simulations of multi-agent systems and artificial life.
There is also a wikipage listing Robotics simulators
Microsoft Robotics Studio/Microsoft Robotics Developer Studio 2008
Also read this article on MSDN Magazine
It all depends on what you want to do with the simulation.
I do legged robot simulation, I am coming from a perspective that is different than mobile robotics, but...
If you are interested in dynamics, then the one of the oldest but most difficult to use is sd/fast. The company that originally made it was acquired by a large cad outfit.
You might try heading to : http://www.sdfast.com/
It will cost you a bit of money, but I trust the accuracy of the simulation. There is no contact or collision model, so you have to roll you own. I have used it to simulate bipeds, swimming fish, etc.. There is also no visualization. So, it is for the hardcore programmer. However, it is well respected among us old folk.
OpenDynamics engine is used by people http://www.ode.org/ for "easier" simulation. It comes with an integrator and a primitive visualization package. There are python binding (Hurray for python!).
The build in friction model.. is ... well not very well documented. And did not make sense. Also, the simulations can suddenly "fly apart" for no apparent reason. The simulations may or may not be accurate.
Now, MapleSoft (in beautiful Waterloo Canada) has come out with maplesim. It will set you back a bit of money but here is what I like about it:
It goes beyond just robotics. You can virtually anything. I am sure you can simulate the suspension system on a car, gears, engines... I think it even interfaces with electrical circuit simulation. So, if you are building a high performance product, than MapleSim is a strong contender. Goto www.maplesoft.com and search for it.
They are pretty nice about giving you an eval copy for 30 days.
Of course, you can go home brew. You can solve the Lagrange-Euler equations of motion for most simple robots using a symbolic computation program like maple or mathematica.
EDIT: Have not be able to elegantly do certain derivatives in Maple. I have to resort to a hack.
However, be aware of speed issue.
Finally for more biologically motivated work, you might want to look at opensim (not to be confused with OpenSimulator).
EDIT: OpenSim shares a team member with SD/Fast.
There a lots of other specialized simulators. But, beware.
In sum here are the evaluation criteria for a simulator for robot oriented work:
(1) What kind of collision model do you have ? If it is a very stiff elastic collision, you may have problem in numerical stability during collisions
(2) Visualization- Can you add different terrains, etc..
(3) Handy graphical building tools so you don't have to code then see-what-you-get.
Handling complex system (say a full scale humanoid) is hard to think about in your head.
(4) What is the complexity of the underlying simulation algorithm. If it is O(N) then that is great. But it could be O(N^4) as would be the case for a straight Lagrange-Euler derivation... then your system just will not scale no matter how fast your machine.
(5) How accurate is it and do you care?
(6) Does it help you integrate sensors. For mobile robots you need to have a "robot-eyes view"
(7) If it does visualization, can it you do things like automatically follow the object as it is moving or do you have to chase it around?
Hope that helps!
It's not as impressive looking as Webots, but RobotBasic is free, easy to learn, and useful for prototyping simple robot movement algorithms. You can also program a BasicStamp from the IDE.
I've been programming against SimSpark. It's the open-source simulation engine behind the RoboCup 3D Simulated Soccer League.
It's extensible for different simulations. You can plug in your own sensors, actuators and models using C++, Ruby and/or RSG (Ruby Scene Graph) files.
ABB has a quite a solution called RobotStudio for simulating their huge industrial robots. I don't think it's free and I don't guess you'll get much fun out of it but it's quite impressive. Here's a page about it
I have been working with Carmen http://carmen.sourceforge.net/ and find it useful.
One of the disadvantages with Carmen is the documentation with all respect I think the webpage is a bit outdated and insufficient. So I like to hear from other people with experience in working with Carmen, or student reports/projects dealing with Carmen.
You can find a great list with simulation environments http://www.intorobotics.com/robotics-simulation-softwares-with-3d-modeling-and-programming-support/
MRDS is one of the best and it's free. Also LabView is good to be used in robotcs
National Instruments' LabView is a graphical programming environment for developing measurement, test, and control systems.
It could be used for 3D control simulation with SolidWorks.
MRDS is free and is one of the best simulation environment for robotics. Workspace also can be used, and please check this link if you want a complete list with robotics simulation software
Trik Studio has a nice and clear 2D model simulator and also visual and textual programming programming environments for them. They also soon will support 3D modeling tools based on Morse simulator. Also it is free and opensource and has multi-language interface.