Modeling discrepancy for induction machine depending on the solver type (FPGA vs. CPU)

Test environment

  • PLECS 5.0.4 and 4.9.9 are tested. (standalone)
  • RTBOX3 with firmware 4.0.7 and 3.1.8 are tested.

Dear Plexim

My name is Jaeyeon Park, and I am a Ph.D. student at Seoul National University, South Korea.

I have been using PLECS extensively for my research and have found it very useful.
Currently, I am using an RT Box 3 as a real-time simulator, and I have a question regarding the modeling and real-time simulation of induction machines.

In particular, when simulating a high-power induction machine on the RT Box 3,
I have observed significantly different response characteristics depending on whether the model is implemented on the FPGA or CPU.
I am having some difficulty understanding the reason for this difference and would greatly appreciate your technical guidance.

Due to the limitations of file type that I can upload, I attached my drive link where my inquiry document and Plecs simulation project locates.
I have described the issue, simulation setup, and my specific questions in detail in the attached document. I would appreciate it if you could review it and provide any insights or recommendations.

Thank you very much for your time and support.

It would be helpful if you clean up the model first. In particular, please use the machine model from the PLECS library and not some modified version, even if the changes may seem obvious to you.

Please also note the following observations:

  • The model contains an algebraic loop as noted in the warnings (which is a bit hard to find, because there are so many others). This may produce wrong results. Fix it by adding pulse delay blocks for the PWM and encoder feedbacks
  • The subsystem “Motor Drive RTBOX HIL&CTRL1” doesn’t work as posted - the machine basically remains in standstill and there are no PWM pulses generated, both in offline simulation and on the RT Box
  • In your document, you say: “mot_im” and “pebb” are set to “mot_im3” and “pebb2”, respectively.and later As described in the previous section, the mot_im and pebb are set to mot_im3 and pebb1, respectively. Please specify which parameter combination you are using.

In general, the model setup seems questionable since you are running controller and plant on the same box. This will ultimatively prevent optimal HIL results, since the controller will consume CPU resources (even if run on a separate core).

Furthermore, this setup introduces additional delays for electrical measurements delivered to the controller: These measurements first have to be transferred from the FlexArray solver to the CPU (which, on average, will introduce a delay of half a CPU step of core 0) then from core 0 to the core running the controller, which introduces another delay of one step of core 0 plus one step of the core running the controller.

If Analog Out blocks are used instead, they will be fed directly from the FlexArray solver, so the delay is a lot smaller. So for an optimal setup, the controller should run on a separate entity and the CPU sample time should be reduced as much as possible.

Since you’ve already concluded that switching from CPU to FlexArray simulation does not have a big influence on the machine model itself, it is more likely that other delays in your system lead to the discrepancy in results that you are seeing.