Error using PWM generator

General
Follow


Error using PWM generator

Hassan Ali on 3 Apr 2024
Latest activity Reply by Hassan Ali on 17 Apr 2024

Hello Everyone,
I have modelled a FOC using average converter, and the PWM signal is generated using PWM generator (3-phase, 2-level). First, it had error of algebraic loop, but after searching in MATLAB community, I have used unit delay to avoid loop, but still when use local solver option is uncheked in the solver configuration, it still shows algerbaic loop, but when local solver is checked, it works. So, kindly put some light on this issue.
Rught now, the second issue which Im currently facing is " Index expression out of bounds. Attempted to access element 2. The valid range is 1-1." and "Function call failed.
Function 'PWM Generator (Three-phase, Two-level)/Switching Time Calculation' (#59.72.154), line 3, column 1:
"[TgabcON,TgabcOFF,ModWave] = ee.control.pwmSwitchingTimeTwoLevel(Vabc,vdc,fsw,PW"
Launch diagnostic "
I have attached the simulink model hereby. Kindly looking for your expert opinion on how to solve these issues.
Sign in to participate
Joel Van Sickel
Joel Van Sickel on 3 Apr 2024
Try placing the unit delays right before your PWM generator. It looks like you placed them going into your PI controllers, but there are other signals being fed into the PWM generator that bypass these delays.
Hassan Ali
Hassan Ali on 8 Apr 2024
Thank you for suggestion, I have tried this way but still the same issue prevails. I'm still trying to solve this by using different ways, but I think this particular block is not working correctly with my simulation, it seems.
Joel Van Sickel
Joel Van Sickel on 8 Apr 2024
Hello Hassan,
I tried my suggestion and it removed the alegbraic loop. You must have missed a location that needs a unit delay. You must ensure there is a unit delay before ALL signal paths to your PWM generator.
Regards,
Joel
Hassan Ali
Hassan Ali on 17 Apr 2024
Hey Joel,
Thank you for your response.
The issue has been solved automatically by installing new MATLAB 2024a. I think, there must have been any change in MATLAB setting in my PC, because when I tried to run the same simulation in my laptop, it was not showing any error like this.
Go to top of page