⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 techxclusives - digitally removing a dc offset (or dsp without math) - part 1.htm

📁 Source codes for DSP Spartan 3
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0161)http://www.xilinx.com/xlnx/xweb/xil_tx_printfriendly.jsp?iLanguageID=1&category=-1211408&sGlobalNavPick=&sSecondaryNavPick=&multPartNum=1&sTechX_ID=kc_dig_offset -->
<!-- GET STYLE SHEET FROM XSTYLE --><!-- Xilinx - WSS Script--><HTML><HEAD><TITLE>TechXclusives - Digitally Removing a DC Offset (or "DSP Without Math?") - Part 1</TITLE>
<SCRIPT language=javascript>  

function wss_strip (wss_text) {
   wss_text = wss_text.replace(/ \: /g, "---");    // Replace Colon with spaces with Dashes
   wss_text = wss_text.replace(/\:|\\|\|/g, "---");    // Replace with Dashes
   wss_text = wss_text.replace(/\!|\&|\#|\$|\%|\"|\'|\^|\*|\<|\>|\~|\;/g, "");  // Remove
   wss_text = wss_text.replace(/\s/g, "+"); // Replace with Plus
   return wss_text;
}

var hostName = window.location.hostname;  

var prodGlobalAcctNumber = "DM541217NCER96EN3"; 
var devGlobalAcctNumber = "DM5412147GMA96EN3"; 
var uatGlobalAcctNumber = "DM541214MHZN96EN3"; 
var pubGlobalAcctNumber = "DM541214DKDD96EN3";  

var devAcctNumber = "DM541214IBDA96EN3"; 
var uatAcctNumber = "DM541214J2DE96EN3"; 
var pubAcctNumber = "DM541214EFAF96EN3"; 
var prodAcctNumber = "DM5412144LAA96EN3";  

var hitBoxAcctNumber = prodGlobalAcctNumber + ";" + prodAcctNumber;  

devArray = new Array("xwebdev","devlinx","xddevlinx","xdtestlinx","xdstagelinx"); 
uatArray = new Array("xwebuat","xttestlinx","xtstagelinx","www.zylinks.com","www.origin.zylinks.com"); 
pubArray = new Array("xwebpub","xptestlinx","xpstagelinx","testlinx","stagelinx"); 
prodArray = new Array("www.xilinx.com","www.origin.xilinx.com","origin.xilinx.com");  

for (i=0; i<devArray.length; i++) { 	
if(hostName == devArray[i]) 	{ 		
hitBoxAcctNumber = devAcctNumber + ";" + devGlobalAcctNumber; 		
} } 
 for (i=0; i<uatArray.length; i++) { 	
if(hostName == uatArray[i]) 	{ 		
hitBoxAcctNumber = uatAcctNumber + ";" + uatGlobalAcctNumber; 		
} }  
for (i=0; i<pubArray.length; i++) { 	
if(hostName == pubArray[i]) 	{ 		
hitBoxAcctNumber = pubAcctNumber + ";" + pubGlobalAcctNumber; 		
} } 
for (i=0; i<prodArray.length; i++) { 	
if(hostName == prodArray[i]) 	{ 		
hitBoxAcctNumber = prodAcctNumber + ";" + prodGlobalAcctNumber; 		
} } 
</SCRIPT>
<!-- End Xilinx Script--><!--WEBSIDESTORY CODE HBX1.0 (Universal)--><!--COPYRIGHT 1997-2004 WEBSIDESTORY,INC. ALL RIGHTS RESERVED. U.S.PATENT No.6,393,479B1 & 6,766,370. INFO:http://websidestory.com/privacy-->
<SCRIPT language=javascript> 
var _hbEC=0,_hbE=new Array;
function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;} 
var hbx=_hbEvent("pv");
hbx.vpc="HBX0103u";
hbx.gn="wm.xilinx.com";  
//BEGIN EDITABLE SECTION //CONFIGURATION VARIABLES 
hbx.acct=hitBoxAcctNumber;
//alert("<!-- HitBoxAcct Number: "+hbx.acct +"-->");
//ACCOUNT NUMBER(S) 
hbx.pn="PUT+PAGE+NAME+HERE";//PAGE NAME(S) 
hbx.mlc="CONTENT+CATEGORY";//MULTI-LEVEL CONTENT CATEGORY 
hbx.pndef="index.htm";//DEFAULT PAGE NAME  Use value title to display page title instead of filename 
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY  //OPTIONAL PAGE VARIABLES //ACTION SETTINGS 
hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME 
hbx.lt="auto";//LINK TRACKING 
hbx.dlf="n";//DOWNLOAD FILTER 
hbx.dft="n";//DOWNLOAD FILE NAMING 
hbx.elf="n";//EXIT LINK FILTER  //SEGMENTS AND FUNNELS 
hbx.seg="";//VISITOR SEGMENTATION 
hbx.fnl="";//FUNNELS  //CAMPAIGNS 
hbx.cmp="";//CAMPAIGN ID 
hbx.cmpn="";//CAMPAIGN ID IN QUERY 
hbx.dcmp="";//DYNAMIC CAMPAIGN ID 
hbx.dcmpn="";//DYNAMIC CAMPAIGN ID IN QUERY 
hbx.dcmpe="";//DYNAMIC CAMPAIGN EXPIRATION 
hbx.dcmpre="";//DYNAMIC CAMPAIGN RESPONSE EXPIRATION 
hbx.hra="";//RESPONSE ATTRIBUTE 
hbx.hqsr="";//RESPONSE ATTRIBUTE IN REFERRAL QUERY 
hbx.hqsp="";//RESPONSE ATTRIBUTE IN QUERY 
hbx.hlt="";//LEAD TRACKING 
hbx.hla="";//LEAD ATTRIBUTE 
hbx.gp="";//CAMPAIGN GOAL 
hbx.gpn="";//CAMPAIGN GOAL IN QUERY 
hbx.hcn="";//CONVERSION ATTRIBUTE 
hbx.hcv="";//CONVERSION VALUE 
hbx.cp="null";//LEGACY CAMPAIGN 
hbx.cpd="";//CAMPAIGN DOMAIN  //CUSTOM VARIABLES 
hbx.ci="";//CUSTOMER ID 
hbx.hc1="";//CUSTOM 1 
hbx.hc2="";//CUSTOM 2 
hbx.hc3="";//CUSTOM 3 
hbx.hc4="";//CUSTOM 4 
hbx.hrf="";//CUSTOM REFERRER 
hbx.pec="";//ERROR CODES  //INSERT CUSTOM EVENTS  //END EDITABLE SECTION 
hbx.pn=wss_strip('TechX:TechX Print Friendly: Digitally Removing a DC Offset (or "DSP Without Math?")');</SCRIPT>
<LINK 
href="TechXclusives - Digitally Removing a DC Offset (or DSP Without Math) - Part 1_files/support_english_style.css" 
type=text/css rel=stylesheet>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT>
<!--
var isIE;
var isNav5;
var isNav4;
var pageLoaded = false;

  if ((navigator.appVersion.charAt(0) == "4")&&(navigator.appName == "Netscape"))
	 	{
		isNav4 = true;
		} 
	   else if ((navigator.appVersion.charAt(0) =="5")&&(navigator.appName =="Netscape")) {
 		isNav5 = true;
	    }		
       else if (navigator.appVersion.indexOf("MSIE") != -1) 
		{
		isIE = true;
	    }

 if (isIE || isNav5 || isIE5) {
	  divLayer ="DIV";
	} else {
	  divLayer ="LAYER";
	}
    var layerClass = "";
	if (isIE || isNav5 || isIE5) {
		layerClass 	= "style='visibility:hidden; position:absolute;'";
	} else {
		layerClass 	= "VISIBILITY='HIDE' POSITION='ABSOLUTE'";
    }
//-->
</SCRIPT>

<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<P><BR>
<TABLE cellSpacing=0 cellPadding=0 width=590 border=0>
  <TBODY>
  <TR>
    <TD colSpan=3>
      <TABLE cellSpacing=0 cellPadding=0 width=590 border=0>
        <TBODY>
        <TR>
          <TD><IMG height=5 
            src="TechXclusives - Digitally Removing a DC Offset (or DSP Without Math) - Part 1_files/dot_clear.gif" 
            width=1><BR><SPAN class=STEP-HEADING-TEXT>TechXclusives</SPAN></TD>
          <TD align=right><A 
            href="http://www.xilinx.com/xlnx/xweb/xil_tx_printfriendly.jsp?iLanguageID=1&amp;category=-1211408&amp;sGlobalNavPick=&amp;sSecondaryNavPick=&amp;sTechX_ID=kc_dig_offset&amp;multPartNum=1"><IMG 
            title="Print version" alt="Print version" 
            src="TechXclusives - Digitally Removing a DC Offset (or DSP Without Math) - Part 1_files/xsupp_print.gif" 
            border=0></A></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD colSpan=3><IMG height=1 
      src="TechXclusives - Digitally Removing a DC Offset (or DSP Without Math) - Part 1_files/xsupp_redhr.gif" 
      width=590></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=600>
  <TBODY>
  <TR>
    <TD><FONT face="Times New Roman" size=2>
      <H2>Digitally Removing a DC Offset (or "DSP Without Math?") - Part 
      1</H2></FONT></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=600>
  <TBODY>
  <TR>
    <TD align=right>Back to <A 
      href="http://www.xilinx.com/xlnx/xweb/xil_tx_display.jsp?iLanguageID=1&amp;category=-1211408&amp;sGlobalNavPick=&amp;sSecondaryNavPick=&amp;multPartNum=1&amp;sTechX_ID=kc_dig_offset">Digitally 
      Removing a DC Offset (or "DSP Without Math?")</B></A> </TD></TR></TBODY></TABLE>
<TABLE width=600 border=1>
  <TBODY>
  <TR bgColor=#f7f7e7>
    <TD width="50%"><FONT face="Times New Roman" size=2><B>Author: </B>Ken 
      Chapman<BR></FONT></TD>
    <TD bgColor=#e7e7de><FONT face="Times New Roman" size=2><B>Publication 
      Date:</B> 02/03/2003<BR></FONT></TD></TR></TBODY></TABLE>
<TABLE width=600 border=1>
  <TBODY>
  <TR>
    <TD>
      <P><FONT face="Times New Roman" size=2>
      <H4>Introduction</H4>
      <P>
      <P>Digital Signal Processing (DSP) - Does the very mention of this topic 
      make you think of horrible mathematics and make you have the burning 
      desire to dive for cover? If it does, then maybe you should approach the 
      whole subject the way I started to about 8 years ago. Rather than start 
      with mathematics, try to understand how simple functions in the analogue 
      world can be modeled, and then convert them into digital representations. 
      </P>
      <P>In Parts 1 and 2 of this TechXclusive, I am going to examine how to 
      remove the DC content from a digitally sampled waveform using DSP without 
      mathematics -- well, nothing difficult, anyway! The first article will 
      take a very gentle look at DSP and illustrate how to create a circuit 
      capable of performing the required signal processing. In the second 
      article, I will look at how to optimise the derived function for use in 
      audio telecom applications, using my favorite SRL16E mode. 
      <P>
      <P>
      <H4>Sampled Waveforms </H4>
      <P>
      <P>So, let's start by taking a look at the input signal. You may remember 
      that DSP is all about digital samples, which are numbers that represent 
      the amplitude of a waveform taken at regular intervals. These are normally 
      the result of an Analogue-to-Digital Converter (A/D or ADC) that generates 
      values of a given number of bits (resolution) at a sample rate set by a 
      sample clock. </P>
      <P>In the upper plot, we see an analogue waveform being applied to the 
      A/D. The input signal needs to remain within the specified input range 
      voltage swing of the A/D converter (in this case, ±1 volt). The A/D will 
      sample this waveform at a frequency (fs) that is relatively fast in 
      comparison to the frequency content of the signal. (Remember that Nyquist 
      says you have to sample at a rate at least twice that of the highest 
      frequency present?) </P>
      <P>Test signal formed of 800Hz and 960Hz components with a DC offset <IMG 
      src="TechXclusives - Digitally Removing a DC Offset (or DSP Without Math) - Part 1_files/DC1.gif"></P>
      <P>In the lower plot, the actual digital samples provided by the A/D are 
      shown as red dots. The most important part of DSP has happened! In this 
      case, the samples are represented by 8-bit numbers. A twos complement 
      format is used in order to represent both positive and negative 
      quantities. The first values of the plot are +104, +80, +31, -19, -48, and 
      -44. We know that these can be represented in hexadecimal by 68, 50, 1F, 
      ED, D0, and D4. So, all that DSP has to do is work with such a stream of 
      numerical data and manipulate it in some way. </P>
      <P>Although the only information you have to work with are the values 
      represented by the red dots, the shape of the waveform can be made more 
      apparent by joining the dots with straight lines. Now we can once again 
      "see" the analogue waveform; of course, it is less pure than it originally 
      was (the essence of quantisation noise). </P>
      <P><IMG 
      src="TechXclusives - Digitally Removing a DC Offset (or DSP Without Math) - Part 1_files/DC2.gif"></P>
      <P>Looking at the waveform plots, we can see that they contain high 
      frequency components of some kind (800Hz and 960Hz in this test case). We 
      also see that the waveform spends a greater percentage of time above the 
      zero axis than it does below it, indicating some kind of positive DC bias. 
      This is clearly seen in the digital plot, as there are many more positive 
      red dots than negative. </P>
      <P>Generally speaking, a DC offset such as this is undesirable, because it 
      tends to mean that the positive peaks of the waveforms are more likely to 
      exceed the maximum level that can be represented. In the ideal world, the 
      DC offset would be removed before the A/D conversion; however, this may be 
      difficult to achieve. Indeed, it may be that the analogue components have 
      unintentionally inserted the DC bias as part of the signal amplification 
      and conditioning. </P>
      <P>
      <H4>Removing DC Offset </H4>
      <P>
      <P>Now, given that a DC offset has a frequency of zero, the DC offset can, 
      theoretically, be removed by the use of a high pass filter. This may lead 
      us directly into the world of serious DSP and investigation of such things 
      as FIR (Finite Impulse Response) filters. However, I would like to take a 
      more empirical approach to solving this problem -- let's avoid as much 
      math as possible and hopefully find a much easier and cost-effective 
      implementation!</P>
      <P>If I know what the DC offset level is, then it is possible to remove it 
      with a simple subtraction. As if by magic, I have now determined that the 
      DC offset of the digital samples is equivalent to the value "+19". So, all 
      we have to do is take each input sample from the A/D converter and 
      subtract the value 19 from it. The output from the subtractor is the 
      waveform without any DC offset. We have just performed DSP, because we 
      have manipulated a stream of digital samples to form new samples. The 
      value of the first sample is, of course, +104 -19 = +85. </P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -