PI controller behaving as PWM  - Page 1
Forum section: electronics / beginners

author: gus789
author_rank: Contributor
timestamp: October 02, 2014, 04:57:54 am
content: Hello, I am trying to make the scanning tunneling microscope circuit shown in this linkhttp://www.reocities.com/spm_stm/Schematic_Print.htmlwork. I have succeeded (partially) in making the tip feedback work, but looking at the output of the I-V converter I see that instead of a stable current level, I tend to get a pwm signal (of about 180Hz). Occasionally the tip current will become stable for a few seconds, but then it goes back to PWM mode. The duty cycle changes as the bias applied to the difference amplifier is varied, so I've confirmed that it is a PWM signal rather than just erratic op-amp oscillations. I've also checked that I have the circuit wired correctly a couple of times, and even put additional decoupling capacitors very close to the power pins of all the opamps used, all to no avail. I've also played extensively with all other parameters, (sample bias, integral gain, setpoint), but it seems that PWM behavior is preferred for all settings. Does anybody have a clue why this circuit prefers to behave like a PWM servo instead of maintaining a stable current, and how I could prevent that?Thanks!

author: IanB
author_rank: Super Contributor
timestamp: October 02, 2014, 05:07:58 am
content: It sounds like you have a feedback control system with too much gain so that it has gone unstable. The "PWM" signal would be a limit cycle. Look for mechanical causes like slack linkages or sticking before looking for electrical causes.

author: Kremmen
author_rank: Super Contributor
timestamp: October 02, 2014, 05:45:05 pm
content: Classical PI(D) controllers must be tuned to match the "plant" they are controlling. A too short integrator time constant and/or too high proportonal gain will cause the control loop to become unstable. The oscillation, if driven hard enough, will tend towards a bang-bang limit cycle as IanB mentions.So, tune the gains. You may want to consult guides such as e.g. this:https://controls.engin.umich.edu/wiki/index.php/PIDTuningClassical

author: tszaboo
author_rank: Super Contributor
timestamp: October 02, 2014, 08:12:44 pm
content: The steps for tuning a PI controller:1.)Change P2.)Change I3.)RepeatIf the number of iterations reach a certain value, than be comforted with the fact, that after reading 3 books and learning it in uni. for two semester, I still think that control theory is either rocket science (with Youla–Kucera parametrizations, and Kalman filters) or too easy (PID controller with a single opamp).

author: gus789
author_rank: Contributor
timestamp: October 02, 2014, 10:42:08 pm
content: Thank you! Indeed I think too high gain on the I-V stage was the problem. With the 10M feedback resistor I measured about 10nA/V gain. Then just for kicks I put a 1M in parallel with the 10M and it stabilized (but only at small sample bias). I'm on my way to putting a rotary switch to allow selecting the I-V gain to various lesser values.

author: Kremmen
author_rank: Super Contributor
timestamp: October 03, 2014, 06:06:31 pm
content: Quote from: NANDBlog on October 02, 2014, 08:12:44 pmAs a (long since) student majoring in Control Theory i found the general Lyapunov Stability theory to hit a personal pain threshold. Mastering the lemmata of nonlinear discrete time stability easily qualify as rocket science and beyond... Guys who came up with such maths with just pen and paper - like L - definitely not the dullest pencils in the box. Gotta respect them.Kalman filters are easy