标题: 跪求计算adc的静态参数INL和DNL的matlab代码 [打印本页] 作者: 巴甫洛夫很忙 时间: 2017-3-14 15:59 标题: 跪求计算adc的静态参数INL和DNL的matlab代码 小弟毕业设计是测试c8051f560-TB单片机上adc的静态参数INL和DNL,现在急需计算matlab代码计算inl和dnl,求大神出现作者: lst19 时间: 2017-4-19 13:52
The code from Maxim can be found in the following link: https://www.maximintegrated.com/en/app-notes/index.mvp/id/2085
It can be used directly. Have fun.作者: xiaobao31 时间: 2017-7-19 14:53 回复 2#lst19
O(∩_∩)O谢谢作者: 风铃雨声 时间: 2018-4-28 12:09
thank you for your generation.作者: transistor7 时间: 2018-4-29 14:53 回复 1#巴甫洛夫很忙
please try this one.
-----------------------------------------------------------------------------------------
% dnl and inl plots from sine wave data% input vector y should contain the unbinned signal (integer numbers)% Boris Murmann, 2002function dnl_inl(y);details = 0; % set to 1 to plot intermediate results% histogram boundariesminbin=min(y);maxbin=max(y);numbins=maxbin-minbin+1;% histogramh= hist(y, minbin:maxbin);if (details) figure(2); plot(minbin:maxbin, h); title('Raw Histogram of ADC Output');end% cumulative histogramch= cumsum(h);% transition levelsT = -cos(pi*ch/sum(h));if (details) figure(3); plot(minbin:maxbin, T); title('Transitiion Levels');end% linearized histogramhlin = T(2:end) - T(1:end-1);if (details) figure(4); plot(minbin+1:maxbin, hlin); title('Linearized Histogram');end% truncate at least first and last bin, more if input did not clip ADCtrunc=2;hlin_trunc = hlin(1+trunc:end-trunc);% calculate lsb size and dnllsb= sum(hlin_trunc) / (length(hlin_trunc));dnl= [0 hlin_trunc/lsb-1];misscodes = length(find(dnl<-0.9));% calculate inlinl= cumsum(dnl);% plotfigure(1);subplot(2,1,1)plot(minbin+trunc:maxbin-trunc, dnl);xlabel('code');ylabel('DNL [LSB]');title(['DNL = +',num2str(max(dnl),2),' / ',num2str(min(dnl),2),' LSB, ', num2str(misscodes), ' missing codes (DNL<-0.9)'])subplot(2,1,2)plot(minbin+trunc:maxbin-trunc, inl);xlabel('code');ylabel('INL [LSB]');title(['INL = +',num2str(max(inl),2),' / ',num2str(min(inl),2),' LSB '])作者: 生如夏花 时间: 2019-12-19 12:19
谢谢分享作者: xyyyhtld0 时间: 2020-2-24 14:00
thanks作者: xyf333 时间: 2021-1-20 20:33
谢谢谢谢作者: auch0311 时间: 2023-8-11 16:33
谢谢作者: lgt_shark 时间: 2025-2-22 11:19