Complex Data type not accepted in Simulink

조회 수: 11 (최근 30일)
Prateek Tiwari
Prateek Tiwari 2020년 6월 1일
댓글: Walter Roberson 2020년 6월 1일
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
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
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 CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by