Half-Bridge 0-30V, 0-20A Feedback loop problem - Page 1
Forum section: electronics / projects

author: paladyn
author_rank: Contributor
timestamp: June 07, 2019, 06:50:17 am
content: Hello, this is my first post,I am writing this post because I hope that you will help me solve my problem.Designs adjustable Half-Bridge converters with 0-30V and 0-20A parameters. The power block itself is able to give over 800W at maximum PWM and it is not a problem. The problem is the feedback loop, which works unstable. I thought it might be a problem with the low choke value, originally 47uH, but then I used the 250uH inductor and it's even harder to stabilize the converter.In general, the whole works, it is possible to regulate the voltage and current, but there are considerable squeaks of the transformer at low voltages, ie 10V and quite large currents of 10A. There are also significant noises at the output as well as sinusoidal oscillations. Generally, these are noises with an amplitude up to 1V when measuring AC on an oscilloscopeThe loop is created on the external LM324 operational amplifier, while the internal SG3525 amplifier works as a voltage follower. The switching frequency of the transformer is 40kHz. Using the book Switching Power Supplies fromA to Z - Sanjaya Maniktala I used and calculated coefficients for the type 3 compensator for the following data:fESR = 6392 HzfLC = 424Hz for 47uH inductor and 184Hz for 250uH inductorfz1 = fz2 = 424Hzfp0 = 260Hzfp1 = fESR = 6392Hzfp2 = 1/2 fsw = 20kHzfrcoss = 1/10 * fsw = 4kHzVramp = 2.8VVin = 43V (output voltage after diodes)fsw = 40kHzCout = 3 x 1000uFTotal ESR = 8.3mohmI calculated the following element values ​​for the 47uH inductorC1 = 30.6nF -> I used 33nFC2 = 17.5nF -> I used 18nFR2 = 12.3KOhm -> I used 12kohmC3 = 678pF -> I used 680pFR3 = 1.4kohm -> I used 1.5kohmFor inductor 250uH, the coefficients are:C1 = 30.6nF -> I used 33nFC2 = 42nF -> I used 42nFR2 = 28,3kohm -> I used 27kohmC3 = 297.6pF -> I used 300pFR3 = 600ohm -> I used 560ohmDespite many attempts, I have no idea where the problem is.It also adds inverter schemes. The diagrams are two because the inverter consists of 2 PCBs1. PCB is a power part2. PCB is the control partThank you for your help

author: xavier60
author_rank: Super Contributor
timestamp: June 07, 2019, 09:46:35 am
content: I can't help directly, I don't understand the theory well.I mainly what to show how I did the fast current limiting via the soft start pin, which you are likely to need also.It is temperature dependent but this can be useful.For voltage regulation, I used the internal error amp in transconductance mode. The response is very good.It doesn't sense the full PSU's output terminal voltage, it regulates to maintain 3V drop across the series pass MOSFET of the proceeding linear post regulator.

author: xavier60
author_rank: Super Contributor
timestamp: June 07, 2019, 10:07:58 am
content: It looks to be too much gain for the voltage loop. Try increasing R1 from 1.5K to 20K.

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 07, 2019, 10:37:15 am
content: Did you notice the regulated output voltage is one of the parameters needed to calculate the compensator component values? As a result, if you want to make the output voltage adjustable over a wide range (NB - smoothly going down to 0V isn't an option, practically speaking) then you will have to grossly overcompensate the loop (that is, set a really low crossover frequency - perhaps a few 10s of Hz). Going with current mode control (CMC) will improve matters by eliminating the pole from the output LC filter, but CMC doesn't play well with the half-bridge unless measures are taken to ensure equal volt-seconds are applied each half cycle of operation (the full bridge is more amenable to CMC as long as the DC blocking capacitor that is usually in series with the primary is deleted).The usual approach to making a wide output voltage range switcher is to cascade it with a linear regulator and design the switcher/regulator control loop such that the former maintains a few volts of headroom for the latter (that is, the switcher maintains a nominally constant difference between the input and output voltage of the linear regulator). The slower the transient response of the switcher (ie - the lower the crossover frequency), the more headroom is required for the linear regulator (along with a much larger filter capacitor on the output of the switcher; way more than is required to meet ripple specifications).

author: paladyn
author_rank: Contributor
timestamp: June 07, 2019, 07:39:36 pm
content: Thank you for the suggestions, I will try to change the R1 resistor to something bigger and I will try to change the fcross to a significant one, eg 500Hz.From what I see, designing such a flexible converter will not be easy, but it will try.I still have the question of calculating the coefficients, the transformer ratio is somehow included in the calculations?

author: paladyn
author_rank: Contributor
timestamp: June 10, 2019, 06:21:19 am
content: MagicSmokerdo you have an example of how this coupling is implemented in a real system?

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 10, 2019, 10:37:53 am
content: Quote from: paladyn on June 10, 2019, 06:21:19 amI'm not sure what coupling you are referring to, but based on the context it seems likely you are asking how to make the switching power supply pre-regulator maintain a constant headroom for a linear post-regulator, even when the latter is adjustable? If so, then the key is to derive the voltage feedback for the switcher via an op-amp wired to look at the voltage drop across the linear regulator (that is, a differential amplifier) but with an offset applied to the terminal sensing the input to the post-regulator (via, say, a zener diode, precision two-terminal reference, or several conventional diodes in series). Consequently, the output of the op-amp will be zero when the input voltage to the pre-regulator is higher than the output by the offset voltage; et voila, you are now regulating the headroom across the linear regulator automatically.

author: xavier60
author_rank: Super Contributor
timestamp: June 10, 2019, 10:59:55 am
content: Quote from: MagicSmoker on June 10, 2019, 10:37:53 amThat's how my bench supply works.I used the Harrison topology linear regulator witch has everything referenced to the positive output terminal being ground.So the SG3525 control block is also ground referenced to the positive terminal.The 3V Sense simply connects to the Drain of the post regulator's series pass MOSFET which also connects to the positive output of the SMPS.

author: paladyn
author_rank: Contributor
timestamp: June 11, 2019, 06:12:22 am
content: Colleagues, the problem is a little different. I understand that your constructions work in two stages.AC main -> SMPS converter -> Linear power supply -> outputI have a problem matching the feedback of the SMPS converter itself. At low power (100W) the transformer starts to beep loudly. Perhaps this is because the transformer has not been stuck together and the windings fall into vibration?I also carried out tests at a lower frequency of fcross 500Hz but I had the impression that the coupling works even worse.I did not plan to make some great power supply with 20mV noise, I just wanted to make a similar construction as commercial low power supplies that are controlled by TL494 such as Gophert-cps-3205https://www.kirich.blog/obzory/128-laboratornyy-blok-pitaniya-gophert-cps-3205-ili-tot-redkiy-sluchay.htmlI also noticed that the current feedback loop works worse than the voltage loop. The only thing that is different in these loops is an additional operational amplifier INA213, which strengthens the shunt voltage. Do you use any additional amps to measure the current?I'm still thinking about changing the operational amplifier from LM324 to MC33074. Is the sense or rather not the problem here?

author: xavier60
author_rank: Super Contributor
timestamp: June 11, 2019, 06:58:19 am
content: Can you see the instability in the loop? Like a few KHz sine wave?I think that you have too much gain.Because I have used the SG3525's error amp in transconductance mode, it is difficult to see what the gain is from the schematic because there is no local feedback. I estimate the gain to be 5 with the 10K load.I recommend the SG3525 mainly because it has multiple pulse suppression and it is easy to implement pulse by pulse current limiting.Your primary snubber looks like it will have high dissipation. Mine is 120Ω and 470pF.Watch for ringing at the secondary. It adds a lot to the diodes' PIV and can kill them.Correction: The gain of the error amp is 15 with the 10K load.

author: xavier60
author_rank: Super Contributor
timestamp: June 11, 2019, 07:50:16 am
content: Removing R1 made no difference?

author: paladyn
author_rank: Contributor
timestamp: June 11, 2019, 08:53:17 am
content: xavier60I tested different feedback configurations and sometimes I could see high-frequency sinusoidal waveforms, but this is only when testing on the values ​​of elements that deviate a lot from those calculated in accordance with the book. On the other hand, for the calculated values ​​theoretically good, I have not observed such things. At higher power (600W and more) a sawtooth or trapezoidal waveform appeared, I do not remember too well now - I would have to check it out.Maybe I can do some discharges from the oscilloscope, I will post it.Snubbery actually lose some power but 2W resistors can handle it.On the side of the second snubbery, you only use the diddy or transformer. I used it only at the transformer and this change has improved a lot with respect to the noise at the output.I have not yet tried to change the R1 resistor, but today I will try to do something with it.Have you never had problems with squeezing the transformer at low power?Multiple pulse suppression occurs only with the shutdown function (PIN 10 SG3525)? Is it also at the fault amplifier?Using the pin 10, it is possible to implement a smooth control of the output current?Edit:Do you have a proven material, article or book from which I could calculate the value of the compensator for transconductance mode?

author: xavier60
author_rank: Super Contributor
timestamp: June 11, 2019, 09:28:19 am
content: Quote from: paladyn on June 11, 2019, 08:53:17 amI used pin 8, the Soft Start pin for fast current limiting. It gives smooth current regulation but it's not accurate. It is important for the CT to have lots of inductance so that its waveform has a rising slope. If the slope is falling, the fast current limiting wont be smooth.A slow and more accurate CC loop can then take over. It can be made to reduce the CV loop's reference voltage."LATCHING PWM TO PREVENT MULTIPLE PULSES" prevents the steering flip-flop toggling multiple times if switching noise gets into the error amplifier, and ensures no more than one drive pulse per phase per half cycle.https://www.st.com/en/power-management/sg3525.htmlIf too much switching noise gets into the error amp, it still can upset the loop causing rattling or squealing sounds.Mine makes a small noise that can be heard when the cover is removed when the load is very small at low voltage. This is only because the SG3525 cant go below a certain duty cycle causing the drive pulses to become intermittent.I did use a DIY transformer with bifilar center tapped secondary. I use a 39Ω and 2.2nF snubber across the outer legs to reduce 60V peak ringing down to a 20V spike.Edit: maybe the Shutdown pin can be used, it's able to discharge the soft start capacitor also. But it might need a good logic level pulse to work properly.

author: paladyn
author_rank: Contributor
timestamp: June 11, 2019, 09:42:21 am
content: Did you measure how much noise you have on the output?From what is known, current control requires much less elements than voltage control.Please write in which ranges you can regulate the output voltage?Do you have current regulations, but more accurate?

author: xavier60
author_rank: Super Contributor
timestamp: June 11, 2019, 10:00:00 am
content: Quote from: paladyn on June 11, 2019, 09:42:21 amIt regulates from 3V to 33VI dont actually have a slow regulation loop for the SMPS because the linear post regulator mainly does the current limiting.I cant remember what the output noise is, It wasn't much. There are two types of noise. The 80KHz ripple which is easy to filter.And the high frequency hash, bursts of damped oscillations caused by the fast switching of the MOSFETs and output diodes. This hash gets into everything and can be difficult to deal with. Good PCB layout helps a lot.

author: xavier60
author_rank: Super Contributor
timestamp: June 11, 2019, 10:30:56 am
content: Quote from: paladyn on June 11, 2019, 08:53:17 amThis might mean something to someone,http://www.ti.com/lit/an/slva662/slva662.pdfFrom experimenting with mine I found that the Type III compensator was not necessary for good stability, it gives faster response than the Type II.

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 11, 2019, 10:33:33 am
content: Quote from: paladyn on June 11, 2019, 06:12:22 amAll this suggests that noise is coupling into the feedback pathway, causing instability. The most likely source of such noise is switch and/or diode junction capacitance resonating with stray/leakage inductance at device turn-off. Besides snubbing the likely culprits, good board layout is the ideal cure.

author: xavier60
author_rank: Super Contributor
timestamp: June 15, 2019, 11:00:00 pm
content: The op's DSO photos can be found here,https://www.edaboard.com/showthread.php?384844-Half-Bridge-0-30V-0-20A-Feedback-loop-problem&p=1653014#post1653014There appears to be 100Hz ripple rather than loop instability.Although it doesn't explain the transformer squealing sounds.As with my experiences, all that hash makes SMPS debugging messy.

author: paladyn
author_rank: Contributor
timestamp: June 17, 2019, 06:25:24 am
content: xavier60Yes, this is a parallel topic to get a broader spectrum of information. At edaboard, I added some graphs of how the output and input waveforms look like.The most confusing thing for me is that the theory was described in the bookSwitching Power Supplies fromA to Z - Sanjaya Maniktala and articlehttps://www.biricha.com/uploads/8/9/8/0/89803127/foundations__part2.b__2.pdfis quite agreeable with each other. Despite the calculation of coefficients according to the patterns, the output curves are quite poor. I do not know if the problem lies in calculations or maybe somewhere in hardware.edaboard and eevblog are the last places I ask for help. Despite the size of the internet, people just do not do such things. Today, he goes to the store and buys a regulated regulated power supply, and does not sit at home and combines how to do it.

author: xavier60
author_rank: Super Contributor
timestamp: June 17, 2019, 08:32:11 am
content: Although I got my project to work properly, I did the compensation by trail and error. I found that the values were not too critical.I don't understand the formulas and calculations.Mine runs at 40Khz also. The inductor is about 80µH and 6000µF of output capacitance.While I was debugging mine, I directly connected the live side ground to the output side ground, I was powering through an isolation transformer of course. This greatly reduced to amount of hash. Later, I mounted the PCB on a metal plate and made the grounding connections to the plate. I can't remember how much this helped in reducing the hash.I'm still curious to know the result of removing R1.The 100Hz ripple seems to indicate too little gain near 100Hz.Check for missing pulses by doing single shot captures.

author: paladyn
author_rank: Contributor
timestamp: June 17, 2019, 09:21:21 am
content: xavier60If I did not write about R1, I'm sorry, I had to forget.I did a few tests, I tried without R1 resistor and with a few hundred ohms and with very large> 20KOhm but each time the effect was much worse than the calculated resistorI think I know why the transformer is squeaking but I do not know why this is happening. I checked the symmetry of the pulses on the primary side of the transformer using an oscilloscope and I came to the conclusion that the transformer lost pulse symmeters. Sometimes, 260us are missing the upper half of the pulses while there are impulses at the bottom. Of course, my Rigol 1074Z oscilloscope does not allow very accurate measurements.It seems to me that when there is a lack of impulses, then it may come to sub-mapping the core. The only question is why SG3525 allows such behavior?

author: xavier60
author_rank: Super Contributor
timestamp: June 17, 2019, 09:48:05 am
content: I tested mine. The SG3525 can't output pulses shorter than 600ns.When a very low duty cycle is needed, it skips pulses. Sometimes randomly, making a hissing sound. Other times there it is a regular pattern causing a small squealing sound. The drive stays mostly symmetrical.Actually I prefer that the IC does this instead of outputting needle like pulses.

author: paladyn
author_rank: Contributor
timestamp: June 17, 2019, 10:37:44 am
content: Add simulations in the LTSpice SG3525 in the enclosure along with a feedback loop. According to the simulation, everything is ok, but in reality it is not.

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 17, 2019, 10:41:45 am
content: Quote from: paladyn on June 17, 2019, 10:37:44 amSigh... See my post #16. When SPICE says your circuit works fine but the real world shows it most certainly does not then the difference is in the parasitics (stray C and L) and layout.

author: xavier60
author_rank: Super Contributor
timestamp: June 17, 2019, 11:05:25 am
content: Output ripple should only contain 80Khz. A small amount of this getting to the PWM compactor shouldn't cause a big problem.If 40Khz gets in, then it will cause a big problem.It can be difficult getting output voltage from the output capacitors to the input of the error amp without picking up interference.I suggest getting the voltage from the output capacitors to the input of the error amp through a temporary common mode choke.Try a 10 turn or more bifilar winding on a core from a mains hash choke.

author: paladyn
author_rank: Contributor
timestamp: June 17, 2019, 06:04:53 pm
content: I've done more tests. I switched off the voltage measurement point for the error amplifier on the common mode choke + 4 capacitors 1000uF caused very high loop instabilities. The loop itself was able to arouse. I did not try on the choke itself.However, I left the voltage measurement point as in the diagrams, but additionally soldered 200nF between the comp and gnd plus plus the choke common mode choke and 4 capacitors 1000uF. The feedback loop was calculated as if the output capacity was 7000uF and the ESR was 3.57mohm.Now the whole thing works much better. The transformer at small loads is slightly playing but not terribly loud. Certainly much lower than before.He also adds graphs of output voltage, evaluate how it looks.

author: xavier60
author_rank: Super Contributor
timestamp: June 18, 2019, 03:15:52 am
content: Trying to filter with capacitors can trade one problem for another if the roll off frequency is too low causing phase lag and that ~1.4Khz oscillation in the loop.It is difficult to figure out the effect the 220nF has at the output of internal error amp. Its output would tend to follow the input signal then start slew limiting when the 100µA limit is reached.You could try a low pass filter at the input.It looks promising though.I would like to see the implementation of the common mode choke.That 100Hz ripple at full current is likely to be normal.

author: paladyn
author_rank: Contributor
timestamp: June 18, 2019, 08:21:23 am
content: Direct connection of the output voltage by the common mode choke can be problematic. Mainly because the voltage measurement is single and should be rather differential. When measuring Vout with one common ground wire, I will not have a second signal to pass through the common mode choke.Unless I understand it wrong?As for the low-pass filter, I will try to check this option, just please point me at what frequency should this filter be? Unfortunately, the filter itself will strongly influence the calculated feedback loop coefficients.I met with such a solution that the output voltage was read differently and additionally an offset of about 100mV was added. Have you met with such solutions?I will also write that when I connected the oscilloscope to the COMP pin which still did not contain 200nF capacity on the oscilloscope, there was a sharp chaff, no periodic run.Maybe in fact some disturbances penetrated the measuring circuit and the whole was excited.I will try to check what I get on the output when I remove the common mode choke together with 4 capacitors 1000uF

author: xavier60
author_rank: Super Contributor
timestamp: June 18, 2019, 09:01:26 am
content: The CMC is a temporary solution that should get the cleanest voltage signal from the output capacitors into the voltage sense input of the control board.Experiment with an RC low pass filter at the voltage sense input with a roll-off about 10KHz."I met with such a solution that the output voltage was read differently and additionally an offset of about 100mV was added. Have you met with such solutions?"Not yet.

author: paladyn
author_rank: Contributor
timestamp: June 19, 2019, 05:58:38 am
content: I checked the inverter's reactions to the ones usedRC filter on the voltage measurement input. 6.8 kohm resistor + 2.2nF capacitor. The transformer is loud and the output waveforms were much worse than at the 200nF capacity between COMP and GND. I expected this reaction, because according to what I read, this filter will enter into the calculation of the compensator coefficients.I have also tested the influence of the common mode choke, I have not noticed anything beneficial here either. There are still loud squeaks of the transformer at different frequencies. You can see that there is no stability.I wonder how your inverter works since virtually everything is connected on wires in the air. Life suprises...

author: xavier60
author_rank: Super Contributor
timestamp: June 19, 2019, 07:00:33 am
content: Did you try a higher roll-off for the LPF?You also have to try to distinguish between loop instability that's caused by incorrect compensation that caused the 1.4Khz oscillation and the other type of instability caused by interference to the PWM comparator that causes abrupt and random changes in the drive pulses.Mine has a trifilar CMC that feeds 12V/gnd and V sense to the control board but this was mainly to reduce interference to other sections of the power supply.I also drive the MOSFETs with a 1.2µs Gate plateau although it causes some extra dissipation that my heatsinking can deal with.

author: paladyn
author_rank: Contributor
timestamp: June 19, 2019, 07:32:55 am
content: Did you try a higher roll-off for the LPF?No, I will try to check a few variants at a free time.I still have the idea to connect the common mode choke to the differential amplifier and then give the amplifier a loop. Maybe it will help.I do not know if I observe it well, but the higher frequency? Maybe if I moved a single field (fp0) to a higher frequency it would be better?

author: paladyn
author_rank: Contributor
timestamp: July 01, 2019, 07:49:20 am
content: After a few days of break, I come back from the battlefield. I checked that on the secondary side power supply, the one that powers the SG3525 and the operational amplifier and noticed noise and ripple. That's why I'm now powering the secondary side with a separate power supply and this problem is solved.The next test consisted in using the common mode choke at the output of the inverter along with the 4000uF capacitor package. The voltage feedback signal has been wound on the common common mode choke core with the same as the power supply. The effect? Very bad, big oscillations.Then, for this configuration above, I used a differential amplifier so that the coupling voltage would be the difference between the output voltage i and the ground terminal. Also the lack of a positive reaction.Another test is also error voltage read differently but this time without common mode choke in common with power lines. Also, the effect is poor.I added a separate common mode choke to the differential amplifier independent of this at the output of the inverter, the effect also does not cause much noise and squeaking of the transformer.The last attempt was to replace the resistor R9 in the feedback loop with a 500k potentiometer. It turns out that there is no point for which the transformer does not write or does not have any strange waveforms at the output of the inverter.I will still try to replace the operation amplifier with another one. Maybe it will change something.

author: xavier60
author_rank: Super Contributor
timestamp: July 01, 2019, 10:37:13 am
content: Quote from: paladyn on July 01, 2019, 07:49:20 amI did some experimenting with the compensation in my bench supply to find what should be guaranteed stable albiet slow.In your Half-Bridge_Analog_Controller-5.pdf schematic, R9,C8 would become 5.6K,1uF. R1,C1 are open circuit.When I do a load transient test, I see a few cycles 200Hz ringing at the output. This is close to the calculated output LC filter resonance of 229Hz, normal and expected.Passing the output voltage to the control circuit via a CMC definitely should not make things worse. Mine is 5 turns on a small torroidal core, about 50uH.How fast are your MOSFETs switching?I was planning to use IRFP460 MOSFETs . The heat-sink I used came from a plasma TV PSU and had a pair of SD20n60 MOSFETs bolted to it.The plan was to use them while debugging the SMPS instead of risking my IRFP460 MOSFETs .These MOSFETs must have very low charge causing them to switch way too fast. I had to use 220Ω and 220Ω with diode at the Gate to get the Gate plateau time up to about 500ns.I didn't bother using the IRFP460 MOSFETs.

author: paladyn
author_rank: Contributor
timestamp: July 01, 2019, 12:18:03 pm
content: The switching frequency is 40kHz, while the gate resistors have probably 12 ohms in parallel with the diode. The question is whether 220ohm is not too much? Of course, I can solder and check, but it will definitely affect the amount of heat released.You used 5.6k and 1uF feedback, tell me how did the inverter work? Have you noticed any squeals of the transformer or noise at the output from the inverter?

author: xavier60
author_rank: Super Contributor
timestamp: July 01, 2019, 12:32:08 pm
content: Quote from: paladyn on July 01, 2019, 12:18:03 pm220Ω would make the IRFP460 too slow. I can't say what the IRFP460 would need to slow it down by the right amount.With the 5.6k and 1uF in the feedback, ,mine was stable, just slow with no transformer noises except at low output voltage and no load for reasons that I explained earlier, not a real problem.

author: xavier60
author_rank: Super Contributor
timestamp: July 02, 2019, 10:00:52 pm
content: Also consider bridging out D8 in case noise is getting in after it.

author: paladyn
author_rank: Contributor
timestamp: July 03, 2019, 06:30:06 am
content: Yesterday I installed a new TL3474CDR operational amplifier, it is a little better, you can see the difference but still the transformer is squeaking and there are considerable distortions.I checked the situation again with common mode choke on the output of the inverter and on the same core I wrapped 5 scrolls from Umes. Unfortunately, there are even more distortion on the output waveforms.I'm wondering if diodes D8 and D9 are really a problem here. Maybe too big capacity? There is also the issue of choke and feedback. I wonder how much CCM or DCM work mode is important in calculating the feedback loop coefficients.

author: xavier60
author_rank: Super Contributor
timestamp: July 03, 2019, 07:36:39 am
content: Quote from: paladyn on July 03, 2019, 06:30:06 amBecause you are testing the CV loop only, it would be ok to connect the output of the op-amp directly to the Comp pin 9 of the SG3525,Are you using the simple compensation that I described earlier?I did not think about CCM and DCM. If there was a loop problem with DCM, it would happen only at low loads.I would like to see how you are applying the Common Mode Choke.EDIT: No more than 5V should be applied to the Comp pin 9 of the SG3525. It only needs 3V for full duty cycle.

author: paladyn
author_rank: Contributor
timestamp: July 03, 2019, 08:57:54 am
content: I will try to do some pictures today how it looks. See how the common mode choke and the rest. You write to connect the loop amplifier to pin 9 SG3525, but what to do with the SG3525 amplifier inputs? I could simply desoldute the coupler adding diodes and solder the loop amplifier to pin 9 to leave the internal SG3525 amplifier as it is today, i.e. a voltage follower (pin 9 connected to pin 1).As for compensation according to your description, I only tried without a C1 capacitor. Do you suggest using compensation as you did in the first post? Should there be voltage feedback? Possibly, could you suggest some element values to start with for testing?My loop is adapted to 3V voltage.

author: xavier60
author_rank: Super Contributor
timestamp: July 03, 2019, 09:38:59 am
content: Quote from: paladyn on July 03, 2019, 08:57:54 amI didn't fully understand what you said about the SG3525 amplifier, My suggestion about driving pin 9 directly is likely a waste of time and voltage clamping is required to prevent it going above 5V. The internal error amp can source/sink only 100µA.Do bridge out D8 though.Yes, use the compensation as I describe earlier. Voltage feedback is still required.Did you ever try someone else's suggestion of running the power supply in open loop by applying a fixed voltage to pin 9?The idea is to find stable state to work from.Actually I would prefer that the internal amplifier only to be used with the simple compensation.

author: paladyn
author_rank: Contributor
timestamp: July 03, 2019, 10:23:48 am
content: When writing about the internal amplifier, I thought of pin 1 and pin 2 of the SG3525 chip.I've done a little bit already, so I'll try to make a summary.1. Unsolder diode D8 and diode D9. The output of the TL3474CDR amplifier of the voltage loop (pin 7 in the diagram) should be connected to the pin 9 of the SG3525 system. After this procedure pin 2 SG3525 have a pull-up to Vref, pin 1 hangs in the air.2. Unsolder C1 and R1Can I run a test on such a configuration as above or change something?

author: xavier60
author_rank: Super Contributor
timestamp: July 03, 2019, 10:40:09 am
content: Quote from: paladyn on July 03, 2019, 10:23:48 amPin 1,2 of the SG3525 can be left floating or connected to something. The main thing is to put a zener diode between pin 9 and ground so that it can't go above 5V.You can then test, If the result is still poor, try changing R9, C8 to 5.6K,1uF.

author: paladyn
author_rank: Contributor
timestamp: July 04, 2019, 06:35:16 am
content: Yesterday I did not have much time to test, but I changed the control loops as we agreed. The omission of the diode D8, D9 and the internal amplifier SG3525 (pins 1 and 2) did not give much. Loop configuration with 5.6k and 1uF I have not tested enough time.I did a test where C8 is 27nF and R9 is an adjustable 500k resistor and I noticed a certain dependence. Noise occurs anyhow in the entire adjustment range, but the inverter in most cases works quietly above the load of 10A up to 20A. When the load is eg 5A and I tried to adjust the loops with the potentiometer, the converter works relatively quietly when the noise shape is sinusoidal, when the sinusoid disappears and the noise has a shape similar to the straight line the transformer begins to squeak.I tried to see what the case with an additional 4000uF capacitor set and the CMC filter on the output is a little better than without it, but if I tried to wind the Umes measurement cable on the same CMC choke as the inverter output I can not stabilize the loop anymore. Similarly, if I use some other choke, e.g. on a yellow core, and make a few loops.I will try to take pictures of the inverter today and carry out further tests.

author: paladyn
author_rank: Contributor
timestamp: July 19, 2019, 08:40:32 am
content: After a long break, I put pictures of the inverter.I tested feedback where the output of the TL3474CDR operational amplifier is connected to pin 9 of the SG3525, and the pins of its amplifier are not connected. No positive results.However, I was able to determine that when the operational amplifier SG3525 works as a voltage follower, the noise generated at the output is noticeably higher. When I am connected directly to pin 9, COMP is much better even when using two couplings as at the very beginning of our discussion.After combining with the 250uH reactor I returned to the 47uH choke and again I used a type 3 compensator. However, this time I tried the brutal-force method and instead of the R1 and R9 resistors soldered the 10k and 500k potentiometers.I observed that it is not possible to set the coupling correctly. When the loop is too fast you can see distortions of the waveform at high currents, a waveform similar to a one-wave rectifier, maybe the 47uH choke, but with a slower loop, a sawtooth shape is also obtained with a large amplitude. At low currents the squeaking occurs on the fast loop and on the slow loop.Somewhere, I read that it is impossible to design loops for every load. I wonder if I should replace the analog loop and just do a simple PID on the STM32 without any coefficients etc.Due to the fact that the photos are large, I will post them in several posts.

author: paladyn
author_rank: Contributor
timestamp: July 19, 2019, 08:41:03 am
content: 2

author: paladyn
author_rank: Contributor
timestamp: July 19, 2019, 08:43:21 am
content: 3

author: paladyn
author_rank: Contributor
timestamp: July 19, 2019, 08:45:50 am
content: 4

author: paladyn
author_rank: Contributor
timestamp: July 19, 2019, 08:47:30 am
content: 5

author: paladyn
author_rank: Contributor
timestamp: July 19, 2019, 08:49:35 am
content: 6

author: xavier60
author_rank: Super Contributor
timestamp: July 19, 2019, 12:37:51 pm
content: Adding the extra filter board and passing output current through the CMC would likely be making things worse.Did you try a bifilar wound CMC from the output capacitors to the U sense input on the control board? As shown in Reply #28.You can do a test to eliminate the feedback loop completely. Use a low value pot connected to the 5V reference and use the wiper voltage to directly control the duty cycle by connecting directly to pin 9 or to the input of the SG3525's amplifier configured as a voltage follower as it was originally. Pin 9 can be bypassed with a 10uF capacitor to be certain that there is no noise getting into the PWM comparator.

author: paladyn
author_rank: Contributor
timestamp: July 20, 2019, 07:27:03 pm
content: Have you tried bifilar CMC from the output capacitor to the input sensor U on the control board? As shown in the answer # 28.Yes, but the inverter behavior was even worse. The waveforms had more distortion and the transformer worked louder.I did a test with a potentiometer connected to pin 9 of SG3525 as you wrote, and I noticed the following dependence:The converter turns on at about 0.6V on pin 9, which, with my load of about 1ohm, gave 5V at the output and 5A. The transformer worked quietly all the time, but somehow the output runs were quite weak. Pretty noisy. Maybe I proved myself that the 47uH choke is not a good move. At 25A it's about 10uH is not much.At the Type 3 compensator I also noticed that the transformer is pulsing and buzzes when the output voltage goes below 5Vthat is, when the voltage at pin 9 drops below 0.6V and the inverter switches off.I also noticed that the current loop worked much worse from the voltage through the INA213 operational amplifier. Maybe it has too small bandwidth, but the amplifier itself made the loop much worse. I omitted the INA213 and 4 ceramic resistors 5W 0.1 ohm connected in parallel, which are directly connected to the loop amplifier.Below are some photos from the work of direct control of pin 9 of SG3525 from the potentiometer.

author: paladyn
author_rank: Contributor
timestamp: July 20, 2019, 07:28:24 pm
content: 2

author: paladyn
author_rank: Contributor
timestamp: July 20, 2019, 07:30:34 pm
content: 3

author: paladyn
author_rank: Contributor
timestamp: July 20, 2019, 07:31:54 pm
content: 4

author: paladyn
author_rank: Contributor
timestamp: July 20, 2019, 07:32:47 pm
content: 5

author: paladyn
author_rank: Contributor
timestamp: July 20, 2019, 07:34:09 pm
content: 6

author: xavier60
author_rank: Super Contributor
timestamp: July 21, 2019, 06:08:46 am
content: The 100Hz ripple is normal because there is no feedback loop to correct it.The main thing is that the PWM timing is stable with no jitter or missing pulses.All appears fine to me and proves there is nothing odd affecting the drive.I have no experience with a direct current control loop.For a 40A battery charger project, I used fast pulse by pulse limiting and a slow loop that decreased the reference voltage to the voltage error amp.

author: paladyn
author_rank: Contributor
timestamp: July 26, 2019, 08:47:43 am
content: Have you met with a situation where pin 5 (CT) is connected to pin 1 (INV AMP) through a resistor?Maybe you know why it's used?

author: xavier60
author_rank: Super Contributor
timestamp: July 26, 2019, 11:23:03 am
content: Quote from: paladyn on July 26, 2019, 08:47:43 amNo, do you have an example? I guess that it could improve noise immunity.

author: paladyn
author_rank: Contributor
timestamp: July 26, 2019, 11:49:02 am
content: The connection I mentioned is in the schematic of the power supply, which I put in the attachment.

author: xavier60
author_rank: Super Contributor
timestamp: July 26, 2019, 11:09:59 pm
content: Quote from: paladyn on July 26, 2019, 11:49:02 amI don't understand the description, another language of some sort.He is possibly trying to partly cancel 66Khz ripple that's getting into the error amp.Something looks odd with the MOSFET Gate drive transformer. I think that the high-side MOSFETs would get half of the drive voltage.

author: paladyn
author_rank: Contributor
timestamp: July 30, 2019, 05:33:21 am
content: I made an experiment and connected pin 1 to pin 5 (SG3525) with an adjustable resistor 500 kohm, no visible effects.EDIT:I just realized what a blunder I made.After all, I do not use the error amplifier in the external SG3525 only. Maybe you would have to connect pin 5 to the COMP9 pin output

author: xavier60
author_rank: Super Contributor
timestamp: July 30, 2019, 09:03:04 am
content: Does it run smoothly by controlling PWM by applying filtered DC to pin 2 of the SG3525's error amp?

author: paladyn
author_rank: Contributor
timestamp: July 31, 2019, 07:07:57 am
content: Does it run smoothly by controlling PWM by applying filtered DC to pin 2 of the SG3525's error amp?pin 1 and pin 2 of the SG3525 system are not used and not connected. Pin 9 is connected to an external operational amplifier that realizes the loops.I am using an external operational amplifier, but yesterday I did a test where I connected an adjustable 500kohm pin 5 resistor with pin 9 of the SG3525 chipI must admit that I did not notice the difference in the operation of the inverter. At a small value of the resistor some soft anomalies already appeared in the noise at the inverter output and I stopped reducing the resistances.Overall, I noticed that the problem occurs when SG3525 can no longer reduce PWM because it has almost reached zero. Perhaps the use of a huge choke would help?Summing up the problem of squeezing the transformer occurs mainly at low resistance loads and low output voltages.

author: xavier60
author_rank: Super Contributor
timestamp: July 31, 2019, 07:42:30 am
content: Quote from: paladyn on July 31, 2019, 07:07:57 amThat's right,the pulse width can't go below 600ns so the SG3525 has to skip pulses and causing some transformer noise. I can't hear it with the covers fitted.My choke is about 80µH at high load current.Driving the MOSFETs too hard can cause extra interference.

author: mrjoda
author_rank: Regular Contributor
timestamp: July 31, 2019, 01:13:30 pm
content: hello guys.At the beginning : paladyn, very nice project, i will definitely watch it.I am not able to help you with compensation of feedback, but ... we are working with smps and converters in work and we are using network analyzer for feedback loop. You can simply check compensator pole/zero locations according to nyquist criteria and tune the feedback loop to sweet spot. Without it, it is only shooting to dark, because you don't know the amount of phase margin. Is there any chance for you to borrow one or visit some lab with correct instruments and tune it correctly ? It will save you a LOT of time.At first, i thought the smps are easy to design... now,when i know some background, i don't have balls for my own design

author: paladyn
author_rank: Contributor
timestamp: August 01, 2019, 07:46:50 am
content: mrjodaThank you for the words of appreciation. Indeed, the design of impulse power supplies is a difficult matter. At first it looks like it's quite a simple thing, but the amount of detail determines how the power supply then works. As you mentioned, testing the loop without network analyzer is like working in the dark. I will try to look for a person or institution that would have such an analyzer. It is a pity that they are so expensive, because I would buy one.There is certainly a lot to improve in the current project, but this is the purpose of the prototype. The inductor has too low inductance, current radiators are only suitable for testing also PCBs must be improved to reduce parasitic inductance. I also noticed that the input capacity is too small. With a power output of 750W, the capacitor voltage is only 280V instead of 320V. Of course, such a decrease can be taken into account in the amount of winding of the transformer itself, but the current one works at the limit of the possibilities.

author: mrjoda
author_rank: Regular Contributor
timestamp: August 01, 2019, 03:41:32 pm
content: its comes to my mind... what about ADALM2000 ? it costs around 120€ and one of its features is network analyzerhttps://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/adalm2000.htmli want to buy it soon. Of course it will be like half blind but maybe, just maybe it could help.

author: paladyn
author_rank: Contributor
timestamp: August 19, 2019, 06:45:18 am
content: Honestly? Somehow I am not convinced that you can do something with this equipment. If you buy, please report, because maybe I am wrong.

author: paladyn
author_rank: Contributor
timestamp: March 06, 2020, 02:46:16 pm
content: Hi everyoneAfter long break i would like to resurrect topic.I changed LC filter to 300uH inductor and total capacity 9000uF plus common mode choke. Also i bought Analog Discovery 2 to measure bode plot.Quick recap:Topology - Half BridgePWM Controller - SG3525Mosfet Drivers - HCPL3120Transistors - IRFP460Rectifer - 4 x 60CPQ150Voltage after diodes on max PWM - 43VTarget output voltage 0-30V (regulated)Feedback OP-AMP - TL3474CUsed compensators - Type 2 , or Type 3Load = about 1ohmLC_Filter schematicI have charts bode plot with out compensator, and few charts for compensator type 2 and type 3. Can you evaluate where put zero and pole looking to uncompensated chart. Also i would ask you to evaluate attached charts for compensator type 2 and type 3.Feedback loop uncompensated Output = 5VFeedback loop uncompensated Output = 12VType 2 compensator Output = 5VType 2 compensator Output = 12VI have hope that toogether we will resolve feedback loop compensation problem, and acquired knowledge will be usefull for others designers

author: paladyn
author_rank: Contributor
timestamp: March 06, 2020, 02:50:52 pm
content: Type 3 compensator VOUT = 5VType 3 compensator VOUT = 12V

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 06, 2020, 02:53:47 pm
content: I suppose it's too late to recommend an average current mode control...The CMC in the filter by the way, can't possibly do anything if it's shorted between GND and GND; indeed if the circuit is common ground, the solution is easier because common mode noise can be controlled by layout alone.Tim

author: paladyn
author_rank: Contributor
timestamp: March 06, 2020, 03:01:49 pm
content: Sorry, I made mistake during drowing schematic. I will correct atachment aboveT3sl4co1lcan you tell more about average current mode control. Why is it better ?

author: David Hess
author_rank: Super Contributor
timestamp: March 07, 2020, 12:36:04 am
content: Sometimes I am amazed that anybody gets a voltage mode variable input or output switching regulator to work.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 07, 2020, 01:14:30 am
content: You sense the inductor current and close a loop on it, so that inverter current can never be outside a perfectly well defined range. The current setpoint is then driven by the voltage error amp (which has a well defined output range -- it saturates to +V/-V and some resistors can map this to the 0-max range current setpoint). The two loops also only have one reactive component each (inductor, filter caps) so are very easy to compensate, whereas the voltage mode loop has an LC in it which is impossible to compensate properly.You will particularly see the difference in transient source/load testing, including short circuits.You can still add this in, by adding a current sense amp to the inductor (a high-CMRR diffamp, often purpose made e.g. INA195, or perhaps a Hall-effect sensor which is slower but even higher CMRR and voltage range), using the SG3525 for current error amp, and add an external op-amp for voltage error amp.Tim

author: paladyn
author_rank: Contributor
timestamp: March 07, 2020, 09:54:14 am
content: David HessVariable output voltage is not comfortable for smps but a lot of regulated power supplies are working in that way. Many comercial regulated power supplies like 0-30V 0-5A is working based on DC/DC converterUPDATE:T3sl4co1lDo You have practical experiance with this type of control ? Becouse it seems this type of control is very interesting.In my sytuation power supply is splited to 2 PCBs. One is power stage and second is for control so i thing will not problem to change voltage mode control to average current mode. I can do next PCB and I will have average current mode.But.... New type of control need new knowlage how to compensate it and how to properly design schematic for this type of control.Update 2:I removed CMC to check how much he change characteristic of bode plot and I have to admit that it changes a lot. Attachments below:Output = 5VOutput =12V1.5V on error op-amp (non inverted pin) -> compensator was calculated for 1.5V reference voltage on op-amp.I also spotted that changing reference voltage on op-amp(non inverted pin) little change crossover frequency and phase maring but not so much. Crossover frequency was calculated to 4kHz and as you can see gain on 4kHz is about 0dB and phase margin is about 67 deg. In my opinion feedback loop should be stable. Noises above 20kHz can be caused by 14BIT resolution of ADC on Analog Discovery 2. Am I right ?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 07, 2020, 02:31:41 pm
content: I don't worry about compensation, analytically; I put in a typical value and test for step response. The op-amp might be fed by a 10k series resistor, and might have an R+C feedback (compensation) network, say 1-220k and 100pF-10nF, with 10k and 1nF being typical, depending of course on modulator gain, inductor value, sensor bandwidth and op-amp bandwidth. And for voltage, maybe the same resistors and say 47nF, then adjust from there.Tim

author: paladyn
author_rank: Contributor
timestamp: March 08, 2020, 11:21:29 am
content: Yesterday i made experiment I changed lower resistor(RF2) in output voltage divider to regulated resistor and set constant reference voltage 1.5V on non inverting op-amp as I assume during compensator calculation. Many publication says that lower resistor(RF2) not impact to compensation but practical test showed that is not true. Behavior of feedback loop is very similar when you change lower resistor(RF2) or when you change Vref voltage.When i changed output load from about 1ohm to 4.5ohm and set low output voltage like 5V, feedback in some point almost reach 180 deg.My conclusion is that it is not possible to have only one compensator for all output voltage. If i want regulated output voltage from 0-30V i need to use on example 3 different compensators calculated for 3 different vref voltages.Can you tell me whether average current mode control allows regulated output voltage with out complex compensators ?