I have modeled a synchronous generator in Simulink using equations in MATLAB function block, which is receiving input signals from the exciter block, etc. and also a feedback from its integrator as well. The issue is that the output "y" of the Generator MATLAB function block has both real and complex values (14x1), specifically the current outputs (id, iq, iF, iD, etc.) are complex. The integrator expects real values and hence I'm getting the "Complex signal mismatch" error. I've been trying to searching for a solution on this forum but I haven't been able to find it. I know there are other threads related to this question but none of them has described a clear solution.
Could anyone please help?