Simulink

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
One of my colleagues has signed up for a visit from a sales rep to sell me Matlab and Simulink. I've a vague idea that Matlab is for dealing with systems that require complex maths, but what does Simulink do? Is it useful? What on earth is a multidomain simulation environment?
 

Ya’akov

Joined Jan 27, 2019
10,226
One of my colleagues has signed up for a visit from a sales rep to sell me Matlab and Simulink. I've a vague idea that Matlab is for dealing with systems that require complex maths, but what does Simulink do? Is it useful? What on earth is a multidomain simulation environment?
It‘s a very sophisticated simulation environment with the capability to simulate continuous and discrete time systems (or a combination), state-based systems (control systems, and the like) and specific physics: electrical, mechanical, hydraulic, thermal and also, to combine all these things.

It‘s an expensive monster of a program, but it is very widely used in academia, research, and industry.
 

MrChips

Joined Oct 2, 2009
34,629
I have used MATLAB extensively but never used Simulink. I understand that it can also simulate MCU systems.
MATLAB + Simulink together is very costly. Fortunately, my university has a site license and I can use it at no cost.
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
Damned by faint praise?

I see comments on how big and expensive it is, and that it gets used if it is free, but is it actually a better way of doing things than plain old C?
 

Ya’akov

Joined Jan 27, 2019
10,226
Damned by faint praise?

I see comments on how big and expensive it is, and that it gets used if it is free, but is it actually a better way of doing things than plain old C?
You couldn‘t really do what it does in C. The domain specific tools are pretty amazing. Matlab is also really good but it is often misapplied because users know it but not how to program in some more appropriate language. Similar ot the overextension of spreadsheets.

But both tools are very mature and amazingly powerful.
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
I've got nothing more complicated in the software than a square root and a single-pole IIR filter, so I definitely think my colleagues were thinking about Simulink not the Matlab part of it.
Simulink seems to me like a glorified version of SPICE, extended beyond electronics. I wonder how many times it fails to converge?
 

nsaspook

Joined Aug 27, 2009
16,255
You couldn‘t really do what it does in C. The domain specific tools are pretty amazing. Matlab is also really good but it is often misapplied because users know it but not how to program in some more appropriate language. Similar ot the overextension of spreadsheets.

But both tools are very mature and amazingly powerful.
I've not used it but there is MPLAB® Device Blocks for Simulink. I've looked into using it with the PIC32MK for advanced motor and power control applications that need higher-end math functionality but C so far has been able (easily) to handle it at the low-level FoC transformations.
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
You couldn‘t really do what it does in C. The domain specific tools are pretty amazing. Matlab is also really good but it is often misapplied because users know it but not how to program in some more appropriate language. Similar ot the overextension of spreadsheets.

But both tools are very mature and amazingly powerful.
But if I can write it in C, is there any point whatsoever in doing it in Matlab? Is that what you mean by misapplication?
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
I've not used it but there is MPLAB® Device Blocks for Simulink. I've looked into using it with the PIC32MK for advanced motor and power control applications that need higher-end math functionality but C so far has been able (easily) to handle it at the low-level FoC transformations.
It's a long time since I last used MPLAB, but that sounds very much like the FPS components that Renesas included in e2studio.
(If you're as familiar with E2studio as I am with MPLAB then that's not too helpful)
 

Ya’akov

Joined Jan 27, 2019
10,226
But if I can write it in C, is there any point whatsoever in doing it in Matlab? Is that what you mean by misapplication?
Yes, since you can write anything in C. The value of Matlab is the the domain specific abstraction. The misapplication th using a sledgehammer to kill a gnat variety. People will use Matlab when a program in a general purpose language would work as well or better and the massive environment of Matlab is pure overhead. There is (was at least was) a semi-effective Matlab → C "compiler" that tried to address this to some extent but didn't seem that useful.
 
Top