Demo hvdc_transmission_system_with_mmcs Phase shifted PWM capacitor Voltage balancing

The demo hvdc_transmission_system_with_mmcs use amplitude shifted carriers modulation technique, with capacitor balancing script based on amplitude shifted carriers.

I’m trying to build a similar model but with phase shifted carriers, and having technical difficulties with capacitors voltage balancing, what changes I have to do for the current used amplitude based balancing technique? or any paper that explains what has been implemented is highly appreciated to understand the script and how it modifies the PWM.

attached documents explain what I’m trying to do. I think I can develop a script for the suggested approach but in the last step as described, I need to access the state of the module in the previous control cycle, how I store a parameter value in previous cycle to use in the next one?

Cap Voltage balancing.pdf (276 KB)

hvdc_transmission_system_with_mmcs.plecs (535 KB)

The algorithm is based on section IIB of following paper referenced in the demo model:[1] S. Rohner, S. Bernet, M. Hiller, R. Sommer, “Modulation, Losses and Semiconductor Requirements of Modular Multilevel Converters,” IEEE Transactions on Industrial Electronics, Vol. 57, No. 8, August 2010.

> how I store a parameter value in previous cycle to use in the next one?

You can create a Discrete state and then update the state in the “Update” section of the of the C-Script. Then you can refer to the Discrete state value in the “Output” section of the C-Script. The C-Script section of the manual and the Using the C-Script Block tutorial are useful references.