# PWM for ACIM scalar control

I have inherited a control software for ACIM scalar control and I need to do some changes in this software. Before I can do any change I need to understand current implementation. So I have started to read the source code and analyze it.

I have identified the main parts and one of them is a module which is responsible for PWM generation. But here I have encountered several lines of code which I am not able to understand what they do. For sake of readibility I have attempted to describe them via below given Scilab scheme, where $$\U^*_1\$$, $$\U^*_2\$$ and $$\U^*_3\$$ are modulation sinusoidal signals and $$\U_{dc}\$$ is voltage in dc link of the three phase inverter.

Here is the input into the model

and here is its output

Based on these figures I guess that the aforementioned code somehow implements sinewave modulation with injected third harmonics but I still don't understand how. Does anybody have any idea what is the principal of this algorithm? Thank you for any ideas.