AC Sweeps with PSIM: What makes them unique?
AC Sweeps with PSIM
AC sweeps in PSIM rely on switching models, eliminating the need for an average model. This feature allows sweeping across various circuit configurations, encompassing DC-DC converters, digital control, motor models, phase shift converters, 3-phase inverters and input/output impedance analysis.
Essentially, the AC sweep enables you to explore virtually any circuit topology, even complex ones, that can be designed with PSIM blocks. This is very important because you do not have to worry about the reliability of average modeling anymore.
The reason PSIM is able to preserve the accuracy of switching circuits is the fact that it relies in time domain simulations to figure out the frequency response. In this approach, perturbations are introduced and their impact on the system is observed to construct the frequency response at each frequency point. This involves running multiple time-domain simulations in an automatic way, with various frequency points for the perturbation source. You can also add elements like zero-order holds and digital delays, making it suitable for studying the impact of digital control.
Let's explore a simple example using a buck converter. We'll compare the bode plots of the system (the inductor current is the output of interest in this case) under both analog and digital control scenarios:
Analog vs Digital Control
We can see that while the amplitude response remains the same, the unit delay does affect the phase response of the inductor current.
Now, when we couple the process of capturing frequency responses from the power stage and combine it with SmartCtrl, a PI controller for your system can be designed and fine-tuned in minutes. Suppose we have already determined our inner loop controller gains for our buck converter - explore how to do it here and now we are interested in closing the outer voltage loop:
Think of what we've got until now as a kind of 'black box' system. To understand how it behaves in the frequency domain, we should set the perturbation source at the current reference and measure the output voltage with an AC probe. PSIM runs time-domain simulations at various frequencies for the perturbation source and determines how the output voltage behaves for each frequency point. The resulting Bode plots look like this:
You can then import these plots into SmartCtrl and close the outer voltage loop. If you're interested in trying this yourself, check out this tutorial.
This workflow isn't limited to this circuit alone; it's a versatile toolset you can apply to your custom designs. A good set of example is presented in this video. In essence, if you can create a reliable and concise frequency response for your circuit, SmartCtrl can assist in controlling it. By taking the bode plots as input, SmartCtrl applies the necessary control system math to achieve your design objectives. For complex systems, capturing an accurate frequency response can be challenging. To help you get started with AC sweeps, here are some basic rules of thumb.
Rules of thumb for AC sweeps:
- 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.
For a more in-depth description, you can watch our tutorial video on How to troubleshoot AC sweeps in PSIM.
Additional applications of this workflow involve input/output impedance analysis for your custom circuits. Stay tuned by subscribing to our community forum for upcoming articles on this topic and other new features!
Comments
-
If you're interested in diving deeper into AC sweep workflows, there are multiple articles and even tutorial videos to explore!
1 -
In Rules of thumb for AC sweeps,
- End Frequency: Make sure to not exceed [(Fsw*0.9)/2], where Fsw is the switching frequency, to meet Nyquist criteria
Could you explain more about the sentence "To meet the Nyquist criteria"?
I would like to know what is the relationship between (Fsw*0.9)/2 and Nyquist criteria.Sincerely.
0 -
Dear Yong Jun Lee,
Since the AC sweep in PSIM relies (under the hood) on multiple time-domain, switching simulations, the Nyquist limit needs to be met to prevent aliasing.
The Nyquist limit suggests that in order to accurately reconstruct a signal from its samples, the sampling rate must be at least twice the highest frequency present in the signal. This is often summarized as:
𝑓𝑠≥2𝐵fss≥2fmax
Imagine that if the frequency of the input perturbation source is higher than the half of the switching frequency (Fpert > 0.5*Fsw), then aliasing might ruin your bode plots results.
We want to inspect the results of our perturbation at each frequency clearly, and this is why I also add 0.9 as a "safety factor". If the max perturbation frequency is lower than 0.9*Fsw/2 ,then you can be sure that aliasing is avoided.
Hope this helps!
Best regards,
Nikos Dimitrakopoulos
1 -
Nikos Dimitrakopoulos said:
Dear Yong Jun Lee,
Since the AC sweep in PSIM relies (under the hood) on multiple time-domain, switching simulations, the Nyquist limit needs to be met to prevent aliasing.
The Nyquist limit suggests that in order to accurately reconstruct a signal from its samples, the sampling rate must be at least twice the highest frequency present in the signal. This is often summarized as:
𝑓𝑠≥2𝐵fss≥2fmax
Imagine that if the frequency of the input perturbation source is higher than the half of the switching frequency (Fpert > 0.5*Fsw), then aliasing might ruin your bode plots results.
We want to inspect the results of our perturbation at each frequency clearly, and this is why I also add 0.9 as a "safety factor". If the max perturbation frequency is lower than 0.9*Fsw/2 ,then you can be sure that aliasing is avoided.
Hope this helps!
Best regards,
Nikos Dimitrakopoulos
Thanks for your help!
1