This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
university:labs:closed_loop_buck_adalm2000 [10 Mar 2020 20:40] – Add first closed-loop vmode experiment Mark Thoren | university:labs:closed_loop_buck_adalm2000 [04 Nov 2021 16:44] (current) – [Activity 4: Current-mode loop optimization] add links to power labs, university home Mark Thoren | ||
---|---|---|---|
Line 7: | Line 7: | ||
Several analysis methods will be demonstrated using LTspice - AC simulation of continuous time circuits, extracting the frequency response of switching circuits using step and measure techniques in LTspice, Middlebrook' | Several analysis methods will be demonstrated using LTspice - AC simulation of continuous time circuits, extracting the frequency response of switching circuits using step and measure techniques in LTspice, Middlebrook' | ||
- | ==== Materials ==== | + | ===== Materials |
* ADALM2000 (M2K) Active Learning module OR: | * ADALM2000 (M2K) Active Learning module OR: | ||
* Two-channel oscilloscope with external trigger input | * Two-channel oscilloscope with external trigger input | ||
Line 14: | Line 14: | ||
* ADALM-SR1 Switching Regulator Active Learning Module | * ADALM-SR1 Switching Regulator Active Learning Module | ||
* User Guide: [[university: | * User Guide: [[university: | ||
- | * CN0508-RPIZ power supply OR: | + | * [[resources: |
* 0-12V, 3A Adjustable benchtop power supply | * 0-12V, 3A Adjustable benchtop power supply | ||
+ | * LTspice files for this exercise | ||
+ | * [[downgit> | ||
+ | |||
===== Background ===== | ===== Background ===== | ||
- | Applying traditional control theory to switching regulators presents some challenges. A continuous time system - even a " | + | Applying traditional control theory to switching regulators presents some challenges. A continuous time system - even a " |
Switching Mode Power Supplies]] is an excellent resource for this general approach, while this lab exercise will focus on the specific case of the ADALM-SR1. Some additional resources on the subject are:\\ | Switching Mode Power Supplies]] is an excellent resource for this general approach, while this lab exercise will focus on the specific case of the ADALM-SR1. Some additional resources on the subject are:\\ | ||
- | [[https:// | + | [[adi>en/ |
- | [[https:// | + | [[adi>media/ |
- | [[https:// | + | [[adi>media/ |
===== Activity 1: An Overcompensated Voltage-Mode Buck Converter ===== | ===== Activity 1: An Overcompensated Voltage-Mode Buck Converter ===== | ||
Line 92: | Line 95: | ||
This is called " | This is called " | ||
+ | |||
+ | <WRAP todo> | ||
+ | Consider Reordering, put after Voltage Mode is done. | ||
+ | </ | ||
===== Activity 3: Voltage-mode loop optimization ===== | ===== Activity 3: Voltage-mode loop optimization ===== | ||
Line 99: | Line 106: | ||
==== Buck Power Stage Continuous model, voltage-mode ==== | ==== Buck Power Stage Continuous model, voltage-mode ==== | ||
- | Consider the ADALM-SR1 power stage when configured for open-loop, duty cycle control mode: | + | Consider the ADALM-SR1 power stage when configured for open-loop, duty cycle control mode, with the LTC6992-3 PWM generator providing the gate control:\\ |
- | (Figure) | + | {{ : |
+ | <WRAP centeralign> | ||
- | And the LTC6992 PWM generator: | + | The property of this circuit that needs to be extracted is the transfer function from a " |
- | (Figure) | + | {{ : |
+ | <WRAP centeralign> | ||
+ | noting that the inductance, output capacitors, and load resistor are identical to the switched circuit. E1 is a voltage-controlled voltage source, representing the inherent gain of 12 in the switching circuit. This circuit may look familiar - it is an RLC lowpass filter, so we should be able to simulate it as such with a .AC analysis. Including this SPICE directive: | ||
- | The property of this circuit that needs to be extracted is the transfer function from a " | + | < |
- | + | .ac dec 25 5 50k | |
- | (Figure) | + | </ |
- | + | will allow us to measure the transfer function from 5Hz to 50kHz, with the result shown here: | |
- | + | ||
- | noting that the inductance, output capacitors, and load resistor are identical. E1 represents the inherent gain of 10 in the switching circuit. This circuit may look familiar - it is an RLC lowpass filter, so we should be able to simulate it as such with a .AC analysis. Including this SPICE directive: | + | |
- | + | ||
- | .ac dec 25 100 100k | + | |
- | + | ||
- | will allow us to measure the transfer function from 100Hz to 100kHz, with the result shown here: | + | |
- | (Figure) | + | {{ : |
+ | <WRAP centeralign> | ||
Which is great! But... remember that we can't use a .AC directive on the switching circuit because it has no operating point around which it can be analyzed. What we can do is apply a stepped frequency / measure analysis, described in the link below. Replacing the .AC directive with the following: | Which is great! But... remember that we can't use a .AC directive on the switching circuit because it has no operating point around which it can be analyzed. What we can do is apply a stepped frequency / measure analysis, described in the link below. Replacing the .AC directive with the following: | ||
Line 133: | Line 138: | ||
.param t0=0.01m | .param t0=0.01m | ||
.tran 0 {t0+25/ | .tran 0 {t0+25/ | ||
- | .step dec param freq 100 100K 10 | + | .step dec param freq 5 50K 5 |
.save V(a) V(b) | .save V(a) V(b) | ||
.option plotwinsize=0 numdgt=15 | .option plotwinsize=0 numdgt=15 | ||
Line 139: | Line 144: | ||
performs a roughly equivalent analysis, stepping the input frequency from 100Hz to 100kHz, but at each step, capturing the input and output waveforms and performing a Fourier analysis to extract gain and phase. The result is shown below: | performs a roughly equivalent analysis, stepping the input frequency from 100Hz to 100kHz, but at each step, capturing the input and output waveforms and performing a Fourier analysis to extract gain and phase. The result is shown below: | ||
- | (Figure) | + | {{ : |
+ | <WRAP centeralign> | ||
So now that we're convinced that these two simulation methods produce approximately the same result (Note: dig into discrepancies that do exist!), we can apply the second method to the switching circuit, with the following result: | So now that we're convinced that these two simulation methods produce approximately the same result (Note: dig into discrepancies that do exist!), we can apply the second method to the switching circuit, with the following result: | ||
- | (Figure) | + | {{ : |
+ | <WRAP centeralign> | ||
- | At low frequencies, | + | At low frequencies, |
- | Let's take our newfound knowledge of the power stage, and wrap the overcompensated compensator | + | But we found the dominant pole of the power stage - about 362Hz for the linearized model, and about 232Hz for the switching model! |
+ | <WRAP todo> | ||
+ | Dig into discrepency - are we discontinuous? | ||
+ | </ | ||
+ | |||
+ | The last step, naturally is to measure the actual power stage and see how it compares to simulation. Configure the ADALM-SR1 as shown in Figure 10 below. | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | |||
+ | This is also the point in our experiment where things get " | ||
+ | * Applying a large stimulus to the power stage will result in a larger signal that will be easier to measure, however, the response may become nonlinear (distort). | ||
+ | * Applying a small signal will tend to keep the response more linear, but the smaller output signal will be more difficult to disginguish from noise. | ||
+ | |||
+ | Start by connecting the ADALM-SR1' | ||
+ | |||
+ | To determine the frequency response of the power stage around this operating point, we need to sinusoidally stimulate (" | ||
+ | |||
+ | Ideally, we would do a complete frequency response and try to replicate the full Bode plot from the LTspice simulation, and Scopy does have a network analyzer feature that would do this very nicely for the linearized circuit. However, the noise that is present on our measured signal has the potential to confuse the network analyzer. But we can make some simplifying assumptions and measure the -3dB frequency (where the amplitude drops to 0.707 of the original amplitude), as well as the phase lag at that frequency. | ||
+ | |||
+ | Set the Signal Generator Channel 1 (W1 in Figure 10) to 25Hz sinewave, 500mV p-p amplitude. This signal is attenuated by the onboard protection circuitry, and the resulting signal at the LTC6992-3 MOD pin is measured at P23 with scope channel 1. (Pilot revision boards will need to use a jumper with extended pins to accommodate the scope input.) Scope Channel 2 measures the output voltage, which it is AC coupled (P9 NOT installed.) AC coupling is used because we're only interested in the " | ||
+ | |||
+ | Set the oscilloscope to 10ms/div, CH1 to 5mV/div, and CH2 to 50mV/div. We know that a duty cyle range of 0 to 100% should correspond to an output voltage of 0 to 12V, which is "a bit more than 10", so the CH2 amplitude should apper about 20% larger than the CH1 amplitude. But let's illuminate one more subtelety about our test equipment - the output trace looks suspiciously " | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | |||
+ | Open the Settings (gear icon) in Scopy, and de-select sample rate filtering. The switching noise becomes MUCH more visible! Because the switching noise frequency is much higher than our signal of interest, as is the cutoff frequency of the sample rate filter, the impact of the filter on the measurement is negligible. The main reason for checking out the unfiltered mode is to get a feel for what is " | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | |||
+ | <WRAP tip> | ||
+ | If you are using a benchtop scope, the filtering options may be different. One method of reducing noise that works well is to use " | ||
+ | </ | ||
+ | |||
+ | The next step is to measure the relative amplitude of both the stimulus and the output, as well as the delay, or phase difference, between the two. Scopy can measure and display these, however it's always a good idea to double-check by using cursors. Note the ratio of output wiggle to input wiggle (136mV / 10mV = 13.6 for Figure 11.) | ||
+ | |||
+ | Next, increase the frequency in 10Hz increments, until the output amplitude drops to 70.7% of its initial value. (about 160Hz in Figure 13) This is the -3dB, or cutoff frequency of the power stage. You should also see a delay between the stimulus and output - use the time cursors to measure the time between the peak of the stimulus waveform and the peak of the output waveform. | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | |||
+ | Calculate the phase with the following formula: | ||
+ | |||
+ | phase = 360 * delay * Frequency | ||
+ | |||
+ | or about 360 * 990μs * 160Hz = 57 degrees. | ||
+ | |||
+ | Let's take our newfound knowledge of the power stage, and analyze the closed-loop response with the overcompensated compensator. | ||
(predict linearized response, phase margin, then compare with ADALM-SR1 results) | (predict linearized response, phase margin, then compare with ADALM-SR1 results) | ||
- | (Measured results with ADALM-SR1) | + | (Measured results with ADALM-SR1 |
(speed up compensator to some reasonable fraction of power stage, predict result, compare against ADALM-SR1) | (speed up compensator to some reasonable fraction of power stage, predict result, compare against ADALM-SR1) | ||
Line 158: | Line 214: | ||
Intro on differences in control dynamics... | Intro on differences in control dynamics... | ||
+ | <WRAP todo> | ||
+ | |||
+ | </ | ||
+ | **Return to [[university: | ||
+ | **Return to [[university: |