PI Controller Employing TI DMC Blocks / Auto Code Generation


I am working on field-oriented control of PMSM. I was able to control the speed and d-q axis currents in the continuous domain simulations. However, discrete domain simulation to implement auto code generation is not tracking currents properly despite speed tracking is accurate. I am using TI DMC blocks to implement the PI controllers without reset.

Any suggestions to fix this problem would be appreciated!

Chandra Sekhar