在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            EEPW首頁(yè) > 測(cè)試測(cè)量 > 設(shè)計(jì)應(yīng)用 > 測(cè)量差分輸出、電流模式數(shù)/模轉(zhuǎn)換器(DAC)的線(xiàn)性度

            測(cè)量差分輸出、電流模式數(shù)/模轉(zhuǎn)換器(DAC)的線(xiàn)性度

            作者: 時(shí)間:2017-02-27 來(lái)源:網(wǎng)絡(luò) 收藏




            表3. 5-4-3體系結(jié)構(gòu)的12位編碼組



            定義了編碼組后,必須解決采集測(cè)量點(diǎn)的問(wèn)題。適合這類(lèi)測(cè)量的萬(wàn)用表是Agilent? 3458,分辨率高達(dá)8.5位。該表連接在MAX5891的OUTP和OUTN端之間,輸出端以50Ω負(fù)載接地。當(dāng)DAC設(shè)置為20mA滿(mǎn)量程電流時(shí),萬(wàn)用表輸入得到的電壓擺幅是±1V。

            萬(wàn)用表量程設(shè)置為固定的1.2V,使用最大分辨率,得到10nV最小測(cè)量結(jié)果。切換表的量程會(huì)增大測(cè)量值的增益誤差;因此,使用單電壓量程可以避免其他的誤差源。由于需要鎖存數(shù)字輸入,MAX5891還需要時(shí)鐘信號(hào)。一旦連接好了萬(wàn)用表、時(shí)鐘源、電源和數(shù)字輸入控制,就可以采集線(xiàn)性度測(cè)量點(diǎn)。

            采集所有測(cè)量點(diǎn)后,需要畫(huà)出重建后的DAC輸出傳輸函數(shù)。由于對(duì)每一電流源都進(jìn)行了測(cè)量,很容易產(chǎn)生對(duì)應(yīng)于所有編碼的傳輸函數(shù)。例如,考慮器件的4個(gè)LSB。我們測(cè)量編碼0x8000、0x8001、0x8002、0x8004和0x8008。對(duì)于編碼0x8000,LSB計(jì)算的基準(zhǔn)是DAC量程中部。LSB權(quán)重是在0x8001測(cè)得的電壓值減去在0x8000測(cè)得的電壓值。

            在0x8001和0x8780之間測(cè)量的所有編碼采用相同的公式。0x0800到0xF800的其他點(diǎn)是MSB電流源,以編碼0x0000為基準(zhǔn)進(jìn)行計(jì)算??紤]編碼0x4F31作為各種電流相加的例子。

            首先,我們需要確定哪一測(cè)量點(diǎn)什么時(shí)候相加能夠等于實(shí)例編碼。0x4800是小于目標(biāo)編碼的最大MSB。從0x4F31中減去0x4800后的余數(shù)為0x0331。編碼0x0300是可以減掉的次最大編碼(0x8300 - 0x8000),隨后是0x0030 (0x8030 - 0x8000),最后是0x0001 (0x8001 - 0x8000)。

            因此,可以采用下面的等式來(lái)表示編碼0x4F31的電壓值:

            [V(0x4800) - V(0x0000)] + [V(0x8300) - V(0x8000)] + [V(0x8030) - V(0x8000)] + [V(0x8001) - V(0x8000)](公式1)

            使用相似的等式,可以計(jì)算任意給定輸入編碼的電壓值。利用MATLAB?或Excel?軟件等工具可以很容易地計(jì)算所有編碼的電壓,重建全部的DAC傳輸。

            一旦建立了傳輸函數(shù),就可以計(jì)算線(xiàn)性度。第一步是根據(jù)傳輸函數(shù)的端點(diǎn)計(jì)算LSB的電壓值(端點(diǎn)法)。

            VLSB = [V(0xFFFF) - V(0x0000)]/[2N - 1](公式2)

            其中

            N是器件分辨率 (16、14或者12位)

            V(0x0000)是測(cè)得的DAC零標(biāo)輸出電壓。

            V(0xFFFF)是測(cè)得的DAC滿(mǎn)幅輸出電壓。

            采用下面的等式來(lái)計(jì)算任意給定編碼的INL:

            INLCODE(LSB) = [VCODE - (CODE × VLSB)]/VLSB(公式3)

            其中

            CODE是要計(jì)算的數(shù)字編碼。

            VLSB是公式2中計(jì)算的電壓值。

            VCODE是計(jì)算的DAC輸出電壓值。

            下面的等式用于計(jì)算任意給定編碼的DNL:

            DNLCODE(LSBs) = [VCODE - VCode-1 - VLSB]/VLSB(公式4)

            其中

            CODE是要計(jì)算的數(shù)字編碼。

            VCODE是針對(duì)CODE計(jì)算的DAC輸出電壓值。

            VCODE-1是針對(duì)CODE - 1計(jì)算的DAC輸出電壓值。

            VLSB是公式2中計(jì)算的電壓值。

            以下舉例說(shuō)明利用MATLAB腳本計(jì)算MAX5889、MAX5890和MAX5891的線(xiàn)性度。每次計(jì)算都得到最小和最大DNL和INL誤差編碼和誤差值。實(shí)例還為所有編碼畫(huà)出了傳輸函數(shù),得到INL和DNL。要求用戶(hù)輸入前面表格中所列出編碼的電壓測(cè)量值。必須按照所列順序輸入數(shù)值。

            計(jì)算16位線(xiàn)性度的MATLAB腳本

            function Lin16(Measurements)
            %Calculate INL and DNL of a 16-bit device with a 5-4-3-4 segmentation architecture
            % DACCodes is the range of possible input data to the 16-bit DAC
            DACCodes=[0:65535]’;
            %VOUT for each code is calculated from the measured points
            %create a VOUT variable and fill it with zeros
            VOUT=zeros(size(DACCodes));
            %The first measurement is the zero-scale point, or code (0x0000)
            ZS=Measurements(1);
            VOUT(1)=ZS;
            %The last measurement is the full-scale point, or code (0xFFFF)
            FS=Measurements(length(Measurements));
            VOUT(65536)=FS;
            %Midscale is stored at position 43 of the input data array
            MS=Measurements(43);
            %The device has four segmentation levels
            Segments=4;
            %The decimal values for the LSB codes are 1, 2, 4 and 8
            Seg1Codes=[1;2;4;8];
            %The voltages for the LSBs are in positions 2-5 of the input array
            for i=1:4
            Seg1V(i)=Measurements(i+1)-MS;
            end
            %The second level of segmentation is controlled with input codes 16 through
            %112 in steps of 16. Create the code array and fill the measurements for
            %this segmentation level
            Seg2Codes=[16:16:16*7]’;
            for i=1:7
            Seg2V(i)=Measurements(i+5)-MS;
            end
            %Segmentation level 3 uses input codes 128 through 1920 in steps of 128.
            %Create the code array and fill the measurements array.
            Seg3Codes=[128:128:128*(2^4-1)]’;
            for i=1:15
            Seg3V(i)=Measurements(i+12)-MS;
            end
            %Segmentation level 3 uses input codes 2048 through 63,488 in steps of 2048.
            %Create the code array and fill the measurements array.
            Seg4Codes=[2048:2048:2048*(2^5-1)]’;
            for i=1:31
            Seg4V(i)=Measurements(i+27)-ZS;
            end
            %The endpoints have been defined, now fill in the voltages for the
            %remaining points of the DAC transfer function.
            for i = 2:65535
            targetcode=i-1;
            VOUT(i)=ZS;
            for s=31:-1:1
            if Seg4Codes(s)<=targetcode
            targetcode=targetcode-Seg4Codes(s);
            VOUT(i)=VOUT(i)+Seg4V(s);
            s=0;
            end
            end
            for s=15:-1:1
            if Seg3Codes(s)<=targetcode
            targetcode=targetcode-Seg3Codes(s);
            VOUT(i)=VOUT(i)+Seg3V(s);
            s=0;
            end
            if targetcode==0
            s=0;
            end
            end
            for s=7:-1:1
            if Seg2Codes(s)<=targetcode
            targetcode=targetcode-Seg2Codes(s);
            VOUT(i)=VOUT(i)+Seg2V(s);
            s=0;
            end
            if targetcode==0
            s=0;
            end
            end
            if targetcode==0
            s=0;
            end
            for s=4:-1:1
            if Seg1Codes(s)<=targetcode
            targetcode=targetcode-Seg1Codes(s);
            VOUT(i)=VOUT(i)+Seg1V(s);
            end
            end
            end
            %Plot the transfer function
            figure(1)
            plot(DACCodes, VOUT);
            xlabel(‘DAC Input Code’);
            ylabel(‘Measured Voltage’);
            axis([0 65536 -1.1 1.1]);
            title(‘DAC Transfer Function’);
            set(gca,’XTick’,0:16384:65536)
            %Calculate the linearity
            LSB=(max(VOUT)-min(VOUT))/65535;
            INL(1)=0;
            DNL(1)=0;
            for i=2:65536
            INL(i)=(VOUT(i)-(VOUT(1)+(i-1)*LSB))/LSB;
            DNL(i)=(VOUT(i)-VOUT(i-1)-LSB)/LSB;
            end
            %Plot INL
            figure(2)
            plot(DACCodes, INL);
            title(‘DAC Integral Linearity’);
            xlabel(‘DAC Input Code’);
            ylabel(‘INL (LSBs)’);
            axis([0 65536 min(INL)*1.1 max(INL)*1.1]);
            set(gca,’XTick’,0:16384:65536)
            %Plot DNL
            figure(3)
            plot(DACCodes, DNL);
            title(‘DAC Differential Linearity’);
            xlabel(‘DAC Input Code’);
            ylabel(‘DNL (LSBs)’);
            axis([0 65536 min(DNL)*1.1 max(DNL)*1.1]);
            set(gca,’XTick’,0:16384:65536)
            txtstr=sprintf(‘INL MAX = %f’, max(INL));
            disp (txtstr);
            txtstr=sprintf(‘INL MIN = %f’, min(INL));
            disp (txtstr);
            txtstr=sprintf(‘DNL MAX = %f’, max(DNL));
            disp (txtstr);
            txtstr=sprintf(‘DNL MIN = %f’, min(DNL));
            disp (txtstr);






            16位腳本產(chǎn)生的曲線(xiàn)


            上一頁(yè) 1 2 下一頁(yè)

            關(guān)鍵詞: 測(cè)量DAC電

            評(píng)論


            技術(shù)專(zhuān)區(qū)

            關(guān)閉