Hello everyone,
In my past simulation-evaluation exercises using the PLECS Coder 1.10.5 version with PLECS Standalone 4.9.4 I had implemented a discrete PI controller in a single-loop to control the current, also because I developed a cascade controller with the outer loop of voltage on continuous time domain as
I already discretized the inner-loop by the tustin method (using the same results I had) with sample time Ts=1e-05
seconds, then I applied the discretization of the integral action and employed the discrete delay block for my “artificial delay” h fixed in h=5e-03
seconds, which is a multiple of the sample time, and divided by it corresponds to a Delay Order of 500. The thing is that I have this error on my simulation (using the C2000 blocks)
But I made the same simulation without the C2000 blocks and I have these nice results
This is the first time I’m dealing with this error, so if you have any suggestions to solve it, I would appreciate it.
I attached the files 10_Controlled_PIR-PI_Case2
for the simulation without the C2000 blocks and 11_C2000_Controlled_PIR-PI_Case2
for the crash simulation (taking into account there are other signal references since I’m using a current sensor, already validated).
Thanks in advance for your comments!
Erick.
10_Controlled_PIR-PI_Case2.plecs (73.1 KB)
11_C2000_Controlled_PIR-PI_Case2.plecs (123.8 KB)