loudspeaker modeling in Simscape™ and Simulink®

版本 1.0.1 (139.2 KB) 作者: Francis Tiong
Demonstrating the Modeling of a Loudspeaker Using Simscape as well as using Simulink
11.0 次下载
更新时间 2024/2/21

查看许可证

The demonstration provides a detailed simulation of a loudspeaker's internal workings, extending up to the diaphragm, while excluding the enclosure and the air interactions at the front of the loudspeaker. The example showcases the feasibility of replicating the Simscape™ loudspeaker functionality as a behavioral model implemented in Laplace domain in Simulink®.
For those interested in further exploration, a search for "MATLAB loudspeaker" on the internet will lead to a resource titled "Loudspeaker Modeling with Simscape™," which has been available since 2021. Subsequent discussions in the professional community have centered on the computational performance of these models.
The comparative analysis is facilitated by the concurrent modeling of the loudspeaker in both Simulink® and Simscape™, allowing for a direct assessment of execution speeds. The model is structured such that Simulink® constitutes the upper portion, while the lower portion is rendered in Simscape™. The scopes integrated within the model confirm that the outputs of both implementations are consistent.
To quantitatively evaluate the temporal efficiency, one might partition the model and independently measure the execution time of each section. This method provides a clear metric for comparing the performance of the two simulation approaches. Here is a summary of the findings regarding the speed of execution:
1, There is no significant difference between Simulink® and Simscape™ implementations.
2, Using an analog signal source is faster than using a discrete signal source when the solver is in variable step mode.
3, No significant time difference in running the models in accelerator mode or even the rapid accelerator mode.
4, With a discrete signal source the model can then be executed with a solver that is in a fixed-step mode. Running in fixed-step mode is signifcantly faster than in variable step mode.
5, With the models in fixed-step mode they can be compiled into a standalone executable which runs at least 10x faster.

引用格式

Francis Tiong (2024). loudspeaker modeling in Simscape™ and Simulink® (https://www.mathworks.com/matlabcentral/fileexchange/159963-loudspeaker-modeling-in-simscape-and-simulink), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2023b
与 R2023a 及更高版本兼容
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.1

Added content to the Description.

1.0.0