PID tuning. Lag = ~ integrating time

On 04/28/2017 11:38 AM, George Herold wrote:
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
 
On 04/28/2017 11:08 AM, Phil Hobbs wrote:
On 04/25/2017 08:02 PM, 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.)

Not difficult, just too telegraphic. You replace the factor of
1/j omega f tau_I

with

1/(tau_leak/tau_i + j omega f tau_i),

(Wrong way up.)

1/(tau_i/tau_leak + j omega f tau_i).

so the gain maxes out and Delta-T decays exponentially when the heater
is turned off, instead of just sitting there the way it would if it were
really an integrator.

The heat leak isn't usually too relevant out at the unity gain cross,
because if the ratio isn't pretty big you won't have good thermal
control anyway.


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.)

I usually like thermal loops to be a bit better damped than that, to
avoid surprises if something in the plant drifts a bit.

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 11:13:17 AM UTC-4, Tim Wescott wrote:
On Fri, 28 Apr 2017 06:23:45 -0700, George Herold wrote:

On Thursday, April 27, 2017 at 7:45:30 PM UTC-4, Tim Wescott wrote:
On Thu, 27 Apr 2017 16:10:26 -0700, George Herold wrote:

snipping some previous stuff

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.

Hmm this was only a half baked idea. But what do I pulse?
I mostly step the setpoint, and look at the error signal. But this gives
me a sharp edge... So do I have to change the load?
put a pulse of heat into my plate?

I'm not sure about all your subtractions. I think that if I just do a
pulse that is much shorter than all the times in the system, then I can
ignore the pulse FFT... it's a delta function.

(I'll give that a try today... it's Friday I get to have some fun. :^)

If you can keep things at a reasonable temperature, do it open loop.

Huh, so sine waves (of power) (with some DC offset) into my heater
and just measure the temperature as a function of time?
The problem with a narrow pulse is that you'll get a small signal, and
hence a low SNR on your measurement. You can fix that by averaging --
but by the time you average a bunch of narrow pulses, do all the math,
etc., you've done _more_ work than doing a swept-sine measurement, and
have more questionable results.

Listen to Dr. Phil on this one (since he's saying the same thing as
me...).
I always listen to Phil.

If you're doing this for students, you should equip the thing for the
various measurements needed for formal system ID -- you should NOT just
be teaching Z-N plus seat-of-the-pants tuning!
Grin well we teach what we know.... There's much more for the kids to do
so this is just a small part. It doesn't have to be a "great tune".

George H.

--
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
 
On Friday, April 28, 2017 at 11:08:49 AM UTC-4, Phil Hobbs wrote:
On 04/25/2017 08:02 PM, 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.)

Not difficult, just too telegraphic. You replace the factor of
1/j omega f tau_I

with

1/(tau_leak/tau_i + j omega f tau_i),

so the gain maxes out and Delta-T decays exponentially when the heater
is turned off, instead of just sitting there the way it would if it were
really an integrator.

The heat leak isn't usually too relevant out at the unity gain cross,
because if the ratio isn't pretty big you won't have good thermal
control anyway.


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.)

I usually like thermal loops to be a bit better damped than that, to
avoid surprises if something in the plant drifts a bit.

Right, I guess I'm more conservative now too. I had some
TEC's in a loop that got too "ringy" in production.
(I never figured out if it was the TEC's, how hard they were clamped,
or something else... doesn't matter now.)

George H.

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 11:48:20 AM UTC-4, Phil Hobbs wrote:
On 04/28/2017 11:38 AM, George Herold wrote:
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.
Right I did the step response like that... here's the link again.
https://www.dropbox.com/s/jt3sxdyw0nugbcn/Step-response.BMP?dl=0

I've got 'scope shots for longer times, but it looks like a single RC.
(I run out of 'scope time base for weak links.)

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.
Grin.. no offense Phil, but I often feel like you're three steps ahead of
me. you're running around and I'm still trying to figure out how to stand
up and not fall over. I want the "Junior" Phil Hobbs book.
(The Junior comes about 'cause back in grad school, I was studying Thermo
on my own. I had Reif's classic on Thermo, but I really liked the thermo
book that he did for the Berkeley Series. We called it Reif Jr.
just my speed.)

George H.
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 Fri, 28 Apr 2017 08:57:02 -0700, George Herold wrote:

On Friday, April 28, 2017 at 11:13:17 AM UTC-4, Tim Wescott wrote:
On Fri, 28 Apr 2017 06:23:45 -0700, George Herold wrote:

On Thursday, April 27, 2017 at 7:45:30 PM UTC-4, Tim Wescott wrote:
On Thu, 27 Apr 2017 16:10:26 -0700, George Herold wrote:

snipping some previous stuff

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.

Hmm this was only a half baked idea. But what do I pulse?
I mostly step the setpoint, and look at the error signal. But this
gives me a sharp edge... So do I have to change the load?
put a pulse of heat into my plate?

I'm not sure about all your subtractions. I think that if I just do
a pulse that is much shorter than all the times in the system, then I
can ignore the pulse FFT... it's a delta function.

(I'll give that a try today... it's Friday I get to have some fun.
:^)

If you can keep things at a reasonable temperature, do it open loop.

Huh, so sine waves (of power) (with some DC offset) into my heater and
just measure the temperature as a function of time?

As long as the temperature isn't getting out of hand, yes.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

I'm looking for work -- see my website!
 
On Friday, April 28, 2017 at 12:30:27 PM UTC-4, Tim Wescott wrote:
On Fri, 28 Apr 2017 08:57:02 -0700, George Herold wrote:

On Friday, April 28, 2017 at 11:13:17 AM UTC-4, Tim Wescott wrote:
On Fri, 28 Apr 2017 06:23:45 -0700, George Herold wrote:

On Thursday, April 27, 2017 at 7:45:30 PM UTC-4, Tim Wescott wrote:
On Thu, 27 Apr 2017 16:10:26 -0700, George Herold wrote:

snipping some previous stuff

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.

Hmm this was only a half baked idea. But what do I pulse?
I mostly step the setpoint, and look at the error signal. But this
gives me a sharp edge... So do I have to change the load?
put a pulse of heat into my plate?

I'm not sure about all your subtractions. I think that if I just do
a pulse that is much shorter than all the times in the system, then I
can ignore the pulse FFT... it's a delta function.

(I'll give that a try today... it's Friday I get to have some fun.
:^)

If you can keep things at a reasonable temperature, do it open loop.

Huh, so sine waves (of power) (with some DC offset) into my heater and
just measure the temperature as a function of time?

As long as the temperature isn't getting out of hand, yes.

OK that's easy. I want to add an input (back panel) that will let
people look at the step response. Since that will also allow them to
do a sine wave response also, I'm going to mark that down as, "giving
them the tools to characterize the system." :^)

George H.
--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

I'm looking for work -- see my website!
 
On Fri, 28 Apr 2017 08:38:18 -0700, George Herold wrote:

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?

If you just want to characterize the plant, then you drive the heater and
measure the temperature.

The classic way to equip a circuit for a control systems analyzer is to
scatter a few summing junctions around (like in the article). Put the
output over the return, and you have the loop gain. Put the return over
the analyzer drive, and you have the loop response. Put the output over
the analyzer drive, and you have the loop sensitivity. Or drive where
convenient, and look at the actual command to the driver (heater in your
case) and the return from the measured process variable (temperature in
your case), and you have the plant transfer function.

--
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
 
 I want the "Junior" Phil Hobbs book.  
(The Junior comes
about 'cause back in grad school, I was studying Thermo
on my own.  I had Reif's classic on Thermo, but I really liked the thermo
book that he did for the Berkeley Series.  We called it Reif Jr.  
just my speed.)

Kudos to him for making the effort to do that.

I just signed the contract for BEOS's third edition. I'm planning to shop the new book around once I make some more progress on it, due to, um, differences of opinion on the reasonableness of a few of the terms.

One of the reasons I have to write concisely is that it covers a fairly broad range of topics, and the proverbial "a mile wide and an inch deep" approach is pretty well useless.

The closest thing I know of is Mark Johnson's "Photodetection and Measurement". It's a great introductory book that covers maybe 20% of the topics.

Cheers

Phil Hobbs
 
On Tuesday, May 2, 2017 at 6:35:56 PM UTC-4, Phil Hobbs wrote:
 I want the "Junior" Phil Hobbs book.  
(The Junior comes
about 'cause back in grad school, I was studying Thermo
on my own.  I had Reif's classic on Thermo, but I really liked the thermo
book that he did for the Berkeley Series.  We called it Reif Jr.  
just my speed.)

Kudos to him for making the effort to do that.

I just signed the contract for BEOS's third edition. I'm planning to shop the new book around once I make some more progress on it, due to, um, differences of opinion on the reasonableness of a few of the terms.

One of the reasons I have to write concisely is that it covers a fairly broad range of topics, and the proverbial "a mile wide and an inch deep" approach is pretty well useless.

The closest thing I know of is Mark Johnson's "Photodetection and Measurement". It's a great introductory book that covers maybe 20% of the topics.
Yeah that's a nice book. I wasn't really serious about Hobbs Jr.
You do tend to drill down deep into a subject. (which is a good thing.)
But if I'm not at your starting depth, then I've gotta back up and
dig out your references on the subject... etc...


I never bought the 2nd ed. of BEOS, (maybe the second hand price will come
down when you release the 3rd. :^) How much do you expect to be
newer, updated stuff in the 3rd? (Maybe I can spring for it.)

Hey you also mumbled about a "twenty projects" book. Is that still in the
works?

George H.

Cheers

Phil Hobbs
 
On 05/03/2017 09:18 AM, George Herold wrote:
On Tuesday, May 2, 2017 at 6:35:56 PM UTC-4, Phil Hobbs wrote:
I want the "Junior" Phil Hobbs book.
(The Junior comes
about 'cause back in grad school, I was studying Thermo
on my own. I had Reif's classic on Thermo, but I really liked the thermo
book that he did for the Berkeley Series. We called it Reif Jr.
just my speed.)

Kudos to him for making the effort to do that.

I just signed the contract for BEOS's third edition. I'm planning to shop the new book around once I make some more progress on it, due to, um, differences of opinion on the reasonableness of a few of the terms.

One of the reasons I have to write concisely is that it covers a fairly broad range of topics, and the proverbial "a mile wide and an inch deep" approach is pretty well useless.

The closest thing I know of is Mark Johnson's "Photodetection and Measurement". It's a great introductory book that covers maybe 20% of the topics.
Yeah that's a nice book. I wasn't really serious about Hobbs Jr.
You do tend to drill down deep into a subject. (which is a good thing.)
But if I'm not at your starting depth, then I've gotta back up and
dig out your references on the subject... etc...


I never bought the 2nd ed. of BEOS, (maybe the second hand price will come
down when you release the 3rd. :^) How much do you expect to be
newer, updated stuff in the 3rd? (Maybe I can spring for it.)

The draft third edition is revised throughout, and has probably 50-75
pages of new stuff. It'll be out in a year or so, God willing. The
second edition had about 100 pages more than the first, but Wiley shrunk
the font and the margins, so it doesn't look like as much as it is.

Hey you also mumbled about a "twenty projects" book. Is that still in the
works?

That's the new one that I couldn't get acceptable contract terms on from
W. (They insist on being indemnified, and it's not your father's
indemnity clause, either.)

To send it to another publisher, I need to have more to show than I do
at the moment.

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 Wednesday, May 3, 2017 at 2:26:46 PM UTC-4, Phil Hobbs wrote:
On 05/03/2017 09:18 AM, George Herold wrote:
On Tuesday, May 2, 2017 at 6:35:56 PM UTC-4, Phil Hobbs wrote:
I want the "Junior" Phil Hobbs book.
(The Junior comes
about 'cause back in grad school, I was studying Thermo
on my own. I had Reif's classic on Thermo, but I really liked the thermo
book that he did for the Berkeley Series. We called it Reif Jr.
just my speed.)

Kudos to him for making the effort to do that.

I just signed the contract for BEOS's third edition. I'm planning to shop the new book around once I make some more progress on it, due to, um, differences of opinion on the reasonableness of a few of the terms.

One of the reasons I have to write concisely is that it covers a fairly broad range of topics, and the proverbial "a mile wide and an inch deep" approach is pretty well useless.

The closest thing I know of is Mark Johnson's "Photodetection and Measurement". It's a great introductory book that covers maybe 20% of the topics.
Yeah that's a nice book. I wasn't really serious about Hobbs Jr.
You do tend to drill down deep into a subject. (which is a good thing.)
But if I'm not at your starting depth, then I've gotta back up and
dig out your references on the subject... etc...


I never bought the 2nd ed. of BEOS, (maybe the second hand price will come
down when you release the 3rd. :^) How much do you expect to be
newer, updated stuff in the 3rd? (Maybe I can spring for it.)

The draft third edition is revised throughout, and has probably 50-75
pages of new stuff. It'll be out in a year or so, God willing. The
second edition had about 100 pages more than the first, but Wiley shrunk
the font and the margins, so it doesn't look like as much as it is.


Hey you also mumbled about a "twenty projects" book. Is that still in the
works?

That's the new one that I couldn't get acceptable contract terms on from
W. (They insist on being indemnified, and it's not your father's
indemnity clause, either.)

Imdemnity, meaning if someone blasts their eye out with a laser 'because' of
your book they want you to be on the hook?

George H.
To send it to another publisher, I need to have more to show than I do
at the moment.

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
 
Imdemnity, meaning if someone blasts their eye out with a laser 'because' of
your book they want you to be on the hook?

That's your common or garden indemnity. This one is even uglier. Their lawyer argued with me for half an hour on the phone before finally admitting she didn't have the authority to change it, so I walked.

Cheers

Phil Hobbs
 
On Wed, 03 May 2017 12:42:49 -0700, Phil Hobbs wrote:

Imdemnity, meaning if someone blasts their eye out with a laser
'because' of your book they want you to be on the hook?

That's your common or garden indemnity. This one is even uglier. Their
lawyer argued with me for half an hour on the phone before finally
admitting she didn't have the authority to change it, so I walked.

Cheers

Phil Hobbs

That's nuts.

Quote from _my_ lawyer "Indemnity means insurance. You're not an
insurance company, Tim". Nuff said.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

I'm looking for work -- see my website!
 
On 05/03/2017 11:12 PM, Tim Wescott wrote:
On Wed, 03 May 2017 12:42:49 -0700, Phil Hobbs wrote:

Imdemnity, meaning if someone blasts their eye out with a laser
'because' of your book they want you to be on the hook?

That's your common or garden indemnity. This one is even uglier. Their
lawyer argued with me for half an hour on the phone before finally
admitting she didn't have the authority to change it, so I walked.


That's nuts.

Quote from _my_ lawyer "Indemnity means insurance. You're not an
insurance company, Tim". Nuff said.

Yup. I don't grant indemnities, but 've insisted on receiving them
sometimes, when I'm building something that's dangerous in unskilled
hands. Once was when I was building a proto that weighed about 40
pounds and emitted a 1-W YAG laser beam (1.064 um in the near IR),
focused about 2 feet outside the box. I could just picture somebody
damaging an eye or dropping it on his foot, filing a worker's comp
claim, and then their insurance company coming after me.

The client was amenable when I explained that I wasn't looking for a
get-out-of-jail-free card, just the same level of liability protection
that their regular employees had. That project went dormant for a year
or so but may be coming back to life.

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 Wednesday, May 3, 2017 at 3:42:55 PM UTC-4, Phil Hobbs wrote:
Imdemnity, meaning if someone blasts their eye out with a laser 'because' of
your book they want you to be on the hook?

That's your common or garden indemnity. This one is even uglier. Their lawyer argued with me for half an hour on the phone before finally admitting she didn't have the authority to change it, so I walked.

I'm not sure how it could be uglier, but maybe you can't talk about it.

Way back when someone came to us with a kinda nice diode pumped Q-switched
laser.. (lased green). He had a few experiments to hang on the end,
but mostly it would be about how the laser worked. But the power was
just to scary for us to put into a student lab. (I can't remember the numbers.)

George H.

Cheers

Phil Hobbs
 
That's your common or garden indemnity. This one is even uglier.
Their lawyer argued with me for half an hour on the phone before
finally admitting she didn't have the authority to change it, so I walked..

I'm not sure how it could be uglier, but maybe you can't talk about it.  

Another nice fishhook was that they could handle the case any way they chose, including unlimited authority to settle using my money, without my having any input.

Cheers

Phil Hobbs
 
On Thursday, May 4, 2017 at 2:14:28 PM UTC-4, Phil Hobbs wrote:
That's your common or garden indemnity. This one is even uglier.
Their lawyer argued with me for half an hour on the phone before
finally admitting she didn't have the authority to change it, so I walked.

I'm not sure how it could be uglier, but maybe you can't talk about it.  

Another nice fishhook was that they could handle the case any way they chose, including unlimited authority to settle using my money, without my having any input.

Oh nice, and I assume that isn't just money they owe you for royalties,
but your house and car too. (Or your business if you have a LLC)

Do people sue publishers regularly? To see it from their side, I'm
guessing they don't make a lot of money from one of your books.
(Doesn't sell like AoE3.)

George h.

Cheers

Phil Hobbs
 
On 05/04/2017 03:59 PM, George Herold wrote:
On Thursday, May 4, 2017 at 2:14:28 PM UTC-4, Phil Hobbs wrote:
That's your common or garden indemnity. This one is even uglier.
Their lawyer argued with me for half an hour on the phone before
finally admitting she didn't have the authority to change it, so I walked.

I'm not sure how it could be uglier, but maybe you can't talk about it.

Another nice fishhook was that they could handle the case any way they chose, including unlimited authority to settle using my money, without my having any input.

Oh nice, and I assume that isn't just money they owe you for royalties,
but your house and car too. (Or your business if you have a LLC)

Do people sue publishers regularly? To see it from their side, I'm
guessing they don't make a lot of money from one of your books.
(Doesn't sell like AoE3.)

Well, there's libel and plagiarism, plus things like publishing
somebody's IP when you're under NDA.

There's never been a claim lodged against BEOS in the 17 years it's been
out, which is why I'm not too worried about that one, but the new book
will have a lot of stuff from consulting gigs. Of course I'm going to
run each section past the relevant customer before publishing it. My
primary threat model is Customer B reading Customer A's section and
thinking that I'm blabbing B's IP, but it could be just somebody with a
lot of money who doesn't like me. (Fortunately I know of none such, but
one never can tell.)

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
 

Welcome to EDABoard.com

Sponsor

Back
Top