As per my understanding, the provided model is giving PCC voltage as an output which is not accurate when using the “discrete solver”.
I was able to compile and run the model provided. The model provided uses a “Fixed-step discrete (no continuous states)” solver.
I recommend using the following configuration parameters in the “Model Settings” to get a more precise result. You can open the settings window by using the “Ctrl+E” keyboard shortcut.
- Use an appropriate discrete time step. As a rule of thumb, the time step should be at least 10 times smaller than the smallest time constant in your model. For power electronics, this often means choosing a time step in the microsecond range.
- Enable "zero-crossing detection for fixed-step simulation" option in the "Solver details" section. This allows the solver to capture the exact moment when an event occurs.
Hope this is beneficial!