MATLAB: Is there a signal mismatch error in the model when I use Simulink 7.1 (R2008a)

complexdatatypediscreteintegratormismatchsignalsimulinksupport

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.

Best Answer

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: