# gain from a line equation

Discussion in 'Math' started by suzuki, May 10, 2012.

1. ### suzuki Thread Starter Member

Aug 10, 2011
119
0
For an equation like $y = mx$, we can easily say that the gain is m.

Can we say the same for a equation that has offset b? Or would we have to rewrite that equation somehow such that there is zero offset?

2. ### MrChips Moderator

Oct 2, 2009
12,636
3,454
A linear equation with an offset can be written as

$y = mx + b$

What you call the gain is still m, also known as the slope or gradient.

Sparky49 likes this.
3. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
The answer depends on the semantics used. When describing a fit, we typically use the terms "gain" and "offset" and there isn't much confusion. But if we use the term "gain" and apply it to a generic system, then confusion can easily set in if one person is talking about large-signal gain and the other is talking about small-signal gain.

If you are working with a system that has, for instance,

Vout(Vin) = a*Vin + b

then the system is actually not even a linear system. By definition, a linear system exhibits the property of superposition, namely

Vout(c*V1 + d*V2) = c*Vout(V1)+d*Vout(V2)

Therefore, saying that 'm' is the gain is problematic. But, saying that 'm' is the incremental gain (a.k.a., the small-signal gain) is correct because dVout/dVin does obey superposition and therefore is a linear system with regard to changes in the output as a function of changes in the input.

4. ### JMac3108 Active Member

Aug 16, 2010
349
66
In the context of electronics, for example with most physical sensors, the linear equatuin y=mx+b can be interpreted with m=gain and b=offset.

For example with a pressure sensor, the equation might be written:

P = mV + b

P = pressure
V = voltage output from sensor
m = gain in PSI/V
b = offset = pressure when sensor is putting out 0V

Hope this is what you were looking for.

5. ### ramancini8 Member

Jul 18, 2012
447
119
Refer to "Op Amps for Everybody" (free on TI web site) chapter 4 Simultaneous Equations uses the equation of a straight line to solve op amp pronlems.

6. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,301
338
Suppose for your example system, a = 5 V/V, b = 10 V and Vin = 2 V peak to peak. How would you calculate the large signal voltage gain?

7. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
You can't. That's my point. It's like asking what the large-signal voltage gain of a resistor-diode circuit is. Now, if you plot Vout/Vin as a function of Vin, you would find that it asymptotically approaches 5V/V for |Vin| sufficiently large, so you could call that your 'large-signal gain', but it only applies if you are actually operating in those voltage ranges.

8. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,301
338
That would depend on what definition of "large signal gain" one is using, wouldn't it?

The definition I found in the first text I picked up is:

Large signal gain = ΔVout/ΔVin at whatever your operating level is.

I found that same definition on the web. It seems to be a standard definition of large signal gain, and the one I've always used.

Given that definition, your example has the same large signal gain as small signal gain. Your point would have been better made with a more highly non-linear example.

9. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Everything always depends on what definition you are using.

Then what do you define the small signal gain as?

While I agree that a more highly non-linear example would have made the point much better, I'm not the one that picked the example.

I found places that define it as Vout/Vin and places that define it as ΔVout/ΔVin for arbitrary ΔVin (as opposed to the small-signal gain which is pretty universally taken to be dVout/dVin, possibly as approximated by ΔVout/ΔVin for ΔVin sufficiently small so as not to shift the operating point enough to significantly affect the small signal (i.e., differential) parameters).

10. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,301
338
If you know that then why would you say "You can't", a rather absolute denial, seemingly foreclosing the possibility that with a suitable definition one could?

When you say "It's like asking what the large-signal voltage gain of a resistor-diode circuit is. Now, if you plot Vout/Vin as a function of Vin, you would find that it asymptotically approaches 5V/V for |Vin| sufficiently large, so you could call that your 'large-signal gain', but it only applies if you are actually operating in those voltage ranges.", you seem to be saying that only the asymptotic value can be called the "large signal gain". If it's defined as Vout/Vin, then why can't there be a value for large signal gain at every value of Vin? It just means that large signal gain depends on the operating region.

The same thing you did in post #3, "dVout/dVin".

No one compelled you to use the OP's example, which fails to make your point given the common definition of large signal gain as ΔVout/ΔVin.

If we're talking about AC signals and not DC, then what is Vout (as opposed to ΔVout)? Is it the RMS value, or the P-P value, or something else? In the text I consulted, ΔV is the P-P value at both input and output. That works well for large signals. Perhaps the references you found giving Vout/Vin intended that the values of Vout and Vin should be the P-P values.

At any rate, to say as you did in post #7 that "You can't" (calculate the large signal gain) is not correct. With either definition a person can calculate a large signal gain, which will vary with operating point, as would be expected.

11. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
You asked a question within the context of the definition I was using (as implied by quoting my post immediately prior to asking your question), so I answered your question within the context of the definition I was using. That seemed reasonable. Then you changed the definition being used. Well, change the definition and you change the answer. Should people listed three pages of caveats before answering any question?

12. ### Wendy Moderator

Mar 24, 2008
20,772
2,540

Depending on the device, the math can be the same, large or small. Are you helping the OP, or trying to win an argument?

Last edited: Aug 31, 2012
13. ### fila Member

Feb 14, 2011
64
5
I would say m is gain and b is offset. I made a circuit, maybe you will find it helpful.

Input is a sine wave x = 0.5 * sin(ωt) [V], gain is m = -10 and DC offset is Vcc/2 = 12/2 = 6 V. Output is y = -5 * sin(ωt) + 6 [V].

suzuki likes this.
14. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,301
338
If the information the OP is given is not clear, then we do a disservice to the OP. My intent in the discussion WBahn and I are having is to clear up what seems to me an unclear point. If it seems like a debate that may be because we haven't yet cleared up the issue.

Looking at what I quoted in post #6, i see no definition of large signal gain, so when you answered my question by saying "you can't", what definition of large signal gain were you using and where did it appear in your post? You gave a definition of small signal gain but not large signal gain and it was large signal gain I was asking about.

But, let's start over.

Assume I'm responding to "You can't" from post #7. Using the large signal definitions you mentioned in post #9 explain why one can't calculate a large signal gain for the system you gave in post #3:

Vout(Vin) = a*Vin + b

for either or both definitions given the conditions I described in post #6:

I think this would be helpful to the OP, because as you pointed out in post #3, just saying "gain" without specifying whether it's large signal or small signal gain makes it difficult to answer the question. The answer for small signal gain is easy; it's the large signal gain that's problematic and is worth exploring.

15. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
It seems to me that the OP was asking about what was meant by 'gain' in a system in which Vout was not simply equal to a constant multiplied by Vin. Thus I was under the (apparently mistaken) impression that discussing the meaning of 'gain' under those conditions was on topic. I guess not. Since, apparently, trying to hash out differences and/or clarify things that aren't clear amounts to nothing more than 'trying to win an argument, this will be the last post I make in this thread. I'll even declare that I've lost the argument (though I am unsure of exactly who has supposedly won).

The definition of large signal gain that was implied (but not explicitly stated) is the definition of gain that most people, particularly students, initially grab at, namely Vout/Vin. By large-signal, I meant the total signal (the superposition of the operating point and the incremental (i.e., small) signal riding on top of it) as opposed to just the small-signal considered separately from the total signal.

When I said "you can't", I was thinking in terms of a single value that is independent of the signal. With small-signal gain, you have the constraint that the signal has to be small enough so as to not materially disturb the operating point (or at least the small-signal parameters about the operating point, if it is moving around), hence the gain is operating-point dependent, but not signal dependent.

I was also, admittedly, talking in terms of DC gain (or, perhaps more explicitly, of a large quasi-DC signal).

16. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,301
338
I wasn't able to get back to this for a while.

To me the goal is not "winning" an argument, but finding the truth. I don't even consider it an argument, but reasoned discussion. My purpose is, as you say, "trying to hash out differences and/or clarify things that aren't clear"; apparently the moderator didn't feel that we were doing just that.

Here's one of those things that lead to lack of clarity. I think it's better to explicitly state the definition you're using rather than to infer because others may not infer the same way.

If you were "thinking in terms of a single value that is independent of the signal.", that wasn't large signal gain as the term is usually used.

The characteristic distinguishing property of large signal gain as opposed to small signal gain, is that the large signal gain is not (generally) independent of the signal magnitude (in, for example, power amplifiers), even if the operating point remains constant. So, I would agree, that if one wishes to find a single value (of large signal gain) that is independent of signal, "...you can't.", typically. But, we can find a "gain" for a signal which is not small, and which depends on the signal amplitude and operating point; this is the large signal gain.

Harking back to the OP's original post:

He used the general term "gain" instead of the more specific terms "small signal gain" and "large signal gain".

The answer to his question is, yes, we can say the "gain" is m even for an equation that has offset, if he means "small signal gain" when he says just "gain". If he wants to include the notion of large signal gain, then the answer to his question is, it depends of the definition of large signal gain.