Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Iteratively solving a FB loop

Status
Not open for further replies.

exp

Full Member level 1
Joined
Jan 28, 2013
Messages
97
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,570
Hi,

A rather trivial question: Given a simple negative FB loop with forward amplifier "a", feedback network "f" so that A = a/(1+af) = 1/f * T/(1+T).
So far no frequency dependency, so a(s)=a, f(s)=f.

Now I want to "iteratively" calculate the output voltage (i.e., not just algebraically write the equations). What is wrong about this approach:

Code:
vi = 1;
vo = 0;

a = 1000;
f = 0.1;

for iter=1:10
    vf = f*vo;
    v_err = vi - vf;
    vo = a*v_err
end

Since T=a*f=100 > 0, this should be a perfect negative feedback and stable.
But, of course, vo diverges.


I think the reason is that the system I am implementing in the code is not actually A=a/(1+af) but contains a z^-1 due to the artificial delay.
But if this is the case, how would I correctly implement this in a loop?
 

Interesting question. IMHO, to get sensible results, you need to add in some frequency-dependence. I'm guessing that with your code the output oscillates between positive and negative. Thats a fair representation of reality, since your code models feedback around a system with propogation delay, but no frequency compensation. In the real world that would oscillate. (e.g. decompensated opamp + too much feedback = oscillation)

Try the code below. On each iteration it doesn't jump straight to the calculated value, but takes a small step towards it. This models a system with a high-frequecy roll-off in the forward path (like a normal compensated opamp).

The output should asymptotically approach the correct value, unless I made a typo in the code of course.

btw, what language is this?

Code:
vi = 1;
vo = 0;

a = 1000;
f = 0.1;
x = 0.001;

for iter=1:10
    vf = f*vo;
    vi_error = vi - vf;
    vo_ideal = a*vi_error;
    vo_error = vo_ideal - vo;
    vo_incr = vo_error * x;
    vo = vo + vo_incr;
end
 

Hi,

Thanks, this helps already! Language is just plain MATLAB (or Octave). It worked right of the box, converging to vo=9.9 (it should be 10 with infinite loop gain and error is 1/T=0.01 with finite T which matches).

I am trying to understand why we need a high frequency roll-off at all. (just from a highly theoretic perspective!)
And what we can say about the stability of a hypothetic, infinite bandwidth feedback system (i.e., T(s)=T0=const and real for all s).

One criterion for stability (Bode) is that |T(s)|<1 where Phase(T(s)) = -180.
But T(s)=T0 implies that the phase cannot go to -180, so shouldn't this system be always stable?

On the other hand, changing the input signal (in the code from 0 to 1) corresponds to a step which has infinite frequency. This signal is then amplified with T0 at all frequencies in the loop all over again which results in an unstable system. If T(s) would have a high frequency roll-off, the high frequencies induced by the step would not be amplified.

So is it correct that such a system is only stable if it is excited with a DC signal for all times?
How does this agree with Bode's criterion?

In this sense, I am also asking myself about the difference of positive and negative FB in the context of hypotethic, infinite BW loops (e.g., no s!).
Generally, for A=a/(1+T), I would expect an unstable system only for T=-1. But the criterion says: Negative T is positive FB and unstable.
So why should any negative T (positive feedback!) other than T=-1 be more unstable than any positive T?
 

On the other hand, changing the input signal (in the code from 0 to 1) corresponds to a step which has infinite frequency. This signal is then amplified with T0 at all frequencies in the loop all over again which results in an unstable system.
So is it correct that such a system is only stable if it is excited with a DC signal for all times?
How does this agree with Bode's criterion?

Stability of a system with feedback does not depend on any input signal. If a system does not fulfill the stability criterion it will be unstable - unless you assume a noise free system that is operating since infinite negative times (it has no switch-on event). Simple example: Calculation (by hand) and simulation for an opamp (even in case of a realistic simulation model) with positive resistive feedback gives a stable bias point if there is no power switch-on effect, as is the case for ac and dc analyses. Instability can be demonstrated for tran analyses only.

In this sense, I am also asking myself about the difference of positive and negative FB in the context of hypotethic, infinite BW loops (e.g., no s!).
Generally, for A=a/(1+T), I would expect an unstable system only for T=-1. But the criterion says: Negative T is positive FB and unstable.
So why should any negative T (positive feedback!) other than T=-1 be more unstable than any positive T?

What means "more unstable"? What about signal limitations (amplitude) in your hypothetic system? For T=-1 the gain is infinite. Is this "unstable"?
By the way - as an engineer I have problems to imagine such a hypothetic system.
 

An iterative description without a time delay or any integrating or differentiating term (= energy storing respectively frequency dependent circuit element) seems meaningless to me. Time continuous systems can be described by time continuous models. At least for linear systems, the differential equations can be also solved analytically.

The behaviour of nonlinear systems can be often only analyzed by iterative, time-discrete methods.

I agree that the term "unstable" has no comparative. Different positive feedback factors result usually in differently fast ascending solutions.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top