- Ensure that the function "ee.internal.passive.transmission_line_distributed_param" is a regular MATLAB .m file and is accessible on the MATLAB path.
- If this function is part of a Simscape custom component or library, you might need to check that the file is not p-coded and does not have any restrictions that would prevent Simscape from accessing it during model compilation.
Simscape run-time with transmission line
4 ビュー (過去 30 日間)
古いコメントを表示
Dear all,
I want to simulate wave effects with a series of Lumped parameter L-Section transmission lines. I call the simulation from an Matlab App with the "sim" command and use the "setVariable" function for simulation input. So I want to set the Inductance, Capacitance and Resistance per unit length from "Compile-time" to "Run-time". But if I do that, I receive the following error when I try to Update the Model:
Error compiling Simscape network for model Wanderwellen_Leitungsmodell.
Caused by:
- Function 'ee.internal.passive.transmission_line_distributed_param' must be an unprotected MATLAB function. In ee.passive.lines.transmission_line
- R = {[1x1 double], 'Ohm/km'}
- x_L = {[1x1 double], 'H'}
- LEN = {1, 'km'}
- C = {[1x1 double], 'F/km'}
- G = {0, 'S/km'}
- freq = {60, 'Hz'}
Can somebody help me please?
Thanks a lot!
0 件のコメント
回答 (1 件)
Hari
2024 年 1 月 10 日
Hi Stefan Schützhoff,
I understand that you want to simulate wave effects using a series of Lumped parameter L-Section transmission lines in Simscape and you need to set the inductance, capacitance, and resistance per unit length from compile-time to run-time. You are encountering an error upon updating the model after making these parameters run-time configurable.
The provided error suggests there might be an issue with the Simscape language file or function that defines the transmission line. Simscape requires MATLAB functions used in component definitions to be unprotected, which means they should not be encrypted or p-coded.
To resolve this issue,
Refer to the documentation of Simscape for more information on creating custom components and setting parameters:
Simscape Custom Components - https://www.mathworks.com/help/physmod/simscape/lang/creating-custom-components.html
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Composite Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!