Why is there a signal mismatch error in my model when I use Simulink 7.1 (R2008a)?
8 views (last 30 days)
Show older comments
MathWorks Support Team
on 10 Sep 2012
Edited: MathWorks Support Team
on 17 Feb 2021
I am trying to integrate a complex signal using the Discrete integrator block, but I get an 'Complex signal mismatch' error.
For example, when I run the attached complexsignal_discrete_integrator.mdl, I get the following error message:
ERROR: 'Complex signal mismatch. Input port 1 of complexsignal_discrete_integrator/Product1' expects a signal of numeric type real. However, it is driven by a signal of numeric type complex.
Accepted Answer
MathWorks Support Team
on 17 Feb 2021
Edited: MathWorks Support Team
on 17 Feb 2021
The ability to integrate complex signals using the Discrete Integrator block is unavailable in Simulink.
In order to work around this issue, use one of the following methods:
1. Use the Delay blocks to build a custom integrator. The complexsignal_discrete_integrator_workaround.mdl model attached here provides a workaround that uses Delay blocks to create an integrator based on the 'Forward Euler' integration method. The Forward Euler method is based on the following forumla:
y(n) = y(n-1) + K*Ts*u(n-1)
Where y(n) is the output of the integrator at the current time, y(n-1) is the output at the previous sample time, u(n-1) is the input to the integrator at the previous sample time, K is the gain value, and Ts is the sample time.
2. Break the complex signal into real and imaginary parts, integrate them separately, and recombine them. However note that if the gain K is also complex, you will need to use four integrators.
To read more about the Discrete Integrator and the different integration techniques, visit this link:
0 Comments
More Answers (0)
See Also
Categories
Find more on Discontinuities in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!