Complex Data type not accepted in Simulink
11 ビュー (過去 30 日間)
古いコメントを表示
Hello Everyone, I am having an issue with the interaction of matlab function block in the simulink with my model block. Below you can also find the picture.
I have created a matlab function with three inputs and 1 output. Since in the matlab function block, i have solved an differential equation, it has complex expressions in the form of for example .
(exp(sqrt(-a/b)))
This generates the output of complex data type from the function block. When passing this to the integrator which is the input to my plant, I cannnot run the simulink due to the error
"Cannot pass the complex value to non-complex location"
I tried chaning the data types of integrator, then the same thing happens to other blocks in the simulink.
I also tried using absolute values, which ofcourse gives real number, but turns out to be very large numbr and genrates high magnitude. I really need help in solving this issue.
Can anyone help me in this/
Thanks in advance.
7 件のコメント
Walter Roberson
2020 年 6 月 1 日
In past post, Mathworks employees say that if you need to use an integrator with complex values, then seperate real and complex parts and integrate them seperately. You indicated that you tried that but the coefficients got large. If you have a rotary motion, then the information about wrapping values on the Integrator page might help.
Walter Roberson
2020 年 6 月 1 日
There is no configuration setting for the integration block in particular or Simulink in general to have it be happy about complex inputs to the integration, nor to have it accept such inputs with a warning.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!