# calculating INL the direct way

#### yefj

##### Full Member level 5 Hello, In a situation bellow we have a 3bit adc where avarage LSB from the non idial system is  I want to calculate the INL purely from the idial and actual columns of the table shown bellow.
I have trie to calculate INL for Logic 001 ,V_idial=0.05 V_real=0.091 avarage step=0.08
INL(001)=(0.07-0.05)/0.091=-0.071
INL(010)=(0.15-0.15)/0.091=0
I get a totally different numvers then the INL in the solution.
Where did i go wrong? i did everything like the formal straight forward definition.
Thanks. #### Attachments

• 17 KB Views: 1

#### sutapanaki INL for the first and last code transitions is 0 and that's by definition. Especially if you do the end points fit fort he ideal ADC characteristic.

#### yefj

##### Full Member level 5 Yes but it contradicts the formula:
The formula says real_voltage(n )-idial_voltage(n )
for n=001 real_voltage=0.07 and idial is 0.05 we dont get any zero if we follow the formula.
Why am i wrong?
Thanks.

Last edited:

#### sutapanaki You are wrong because the formula does not apply for the first and last code. For the first and last codes both real and ideal adc characteristics have the same transition. You have to have a starting and ending point between which you look at the deviation of the real curve with respect to the ideal. So you fix the first and last points and let everything in-between deviate.

#### yefj

##### Full Member level 5 Ok so the formula does not apply for 001 and 111 they by definition have INL 0.

What about in code 010 by formula its INL(010)=(0.15-0.15)/0.091=0 whre as in the solution its -0.13.
Why i am wrong here too?

#### sutapanaki Your average LSB= 0.0917. Transition to 001 for both actual and uniform characteristic happens at 0.07. The actual transitions to 010 at 0.15 and the uniform at 0.01+0.0917=0.1617. Then the INL for 010 is (0.15-0.1617)/0.0917=-0.1276 which is approximately -0.13

#### yefj

##### Full Member level 5 Hello Sutapanaki, till now i thought INL is subtraction beteen ACTUAL and IDIAL voltage at a certain logic for example 010.
but you subtracted UNIFORM voltage at 010 from the ACTUAL at 010.
What is the difference between idial voltage and uniform voltage? and where am i wrong in my INL definition?
Thanks.

#### Dominik Przyborowski Nonlinearity is calculated after offset and gain correction. So reference transfer function is an end point line.

#### yefj

##### Full Member level 5 Last edited:

#### sutapanaki We can not use ideal transfer because we fix the two end points. If you only fix the 1st point, then the end point of actual and ideal will differ because of gain error. Then, the actual and ideal have some offset, too. If you fix both first and last points you don't care about offset and gain errors, after all these are DC quantities and should not affect linearity. But in this case you will have to divide uniformly the range between first and last points of the actual transfer to get your reference uniform characteristic.

For 100

(0.33-0.345)/0.0917 = -0.163

The uniform voltage is not 0.35 but 0.345. You can easily get all uniform voltages by starting from 0.07 and adding consecutively 0.0917.

Last edited:

#### yefj

##### Full Member level 5 Hello, I tried to calculate DNL for 100 i get 0.75 but in the table its -0.24
Why am i wrong here too?
Thanks.
DNL(100)=(V_actual(100)-V_actual(011)-Savg)/Savg=(0.33-0.17)/0.091 -1=0.75[LSB]

V_actual(100)=0.33
V_actual(011)=0.17
Savg=0.091

#### sutapanaki [(0.4-0.33)-0.0917]/0.0917 = -0.237

• yefj

### yefj

points: 2

#### yefj

##### Full Member level 5 So DNL(N)=(V_actual(N)-V_actual(N-1)-Savg)/Savg
and INL(N)=actual(N )-uniform(N ) /Savg

Thanks.

#### sutapanaki 