referring to fig1 a transmitter unit 1 energizes an ultrasound transducer array 2 to transmit ultrasound bursts which are fired repeatedly at a pulse repetition frequency ( prf ) so that ultrasound waves are backscattered from a predetermined portion or volume of a patient or subject under study . an exemplary transmitter unit is shown in u . s . pat . no . 5 , 349 , 524 ( daft et al .) which is incorporated by reference and is commonly assigned . the transmitter unit includes a control 1 a for adjusting the prf which is typically in the kilohertz range . alternatively , the array 2 may be continuously energized . the return rf signals are detected by the transducer elements and then formed into a receive beam by a receive beamformer 4 . for a digital system , the summed rf signal from each firing is demodulated by a demodulator 6 into its in - phase and quadrature ( i / q ) components . the i / q components are integrated ( summed ) over a specific time interval and then sampled by block 8 . the summing interval and transmit burst length together define the length of the sample volume as specified by the user . the “ sum and dump ” operation effectively yields the doppler signal corresponding to the ultrasound signal backscattered from the sample volume in the patient . the doppler signal is transmitted to a midprocessor 9 which comprises a logic unit , such as a digital signal processor ( dsp ). alternatively , a microprocessor , microsequencer or microcontroller may be employed . hardwired logic units also can be utilized to perform the operations described in connection with the dsp . the doppler signal is assessed by the dsp through a digital wall filter function 10 which rejects any clutter in the signal corresponding to stationary or very slow moving tissue . the filtered signals are used by the dsp to perform an fft power spectrum function or algorithm 12 which typically takes fast fourier transforms ( fft &# 39 ; s ) over a moving time window of 64 to 128 samples . function 12 generates frequency signals having values representing the magnitudes of at least some of the doppler component frequencies represented by the output of wall filter function 10 . each fft power spectrum is compressed by the dsp in a compressor function 14 and the resulting signals are stored in a time line memory ( tlm ) 22 . the signals from memory 22 are mapped by a video processor 16 to a gray scale map for display on monitor 18 as a single spectral line at a particular time point in the doppler velocity ( frequency ) versus time spectrogram . the data for the spectral line is stored in a time line memory 22 . the gray scale map is stored in a memory 17 within the video processor 16 . fig2 shows a typical doppler image on display 18 . doppler waveform tracing is performed by processing block 20 after the fft power spectrum x is compressed in accordance with a compression function h ( x )= y . a host logic unit 24 , such as a computer , microprocessor , microsequencer , microcontroller or hard wired circuits for conducting logic operations , communicates with the dsp in midprocessor 9 , video processor 16 and time line memory 22 . a user communicates with computer 24 via front panel control keys , including a key ( not shown ) for inverting the image on display 18 and shifting the frequency baseline of display 18 . fig1 a shows the key computations involved in fft power spectrum function 12 which generates the individual spectral lines with the selected polarity and frequency baseline in the spectogram display 18 . central to this is the fft operation 30 which transforms windowed i / q data segments to the frequency domain . the frequency domain signals are shifted and / or inverted in operation 32 . this operation results in an inversion or vertical shifting of the doppler image on display 18 . operation 34 takes the absolute magnitude squared of the signals produced by operation 32 to generate power spectrum signals . in operation 36 , the power spectrum signals are averaged , and / or interpolated to fill up the tlm . the magnitude of the resulting power spectra signals are compressed via a logarithmic function 14 ( fig1 ) for the video display 18 which typically has 6 - 8 bits of gray map resolution . the maximum / mean frequency waveform of the compressed spectrum can be traced out over time and superposed ( not shown ) on spectrogram display 18 . the preferred embodiment of the present invention uses a precise model of the probability distribution of x to establish a threshold as a reference for automatically adjusting velocity scale and pulse repetition frequency . it is well established ( see mo et al ., “‘ speckle ’ in continuous wave doppler ultrasound spectra : a simulation study ,” ieee trans . ultrason ., ferroelec . & amp ; freq . control , uffc - 33 , pp . 747 - 753 ( 1986 )) that the spectral power of any zero - mean gaussian signal ( including white noise ) is governed by the exponential probability density distribution : f x  ( x ) = 1 m  e _ x m , x ≥ o ( 1 ) where the mean and standard deviation of x are given by : for a digital doppler system , x is typically a 12 to 16 - bit integer . a plot of f x ( x ) versus x for m = 200 is shown in fig3 . the preferred embodiment of the present invention calculates a noise threshold which is a function of the mean noise level m of the signals resulting from the fft power spectrum function ( shown as x in fig1 ) which can be estimated using a system noise model . alternatively , the noise threshold can be determined empirically by measuring noise at various system gain settings and preparing a table of values of noise versus gain . the table can be implemented as a look up table in host computer 24 which includes one or more logic units . when the gain changes by operator manipulation of control keys 26 , the value of the noise threshold changes in accordance with the look up table . alternatively , the look up table can be implemented in hardware . it is assumed that the doppler sample volume has already been positioned at the site of interest within the patient or subject under study s ( fig1 ), and that a clear spectral waveform has appeared on the display 18 , except that the spectral waveform may be asymmetric about the baseline , inverted , aliased or has a frequency span much smaller than the current velocity scale . instead of manually toggling a set of switches , the auto velocity scale prf adjustment can be activated via a single button 26 a . alternatively , the spectral data in memory 22 can be periodically sampled to see if velocity scale and prf adjustments are needed . computer 24 then preferably executes the algorithm shown in fig4 on the data arrangement shown in section b of fig5 . according to step s 10 , the most recent image segment of n spectral lines that cover at least one complete cardiac cycle ( i . e ., time period cc shown in fig2 e . g ., 1 . 5 sec . ), is retrieved from the memory 22 . in general , n is a function of the time - line sweep speed which is user - adjustable via a front - panel 26 control key . for an 8 - bit display , the spectrum intensity ranges from 0 to 255 . according to step s 12 , the preferred method for estimating the spectral noise floor or threshold assumes that the system noise originates primarily from the pre - amp in each receive channel in the beamformer 4 of a digital scanner . the pre - amp johnson noise can be specified as a root - mean - square ( rms ) voltage per hz at room temperature 6 . thus , knowing the equivalent noise bandwidth of all the filters in the doppler signal path ( from receiver 4 to fft processor function 12 in fig1 ) enables an absolute rms noise level to be computed as a function of system gain knob ( user adjustable ) on front panel 26 . any quantization noise due to analog - to - digital conversion also can be added in an appropriate manner . further , knowing the sample volume position and aperture strategy in the doppler mode , the total system noise can be computed by summing over all active receive channels ( including array apodization effects ) for a given sample volume position . dividing this total noise level by the number of fft points yields the mean spectral noise power m of the exponential distribution ( eqn . 1 ). thus , by applying standard statistical transformations based on the known log compression function , the theoretical noise distribution in the tlm image segment can be obtained for a given mean spectral noise power . the mean noise value in memory 22 can be computed by taking the first moment of the theoretical noise distribution . to determine a suitable upper noise threshold for signal detection , the ( 1 - α ) th percentile point ( e . g . α = 0 . 01 ) of the theoretical noise distribution can be used . an additional offset can be added to this to account for the limited accuracy of the system noise model . according to step s 14 , in order to describe and implement a spectrogram edge detection algorithm , a coordinate system needs to be specified . one exemplary coordinate system is to re - arrange the positive and negative frequency portions of the spectral data from memory 22 as shown in fig5 . although other coordinate systems can support the same algorithm , the proposed coordinate system is convenient in that any aliased forward or reverse flow spectrum in the image is unfolded automatically for analysis . the wall signal rejection regions bounded by the negative (− f cut ) and positive ( f cut ) cutoff points of wall filter function 10 are excluded . the rows from the top to bottom are numbered 0 to n . the columns are numbered 0 - n . fig5 represents memory locations addressable in o - n rows and 0 - n columns . the memory locations store groups of signals d 1 and d 2 responsive to fluid flow in subject s in a first direction and signals d 3 responsive to fluid flow in subject s in a second direction opposite the first direction . section a of fig5 shows the arrangement of spectral data in memory 22 as will be displayed on the video monitor . section b of fig5 shows the arrangement of data in a memory of computer 24 after the coordinate system is specified . in general the zero frequency / velocity baseline in the spectral image may be shifted up or down , but in the example of section a , the baseline is positioned at the middle of the frequency axis ( i . e . no baseline shift ), so that in section b , row n / 2 separates signals resulting from fluid flow in subject s in opposite directions . fluid flow in a positive direction results in signals in rows n / 2 to n ; fluid flow in a negative direction results in signals in rows 0 to n / 2 . in addition , aliasing can cause signals indicating negative fluid flow even though they resulted from positive fluid flow and vice versa . according to step s 16 , the first test is to check if the data contains pure noise only , or the signal is so weak that it will not be possible to perform a reliable edge detection . since the theoretical noise distribution has been computed in step s 12 , many simple threshold tests are possible . for example , of the n × n samples in the data , if the maximum signal value does not exceed the upper noise threshold by a minimum amount , and / or the mean data value over all the memory locations does not exceed the theoretical mean noise value by a minimum amount , then the data is considered to be “ too noisy ,” and nothing needs to be done , and the program is exited in step s 18 . step s 20 checks if all rows in the data contain signal ( as opposed to noise ). if so , the data bandwidth is equal to or larger than the current prf , and the prf should be increased . some simple threshold tests can be used . for example , if fewer than approximately 5 rows have mean values less than the theoretical mean noise value , then the signal data is considered to have spanned the entire frequency axis . if this test proves positive , the prf can be increased by a factor ( e . g . two times ) that may depend on the difference between the row with the highest mean intensity and that with the lowest mean intensity . if the difference is small , chances are higher that the spectrogram is wrapped around multiple times , in which case prf should be increased in step s 22 by a larger factor . the prf is increased by having computer 24 send a signal to control 1 a of transmitter 1 ( fig1 ). after the prf increase , the algorithm waits for a new spectral data segment ( one second or more ) to be generated in the tlm 22 , and then repeats the above steps starting from step s 10 . if the number of times prf has been increased reaches some maximum limit ( e . g . two times ), or the prf has already reached its maximum limit , but the data is still in “ all signal ” state , then the algorithm is exited . according to step s 24 , the data value statistics are analyzed row by row , and a search is conducted for rows which show significant deviations from the predicted noise value statistics . theoretically , the most comprehensive test is to compare a data value histogram for each row ( or set of adjacent rows ) against the theoretical noise distribution , based on standard histogram tests . the histogram plots data value versus number of occurrences for each row shown in section b of fig5 . in practice , however , for n columns sufficiently large , some key statistical parameters that characterize the data value histogram for each row can be used to determine whether a row contains one or more signal values or only noise values . for example , if the mean value of a row exceeds the theoretical mean , the row contains one or more signal values . for another example , if the number of sample values which have exceeded the upper noise threshold value are greater than a minimum number , e . g . 3 , the row contains one or more signal values . for a third example , the total intensity above noise threshold ( ti ) is computed where ti is defined as ti = σ ( si − nt ), for all si greater than nt ; where si sample values ; nt = upper noise threshold ; and ti = total intensity above nt . if ti exceeds an empirically - determined signal threshold , for example , 5 db for the dynamic range setting in use , the row contains one or more signal values . the foregoing three examples also can be used in combination . step s 24 also identifies the widest group of adjacent rows of noise in the memory locations . according to step s 26 , to reduce statistical variations for easier edge detection , a filter can be applied to the row statistic ( s ) over successive rows . a simple example is a smoothing filter which takes a moving average over , say , 5 rows . the filter in general does not have to be linear . for example , a median filter can be used to smooth the row statistic ( s ) while preserving edges . if step s 28 is reached , both signal and noise are present . fig6 a - 6d show arbitrary groups of signal data sd 1 - sd 5 in the memory locations illustrated in section b of fig5 . the locations outside groups sd 1 - sd 5 are noise or zero signal value . the data groups form boundaries b 1 - b 10 . as depicted in fig6 a - 6d , four cases are possible . step s 28 finds the two edges of the memory signal data which will enable determination of optimal prf and baseline position . an edge is defined as the outermost row in the signal data ( as opposed to noise data ) which exceeds a noise threshold value . the row numbers are indicated by edge1 and edge2 in each of the four cases in fig6 a - 6d . the search for edge1 and edge2 is carried out in a sequential manner starting from row 0 down to row n . however , it is advantageous ( but not required ) to first identify the widest noise region in which the number of successive rows with mean signal values below the noise threshold is greatest . using the case of fig6 b as an example , the widest noise region is that between edge1 and edge2 . the widest noise region was determined in step s 24 . starting from the middle row within the widest noise region , r 1 , a search is conducted in both directions ( increasing and decreasing row numbers ) for the first rows which exceed the noise threshold criterion . this avoids searching through the signal regions which may contain rows that happen ( due to its statistical nature ) to have low mean values . in this edge detection process , the noise threshold criterion may be based on the first row whose mean signal value has exceeded the theoretical mean noise value ( plus some offset ), or the first row with more than a small number of data samples ( e . g . 5 ) exceeding the upper noise threshold value calculated from step s 12 , or the first row in which the total intensity above the noise threshold ( ti ) as calculated from step s 24 is greater than an empirically - determined signal threshold , for example , 5 db for the dynamic range setting in use . the search locates a portion of boundaries b 1 - b 10 . to make this process more robust under poor signal - to - noise conditions , the edge detection criterion can require a few ( e . g ., 3 - 5 ) successive rows to have exceeded the noise threshold value . of the four cases shown in fig6 a - 6d , the case of fig6 d ( case ( d )), is special in that neither edge1 nor edge2 is at or very near to row 0 or row n . step s 30 analyzes this case which can occur if a small sample volume in subject s is placed near the center of a large vein , for example . case ( d ) is an ambiguous case : even though it is surrounded by clear noise regions r 2 and r 3 , the signal data may have aliased to its present position . in this case , the prf is increased to either a larger or the maximum possible prf in step s 32 . then steps starting from step s 10 are repeated . ( as an option , steps s 16 , s 18 and s 20 can be skipped ). if the edges ( i . e ., edges 1 and 2 ) of the data after the prf increase remain the same in terms of absolute velocity units , then it is not aliased . if the edges have moved to other velocity positions , or if some of the locations of some of the signals at or near boundaries b 9 and b 10 have moved , the data must have been aliased before the prf increase . in fact , it could still be aliased at maximum prf , and a warning message should be displayed or a user of the system should otherwise be informed or signaled . once edge1 and edge2 are found , the widths of the positive ( forward flow ) and negative ( reverse flow ) frequency portions of the data ( section a of fig5 before the coordinate defining operation of step s 14 ) are determined in step s 34 . if the negative frequency width is larger than the positive frequency width , the signal data is considered to be inverted ( i . e . the taller of the forward and reverse flow spectra is pointing downwards in the original data ( section a of fig5 )). an auto invert flag is set to the “ invert ” state . the width can be determined by counting rows or subtracting row numbers identified by the edges identified by step s 28 . fig6 b and 6c are examples of inverted groups of data signals . fig6 a is an example of noninverted data signals . having identified edge1 and edge2 as boundary rows of the data , the total row count for all memory locations corresponding to signals ( as opposed to noise ) is computed . this is converted into total velocity range or frequency bandwidth of the data based on the current velocity / frequency scale of display 18 . the optimal prf is given by this data frequency bandwidth divided by a scale factor ( e . g . 75 %), which specifies the desired fraction of the total number of pixel rows of display 18 to be covered by the flow spectra ( i . e ., it is desirable to allow some margin between the upper edge of the spectrogram and the upper limit of the velocity scale ). if the optimal prf is not an available prf setting , the new prf can be set at the smallest prf above the optimal prf . if the current prf equals the new prf , there is no need to reduce the prf , and the algorithm proceeds to step s 36 . if the current prf is greater than the new prf , the algorithm reduces the prf to the new prf , and updates the total spectrogram row number count on the positive and negative frequency axes of display 18 according to the prf change factor . the final step s 38 in this algorithm is to effect the invert operation and the optimal baseline shift . if the auto invert flag ( from step s 34 ) is negative ( no need to invert ), the optimal baseline position ( from the bottom as shown in fig2 ) corresponds to the row count of the negative frequency portion of the data plus some non - zero margin ( e . g . 5 rows ) to ensure that the spectrogram image of display 18 will not be touching the bottom of the display . since the velocity scale typically consists of a number of tick marks , the baseline position can also be rounded up to match the nearest tick mark . if the auto invert flag is positive ( need to invert ), the invert operation 32 ( fig1 a ) of function 12 ( fig1 ) is activated . in this case , the optimal baseline position is based on the row count of the positive portion of the signal spectrogram plus a small margin . fig7 shows a typical doppler image distorted by aliasing in which a group of images i 1 appear in the negative flow portion of the display ( below baseline bl which is set at zero frequency or velocity ). images i 1 inaccurately indicate fluid flow in the negative direction . images i 2 also indicate fluid flow in the negative direction . fig8 shows the signals in the memory locations of section b of fig5 which would result in the display shown in fig7 . signal group g 1 corresponds to image i 1 and appears in the memory locations indicating negative flow ( rows o - n / 2 ). signal group g 2 corresponds to image i 2 . the algorithm counts the rows in group g 2 and shifts baseline bl by a corresponding amount as shown in fig9 . thus , images i 1 and i 2 are properly joined with the other signals indicating fluid flow in the positive direction . the foregoing preferred embodiments have been disclosed for the purpose of illustration . variations and modifications will be readily apparent to those skilled in the art . all such variations and modifications are intended to be encompassed by the claims set forth hereinafter . for example , processing blocks 12 , 14 and 20 can be combined into a single processor .
an ultrasound transmitter generates ultrasound signals at an adjustable pulse repetition rate . a doppler unit generates doppler signals from ultrasound backscattered signals and stores them in a memory . a logic unit performs an algorithm which automatically adjusts the polarity and position of the velocity scale of a display and automatically adjusts the pule repetition rate of the transmitter based on analysis of the signals .