Simulink Complex signal Mismatch result
99 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Complex signal mismatch. 'Input Port 1' of 'test2/Flash ADC/Output Data Type/Polarity/Out1' expects a signal of numeric type complex. However, it is driven by a signal of numeric type real
Complex signal mismatch. 'Output Port 1' of 'test2/Flash ADC/Output Data Type/Polarity/Unipolar' is a signal of numeric type real. However, it is driving a signal of numeric type complex
These two error appear to me and when i try to change the type some different parts occure with same error
i used the ADC Flash from the library of the simulink
is there any solution for this error i try every possible way on my mind
0 comentarios
Respuestas (1)
Shubham Khatri
el 3 de Mayo de 2021
Hello,
To my understanding, in Simulink, by default, if you have an operation (such as sqrt()) on a value such that Simulink cannot prove that the result will be real-valued, then the output signal type will be set to "complex" instead of "real". The signal type does not vary with the inputs. It could be that with the particular inputs and logic that Simulink's reasoning engine is inadequate to come up with the proof, but if Simulink thinks that it might turn out complex then Simulink marks it as complex. For any step that it turns out to be real-valued, the complex component would of course be 0.
You can find the line that is being set as complex (you might have to hunt back a few blocks) and tell Simulink to mark the line as real. If you do that and Simulink encounters a value for which the output needs to be complex, Simulink will throw an error at run-time. You can insert a conversion block to remove the complex part.
Hope it helps
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!