Hi everyone,
I'm working on a model that uses a C function to generate switching pulses. The function receives the necessary inputs, including measured current values that have been Clarke-transformed.
The issue I'm facing is that the switching pulses behave incorrectly — they seem erratic and don't follow the expected pattern. After some debugging, I found that the current values entering the C function appear to be in the millions, even though the probe reading right before the C block shows a maximum of about 2 A.
This drastic difference in scale is clearly affecting the control algorithm, resulting in invalid switching decisions.
I'm happy to share my model or files if needed. Any help or guidance would be greatly appreciated!
Thanks in advance.