微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > RFIC设计学习交流 > 关于EE247码密度测试INL和DNL的疑问

关于EE247码密度测试INL和DNL的疑问

时间:10-02 整理:3721RD 点击:
最近在测试10bitSAR ADC的INL和DNL,芯片输入是正弦波,用的是EE247给的码密度matlab程序,但是程序中有一句T = -cos(pi*ch/sum(h));不太理解,望大神能指点一下。附:
datap=textread('4_1.txt','%s');
datan=textread('4_2.txt','%s');
datap=hex2dec(datap);
datan=hex2dec(datan);
y=datap-datan;
minbin=min(y);
maxbin=max(y);
% histogram
a=hist(y, minbin:maxbin);
h=a(1:2:end);
%h=h(2:end-1);
% cumulative histogram
ch = cumsum(h);
% transition levels found by:
T = -cos(pi*ch/sum(h));
% linearized histogram
hlin = T(2:end) - T(1:end-1);
% truncate at least first and last
% bin, more if input did not clip ADC
trunc=2;
hlin_trunc = hlin(1+trunc:end-trunc);
% calculate lsb size and dnl
lsb= sum(hlin_trunc) / (length(hlin_trunc));
dnl= [0 hlin_trunc/lsb-1];
misscodes = length(find(dnl<-0.99));
% calculate inl
inl= cumsum(dnl);

它里面有一篇参考文献 你去下下啦里面有原理说明你这个问题的

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top