Lead-Lag versus PID

"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c967lv$t30$1@hood.uits.indiana.edu...
[snip cos its long]
a balanced three-phase power system can be converted to an equivalent
2-phase (quadrature) system - because the angles between the three phases
are constant, the 3-phase system is over-determined. This quadrature
system
is really just a cartesian representation of a vector rotating at the
angular frequency w = 2pi*50Hz (60Hz), V = Vpeak*e^(jwt). This is a real
pain to control. If I multiply it by e^(-jw1t), and w1 = w then the
e^(jwt)
disappears - in other words, if my controller co-ordinate system rotates
at
the same speed as the vector, the vector looks stationary.

That seems quite clever. Linearizing the system? Seems almost more like
physicist talk than engineering talk.
As an engineer, I'm not proud - I'll use anything that helps me get the job
done - even an idea from someone I despise :)

If my controller
co-ordinates are aligned to the vector, then one axis of my rotating
coordinate system (by definition) is zero. So I measure the three-phase
ac
supply, convert to two-phase (just a scalar transformation as the angles
are
0 and +/- 120 degrees, so numbers like 1/sqrt(3) pop up) then do a vector
rotation e^(-jtheta) (theta = w1t) to get Vd, Vq. If w1 = w then Vd = 0,
so
I PI-control Vd with a setpoint of zero. The output of my PI controller
is
w1, which I integrate to get theta. Regardless of what w1, theta start
out
as, the PI controller rapidly forces w1 = w, and theta = wt. So even
though
the system was "non-linear" (ie riddled with sin(x)) my linear controller
works beautifully. And the PI controller, in conjunction with the theta
integrator, did a great job of regulating out my ratshit sin(theta) calc
(used in the e^(-jw1t) vector rotation).

This is in fact a PLL, but its kind of hiding in the maths. If my Vd
setpoint is non-zero, I can dial up any arbitrary phase angle between me
and
the national grid - this is how active power factor compensators work
nowadays.

Its kind of a fancy digital stroboscope :)
[ditto snip]

Seems more true to a modularity philosophy, too. I don't actually have
anything built into the loop that depends on voltages and things, but
my
control parameters are set that way. So I might have a gain of 10^6
that
relates an error signal of nanovolts to an output signal of volts. And
every time some little thing changes, the run parameters have to
change.


*CLONK* - the sound of a nail being hit squarely on the head.
non-normalised
systems are generally a pain in the arse for this reason :}

Heh! I've learned enough now that I can calculate corrections for some
things. The temperature is measured by an AC bridge with the thermometer
and reference resistor at the cold end, and a ratio transformer at the
other. The run temperature is determined by setting the transformer. But
the ratio^2 figures into dV/dT, so that also changes the gain of my
sensor. But changes it predictably, so I think I can save some work from
that, at least.
--
"Things should be made as simple as possible -- but no simpler."
-- Albert Einstein
the poncy control term is "gain scheduling." You just need to check the
gain-to-output transfer function(s) to ensure a step change in gain doesnt
do anything nasty (usually its OK, but stuff you dont check always bites
you - just ask NASA). I have done quite a bit of gain scheduling. I have
also applied first-order thermal models to predictively model changes in
resistance of filter inductors etc - which is really just another form of
gain scheduling. It all boils down to my earlier comment - giving your
controller as much help as possible.

The great thing about varying such parameters is that it doesnt matter if
you dont get it quite right - the controller treats it as a disturbance, and
will regulate around it. Just dont get it too wrong!

Cheers
Terry

PS I didnt learn jack shit about control loops at uni (incl. ME control
papers). I learned from building them, screwing them up and fixing them. And
from smart people who had already made a lot of mistakes.
 
Terry Given wrote:

"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c95fdp$ltu$1@hood.uits.indiana.edu...

-- snip --

FIR is "Finite Impulse Response"; a successive averaging filter is a
very simple FIR filter. 1st-order lowpass is something like (1-d)/(z-d)
(and IIR, or "Infinite Impulse Response").

Finite impulse response must be what happens when, well, you introduce a
finite impulse to the system?

We have frequency response, what the system does when a continuous, pure
frequency is input. Step response, what happens when you change the
setpoint and leave it there. And finite impulse response, which is what
happens when you kick it.



FIR: output = weighted sum of past and present INPUTS
Akin to posting "what size resistor do I need on my LMxyz to make it
ping after nn milliseconds".
IIR: output = weighted sum of past and present (NPUTS and OUTPUTS)
Akin to posting "so and so is a such and such, and he couldn't make an
LMxyz ping if his life depended on it".
with a n-step FIR, the response to an impulse disappears after N steps - it
is FINITE

with an IIR, the response to an impulse *never* disappears, as it keeps
getting fed back from the output - it is INFINITE. Actually if the output
weighting terms are < 1, the response does eventually disappear, but only
due to quantisation.

In practice (almost) All controllers use IIR filters - they will give much
better attenuation than FIR filters (using the same amount of "taps"). FIR
used to be more of a joke than useful, as a decent rolloff with an FIR
filter needed many, many taps. Then Moore's law saved FIR from the dustbin -
transistors are cheap. who cares if we need 512 flip-flops to implement a
filter, my FPGA has 20,000 of the damn things... :)

FIR filters are usually used in audio - an FIR with an even number of taps
has a linear phase characteristic. FIR filters are also "harder" to design
than IIR filters

IIR filters are commonly used to convert analogue filters into the digital
domain (handle cranking) using backward-difference or bilinear transforms. I
posted a JPEG on a.b.s.e (title: software control of flyback converters) a
whilke back you should look at - it compares BD and BLT IIR first-order
filters with an RC filter, using a network analyser. very interesting - the
BD IIR phase response was utter shit.

Its also pretty straightforward to do all design strictly in the Z-domain
(eh Tim?)

Indeed -- but I think we covered that already.


-- snip --
--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:10bdivrcv2189f9@corp.supernews.com...
[snip]
FIR: output = weighted sum of past and present INPUTS

Akin to posting "what size resistor do I need on my LMxyz to make it
ping after nn milliseconds".

IIR: output = weighted sum of past and present (NPUTS and OUTPUTS)

Akin to posting "so and so is a such and such, and he couldn't make an
LMxyz ping if his life depended on it".
nonsense. It is quite clear from Gregory's posts that he wasnt sure of the
difference between FIR and IIR. Expanding the abbreviation is hardly going
to help, although a smart person can kind of figure it out (as he did)

with a n-step FIR, the response to an impulse disappears after N steps -
it
is FINITE

with an IIR, the response to an impulse *never* disappears, as it keeps
getting fed back from the output - it is INFINITE. Actually if the
output
weighting terms are < 1, the response does eventually disappear, but
only
due to quantisation.
and this bit IMO accurately describes the difference between FIR and IIR.

where did I say something like "and he couldn't make an LMxyz ping if his
life depended on it"? NOWHERE. AFAICR I have not posted such a comment.

If you are going to invent stuff like that (creative reading comprehension?)
why stop there?

So far I have been interested in your erudite comments. Had I not read your
earlier posts, I would have concluded from this post that you are a fool who
cannot read. Which is clearly not the case, so what gives? I expected
someone to point out that feedback gains >= 1 make oscillators, but this is
just odd.

Cheers
Terry
 
In article <F6vtc.11023$XI4.397452@news.xtra.co.nz>,
Terry Given <the_domes@xtra.co.nz> wrote:
"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c95fdp$ltu$1@hood.uits.indiana.edu...
In article <10bc22sog9kna0b@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:


FIR is "Finite Impulse Response"; a successive averaging filter is a
very simple FIR filter. 1st-order lowpass is something like (1-d)/(z-d)
(and IIR, or "Infinite Impulse Response").

Finite impulse response must be what happens when, well, you introduce a
finite impulse to the system?

We have frequency response, what the system does when a continuous, pure
frequency is input. Step response, what happens when you change the
setpoint and leave it there. And finite impulse response, which is what
happens when you kick it.


FIR: output = weighted sum of past and present INPUTS

IIR: output = weighted sum of past and present (NPUTS and OUTPUTS)
Infinite Impulse Response?

with a n-step FIR, the response to an impulse disappears after N steps - it
is FINITE

with an IIR, the response to an impulse *never* disappears, as it keeps
getting fed back from the output - it is INFINITE. Actually if the output
weighting terms are < 1, the response does eventually disappear, but only
due to quantisation.
That looks like a condition for a geometric series to converge.

In practice (almost) All controllers use IIR filters - they will give much
better attenuation than FIR filters (using the same amount of "taps"). FIR
used to be more of a joke than useful, as a decent rolloff with an FIR
filter needed many, many taps. Then Moore's law saved FIR from the dustbin -
transistors are cheap. who cares if we need 512 flip-flops to implement a
filter, my FPGA has 20,000 of the damn things... :)

FIR filters are usually used in audio - an FIR with an even number of taps
has a linear phase characteristic. FIR filters are also "harder" to design
than IIR filters
What that means to me is that, given some inputs e[k] and outputs u[k], an
IIR filter would be

u[k] = u[k] + a*u[k-1]

which expands to

u[k] = u[k] + a*u[k-1} + a^2*u[k-2] + a^3*u[k-3] + ...

and will eventually terminate when a^n*u[k-n] is so small it can't be
added to u[k], but that depends on the precision you're working with.
And an FIR would be

u[k] = (e[k] + e[k-1] + e[k-2] + e[k-3]) / 4

Or a weighted average if you like, but just something like that.

It's hard to imagine an analog version of that last one.
--
"We don't grow up hearing stories around the camp fire anymore about
cultural figures. Instead we get them from books, TV or movies, so the
characters that today provide us a common language are corporate
creatures" -- Rebecca Tushnet
 
Terry Given wrote:
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:10bdivrcv2189f9@corp.supernews.com...
[snip]

FIR: output = weighted sum of past and present INPUTS

Akin to posting "what size resistor do I need on my LMxyz to make it
ping after nn milliseconds".

IIR: output = weighted sum of past and present (NPUTS and OUTPUTS)

Akin to posting "so and so is a such and such, and he couldn't make an
LMxyz ping if his life depended on it".


nonsense. It is quite clear from Gregory's posts that he wasnt sure of the
difference between FIR and IIR. Expanding the abbreviation is hardly going
to help, although a smart person can kind of figure it out (as he did)


with a n-step FIR, the response to an impulse disappears after N steps -

it

is FINITE

with an IIR, the response to an impulse *never* disappears, as it keeps
getting fed back from the output - it is INFINITE. Actually if the

output

weighting terms are < 1, the response does eventually disappear, but

only

due to quantisation.



and this bit IMO accurately describes the difference between FIR and IIR.

where did I say something like "and he couldn't make an LMxyz ping if his
life depended on it"? NOWHERE. AFAICR I have not posted such a comment.

If you are going to invent stuff like that (creative reading comprehension?)
why stop there?

So far I have been interested in your erudite comments. Had I not read your
earlier posts, I would have concluded from this post that you are a fool who
cannot read. Which is clearly not the case, so what gives? I expected
someone to point out that feedback gains >= 1 make oscillators, but this is
just odd.

Cheers
Terry
Oh, you misconstrued my example! Your descriptions are good, I was just
elucidating them with a more visceral example.

If you post "what resistor, etc.", you get from one to five replies, at
least one of which will solve your problem, everyone goes away happy,
and the thread ends -- the response is finite.

If you post "so and so is a, etc.", the replies just keep coming and
coming and coming -- the response is infinite (or seems to be).

I just hate it when humor falls flat. Sorry if I raised hackles when I
wanted to raise a chuckle.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
Gregory L. Hansen wrote:

In article <F6vtc.11023$XI4.397452@news.xtra.co.nz>,
Terry Given <the_domes@xtra.co.nz> wrote:

"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c95fdp$ltu$1@hood.uits.indiana.edu...

In article <10bc22sog9kna0b@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:


FIR is "Finite Impulse Response"; a successive averaging filter is a
very simple FIR filter. 1st-order lowpass is something like (1-d)/(z-d)
(and IIR, or "Infinite Impulse Response").

Finite impulse response must be what happens when, well, you introduce a
finite impulse to the system?

We have frequency response, what the system does when a continuous, pure
frequency is input. Step response, what happens when you change the
setpoint and leave it there. And finite impulse response, which is what
happens when you kick it.


FIR: output = weighted sum of past and present INPUTS

IIR: output = weighted sum of past and present (NPUTS and OUTPUTS)


Infinite Impulse Response?


with a n-step FIR, the response to an impulse disappears after N steps - it
is FINITE

with an IIR, the response to an impulse *never* disappears, as it keeps
getting fed back from the output - it is INFINITE. Actually if the output
weighting terms are < 1, the response does eventually disappear, but only
due to quantisation.


That looks like a condition for a geometric series to converge.


In practice (almost) All controllers use IIR filters - they will give much
better attenuation than FIR filters (using the same amount of "taps"). FIR
used to be more of a joke than useful, as a decent rolloff with an FIR
filter needed many, many taps. Then Moore's law saved FIR from the dustbin -
transistors are cheap. who cares if we need 512 flip-flops to implement a
filter, my FPGA has 20,000 of the damn things... :)

FIR filters are usually used in audio - an FIR with an even number of taps
has a linear phase characteristic. FIR filters are also "harder" to design
than IIR filters


What that means to me is that, given some inputs e[k] and outputs u[k], an
IIR filter would be

u[k] = u[k] + a*u[k-1]

which expands to

u[k] = u[k] + a*u[k-1} + a^2*u[k-2] + a^3*u[k-3] + ...

and will eventually terminate when a^n*u[k-n] is so small it can't be
added to u[k], but that depends on the precision you're working with.
And an FIR would be

u[k] = (e[k] + e[k-1] + e[k-2] + e[k-3]) / 4

Or a weighted average if you like, but just something like that.

It's hard to imagine an analog version of that last one.
Yes, you've got the concept.

Surface-acoustic-wave devices and tapped transmission lines have been
used to generate analog FIR filters (mostly for radar applications), but
you have to be highly motivated to want to do it.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:10belupjtp83obe@corp.supernews.com...
Terry Given wrote:
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:10bdivrcv2189f9@corp.supernews.com...
[snip]

FIR: output = weighted sum of past and present INPUTS

Akin to posting "what size resistor do I need on my LMxyz to make it
ping after nn milliseconds".

IIR: output = weighted sum of past and present (NPUTS and OUTPUTS)

Akin to posting "so and so is a such and such, and he couldn't make an
LMxyz ping if his life depended on it".


nonsense. It is quite clear from Gregory's posts that he wasnt sure of
the
difference between FIR and IIR. Expanding the abbreviation is hardly
going
to help, although a smart person can kind of figure it out (as he did)


with a n-step FIR, the response to an impulse disappears after N
steps -

it

is FINITE

with an IIR, the response to an impulse *never* disappears, as it keeps
getting fed back from the output - it is INFINITE. Actually if the

output

weighting terms are < 1, the response does eventually disappear, but

only

due to quantisation.



and this bit IMO accurately describes the difference between FIR and
IIR.

where did I say something like "and he couldn't make an LMxyz ping if
his
life depended on it"? NOWHERE. AFAICR I have not posted such a comment.

If you are going to invent stuff like that (creative reading
comprehension?)
why stop there?

So far I have been interested in your erudite comments. Had I not read
your
earlier posts, I would have concluded from this post that you are a fool
who
cannot read. Which is clearly not the case, so what gives? I expected
someone to point out that feedback gains >= 1 make oscillators, but this
is
just odd.

Cheers
Terry



Oh, you misconstrued my example! Your descriptions are good, I was just
elucidating them with a more visceral example.

If you post "what resistor, etc.", you get from one to five replies, at
least one of which will solve your problem, everyone goes away happy,
and the thread ends -- the response is finite.

If you post "so and so is a, etc.", the replies just keep coming and
coming and coming -- the response is infinite (or seems to be).

I just hate it when humor falls flat. Sorry if I raised hackles when I
wanted to raise a chuckle.

--

Tim Wescott
duh. It makes sense now (sound of 20-20 hindsight kicking into top gear). I
have a variety of excuses, none flattering :). The funny part is its really
funny :)

EGITLOL

Cheers
Terry
 
In article <Tp9tc.10577$XI4.382936@news.xtra.co.nz>,
Terry Given <the_domes@xtra.co.nz> wrote:
"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c92b3q$iju$1@hood.uits.indiana.edu...

My error signal is proportional to the deviation of the temperature from
the set-point, but the change in temperature is proportional to power,
V^2/R. We take the square root of the PID calculation to linearize the
output, sqrt(vout)^2/R. I was thinking of squaring the input before I run
through my PID routine, so the calculation itself is in terms of power
rather than temperature, but I don't know whether that's clever or a
mistake.


I have seen a number of regen rectifier control papers where they do exactly
that - instead of the error amp measuring (Vdc* - Vdc) (*=setpoint) they
measure (Vdc*^2 - Vdc^2) to actually "linearise" the loop - more correctly
they are taking the non-linearity outside of the controller - and it works
because they really want to control power (hey, just like you :)
Okay, here's a question. How do I represent the taking of squares and
square roots in the middle of a control loop? What's a transfer function
in the s or z domain for "square root of input"? Does that take me out of
the linear theory?
--
"Experiments are the only means of knowledge at our disposal. The rest is
poetry, imagination." -- Max Planck
 
Gregory L. Hansen wrote:
In article <Tp9tc.10577$XI4.382936@news.xtra.co.nz>,
Terry Given <the_domes@xtra.co.nz> wrote:

"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c92b3q$iju$1@hood.uits.indiana.edu...


My error signal is proportional to the deviation of the temperature from
the set-point, but the change in temperature is proportional to power,
V^2/R. We take the square root of the PID calculation to linearize the
output, sqrt(vout)^2/R. I was thinking of squaring the input before I run
through my PID routine, so the calculation itself is in terms of power
rather than temperature, but I don't know whether that's clever or a
mistake.


I have seen a number of regen rectifier control papers where they do exactly
that - instead of the error amp measuring (Vdc* - Vdc) (*=setpoint) they
measure (Vdc*^2 - Vdc^2) to actually "linearise" the loop - more correctly
they are taking the non-linearity outside of the controller - and it works
because they really want to control power (hey, just like you :)


Okay, here's a question. How do I represent the taking of squares and
square roots in the middle of a control loop? What's a transfer function
in the s or z domain for "square root of input"? Does that take me out of
the linear theory?
Ordinarily it takes you right out -- but with your heat output being
proportional to drive squared you were already out, and taking the
square root (in the right place) puts you right back in.

The classic definition for a linear system is one that satisfies the
following statement:

"A system is linear if and only if for a pair of arbitrary inputs x_1(t)
and x_2(t) that generate system responses y_1(t) and y_2(t), and for a
pair of arbitrary constants a_1 and a_2, the system response to x(t) =
a_1*x_1(t) + a_2*x_2(t) is equal to y(t) = a_1*y_1(t) + a_2*y_2(t)".

If you can get through this without your brain fogging over it actually
makes very good sense, and is very useful.

For example, since you know that sqrt(x_1 + x_2) != sqrt(x_1) +
sqrt(x_2) you know that you're playing with nonlinearities. But with
your system you already have a subsystem where y(t) = x(t)^2, so you
know it isn't linear as it is. If, however, you restrict your drive to
positive numbers and put in your square root then y(t) = (sqrt(x(t))^2 =
x(t). This means that by putting the square root in there you're making
the system much more linear.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
In article <10bhg8crk1btv07@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:
Gregory L. Hansen wrote:
In article <Tp9tc.10577$XI4.382936@news.xtra.co.nz>,
Terry Given <the_domes@xtra.co.nz> wrote:

"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c92b3q$iju$1@hood.uits.indiana.edu...


My error signal is proportional to the deviation of the temperature from
the set-point, but the change in temperature is proportional to power,
V^2/R. We take the square root of the PID calculation to linearize the
output, sqrt(vout)^2/R. I was thinking of squaring the input before I run
through my PID routine, so the calculation itself is in terms of power
rather than temperature, but I don't know whether that's clever or a
mistake.


I have seen a number of regen rectifier control papers where they do exactly
that - instead of the error amp measuring (Vdc* - Vdc) (*=setpoint) they
measure (Vdc*^2 - Vdc^2) to actually "linearise" the loop - more correctly
they are taking the non-linearity outside of the controller - and it works
because they really want to control power (hey, just like you :)


Okay, here's a question. How do I represent the taking of squares and
square roots in the middle of a control loop? What's a transfer function
in the s or z domain for "square root of input"? Does that take me out of
the linear theory?

Ordinarily it takes you right out -- but with your heat output being
proportional to drive squared you were already out, and taking the
square root (in the right place) puts you right back in.

The classic definition for a linear system is one that satisfies the
following statement:

"A system is linear if and only if for a pair of arbitrary inputs x_1(t)
and x_2(t) that generate system responses y_1(t) and y_2(t), and for a
pair of arbitrary constants a_1 and a_2, the system response to x(t) =
a_1*x_1(t) + a_2*x_2(t) is equal to y(t) = a_1*y_1(t) + a_2*y_2(t)".

If you can get through this without your brain fogging over it actually
makes very good sense, and is very useful.

For example, since you know that sqrt(x_1 + x_2) != sqrt(x_1) +
sqrt(x_2) you know that you're playing with nonlinearities. But with
your system you already have a subsystem where y(t) = x(t)^2, so you
know it isn't linear as it is. If, however, you restrict your drive to
positive numbers and put in your square root then y(t) = (sqrt(x(t))^2 =
x(t). This means that by putting the square root in there you're making
the system much more linear.
I was trying to figure out how to write a transfer function for that.
After reading about all that linear control theory, I wanted to try doing
something with it. I tried finding a Laplace transform of f(t)^2 by
partial integration, but that didn't seem useful.

Will my first application require non-linear control theory?


--
"Are those morons getting dumber or just louder?" -- Mayor Quimby
 
Gregory L. Hansen wrote:
In article <10bhg8crk1btv07@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:

Gregory L. Hansen wrote:

In article <Tp9tc.10577$XI4.382936@news.xtra.co.nz>,
Terry Given <the_domes@xtra.co.nz> wrote:


"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c92b3q$iju$1@hood.uits.indiana.edu...


My error signal is proportional to the deviation of the temperature from
the set-point, but the change in temperature is proportional to power,
V^2/R. We take the square root of the PID calculation to linearize the
output, sqrt(vout)^2/R. I was thinking of squaring the input before I run
through my PID routine, so the calculation itself is in terms of power
rather than temperature, but I don't know whether that's clever or a
mistake.


I have seen a number of regen rectifier control papers where they do exactly
that - instead of the error amp measuring (Vdc* - Vdc) (*=setpoint) they
measure (Vdc*^2 - Vdc^2) to actually "linearise" the loop - more correctly
they are taking the non-linearity outside of the controller - and it works
because they really want to control power (hey, just like you :)


Okay, here's a question. How do I represent the taking of squares and
square roots in the middle of a control loop? What's a transfer function
in the s or z domain for "square root of input"? Does that take me out of
the linear theory?

Ordinarily it takes you right out -- but with your heat output being
proportional to drive squared you were already out, and taking the
square root (in the right place) puts you right back in.

The classic definition for a linear system is one that satisfies the
following statement:

"A system is linear if and only if for a pair of arbitrary inputs x_1(t)
and x_2(t) that generate system responses y_1(t) and y_2(t), and for a
pair of arbitrary constants a_1 and a_2, the system response to x(t) =
a_1*x_1(t) + a_2*x_2(t) is equal to y(t) = a_1*y_1(t) + a_2*y_2(t)".

If you can get through this without your brain fogging over it actually
makes very good sense, and is very useful.

For example, since you know that sqrt(x_1 + x_2) != sqrt(x_1) +
sqrt(x_2) you know that you're playing with nonlinearities. But with
your system you already have a subsystem where y(t) = x(t)^2, so you
know it isn't linear as it is. If, however, you restrict your drive to
positive numbers and put in your square root then y(t) = (sqrt(x(t))^2 =
x(t). This means that by putting the square root in there you're making
the system much more linear.


I was trying to figure out how to write a transfer function for that.
After reading about all that linear control theory, I wanted to try doing
something with it. I tried finding a Laplace transform of f(t)^2 by
partial integration, but that didn't seem useful.

Will my first application require non-linear control theory?
First do this simple mental exercise. Imagine a 100-ohm resistor. E =
IR, right? So with a current input the voltage is exactly equal to the
input times 100 ohms, right? Nothing could be more linear, right?

Now consider that it's a surface-mount resistor rated at 1/16th watt.
Imagine putting 100 volts on it. That's only 100 watts, so the resistor
ought to last for a millisecond or so before it overheats and puts extra
meaning in the phrase "letting the smoke out".

Now think of our nothing-could-be-more-linear 1/16th watt resistor --
it's beyond toast! y(A*x(t)) != A*y(x(t))! It ain't linear at all!

In fact, there are no real systems that are linear! Put too much
voltage on a vacuum and it'll rip the electrons right off of your probes
and flow current! Fix that problem and sooner or later (lots later)
it'll disassociate the virtual electron-positron pairs and make _real_
electrons and positrons! And flow current! So not even a perfect
vacuum is linear!

So yes, no matter who you are, or where, or what it is, your first
application will require that you deal with nonlinearities. In your
case, since you are taking the square root of your controller before
applying it to an actuator that has a near-perfect squaring effect, you
have a system that overall is about as close to linear as one could hope.

Buck up. Things could be much worse. You could be controlling motors
with gearboxes --
http://www.wescottdesign.com/articles/Friction/friction.html.

I think I need to go to the store now, for more exclamation marks ;-).

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
In article <10binmakk5a9r27@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:
Gregory L. Hansen wrote:
In article <10bhg8crk1btv07@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:

Gregory L. Hansen wrote:


Okay, here's a question. How do I represent the taking of squares and
square roots in the middle of a control loop? What's a transfer function
in the s or z domain for "square root of input"? Does that take me out of
the linear theory?

Ordinarily it takes you right out -- but with your heat output being
proportional to drive squared you were already out, and taking the
square root (in the right place) puts you right back in.

The classic definition for a linear system is one that satisfies the
following statement:

"A system is linear if and only if for a pair of arbitrary inputs x_1(t)
and x_2(t) that generate system responses y_1(t) and y_2(t), and for a
pair of arbitrary constants a_1 and a_2, the system response to x(t) =
a_1*x_1(t) + a_2*x_2(t) is equal to y(t) = a_1*y_1(t) + a_2*y_2(t)".

If you can get through this without your brain fogging over it actually
makes very good sense, and is very useful.

For example, since you know that sqrt(x_1 + x_2) != sqrt(x_1) +
sqrt(x_2) you know that you're playing with nonlinearities. But with
your system you already have a subsystem where y(t) = x(t)^2, so you
know it isn't linear as it is. If, however, you restrict your drive to
positive numbers and put in your square root then y(t) = (sqrt(x(t))^2 =
x(t). This means that by putting the square root in there you're making
the system much more linear.


I was trying to figure out how to write a transfer function for that.
After reading about all that linear control theory, I wanted to try doing
something with it. I tried finding a Laplace transform of f(t)^2 by
partial integration, but that didn't seem useful.

Will my first application require non-linear control theory?



First do this simple mental exercise. Imagine a 100-ohm resistor. E =
IR, right? So with a current input the voltage is exactly equal to the
input times 100 ohms, right? Nothing could be more linear, right?

Now consider that it's a surface-mount resistor rated at 1/16th watt.
Imagine putting 100 volts on it. That's only 100 watts, so the resistor
ought to last for a millisecond or so before it overheats and puts extra
meaning in the phrase "letting the smoke out".

Now think of our nothing-could-be-more-linear 1/16th watt resistor --
it's beyond toast! y(A*x(t)) != A*y(x(t))! It ain't linear at all!

In fact, there are no real systems that are linear! Put too much
voltage on a vacuum and it'll rip the electrons right off of your probes
and flow current! Fix that problem and sooner or later (lots later)
it'll disassociate the virtual electron-positron pairs and make _real_
electrons and positrons! And flow current! So not even a perfect
vacuum is linear!

So yes, no matter who you are, or where, or what it is, your first
application will require that you deal with nonlinearities. In your
case, since you are taking the square root of your controller before
applying it to an actuator that has a near-perfect squaring effect, you
have a system that overall is about as close to linear as one could hope.
But square roots aren't a linear operation. Maybe there's just something
elementary that I'm missing, but when I'm trying to model it, I don't see
how to make a transition from temperature error to change in power.

error dT
|
v
(P + Ds)/(1+Hs) + I/s PID loop with filter on prop. and deriv.
|
v
square root of previous step
|
v
a/(b+s) Plant changes temperature, assume first order for now
|
v
G/(1+Ts) lock-in turns temp error to voltage, low-pass filter
|
v
Loop to top.

Or, now that I think of it, maybe I'm just missing a step when I go from
the ADC to the resistor.

error dT
|
v
(P + Ds)/(1+Hs) + I/s PID loop with filter on prop. and deriv.
|
v
square root of previous step
|
v
resistor squares previous step
|
v
a/(b+s) Plant changes temperature, assume first order for now
|
v
G/(1+Ts) lock-in turns temp error to voltage, low-pass filter
|
v
Loop to top.

So that the number produced by the PID routine, before the square root,
should be considered power. I take the square root, feed a voltage into
the resistor, the resistor squares it. It's almost like the square root
and the square don't exist, go straight from line 2 to line 5. The number
after the square root doesn't really mean anything in the control model.

Buck up. Things could be much worse. You could be controlling motors
with gearboxes --
http://www.wescottdesign.com/articles/Friction/friction.html.
Oh, yes. My control needs are light. It's taking me a while to get
through this because I manage to confuse myself, and because I'm easily
distracted by birds and shiny objects.

I think I need to go to the store now, for more exclamation marks ;-).
Yes, those can go pretty fast.
--
"Very well, he replied, I allow you cow's dung in place of human
excrement; bake your bread on that." -- Ezekiel 4:15
 
Gregory L. Hansen wrote:

In article <10binmakk5a9r27@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:

Gregory L. Hansen wrote:

In article <10bhg8crk1btv07@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:


Gregory L. Hansen wrote:


Okay, here's a question. How do I represent the taking of squares and
square roots in the middle of a control loop? What's a transfer function
in the s or z domain for "square root of input"? Does that take me out of
the linear theory?

Ordinarily it takes you right out -- but with your heat output being
proportional to drive squared you were already out, and taking the
square root (in the right place) puts you right back in.

The classic definition for a linear system is one that satisfies the
following statement:

"A system is linear if and only if for a pair of arbitrary inputs x_1(t)
and x_2(t) that generate system responses y_1(t) and y_2(t), and for a
pair of arbitrary constants a_1 and a_2, the system response to x(t) =
a_1*x_1(t) + a_2*x_2(t) is equal to y(t) = a_1*y_1(t) + a_2*y_2(t)".

If you can get through this without your brain fogging over it actually
makes very good sense, and is very useful.

For example, since you know that sqrt(x_1 + x_2) != sqrt(x_1) +
sqrt(x_2) you know that you're playing with nonlinearities. But with
your system you already have a subsystem where y(t) = x(t)^2, so you
know it isn't linear as it is. If, however, you restrict your drive to
positive numbers and put in your square root then y(t) = (sqrt(x(t))^2 =
x(t). This means that by putting the square root in there you're making
the system much more linear.


I was trying to figure out how to write a transfer function for that.
After reading about all that linear control theory, I wanted to try doing
something with it. I tried finding a Laplace transform of f(t)^2 by
partial integration, but that didn't seem useful.

Will my first application require non-linear control theory?



First do this simple mental exercise. Imagine a 100-ohm resistor. E =
IR, right? So with a current input the voltage is exactly equal to the
input times 100 ohms, right? Nothing could be more linear, right?

Now consider that it's a surface-mount resistor rated at 1/16th watt.
Imagine putting 100 volts on it. That's only 100 watts, so the resistor
ought to last for a millisecond or so before it overheats and puts extra
meaning in the phrase "letting the smoke out".

Now think of our nothing-could-be-more-linear 1/16th watt resistor --
it's beyond toast! y(A*x(t)) != A*y(x(t))! It ain't linear at all!

In fact, there are no real systems that are linear! Put too much
voltage on a vacuum and it'll rip the electrons right off of your probes
and flow current! Fix that problem and sooner or later (lots later)
it'll disassociate the virtual electron-positron pairs and make _real_
electrons and positrons! And flow current! So not even a perfect
vacuum is linear!

So yes, no matter who you are, or where, or what it is, your first
application will require that you deal with nonlinearities. In your
case, since you are taking the square root of your controller before
applying it to an actuator that has a near-perfect squaring effect, you
have a system that overall is about as close to linear as one could hope.


But square roots aren't a linear operation. Maybe there's just something
elementary that I'm missing, but when I'm trying to model it, I don't see
how to make a transition from temperature error to change in power.

error dT
|
v
(P + Ds)/(1+Hs) + I/s PID loop with filter on prop. and deriv.
|
v
square root of previous step
|
v
a/(b+s) Plant changes temperature, assume first order for now
|
v
G/(1+Ts) lock-in turns temp error to voltage, low-pass filter
|
v
Loop to top.

Or, now that I think of it, maybe I'm just missing a step when I go from
the ADC to the resistor.

error dT
|
v
(P + Ds)/(1+Hs) + I/s PID loop with filter on prop. and deriv.
|
v
square root of previous step
|
v
resistor squares previous step
|
v
a/(b+s) Plant changes temperature, assume first order for now
|
v
G/(1+Ts) lock-in turns temp error to voltage, low-pass filter
|
v
Loop to top.

So that the number produced by the PID routine, before the square root,
should be considered power. I take the square root, feed a voltage into
the resistor, the resistor squares it. It's almost like the square root
and the square don't exist, go straight from line 2 to line 5. The number
after the square root doesn't really mean anything in the control model.

Yes, exactly. You've eliminated the x^2 nonlinearity entirely, and left
yourself with a much more linear system to control.
Buck up. Things could be much worse. You could be controlling motors
with gearboxes --
http://www.wescottdesign.com/articles/Friction/friction.html.


Oh, yes. My control needs are light. It's taking me a while to get
through this because I manage to confuse myself, and because I'm easily
distracted by birds and shiny objects.


I think I need to go to the store now, for more exclamation marks ;-).


Yes, those can go pretty fast.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
In article <10bk76hk8j833a2@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:
Gregory L. Hansen wrote:


So that the number produced by the PID routine, before the square root,
should be considered power. I take the square root, feed a voltage into
the resistor, the resistor squares it. It's almost like the square root
and the square don't exist, go straight from line 2 to line 5. The number
after the square root doesn't really mean anything in the control model.

Yes, exactly. You've eliminated the x^2 nonlinearity entirely, and left
yourself with a much more linear system to control.
All right, then, I think I'm ready to start filling graphs up with X's
and O's. Uh... later. I think there's another distraction coming by.

Buck up. Things could be much worse. You could be controlling motors
with gearboxes --
http://www.wescottdesign.com/articles/Friction/friction.html.


Oh, yes. My control needs are light. It's taking me a while to get
through this because I manage to confuse myself, and because I'm easily
distracted by birds and shiny objects.


I think I need to go to the store now, for more exclamation marks ;-).


Yes, those can go pretty fast.


--

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

--
"A nice adaptation of conditions will make almost any hypothesis agree
with the phenomena. This will please the imagination but does not advance
our knowledge." -- J. Black, 1803.
 
"Gregory L. Hansen" <glhansen@steel.ucs.indiana.edu> wrote in message
news:c9cmp0$3bg$1@hood.uits.indiana.edu...

[snip]

But square roots aren't a linear operation. Maybe there's just something
elementary that I'm missing, but when I'm trying to model it, I don't see
how to make a transition from temperature error to change in power.

error dT
|
v
(P + Ds)/(1+Hs) + I/s PID loop with filter on prop. and deriv.
|
v
square root of previous step
|
v
a/(b+s) Plant changes temperature, assume first order for now
|
v
G/(1+Ts) lock-in turns temp error to voltage, low-pass filter
|
v
Loop to top.

Or, now that I think of it, maybe I'm just missing a step when I go from
the ADC to the resistor.

error dT
|
v
(P + Ds)/(1+Hs) + I/s PID loop with filter on prop. and deriv.
|
v
square root of previous step
|
v
resistor squares previous step
|
v
a/(b+s) Plant changes temperature, assume first order for now
|
v
G/(1+Ts) lock-in turns temp error to voltage, low-pass filter
|
v
Loop to top.

So that the number produced by the PID routine, before the square root,
should be considered power. I take the square root, feed a voltage into
the resistor, the resistor squares it. It's almost like the square root
and the square don't exist, go straight from line 2 to line 5. The number
after the square root doesn't really mean anything in the control model.
Bingo. Clever bugger, eh wot? All you really did to convert a nasty
non-linear mess into a nice linear one is choose "different" (better) inputs
and outputs.

Cheers
Terry
 

Welcome to EDABoard.com

Sponsor

Back
Top