# How do I realize a transfer function with multiple zeros?

I designed a compensation function for a control system in Matlab and now I'm trying to figure out how to build it using op-amps. I thought I might be able to use a couple of Sallen-Key amplifier topologies, but I'm not sure if it's possible (my algebra skills are dusty). Alternatively, is there any other topology that can realize this form: $$(As^3 + Bs^2 + Cs + D) / (s)$$

A Sallen-Key filter is as follows:

simulate this circuit – Schematic created using CircuitLab

With transfer function: $$\frac{Z_3 \times Z_4}{(Z_1 \times Z_2) + Z_3 \times (Z_1 + Z_2) + (Z_3 \times Z_4)}$$

My gut tells me that I can put some capacitors in $Z_1$ & $Z_2$ and resistors as $Z_3$ & $Z_4$, then re-arrange the equation in such a way that it gets me close to what I want, but I'm having trouble doing the algebra. I will definitely need two-stages with this approach to achieve the 4th order transfer function.

In any case, I would appreciate some help in designing this circuit.

• So you want three zeroes and a single pole? – Vladimir Cravero Jul 19 '16 at 17:44
• that is correct – kjgregory Jul 19 '16 at 17:45
• @VladimirCravero, You're saying there's no such thing as a high pass filter? Often the poles are introduced by parasitics and are at a high enough frequency they don't practically change the system behavior. – The Photon Jul 19 '16 at 18:25
• No, I am saying there is no system with more poles than zeroes, and this is true. Of course there are situations where the poles are out of the band of interest, and it seems that such systems can actually predict the future, like a derivator. But ultimately, the gain goes low, phase becomes at most zero, and the great order of the universe is preserved – Vladimir Cravero Jul 19 '16 at 18:27
• A PID controller has TF: $G_c(s)=\dfrac{K_d s^2+K_p s+K_i}{s}$, which has numerator order > denominator order, and is eminently realisable. – Chu Jul 19 '16 at 21:08

The answer, before the interesting diversion:

A PID + a second derivative will do the trick:

simulate this circuit – Schematic created using CircuitLab

With transfer function:

$$H(s) = -\frac{R_{11}}{R_6} C_1 R_1 C_2 R_2 s^2 - \frac{R_{11}}{R_7} C_3 R_3 s + \frac{R_{11}}{R_{10}}\frac{R_6}{R_5} + \frac{R_{11}}{R_9} \frac{1}{R_4 C_4 s}$$

Which matches your transfer function of:

$$H(s) = As^2 + Bs + C + \frac{D}{s}$$

You didn't mention the signs of $A$, $B$, $C$ and $D$.

If you would like to reduce the number of op amps, you can combine the PID op amps into one using the information from this article.

simulate this circuit

With transfer function:

$$H(s) = K \frac{(s/z_1 + 1)(s/z_2 + 1)}{s (s/p_1 + 1)(s/p_2 + 1)}$$

Here, $p_1$ and $p_2$ are extra zeros. Ideal PID controllers don't have either, "filtered derivative" PID controllers only have $p_1$, and "type 3" PID have both. See the article for more information.

Where:

$$R_1 = Z_{in}\qquad R_2 = \frac{R_1 z_2}{p_1 + z_2}\qquad R_3 = \frac{R_1 p_2 K}{z_1 (p_2 - z_1)}$$

$$C_1 = \frac{p_1-z_2}{R_1 z_2 K}\qquad C_2=\frac{p_2 - z_1}{R_1 p_2 K}\qquad C_3=\frac{z_1}{R_1p_2K}$$

You can work out the necessary values.

## Now for the fun diversion:

So, I think that @Vladimir Cravero is correct, a transfer function with more zeros than poles is unphysical.

Physicists will think about this in terms of susceptibilities in the complex frequency domain (equivalent to what EEs refer to as transfer functions in the Laplace domain), and the Kramers-Kronig(KK) relations, however this can be extended to the [laplace domain](see appendix A) as well.

We know that the convolution theory allows us to take response functions in the time domain ($h(t) \rightarrow H(s)$) and turn them into transfer functions in the laplace domain:

$$H(s)V(s) = \mathcal{L}\left\{ \int_{-\infty}^{t} h(t-\tau)v(\tau)d\tau \right\}$$

However, we require that $h(>0)$ is $0$, otherwise the transfer function is reacting to stimuli that hasn't happened yet. Making sure that this requirement is obeyed is done by making sure that such a function obeys the KK relations in the Laplace domain.

The KK relations have two requirements:

• Analyticity in the right half-plane of Laplace space. This means no poles in the right half-plane.
• $\lim_{s\rightarrow \infty} H(s) = 0$, and furthermore that it goes to zero at least as fast as $1/|s|$. (This can apparently be relaxed a bit, but I'm not sure how, or how much.)

These requirements make sense: we can't have any sort of gain for infinite frequency for any real system (energy conservation requires this), and any poles in the right half-plane would also lead to energy conservation violations, finite inputs would lead to infinite power eventually.

Given these requirements, the Kramers-Kronig relations give us a relationship between the real and imaginary parts of the transfer function:

$$\Re\{H(s)\} ∝ PV \int_{-\infty}^{\infty}\frac{\Im\{H(s')\}}{s'-s}ds'$$

$$\Im\{H(s)\} ∝ PV \int_{-\infty}^{\infty}\frac{\Re\{H(s')\}}{s'-s}ds'$$

Where $PV$ stands for Cauchy's Principle Value integral.

Ultimately, doing this integral isn't actually that important, but we need to make sure that the transfer functions obey the requirements of the KK relations.

For a system where there are more zeros than poles, it is pretty trivial to show that this doesn't hold.

But wait! While @Vladimir Cravero is ultimately correct, realizing a physical transfer function with more zeros than poles is not possible because we would break causality, @Chu is also correct, this is done all the time with PID controllers. What gives?

The answer is that PID controllers (and all real systems) have low pass filters that give the bandwidth of the system. The order of this low pass filter is determined by the order of the system. For PID controllers, this shows up in the $K_d$,$K_i$ and $K_p$ values. We don't actually have perfect Op amps where these are just numbers, they must always also include a low pass filter that gives the bandwidth of the op amp, and this adds an extra pole. Furthermore, the response of the thing we are driving has a low pass filter within it (as must any physically realizable system).

Notes:

• The KK relations are also known as the Hilbert transform, which I found out while doing the research for this post. This might be a more well known name here in the EE community.

• It is possible that there are typos here. It is also possible that there are (weird) real valued causal systems that don't obey the KK relationships, but are still causal. This would be an analog to non-hermitian hamiltonians which happen to have real valued eigenvalues and eigenvectors in quantum mechanics. I'm not sure about this. [edit: this paper should be looked at if you are interested in this question]

• This actually continues to hold in the small signal limit for nonlinear systems. The nonlinear KK relations are still a thing, references available upon request.

• This is helpful for framing the problem, but I'm looking for a circuit design with the transfer function arranged in a format that matches the type-1 PID controller transfer function. – kjgregory Sep 20 '16 at 23:53
• @kjgregory: I thought of an answer to your problem, I'll add it when I get home. – Andrew Spott Sep 21 '16 at 0:05
• @kjgregory: I added the answer. I think the rest of it is more fun, but the answer I suppose is more useful to you. – Andrew Spott Sep 21 '16 at 1:03
• That's a good answer. I was hoping for a solution that uses fewer op-amps. Good observation about signs, I hadn't thought about that. I think one of the op-amps in the top chain could be eliminated using the sallen-key topology. – kjgregory Sep 21 '16 at 1:10
• I've added a link to an article that discusses a single op amp PID controller. – Andrew Spott Sep 21 '16 at 1:43