Simulink's four techniques for speeding up simulation

Nowadays, the professional software is getting bigger and bigger, the function is multiplied exponentially, and the processing object is more and more complicated, especially when using some simulation software to simulate and simulate under high precision, because the hardware on the PC The slower development speed than the complexity of software features has caused our simulations to appear to be slower and slower. For example, Simulink, which is widely used in electronics, communication, and control, is there any good way to make our simulation faster? To sum up here, we can make some improvements in the following points.

The first is the construction of the model. When modeling in the Simulink environment, there are fewer problems when modeling with the s-domain expression. Increasing the error limit and canceling the zero-crossing detection can improve the development speed and reduce the warning information. In the case of the z domain, there are a few more issues to be aware of. The first point is to eliminate the algebraic loop in the model; because the data processed by the z-domain is processed by the sampling period, so if one data is used as input, and there is no delay. As an output, the problem of numerical processing is generated, resulting in a significant drop in the simulation speed. The processing method is generally not difficult, and it is better to add a delay link to the feedback. In addition, the problem of the simulation step size, in the case of ensuring the accuracy of the simulation, try to use a large step size to significantly improve the simulation speed; this maximum simulation step can naturally be determined according to Shannon's sampling law, but in general, the simulation is selected. A maximum sampling frequency of 4-10 times the step size is sufficient.

Simulink's four techniques for speeding up simulation

Second is the mode that can change the simulation. In the old version of Simulink, this choice is rare, but the new version has Normal, Accelerator and Rapid Accelerator, HIL and other modes. The hardware is obviously the fastest in the loop HIL, but it does not apply for many times, because the corresponding hardware must be available first, followed by the simulation object to support code generation. Because Simulink uses an interpreted language, the normal mode can be understood as Matlab's explanation. The operating system executes a sentence, the speed is naturally not too fast; Accelerator is to compile some shared modules into library files, such as dll calls. , equivalent to mixed mode, both interpretation-execution, direct call, speed; Rapid Accelerator is to compile the entire model into a separate program running under the operating system, less Simulink interpretation to the operating system, natural speed, The cost is that it takes a certain amount of time to compile the model; this mode requires relatively high hardware configuration for the PC, and is prone to errors when the memory is less than 3GB.

What's more, there are some modules that slow down the simulation speed significantly. They are equivalent to the "short board" in the "barrel theory". For example, the XY map in Simulink is a module that refreshes the drawing in real time. If there is this module in the mode, it will slowly refresh the XY map during the simulation, and the simulation speed will definitely not be fast. If there is another way to replace it, you can speed up the simulation, for example, save the data to the workspace first, and then draw the XY map after the simulation is over. Some non-linear modules, such as a nonlinear MOSFET model, naturally have longer simulation times than ideal switches.

The fourth method is parallel execution and distributed execution, which is equivalent to multiple people working together on one job, provided that there is a license for parallel execution and a license for distributed execution. Parallel execution is to open multiple Matlabs on a multi-core CPU computer, and then automatically or manually allocate parallel processing; distributed execution is processed by multiple computers using high-speed network interconnection. The speed of this simulation method is very significant, especially when dealing with a large number of iterative calculations, but not for the average developer.

In addition, since the 2012b release, Simulink comes with the Simulink Performance Advisor tool, which helps us identify bottlenecks that affect simulation speed and make recommendations. However, it can't or the intention of us to build the model is God horse, so we need to make some necessary modifications according to the previous recommendations when building the model.

Desktop Wireless Charger

For Sony:
For Xperia Z4V, For Xperia Z3V
For Google:
For Nexus 4, For Nexus 5, For Nexus 6, For Nexus 7


For MOTORALA:
For Moto Droid Turbo, For Moto Droid Turbo 2, For Moto Droid 5

For NOKIA:
For Lumia 920, For Lumia 928, For Nokia Lumia 93, For Lumia 950, For Lumia 950 XL, For Lumia 1020, For Nokia Lumia 1050, For Nokia Lumia 822, For Nokia Lumia 735

For HTC:
For HTC ONE MAX T6, For HTC Incredible 4G, For HTC ONE mini 2, For HTC Droid DNA

For LG:
For LG Nexus 4, For LG Nexus 5, For LG G Pro, For LG D1L, For LG LTE2

For Iphone:
For Iphone8/X/XR/XS Max


Compabile Models:

For Samsung:
For Galaxy S6, For Galaxy S6 Edge, For Galaxy S6 Edge+,
For Galaxy S6 Active, For Galaxy S6 Duos, For Galaxy Note Edge,
For Galaxy S7, For Galaxy S7 Edge, For Galaxy Note 5
For Galaxy S8, For Galaxy S8 Plus, For Galaxy Note 8

For Galaxy S9,For Galaxy S9 Plus

For Others:

For YotaPhone 2, For Elephone P9000

Guangzhou HangDeng Tech Co. Ltd , http://www.hangdengtech.com