+2 votes
129 views
in Modeling by Gordon Asante (17 points)

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.

1 Answer

+2 votes
by Jovan Zelic (209 points)
selected by Jovan Zelic
 
Best answer
Hi Gordon,

Can you double-check the data type of your input terminal of the C function? One thing that comes to my mind is that maybe the terminal is misconfigured to integer data type.
by Gordon Asante (19 points)
+1
Yeah thank you. That really helped
...