Azzera filtri
Azzera filtri

Simulink Complex signal Mismatch result

161 visualizzazioni (ultimi 30 giorni)
hisham mohammed
hisham mohammed il 28 Apr 2021
Risposto: Shubham Khatri il 3 Mag 2021
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

Risposte (1)

Shubham Khatri
Shubham Khatri il 3 Mag 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

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by