cancel
Showing results for 
Search instead for 
Did you mean: 

Explanation of Pil simulation times in Simulink

toniospritz
Associate III

Hello, i'm here to ask you becouse i not understand how improve (if possible) the time spees in PiL mode. i've build my FOC+Space Vector compute model on simulink (there are sin, cos functions for Park Transforms ) with fixed step size of 1us, and 1.8 sec of simulation finish in about 1m30sec. If i run the same reference model in PiL, the model finish the simulation in about 8 hours... Now i know that PiL is a asycronous mode simulation, but for me is not this centre on the times issues. i've set the comunication as well as the handon pdf provided by stm32mat/target but with heap size 400... the stm32f429 is set at 180Mhz, usart to 15200bauds . i've not the execution profile report becouse simulink is crashed when i've tried to open it...0693W000001roTcQAI.png

Some one can explain me and/or have a good link for understand my errors?(i've yet try google).

Thanks

Antonio

1 REPLY 1
toniospritz
Associate III

Little Up! Finally, after 2 freezed simulation, at the 3rd, i have some information about the execution time(only of the PiL block), but.... i don't know how they should be interpreted...

0693W000001ru3XQAQ.png0693W000001ru6tQAA.png

 ExecutionTimeTaskSection with properties:

              Name: 'PMSM_FOC_Compute [1e-06 0]'

             Number: 2

      ExecutionTimeInTicks: [1×1600001 uint64]

         SelfTimeInTicks: [1×1600001 uint64]

      TurnaroundTimeInTicks: [1×1600001 uint64]

    TotalExecutionTimeInTicks: 14451362954

      TotalSelfTimeInTicks: 14451362954

   TotalTurnaroundTimeInTicks: 14451362954

   MaximumExecutionTimeInTicks: 9963

   MaximumExecutionTimeCallNum: 329556

     MaximumSelfTimeInTicks: 9963

     MaximumSelfTimeCallNum: 329556

  MaximumTurnaroundTimeInTicks: 9963

  MaximumTurnaroundTimeCallNum: 329556

            NumCalls: 1600001

     ExecutionTimeInSeconds: [1×1600001 double]

              Time: [1600001×1 double]

any one can explain me if this times are good for a motion control? :\ i not understand