# Equation that describes positive/negative feedback

• jaydnul
jaydnul
Hi,

Curious if there is an expression for a negative feedback system that experiences phase shift. For example, at 0 degree phase shift, the additional gain is 0 because it is fully negative feedback. At 180 phase shift the additional gain is infinite because you have full positive feedback. Is there an equation that expresses this and all the intermediate phase shifts?

Thanks

Engineering news on Phys.org
You have asked a very important question. This subject is studied in great detail in electronics and control system design. It involves Laplace transformations (for continuous control systems) and the Z transformation (for discrete control systems). The equations are usually in the form of fractions with polynomial numerator and denominators. The location of the zeros and poles of the equations in the complex plane tell you about the behavior of the system.
See Control Theory.

berkeman
jaydnul said:
Curious if there is an expression for a negative feedback system that experiences phase shift.
Yes, maybe lots of them. This is referred to as feedback analysis.

jaydnul said:
For example, at 0 degree phase shift, the additional gain is 0 because it is fully negative feedback. At 180 phase shift the additional gain is infinite because you have full positive feedback.
Nope. This just doesn't make any sense. To paraphrase Wolfgang Pauli, it's not even wrong.
Feedback can have gain and phase, of nearly any value. Then the overall effect on the circuit is (can be) rather complex.

jaydnul said:
Is there an equation that expresses this and all the intermediate phase shifts?
Yes, there are equations.

This is a subject that may require some further study for you.
Maybe start here:

Or here: https://ocw.mit.edu/ans7870/RES/RES.6-010/MITRES_6-010S13_lecandsols.pdf

FactChecker and fresh_42
jaydnul said:
Hi,

Curious if there is an expression for a negative feedback system that experiences phase shift. For example, at 0 degree phase shift, the additional gain is 0 because it is fully negative feedback. At 180 phase shift the additional gain is infinite because you have full positive feedback.
That is if the negative feedback gain is 1. Suppose the negative feedback gain is 1/2. Then for a frequency where the phase shift is 180, consider the output at the cycle peek, peak value=##A##. The peek accumulates as it keeps being fed around, each time with another multiplier feedback gain of 1/2. The result is an output peek of ##A (1+1/2+1/4+1/8+...) = A (1/(1-1/2)) = 2A##

There is a lot of study done on this subject. The phase and gain of the output can classically be studied using Bode plots. Phase and Gain margins tell which frequencies will begin to demonstrate exponential growth over time.

Thanks for the comments! Let me try to restate my question better:

i run a stability analysis and i get loop gain and loop phase. Whats the equation that combines these two plots as if it was still closed loop. Basically how do i get the LG/1+LG plot that includes the peaking that a low phase margin would cause in that plot. For example is it LG/1+LG+tan(phase)? (Thats not it, just an example of the form im looking for)

adding this plot to make sense of it. How do i combine black and blue plots into an equation that gives me red plot:

Are you familiar with complex numbers and their use to represent the gain and phase of an amplifier or analog signal?

Are you asking how to calculate ##\frac{A}{1+\beta A}##, where ##A## is the open loop forward gain and ##\beta## is the feedback gain?

There's lots on online resources to learn about this. It's part of every basic electronics design curriculum. Here's a short one I chose pretty much at random: https://www.tutorialspoint.com/ampl... to calculate the gain of feedback amplifiers.

Or are you asking how to measure it in practice; i.e. lab technique?

Just simply: LG = open loop gain (the black plot), LP = open loop phase (the blue plot). What is the expression that gives CL closed loop (the red plot) using LG and LP as dependent variables. I am certain it will include something like LG/(1+LG) but that does not consider LP (how it contributes to the peaking of the CL plot around LG = 0dB)

Are you familiar with complex numbers and their use to represent the gain and phase of an amplifier or analog signal? You need to understand that first.

jaydnul said:
adding this plot to make sense of it. How do i combine black and blue plots into an equation that gives me red plot:
The gain and phase plot is a plot of phasors, (in polar coordinates), against frequency. That is good for visualisation, but is terrible for computation. For example, phase rotation of a phasor or vector can be done easily by multiplication of complex numbers.

Convert each phasor from polar to rectangular coordinates, to get real = cosine, and imaginary = sine, coefficients or components, which is a vector, written as a complex number, for each frequency.

You can then apply a feedback equation to each complex vector, for each frequency independently.

As a whole, the input to the feedback equation will be a frequency spectrum. The output of the feedback equation will also be a frequency spectrum.

You convert the representation of a signal or filter, from the time domain to the frequency domain, by applying a Fourier transform. You convert from the frequency domain, back to the time domain, by applying an Inverse Fourier transform.

It looks like this for simple feedback:

DaveE said:
It looks like this for simple feedback:

View attachment 332690

I understand complex exponentials and phasor analysis. But I'm looking for a equation that expresses |H(s)| in terms of mag[A(s)] and phase[A(s)]

Your plots in post #5 are: real frequency in hertz, or angular frequency in radians.
Your |H(s)| are in complex frequency, s.

Gain and phase are difficult to plot in complex frequency, where the map of poles and zeros is available for visualisation.

On the complex pole-zero plot, to the left are exponentially decreasing sinusoids, to the right are increasing sinusoids. Continuous signals only exist on the vertical axis of the pole-zero plot.

Gain and phase only have meaning for positive real angular frequencies on that vertical axis.

jaydnul said:
I understand complex exponentials and phasor analysis. But I'm looking for a equation that expresses |H(s)| in terms of mag[A(s)] and phase[A(s)]
That's a difficult approach, which I've never seen done. It's an unnecessary algebraic mess because, at least in linear networks, the gain and phase are interrelated. Once the feedback is applied they affect each other. This is why experienced EEs just want to know the DC gain, and pole and zero locations. That contains the necessary information to solve dynamic linear systems.

You do understand that if you show me the phase vs. frequency data for a linear system, I can tell you how the gain changes with frequency (and vice-versa), right? They aren't really independent variables.

I guess your asking us to do the algebra for you? Not likely, but we'll see if anyone bites. That's the hard way.

PS: Here's an answer, maybe you can figure out how to express it in a more insightful form:

Last edited:
jaydnul and FactChecker
DaveE said:
That's a difficult approach, which I've never seen done. It's an unnecessary algebraic mess because, at least in linear networks, the gain and phase are interrelated. Once the feedback is applied they affect each other. This is why experienced EEs just want to know the DC gain, and pole and zero locations. That contains the necessary information to solve dynamic linear systems.

You do understand that if you show me the phase vs. frequency data for a linear system, I can tell you how the gain changes with frequency (and vice-versa), right? They aren't really independent variables.

I guess your asking us to do the algebra for you? Not likely, but we'll see if anyone bites. That's the hard way.

PS: Here's an answer, maybe you can figure out how to express it in a more insightful form:
View attachment 332692
I wasnt wanting you to do the algebra, i just didnt know that it was such a complicated task/someone had done it before.

For your |H(w)| equation, why is the complex exponential only in the denominator? shouldnt it also be a multiplier on the top as well?

jaydnul said:
I wasnt wanting you to do the algebra, i just didnt know that it was such a complicated task/someone had done it before.
I think it is nice and simple. It just takes a little calculation with complex numbers.
jaydnul said:
For your |H(w)| equation, why is the complex exponential only in the denominator? shouldnt it also be a multiplier on the top as well?
That exponential of a purely imaginary number always has a modulus of 1. Since that equation is only for the modulus of H(z), it has no effect. On the other hand, in the denominator, it changes the modulus of the sum so it can't be ignored.

Last edited:
jaydnul and DaveE
TLDR: modelling is better than brute force calculation.

There is a key difference in these two approaches. In order for you to calculate |H(ω)| at any given frequency ω, you must be given |A(ω)| and arg(A(ω)) at that frequency using the method in post #15. If you use the linear system model in post #11, all you need to know is a few key frequencies and a DC gain for the model, which are always the same for that system. I only need 4 constant parameters in this example to calculate the gain and phase at any of 1000 different frequencies. The other method would require 2000 pieces of data for the same results.

Then, if you want to change something, you'll have very little insight into its effect without repeating the entire calculation. For example, you wouldn't know that ##\omega_1 A \beta## and ##\omega_2## are the (only) two key parameters in determining the overshoot you are interested in. You also wouldn't know exactly at what frequency that occurs without guessing.

Last edited:
jaydnul
Ok i got it! It basically ends up being (x+yj)/(1+x+yj), where x = LG*cos(phase) and y = LG*sin(phase). It is a really complicated equation, but if you plug it in and take the magnitude of the resulting complex number, it gives you the correct waveform with the peaking and everything!

Thanks DaveE and company for the help. I have one more question that maybe im overthinking. I needed to take the magnitude of the complex number, but i was initially just taking the Re{} part. Its been a while since college, in what scenarios do you want the magnitude and what scenarios do you want the real part?

jaydnul said:
Ok i got it! It basically ends up being (x+yj)/(1+x+yj), where x = LG*cos(phase) and y = LG*sin(phase). It is a really complicated equation,
Ha! If you study this subject for a while. you will get used to the evils of complex numbers. Just joking :-)
It does not get much simpler than ##\frac {s}{1+s}##. This is the best and natural way to think about feedback systems. The location of the complex zeros of the denominator in the complex plane tell a lot about the behavior of the system for different frequencies. If you look at some real-world feedback systems, including amplifiers and control systems, you will see that they get complicated quickly and that an approach like this is very useful.

jaydnul
jaydnul said:
in what scenarios do you want the magnitude and what scenarios do you want the real part?
Mostly you'll want the magnitude. For example, when you represent gain and phase with a complex number (signals, impedances. amplifiers, etc.).

Sometimes you'll see in analysis people will make the math easier by starting with the assumption that only the real part counts, but using a complex number. For example you could say ##cos(\omega t) = Re[e^{i \omega t}]## instead of ##cos(\omega t) = \frac{e^{i \omega t} + e^{-i \omega t}}{2}##. In this case they don't need any phase information in their problem.

jaydnul

## What is a feedback loop in the context of equations?

A feedback loop is a system where the output of a process influences the input in a cyclical manner. Positive feedback amplifies changes and can lead to exponential growth or runaway effects, while negative feedback dampens changes and promotes stability and equilibrium.

## How is positive feedback mathematically represented?

Positive feedback can be represented by equations where the output is fed back into the input with a positive coefficient. For example, in a simple linear system, this could be represented as $$x_{t+1} = x_t + k \cdot x_t$$, where $$k$$ is a positive constant. This leads to exponential growth if $$k > 0$$.

## How is negative feedback mathematically represented?

Negative feedback is represented by equations where the output is fed back into the input with a negative coefficient. For example, a simple linear system with negative feedback could be $$x_{t+1} = x_t - k \cdot x_t$$, where $$k$$ is a positive constant. This results in the system moving towards a stable equilibrium.

## What are some real-world examples of positive feedback systems?

Real-world examples of positive feedback systems include population growth, where an increasing population leads to more births, and the amplification of sound in a microphone-speaker setup, where a small sound is picked up and amplified repeatedly. In both cases, the feedback leads to exponential growth or runaway effects.

## What are some real-world examples of negative feedback systems?

Examples of negative feedback systems include the regulation of body temperature in humans, where deviations from the set point trigger mechanisms to restore equilibrium, and the control of blood sugar levels, where insulin and glucagon work to maintain balance. These systems use negative feedback to maintain stability and homeostasis.

Replies
6
Views
2K
Replies
4
Views
1K
Replies
27
Views
2K
Replies
4
Views
2K
Replies
9
Views
2K
Replies
3
Views
995
Replies
41
Views
4K
Replies
3
Views
5K
Replies
5
Views
5K
Replies
2
Views
14K