AUTOMATED FREQUENCY STEPPING NOISE MEASUREMENT TEST SYSTEM

Abstract: A noise measurement test system is provided for making phase noise measurements of a unit under test (UUT). The noise measurement test system comprises a variable amplifier, a variable low noise source, a variable phase shifter, a mixer, a variable low noise matching amplifier, analog-to-digital converter, a processor and a spectrum analyzer. A first low noise signal, created by the low noise source, is routed through the unit under test and variable amplifier to the mixer. A second low noise signal, also created by the low noise source, is routed through the variable phase shifter to the mixer. The mixer places the received signals in phase quadrature and outputs a measurement test signal which is routed through an analog-to-digital convertor to the processor and spectrum analyzer. The processor includes control links for adjusting the amplifier, low noise source and phase shifter to ensure that the signals received by the mixer are in phase quadrature. The processor also controls the low noise matching amplifier to ensure that there is proper impedence between the mixer and analog-to-digital convertor, and to ensure that the measurement test signal is of sufficient amplification for proper noise testing. In preferred embodiments, the processor provides for automatic control of the test system through an entire test protocol. In additional preferred embodiments, the noise measurement test system provides for calibration signals which vary in amplitude and frequency relative to a carrier signal.

Description: AUTOMATED FREQUENCY STEPPING NOISE MEASUREMENT TEST SYSTEM BACKGROUND OF THE INVENTION The present invention relates to devices which measure noise present in radio frequency (RF) signals. More specifically, the present invention relates to noise measurement test systems for making phase noise and frequency noise measurements of devices that amplify or modify an RF signal. Amplifiers are devices that increase the gain of a carrier signal. Amplifiers play a key role in many electronic systems today. Parameters such as gain, gain flatness, compression point, inter odulation and others have always been important to optimizing the performance of an amplifier. In addition, new parameters of an amplifier have become important to maintain the performance of an overall system. Unfortunately, in addition to amplifying the carrier signal, amplifiers typically introduce RF energy into an original RF signal in the form of intermodulation and sideband noises, including thermal noise, shot noise and flicker noise. This noise is typically random and is referred to as additive and residual phase noise and frequency noise. In addition, spurious noise signals can be generated by an amplifier. These consist of discreet signals appearing as distinct components called "spurs" which can be related to power line and/or vibration modulation. It is important that this noise be minimized to the greatest extent possible. Since frequency noise is a function of phase noise, these noise components will be collectively referred to herein as phase noise. The presence of phase noise in RF signal sources is a concern in several applications including applications related to analog and digital communications such as code division multiple access (CDMA) and time division multiple access (TDMA) cellular communication systems. The European Global System for Mobile communications (GSM) has promulgated detailed standards which define the operating requirements for both mobile and base station transmitters because the radio communication system as a whole will work properly only if each component operates within precise limits. Mobile transmitters and base stations must transmit outgoing RF signals with sufficient power, sufficient fidelity to maintain call quality and without transmitting excess power into frequency channels and time slots allocated to others. For communications equipment particularly, it is important to minimize spurs and distortion products even when they appear below the amplitude level of the signal produced by an amplifier. This is important because the distortion or noise from numerous communication modules in a communications system tend to statistically add, thereby raising the level of noise in the overall system. Accordingly, it has now become important to measure the phase noise levels of an amplifier even below the level of the signal produced by the amplifier. Phase noise is also of great concern in radar equipment, especially Doppler radar equipment which determines the velocity of a moving target by measuring the shifts in frequencies caused by return echos from a transmitted signal. The return echo signal is typically amplified for measurement. Unfortunately, a very large noise floor, up to 40 dB, has been observed near the carrier frequency. Such high background noise caused by the amplifiers of the radar equipment can result in degradation in target detection sensitivity and prevention of proper operation of land based and airborne active array radar. In some instances, it has been found that the introduction of phase noise caused by the amplifiers can partially or even totally mask the echo signal. The most straight forward and least expensive technique for measuring the phase noise of an amplifier is to input a signal of known frequency into the amplifier and connect the output to a spectrum analyzer. However, it is difficult to measure the phase noise which is close in frequency to the carrier signal. In addition, using this technique, it is impossible to measure the noise caused by the amplifier which is below the amplitude of the amplifier output signal. In order to minimize the amount of noise generated by a particular system, it is highly advantageous to be able to measure that noise. As a result, there has been a continuing need for equipment which can make phase noise measurements. Two approaches predominate for making phase noise measurements of an RF signal. The first system is a noise measurement test apparatus that uses a waveguide delay line descriminator. For example, U.S. Patent No. 5,608,331 issued to Newberg et al. discloses a test system for making phase noise and amplitude noise measurements of microwave signals using a waveguide, coax and fiberoptic delay lines. The delay line descriminator uses the RF input from a unit under test (UUT) to generate a reference signal via the delay line for phase noise evaluation. The signal from the unit under test is split into first and second paths and combined again at a mixer which places the respective signals 90 out of phase (in phase quadrature). Where the test system introduces very low noise or substantially no noise, the mixer outputs demodulated phase noise which can be measured by a sweeping spectrum analyzer. The second conventional approach for making phase noise measurements makes use of the combination of noise from two phase lock RF sources. A low noise source is provided which provides a carrier signal to a unit under test, typically an amplifier. The low noise source also outputs a second low noise signal, at the same frequency as the carrier signal, which is combined with the carrier signal from the amplifier in a mixer. Using a phase shifter, the mixer places the two signals in phase quadrature. Assuming no significant noise in the test setup, the mixer output signal represents the noise of the unit under test which can be measured by a sweeping spectrum analyzer. Unfortunately, measurement of modulation and wide band noise measurements using prior art systems is expensive, difficult and time consuming. At wide offsets, such as 600 kHz, these measurements require high dynamic range which has historically been expensive. For these reasons, wide band noise measurements are typically only performed on a sample basis. Even conducting noise measurements on a sample basis is extremely time consuming as this technique requires a series of separate measurements to be performed requiring a lot of retuning of the test equipment . For example, utilizing the delay line technique described above, one must adjust phase shifters, attenuators and additional amplifiers at several frequency assignments across a broad bandwidth. Similarly, the above-described ultra low noise source test system typically requires making manual adjustments of a low noise source, a phase shifter, an additional amplifier and a buffer for each frequency offset across a broad bandwidth. The manual adjustment of each of these units usually takes ten minutes or more for each test measurement. Moreover, to ensure test accuracy, a large number of test samples must be taken with the increase in the number of sample measurements resulting in a decrease in the standard deviation in error of the noise measurements of the unit under test. Simply, sufficient readings must be taken to verify correct operation of the unit under test. Unfortunately, performing such tests is both expensive and time consuming. Moreover, the prior art test systems are very expensive, typically costing between $100,000 and $200,000. In addition, these systems must be purchased piecemeal, requiring the separate purchase of amplifiers, low noise sources, signal attenuators, phase shifters, mixers and sweeping noise analyzers, which must be assembled to create a desired test system. The interconnection on each of these components creates additional regions for the introduction of phase noise into the system. There is thus a need for a noise measurement test system which can accurately measure low level phase noise. It would also be advantageous if a noise measurement test system were provided which had a high degree of reproducibilitγ in the test measurements. To this end, it would be highly advantageous if a noise measurement test system were provided which eliminated a need for manual manipulation of the different components of the test system including the amplifiers, phase shifters, attenuators, low noise sources, etc. which typically must be adjusted for each noise measurement. It would also be highly advantageous if a noise measurement test system could be provided in a single modular component which was lightweight and of compact size. SUMMARY OF THE PRESENT INVENTION Briefly, in accordance with the invention, I provide an improved apparatus and method for automatically testing the phase noise of a unit under test. It is believed that my invention is particularly suitable for testing the phase noise of amplifiers even below the noise level of a carrier signal. The noise measurement system includes a variable low noise source for producing an adjustable low noise signal. The variable low noise source includes two outputs for outputting identical low noise signals, or is coupled to a splitter for splitting a single low noise signal into two identical low noise source signals. The first low noise signal is routed to a unit under test. The unit under test includes an input for receiving a first low noise carrier signal and an output for outputting a carrier signal. The UUT carrier signal is then routed through a variable amplifier where it is thereafter received by a mixer. The second low noise signal output from the variable low noise source, is transmitted to a variable phase shifter which adjusts the phase of the second low noise signal to be 90 out of phase (in phase quadrature) with the UUT signal passing through the variable amplifier. After being shifted in phase, the second low noise signal is received by the mixer at a second input port where it is combined with the UUT signal and output from a mixer output port. The variable amplifier and variable phase shifter are both adjusted so that the UUT signal and second noise signal are in phase quadrature and of matching amplitude such that if there were no noise in the system or in the UUT, a direct current (DC) is output from the mixer output port. However, assuming noise in the UUT and very low noise in the test system, the mixer outputs a signal representative of the noise of the unit under test. The signal output from the mixer, hereinafter referred to as a "measurement test signal", is then sent to a variable low noise matching amplifier. The variable low noise matching amplifier both amplifies the measurement test signal and acts as a buffer. The matching variable amplifier is constructed to add very low noise so as not to interfere with the noise measurements of the unit under test and provides for amplification of the measurement test signal to enhance the ability to measure any noise in the unit under test. After passing through the low noise matching amplifier the measurement test signal is received by an analog-to- digital converter (ADC) which converts the analog measurement test signal into digital data. The digital data is then transmitted to a processor for evaluation prior to sending the measurement test signal to a spectrum analyzer. The spectrum analyzer uses standard, windowed, fast or discreet f ourier transforms that accurately measures the noise spectrum of the measurement test signal. These f ourier transformers are known to those skilled in the art and will not be discussed in detail herein. The processor is connected by a plurality of control lines to the variable amplifier, variable low noise source, variable phase shifter and the variable low noise matching amplifier. The processor sets levels and makes adjustments to the amplifier, low noise source, phase shifter and matching amplifier to obtain initial calibration and maintain optimum system sensitivity for measuring the phase noise of a unit under test. The processor performs these automated control functions to adjust the variable low noise source, amplifier, phase shifter and matching amplifier which are normally done manually. For example, to measure the noise of a unit under test, several test measurements of the unit under test must be made with the low noise source producing a carrier signal at different offset frequencies. Prior art systems require that the low noise source first be manually adjusted. The phase shifter must then be manually adjusted to ensure that the signals received by the mixer are in phase quadrature. The amplifier must also be adjusted to ensure that the signals received by the mixer are of the same amplitude. Moreover, the matching amplifier must be adjusted to ensure proper impendence between the mixer and analog-to-digital converter. These manual adjustments typically take ten minutes or more. The processor of the present invention provides for automatic adjustments of these components which typically can be accomplished in less than one minute. In addition, the processor of the present invention provides for the creation and automation of an entire test program, or protocol. A unit under test can be tested, stepped across a predetermined bandwidth by preprogramming the test system to conduct numerous test measurements of the UUT at different low noise source offset frequencies. In addition, the processor can be preprogrammed to conduct a sufficient number of test samples at each frequency offset to ensure that the noise level of the unit under test falls within acceptable levels. To control the measurement test system, the signal processor takes the digitized output from the ADC to both calibrate the system and to ensure that the amplifier, low noise source and phase shifter are set to correct levels. More particularly, the output from the ADC enables the processor to determine whether the low noise source is providing a carrier signal at a correct frequency. By evaluating the output from the ADC, the processor can determine that the phase shifter is properly maintaining the signals received by the mixer in phase quadrature. Similarly, any failure by the variable amplifier to maintain a proper level of amplification of the UUT signal as received by the mixer can be corrected by the processor. If any of these components are not functioning optimally, the processor makes required adjustments to ensure proper noise testing of the unit under test by the measurement test signal. In a preferred embodiment, the variable low noise source of the present invention outputs both a variable carrier signal and a variable calibration signal. The calibration signal is a very low level noise sideband having a precisely known magnitude relative to the magnitude of the carrier signal, typically about 60 dB below the amplitude of the carrier signal. The calibration signal enables calibration of the test measurement system. This calibration signal is not eliminated by phase quadrature in the mixer and would thus appear on the spectrum analyzer. Since the calibration signal has a known magnitude, the displayed height of the phase noise can be compared to the displayed height of the calibration signal. Any noise caused by the unit under test can be compared with calibration signal to quantitatively measure the phase noise of the unit under test. In addition, the present invention provides for quantitatively calibrating the system at multiple levels by adjusting the magnitude of the calibration signal. More particularly, it is preferred that when the measurement test system is calibrated, that the calibration signal be provided sequentially at different magnitudes. For example, the calibration signal is first provided a -10 dB relative to the carrier signal. Thereafter, the calibration signal is provided at -20 dB, -30 dB, -40 dB, -50 dB and -60 dB relative to the carrier signal. The processor then graphically displays each of these calibration levels on the spectrum analyzer so as to provide a greater measure of accuracy in determining the actual phase noise created by the unit under test. In an additional preferred embodiment, the processor controls the variable low noise source to produce multiple calibration signals which are offset in frequency during the test system calibration procedure. In other words, the present invention provides for calibrating the system in frequency and in amplitude each time the system is calibrated. For example, in addition to calibrating the system by producing calibration signals at -10 dB through -60 dB relative to the carrier signal, during calibration, the low noise source produces several additional calibration signals which are offset in frequency relative to the carrier signal. The processor then graphically displays each of these calibration levels on the spectrum analyzer so as to provide a greater measure of accuracy in determining the actual frequency of spurs or distortion products created by the unit under test. This information can be useful for determining the actual cause of any noise produced by the unit under test. It is thus an object of the present invention to provide an improved noise measurement test system for measuring the RF noise of a unit under test. It is an additional object of the present invention to provide an automated noise measurement test system which provides for automatic adjustments of the components of the system which can typically be accomplished in less than one minute. In addition, it is an object of the present invention to provide for an automated noise measurement test system which can create and implement an entire automated test program to desired requirements. It is still another object of the present invention to provide an automated noise measurement test system which can calibrate the system at several decibel levels relative to the carrier signal and at several offset frequencies relative to the carrier signal each time the system is calibrated. These and other further advantages of the present invention will be appreciated by those skilled in the art upon reading the following detailed description with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram showing the automated noise measurement test system of the present invention; Figs. 2(a) - 2(f) are graphical depictions as would be shown on a spectrum analyzer illustrating the carrier signal and calibration signals created by the low noise signal source of the present invention with the calibration signals adjusted to different decibel levels relative to the carrier signal; Figs. 3(a) - 3(f) are graphical depictions as would be shown on a spectrum analyzer illustrating the carrier signal and calibration signals created by the low noise source of the present invention in which the calibration signal is adjusted to calibrate the system at several offset frequencies relative to the carrier signal; and Fig. 4 is graphical depictions as would be shown on a spectrum analyzer illustrating the measurement test signal of a unit under test compared to a calibration signal created by the low noise source of the present invention. DETAILED DESCRIPTION OF THE INVENTION While the present invention is susceptible of embodiment in various forms, there is shown in the drawings and will hereinafter be described the presently preferred embodiments of the invention with the understanding that the present disclosure is to be considered as an exemplification of the invention and is not intended to limit the invention to the specific embodiments illustrated. With reference to Fig. 1, the present invention provides for an improved noise measurement test system 1 for measuring the noise added to a carrier signal 39 by a unit under test 3. The unit under test 3 includes an input 4 for receiving a low noise carrier signal 39 transmitted from the noise measurement system though output port 7. The unit under test 3 modifies, amplifies or otherwise adjusts the carrier signal 39 and outputs a UUT signal 35 from an output port 5. The UUT signal 35 is received by a measurement test system input port 6 where it is routed through a variable amplifier 15 having an input port 17 and an output port 19. After being routed through the variable amplifier 15, the UUT signal 35 is received by a mixer 21 through a first mixer input 23. The noise measurement test system 1 of the present invention further includes a variable low noise source 9 which produces the low noise carrier signal 39 provided to the unit under test. The low noise source also provides a second low noise signal 37, of identical frequency as the carrier signal 39, which is provided through output port 13. The second low noise signal 37 is then forwarded to a variable phase shifter 29 through an input port 31 where it s phase is adjusted and then output through the phase shifter's output port 33. After being adjusted in phase by the variable phase shifter 29, the second low noise signal 37 is routed to the mixer 21 through an input port 25. In operation, the variable phase shifter 29 adjusts the phase of the second low noise signal 37 so that it is 90 out of phase (in phase quadrature) with the UUT signal 35 when it is received by mixer 21. Moreover, the variable amplifier 15 is also adjustable so that it may be adjusted to amplify the UUT signal 35 so that it has a matching amplitude to that of the second low noise signal 37 when received by mixer 21. The mixer 21 combines the UUT signal 35 and second low noise signal 37 so that the signals are in phase quadrature. Assuming negligible noise in the variable amplifier 15, variable low noise source 9, variable phase shifter 29 and mixer 21, the output signal, referred to as a measurement test signal, represents the noise of the unit under test 3. This measurement test signal 41 is then routed through the input 45 and output 47 of a low noise matching amplifier 43. The low noise matching amplifier 43 amplifies the magnitude of the measurement test signal 41 so that any noise in the test signal can be more easily measured. Moreover, the low noise matching amplifier 43 acts as a buffer to ensure that the impedance is optimally maintained between the mixer 21 and an analog-to-digital converter 49 which receives the measurement test signal 41 after it is routed through the low noise matching amplifier 43. The analog-to-digital converter 49 has an input port 51 for receiving the measurement test signal 41. After being received by the analog-to-digital converter 49, the measurement test signal 41 is converted in first-in, first-out manner into a digital format and then output through output port 53. The measurement test signal 41, now in digital format, is forwarded to a processor 55 through input port 57. The processor 55 performs several evaluation operations of the measurement test signal 41 and routes the signal, typically unaltered, through an output port 59 to a spectrum analyzer 61 having an input port 63. The spectrum analyzer 61 includes a video display for providing a pictorial depiction of the measurement test signal 41. The noise measurement test system 1 of the present invention also includes a plurality of control lines 65, 67, 69 and 71 connecting the processor 55 to the variable phase shifter 29, variable amplifier 15, variable low noise source 9 and variable low noise matching amplifier 43, respectively. The processor 55 sets testing levels predetermined by the test system operator and makes adjustments to the amplifier 15, low noise source 9, phase shifter 29 and low noise matching amplifier 43 to obtain initial calibration of the system and to maintain optimum sensitivity of the system for measuring the phase noise of a unit under test 3. For example, to measure the phase noise of a unit under test 3, typically several measurements of phase noise of the unit under test 3 must be taken with the low noise source producing carrier signals at different offset frequencies. A testing protocol for a unit under test 3 would first require calibration of the entire system to ensure that the noise measurement test system 1 can accurately quantitate the phase noise produced by the unit under test 3 and to ensure that the noise measurement test system 1 is not introducing an undue amount of noise into the test setup itself. With reference also to Figs. 2 and 3, in a preferred embodiment, the processor 55 controls the low noise source 9 to produce both a variable carrier signal 75 and a variable calibration signal 77. The calibration signal 77 is a very low noise sideband having a precisely known frequency and magnitude relative to that of the carrier signal 75. Typical calibration signals 77 may have a magnitude about 60 dB below the magnitude of the carrier signal itself. As shown in Fig. 4, since the calibration signal 77 has a known magnitude, the displayed height of any phase noise of the measurement test signal 79 can be compared to the displayed height of the calibration signal 77 to provide a quantitative measurement of the phase noise of the unit under test 3. In an additional preferred embodiment, the calibration process employs several calibration signals 77 of different magnitude levels. For example, with reference to Figs. 2(a) - 2(f), calibration signals 77 are provided sequentially at different magnitudes to better calibrate the noise measurement test system 1 of the present invention. For example, as shown in Fig. 2(a), a calibration signal 77 is first provided at -60 dB. With reference to Figs. 2(b) - 2(f), carrier signals 75 are then sequentially provided at -50 dB, -40 dB, -30 dB, -20 dB and -10 dB, respectively. As shown on Fig. 4, these levels can then be graphically displayed on the spectrum analyzer 61 to enable the test operator to more accurately measure any spurious products or noise perturbations shown on the video display. In an additional preferred embodiment, a processor 55 controls the variable low noise source 9 to produce multiple calibration signals 77 which are offset in frequency when performing initial calibration of the noise measurement test system 1 of the present invention. With reference to Figs. 3(a) - 3(f), three calibration signals 77 are provided at frequencies lower than the carrier signal 75, while three calibration signals 77 are provided at frequencies higher than the carrier signal 75. Once the magnitude of the calibration signals 77 is known, these values can then be graphically displayed on the spectrum analyzer 61 so as to provide a greater measure of accuracy in determining the actual frequency of spurs or distortion products created by a unit under test 3. The processor 55 provides for automatic calibration of the test system without the operator needing to manually adjust the variable amplifier 15, low noise source 9, phase shifter 29 or low noise matching amplifier 43. Typical noise measurement systems require manual adjustment of the amplifier 15, low noise source 9, phase shifter 29 and low noise matching amplifier 43. With reference again to Fig. 1, the noise measurement test system 1 of the present invention provides for automatic control of these components. Once calibrated, the noise measurement test system 1 initiates a test protocol, based upon instructions provided by a test operator through a keyboard or the like. The instructions from the test operator would typically include the frequency bandwidth through which the unit under test 3 will be tested, the number of offset frequencies needed for testing, the spacing of the offset frequencies, and the number of samples that must be conducted at each offset frequency. According to this test program, the processor 55 automatically adjusts the low noise source 9 through control link 69 to produce a carrier signal 39 at a predetermined frequency. As explained above, the carrier signal 39 is routed through the unit under test 3 wherein it produces a UUT signal 35 which is routed through amplifier 15 to mixer 21. Meanwhile, the low noise source 9 produces a second low noise signal 37 which is routed through phase shifter 29 before also reaching mixer 21. The mixer outputs the measurement test signal 41 which is routed though the analog-to-digital converter 49 to the processor 55. The processor 55 automatically adjusts the amplifier 15 through control link 67 so that the amplitude of the UUT signal 35 matches the amplitude of the second low noise signal 37 as received by mixer 21 through input port 25. The processor 55 also automatically adjusts the phase shifter 29 through control link 65 to adjust the phase of the second low noise signal 37 so that it is 90 out of phase from the UUT signal 35, placing the signals in phase quadrature at mixer 21. These adjustments are based upon an evaluation of the measurement test signal 41 as it reaches the processor 55. Where the low noise source 9, amplifier 15 or phase shifter 29 are not adjusted correctly, the processor 55 automatically sends a command through control links to the phase shifter 29, amplifier 15 or low noise source 9 making any necessary adjustments ensuring that the measurement test system operates to optimum levels. These adjustments are made without any operator manipulation. After leaving the mixer 21, the measurement test signal 41 is routed through the low noise matching amplifier 43 and analog-to-digital converter 49 to processor 55. Where there is improper impedance between the mixer 21 and analog-to-digital converter 49, the processor 55 automatically adjusts the low noise matching amplifier 43 to ensure that there is proper impendence. Similarly, where the measurement test signal 41 is of insufficient signal strength to make proper noise measurements, the processor 55 sends commands through control link 71 to the low noise matching amplifier 43 instructing the low noise matching amplifier 43 to amplify the gain of the measurement test signal 41. In this manner, the noise measurement test system of the present invention provides a completely automated testing system. After reaching the processor 55, the measurement test signal 41 is routed to the spectrum analyzer 61. The measurement test signal 41 , now in digital format as converted by the analog-to-digital convertor 49, is analyzed by the spectrum analyzer 61 using discreet fourier transforms that accurately measure the noise spectrum of the measurement test signal 41, as shown on Fig. 4. As explained above, the measurement test signal 41 will register as a DC signal, or zero signal, where there is no noise in the system or unit under test 3. However, where there is noise introduced by the unit under test, the measurement test signal 41 will appear on the spectrum analyzer 61 as an alternating current (AC), with the jitter representative of the noise caused by the unit under test. As understood by those skilled in the art, if there is phase noise of 1 kHz, then a spike will be displayed on the sweeping analyzer at 1 kHz according to the equation: ΔV(t) = Vpeak sin Δ0(t) This is because there is a linear relationship between the mixer output 27 and the phase fluctuations of the unit under test 3. This is represented by the equation: KφΔ0 = ΔV When a mixer 21 is used as a phase detector, the voltage output of the mixer is directly proportional to the phase fluctuations of the unit under test 3. For example, the phase fluctuations of 1 kHz will show up as a proportional amplitude frequency of 1 kHz on a spectrum analyzer according to the following equations: ΔV(fm) = KφΔ0(fm) ΔV{fm) - 1.414 Vrms Δø (fm) Similarly, the output voltage of the mixer 21, as a function of frequency measured on a spectrum analyzer 61, would be directly proportional to the input signal phase deviation according to the following equations: ΔV(t) = ± peak Δ0(t) ΔV(fm) = KφΔøfm) ΔV(fm) - (measured phase detector consultant)Δø(fm) Δ0rms(fm) = (1.Kφ) ΔVrms (fm) Simply, the greater the phase fluctuation, the greater in amplitude the noise signal will appear on the spectrum analyzer display. Moreover, one can distinguish a true spur from a noise related perturbation by changing the resolution bandwidth of the noise measurement test system. A spur will remain constant in amplitude as the resolution bandwidth is varied. In contrast, noise related perturbations will tend to change in amplitude as the resolution bandwidth is varied. Once the above-described evaluation of the noise of the unit under test 3 has been completed at a particular frequency, for example by conducting a predetermined number of sample signal passes through the unit under test, the processor 55 automatically adjusts, steps , the frequency of the low noise source 9 to a different offset level. The amplifier 15 and phase shifter 29 are also adjusted automatically by the processor 55 to maintain the signals received by the mixer 21 in phase quadrature and the low noise matching amplifier 43 is automatically adjusted to ensure sufficient signal gain and proper impendence between the mixer 21 and analog-to-digital converter 49. Additional evaluation of the measurement test signal 41 is then performed by the spectrum analyzer 61 at the new offset frequency. Preferably, testing is stepped across closely spaced frequencies across the band of interest as spurs or noise related perturbations may only manifest themselves at a particular offset frequency or frequencies. Where the unit under test 3 is a variable amplifier 15, the unit under test 3 may produce spurs or noise perturbations at particular gain levels. Accordingly, in a preferred embodiment, the noise measurement test system 1 includes an additional control link 73 connecting the processor 55 to the unit under test 3. During a testing program, the unit under test 3 is also automatically adjusted by the processor 55 to various gain levels according to instructions by the test system operator. Though the components of the noise measurement test system may be purchased by numerous companies known to those skilled in the art, amplifiers and low noise matching amplifiers from Microwave Solutions, Inc. of National City, California are believed to be particularly suitable for application with the present invention due to their low noise characteristics. Similarly, phase shifters from KDI of Whippany, New Jersey and mixers from Watkins- Johnson of Milpitas, California are also believed acceptable for application with the present invention. For purposes of practicing the present invention, acceptable software source code for controlling the processor of the noise measurement test system is provided below. This source code, provided in C + + uncompiled format, provides for measuring the characteristics of the measurement test signal. This source code does not provide for the graphical display of the measurement test signal on a video display, which could be determined by one skilled in the art without undo experimentation. ^include < analysis.h > #include < ansi_c.h > ^include < cvirte.h > / * Needed if linking in external compiler; harmless otherwise */ -^include < userint.h > ^include "lois.h" ^include < windows.!. > ^include < mmsystem.h > Idefine ON 1 #define OFF 0 static int panelHandle; double pointsf-1024]; double noised 0001; double upperjimit - 8; double data[10001; double phase; double noisel [1000]; double upper limitl; double x[1000]; int go =0; int child 1 ; int main (int argc, char * argv[]) { if (InitCVIRTE (0, argv, 0) = = 0) / * Needed if linking in external compiler; harmless otherwise * / return -1 ; / * out of memory */ if ((panelHandle = LoadPanel (0, "lois.uir", PANEL)) < 0) return -1; DisplayPanel (panelHandle); childj = LoadPanel (panelHandle, "lois.uir", CHILDJ); DisplayPanel (child_1); RunUserlnterface (); return 0; } int CVICALLBACK AcquireData (int panel, int control, int event, void *callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT TIMER TICK: SineWave(1024, 6.0, 28.18e-3, Sphase, points); Spectrum(points, 256); GaussNoise (100, 3.0,-3.0, noise); Addl D (noise, points, 100, data); DeleteGraphPlot (panelHandle, PANEL_GRAPH, -1, 0); PlotY (panelHandle, PANEL_GRAPH, data, 100, VAL DOUBLE, VAL_THIN_LINE, VAL EMPTY QUARE, VAL_S0LID, 1, VAL RED); SineWave(512, 5, 10.18e-3, &phase, points); Spectrumfpoints, 128); PlotLine ( panelHandle, PANEL_GRAPH_2, -10.0, upperjimit, 100, upperjimit, VAL BLUE); DeleteGraphPlot (panelHandle, PANEL GRAPH 2, -1, 1 ); PlotY (panelHandle, PANEL GRAPH 2, points, 60, VAL DOUBLE, VAL THIN JJNE, VAL MPTY SQUARE, VAL SOLID, 1, VAL_RED); PlotLine ( panelHandle, PANEL_GRAPH, 0.0, upperjimit, 100, upperjimit, VAL BLUE); / * Check against alarm limits */ if (data[15] > = upperjimit) SetCtrlVal (panelHandle, PANEL ALARM HIGH, ON); else SetCtrlVal (panelHandle, PANEL_ALARM_HIGH, OFF); SineWave(512, 5, 10.18e-3, &phase, points); Spectrum(points, 128); if (data[7] > upperjimit) SetCtrlVal (panelHandle, PANEL LED, ON); else SetCtrlVal (panelHandle, PANELJ.ED, OFF); if (data[15] > upperjimit) SetCtrlVal (panelHandle, PANEL DISPLAYMSG1, "Fix U1 Amp"); if (data[15] < upperjimit) SetCtrlVal (panelHandle, PANEL DISPLAYMSG1, "Thata" Boy"); if (data[7] > upperjimit) PlaySound("C:,\B2..L0.WAV", NULL, SND YNC); SetCtrlVal (panelHandle, PANEL DISPLAYMSG4, " Check LO REF "); if (data[7] < upperjimit) SetCtrlVal (panelHandle, PANELJJISPLAYMSG4, ""); if (data[0] > upperjimit) SetCtrlVal (panelHandle, PANEL DISPLAYMSG5, "PM RES fail"); if (data[0] < upperjimit) SetCtrlVal (panelHandle, PANEL DISPLAYMSG5, ""); if (data[7] > upperjimit) SetCtrlVal (panelHandle, PANEL DISPLAYMSG6, "CAUTION"); if (data[7] < upperjimit) SetCtrlVal (panelHandle, PANEL DISPLAYMSG6, ""); break; } return 0; } int CVICALLBACK SetAlarmsfint panel, int control, int event, void * callbackData, int eventDatal, int eventData2) { if (event = = EVENT VAL CHANGED) switch (control) { case PANEL JJPPER LIMIT : GetCtrlVal (panelHandle, PANEL UPPER LIMIT, 8-uppβr Jimit); break; } return 0; } int CVICALLBACK FindMaxMin(int panel, int control, int event, void * callbackData, int eventDatal, int eventData2) { double max, min; int maxjndex, min index; switch (event) { case EVENT COMMIT: MaxMinl D (points, 100, &max, &max index, &min, &min index); SetCtrlVal (panelHandle, PANELJVIAX, max); SetCtrlVal (panelHandle, PANEL MIN, min); YGraphPopup ("points", points, 100, VALJ30UBLE); break; case EVENT RIGHT CLICK: MessagePopup ("Max & Min Control Help", "This control finds the maximum and minimum values of the waveform"); break; } return(O); } int CVICALLBACK Image (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: DisplaylmageFile (panelHandle, PANEL PIC1, "lustl.bmp"); break; } return 0; } int CVICALLBACK Image2 (int panel, int control, int event, void "callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: DisplaylmageFile (panelHandle, PANEL PIC1, "hatcher.bmp"); break; } return 0; } int CVICALLBACK Image3 (int panel, int control, int event, void 'callbackData, int eventDatal, int eveπtData2) { switch (event) { case EVENT COMMIT: DisplaylmageFile (panelHandle, PANEL PIC1, "pan2.bmp"); break; } return 0; } int CVICALLBACK Comment(int panel, int control, int event, void "callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT LEFTJ-LICK: MessagePopup ( " YOU'VE GOT A LOT OF NERVE !!!", "I'm calling your wife & boss buster... YOU are going to counciling.,1 don't listen to SUPERMAN..so why should I listen to you... "); break; } return 0; } int CVICALLBACK StopAcquireData (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: SuspendTimerCallbacks (); break; } return 0; } int CVICALLBACK StartAcquireData (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT J-OMMIT: ResumeTimerCallbacks (); break; } return 0; } int CVICALLBACK Show (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT_COMMIT: HidePanel (child 1); break; } return 0; } int CVICALLBACK Showl (int panel, int control, int event, void 'callbackData, int eventDatal , int eventData2) { switch (event) { case EVENT J-OMMIT: DisplayPanel (child 1 ); break; } return 0; } int CVICALLBACK Shutdown (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT_COMMIT: QuitUserlnterf ace (0); break; } return 0; #include < cvirte.h > #include "spectrum.h" #include < ansi_c.h > ^include < analysis.!. > ^include < dataacq.h > #include < userint.h > #include < utility.h > #include < easyio.h > static int helppnl; static int displaymode - 0; static double samprate = 20000.0; static int points - 512; static char channel[50] = "1 "; static int board = 1; static filtercode « 17; static int running - 0; static int mainpnl; static int filterpnl; static int scaiepnl, daqpanel; static int i; static int scale; static int datawindowtype; static double rate; static unsigned long task; static unsigned long backlog; static double wavef or m[2048]; static WindowConst constants; static double freqspace; static double spectrum[(2048 + 79)]; static double datawiπplot[2048]; static int f ilterenable = 0; static int filttype = 0; static int iirtype = 0; static int iirorder = 5; static double iircutoff 1 = 5000; static double iircutoff2 = 8000; static int filterfunc = 0; static double passbndrip - .50; static double stpbndatt - 40; static int firfiltype = 0; static int firwindow = 1; static int f irlength = 49; static double fircutoff 1 = 5000; static double fircutoff2 = 8000; static double kaiserbeta = 1.00; static double filtcoef s[80]; static double f ilteredwave[(2048 + 79)]; static initial = 1; static int daqpnl; static int graphscalepnl; static double waveformymin = -10.0; static double waveformymax - 10.0; static double spectrumlinmin = 0.0; static double spectrumlinmax = 5.0; static double spectrumdbmin = -200.0; static double spectrumdbmax = 30.0; static double spectrumdbmmin = -140.0; static double spectrumdbmmax = 90.0; static double timewavemin - -20.0; static double timewavemax = 20.0; static int signalswitch « 0; static int simsignaltype = 0; static double simsignalfreq = 2000.0; static double simphase; static short int errorchk = 0; static short int boardcode; static short int status - 0; void myfoo(void); int main (int argc, char *argv[]) { if (InitCVIRTE (0, argv, 0) = = 0) / * Needed if linking in external compiler; harmless otherwise */ return -1; /* out of memory */ if ((graphscalepnl = LoadPanel (0, "spectrum.uir", SCALEPNL)) < 0) return -1; if ((helppnl = LoadPanel (0, "spectrum.uir", HELPPNL)) < 0) return -1; if ((daqpnl = LoadPanel (0, "spectrum.uir", DAQPANEL)) < 0) return -1; if ((filterpnl = LoadPanel (0, "spectrum.uir", FILTERPNL)) < 0) return -1; if ((mainpnl - LoadPanel (0, "spectrum.uir", MAINPNL)) < 0) return -1; for (i=0; i < points; i+ +) { data inplotfi] = 1; } PlotY (mainpnl, MAINPNL WINDOWGRAPH, datawinplot, points, VAL_DOUBLE, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_S0LID, 1, VAL_RED); SetlnputMode (daqpnl, DAQPANEL_SIGNALSWITCH, 1); DisplayPanel (mainpnl); RunUserlnterface (); return 0; } int CVICALLBACK Getdatawindow (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (mainpnl, MAINPNL_DATAWINDOW, &datawindowtype); switch (datawindowtype) { case 0: f or (i = 0; i < points; i+ +) datawinplot..] - 1; break; case 1: for (i = 0; i< points; i++) datawinplotF] - .5-(.5 * cos(2 * 3.14 * i/points)); break; case 2: f or (i = 0;i< points; i+ + ) datawinplotFJ] = .54 - (.46*cos(2 * 3.14*i.points)); break; case 3: f or (i = 0;i< points; i + +) datawinplot[i] = .42323 - (.49755*cos(2*3.14 * i/points)) + (.07922*cos(4*3.14*i/points»; break; case 4: for (i=0; i< points; i++) datawinplot[i] = /18608.0)-((9240.0/18608.0) * cos(2 » 3.14 » i/points))+((1430.0/18608.0)*cos(4 * 3.14'i/points)); break; case 5: for (i=0; i < points; i+ + ) datawinplot[i] - .42-(.5*cos(2*3.14*i/points))+(.08*cos(4 * 3.14*i/points)); break; case 6: for (i = 0;i< points; i++) datawinplot[i] = .2810639-(.5208972*cos(2'3.14*i/points))+(.1980399 * cos(4*3.14*i/points)); break; case 7: for (i=0;i< points; i++) datawinplot[i] = .42323-(.49755'cos(2 * 3.14*i/points))+(.07922*cos(4 » 3.14*i/points)); break; case 8: for(i=0; i<points;i++) datawinplot[i] = .42323-(.49755*cos(2*3.14'i/points))+(.07922 * cos(4 * 3.14 * i/points)); break; } DeleteGraphPlot (mainpnl, MAINPNLJ/VINDOWGRAPH, -1, VAL DELAYED DRAW); PlotY (mainpnl, MAiNPNL WINDOWGRAPH, datawinplot, points, VAL DOUBLE, VAL THINJ.INE, VAL EMPTY SQUARE, VAL SOLID, 1, VAL RED); break; case EVENT RIGHT CLICK: MessagePopup ("Data Window Selection", "Selects the window to be applied to the acquired signal."); break; } return 0; } int CVICALLBACK Getfilter (int panel, int control, int event, void 'callbackData, int eventDatal , int eventData2) { switch (event) { case EVENT COMMIT: DisplayPanel (filterpnl); break; case EVENT RIGHTJ.UCK: MessagePopup ("Set Filter Parameters", "Displays and allows changes to filter parameters."); break; } return 0; } int CVICALLBACK Start (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT_COMMIT: if (signalswitch - « 1) { AICIearAcquisition (task); AIStartAcquisition (board, channel, 2 * points, samprate, 10, 0, &rate, &task); } SetCtrlAttribute (mainpnl, MAINPNL TIMER, ATTR NABLED, 1 ); SetlnputMode(mainpnl, MAINPNL_START, 0); SetlnputModefmainpnl, MAINPNL_STOP, 1); running - 1; break; case EVENT RIGHT CLICK: MessagePopup ("Start Data Acquisition", "Begins signal acquisition and processing."); break; } return 0; } int CVICALLBACK Stop (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: SetCtrlAttribute (mainpnl, MAINPNL_TIMER, ATTRJNABLED, 0); SetlnputModefmainpnl, MAINPNL START, 1); SetlnputMode(mainpnl, MAINPNL STOP, 0); running - 0; break; case EVENT RIGHT CLICK: MessagePopup ("Stop Data Acquisition", "Disables signal acquisition and processing."); break; } return 0; } int CVICALLBACK Quit (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT_COMMIT: QuitUserlnterface (0); break; case EVENT JHGHT CUCK: MessagePopup ("Quit", "Quits the program."); break; } return 0; } int CVICALLBACK Getscale (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (mainpnl, MAINPNL SCALE, &scale); break; case EVENT RIGHT CLICK: MessagePopup ("Set Axis", "Sets the axis on the frequency graph to linear, dB, or dBm."); break; } return 0; } / * filtercoefs array. The power spectrum of the filtered wave */ int CVICALLBACK Getdata (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT TIMER TICK: if (signalswitch - = 0) { switch (simsignaltype) { case 0: SineWave (points, 5.0, (simsignaifreq/20000.0), &simphase, waveform); break; case 1: SquareWave (points, 5.0, (simsignalfreq/20000.0), δtsimphase, 50.0, waveform); break; case 2: TriangleWave (points, 5.0, (simsignalfreq/20000.0), &simphase, waveform); break; case 3: Impulse (points, 100.0, 0, waveform); break; } } else { status = AIReadAcquisition (task, points, LATEST JVIODE, &backlog,GROUPJY CHANNEL, waveform); if (abs(status) - - 10846) { SetCtrlAttribute (mainpnl, MAINPNL TIMER, ATTRJNABLED, 0); MessagePopup ("DAQ Error", "The sampling rate you have selected is too large for your computer. Data in the buffer is being overwritten. Please change your sampling rate to a lower value."); DisplayPanel (daqpnl); } } DeleteGraphPlot (mainpnl, MAINPNL_TIMEGRAPH, -1, VALJJELAYED DRAW); SetAxisRange (mainpnl, MAINPNL TIMEGRAPH, VALJIOJHANGE, 0.0, 1.0, VAL_MANUAL, waveformymin, waveformymax); PlotY (mainpnl, MAINPNLJIMEGRAPH, waveform, points, VAL DOUBLE, VAL_THINJINE, VAL JMPTY SQUARE, VAL 0L1D, 1, VAL RED); ProcessDrawEvents (); ScaledWindow (waveform, points, datawindowtype, &constants); if (filterenable - = 0) { AutoPowerSpectrum (waveform, points, (1 /samprate), spectrum, Sfreqspace); DeleteGraphPlot (mainpnl, MAINPNLJREQGRAPH, -1, VAL_DELAYED_DRAW); if (displaymode- =0) { switch (scale) { case 0: SetAxisRange (mainpnl, MAINPNL JREQGRAPH, VAL NOJHANGE, 0.0, 1.0, (simsignaltype= =3)?VAL_AUT0SCALE:VAL_MANUAL, spectrumlinmin, spectrumlinmax); break; case 1 : f or (i = 0; i < (points/2); i + +) { spectrum[i] = 20*(log10(spectrum[i])); } SetAxisRange (mainpnl, MAINPNL JREQGRAPH, VAL IO CHANGE, 0.0, 1.0, (simsignaltype= = 3)?VAL_AUT0SCALE:VAL_MANUAL, spectrumdbmin, spectrumdbmax); break; case 2: for (i = 0; i < (points/2); i+ + ) { spectrum[i] = 20 * (log10(spectrum[i]/.001)); } SetAxisRange (mainpnl, MAINPNL JREQGRAPH, VAL JIO CHANGE, 0.0, 1.0, (simsignaltype= = 3)?VAL_AUTOSCALE:VAL_MANUAL, spectrumdbmmin, spectrumdbmmax); break; } PlotWaveform (mainpnl, MAINPNLJREQGRAPH, spectrum, points/2, VAL DOUBLE, 1.0, 0.0, 0.0, freqspace, VAL THIN LINE, VAL JMPTY SQUARE, VAL OLID, 1, VAL RED); } else { SetAxisRange (mainpnl, MAINPNLJREQGRAPH, VAL UTOSCALE, 0.0, 1.0, VAL MANUAL, timewavemin, timewavemax); PlotY (mainpnl, MAINPNLJREQGRAPH, waveform, points, VAL DOUBLE, VAL HINJINE, VAL EMPTY SQUARE, VAL OLID, 1, VAL JED); } } else { switch (filtercode) { ease l : /' LP BUTTERWORTH IIR '/ BwJPF (waveform, points, samprate, iircutoffl , iirorder, filteredwave); break; case 2: / * HP BUTTERWORTH IIR */ BwJPF (waveform, points, samprate, iircutoffl , iirorder, filteredwave); break; case 3: / * BP BUTTERWORTH IIR */ BwJPF (waveform, points, samprate, iircutoffl, iircutoff2, iirorder, filteredwave); break; case 4: /* BS BUTTERWORTH IIR */ BwJSF (waveform, points, samprate, iircutoffl , iircutoff2, iirorder, filteredwave); break; case 5: /' LP CHEBYSHEV IIR */ ChJPF (waveform, points, samprate, iircutoffl, passbndrip, iirorder, filteredwave); break; case 6: / » HP CHEBYSHEV IIR * / ChJPF (waveform, points, samprate, iircutoffl, passbndrip, iirorder, filteredwave); break; case 7: /* BP CHEBYSHEV IIR */ Ch BPF (waveform, points, samprate, iircutoffl, iircutoff2, passbndrip, iirorder, filteredwave); break; case 8: / » BS CHEBYSHEV IIR * / ChJSF (waveform, points, samprate, iircutoffl , iircutoff2, passbndrip, iirorder, filteredwave); break; case 9: / * LP INVERSE CHEBYSHEV IIR * / InvCh PF (waveform, points, samprate, iircutoffl, stpbndatt, iirorder, filteredwave); break; case 10: /* HP INVERSE CHEBYSHEV IIR '/ InvCh JPF (waveform, points, samprate, iircutoffl , stpbndatt, iirorder, filteredwave); break; case 11 : /' BP INVERSE CHEBYSHEV IIR */ InvCh JPF (waveform, points, samprate, iircutoffl , iircutoff2, stpbndatt, iirorder, filteredwave); break; case 12: /' BS INVERSE CHEBYSHEV IIR '/ InvCh SF (waveform, points, samprate, iircutoffl, iircutoff2, stpbndatt, iirorder, filteredwave); break; case 13: /* LP ELLIPTIC IIR */ Elp PF (waveform, points, samprate, iircutoffl, passbndrip, stpbndatt, iirorder, filteredwave); break; case 14: / » HP ELLIPTIC IIR */ ElpJPF (waveform, points, samprate, iircutoffl, passbndrip, stpbndatt, iirorder, filteredwave); break; case 15: / » BP ELLIPTIC IIR */ ElpJPF (waveform, points, samprate, iircutoffl, iircutoff2, passbndrip, stpbndatt, iirorder, filteredwave); break; case 16: / * BS ELLIPTIC MR * / ElpJSF (waveform, points, samprate, iircutoffl , iircutoff2, passbndrip, stpbndatt, iirorder, filteredwave); break; case 17: / * LP WINDOW FIR */ Wind JPF (samprate, fircutoffl, firlength, filtcoefs, firwindow); Convolve (filtcoefs, firlength, waveform, points, filteredwave); break; case 18: /' HP WINDOW FIR '/ Wind JPF (samprate, fircutoffl, firlength, filtcoefs, firwindow); Convolve (filtcoefs, firlength, waveform, points, filteredwave); break; case 19: / * BP WINDOW FIR * / Wind JPF (samprate, fircutoffl, fircutoff2, firlength, filtcoefs, firwindow); Convolve (filtcoefs, firlength, waveform, points, filteredwave); break; case 20: / * BS WINDOW FIR */ WindJSF (samprate, fircutoffl, fircutoff2, firlength, filtcoefs.firwindow); Convolve (filtcoefs, firlength,waveform, points, filteredwave); break; case 21 : /' LP KAISER FIR * / Ksr JPF (samprate, fircutoffl, firlength, filtcoefs, kaiserbeta); Convolve (filtcoefs, firlength, waveform, points, filteredwave); break; case 22: /* HP KAISER FIR */ Ksr JPF (samprate, fircutoffl, firlength, filtcoefs, kaiserbeta); Convolve (filtcoefs, firlength, waveform, points, filteredwave); break; case 23: / » BP KAISER FIR * / Ksr JPF (samprate, fircutoffl, fircutoff2, firlength, filtcoefs, kaiserbeta); Convolve (filtcoefs, firlength, waveform, points, filteredwave); break; case 24: / » BS KAISER FIR */ Ksr SF (samprate, fircutoffl, fircutoff2, firlength, filtcoefs, kaiserbeta); Convolve (f iltcoef s,f irlength, waveform, points, filteredwave); break; } AutoPowerSpectrum (filteredwave, points, (1 /samprate), spectrum, δifreqspace); DeleteGraphPlot (mainpnl, MAINPNLJREQGRAPH, -1, VAL ELAYED JRAW); if (displaymode = = 0) { switch (scale) { case 0: SetAxisRange (mainpnl, MAINPNLJREQGRAPH, VAL JO CHANGE, 0.0, 1.0, (simsignaltype- =3)?VAL_AUT0SCALE:VAL_MANUAL, spectrumlinmin, spectrumlinmax); break; case 1 : for (i = 0; i < (points/2); i + + ) { spectrumfi] = 20 * (log 10(spectrum[i])); } SetAxisRange (mainpnl, MAINPNLJREQGRAPH, VAL NO HANGE, 0.0, 1.0, (simsignaltype= = 3)?VAL_AUT0SCALE:VAL_MANUAL, spectrumdbmin, spectrumdbmax); break; case 2: for (i=0; i < (points/2); i + +) { spectrum[i] = 20 * (log10(spectrum[i]/.001 )); } SetAxisRange (mainpnl, MAINPNL JREQGRAPH, VALJIO CHANGE, 0.0, 1.0, (simsignaltype= = 3)?VAL_AUT0SCALE:VAL_MANUAL, spectrumdbmmin, spectrumdbmmax); break; } PlotWaveform (mainpnl, MAINPNLJREQGRAPH, spectrum, points/2, VAL DOUBLE, 1.0, 0.0, 0.0, freqspace, VAL HINJINE, VAL EMPTY SQUARE, VAL OLID, 1, VAL JED); } else { SetAxisRange (mainpnl, MAINPNLJREQGRAPH, VAL AUTOSCALE, 0.0, 1.0, VALJVIANUAL, timewavemin, timewavemax); PlotY (mainpnl, MAINPNLJREQGRAPH, filteredwave, points, VAL DOUBLE, VAL MINJINE, VALJMPTYJQUARE, VAL OLID, 1, VAL RED); } } break; } return 0; } void SetFilterPnllnputModesfchar * charArray) { SetlnputMode (filterpnl, FILTERPNL JILTTYPE, charArray[ 0]- -Υ); SetlnputMode (filterpnl, FILTERPNLJIRTYPE, charArray[ 1]- -T); SetlnputMode (filterpnl, F1LTERPNLJIR0RDER, charArray[ 2]- -T); SetlnputMode (filterpnl, FILTERPNLJIRCUT0FF1, charArray[ 3]- - '1 '); SetlnputMode (filterpnl, FILTERPNLJIRCUT0FF2, charArray[ 4]- - '1 '); SetlnputMode (filterpnl, FILTERPNL ILTERFUNC, charArray[ 5]- - Υ); SetlnputMode (filterpnl, FILTERPNL PASSBNDRIP, charArray[ 6]- -Υ); SetlnputMode (filterpnl, FILTERPNL STPBNDATT, charArray[ 7]= ='1 '); SetlnputMode (filterpnl, FILTERPNL JIRFILTYPE, charArray! 8]- -Υ); SetlnputMode (filterpnl, FILTERPNL FIRWINDOW, charArray! 9]- -Υ); SetlnputMode (filterpnl, FILTERPNL FIRLENGTH, charArray[10]= -Υ); SetlnputMode (filterpnl, FILTERPNLJIRCUT0FF1 , charArray[11]= = 'T); SetlnputMode (filterpnl, FILTERPNL JIRCUT0FF2, charArray[12]= =T); SetlnputMode (filterpnl, FILTERPNL KAISERBETA, charArray[13] = = Υ); } int CVICALLBACK Enablefilters (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: GetCtrlVal (filterpnl, FILTERPNLJILTERENABLE, &filterenable); if (filterenable - - 0) SetFilterPnllnputModesC'OOOOOOOOOOOOOO"); else if ((filterenable - = 1) && (initial - - 1 )) { initial = 0; SetFilterPnllnputModesf" 100001001 11100"); } else { switch (filttype) { case 0: switch (firfiltype) { case 0: switch (filterfunc) { case 0: SetFilterPnllnputModesf" 10000100111100"); break; case 1: SetFilterPnllnputModes("10000100111100"); break; case 2: SetFilterPnllnputModes("10000100111110"); break; case 3: SetFilterPnllnputModesf" 10000100111110"); break; } break; case 1: switch (filterfunc) { case 0: SetFilterPnllnputModes("10000100101101 "); break; case 1 : SetFilterPnllnputModes("10000100101101 "); break; case 2: SetFilterPnllnputModesf" 10000100101111 "); break; case 3: SetFilterPπilnputModesC'l 0000100101111 "); break; } break; } break; case 1 : switch (iirtype) { case 0: switch (filterfunc) { case 0: SetFilterPnllnputModesf" 1 11 10100000000"); break; case 1 : SetFilterPnllnputModes("1 1 110100000000"); break; case 2: SetFilterPnllnputModesf" 11111100000000"); break; case 3: SetFilterPnllnputModesf" 1111 1100000000"); break; } break; case 1: switch (filterfunc) { case 0: SetFilterPnllnputModes("1 1110110000000"); break; case 1: SetFilterPnllnputModes("11 1 10110000000"); break; case 2: SetFilterPnllnputModes("1 1111 110000000"); break; case 3: SetFilterPnllnputModesf" 1 1111 110000000"); break; } break; case 2: switch (filterfunc) { case 0: SetFilterPnllnputModesf" 1 11 10101000000"); break; case 1: SetFilterPnllnputModesf" 1 11 10101000000"); break; case 2: SetFilterPnllnputModesf" 1 11 11101000000"); break; case 3: SetFilterPnllnputModesf" 11111101000000"); break; } break; case 3: switch (filterfunc) { case 0: SetFilterPnllnputModesf" 1 11 10111000000"); break; case 1 : SetFilterPnllnputModesf" 11110111000000"); break; case 2: SetFilterPnllnputModes("1 111 1111000000"); break; case 3: SetFilterPnllπputModesfl 1111111000000"); break; } break; } break; } } break; case EVENTJIGHT CLICK: MessagePopup ("Enable/Disable Filters", "Enables or disables filtering of the acquired signal."); break; } return 0; } int CVICALLBACK Getfiltype (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT JOMMIT: GetCtrlVal (filterpnl, FILTERPNL JILTTYPE, &filttype); switch (filttype) { case 0: / » FIR */ switch (firfiltype) { case 0: / * WINDOW * / switch (filterfunc) { case 0: /* LOWPASS * / filtercode = 17; / * LP WINDOW FIR */ SetFilterPnllnputModesf" 1000010011 1100"); break; ease l : /' HIGHPASS */ filtercode 18; /' HP WINDOW FIR '/ SetFilterPnllnputModes("10000100111100"); break; case 2: /' BANDPASS */ filtercode = 19; / * BP WINDOW FIR */ SetFilterPnllnputModes("10000100111110"); break; case 3: / * BANDSTOP */ filtercode = 20; /* BS WINDOW FIR * / SetFilter PnllnputModes("10000100111110"); break; } break; ease l: / * KAISER * / switch (filterfunc) { case 0: /* LOWPASS » / filtercode = 21; /* LP KAISER FIR */ SetFilterPnllnputModesf" 10000100101101 "); break; ease l: /' HIGHPASS */ filtercode = 22; /* HP KAISER FIR * / SetFilterPnllnputModesf" 10000100101101 "); break; case 2: / * BANDPASS */ filtercode = 23; / * BP KAISER FIR '/ SetFilterPnllnputModesf" 1000010010111 1 "); break; case 3: / * BANDSTOP */ filtercode = 24; /* BS KAISER FIR * / SetFilterPnllnputModesf" 1000010010111 1 "); break; } break; } break; ease l : / * IIR */ switch (iirtype) { case 0: / * BUTTERWORTH * / switch (filterfunc) { case 0: /* LOWPASS */ filtercode - 1; /* LP BUTTERWORTH IIR * / SetFilterPnllnputModesf" 11110100000000"); break; ease l: /* HIGHPASS */ filtercode = 2; /* HP BUTTERWORTH IIR */ SetFilterPnllnputModesf" 11110100000000"); break; case 2: / * BANDPASS * / filtercode = 3; / * BP BUTTERWORTH IIR */ SetFilterPnllnputModes("11111100000000"); break; case 3: / * BANDSTOP */ filtercode = 4; / * BS BUTTERWORTH IIR */ SetFilterPnllπputModes("11111100000000"); break; } break; ease l : /' CHEBYSHEV */ switch (filterfunc) { case 0: / * LOWPASS */ filtercode = 5; /* LP CHEBYSHEV IIR '/ SetFilterPnllnputModesf" 11110110000000"); break; ease l : /' HIGHPASS * / filtercode = 6; / * HP CHEBYSHEV IIR * / SetFilterPnllnputModes("11 1 10110000000"); break; case 2: / * BANDPASS */ filtercode = 7; / * BP CHEBYSHEV IIR */ SetFilterPnllnputModes("1 1 1 1 1 1 10000000"); break; case 3: / * BANDSTOP * / filtercode = 8; / * BS CHEBYSHEV IIR * / SetFilterPnllnputModesf" 11111110000000"); break; } break; case 2: /* INV CHEBYSHEV */ switch (filterfunc) { case 0: / * LOWPASS */ filtercode = 9; / * LP INV CHEBYSHEV IIR » / SetFilterPnllnputModesf" 1 1 110101000000"); break; ease l : /' HIGHPASS */ filtercode - 10; / * HP INV CHEBYSHEV */ SetFilterPnllnputModesf" 11110101000000"); break; case 2: / * BANDPASS */ filtercode = 11; / * BP INVERSE CHEBYSHEV */ SetFilterPnllnputModesf" 11111101000000"); break; case 3: /' BANDSTOP */ filtercode = 12; / * BS INV CHEBYSHEV IIR '/ SetFilterPnllnputModesf" 11 1 11101000000"); break; } break; case 3: /* ELLIPTIC '/ switch (filterfunc) { case 0: /' LOWPASS » / filtercode = 13; / * LP ELLIPTIC IIR */ SetFilterPnllnputModesf" 11110111000000"); break; ease l : /' HIGHPASS */ filtercode - 14; /* HP ELLIPTIC IIR */ SetFilterPnllnputModesf" 11110111000000"); break; case 2: /* BANDPASS * / filtercode - 15; /* BP ELLIPTIC IIR */ SetFilterPnllnputModes("11111111000000"); break; case 3: / * BANDSTOP * / filtercode - 16; /* BS ELLIPTIC IIR * / SetFilterPnllnputModesf" 11111111000000"); break; } / * END OF SWITCH ON FILTERFUNC */ break; } / » END OF SWITCH ON IIRTYPE */ break; } / * END OF SWITCH ON FILTTYPE */ break; case EVENT RIGHT CLICK: MessagePopup ("Select Filter Type", "Selects between IIR and FIR filters."); break; } / * END OF SWITCH ON COMMIT */ return 0; } / * END OF FUNCTION * / int CVICALLBACK Getiirtype (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT JOMMIT: GetCtrlVal (filterpnl, FILTERPNLJIRTYPE, &iirtype); switch (iirtype) { case 0: / * BUTTERWORTH */ switch (filterfunc) { case 0: / * LOWPASS */ filtercode = 1; /* LP BUTTERWORTH IIR */ SetFilterPnllnputModes("11110100000000"); break; ease l: /' HIGHPASS '/ filtercode = 2; / * HP BUTTERWORTH IIR */ SetFilterPnllnputModesf" 11110100000000"); break; case 2: /* BANDPASS '/ filtercode = 3; /* BP BUTTERWORTH IIR » / SetFilterPnllnputModesf" 1 1111100000000"); break; case 3: /' BANDSTOP » / filtercode = 4; /* BS BUTTERWORTH IIR » / SetFilterPnllnputModesf" 11111100000000"); break; } break; ease l : /' CHEBYSHEV */ switch (filterfunc) { case 0: / * LOWPASS * / filtercode = 5; /* LP CHEBYSHEV IIR */ SetFilterPnllnputModesf" 1 1110110000000"); break; ease l : / * HIGHPASS * / filtercode = 6; /' HP CHEBYSHEV IIR */ SetFilterPnllnputModes("111 10110000000"); break; case 2: / * BANDPASS * / filtercode = 7; / * BP CHEBYSHEV IIR * / SetFilterPnllnputModesf" 1 1 1 111 10000000"); break; case 3: /* BANDSTOP */ filtercode - 8; /* BS CHEBYSHEV IIR * / SetFilterPnllnputModesf" 1 11 11110000000"); break; } break; case 2: /* INV CHEBYSHEV » / switch (filterfunc) { case 0: / * LOWPASS » / filtercode = 9; / * LP INV CHEBYSHEV IIR * / SetFilterPnllnputModes("11110101000000"); break; ease l: /' HIGHPASS */ filtercode = 10; /* HP INV CHEBYSHEV */ SetFilterPnllnputModesf" 11110101000000"); break; case 2: / * BANDPASS */ filtercode = 11; /* BP INVERSE CHEBYSHEV * / SetFilterPnllnputModesf" 11111101000000"); break; case 3: / * BANDSTOP */ filtercode = 12; /* BS INV CHEBYSHEV IIR * / SetFilterPnllnputModesfl 111 1101000000"); break; } break; case 3: /* ELLIPTIC * / switch (filterfunc) { case 0: /* LOWPASS * / filtercode - 13; /* LP ELLIPTIC IIR */ SetFilterPnllnputModesf" 111101 1 1000000"); break; ease l : /' HIGHPASS * / filtercode = 14; / » HP ELLIPTIC IIR */ SetFilterPnllnputModesfl 1110111000000"); break; case 2: /* BANDPASS */ filtercode - 15; / * BP ELLIPTIC IIR */ SetFilterPnllnputModesfl 111 1111000000"); break; case 3: /' BANDSTOP */ filtercode = 16; / * BS ELLIPTIC IIR */ SetFilterPnllnputModesfl 111 1111000000"); break; } /* END OF SWITCH ON FILTERFUNC */ break; } /* END OF SWITCH ON IIRTYPE */ break; case EVENT JIGHT JLICK: MessagePopup ("Select IIR Filter Type", "Select between Butterworth, Chebyshev, Inverse Chebyshev, or Elliptic IIR Filters."); break; } / * END OF SWITCH ON COMMIT '/ return 0; } /' END OF FUNCTION */ void CheckCutoffs (void) { if ((filterenable = = 1 ) && (filttype = = 0) && ((filterfunc - -2) | | (filterfunc- = 3))) { if (fircutoff 2 < = fircutoffl) { MessagePopup ("FIR Cutoff Frequency Error", "The upper cutoff frequency must be greater than the lower cutoff frequency. The upper cutoff frequency has been reset to 100 Hz greater than the lower cutoff frequency."); if (fircutoffl = = (samprate/2)) { fircutoffl - fircutoffl - 100; SetCtrlVal (filterpnl, FILTERPNL JIRCUT0FF1, fircutoffl); } fircutoff 2 = fircutoffl + 100; SetCtrlVal (filterpnl, FILTERPNLJIRCUT0FF2, fircutoff2); } } if ((filterenable = = 1) && (filttype - - 1 ) && ((filterfunc - -2) | | (filterfunc- =3))) { if (iircutoff2 < = iircutoffl) { MessagePopup ("IIR Cutoff Frequency Error", "The upper cutoff frequency must be greater than the lower cutoff frequency. The upper cutoff frequency has been reset to 100 Hz greater than the lower cutoff frequency."); if (iircutoffl = = (samprate/2)) { iircutoffl = iircutoffl - 100; SetCtrlVal (filterpnl, FILTERPNLJIRCUT0FF1, iircutoffl); } iircutoff2 - iircutoffl + 100; SetCtrlVal (filterpnl, FILTERPNLJIRCUT0FF2, iircutoff 2); } } } int CVICALLBACK Getiirorder (int panel, int control, int event, void * callbackData, int eventDatal , int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNLJIRORDER, &iirorder); break; case EVENT RIGHT CLICK: MessagePopup ("Set IIR Filter Order", "Sets the order of the IIR Filter."); break; } return 0; } int CVICALLBACK Getfircutoff 1 (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNL JIRCUT0FF1, &fircutoff1); CheckCutoffsO; break; case EVENT RIGHT JLICK: MessagePopup ("Set Lower FIR Cutoff Frequency", "Sets the lower cutoff frequency of the FIR filter (in Hertz). This is the only cutoff frequency for Lowpass and Highpass filters."); break; } return 0; } int CVICALLBACK Getiircutoff 1 (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNLJIRCUT0FF1, &iircutoff1); CheckCutoffsf); break; case EVENT RIGHT JLICK: MessagePopup ("Set Lower IIR Cutoff Frequency", "Sets the lower cutoff frequency of the IIR filter (in Hertz). This is the only cutoff frequency for Lowpass and Highpass filters."); break; } return 0; } int CVICALLBACK Getfircutoff2 (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNL JIRCUT0FF2, &fircutoff2); CheckCutoffsf); break; case EVENTJIGHT CLICK: MessagePopup ("Set Upper FIR Cutoff Frequency", "Sets the upper cutoff frequency of the FIR filter (in Hertz). This is used only with Bandpass and Bandstop filters."); break; } return 0; } int CVICALLBACK Getiircutoff2 (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNLJIRCUT0FF2, &iircutoff2); CheckCutoffsf); break; case EVENT RIGHT CLICK: MessagePopup ("Set Upper IIR Cutoff Frequency", "Sets the upper cutoff frequency of the IIR filter (in Hertz). This is used only with Bandpass and Bandstop filters."); break; } return 0; } int CVICALLBACK Getpassbndrip (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNL PASSBNDRIP, &passbndrip); break; case EVENT JIGHT CLICK: MessagePopup ("Select Ripple", "Sets the value (in dB) of ripple in the passband for Chebyshev and Elliptic filters." ); break; } return 0; } int CVICALLBACK Getstpbndatt (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNL JTPBNDATT, Sstpbndatt); break; case EVENT RIGHT CLICK: MessagePopup ("Select Attenuation", "Sets the value (in dB) of attenuation in the stopband for Inverse Chebyshev and Elliptic filters."); break; } return 0; } int CVICALLBACK Getfirfiltype (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: GetCtrlVal (filterpnl, FILTERPNL FIRFILTYPE, &firfiltype); switch (firfiltype) { case 0: /' WINDOW * / switch (filterfunc) { case 0: /* LOWPASS */ filtercode - 17; / » LP WINDOW FIR */ SetFilterPnllnputModesfl 0000100111100"); break; ease l : /' HIGHPASS */ filtercode - 18; / * HP WINDOW FIR » / SetFilterPnllnputModesf 10000100111100"); break; case 2: / * BANDPASS */ filtercode - 19; / * BP WINDOW FIR * / SetFilterPnllnputModesfl 0000100111110"); break; case 3: /' BANDSTOP */ filtercode - 20; /* BS WINDOW FIR */ SetFilterPnllnputModesf 10000100111110"); break; } break; ease l : /' KAISER '/ switch (filterfunc) { case 0: / * LOWPASS * / filtercode - 21; /* LP KAISER FIR */ SetFilterPnllnputModesfl 0000100101101 "); break; ease l : / * HIGHPASS */ filtercode = 22; /* HP KAISER FIR */ SetFilterPnllnputModesfl 0000100101101 "); break; case 2: / * BANDPASS */ filtercode = 23; /* BP KAISER FIR */ SetFilterPnllnputModesfl 0000100101111 "); break; case 3: / * BANDSTOP * / filtercode = 24; /' BS KAISER FIR » / SetFilterPnllnputModesf" 10000100101111 "); break; } break; } /* END OF SWITCH ON FIRFILTYPE */ break; case EVENT RIGHT CLICK: MessagePopup ("Select FIR Filter Type", "Sets type of FIR filter used (Window or Kaiser methods)."); break; } / * END OF SWITCH ON COMMIT */ return 0; } / * END OF FUNCTION */ int CVICALLBACK Getfirwindow (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: GetCtrlVal (filterpnl, FILTERPNL JIRWINDOW, Sfirwindow); break; case EVENT RIGHT JLICK: MessagePopup ("Select FIR Window", "Selects the window used in the FIR filter (used in window mode only)."); break; } return 0; } int CVICALLBACK Getfirlength (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNL FIRLENGTH, Sfirlength); if (!(firlength%2)) { firlength+ +; SetCtrlVal (filterpnl, FILTERPNL FIRLENGTH, firlength); } break; case EVENTJIGHTJLICK: MessagePopup ("Select FIR Filter Length", "Sets the number of points for the FIR filterfOdd value between 1 -79)."); break; } return 0; } int CVICALLBACK Getkaibeta (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNL KAISERBETA, &kaiserbeta); break; case EVENT RIGHT CLICK: MessagePopup ("Select Beta", "Sets the value for the beta parameter in the Kaiser window."); break; } return 0; } int CVICALLBACK Getfilterfunc (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (filterpnl, FILTERPNL FILTERFUNC, Sfilterfunc); switch (filttype) { case 0: /* FIR */ switch (firfiltype) { case 0: /* WINDOW */ switch (filterfunc) { case 0: /* LOWPASS * / filtercode = 17; / * LP WINDOW FIR */ SetFilterPnllnputModesf 100001001 11100"); break; ease l : / * HIGHPASS */ filtercode - 18; / * HP WINDOW FIR */ SetFilterPnllnputModesfl 0000100111100"); break; case 2: / * BANDPASS */ filtercode - 19; /* BP WINDOW FIR */ SetFilterPnllnputModesfl 0000100111110"); break; case 3: /' BANDSTOP */ filtercode - 20; /* BS WINDOW FIR » / SetFilterPnllnputModesfl 0000100111110"); break; } break; ease l : /' KAISER */ switch (filterfunc) { case 0: / * LOWPASS */ filtercode - 21; / * LP KAISER FIR */ SetFilterPnllnputModesf 10000100101101 "); break; ease l: / * HIGHPASS */ filtercode = 22; /* HP KAISER FIR */ SetFilterPnllnputModesfl 0000100101101"); break; case 2: /* BANDPASS * / filtercode = 23; / * BP KAISER FIR */ SetFilterPnllnputModesfl 0000100101111 "); break; case 3: / * BANDSTOP * / filtercode = 24; / * BS KAISER FIR */ SetFilterPnllnputModesfl 0000100101111 "); break; } break; } break; ease l : /' IIR '/ switch (iirtype) { case 0: /* BUTTERWORTH */ switch (filterfunc) { case 0: /* LOWPASS */ filtercode = 1; /* LP BUTTERWORTH IIR */ SetFilterPnllnputModesfl 11 10100000000"); break; ease l : /* HIGHPASS */ filtercode = 2; /* HP BUTTERWORTH IIR * / SetFilterPnllnputModesf" 11 110100000000"); break; case 2: / * BANDPASS */ filtercode = 3; /* BP BUTTERWORTH IIR * / SetFilterPnllnputModesfl 11 1 1 100000000"); break; case 3: / » BANDSTOP */ filtercode = 4; /* BS BUTTERWORTH IIR * / SetFilterPnllnputModesfl 1111100000000"); break; } break; ease l : /' CHEBYSHEV */ switch (filterfunc) { case 0: /* LOWPASS */ filtercode = 5; / * LP CHEBYSHEV IIR */ SetFilterPnllnputModesf 11110110000000"); break; ease l : /* HIGHPASS */ filtercode = 6; /* HP CHEBYSHEV IIR * / SetFilterPnllnputModesfl 1110110000000"); break; case 2: / * BANDPASS * / filtercode = 7; /* BP CHEBYSHEV IIR */ SetFilterPnllnputModesfl 1111110000000"); break; case 3: / * BANDSTOP * / filtercode = 8; / * BS CHEBYSHEV IIR */ SetFilterPnllnputModesf 11111110000000"); break; } break; case 2: / * INV CHEBYSHEV */ switch (filterfunc) { case 0: /* LOWPASS */ filtercode = 9; / » LP INV CHEBYSHEV IIR */ SetFilterPnllnputModesfl 1110101000000"); break; ease l : /' HIGHPASS */ filtercode = 10; / * HP INV CHEBYSHEV */ SetFilterPnllnputModesfl 1 1 10101000000"); break; case 2: /* BANDPASS */ filtercode = 11; / * BP INVERSE CHEBYSHEV * / SetFilterPnllnputModesfl 1 111101000000"); break; case 3: /' BANDSTOP */ filtercode = 12; /* BS INV CHEBYSHEV IIR */ SetFilterPnllnputModesf 11111101000000"); break; } break; case 3: / * ELLIPTIC */ switch (filterfunc) { case 0: / * LOWPASS */ filtercode - 13; / * LP ELLIPTIC IIR */ SetFilterPnllnputModesf 1111011 1000000"); break; ease l: /' HIGHPASS */ filtercode - 14; /* HP ELLIPTIC IIR * / SetFilterPnllnputModesf 11110111000000"); break; case 2: / * BANDPASS * / filtercode - 15; / * BP ELLIPTIC IIR */ SetFilterPnllnputModesf 1111 1 111000000"); break; case 3: / * BANDSTOP */ filtercode - 16; / * BS ELLIPTIC IIR */ SetFilterPnllnputModesfl 111 1 111000000"); break; } /* END OF SWITCH ON FILTERFUNC '/ break; } / * END OF SWITCH ON IIRTYPE */ break; } / * END OF SWITCH ON FILTTYPE '/ break; case EVENT JIGHTJUCK: MessagePopup ("Select Filter Function", "Selects between lowpass, highpass, bandpass, and bandstop filters."); break; } return 0; } int CVICALLBACK Returntomain (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT JOMMIT: HidePanel (filterpnl); break; case EVENT RIGHT CLICK: MessagePopup ("Return to Main Screen", "Applies the chosen filter parameters and returns to the data acquisition screen."); break; } return 0; } int CVICALLBACK ConfigureDaq (int panel, int control, int event, void 'callbackData, int eventDatal , int eventData2) { switch (event) { case EVENT COMMIT: DisplayPanel (daqpnl); break; case EVENT RIGHT CLICK: MessagePopup ("Configure DAQ", "Displays and allows user to change acquisition parameters."); break; } return 0; } int CVICALLBACK GetBoard (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT JOMMIT: GetCtrlVal (daqpnl, DAQPANEL JOARD, &board); break; case EVENT RIGHT CLICK: MessagePopup ("Set Board Number", "Sets the data acquisition board number."); break; } return 0; } int CVICALLBACK Getchannel (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (daqpnl, DAQPANEL CHANNEL, channel); break; case EVENT RIGHT CLICK: MessagePopup ("Set Channel Number", "Sets the channel number to acquire data from."); break; } return 0; } int CVICALLBACK Getsamprate (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (daqpnl, DAQPANEL SAMPRATE, Ssamprate); if (fircutoffl > (samprate/2)) { fircutoffl - (samprate/2) - 100; SetCtrlVal (filterpnl, FILTERPNL JIRCUT0FF1 , fircutoff 1 ); } if (f ircutoff2 > (samprate/2)) { fircutoff2 = (samprate/2); SetCtrlVal (filterpnl, FILTERPNL JIRCUT0FF2, fircutoff 2); } if (iircutoffl > (samprate/2)) { iircutoffl = (samprate/2) - 100; SetCtrlVal (filterpnl, FILTERPNLJIRCUT0FF1, iircutoffl); } if (iircutoff2 > (samprate/2)) { iircutoff2 = (samprate/2); SetCtrlVal (filterpnl, FILTERPNLJIRCUT0FF2, iircutoff2); } SetCtrlAttribute (filterpnl, FILTERPNL JIRCUT0FF1, ATTR MAX VALUE, (samprate/2)); SetCtrlAttribute (filterpnl, FILTERPNLJIRCUT0FF2, ATTR MAX VALUE, (samprate/2)); SetCtrlAttribute (filterpnl, FILTERPNLJIRCUT0FF1, ATTRJ IAX VALUE, (samprate/2)); SetCtrlAttribute (filterpnl, FILTERPNLJIRCUT0FF2, ATTR MAX VALUE, (samprate/2)); break; case EVENT RIGHT CLICK: MessagePopup ("Set Sampling Rate", "Sets the sampling rate for acquiring data."); break; } return 0; } int CVICALLBACK Getpoints (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT JOMMIT: GetCtrlVal (daqpnl, DAQPANEL POINTS, &points); break; case EVENTJIGHT L1CK: MessagePopup ("Set Number of Points", "Sets the number of points to acquire and analyze with each iteration."); break; } return 0; } int CVICALLBACK Quitdaqconf (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT JOMMIT: HidePanel (daqpnl); if (running = = 1 ) { if (signalswitch - - 1) { AICIearAcquisition (task); AIStartAcquisition (board, channel, 2*points, samprate, 10, 0, &rate,&task); } } break; case EVENT RIGHT CLICK: MessagePopup ("Return to Main Screen", "Applies the chosen acquisition parameters and returns to the main screen."); break; } return 0; } int CVICALLBACK Getdisplaγmode (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (mainpnl, MAINPNLJREQDISPLAY, &displaymode); if (displaymode= = 1 ) { SetlnputMode (mainpnl, MAINPNL CALE, 0); SetCtrlAttribute (mainpnl, MAINPNLJREQGRAPH, ATTR XNAME, "Time"); SetCtrlAttribute (mainpnl, MAINPNLJREQGRAPH, ATTR YNAME, "Volts"); SetCtrlAttribute (mainpnl, MAINPNLJREQGRAPH, ATTR LABEL JΕXT, "Processed Time Waveform"); } else { SetlnputMode (mainpnl, MAINPNL JCALE, 1); SetCtrlAttribute (mainpnl, MAINPNLJREQGRAPH, ATTR XNAME, "Hertz"); SetCtrlAttribute (mainpnl, MAINPNLJREQGRAPH, ATTR YNAME, "Magnitude"); SetCtrlAttribute (mainpnl, MAINPNLJREQGRAPH, ATTR LABEL TEXT, "Power Spectrum"); } break; case EVENT RIGHT JLICK: MessagePopup ("Graph Display Selection", "Selects between the processed time waveform or the frequency spectrum for display on the lower graph."); break; } return 0; } int CVICALLBACK Calihelp (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: SetCtrlAttribute (mainpnl, MAINPNLJTIMER, ATTRJNABLED, 0); HidePanel (mainpnl); DisplayPanel (helppnl); break; case EVENTJIGHT CLICK: MessagePopup ("Help", "Displays help and information about the program."); break; } return 0; } int CVICALLBACK Quithelp (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: HidePanel (helppnl); DisplayPanel (mainpnl); if (running - - 1 ) { SetCtrlAttribute (mainpnl, MAINPNL JΪMER, ATTRJNABLED, 1); if (signalswitch - - 1) { AICIearAcquisition (task); AIStartAcquisition (board, channel, 2*points, samprate, 10, 0, Srate, &task); } } break; case EVENT RIGHT CLICK: MessagePopup ("Exit Help", "Exits the help function and returns to the main panel."); break; } return 0; } int CVICALLBACK Scalegraphs (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT OMMIT: SetCtrlAttribute (mainpnl, MAINPNL_TIMER, ATTRJNABLED, 0); DisplayPanel (graphscalepnl); break; case EVENT RIGHT CLICK: MessagePopup ("Graph Scale Settings", "Allows user to set y-axis values for the graphs."); break; } return 0; } int CVICALLBACK Getwaveformymin (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT OMMIT: GetCtrlVal (graphscalepnl, SCALEPNLJVAVEFORMYMIN, &waveformymin); if (waveformymin > = waveformymax) { waveformymax = waveformymin + 1; SetCtrlVal (graphscalepnl, SCALEPNLJV AVEFORMYMAX, waveformymax); } break; case EVENT RIGHT CLICK: MessagePopup ("Set Waveform Graph Y Axis Minimum", "Sets the minimum value of the y-axis on the upper graph."); break; } return 0; } int CVICALLBACK Getwaveformγmax (int panel, int control, int event, void 'callbackData, int eventDatal , int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (graphscalepnl, SCALEPNLJVAVEFORMYMAX, Swaveformymax); if (waveformymax < = waveformymin) { waveformymax = waveformymin + 1; SetCtrlVal (graphscalepnl, SCALEPNLJVAVEFORMYMAX, waveformymax); } break; case EVENT JIGHT CLICK: MessagePopup ("Set Waveform Graph Y Axis Maximum", "Sets the maximum value of the y-axis on the upper graph."); break; } return 0; } int CVICALLBACK Getspectrumlinmin (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (graphscalepnl, SCALEPNL JPECTRUMUNMIN, &spectrumiinmin); if (spectrumlinmin > = spectrumlinmax) { spectrumlinmax = spectrumlinmin + 1; SetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMLINMAX, spectrumlinmax); } break; case EVENT RIGHT CLICK: MessagePopup ("Set Linear Scale Mode Y Axis Minimum", "Sets the minimum value of the γ axis on the lower graph for linear scale mode."); break; } return 0; } int CVICALLBACK Getspectrumlinmax (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (graphscalepnl, SCALEPNL JPECTRUMLINMAX, &spectrumlinmax); if (spectrumlinmax < - spectrumlinmin) { spectrumlinmax - spectrumlinmin + 1; SetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMLINMAX, spectrumlinmax); } break; case EVENT RIGHT CLICK: MessagePopup ("Set Linear Scale Mode Y Axis Maximum", "Sets the maximum value of the y axis on the lower graph for linear scale mode."); break; } return 0; } int CVICALLBACK Getspectrumdbmin (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMDBMIN, &spectrumdbmin); if (spectrumdbmin > = spectrumdbmax) { spectrumdbmax = spectrumdbmin + 1; SetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMDBMAX, spectrumdbmax); } break; case EVENT JIGHTJLICK: MessagePopup ("Set dB Mode Y Axis Minimum", "Sets the minimum value of the y-axis for dB scale mode."); break; } return 0; } int CVICALLBACK Getspectrumdbmax (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: GetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMDBMAX, &spectrumdbmax); if (spectrumdbmax < = spectrumdbmin) { spectrumdbmax = spectrumdbmin + 1; SetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMDBMAX, spectrumdbmax); } break; case EVENT IGHTJLICK: MessagePopup ("Set dB Mode Y Axis Maximum", "Sets the maximum value of the y-axis for dB scale mode."); break; } return 0; } int CVICALLBACK Getspectrumdbmmin (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (graphscalepnl, SCALEPNLJPECTRUMDBMMIN, &spectrumdbmmin); if (spectrumdbmmin > = spectrumdbmmax) { spectrumdbmmax - spectrumdbmmin + 1; SetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMDBMMAX, spectrumdbmmax); } break; case EVENT JIGHTJLICK: MessagePopup ("Set dBm Mode Y Axis Minimum", "Sets the minimum value of the y-axis for dBm scale mode."); break; } return 0; } int CVICALLBACK Getspectrumdbmmax (int panel, int control, int event, void 'callbackData, int eventDatal , int eventData2) { switch (event) { case EVENT OMMIT: GetCtrlVal (graphscalepnl, SCALEPNL SPECTRUMDBMMAX, &spectrumdbmmax); if (spectrumdbmmax < = spectrumdbmmin) { spectrumdbmmax - spectrumdbmmin + 1; SetCtrlVal (graphscalepnl, SCALEPNLJPECTRUMDBMMAX, spectrumdbmmax); } break; case EVENT RIGHT CLICK: MessagePopup ("Set dBm Mode Y Axis Maximum", "Sets the maximum value of the y-axis for dBm scale mode."); break; } return 0; } int CVICALLBACK Gettimewavemin (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (graphscalepnl, SCALEPNL TIMEWAVEMIN, Stimewavemin); if (timewavemin > = timewavemax) { timewavemax = timewavemin + 1; SetCtrlVal (graphscalepnl, SCALEPNLJTIMEWAVEMAX, timewavemax); } break; case EVENT JIGHTJLICK: MessagePopup ("Set Time Waveform Mode Y Axis Minimum", "Sets the minimum value of the y-axis for Time Waveform display mode."); break; } return 0; } int CVICALLBACK Gettimewavemax (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENT COMMIT: GetCtrlVal (graphscalepnl, SCALEPNLJTIMEWAVEMAX, &timewavemax); if (timewavemax < - timewavemin) { timewavemax - timewavemin + 1; SetCtrlVal (graphscalepnl, SCALEPNLJTIMEWAVEMAX, timewavemax); } break; case EVENT RIGHT CLICK: MessagePopup ("Set Time Waveform Mode Y Axis Maximum", "Sets the maximum value of the y-axis for Time Waveform display mode."); break; } return 0; } int CVICALLBACK Quitgraphscaling (int panel, int control, int event, void 'callbackData, int eventDatal , int eventData2) { switch (event) { case EVENT COMMIT: HidePanel (graphscalepnl); if (running = - 1) { SetCtrlAttribute (mainpnl, MAINPNL TIMER, ATTRJNABLED, 1 ); } break; case EVENTJIGHTJLICK: MessagePopup ("Exit Graph Scale Selection", "Exits the graph scaling mode and returns to main panel."); break; } return 0; } int CVICALLBACK Getsignalswitch (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: GetCtrlVal (daqpnl, DAQPANEL JIGNALSWITCH, &signalswitch); if (signalswitch = = 0) { SetlnputMode (daqpnl, DAQPANEL CHANNEL, 0); SetlnputMode (daqpnl, DAQPANELJAMPRATE, 0); SetlnputMode (daqpnl, DAQPANEL SIMSIGNALTYPE, 1 ); SetlnputMode (daqpnl, DAQPANEL SIMSIGNALFREQ, 1 ); } else { SetlnputMode (daqpnl, DAQPANEL CHANNEL, 1); SetlnputMode (daqpnl, DAQPANELJAMPRATE, 1); SetlnputMode (daqpnl, DAQPANEL IMSIGNALTYPE, 0); SetlnputMode (daqpnl, DAQPANEL SIMSIGNALFREQ, 0); DisableBreakOnLibraryErrors (); errorchk - Init DA Jrds (board, Sboardcode); if (errorchk - = 0) { Set DAQJeviceJnfo (board, ND DATA XFER MODE AI, ND_UP_T0_1 DMA CHANNEL); if (running = = 1) { AICIearAcquisition (task); AIStartAcquisition (board, channel, 2*points, samprate, 10, 0, &rate, Stask); } } else { MessagePopup ("Board Configuration Error", "The board you specified could not be configured. Please check the board number and configuration. The system has been reset to simulated data mode."); signalswitch = 0; SetCtrlVal (daqpnl, DAQPANELJIGNALSWITCH, signalswitch); SetlnputMode (daqpnl, DAQPANEL JHANNEL, 0); SetlnputMode (daqpnl, DAQPANEL AMPRATE, 0); SetlnputMode (daqpnl, DAQPANEL SIMSIGNALTYPE, 1); SetlnputMode (daqpnl, DAQPANEL SIMSIGNALFREQ, 1); } } break; case EVENT RIGHT CLICK: MessagePopup ("Select Data Source", "Selects between simulated data and data acquired from a DAQ board."); break; } return 0; } int CVICALLBACK Getsimsignaltype (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: GetCtrlVal (daqpnl, DAQPANEL SIMSIGNALTYPE, &simsignaltype); break; case EVENT JIGHTJLICK: MessagePopup ("Select Simulated Wave Type", "Selects the simulated wave type."); break; } return 0; } int CVICALLBACK Getsimsignalfreq (int panel, int control, int event, void 'callbackData, int eventDatal, int eventData2) { switch (event) { case EVENTJOMMIT: case EVENTJ/ALJHANGED: GetCtrlVal (daqpnl, DAQPANEL IMSIGNALFREQ, Ssimsignalfreq); break; case EVENT RIGHT CLICK: MessagePopup ("Select Simulated Wave Frequency", "Selects the frequency of the simulated wave data."); break; } return 0; } Having described my invention in such terms as the enable those skilled in the art to understand and practice it, and having defined and identified the presently preferred embodiments thereof, I claim:

Claims: CLAIMS: 1. A noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) having a UUT input and a UUT output, said noise measurement test system comprising: a variable amplifier having an amplifier input for receiving signals from a unit under test and an amplifier output for coupling to a mixer; a variable low noise source for producing a low noise signal, said low noise source including a splitter for splitting said low noise signal into a first low noise carrier signal for being output from a first output and a second low noise signal for being output from a second output, said first output for coupling to a UUT input and said second output for coupling to a variable phase shifter; a variable phase shifter including a phase shifter input coupled to said second output of said low noise source and a phase shifter output for coupling to a mixer, said variable phase shifter for adjusting the phase of said second low noise signal received from said second output of said low noise source; a mixer including first and second mixer inputs and a mixer output, said first mixer input coupled to said amplifier output, said second mixer input coupled to said phase shifter output and said mixer output for coupled to a processor, said mixer including a synchronous phase detector for synchronizing signals received at said first and second inputs for outputting a measurement test signal from said mixer output; and a processor including a processor input coupled to said mixer output, said processor also including control links for connecting said processor to said amplifier, said low noise source and said phase shifter for automatically controlling the adjustments of said amplifier, said low noise source and said phase shifter. 2. The noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) of Claim 1 further comprising a display means connected to said processor for producing an image illustrating characteristics of said measurement test signal output from said mixer. 3. The noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) of Claim 2 wherein said display means comprises a spectrum analyzer. 4. The noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) of Claim 1 further comprising an analog-to-digital converter coupled between said mixer and said processor. 5. The noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) of Claim 1 further comprising a low noise matching amplifier coupled between said mixer and said processor. 6. The noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) of Claim 5 wherein said processor includes a control link connected to said low noise matching amplifier for automatically adjusting the gain of said low noise matching amplifier. 7. The noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) of Claim 5 wherein said processor includes a control link connected to said low noise matching amplifier for automatically adjusting the impedance of said low noise matching amplifier. 8. The noise measurement test system for making phase noise measurements of signals produced from a unit under test (UUT) of Claim 1 wherein said processor automatically adjusts the operation of said low noise source to produce said low noise signal at different preselected offset frequencies, said processor also automatically controlling said amplifier and said phase shifter to ensure that said signals received by said mixer are in phase quadrature. 9. A method of measuring the signal noise of a unit under test (UUT) using a test measurement system including a variable amplifier, a variable low noise source, a variable phase shifter, a mixer, a video display, and a processor including control links for controlling said amplifier, the low noise source and the phase shifter, the method of measuring the signal noise comprising the step of: creating a low noise signal by said low noise source according to commands from said processor- splitting said low noise signal into a first low noise carrier signal and a second low noise signal; routing said first low noise carrier signal through said unit under test and said amplifier to said mixer; routing said second low noise signal through said phase shifter to said mixer; routing an output signal from said mixer to said processor; and adjusting the amplifier and phase shifter according to commands from said processor to place said signals received by said mixer in phase quadrature. 10. The method of measuring the signal noise of a unit under test (UUT) of Claim 9 further comprising the steps of: automatically adjusting the operation of said low noise source to produce said low noise signal at different preselected offset frequencies; and automatically controlling said amplifier and said phase shifter to ensure that said signals received by said mixer are in phase quadrature. 11. A method of calibrating a noise measurement test system comprising the steps of: providing a carrier signal; and providing a plurality of calibration signals at various amplitude levels relative to said carrier signal. 12. The method of calibrating a noise measurement test system of Claim 11 further comprising the steps of: providing a plurality of calibration signals at various frequency offsets relative to said carrier signal. 13. A method of calibrating a noise measurement test system comprising the steps of: providing a carrier signal; and providing a plurality of calibration signals at various frequency offsets relative to said carrier signal.

Inventors: RZYSKI EUGENE, RZYSKI, EUGENE
Applicants: RZYSKI EUGENE, RZYSKI, EUGENE
Application year: 2000
Main classification: G01R29
IPC codes: G01R23, G01R29, G01S7