DSPRelated.com
Forums

Relation between filters and controllers

Started by mesmart November 15, 2013
Hello All,

I am having a tough time figuring out the relationship between a filter and
a controller.
Here is my understanding of the two terms (irrespective of implementation:
analog or digital)

1. Filter : A block of hardware or software that when fed with a given
signal generates an output with signals of only those frequencies for which
it is designed for. Accordingly , we have different types of filters such
as LPF, HPF etc.

2. Controller: This block of hardware or software basically has two inputs
: A reference signal and the fed back output signal. The controller, in a
typical negative feedback topology), calculates the instantaneous
difference between the reference and fed back output to generate a
'control' output such that the error signal should reduce to zero. 

With this background, I fail to understand how are a filter and a
controller related? For example, how is it that a 2 pole 2 zero filter is
also used as a 2 pole 2 zero controller (like in digital power control
applications). I am just not able to figure out the intuitive link between
the two, that should allow me to view one as the dual of the other.

Any suggestions? What am I missing?

	 

_____________________________		
Posted through www.DSPRelated.com
On Fri, 15 Nov 2013 07:35:40 -0600, "mesmart" <98908@dsprelated> wrote:

>With this background, I fail to understand how are a filter and a >controller related? For example, how is it that a 2 pole 2 zero filter is >also used as a 2 pole 2 zero controller (like in digital power control >applications). I am just not able to figure out the intuitive link between >the two, that should allow me to view one as the dual of the other. > >Any suggestions? What am I missing?
The simplest explanation may be that filters are generally designed from a frequency domain standpoint with only minor regard for time domain considerations, while controllers are generally designed from a time domain standpoint with only minor regard for frequency domain considerations. Beyond that, once at the transfer function stage, the mathematics are very similar. For example, a filter might be designed to minimize 60 Hz hum, or to equalize a channel for flat frequency response, etc. On the other hand, a controller might be designed to follow a step input within certain tolerances for overshoot and maximum position error, or to meet certain stability criteria. There is a lot more to it than that, but this is the most basic view of the "duality" that you mention. Greg
On Fri, 15 Nov 2013 07:35:40 -0600, mesmart wrote:

> Hello All, > > I am having a tough time figuring out the relationship between a filter > and a controller. > Here is my understanding of the two terms (irrespective of > implementation: analog or digital) > > 1. Filter : A block of hardware or software that when fed with a given > signal generates an output with signals of only those frequencies for > which it is designed for. Accordingly , we have different types of > filters such as LPF, HPF etc. > > 2. Controller: This block of hardware or software basically has two > inputs : A reference signal and the fed back output signal. The > controller, in a typical negative feedback topology), calculates the > instantaneous difference between the reference and fed back output to > generate a 'control' output such that the error signal should reduce to > zero. > > With this background, I fail to understand how are a filter and a > controller related? For example, how is it that a 2 pole 2 zero filter > is also used as a 2 pole 2 zero controller (like in digital power > control applications). I am just not able to figure out the intuitive > link between the two, that should allow me to view one as the dual of > the other. > > Any suggestions? What am I missing?
This is interesting. To a great extent, if you're thinking strictly about linear systems, the difference between a filter and a controller is what you're planning on doing with it when you're done. This particularly applies if you're designing a typical single-input, single- output system and you're not considering the summing junction to be part of the "controller". (Consider most phase-locked loops, where the phase detector is separate from the loop filter). I think that perhaps your definition of a filter is too narrow. Normally in academic circles a "filter" is a block in a system that processes a signal somehow. Depending on the context a particular author or text may restrict the definition of "filter" to mean something that is strictly linear, or something that is strictly single-input, single-output, but I have seen both of those 'rules' violated on occasion (the multi-input or multi-output filter is more rare than the nonlinear filter, but I've seen it). For me, in practical terms, where filters and controllers really diverge is when you leave linear assumptions behind and start designing for the real world. Generally when you're designing "filters" they're linear and you're trying to make sure they stay that way. However, when you're designing a controller with an integrator (which most have) you need to design in anti-windup, which in an intentional nonlinear action to take into account the fact that you must design in output limiting, and that your controller is going to be routinely banging into its stops. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Tim Wescott <tim@seemywebsite.please> wrote:
> On Fri, 15 Nov 2013 07:35:40 -0600, mesmart wrote:
>> I am having a tough time figuring out the relationship between >> a filter and a controller. >> Here is my understanding of the two terms (irrespective of >> implementation: analog or digital)
(snip of filter)
>> 2. Controller: This block of hardware or software basically has two >> inputs : A reference signal and the fed back output signal. The >> controller, in a typical negative feedback topology), calculates the >> instantaneous difference between the reference and fed back output to >> generate a 'control' output such that the error signal should reduce to >> zero.
(snip)
> This is interesting. To a great extent, if you're thinking strictly > about linear systems, the difference between a filter and a controller is > what you're planning on doing with it when you're done. This > particularly applies if you're designing a typical single-input, single- > output system and you're not considering the summing junction to be part > of the "controller". (Consider most phase-locked loops, where the phase > detector is separate from the loop filter).
When I first read the OP post, I started thinking about the Dolby noise compression systems, which could be considered adaptable filters.
> I think that perhaps your definition of a filter is too narrow. Normally > in academic circles a "filter" is a block in a system that processes a > signal somehow. Depending on the context a particular author or text may > restrict the definition of "filter" to mean something that is strictly > linear, or something that is strictly single-input, single-output, but I > have seen both of those 'rules' violated on occasion (the multi-input or > multi-output filter is more rare than the nonlinear filter, but I've seen > it).
I suppose the rectifier for an AC voltmeter could be considered a non-linear filter.
> For me, in practical terms, where filters and controllers really diverge > is when you leave linear assumptions behind and start designing for the > real world. Generally when you're designing "filters" they're linear and > you're trying to make sure they stay that way. However, when you're > designing a controller with an integrator (which most have) you need to > design in anti-windup, which in an intentional nonlinear action to take > into account the fact that you must design in output limiting, and that > your controller is going to be routinely banging into its stops.
I first learned about controllers when they were used for temperature control of, for example laboratory ovens. A thermocouple as input and often a triac output to control the heater element. That was about the time of the transition from the on/off controllers to proportional and then PID controllers. -- glen
On Saturday, November 16, 2013 2:59:05 AM UTC+13, Greg Berchin wrote:
> On Fri, 15 Nov 2013 07:35:40 -0600, "mesmart" <98908@dsprelated> wrote: > > > > >With this background, I fail to understand how are a filter and a > > >controller related? For example, how is it that a 2 pole 2 zero filter is > > >also used as a 2 pole 2 zero controller (like in digital power control > > >applications). I am just not able to figure out the intuitive link between > > >the two, that should allow me to view one as the dual of the other. > > > > > >Any suggestions? What am I missing? > > > > The simplest explanation may be that filters are generally designed from a > > frequency domain standpoint with only minor regard for time domain > > considerations, while controllers are generally designed from a time domain > > standpoint with only minor regard for frequency domain considerations. Beyond > > that, once at the transfer function stage, the mathematics are very similar. > > > > For example, a filter might be designed to minimize 60 Hz hum, or to equalize a > > channel for flat frequency response, etc. On the other hand, a controller might > > be designed to follow a step input within certain tolerances for overshoot and > > maximum position error, or to meet certain stability criteria. > > > > There is a lot more to it than that, but this is the most basic view of the > > "duality" that you mention. > > > > Greg
Not, true. They are both the same in fact. A proper control system designer designs in the frequency domain too using Bode Plots and using phase margin to give an estimation of stability. Usually this is done with lag-lead or P-I filters. The controller is a type of filter, but to avoid confusion we normally use the word controller. Now there are a group of people who don't understand much control who design controllers in the time domain. they just tweak knobs for PID control with little understanding. They get something that works and quite quickly too, it's a different approach and not as good however. For example a PID will have 1 integrator in the PI part when in the frequency domain you may be able to slot in 2 or even two phase advances (differential terms).
On Friday, November 15, 2013 2:32:57 PM UTC-6, gyans...@gmail.com wrote:

> Not, true. They are both the same in fact.
I said that they're different approaches to basically the same thing. How can that be "not true" and "true" at the same time?
> A proper control system designer designs in the frequency domain too using Bode Plots and using phase margin to give an estimation of stability.
Sure, and a proper filter designer also takes into account the time domain response of his filter. But, in general terms, I find that signal processing is weighted more toward the frequency domain while control systems are weighted more toward the time domain, if only in terms of specification and characterization. Everybody is giving examples of exceptions. The OP seems to need help understanding some basic principles. Why get hung up discussing the finer points of sprinting to someone who needs help learning to crawl? Greg
You are right Greg. In spite of the very insightful comments by various
members, I don't think my query has been resolved.

Let me refine the question a bit and see if it helps others understand what
I am actually seeking,

Consider a 2 pole 2 zero IIR filter that has well defined frequency
response characteristics.It would "reject" a certain band of frequencies
and "allow" others. 
Now, I have come across several instances in my study of digital power
converters where a particular CONTROLLER is called as a 2 pole 2 zero
controller.  The typical context is when in a given DC-DC converter, the
output voltage is compared against a reference voltage, The error signal is
then fed to a 2P2Z "controller" which then calculates a duty cycle for the
power switches to regulate the output at the desired set point.

So, it seems the same 2P2Z block which in certain applications can be used
as a frequency filter, is now being used in the power converter application
as a kind of PID controller. While being used as a filter, it is fed with a
signal that possibly has a broad frequency spectrum, whereas when used as a
controller, it's fed with an "error" signal.

I am not able to see how a block that in one context rejects a certain band
of frequencies, is being used in another application to generate a control
signal from an error input.

I hope this should help us narrow down the discussion from a generalized
scenario to a specific instance which is also in common use.

Thanks everyone for your time and inputs!
	 

_____________________________		
Posted through www.DSPRelated.com
On Saturday, November 16, 2013 6:58:35 AM UTC-8, mesmart wrote:

> ... > So, it seems the same 2P2Z block which in certain applications can be used > as a frequency filter, is now being used in the power converter application > as a kind of PID controller. While being used as a filter, it is fed with a > signal that possibly has a broad frequency spectrum, whereas when used as a > controller, it's fed with an "error" signal. >
An "error" signal may posibly have a broad frequency spectrum.
> > I am not able to see how a block that in one context rejects a certain band > of frequencies, is being used in another application to generate a control > signal from an error input. >
A filter in a control system generates a control signal from an error signal by rejecting certain bands of frequencies and passing others. Dale B. Dalrymple
On Sat, 16 Nov 2013 08:58:35 -0600, mesmart wrote:

> You are right Greg. In spite of the very insightful comments by various > members, I don't think my query has been resolved. > > Let me refine the question a bit and see if it helps others understand > what I am actually seeking, > > Consider a 2 pole 2 zero IIR filter that has well defined frequency > response characteristics.It would "reject" a certain band of frequencies > and "allow" others. > Now, I have come across several instances in my study of digital power > converters where a particular CONTROLLER is called as a 2 pole 2 zero > controller. The typical context is when in a given DC-DC converter, the > output voltage is compared against a reference voltage, The error signal > is then fed to a 2P2Z "controller" which then calculates a duty cycle > for the power switches to regulate the output at the desired set point. > > So, it seems the same 2P2Z block which in certain applications can be > used as a frequency filter, is now being used in the power converter > application as a kind of PID controller. While being used as a filter, > it is fed with a signal that possibly has a broad frequency spectrum, > whereas when used as a controller, it's fed with an "error" signal. > > I am not able to see how a block that in one context rejects a certain > band of frequencies, is being used in another application to generate a > control signal from an error input. > > I hope this should help us narrow down the discussion from a generalized > scenario to a specific instance which is also in common use. > > Thanks everyone for your time and inputs!
You're definitely wrapped around the axle on something unnecessary, here. You can make a two-pole, two-zero block (really, I'd think of it as a generic 2nd-order filter), then, by setting its coefficients properly, give it any 2nd-order transfer function you like. The authors of your power controller papers are probably using biquad sections. Since a PID controller has a second-order transfer function, you can make it work in a biquad section. Or, you can take that same biquad section, program it with completely different coefficients, and have a notch filter, or a bandpass filter, or whatever. So if you have a purpose-built PID on the one hand, and a generic biquad that's been set up as a PID on the other, then they will respond identically to inputs when the inputs are small. And if they work alike, they must be the same thing -- yes? (This ignores the anti-windup that I was talking about in a different post, and some numerical difficulties that you can run into using a biquad or other 'generic' 2nd-order filter as a PID. Presumably the power converters that you are studying either don't need to worry about anti- windup and integrators that aren't quite, or the authors don't know as much about digital control applications as they should. It's hard to tell without seeing the articles and doing some analysis). -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
On Saturday, November 16, 2013 8:58:35 AM UTC-6, mesmart wrote:

> Now, I have come across several instances in my study of digital power > converters where a particular CONTROLLER is called as a 2 pole 2 zero > controller. The typical context is when in a given DC-DC converter, the > output voltage is compared against a reference voltage, The error signal is > then fed to a 2P2Z "controller" which then calculates a duty cycle for the > power switches to regulate the output at the desired set point. > > So, it seems the same 2P2Z block which in certain applications can be used > as a frequency filter, is now being used in the power converter application > as a kind of PID controller. While being used as a filter, it is fed with a > signal that possibly has a broad frequency spectrum, whereas when used as a > controller, it's fed with an "error" signal.
Ah, this one is actually pretty easy to explain. In this situation, a 2nd order lowpass transfer function is being used to compute the approximate average value of the time domain signal. If you think of the desired signal as a constant value (at least over a short time span), then it can be described as "DCdesired". If you think of the output of the DC-DC converter as an average DC value plus AC noise (which consists of both periodic and random components), then it can be described as "DCactual + ACnoise". Then the error signal that you describe is: DCdesired = (DCactual + ACnoise) + error or error = (DCdesired - DCactual) - ACnoise In this case the filter/controller can be thought of as a filter that rejects the high frequency AC noise, or as a controller that responds to the average DC value. Fundamentally it is all the same. In terms of design, however, a signal processing engineer might design the filter to have a specific frequency reponse, especially if the spectral characteristics of the input waveform are known at least approximately. On the other hand, a controls engineer might design the controller to have specific overshoot and settling time responses to step changes in the desired set point signal. Ultimately both engineers, if they were diligent, would examine both domains for adequate response. But they might approach the problem differently. Greg