Abstract:
A method and apparatus are provided for the removal of significant broad-band noise from waveforms acquired for time domain network analysis. The method may include the steps of providing the noisy waveform as an input waveform, determining a frequency domain noise shape associated with the input waveform, calculating a wavelet domain noise shape from the frequency domain noise shape, calculating a discrete wavelet transform of the input waveform to form a wavelet domain waveform, and estimating the noise statistics from the wavelet domain waveform. A threshold may be calculated from the estimated noise statistics and the wavelet domain noise shape, and the threshold may be applied to the wavelet domain waveform to form a denoised wavelet domain waveform. Finally, an inverse discrete wavelet transform of the denoised wavelet domain waveform may be calculated to form a denoised waveform.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
     This application claims the benefit of U.S. Provisional Patent Application 61/300,149, filed Feb. 1, 2010 titled “Wavelet Denoising” to Pupalaikis et al.; U.S. Provisional Patent Application 61/300,160, filed Feb. 1, 2010 titled “Wavelet Denoising” to Pupalaikis et al.; U.S. Provisional Patent Application 61/300,230, filed Feb. 1, 2010 titled “Time Domain Reflectometry Step to S-Parameter Conversion” to Pupalaikis et al.; and U.S. Provisional Patent Application 61/355,182, filed Jun. 16, 2010 titled “Wavelet Denoising for Time-Domain Network Analysis” to Pupalaikis et al., the contents of each of these applications being incorporated herein by reference. 
    
    
     FIELD OF THE INVENTION 
     The present invention relates to network analysis instruments in general and specifically to network analysis instruments that measure scattering parameters (s-parameters) and more specifically to s-parameter measurement instruments using time domain methods and most specifically to methods of decreasing noise and therefore dynamic range in time domain network analysis. 
     BACKGROUND OF THE INVENTION 
     Network analyzers are instruments that characterize networks. The characterization result is based on conventions and define how the network will perform under various conditions. In signal integrity applications, the common network parameters in use are scattering parameters, or s-parameters. S-parameters define port to port relationships in a network when the network is driven by a source whose impedance is set to the reference impedance and all other ports are terminated in that same reference impedance. This convention allows scattering parameters to completely define the behavior of a network under any other driving and termination conditions. 
     A standard instrument for s-parameter measurement is the vector network analyzer (VNA). This instrument stimulates a network with sinusoidal incident wave-forms and measures the reflected sinusoidal waveforms at the network ports. This instrument is most commonly used in the field of microwave analysis. It is a very expensive instrument. 
     Another instrument used for s-parameter measurement uses techniques called time domain reflectometry (TDR) and time domain transmission (TDT) (Here we will use the commonly used acronym TDR to represent both techniques, the name of the instrument itself, and time domain analysis in general). TDR stimulates a network with an incident step, or pulse and measures reflected waveforms at the network ports. This instrument is most commonly used in the field of signal integrity. TDR is much less expensive than the VNA and has various advantages and disadvantages compared to the VNA. 
     Because of their cost, familiarity in the signal integrity field, and other reasons it is advantageous to measure s-parameters using time domain methods. 
     A well known drawback of time domain methods for s-parameter measurement is lack of dynamic range. While VNAs boast 90-110 decibels (dB) of dynamic range, it has been difficult to produce TDR instruments that can achieve much higher than 40 dB of dynamic range. 
     What is needed is a time domain s-parameter measurement instrument with higher dynamic range. 
     OBJECTS OF THE INVENTION 
     It is an object of this invention to provide methods for network analysis that provide high dynamic range. 
     It is a further object of this invention to provide methods and apparatuses that overcome the drawbacks to the prior art noted above. 
     Still other objects and advantages of the invention will in part be obvious and will in part be apparent from the specification and drawings. 
     SUMMARY OF THE INVENTION 
       FIG. 2  is an illustrative measurement example that is used as a context for summarizing the present invention. It shows conceptually a cable bundle [ 18 ]containing an internal transmission line [ 19 ] and another internal transmission line [ 20 ]. The equivalent signal flow diagram is shown below. All nodes labeled with a preceding “a” are ports where incident waves enter and all nodes labeled with a preceding “b” are where reflected waves exit. The “a” and “b” are followed by the port number. The complex weight of each arrow represent the s-parameters being measured. Each arrow goes from an incident wave entry node to a reflected wave exit node. The s-parameters are labeled S[n][m] corresponding to an arrow between node am and node bn. Some particular s-parameters which represent measurements of interest are indicated such as insertion loss [ 23 ], return loss or impedance [ 24 ], near end crosstalk (NEXT) [ 25 ] and far end crosstalk (FEXT) [ 26 ]. FEXT measurements are particularly illustrative because it is a measurement of the transmission between port  1  [ 21 ] and port  3  [ 22 ] which can be seen in  FIG. 2  to be not connected ideally. FEXT is a sensitive measurement as the signal transfer from port  1  [ 21 ] to  3  [ 22 ] tends to be very small. To further enhance the example, consider a FEXT measurement of a twenty foot cable. It is illustrative because the device is electrically long requiring longer time domain waveforms, is lossy, and, as will be explained subsequently, involves considerable noise. 
       FIG. 3  depicts an example FEXT measurement. Here, one can see FEXT sitting above the noise floor [ 27 ] of about −10 to −30 dB below 5 GHz. Above 5 GHz, one sees only the measurement noise floor [ 28 ]. 
     The inventors of the present invention have determined that the magnitude of this noise depends on several factors. To understand the source of this noise, consider the step [ 35 ] as is shown in  FIG. 8  which depicts the waveform seen at port  3  [ 22 ] as a result of driving port  1  [ 21 ] with a 250 mV amplitude step waveform. This step [ 35 ] does not look too noisy visually. Consider however that we are interested in the signal to noise ratio (SNR), and the energy content of the step waveform is dropping rapidly with frequency. Furthermore, the amplitude of the step [ 35 ] is a mere 60 mV at most. It is useful to perform measurements on the difference of the step waveforms acquired. This normalizes the frequency content of the waveform and accentuates noise, but has no actual effect on SNR. The difference [ 30 ] is shown in the vicinity of the electrical length of the cable. Here we see that the information content is actually buried quite well in the noise. 
     The difference [ 30 ] frequency content [ 37 ] shows the noise spread over the entire region of interest from DC to 40 GHz which render traditional noise filtering methods useless. 
     Consider  FIG. 1  which shows a process for removing significant amounts of noise in accordance with a preferred embodiment of the present method and invention. The goal is to generate a denoised raw s-parameter measurement [ 1 ] with the understanding that this represents a portion of the network analysis function that is followed by significantly more calculation that is traditionally performed in TDR and VNA instruments which utilize many such raw measurements. A single denoised raw s-parameter measurement [ 1 ] requires the step waveform that contains the step waveform acquired at the driven port [ 2 ] and at another or the same port [ 3 ]. Both waveforms require denoising with [ 3 ] requiring the most because of the length of the reflect portion. The denoising of the step [ 3 ] is explained in this summary with the understanding that step [ 2 ] undergoes the equivalent operation as shown in  FIG. 1 . 
     Step [ 3 ] first may undergo a difference operation [ 4 ] which approximates the derivative. Then, the discrete wavelet transform (DWT) [ 6 ] may be computed. The DWT has it&#39;s foundations in discoveries by Haar (see Haar A., Zur Theorie der orthogonalen Funktionensysteme, Mathematische Annalen, 69, pp 331-371, 1910) and is known to those skilled in the art of signal processing. The DWT first requires a choice of a wavelet. In a preferred embodiment, a Daubechie&#39;s wavelet, a wavelet determined by the number of coefficients in it&#39;s wavelet scaling function, is chosen. See Ingrid Daubechies, Ten Lectures on Wavelets, Society for Industrial and Applied Mathematics, 1992, ISBN 0-89871-274-2. A list of several wavelet coefficients are shown in  FIG. 13  for reference. DWT [ 6 ] operates in accordance with the algorithm shown in  FIG. 20  provided for reference. Prior to calculation of the DWT, the derivative waveform may be padded in the front with zeros to bring it to the next higher power of two. 
     Based on the wavelet chosen, the number of points, and the effect of the difference on noise shape, the shape of the noise may be calculated using the noise shape calculator [ 5 ]. As long as the wavelet coefficients and the number of points in the waveform remain constant, the noise shape needs calculation only once. The algorithm used by the noise shape calculator [ 5 ] is shown in  FIG. 22 . 
     Based on the wavelet chosen and the DWT calculated at the output of DWT [ 6 ], the noise in the DWT scales are estimated by the noise estimator [ 7 ]. The output of the noise estimator [ 7 ] may be used in conjunction with the output of the noise shape calculator [ 5 ] to produce a threshold [ 8 ]. The algorithm for estimating the noise and calculating this threshold is shown in  FIG. 23 . This threshold [ 8 ] in conjunction with the output of the DWT [ 6 ] may be used, in a preferred embodiment, in a hard threshold [ 9 ] operation whose algorithm is shown in  FIG. 24 . The result is a wavelet domain waveform with a significant amount of noise removed. While a hard threshold is described above, other appropriate threshold operations are possible including, but not limited to, soft thresholding and similar coefficient shrinkage techniques. 
     The result of the hard threshold [ 9 ] operation may then be transformed back to the time domain using the inverse discrete wavelet transform (IDWT) [ 10 ] in accordance with the algorithm shown in  FIG. 21  provided for reference. The result of the IDWT [ 10 ] can optionally be supplied to the integrator [ 11 ] to provide a denoised version of the step waveform [ 3 ]. The result of the IDWT [ 10 ] may be supplied to the reflect extractor [ 12 ] which extracts the reflected waveform portion based on time location information in the input step waveform [ 3 ]. Note that [ 12 ] performs a nontrivial operation only if N=M (i.e. the step waveform [ 3 ] is the same as the driven step waveform [ 2 ]). The discrete Fourier transform (DFT) [ 13 ] thereafter may convert the result of the reflect extractor [ 12 ] to the frequency domain where the resulting complex vector forms the numerator [ 14 ] in the division operation [ 15 ] which divides by the denoised incident result which forms the denominator [ 16 ]. The result is the denoised raw s-parameter [ 1 ]. 
     It is the result of the denoising block [ 17 ], in conjunction with the other various features described herein, that comprise a main subject of a preferred embodiment of the present invention. With regard to the example provided, the denoising block [ 17 ] preferably transforms the example waveform [ 30 ] which would appear at the output of difference operation [ 4 ] into the denoised difference waveform [ 31 ] which has significant noise removed [ 36 ] while retaining key waveform features that measure the crosstalk. The noise removed [ 36 ] and its representation in the frequency domain [ 39 ] shows that the noise is homogeneous in the region of the key signal features and that the noise removed is spread over the entire frequency spectrum of interest. The frequency content of the resulting denoised waveform [ 38 ] shows that the frequency content extends well below the original noise floor, greatly improving the SNR of the measurement and therefore the dynamic range. 
     When all waveforms acquired for s-parameter measurement are denoised, the resulting FEXT calculated [ 29 ] in  FIG. 4  may be contrasted with the FEXT calculated without application of the present invention in  FIG. 3  to see the extreme improvement in measurement dynamic range that may be achieved in accordance with application of one or more embodiments of the present invention. 
     The invention accordingly comprises the several steps and the relation of one or more of such steps with respect to each of the others, and the apparatus embodying features of construction, combinations of elements and arrangement of parts that are adapted to affect such steps, all is exemplified in the following detailed disclosure, and the scope of the invention will be indicated in the claims. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       For a more complete understanding of the invention, reference is made to the following description and accompanying drawings, in which: 
         FIG. 1  is a block diagram showing wavelet denoising for s-parameter measurements in accordance with an embodiment of the present invention; 
         FIG. 2  is an example four port cable providing the context for a FEXT measurement; 
         FIG. 3  is an example FEXT measurement without denoising; 
         FIG. 4  is an example FEXT measurement with denoising applied according to one or more preferred embodiments of the present invention; 
         FIG. 5  is an example difference of a step waveform without denoising; 
         FIG. 6  is a denoised example difference waveform generated in accordance with an embodiment of the present invention; 
         FIG. 7  is an example wavelet coefficients with the determined hard threshold value generated according to one or more embodiments of the present invention; 
         FIG. 8  is an example step waveform without denoising; 
         FIG. 9  is a representation of noise removed from an example difference waveform with denoising applied according to one or more embodiments of the present invention; 
         FIG. 10  is a frequency domain representation of the example difference waveform without denoising; 
         FIG. 11  is a frequency domain representation of an example denoised difference waveform provided in accordance with an embodiment of the present invention; 
         FIG. 12  is a frequency domain representation of the noise removed from the example difference waveform in accordance with an embodiment of the invention; 
         FIG. 13  is a list of wavelet scaling function coefficients provided for reference in accordance with an embodiment of the invention; 
         FIG. 14  is a block diagram of a wavelet transform operation in accordance with an embodiment of the invention; 
         FIG. 15  is a filter responses of the wavelet low pass filter function and the quadrature mirror filter (QMF) high pass filter function of a Daubechie&#39;s 4 tap wavelet in accordance with an embodiment of the present invention; 
         FIG. 16  is a noise shape effect of the difference operation presented in the frequency domain in accordance with an embodiment of the invention; 
         FIG. 17  illustrates the effect of the wavelet transform on level 1 coefficients in accordance with an embodiment of the invention; 
         FIG. 18  illustrates the effect of the wavelet transform on level 2 coefficients in accordance with an embodiment of the invention; 
         FIG. 19  illustrates a noise shape in an undecimated spectrum of each wavelet transform scale in accordance with an embodiment of the invention; 
         FIG. 20  depicts a prior art algorithm for calculating a discrete wavelet transform (DWT); 
         FIG. 21  depicts a prior art algorithm for performing an inverse discrete wavelet transform (IDWT); 
         FIG. 22  depicts an algorithm employed by a noise shape calculator in accordance with an embodiment of the invention; 
         FIG. 23  depicts an algorithm for estimating the noise and calculating a threshold in accordance with an embodiment of the invention; and 
         FIG. 24  depicts an algorithm for a hard threshold calculation in accordance with an embodiment of the invention. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A detailed description of the invention will now be provided, making reference to the following drawings in which like reference numbers designate similar structure or steps. 
     In accordance with the invention, it can be shown that an expression for dynamic range in a time domain network analysis instrument is expressed as: 
     
       
         
           
             
               
                 
                   
                     SNR 
                     n 
                   
                   = 
                   
                     
                       10 
                       · 
                       
                         Log 
                         ( 
                         
                           
                             
                               A 
                               2 
                             
                             · 
                             
                               Fs 
                               eq 
                             
                             · 
                             avg 
                           
                           
                             Ta 
                             · 
                             
                               f 
                               2 
                             
                           
                         
                         ) 
                       
                     
                     - 
                     
                       N 
                       dBm 
                     
                     - 
                     
                       C 
                       ⁡ 
                       
                         ( 
                         f 
                         ) 
                       
                     
                     + 
                     
                       P 
                       ⁡ 
                       
                         ( 
                         f 
                         ) 
                       
                     
                     - 
                     6 
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
     In equation (1), A is the amplitude of an incident step waveform in Volts, Fs eq  is the equivalent time sample rate in samples per second, avg is the number of averages taken, Ta is the length of the waveform in seconds, f is the frequency in Hertz, N dBm  is the power of the assumed white noise in decibels relative to 1 mW delivered to a 50 Ohm load (dBm), C(f) is the attenuation of the cabling in dB as a function of frequency and P(f) is the response of the puller in dB as a function of frequency and is computed as the frequency content in the derivative of the step waveform. The dynamic range is a function of frequency, among other things. In equation (1), the number of averages taken may comprise a variable. A more useful expression considering the speed of the acquisition system is to consider the amount of time to wait. The number of averages taken in a given period of time is given by equation (2): 
     
       
         
           
             
               
                 
                   avg 
                   = 
                   
                     
                       
                         Fs 
                         act 
                       
                       · 
                       T 
                     
                     
                       Ta 
                       · 
                       
                         Fs 
                         eq 
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
     In equation (2), Fs act  is the actual sample rate of the sampling system in samples per second and T is the amount of time to wait in seconds. 
     Substituting equation (2) in equation (1) yields equation (3): 
     
       
         
           
             
               
                 
                   
                     SNR 
                     n 
                   
                   = 
                   
                     
                       10 
                       · 
                       
                         Log 
                         ⁡ 
                         
                           ( 
                           
                             
                               
                                 A 
                                 2 
                               
                               · 
                               
                                 Fs 
                                 act 
                               
                               · 
                               T 
                             
                             
                               
                                 Ta 
                                 2 
                               
                               · 
                               
                                 f 
                                 2 
                               
                             
                           
                           ) 
                         
                       
                     
                     - 
                     
                       N 
                       dBm 
                     
                     - 
                     
                       C 
                       ⁡ 
                       
                         ( 
                         f 
                         ) 
                       
                     
                     + 
                     
                       P 
                       ⁡ 
                       
                         ( 
                         f 
                         ) 
                       
                     
                     - 
                     6 
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
     Equation (3) states that the dynamic range goes down at 20 dB per decade of frequency which is a function of the incident waveform being a step and can be overcome to some extent by P(f). To have high dynamic range, one wants to have a large step amplitude, a high sample rate, a large amount of time, short waveforms, low intrinsic noise, and low cable losses. Many of these parameters have a variety of constraints that work against providing a wide dynamic range. 
     With regard to the various embodiments of the present method and invention, Ta is of particular interest. Dynamic range is dependent so strongly on Ta for two reasons. One is that longer waveforms take longer to acquire and therefore take more time per average. That cannot be helped. But another reason has to do with aspects that are particularly troublesome for time domain measurement instruments. 
     In time domain measurement instruments, the energy content of a signal is very concentrated in time. The incident edge rises over a very narrow time frame (a few picoseconds in high speed instruments). Measured reflected and transmitted edges also generally occur over very narrow time frames. The problem is that the measurement instrument must generally acquire the waveform in the time between the incident and reflected or transmitted edges and herein lies the problem. During the acquisition where no signal is present, the system is only acquiring noise, and the longer the waveform is, the more noise. Unfortunately, the length of the waveform is a function of the device under test (DUT). Longer devices require longer time. 
     Another problem regards the signal itself. Since the energy of the signal can be thought to be contained in the derivative, it is spread over the entire frequency range of the measurement simultaneously. This means that the noise cannot be filtered out in a traditional sense as filtering in a traditional sense implies that there are frequencies at which there is no signal and only noise and therefore can be removed. 
     Note further that Fs eq  appears in equation (1), as higher equivalent time sample rates tend to increase the Nyquist rate which spreads more noise into frequencies that are not used and can therefore be filtered out. But note further that the equivalent time sample rate has disappeared in equation (3) (which was the point of showing the equations this way) because higher equivalent time sample rates result in more samples per waveform (for an equivalent Ta) which result in longer times to wait which results in less averages. In fact, the benefit of 3 dB increase per doubling of sample rate is lost in a 3 dB decrease due to halving the number of averages that can be taken in a given time. In summary, as has been determined by the inventors of the present invention, noise spreading through higher equivalent time sample rates followed by filtering is an ineffective proposition. 
     To understand conceptually the goal of the present method and invention, consider a system that can diminish the effect of Ta by removing at least the noise acquired in between reflections and transmitted signal portions of a waveform. For example,  FIG. 8  shows an acquisition that is 200 ns in duration, while  FIG. 5  shows that the largest energy content might be over about 2 ns at most. If one were only to remove the noise outside the region from 46 to 48 ns, the effective value of Ta would be only 2 ns with regard to the portion that effects dynamic range due to noise acquisition effects (the portion of Ta that pertained to the length of the waveform affecting the time it takes to acquire would still remain). But this reduction in noise is shown in equation (4): 
     
       
         
           
             
               
                 
                   
                     SNR 
                     increase 
                   
                   = 
                   
                     
                       10 
                       · 
                       Log 
                     
                     ⁢ 
                     
                       ( 
                       
                         Ta 
                         
                           Ta 
                           eff 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
     In the example being considered, just the reduction of the effective Ta value to 2 out of 200 ns in accordance with proposed embodiments of the invention is a 20 dB improvement in signal to noise, which is a huge improvement. 
     Note that a VNA which uses swept sine waves does not need to consider this situation because dynamic range is unaffected by the length of the (virtual) waveform. This is because the incident signal is present at all times, so increasing the length of time increases the amount of noise and signal simultaneously resulting in no degradation. And, by applying a single frequency at a time, it benefits, again in a virtual sense, by filtering that occurs by looking at a single frequency at a time. 
     Since signal is present over all frequencies of interest in time domain network analysis, a method of separation of the noise from the signal is needed. This is where the inventive concept of wavelets come in. 
     Therefore, in accordance with the invention, Wavelets, in a loose sense, are simply another set of basis functions used to describe a waveform. Just as the DFT decomposes a waveform into a set of complex coefficients that describe the magnitude and phase of its sine wave basis functions, the inventive DWT decomposes a waveform into a set of real valued coefficients that describe the amplitude of its wavelet basis functions that make up the waveform. Wavelets have both frequency and time information. The frequency information is contained in the scale that a wavelet is located in, and the time information is contained in the coefficient index within such a scale. 
     Just as using the derivative of step like waveforms is advantageous for the DFT since it enforces continuity at the waveform edges, the same is true for the DWT as it is generally assumed to repeat in time like the DFT. 
     To utilize the DWT for denoising in accordance with various embodiments of the invention, the derivative waveform may be decomposed into its wavelet coefficients using the algorithm shown in  FIG. 20 . The algorithm in  FIG. 20  is prior art and found in the public domain from various sources and is provided here only because there are a variety of ways of calculating the DWT depending on the type of wavelet used. In a preferred embodiment, Daubechie&#39;s wavelets are used which are orthogonal and orthonormal basis functions defined only by the filter functions used to separate the scales. Similarly, as the IDWT must be the appropriate inverse such that x=IDWT (DWT(x)), this algorithm is shown in  FIG. 21  which is also prior art found from a number of sources. 
     Of primary concern in the application of the inventive denoising operation is the choice of the threshold. The threshold determination involves two steps. First, the uncorrelated noise statistics should be determined. Second, the shape of the noise may to be computed. 
     The noise shape will now be addressed first. Consider a K point sequence of normally distributed white random noise with a mean of 0 as ε, where each point ε k , kε0 . . . K−1 represents a single point in the sequence. The amount of noise is described by the standard deviation which is the same as the root mean squared (rms) value when the mean is zero as in equation (5): 
     
       
         
           
             
               
                 
                   σ 
                   = 
                   
                     
                       
                         1 
                         K 
                       
                       ⁢ 
                       
                         
                           ∑ 
                           k 
                         
                         ⁢ 
                         
                           ɛ 
                           k 
                           2 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     The frequency content is then determined by computing the discrete Fourier transform of this sequence and determining the rms value at each frequency bin E, which yields N=K/2 points, where each frequency point E n , nε0 . . . N reflects the rms noise at each frequency bin. In equation (5), the noise was computed in the time domain. It can also be computed in the frequency domain as equation (6): 
     
       
         
           
             
               
                 
                   σ 
                   = 
                   
                     
                       
                         ∑ 
                         n 
                       
                       ⁢ 
                       
                         
                            
                           
                             E 
                             n 
                           
                            
                         
                         2 
                       
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
     Since the noise is white, E n  has an expected value as of shown in equation (7): 
     
       
         
           
             
               
                 
                   
                     
                       E 
                       n 
                     
                     _ 
                   
                   = 
                   
                     σ 
                     
                       N 
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
     In equation (7), each frequency point f n  is defined as in equation (8), where Fs is the sample rate: 
     
       
         
           
             
               
                 
                   
                     f 
                     n 
                   
                   = 
                   
                     
                       n 
                       N 
                     
                     ⁢ 
                     
                       
                         F 
                         s 
                       
                       2 
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
     
     Often noise is not white, but is shaped in the frequency domain. Consider a shape to the noise described in the frequency domain as H n , which can be considered as a filter that modifies the noise such that noise is calculated as: 
     
       
         
           
             
               σ 
               s 
             
             = 
             
               
                 σ 
                 
                   N 
                 
               
               ⁢ 
               
                 
                   
                     ∑ 
                     n 
                   
                   ⁢ 
                   
                     
                        
                       
                         H 
                         n 
                       
                        
                     
                     2 
                   
                 
               
             
           
         
       
     
     The threshold determination for wavelet denoising may first consider the relationship between the noise spectrum in the Fourier and wavelet domains. To begin, consider the wavelet transform process outlined in  FIG. 14  adapted from Robi Polikar, “The Wavelet Tutorial”, http://users.rowan.edu/˜polikar/WAVELETS/WTtutorial.html. Here, the input signal is shown passing through various filters and decimators at various stages. Immediately, the input signal is shown passing through a filter defined as h(z) and g(z). In accordance with embodiments of the present invention, in wavelet transforms defined by scaling functions, the wavelet coefficients are the coefficients of the finite impulse response filter (FIR) h. h(z) is a low pass filter. g(z) is a QMF that is a high pass filter with the exact opposite characteristics of h(z). The low pass filter essentially passes most frequency content below ¼ the Nyquist rate and the high pass filter essentially retains most frequency content above ¼ the Nyquist rate. The level 1 coefficients [ 41 ] may be generated by passing the input signal X [ 42 ] through high pass filter g(z) [ 43 ] and decimating the result through a down sampler [ 44 ]. On the other side, the input signal X [ 42 ] through low pass filter h(z) [ 45 ] and is decimated through a down sampler [ 46 ]. This portion of the signal [ 47 ] is now prepared for the generation of the Level 2 Coefficients [ 48 ] and the process continues until desired or until the signal cannot be decimated and filtered any more. A notation comment is in order. When computing the DWT, the result is a K point vector. The last set of coefficients [ 41 ] consist of the K/2 points of detail information for the last scale. If there are B scales, this is for scale numbered B−1. Each scale has a portion of the input noise shaped in a way that is affected by the wavelet transform process. 
     In accordance with an example exemplifying embodiments of the invention, consider an input noise signal shaped like H where H n  is a filter response that describes the noise shape for a given frequency f n  as given by equation (8). For the level 1 coefficients in scale B−1, the high-pass filter applied during the wavelet transform generates a noise shape at the output of the high pass filter [ 43 ] and prior to decimation as equation (9): 
     
       
         
           
             
               
                 
                   
                     H 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       1 
                       n 
                     
                   
                   = 
                   
                     
                       H 
                       n 
                     
                     ⁢ 
                     
                        
                       
                         g 
                         ⁡ 
                         
                           ( 
                           
                             ⅇ 
                             
                               jπ 
                               ⁢ 
                               
                                 n 
                                 N 
                               
                             
                           
                           ) 
                         
                       
                        
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
     Equation (9) is the noise shaped by the high pass filter. The noise shape at the output of the low pass filter [ 45 ] and prior to decimation is defined by equation (10): 
     
       
         
           
             
               
                 
                   
                     H 
                     n 
                   
                   = 
                   
                     
                       H 
                       n 
                     
                     ⁢ 
                     
                        
                       
                         h 
                         ⁡ 
                         
                           ( 
                           
                             ⅇ 
                             
                               jπ 
                               ⁢ 
                               
                                 n 
                                 N 
                               
                             
                           
                           ) 
                         
                       
                        
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
     Note that equation (10) shows the input noise shape modified. This is because determining the noise shape is an iterative process. Now, because a decimation occurs at [ 46 ], the noise shape is modified for nε0 . . . N/2 as shown in equation (11):
 
 H   n =√{square root over (| H   n | 2   +|H   N−n | 2 )}  (11)
 
     Equation (11) accounts for the folding effect created by down sampler [ 46 ], after which N may be modified as N=N/2. The process continues with the noise in H modified again by high pass filter [ 49 ] in the generation of the level 2 coefficients [ 48 ] and modified by low pass filter [ 50 ] and down sampler [ 51 ] in preparation for level 3 coefficient generation [ 52 ], etc. 
     Therefore, one can see that the distribution of noise in each scale in the wavelet domain can be determined given the spectral distribution of noise in the frequency domain. Furthermore, knowing the noise distribution in the wavelet domain, the total noise in each wavelet scale can be computed by summing the noise using the equivalence given by equation (6). 
     As an example employing embodiments of the present invention, consider the noise distribution shape [ 56 ] shown in  FIG. 16 . It happens to be the noise distribution caused by the difference as will be discussed subsequently.  FIG. 15  shows the filter responses corresponding to Daubechie&#39;s 4-tap wavelet whose coefficients [ 40 ] define a low pass filter response [ 54 ] and a corresponding high pass filter response [ 55 ]. Low pass filter response [ 54 ] and high pass filter response [ 55 ] correspond to a possible responses of the filters with response h(z) and g(z) respectively in  FIG. 14 .  FIG. 17  shows the reshaping of the noise in the level 1 coefficient determination. Here, [ 57 ] is the input shape [ 56 ]. Applying the high pass filter with response [ 55 ] results in a noise shape [ 58 ]. This is the noise shape in the level 1 coefficients, or the last scale. Applying the low pass filter with response [ 54 ] results in [ 59 ]. When down sampled, [ 59 ] folds back and adds to produce [ 60 ]. For the next level, [ 60 ] is shown in  FIG. 18  as [ 61 ], which is now shown corresponding to the new Nyquist rate. Applying the high pass filter with response [ 55 ] results in [ 62 ]. This is the noise shape in the level 2 coefficients, or the next to last scale. Applying the low pass filter with response [ 54 ] results in [ 63 ]. When down sampled, [ 63 ] folds back and adds to produce [ 64 ] and the process continues. 
       FIG. 19  exemplifies the spectral content at the output of the high pass filter in the generation of each scale, prior to decimation. [ 65 ] exemplifies the output of [ 43 ], [ 66 ] exemplifies the output of [ 49 ] and [ 67 ] exemplifies the output of [ 53 ]. The term “exemplifies” is used because the exact shape depends on the wavelet type used. 
     An algorithm in accordance with embodiments of the invention for determining the noise statistics in each wavelet scale is shown in  FIG. 22 . [ 68 ] is a function that takes N+1 points of noise shape in E. E is assumed to be the resulting spectral distribution resulting from taking the DFT of a K=2N point noise waveform. h is the L element vector of wavelet scaling filter coefficients. The wavelet coefficient vector length and the noise signal length determines the number of scales B in the DWT of the K point noise signal shown at [ 69 ]. For each scale (in reverse order) [ 70 ], first the noise in the scale is determined by applying the high pass wavelet function filter function to the remaining noise distribution [ 71 ] and then for each frequency point that will remain in the half spectrum resulting from applying the low pass wavelet function filter and down sampling by a factor of 2 [ 72 ], the remaining noise shape to pass on the next level is calculated [ 73 ] and the frequency points are halved [ 74 ]. Once all scales have been exhausted, the last scale is filled in with any residual noise [ 75 ] and the vector of noise statistics for each scale is returned [ 76 ]. 
     While  FIG. 22  can be used to determine the noise statistics in each wavelet scale using any spectral noise distribution, for the purposes of wavelet denoising for time domain network analysis in accordance with embodiments of the present invention, there is a particular noise distribution of interest. As mentioned previously, time domain network analysis is achieved by applying step like waveforms to a system and acquiring the step like response. The step is discontinuous at the waveform edges and does not lend itself well to analysis using the DFT or the DWT which assumes repeating waveforms. Various methods have been created to deal with these analysis problems as far as the DFT is concerned, such as W. L. Gans &amp; N. S. Nahman, “Continuous and discrete Fourier transform of step-like waveforms”, IEEE Trans. Inst. &amp; Meas., vol. IM-31, pp. 97-101, June 1982 and A. M. Nicolson, “Forming the fast Fourier transform of a step response in time-domain metrology”, Electron. Lett., vol. 9, pp. 317-318, July 1973. The inventors have determined that these problems can be sidestepped by simply operating on the difference of the waveforms acquired, which has the effect of normalizing the frequency content of the step and the effect of simultaneous amplification of noise, especially high frequency noise, but in fact has no actual effect on SNR and therefore the dynamic range. Furthermore, where denoising is concerned, the inventor has further determined that it is advantageous to utilize the DWT, which, in common implementations, has the similar characteristic as the DFT in that it assumes that waveform sequences repeat. This characteristic causes problems in that the step like waveform is discontinuous and the DWT will produce wavelets to deal with the discontinuity. Instead, whether one wants to recover the denoised step like waveform or chooses to utilize the difference waveform, it is advantageous to perform the denoising operation on the difference waveform. When the difference waveform is utilized, however, the reshaping of the noise spectrum must be dealt with in utilizing wavelet denoising techniques. 
     Considering the original noise signal ε k  whose noise statistics are known as in equation (5) and whose noise distribution in the frequency domain is given by equation (7). The difference may be calculated as equation (12):
 
 dε   k =ε k −ε k−1   (12)
 
     The distribution in the frequency domain is therefore given by equation (13): 
     
       
         
           
             
               
                 
                   
                     
                        
                       
                         DE 
                         n 
                       
                        
                     
                     _ 
                   
                   = 
                   
                     
                       
                         σ 
                         
                           N 
                         
                       
                       ⁢ 
                       
                          
                         
                           1 
                           - 
                           
                             ⅇ 
                             
                               jπ 
                               ⁢ 
                               
                                 n 
                                 N 
                               
                             
                           
                         
                          
                       
                     
                     = 
                     
                       
                         σ 
                         
                           N 
                         
                       
                       ⁢ 
                       
                         
                           2 
                           ⁢ 
                           
                             ( 
                             
                               1 
                               - 
                               
                                 cos 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     π 
                                     ⁢ 
                                     
                                       n 
                                       N 
                                     
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
     Equation (13) shows that the noise in each spectral bin is now the original expected value of the noise σ/√{square root over (N)} shaped by a shaping function. The shaping function is plotted as [ 56 ] in  FIG. 16 . 
       FIG. 23  shows an algorithm in accordance with an embodiment of the invention for determining the correct threshold for the difference waveform to be denoised. Here, we have a function [ 77 ] that takes the K point waveform X that is assumed to be the DWT of the difference waveform to be denoised along with the L coefficient wavelet used. Since the waveform has K wavelet domain elements, and therefore time domain elements, the number of frequency bins in the DFT are calculated [ 78 ] along with the number of scales [ 79 ] in the DWT. For each bin [ 80 ], the noise shape function is computed [ 81 ]. From this noise shape function, the shape of the noise in the wavelet scales [ 82 ] is calculated. 
     In a preferred embodiment of the invention, statistics of noise in the original waveform may be computed directly from the DWT using certain criteria that are enforced. The first condition is that the waveform acquired is preferably sufficiently sampled and preferably oversampled by a factor of 2. Sufficiently sampled means that the Nyquist rate (the sample rate divided by two) is higher than the highest frequency content present in the actual signal and oversampled by a factor of 2 means the Nyquist rate is actually twice higher. These conditions are never perfectly and strictly met, but the goal is that the latter half of the spectrum contains only noise. Sufficiency of sample rate is easy to enforce because the system would not work well otherwise. The second condition is that there is no signal present in the latter portion of the waveform. This condition is easily met because in time domain network analysis, the waveforms must be long enough that signal dies out before the end anyway. The final condition is that the noise is white. This is sometimes the case and sometimes not and can easily be worked around as shown if the actual shape of the spectrum is known. 
     Based on the conditions presented, the end of the wavelet transform waveform X preferably contains mostly noise shaped by the difference function. Therefore an index P may be computed [ 83 ] representing a percentage of the end of the last scale whereby from index K−P to K−1 first the mean value [ 84 ] and then the standard deviation [ 85 ] is calculated. As described above, one can estimate the noise in the input signal [ 86 ]. Given the statistics of the input signal σ, the number of frequency points N and the noise shape in the DWT TS a threshold function may be computed. For each point in the DWT [ 87 ], the wavelet transform scale b corresponding to the wavelet transform coefficient may be computed [ 88 ], the threshold value for that coefficient is computed [ 89 ] and the vector of these results are returned [ 90 ]. Note that this threshold function is such that if the DWT X provided contained only the difference of a waveform whose noise is white and whose rms value is σ, then th is an estimate of the standard deviation of the wavelet coefficients of X. In other words, 68.2% of the wavelet coefficient magnitudes would fall below this threshold. 
     Now that a method of computing the statistics of the noise in the difference waveform in accordance with an embodiment of the invention has been shown, an efficient and effective method for denoising the difference waveforms computed from the waveforms acquired during time domain network analysis measurements in accordance with a further embodiment of the invention is shown in  FIG. 24  which utilizes, in a preferred embodiment, a hard thresholding algorithm for removing noise. The function [ 91 ] takes the K point difference waveform x along with the preferred wavelet coefficients h. The DWT is first computed [ 92 ] and the result is utilized to compute the appropriate threshold [ 93 ] for each coefficient. Note here that a factor of 5 has been applied to the threshold calculation to set a threshold that is five standard deviations of the noise in the coefficient. This means that if x provided were only the difference of a waveform whose noise is white and whose rms value is σ, approximately one in two million coefficients would contain a value whose magnitude was above this threshold. To apply this threshold, the number of points in the waveform is computed [ 94 ] and for each point [ 95 ], the magnitude of the DWT coefficients are compared to this threshold [ 96 ]. If the magnitude falls below the threshold, the coefficient in the denoised DWT is set to zero [ 97 ], otherwise it is retained [ 98 ]. Once the threshold operation is complete, the IDWT is computed [ 99 ] and returned [ 100 ]. 
     It has been shown in the summary that when waveforms are processed in the manner shown, significant amounts of noise are removed and the resulting s-parameter measurements exhibit a significant improvement in dynamic range. 
     It will thus be seen that the objects set forth above, among those made apparent from the preceding description, are efficiently attained and, because certain changes may be made in carrying out the above method and in the construction(s) set forth without departing from the spirit and scope of the invention, it is intended that all matter contained in the above description and shown in the accompanying drawings shall be interpreted as illustrative and not in a limiting sense. 
     It is also to be understood that the following claims are intended to cover all of the generic and specific features of the invention herein described and all statements of the scope of the invention which, as a matter of language, might be said to fall therebetween.