How to deal with warnings when using the AC sweep function with PSIM?
When I run AC sweep with PSIM, a warning message appears in the Simulation Message as shown below.
Warning! The program did not reach the steady state after 60 cycles when performing the ac sweep.
Frequency = 436516
Amplitude relative error =85.2 %
The error is that it did not converge even after 60 cycles.
Should I make the time step smaller, or change the circuit or simulation time settings to reach a steady state?
Answers
-
Dear User,
Thanks for reaching out! For some systems, capturing the frequency response can be challenging. To help you get started with AC sweeps, here are some basic rules of thumb to follow:
- Use the "simple" AC Sweep block as a first step (no steady state is defined)
- Start Frequency: choose a Start Frequency typically 10Hz - 100Hz, ensuring that there are no significant changes in the system's behavior before this point. Avoid selecting 1Hz for faster simulations
- End Frequency: Make sure to not exceed [(Fsw*0.9)/2], where Fsw is the switching frequency, to meet Nyquist criteria
- For "No. of points" usually 35 - 55 will do the job. Too many points can cause very slow simulations, while very few points will result in an undersampled bode plot
- Reference: It depends on your system and control design stage. The reference should give the desired output voltage, current, shaft speed, etc. in open loop.
- Start Amplitude: 1%-10% of the reference should do the job.Be careful here to not drive the converter into a different mode of operation due to resonance. For example DCM in a buck expected to be in CCM.
- End Amplitude: if the system's response is unknown, keep it the same as Start Amplitude. Typical power converters have a great deal of attenuation to high frequencies, since PSIM is doing a time domain analysis ensure you have enough signal to noise at high frequencies by adjusting this value.
You can find more details on this topic by following this article:
AC Sweeps with PSIM: What makes them unique?
Best regards,
Nikos Dimitrakopoulos
0 - Use the "simple" AC Sweep block as a first step (no steady state is defined)
-
Nikos Dimitrakopoulos said:
Dear User,
Thanks for reaching out! For some systems, capturing the frequency response can be challenging. To help you get started with AC sweeps, here are some basic rules of thumb to follow:
- Use the "simple" AC Sweep block as a first step (no steady state is defined)
- Start Frequency: choose a Start Frequency typically 10Hz - 100Hz, ensuring that there are no significant changes in the system's behavior before this point. Avoid selecting 1Hz for faster simulations
- End Frequency: Make sure to not exceed [(Fsw*0.9)/2], where Fsw is the switching frequency, to meet Nyquist criteria
- For "No. of points" usually 35 - 55 will do the job. Too many points can cause very slow simulations, while very few points will result in an undersampled bode plot
- Reference: It depends on your system and control design stage. The reference should give the desired output voltage, current, shaft speed, etc. in open loop.
- Start Amplitude: 1%-10% of the reference should do the job.Be careful here to not drive the converter into a different mode of operation due to resonance. For example DCM in a buck expected to be in CCM.
- End Amplitude: if the system's response is unknown, keep it the same as Start Amplitude. Typical power converters have a great deal of attenuation to high frequencies, since PSIM is doing a time domain analysis ensure you have enough signal to noise at high frequencies by adjusting this value.
You can find more details on this topic by following this article:
AC Sweeps with PSIM: What makes them unique?
Best regards,
Nikos Dimitrakopoulos
Thanks for the tips. I actually followed all the rules above but I still got the warning.
0 - Use the "simple" AC Sweep block as a first step (no steady state is defined)
-
anhnha said:
Thanks for the tips. I actually followed all the rules above but I still got the warning.
Hi Anhnha,
It can be that the warning can be ignored, please visually inspect the result, if it is smooth than you should have a useful transfer function.
What is the switching speed of the system? What sort of topology is it?
0 -
Albert Dunford_20896 said:
Hi Anhnha,
It can be that the warning can be ignored, please visually inspect the result, if it is smooth than you should have a useful transfer function.
What is the switching speed of the system? What sort of topology is it?
Hi Albert Dunford,
There is a peak around the warning frequency, so I'm wondering if it's okay. That is a boost converter. The switching frequency is 1 MHz, and the warning occurs at a frequency less than fsw/2. For AC sweep, the "End frequency" is usually recommended as fsw/2. So, is the PSIM AC sweep not correct for frequencies greater than fsw/2? I understand that the converter crossover frequency should be less than fsw/2, and usually, the crossover frequency is chosen at fsw/10. So, my question is about the accuracy/capability of the PSIM AC sweep simulation above fsw/2.
0 -
anhnha said:
Hi Albert Dunford,
There is a peak around the warning frequency, so I'm wondering if it's okay. That is a boost converter. The switching frequency is 1 MHz, and the warning occurs at a frequency less than fsw/2. For AC sweep, the "End frequency" is usually recommended as fsw/2. So, is the PSIM AC sweep not correct for frequencies greater than fsw/2? I understand that the converter crossover frequency should be less than fsw/2, and usually, the crossover frequency is chosen at fsw/10. So, my question is about the accuracy/capability of the PSIM AC sweep simulation above fsw/2.
Hi Anhnha,
Nice question!
The AC sweep is working with the actual switching model of your system and not an average model. This is a high fidelity approach but you are limited to the system's frequency margins. If you try to go higher than fsw/2 (in this case 500kHz) for your reference, then you will start having frequency fold-back. That essentially means that any frequency above 500kHz will not meet the nyquist criterion, and thus the effect of those frequencies cannot be correctly portrayed. Albert is explaining this in the following video:
AC sweep troubleshooting tips
I also wanted to point out that this limitation is inherent to the real system and not exclusive to PSIM itself. The system is constrained by its frequency range, which is directly determined by the switching frequency. When you observe frequency responses of converters surpassing the switching frequency, those representations are typically average models that do not include the switching effects.Best regards,
Nikos Dimitrakopoulos
1 -
Nikos Dimitrakopoulos said:
Hi Anhnha,
Nice question!
The AC sweep is working with the actual switching model of your system and not an average model. This is a high fidelity approach but you are limited to the system's frequency margins. If you try to go higher than fsw/2 (in this case 500kHz) for your reference, then you will start having frequency fold-back. That essentially means that any frequency above 500kHz will not meet the nyquist criterion, and thus the effect of those frequencies cannot be correctly portrayed. Albert is explaining this in the following video:
AC sweep troubleshooting tips
I also wanted to point out that this limitation is inherent to the real system and not exclusive to PSIM itself. The system is constrained by its frequency range, which is directly determined by the switching frequency. When you observe frequency responses of converters surpassing the switching frequency, those representations are typically average models that do not include the switching effects.Best regards,
Nikos Dimitrakopoulos
Thanks. The video is interesting. I think I understand more about the simulation. I want to see what happens around fsw/2 but the plot doesn't seem to be right even when I make a lot of adjustment with time resolution, peak amplitude using simple AC sweep and AC sweep multisine.
Is there any way to fix this?I want to see the effect of ramp/slope compensation to the loop gain (smooth the peaking). I know the theory but I want to see it in simulation.
0 -
anhnha said:
Thanks. The video is interesting. I think I understand more about the simulation. I want to see what happens around fsw/2 but the plot doesn't seem to be right even when I make a lot of adjustment with time resolution, peak amplitude using simple AC sweep and AC sweep multisine.
Is there any way to fix this?I want to see the effect of ramp/slope compensation to the loop gain (smooth the peaking). I know the theory but I want to see it in simulation.
Hi Anhnha,
Inspecting things around the fsw/2 can be tricky as you are close to the limit. Maybe adding more points ("No. of points" option) will help you create a smoother plot.
In any case, if you feel comfortable you can attach the simulation files so we can take a look and provide more detailed support.
BR,
Nikos
0 -
Nikos Dimitrakopoulos said:
Hi Anhnha,
Inspecting things around the fsw/2 can be tricky as you are close to the limit. Maybe adding more points ("No. of points" option) will help you create a smoother plot.
In any case, if you feel comfortable you can attach the simulation files so we can take a look and provide more detailed support.
BR,
Nikos
Hi Nikos Dimitrakopoulos,
I have tried the AC sweep to plot the transfer function from control to output under peak current mode control for the buck converter. The file is just a slight modification of Application Notes\simu (AN006). I have attached the file to this message.
The switching frequency (fsw) is set to 100 kHz, and in the AC sweep, I aim to sweep from 10 Hz to 100 kHz. At the switching frequency, the period is 10 us. Therefore, with a time step of 0.1 us, this would sample 100 points per period, which I believe is sufficient.
I want to observe what happens around half of the switching frequency, which is 50 kHz in this case. When comparing the simulation results in PSIM with the plot from the Application Note of control-to-output of a buck converter under peak current mode control where the current loop is closed, it is evident that the shapes do not match, especially around half of the switching frequency.
I expected to see a peak in the magnitude plot and a sharp phase decrease to 180 degrees (360 degrees in this simulation) at fsw/2. However, it's hard to observe this phenomenon in the PSIM AC sweep plot. Could you please take a look and help me in obtaining results similar to those shown in the Application Notes as in the image or in the link below?
1 -
anhnha said:
Hi Nikos Dimitrakopoulos,
I have tried the AC sweep to plot the transfer function from control to output under peak current mode control for the buck converter. The file is just a slight modification of Application Notes\simu (AN006). I have attached the file to this message.
The switching frequency (fsw) is set to 100 kHz, and in the AC sweep, I aim to sweep from 10 Hz to 100 kHz. At the switching frequency, the period is 10 us. Therefore, with a time step of 0.1 us, this would sample 100 points per period, which I believe is sufficient.
I want to observe what happens around half of the switching frequency, which is 50 kHz in this case. When comparing the simulation results in PSIM with the plot from the Application Note of control-to-output of a buck converter under peak current mode control where the current loop is closed, it is evident that the shapes do not match, especially around half of the switching frequency.
I expected to see a peak in the magnitude plot and a sharp phase decrease to 180 degrees (360 degrees in this simulation) at fsw/2. However, it's hard to observe this phenomenon in the PSIM AC sweep plot. Could you please take a look and help me in obtaining results similar to those shown in the Application Notes as in the image or in the link below?
Hi Anhnha,
Your question can lead PSIM users to a very interesting journey!
Current mode control is a major topic in power converter design, and thus many attempts have been made to characterize a current controlled plant with a closed solution. This is by no means easy, and in order to create a transfer functions of such a system some assumptions have to be made. Results can also appear in different forms, depending on design decisions.
Dr Ridley is a pioneer in this area, and in fact it's his own work that is being referenced in ST's application note:
"Ridley, R. (1991). A new, continuous-time model for current-mode control [power converters]. Power Electronics, IEEE Transactions on, 271-280 "
If you follow the above reference, you will see that the bode plots displayed by ST are derived under specific circumstances. The example investigated involves a buck converter that doesn't include external ramping. If ramping is added, the bode plots are different from what is shown here:
The PSIM example that you are attempting to verify these plots against includes external ramping. So, first and foremost, I would suggest creating a new, simpler example and following Dr. Ridley's steps to achieve these plots with PSIM.
** Please note that the AC Sweep doesn't include average modeling or closed form solutions, but rather is a compilation of time-domain simulations. This adds superior fidelity but has the limitation of the Nyquist criterion. You should not trust any results of the bode plots above the fsw/2 frequency.
I attempted to follow the steps myself and came up with this circuit and Bode plots (fsw = 50k):
These results match the expected output (again we cannot go up to the fsw) and I was able to achieve those with some toggling of the AC sweep parameters. The rules of thumb I followed for the AC sweep setup are referenced in my previous answers.
Finally, please keep in mind that a starting frequency of 10Hz is way too low here and can cause slow AC sweep simulations. The lower the starting frequency, the slower the simulation. You can start from 1kHz and leverage the ACSWEEP2 block to manually add extra frequency points. This is what I did by adding 100Hz, 500Hz, 800Hz manually. I am attaching the circuit I created below.
I strongly recommend investigating how this transfer function got generated in the first place. It should be fun
Hope this helps!
Best regards,
Nikos Dimitrakopoulos
2 -
Nikos Dimitrakopoulos said:
Hi Anhnha,
Your question can lead PSIM users to a very interesting journey!
Current mode control is a major topic in power converter design, and thus many attempts have been made to characterize a current controlled plant with a closed solution. This is by no means easy, and in order to create a transfer functions of such a system some assumptions have to be made. Results can also appear in different forms, depending on design decisions.
Dr Ridley is a pioneer in this area, and in fact it's his own work that is being referenced in ST's application note:
"Ridley, R. (1991). A new, continuous-time model for current-mode control [power converters]. Power Electronics, IEEE Transactions on, 271-280 "
If you follow the above reference, you will see that the bode plots displayed by ST are derived under specific circumstances. The example investigated involves a buck converter that doesn't include external ramping. If ramping is added, the bode plots are different from what is shown here:
The PSIM example that you are attempting to verify these plots against includes external ramping. So, first and foremost, I would suggest creating a new, simpler example and following Dr. Ridley's steps to achieve these plots with PSIM.
** Please note that the AC Sweep doesn't include average modeling or closed form solutions, but rather is a compilation of time-domain simulations. This adds superior fidelity but has the limitation of the Nyquist criterion. You should not trust any results of the bode plots above the fsw/2 frequency.
I attempted to follow the steps myself and came up with this circuit and Bode plots (fsw = 50k):
These results match the expected output (again we cannot go up to the fsw) and I was able to achieve those with some toggling of the AC sweep parameters. The rules of thumb I followed for the AC sweep setup are referenced in my previous answers.
Finally, please keep in mind that a starting frequency of 10Hz is way too low here and can cause slow AC sweep simulations. The lower the starting frequency, the slower the simulation. You can start from 1kHz and leverage the ACSWEEP2 block to manually add extra frequency points. This is what I did by adding 100Hz, 500Hz, 800Hz manually. I am attaching the circuit I created below.
I strongly recommend investigating how this transfer function got generated in the first place. It should be fun
Hope this helps!
Best regards,
Nikos Dimitrakopoulos
Thanks, it looks good that you managed to simulate it. I'll try it tonight.
0