P
Phil Hobbs
Guest
On 04/28/2017 11:38 AM, George Herold wrote:
You drive the heater and look at the thermistor temperature. I'm a
huge fan of step responses for this job because the high frequency info
is all there in the first ~ 3x the rise time. (For a 1-pole response
the rise time is 2.2 time constants.) In your situation you'd want to
do it at a few different drive levels, because as Tim says, the gain and
phase will be different for the two heat sources.
Putting one thermistor by the transistor and another by the resistor
will also allow you to null out the effect of the resulting temperature
gradient at the position of your sample by changing the relative gain
applied to the two. The simplest way is to wire them in series, but
then the nulling trick only works at one temperature. (I talk about
this in my thermal control chapter someplace.) You can make the null
position more stable with respect to the set point by linearizing the
thermistors independently and then forming the overall error signal
using a linear combination.
Cheers
Phil Hobbs
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics
160 North State Road #203
Briarcliff Manor NY 10510
hobbs at electrooptical dot net
http://electrooptical.net
On Friday, April 28, 2017 at 10:59:02 AM UTC-4, Phil Hobbs wrote:
On 04/27/2017 07:45 PM, Tim Wescott wrote:
On Thu, 27 Apr 2017 16:10:26 -0700, George Herold wrote:
On Thursday, April 27, 2017 at 6:50:06 PM UTC-4, George Herold wrote:
On Wednesday, April 26, 2017 at 10:47:38 AM UTC-4, Tim Wescott wrote:
On Wed, 26 Apr 2017 04:45:23 -0700, George Herold wrote:
On Tuesday, April 25, 2017 at 11:20:50 PM UTC-4, Tim Wescott wrote:
On Tue, 25 Apr 2017 17:02:48 -0700, George Herold wrote:
On Tuesday, April 25, 2017 at 1:22:30 PM UTC-4, Phil Hobbs
wrote:
On 04/24/2017 10:22 PM, George Herold wrote:
On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott
wrote:
On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote:
Hi all, this is not so much a question, as me just
spouting.
If I do say (spout) something wrong, or that you disagree
with or that you don't understand, then please do speak up.
I've been tuning loops for years. (By tuning I mean
picking some reasonable starting values, all loops IME need
a little real time tweaking from the starting values.)
I've always used the Zeigler-Nichols oscillation method,
and looked no further.
Now my boss asked for some other technique and I started
reading about tuning from the step response. (What Z-N call
the Process-reaction curve) Oh I stuck the Z-N paper here,
along with a few 'scope shots.
https://www.dropbox.com/sh/7lkqazuy6wvzknk/
AADcZtTvFvaD3TEzeJiAjEy6a?
dl=0
If only I'd read the paper ~20 years ago.
This is a more up to date rehash of the same things.
http://faculty.mercer.edu/jenkins_he/documents/
TuningforPIDControllers.pdf
For completeness I'll stick in Tim W's excellent article.
(Though unfortunately he doesn't talk about Z-N directly.)
http://www.wescottdesign.com/articles/pid/
pidWithoutAPhd.pdf
(Maybe he'll add an appendix for me. :^)
Nope. For two reasons:
First, because I've never used Z-N, never felt the need, and
so never built up practical experience with it.
Second, because all the industrial control guys I've talked
to, both in person and 'lectronically, tell me that Z-N gets
you a good starting point but then you need to either tweak
things, do measurement + system ID + design, or do frequency
sweeps + design. There's enough material out there on it,
and too many people that think that it's the bees knees.
Huh, Ok I only said it was my starting point. Then do some
step responses and see what it looks like. (I'm mostly an
idiot when it comes to thermal loops... I'm starting to think
that 1/2 the time I got lucky and put the sensor in a good
place, and the other times, not so good.) Well sometimes you
just need to put the sensor at the point you care about.... I
could think more about where to put the heater.
Grumble....
What's your starting point?
So if you look at the step response in my dropbox link,
there is a lag of 300-350 ms. And if you look at the
oscillations at the "ultimate gain"
you'll see a period of about 2 seconds. And lo and behold,
2*pi*tau (the lag) = period! That is very satisfying.
Estimating the needed gain (proportional term) from the
step response, didn't work out that well in this case. But
I'm running at gains that are ~20% the ultimate gain, so
oscillation method didn't work all that well either in this
regard.
Oh I do have one question for Tim.
You show a thermal control loop with just integrating
control. Does this really work? (I would have thought it
would just oscillate.)
Or do you have a little bit of proportional term in there?
If you keep a firm lid on your ambitions, certainly. For
most systems you won't get nearly the speed you'd get with
some proportional action or even proportional + derivative
-- but any system that has a flat gain characteristic going
down to zero frequency can be controlled with just an
integrator, if you're patient.
The one thermal loop that I've done had a simple first-order
response well beyond any reasonable loop bandwidth. So it
got a simple PI controller and worked just grand.
Huh, OK I'll have to try, the loss is in the delay/lag?
This thermal loop is fast, (at least for me)
so ten seconds is no problem.
I get starting points for thermal loops by looking at the
open-loop step response. In small systems it's usually well
approximated by a time delay cascaded with an integrator. Thus
the plant's transfer function is approximately
H_plant(f) ~ (1/j 2 pi f tau_I) exp(-j 2 pi f tau_delay)
Right, I went looking for a pulse response with "your"
delay*RC time constant, model in mind.
Seem's like Z-N did it before we were born... which I love.
They also give a guess at the gain, from the pulse response.
Then I do the usual frequency-compensation thing, aiming for
about a 60-degree phase margin. If the system is reasonably
well insulated,
the effect of the heat leak is usually small enough to ignore
for frequency compensation purposes, but if it isn't, you need
to move the pole from zero out to (j 2 pi f tau_leak).
Huh, Phil, lots of the time you're talking over my head,
(or at least not where my head is at the moment.)
I'm not sure where 60 degree's is, but I look at the set point
step response and lower the gain if there's not too much
ringing.
Say a Q of 1-2. (probably closer to one, and then in production
each unit is a bit different.)
You need to learn frequency-domain tuning. Just looking at the
time domain response is not a reliable way to get the best
response and a known loop robustness.
Grin, right. (There are bucket loads of things I need to learn.)
You do a frequency sweep with the loop closed?
Do you have a video showing that? :^)
It's on the short list -- which is about half a dozen titles long.
I describe it in my book. And in this article:
http://wescottdesign.com/articles/FreqMeas/freq_meas.html
The basic idea is that if you measure the phase and amplitude of a
sine wave going into a block, and the phase and amplitude of a sine
wave coming out of that block, then you can calculate the block's
response at that frequency by doing a complex division (amplitude out
/ amplitude in,
phase out - phase in). Then repeat for a whole bunch of frequencies.
Right. I've mostly just kept track of the amplitude response, though
you can always see the phase bounce around too.
(It must be Krammers and Kronig, or someone earlier, who observed that
you can see the phase response before the amplitude.)
Hmm I've got a Z-N oscillation question, moving to SED,
in hopes of more experience.
It's easy to build this into code if you're working with a
microprocessor; if you're not there are instruments out there
("dynamic system analyzers" or "transfer function analyzers") that do
it. If National Instruments isn't utterly crazy there's a pre-made
VI to do this in labview with one analog I/O brick.
My Rigol sig gen goes down to ~uHz. I can do a frequency sweep, It's
got two outputs which I can phase lock and set at 90 degrees. In
principle, I can measure everything myself.
I hate long time sweeps... you don't know till hours later if you f'ed
something up. It's much faster to understand the step response, or
oscillation method.
George H.
I suspect that there's one out there for less than $500. And you can
always do it by hand with a signal generator and an O-scope.
Once you know what you are doing (I'm not claiming that *I* know.)
Doesn't the step response (I'm thinking closed loop) contain the
same information as a frequency sweep?
In theory, yes. In practice the good stuff is often swamped out by
either noise or distortion. In the past I've done a pretty good job
of doing system identification from a customer-supplied step response
-- but I was limiting the performance of the loop based on what I
didn't know about the plant, rather than a sure idea of what the
plant wasn't capable of.
You could probably take a whole bunch of step responses and average
them together, and then fit a system model to the resulting average
-- that would at least knock down the effects of noise. But you'd
want to do real honest-to-god system ID, where you're fitting a model
in the Laplace domain to the step response, not just that Z-N stuff.
--
Tim Wescott Control systems, embedded software and circuit design I'm
looking for work! See my website if you're interested
http://www.wescottdesign.com
Hey what about doing the FFT of the pulse response?
Right, I know about FFT's (Fir spectrometers as a post doc.)
There's low frequency information in the long tail.. noisy part of the
response... In this case I'm more interested in the high frequency, I
think?
You're most interested in the frequencies around the loop closing
frequency. You can take the FFT of the response to a step or a square
wave (I'd get it w.r.t a square wave, with lots of reps).
* Take the Fourier transform of the excitation
* Take the Fourier transform of the response (get the delay right!)
* Zero out the response's FFT in those bins where the excitation's FFT is
zero
* Divide the response's FFT by the excitation's FFT for the non-zero bins
You'll have gain and phase, at least at those points.
I haven't done this so I can't guarantee it -- but what the heck, maybe
it'll work out just fine.
Or just get an HP 35665A, 35660A, or 3562A DSA from eBay. I got one for
$300 back in 2009, and got an all-options ROM (customized with the
unit's serial number) for $65 from glkinst.com. That gets you the swept
sine, AWG and noise waveform sources, plus HP Instrument Basic, extra
memory, curve synthesis, and some other nice things. It's worth getting
the pc-style keyboard for it (those are cheap).
FFTs are famous for generating reasonable-looking wrong answers when one
is careless.
Cheers
Phil Hobbs
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics
160 North State Road #203
Briarcliff Manor NY 10510
hobbs at electrooptical dot net
http://electrooptical.net
Hmm well that's fine for me.. but I gotta tell someone else how to tune it too.
(which one of those will be cheaper... I looked for the 35660A (assuming
a lower part number would be earlier.) All were ~$1k and above.
(you bought sometime during/ near the recession.. probably a good time to
buy.)
We've got an SR770 spectrum analyzer. That I think goes down to ~0.5 mHz
(10^-3 Hz) or something like that. It's got a noise source, chirped source.
(sine's only at the center frequency of each bin) and maybe does a swept sine.
I'm still not real sure what I'd drive and what I'd measure?
With a closed loop, I'd put the source into a modulation input for the
temperature? And then look at the error? Or would you drive some
external load (heater) with the source?
George H.
You drive the heater and look at the thermistor temperature. I'm a
huge fan of step responses for this job because the high frequency info
is all there in the first ~ 3x the rise time. (For a 1-pole response
the rise time is 2.2 time constants.) In your situation you'd want to
do it at a few different drive levels, because as Tim says, the gain and
phase will be different for the two heat sources.
Putting one thermistor by the transistor and another by the resistor
will also allow you to null out the effect of the resulting temperature
gradient at the position of your sample by changing the relative gain
applied to the two. The simplest way is to wire them in series, but
then the nulling trick only works at one temperature. (I talk about
this in my thermal control chapter someplace.) You can make the null
position more stable with respect to the set point by linearizing the
thermistors independently and then forming the overall error signal
using a linear combination.
Cheers
Phil Hobbs
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics
160 North State Road #203
Briarcliff Manor NY 10510
hobbs at electrooptical dot net
http://electrooptical.net