Home

Version 5 User Manual - College of the Holy Cross

image

Contents

1. Threshold dB From Peak to Cutoff This control will delete the ZC frequencies for all waves whose amplitude is less than a cutoff value In place of the deleted points a value of 0 will be entered see blue dark graph below Note that there is no loss of data because the ZC values are still calculated for all points whether above or below the threshold and they are present in a separate array which is the green light line above and which will also be reported to the output file The default threshold is 12dB below the peak voltage of the input waveform 16X less than the peak Entering a threshold also causes threshold values to be plotted on the waveform and power graphs see earlier Sampling Rate Be sure to set the correct sampling rate used to create the digitized audio file Canary text files do not include this value at least not where can find it and 2 v5 makes no provision to read them You must specify it using the Sampling Rate control on the green Input and Display Controls panel The default is 44 100 Hz Instructions are given on the next page as to how to change sampling rate values Important note the best way to increase the frequency resolution of the system to use the highest sampling rate possible knp generally digitize files at 44100 samples s using a calibrated tape played at half speed for a realized sampling rate of 88200 Hz However for most applications with crickets 44100 Hz sa
2. signal with the same sign as the DC offset and increasing the ZC period for the opposite signed values It also causes the appearance of sideband frequencies related to amplitude modulation of the signal It should be avoided but it frequently shows up in recordings Unlike earlier versions of ZC v5 will estimate any DC offset when it first begins to process a signal It will display the value of the DC offset if any as a voltage and also as a percentage of the peak voltage found in the signal OOOO There are two ways to handle any DC that might be present The first is to satisfy yourself that the automatic feature works well enough for your purposes To use this feature which is the default condition be sure the AutoSubtractDC switch is ON default Don t bother to enter any value for the DC offset see below if you do it will not cause any problem because selecting Autosubtract DC causes whatever is entered in DC offset to be ignored m peak to cutoff So when you run the program with the AutoSubtract feature on 2 v5 will estimate the DC and then subtract it from the data points before processing them for ZC and power data Please note the DC offset values that will be displayed when the program completes running are the values from before the correction was made not after These values before cleanup will also be saved on the spread sheet Description of the Algorithm for Finding Signa
3. DC Dffst 1 63E 06 2 61E 06 3 7SE 06 4 246 06 5 d aiF n amp I m z m a 3EF DS 22 WaveformT im DC Corrected C TinzCFreq rray gt Thresh 2CFre RMS Times HalfwavweFF45 ix 1 12 05 1 61E 04 5 55356E 03 5 536402 4 2 27E 05 3 62E 04 5 5 E D 5 B5 E D a 3405 05 9 44 04 9 48 05 S456 035 6 4 54 05 7 2 fE 04 5 4 7E 03 S d TET UZ EE 2 67E 03 3 OSE 04 s SFE 03 s SFE 03 amp nnr ns 1 nar nz Ann 4qF r and a a T m ee Ec TITLE UNTITLED SrnpF ate 1 1 8 12bE 07 1 61E 04 E 053 S 41E L 7 2 6 2 04 2 3E DES 13 0 001013 DC Dffst HalfwawveEIS Running the ZC v5 Program If you are not familiar with programs developed using National Instrument s LabView environment please realize that they are somewhat different from other programs and may take some getting used to The biggest difference is that double clicking the icon see earlier causes the programs controls to appear but does not really run the program Instead as just described you set a series of parameters and then push an icon to run the program The program itself is reasonably nimble but each time it runs it will force you to tell it what file to open and then it will ask you where to save it all before you get to look at the data But you can skip the save step and then look at the data and if you like what you see run the program again and
4. for each ZC event e rms power for each half cycle as a function of the time of the peak of the cycle Description This program analyzes audio data and calculates frequency on a cycle to cycle basis It arbitrarily starts counting waves with the first point in the record where the microphone voltage or sound pressure crosses zero Two such crossings later is the start of the second cycle see lower part of figure on the next page Thus the time separating three zero crossing ZC events corresponds to the wave period see top of figure on next page Since one cycle has two ZC events the program calculates the period for both half cycles This can also be seen in the figure on the next page These periods are then averaged to give the average period of the wave the inverse of the average period is the average frequency of this wave The ZC_v5 program then starts with first zero crossing event of the next cycle and continues with the process until the frequency of each wave has been measured First estmate of period of wave1 4 4 ZC 1 ZC 3 ZC 4 Second estimate of period of wave1 ZC 2 ATL al 1 wave2 wave3 This mechanism might appear unnecessarily complex why not just measure one average per signal It was developed so that half cycle frequencies could be obtained easily and wanted to give a full description of what the program actually does but the effect is simply to get the pe
5. front panel will appear It is now important to set a series of parameters that control the ZC v5 program s calculations and output a Input Controls On the upper right of the program s panel is a yellow box marked Input Controls el ee CAP ec ee Tee fram nes d Di LE y L I Auto filename This is a new feature When placed in the on position default the program will suggest naming the output file based on the name of the input file It will also append ZC txt to this filename It checks to be sure that the filename will not be longer than 31 characters pre Mac System X limit The operation will be clearer using an example Suppose you turn this feature ON and run ZCv5 and load data from a file called Aa 5N_sputter txt we re getting ahead of ourselves here but bear with me The program will do the computations display the results and also display a dialog box to save the file GR CUM BitsNBite s Aas5N sputtery txt ha Aas5 sputteryOK txt Note that the suggested name is the same as the old except that the extension txt has been removed and replaced by ZC txt You may still change the filename if you wish If you do not select the autofilename option the dialog shown above will appear but with no suggested filename li Autosubtract DC and DC Offset Voltage If DC is present it will obviously introduce an error by decreasing the ZC period for the portion of the
6. need to call up the same data file as before The way this feature is most commonly used is to run the program don t save the data see below and look at the results Decide how many points to drop and then run it again Please note that this is only a tool for visualizing results within ZC v5 all points will be present in the saved data file none are deleted from the data file by this procedure Spreadsheet Format Controls the next green box on the right of the program s window contains controls for the output to the spreadsheet As with all controls these must be set before starting to run the program Here is a picture of the controls 11 1 Title This is an optional entry It prints a title on the first line of the spreadsheet output Simply select and edit the textfield as described previously for the Sampling Rate control ii Row vs Column Display of Spreadsheet Data The ZC v5 program will read data in either rows of columns Its normal default output is to put the data into columns If data are displayed in rows the maximum number of values in each row can be controlled by the number field to the left of the rows vs columns control wem in Rows 255 The default value is 255 entries this is one less than the maximum row length permitted by most modern spreadsheets For most ZC analyses this should be more than enough However if you anticipate an output with more than 255 ZC values the spread shee
7. The ZC v5 Program A User s Manual for Determining Cycle to Cycle Frequencies of Sound Pulses Based on the Zero Crossing Technique POWER MACINTOSH VERSION K N Prestwich Dept of Biology Holy Cross College Worcester MA 01610 USA kprestwi holycross edu Contents IMPORTANT NOTE Program Features Description Launching and Setting Up Acknowledgements Disclaimer and Statement 19 of Free Use Features e Cycle to cycle frequency based on zero crossing e Operates any audio file in text tab delimitated format e Calculates an estimate of rms power for each cycle e Threshold setting can be used to generate an array of zero crossing values that only includes cycles whose power is greater than a user set threshold voltage Threshold is defined relative to the audio signal s peak voltage pressure Threshold limits are displayed along with other data on waveform ZC and power graphs e Pre processing estimation of signal DC Optional user controlled removal of DC from the signal prior to processing e Tab delimited text output compatible with any standard spreadsheet program Output includes title sampling rate threshold used if any input signal average AC voltage DC voltage in absolute terms and as a percentage of the signal peak voltage and the following data arrays e time and amplitude values for the input signal e arrays containing all ZC values and ZC values above the user set threshold and the times
8. art From the End 2 To view the updated graph you must run the program again using the arrow icon at the top left You ll need to call up the same data file as before Important Note this procedure will not delete these values from the spreadsheet data output You will need to remove them from the spreadsheet yourself The purpose of this feature is just to get a quick preview of the data without going to the spreadsheet General Information About the Program can also be accessed by pressing command l 17 How to Cancel Saving Data to a Spreadsheet Suppose that you simply want to look at some data and not save it This is easy if a bit un nerving When the Save dialog box appears automatically when the program is run hit CANCEL or press the escape key Desktop BitsNBites BitsNBites Eject 500 Hz txt EI 4 500HzShort WVF txt Desktop Es 5O0HzShort WVF xlb o SOO0HzVeryShort WVF txt Choose file to write MSS save A highly intimidating Error dialog will appear immediately Error 43 occurred at File Dialog Possible reasons LabVIEW Operation canceled by user Press Stop or Continue and all this nonsense will end with no harm done 18 Spreadsheet Output Opening with Excel f you open the file from within Excel you may get a text box such as this Text Import Wizard Step 1 of 3 The Text Wizard has determined that your data is Del
9. e graphs can be viewed see next page 15 0 5 E Input waveform amp Limits 1 5 2 1 2 1 c T en 5 2 00 5 0 0E 0 2 5E 2 5 0E 3 7 5E 3 ABOVE r 0 0 0 256 3 5 0 5 7 5E 3 1 0 2 1 zE 2 1 5E 2 1 8E 2 2 0 21 ts 1 4 3 Values with limit gt 1 5 8 4 RMS 2 OE 6 Limit 0 0E 0 me 0 0 0 256 3 5 0 5 F5E 3 1 DE 2 i1 zE 2 156 2 186 2 2 06 z7 Time sJ 16 About the Graphs The graph axes are set automatically Often especially with the ZC frequency data extreme points at the start or end of the record can make variation in the main part of the record very difficult to see This is evident in the outputs for a 500 Hz signal pictured above two points near zero at the end of the data set obscure variation in the main part of the data set As was mentioned above to remove extreme points from the start or finish of a record the only place where they are likely to be true artifacts the procedure is to use mouse clicks on the arrows of each text field to adjust the number of points to be deleted For instance to delete two points from the end of the record click twice on the up arrow of Points to Remove from the End to give Points to Remove Poin ts to Remove From the St
10. imited If this is correct choose Next or choose the Data that best describes your data riginal data type Choose the file type that best describes your data i Delimited Characters such as commas or tabs separate each field 3 Fixed width Fields are aligned in calumns with spaces between each field Start import at row File origin Macintosh Preview of file Macintosh HD untitled folder untitled txt Crossing Times EGE F i I B K K Bs 1 i ar oimply accept whatever it is telling you by immediately punching Finish and you re ready to go Alternately you can drag the file to your Excel icon and drop it The file will open without the dialog box shown above About Doing Additional Saves Because of the way that LabView runtime instruments work doing additional saves without having to re open the original data file is not an option Given the speed with which ZC v5 executes hopefully it will not be too large an inconvenience to simply run the entire program a second time Acknowledgements Disclaimer and Statement of Free Use Acknowledgements Professor Henry Bennet Clark gave many excellent suggestions to me during the development of this program These suggestions believe very substantially improved the final program Henry also tested the program extensively wish to thank him for all of his assistance and encouragement i
11. l DC and AC Components Here s National Instrument s Description of their Routine which use in ZCv5 for finding DC and AC If you have a periodic signal and you don t have an integral number of periods in the acquisition you get spectral spreading whether or not you re doing an FFT later This routine performs spectral analysis to the extent that it separates DC bin 0 from AC the rms sum of the rest of the bins It applies the Hann window This window is sufficient for separating most of the AC energy from the DC bin The efficient mean and variance computations are used in place of Fourier analysis because the desired results are the total AC energy and the true DC not information in each individual frequency bin The coherent gain and equivalent noise bandwidth constants for the Hann window are needed to compensate for the windowing effects on gain and bandwidth source Help window LabView v6 National Instruments http www ni com labview Note perhaps I ll go to wavelets in the future The alternative is to turn the AutoSubtractDC OFF and to enter a value for the DC offset This could be estimated in another program such as Canary If you wish no DC correction simply leave the DC Offset control set at 0 default and set the AutoSubtractDC to OFF How to use the switches _AutoF ilename Click to the left of the virtual toggle switch and the switch moves Auto ilename to the left Vice versa
12. lot also gives a threshold Limit line Please note that this is not in true power units it is voltage squared see box RMS Values with limit I i i I i 2 OE 3 4 OE 3 e UE 3 1 DE 2 Saving Data The ZC v5 program immediately saves the waveform amplitude and time data both ZC arrays all and above threshold and the power graph data along with the settings the program was operated under The data are saved as a tab delimited file which can be opened by any program that reads tab delineated files such as Excel Claris or Appleworks or other spreadsheets and graphing programs System Requirements This program requires a Power Macintosh It has been tested using Mac OS 8 6 and 9 01 but it should run on any system on a Power Mac Note that it will not work on 680x0 Macs The program itself is a bit of a memory hog When unstuffed it requires about 3 3 MB of disk space and when running it prefers 8 MB of RAM Required Note The actual zero crossing program operates within a run time engine developed by National Instruments Inc URL http www ni com the two are compiled together Launching and Setting Up the ZC v5 Program 1 Launch the program by double clicking the ZC V5 lvrt icon error occurred loading VI Variance vi LabVIEW load error code 21 An external subroutine required for execution could not be found OK Ls un 2 The program s
13. mpling rates will be quite adequate Changing Text Field Values Select and Edit The easiest way to change this setting is to position the cursor in the window where the sampling rate is displayed and click drag across the window Sampling Rate He 00 this will result in the window changing color from light blue to light purple Sampling Rate Hz 44100 then simply type in the new value for example 22 050 Hz Sampling Rate 22050 and finally click on the Enter button that appears at the left of the other icons near the top of the window ZCMI Cycle to Cycle Frequency Using Zero Cros kprestwiholycross edu Alternately simply hit return or enter on your keyboard Notice that when you click Enter or hit return the button will disappear The Enter icon will reappear only when you enter a value in one of the text fields using the selection and editing procedure just described 10 Setting Display Controls There will be many occasions where you will want to remove the first or last few points from the ZC graph where artifacts are common The procedure is to use mouse clicks on the arrows of each text field to adjust the number of points to be deleted For instance to delete two points from the end of the record click twice on the up arrow of Points to Remove from the End to give To view the updated graph you must run the program again using the arrow icon at the top left You ll
14. n its development want to express my thanks to the College of the Holy Cross for support in the development of the program 19 Disclaimer Any glitches or imperfections that may still lurk in the program are solely my responsibility Terms of Free Use The ZC v5 program is not to be sold It may be obtained free from the author email korestwi holycross edu and may be bundled with commercial software if permission is first obtained from the author 20
15. riod of each non overlapping cycle Input Data Format The ZC v5 program accepts data only in the form of a tab delineated text file Such a file can be readily generated by a number of programs for example by Cornell Laboratory of Ornithology s excellent audio analysis program Canary Tab delineated files generated on spreadsheet programs such as Excel Mathlab and a number of graphics packages examples CricketGraph DeltaGraph etc will also be read provided that these sheets contain data only no text ZC v5 will read data in either column or row formats Graphical Displays The program has three graphical displays e the inputted audio waveform is given as some measure of amplitude e g voltage or pressure vs time since the start of the sample The waveform is plotted along with the user selected threshold limits threshold is defined relative to the peak voltage of a entire inputted signal which are shown as dotted lines n as m e Two plots of the cycle to cycle frequency ZC frequency both versus the time for the ZC events One array contains all ZC frequencies and the other ignores all cycles where the amplitude was below threshold Whenever the signal is below threshold the program arbitrarily defines the ZC frequency as 0 000 quencies ALL and Above Threshold I 0 0E 0 2 0E 3 4 DE 3 e OE 3 3 e A plot of rms power of each cycle Once again the p
16. t will break the output into one or more rows This prevents data loss Note that_this control does not affect column length Changes between Row Column output are made by clicking on the arrow on the left of the Spreadsheet Data Format box Below is a sample of the output Here is an example of the top of a row output along with a close up of some of the data Name Box test 4 UNTITLED SmpRate 88700 dBtoCut 0 001013 DC Dffst 12 ADV 0 00001 12 1 13E 05 2 24 fE O5 2 40 2 2 1 2 95 SE OS 1 07 g SSE 03 e r E 03 e r1 DC Eorrectedwaveform l 6 12E 07 5 41E 07 5 52 59 rE U5 1 10E 05 4 57 3 06E 06 1 52 06 5 90 i 4 z1E 07 7 FSE OF 1 03 i C Eross Times 1 51E 04 4 62E 04 5 44 EeCFreq Array gaz9 25054 5526 D557 S465 2 E ThresheCFreqArrawy M gaz9 20054 5526 755352 5455 2 RMIS Times i S4E 05 1 7 E 04 2 61 HalfwaveRMs 5 1 63E 06 2 61E 06 5 78 and the same for columns T test SmpRate 02 Sh 88200 dBtoCut 7 S4E 05 1 7 4 z 51lE U4 5 51 04 4 42 04 zF na D 88200 dBtoCut Ww avetormrT im DC Corrected 2C_Cross_Tin CFregarray ThreshecFre RIS Times 0 001013
17. this time save the results It is very fast and so this weird behavior is a minor inconvenience OK here goes p push the forward E run arrow in the upper left of the window J zem ri Cycle to Cycle Frequent KM Fres kprestwiighal As soon as this is done the arrow icon changes i A dialog box appears asking for the name of the textfile containing the audio data 14 Choose file to read C Canary Test Files MacintoshHD 500Hz WVF txt t 500Hz WVF2 txt BE 500Hz WVF3 txt bs 500Hz Intermed wVF txt x bs 500HzShort WVF txt bo 500HzVeryShort WVF txt bo 500Hzw silence WVF txt 103 Lc bl rui pias pma RECS a ae TREE Navigate to the file you want following the usual conventions After selecting and opening the file the dialog box disappears graphs appear in the background and then the Save Output dialog box immediately appears It suggests a filename according to the options you selected from Input Controls before you ran the program in this example have turned off AutoFileName Ci CanaryTestFiles Macintosh HD 500Hz WVF txt 500Hz WVF2 txt 500Hz WVF3 txt l ri 300Hz Interme d WVF txt ate S00Hz Short WVF txt Choose file to write a00Hz output txt nn isn nn 5n znn Zan ann After choosing a directory and entering a file name and clicking Save this dialog box disappears and th

Download Pdf Manuals

image

Related Search

Related Contents

HIT3181 Assignment 1  User Guide - ARM Information Center  SterlingTEK A0551797 User's Manual  取扱説明書 - CARBON  Targus A7™ Netbook Messenger  Manual  

Copyright © All rights reserved.
Failed to retrieve file