type 3 compensation for VMC (LTSPICE) - Page 1
Forum section: electronics / projects

author: chimera_786
author_rank: Regular Contributor
timestamp: April 25, 2013, 01:21:31 am
content: Hey guys. I have attached an png file in which Im modeling the small signal analysis of a type III compensator. Apparently, I cannot add a .sch file to this post...The op amp Ive modeled is TLC2272 and I have a compensation loop around it.Who ever is looking at this file, I request that you simulate the circuit by copying what I have posted as I was not able to attach the .sch file and make sure that when you simulate it, add the following trace in the simulation window: V(vcont)-V(n002). This will give you the actual phase and gain margin plot which a type 3 should provide.Im having a little difficulty in understanding as to why my phase does not start from -90deg. Rather, its starts from +90 and although thats fine as the max phase delay the compensation can add is -180 (which would yield 360 phase shift total when combined with the phase shift added by the negative feedback)Thanks!

author: Harvs
author_rank: Super Contributor
timestamp: April 25, 2013, 01:30:18 am
content: Please just zip the file then attach it.

author: c4757p
author_rank: Super Contributor
timestamp: April 25, 2013, 01:30:35 am
content: Quote from: chimera_786 on April 25, 2013, 01:21:31 am1) Just rename it to .txt. Bit of a pain that the forum won't take SPICE files, but it's pretty easy to rename.2) Which node is labelled "n002" depends on the order in which they're added to the schematic. Which point is n002?

author: chimera_786
author_rank: Regular Contributor
timestamp: April 25, 2013, 01:45:00 am
content: here you go. V(noo2) has now become V_invert.I have attached the .zip versionThanks for looking!

author: chimera_786
author_rank: Regular Contributor
timestamp: April 26, 2013, 01:29:42 am
content: ummm..hello??? anyone wanna help me with this?

author: Harvs
author_rank: Super Contributor
timestamp: April 26, 2013, 03:59:22 am
content: Nope this riddle has me stumped (i.e. there's no obvious errors I can see.)I put in the values from this app notehttp://www.intersil.com/content/dam/Intersil/documents/tb41/tb417.pdf,and a standard op amp, but the result is the same (leading phase shift at low freq.)Wouldn't mind knowing the answer if someone cares to enlighten us.Obviously +90 to -90 is just the inverse, so it seems like there must just be something stupid going on.

author: amspire
author_rank: Super Contributor
timestamp: April 26, 2013, 05:09:50 am
content: Quote from: chimera_786 on April 25, 2013, 01:21:31 amIt doesn't start at 90 deg. It starts at 180 deg if you go low enough - like 1 mHz. C1 causes a pole at a few hundred mHz and so by about 1Hz, C1 is adding a -90 deg phase shift. 180 + (-90) = 90 and that is what you get at 10Hz. Your mistake is you didn't start the sweep at a low enough frequency.If you are wondering how you can get a pole less then 1 Hz, the effect of the gain is to multiply the apparent value of C1 by the opamp voltage gain. So the effective C1 at the input is 27n x 15000 = 400uF. The gain of the opamp acts as a capacitance multiplier at the opamp input. The time constant with the input 1.6K is 1.6K x 400u = 0.64seconds. This corresponds to a pole at 0.248Hz.This is rough - I have ignored the effects of other parts like C2, R3, etc, but a first order approximation is the best way to get a feel for what is happening.Richard

author: chimera_786
author_rank: Regular Contributor
timestamp: April 27, 2013, 01:35:47 am
content: okay. Point noted.But why is it starting at 180? Should it start from -90 degs?I really would appreciate the help on this one. Feedback is something im not so disciplined with and hence the effort to understand itTHanks

author: Harvs
author_rank: Super Contributor
timestamp: April 27, 2013, 02:08:27 am
content: Clearly it goes to 180 degrees as you approach DC. This can be seen by simply doing a DC analysis of the circuit (i.e. open circuit all capacitors, and now you have an inverting comparator.)However, every bit of theory I've read, as with chimera I'm guessing, has the phase shift starting at -90 degrees. What I'm guessing now, is that it's relative to 180 degrees, and not relative to the input phase being 0 degrees? Or to explain it another way, it's an inverting amp with -90 to 90 degree phase shift.Would be nice to know for sure though.

author: chimera_786
author_rank: Regular Contributor
timestamp: April 27, 2013, 06:21:39 am
content: Instead on staring from 180, it should start at 0 deg at very low freq.Im doing more analysis on it. I'll ping you once i find out whats upIn the mean time, if someone else wants to comment.. feel free to positively contributeThanks

author: jahonen
author_rank: Super Contributor
timestamp: April 27, 2013, 07:31:08 am
content: Yes, it starts from 180° because of the inversion in the opamp. And note that if you want to see a gain between two nodes in LTSpice, you'll need to plot V(out)/V(in), not V(out)-V(in), which is a completely different thing.Also note that your feedback network loads your R_pole1 / C_pole1 1st order pole network, so results might be affected. Use another E element to buffer that and you'll be safe.Regards,Janne