Group Abstract Group Abstract

Message Boards Message Boards

1
|
14.3K Views
|
7 Replies
|
4 Total Likes
View groups...
Share
Share this post:

WL / SystemModeller: PID, Fuzzy, NN predictive & MPC, etc. controllers?

Posted 11 years ago
7 Replies

Hi Pradeep!

As you've noticed, the Modelica Standard Library contains PID-controllers and Linear Quadratic regulators. You also have the possibility to construct boolean logical controllers using the blocks available in the Modelica.Blocks.Logical library.

For other types of control you can use third party libraries. The Modelica Association list some free libraries here. For your application, it seems that the IndustrialControlsSystems, NCLib (simulation of networks and controllers), and LinearMPC libraries might be of interest to you. I have not used any of these personally so I can't speak for their functionality, though they are free to download. As Jan mentioned there is also a library for FuzzyControl but it has not been updated for three years so it might need some tuning to adhere to the newest Modelica standards.

When implementing more advanced forms of controllers we usually use SystemModeler in conjunction with Mathematica. The blog post Jan linked to is an example of this, showing the development of a Nonlinear Model Predictive Controller. There, we build a model of the system utilizing the graphical modeling of SystemModeler and processing and discretizing the resulting equations in Mathematica which results in a cost function and conditions that can be deployed together with a solver. The deployed controller could then be called in SystemModeler as Modelica has the ability to interface simulations with external libraries.

We are working on developing a workflow for developing deployable nonlinear model predictive controllers from SystemModeler but it is an ongoing project.

It might help if you explained more about what you are looking to do. Am I correct in understanding that you want to compare different controllers with each other? What kind of scenario are you looking to control?

POSTED BY: Patrik Ekenberg

I let someone else answer on 1)

2) You can model all of those in SystemModeler. There's no built-in library with Fuzzy controllers, but you can make your own components for graphical use of course. There is a free Modelica library for Fuzzy control available, but unfortunately it's updated. I would guess that you can draw inspiration from it though.

I believe you might find this downloadable example of a model inversion control interesting:

http://www.wolfram.com/system-modeler/industry-examples/more/heavy-equipment/model-inversion-control-of-a-hoist-crab

3) Yes, results are always stored in mat-file,

http://reference.wolfram.com/system-modeler/UserGuide/SimulationCenterSimulationResultFiles.html

and experiment settings in an xml file

http://reference.wolfram.com/system-modeler/UserGuide/SimulationCenterSimulationSettingsFiles.html

4) You can use AbsoluteTiming in Mathematica to get the simulation time.

POSTED BY: Jan Brugard

Hello,

Modelica libraries usually contain example models inside the downloads that show use-cases for the libraries so that you can explore the libraries for yourself hands on. Some libraries are also part of academic papers and if so, you'll often find references to those papers on the GitHub pages. If you are interested about using SystemModeler, you could contact me directly and I'll help you get started (email is in bio).

POSTED BY: Patrik Ekenberg

Hi Patrick,

Thank you for your answers to my questions. I am not comparing different controllers. But my task was to research on different simulation tools where i can implement digital control systems and then compare the simulation tools. For this purpose i have few initial criterias for selection of simulation tools. So for this i have to know what are the controllers that can be implmented to control my system. So i want to know the information of different controllers as i mentioned in the previous post. May i know how to use this third party libraries in the system modeler.

This blog, http://blog.wolfram.com/2015/08/26/releasing-the-opcclassic-library/, talks a little bit about MPC, but it's not downloadable. I will see if I can find something though. Same for Fuzzy controllers. Stay tuned. :)

POSTED BY: Jan Brugard

Hi Jan Brugard,

Thank you for your reply Jan. For your answer to the second point you said that it is possible to model all the controllers in System Modeller. But in the documentation i am always able to find only related to PID controller which is in modelica library called (LimPID). IF possible can you provide some supporting documnets or web adress where i can find the info for implementing Fuzzy, PID like Fuzzy controller, NN predictive controller, Model predictive controller. Please help me in this regard.

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