# linearity of a curve

Status
Not open for further replies.

#### melkord

##### Full Member level 2
Hello,
I need to find the range where the curve (red) is still considered linear.
For this I ploted the first (yellow) and second (green) derivative.
I also marked when the second derivative drops 60% (arbitrarily chosen) from its peak.
But I am not sure, whether this is a fair way to define the range (in this case: 20.59 - 186.91 ns).
Is there any formal criterion/procedure for this?
I know what is linearity, but a bit confuse in this situation. First derivative is sufficient to get an idea about first order linearity.

Is there any formal criterion/procedure for this?

The first thing that come to mind is to find the polynomial function that depicts the curve

V(t) = at + bt2+ct3 + ...

Since your plot is for voltage, you could take the RMS value of each part, either the square of the linear (at)2 and the sum of the square of the remaining parts (bt2)2+(ct3)2 + ... and at the end, you calculate the ratio of each one over the whole.

If this is the output of an Amplifier or something where it can give a Sinusoidal Output, you can try a Sinewave Testing.
You can use the Calculator to provide the THD/SFDR for the waveform at the output for different ranges and choose the best among them.

Is there any specification on the linearity of your signal? You can use that to figure out how to measure the linearity.

Can provide further details if needed.

First derivative is sufficient to get an idea about first order linearity.
And how can I define the range of the linearity?
The first thing that come to mind is to find the polynomial function that depicts the curve

V(t) = at + bt2+ct3 + ...

Since your plot is for voltage, you could take the RMS value of each part, either the square of the linear (at)2 and the sum of the square of the remaining parts (bt2)2+(ct3)2 + ... and at the end, you calculate the ratio of each one over the whole.
Is there any more practical way that can be done in Cadence?
If this is the output of an Amplifier or something where it can give a Sinusoidal Output, you can try a Sinewave Testing.
You can use the Calculator to provide the THD/SFDR for the waveform at the output for different ranges and choose the best among them.

Is there any specification on the linearity of your signal? You can use that to figure out how to measure the linearity.

Can provide further details if needed.

It is actually a current source injecting current to a capacitor which is suspected to be nonlinear.
I need to check the linearity of VOUT. I don't think Sine-Wave testing is the one for you.

Is there any top level specification or something regarding the linearity? How is that defined? If that is available, we can back calculate the linearity specification for this circuit.

There are a bunch of different ways to specify linearity, so if we know the specification for the final circuit of which I am assuming this is a part of, then we can use that information. For all we know, the condition might not be tight and your entire range might be good enough for your application. Or it could be the other way round.

You can do what @andre_luis said by exporting the data to MATLAB or excel or something and doing some post processing there.

Status
Not open for further replies.