Select Page

How to Set the Sample Time for Power Converter

  1. Click Simulation (Upper Site)> Model Configuration Parameter>Solver>Solver Option=Variable Step> Additional Options: Max step size= 1e-6
  2. 1e-6 is the standard. The minimum “Max step size” is:
    Max Step Size <= 1 / Switching Frequency / Sample In A Period
  3. Sample in a period is recommended at 30. Higher value give better results but require high computing power.

How to Set the Sample Time for Controller

  1. Group all the controller into a subsystem.
  2. Right click subsystem
  3. Block Parameter (Subsystem)
  4. Mark “Treat as atomic unit”
  5. Set the sample time to your desired instead of -1

There will be error since the block inside the subsystem used sample time 0 (simulation sample time). It need to be set to -1 (inherited).