Home

GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB

image

Contents

1. gt M M 10 61 05 91 76 11 28 61 47 86 6 12313 62 33 76 61 14 35 63 35 66 21 16 19 64 54 DEGI EN 10841 56 95 1 56 17 12229 84 94 69 15 37 13795 9 93 65 17 48 15562 49 95 66 69 29 1755943 96 6 77 42 19803 29 95 16 109 52 The command loads into the M matrix the three columns of data from the txt file Frequency level and phase are stored in the matrix columns and are accessible as vectors Frequency f i 1 64 M 1 64 1 Sound Pressure Level H F i 1 64 M 1 64 2 Phase arg H f i 1 64 M 1 64 3 Plotting the data with Scilab is also very simple Here is a basic sequence of com mands to plot the frequency response log lin graphic in figure 3 First of all the plot is created with the command gt plot2d Mread 1 Mread 2 2 Then some properties of the graphics are handled in order to get the desired result gt a gca gt a log flags I1nn gt a grid 3 3 gt a box on For a detailed description of Scilab graphics please consult the Scilab documentation 3 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB Figure 3 Frequency response plotted with Scilab Besides the possibility to execute commands from the console Scilab has an editor for creating and executing script commands Therefore it is possible to create analysis procedures in a simple way while having an high degree of
2. AN 006 APPLICATION NOTE GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB by Daniele Ponteggia dp audiomatica com INTRODUCTION The efficiency and quality of a manufacturing process can be kept under control through measurements on production items Every production process is unique and reflects the history and philosophy of a company This asks for flexible analysis tools tailored to the specific production needs In this application note we will show some practical examples of statistical analysis on sets of measurements that can be useful in QC management such as the identification of the golden sample The analysis is usually done on a statistically relevant number of samples This means a sufficiently large set of electrical or acoustical measurements as an example frequency re sponses to be analyzed While it is possible to include such kind of tools into a QC measurement software this approach may be not sufficiently flexible We found out that it is possible to create powerful analysis tools by complementing a reliable and programmable QC system CLIO with a general purpose numerical computation soft ware Scilab REJECT __4 REWORK i4_ 1 1 or waste 1 RISK TO SHIP DEFECT LIMITS Figure 1 Typical production process with Quality Control AN 006 1111 1 15 GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB This application note is divided in three sections First we will
3. a simple example of Scilab commands to load a CLIO txt frequency response file and create a log lin plot Suppose that we start with a CLIO txt file which in this example is named response txt that contains a frequency response with 64 frequency points one on each row of the file with a triplet frequency sound pressure level and phase Freq Hz dBSPL Phase Deg 10 00 61 05 91 76 11 28 61 47 86 60 12 73 62 33 76 61 14 35 63 35 66 21 6 19 64 54 55 57 10841 56 95 10 me ra 12229 84 94 69 15437 13795 90 93 65 17 48 15562 49 95 66 69 29 17555 30 96 60 77 42 19803 29 9516 109 52 Figure 2 CLIO frequency response txt file Using the Scilab command fscanfMat it is possible to read the file into a 64x3 matrix Please consult the Scilab help to get detailed information on Scilab commands syntax 2 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB The command can be executed directly from the Scilab console please check that the file is located in the current Scilab working directory gt M fscanfMat response txt The command parse the response txt file stripping the first line which is the file text header and stores the data in a matrix m of dimensions 64x3 rows x columns The first column of the m matrix contains the frequency points the second column the sound pressure level and the third the phase Here is the matrix as imported by Scilab
4. customization Files in CLIO binary format can also be easily handled with Scilab please check our Application Note 001 CLIO 10 sinusoidal file structure with import examples in Scilab which is available on our website www audiomatica com GOLDEN SAMPLE SEARCH The search for the golden sample is a critical issue in the quality control process The golden sample can be defined in product testing as a sample that has all test results in the middle of the nominal range Every manufacturing process can have a different strategy for this search here we show only a possible solution using CLIO and Scilab In our example we deal with a production batch of microphones we try to find the golden sample among this batch by searching the item which is nearest the average frequency response magnitude only in a specified range First the frequency response of every microphone of the batch is collected by placing it in front of a reference loudspeaker driver taking great care of the repeatability of the positioning against the transducer Since every microphone capsule can have a different sensitivity we calculate the sensitivity of each microphone in a given fre quency range 500 Hz 2 kHz and then apply a correction in order to align the frequency response to a reference value The entire set of collected responses is shown in figure 4 1 The repeatability and reproducibility of a measurement setup it is a topic in
5. itself We would not enter here into the details but it must be noted that if the repeatability of the measurement is not sufficiently granted most of the statistical analysis that is described here is meaningless 4 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB Loaded Responses Normalized 500 Hz 2000 Hz ap 1349 frequency Hz Figure 4 Original set of measured data Analyzed Responses ae A4t F Da aaa 1 1 i i j Se sp eee y oee a econ apes eine ago chet i CES a ine Daan Dae ace CS en ee ee are ey ee e el All lal ole eal 1 i i i 1 Coo ke a aaia See Sere erate ered Speers eee 1 i 1 i i 1 i i SSS a a a a i i i i i 1 i i 1 i i ee ee ee ee ee i i i 1 i 1 i i i 1 i i i i i i i aeee eok AE acne ied a serie l aa o aa a ddd ee ee ee poled h ATE ARA ADA pharbedied ee ee re 1 i i i i a Se ae a O E ETE E e eee 1 1 r 1 i i Pete a a seas sp asm SSH i i i ES ede eta recede Meee te ae erry Meena i i i i i i i i i i i 1 i 1 i i er nn te ee te eer enter eaeains EN guna as acted ceeds eta ee ee eo ae ee ee Pees S8 pe seep see eee eee ee ee ee eer ees i 1 A oy ee Ss pPeceptrney ess B eee eee Se ee peregs r 1 i i si E iS i at pesepec i i i t t 0 py o q y ap 1342 frequency Hz Figure 5 Re
6. show how to use Scilab to import CLIO frequency responses saved in txt file format then two practical ap plications are presented in detail how to search the golden sample in a set of measured items and how to find if in a production there are items that match the golden sample properties and that can be used as substitutes for the actual golden sample Together with the application note there are two compressed zip folders goldensample zip and goldenmatch zip with the example Scilab scripts and sample data in order to experience with the scripting process The files should available for download in the www audiomatica com Tech Support section web site SCILAB AS ANALYSIS TOOL Scilab www scilab org is an open source numerical computation software Scilab syntax is simple and similar to the industry standard Matlab software The learning curve of the software is not steep and plenty of examples are available through Inter net and on line documentation Scilab is very powerful in the analysis of sets of measurements data is stored and manipulated in vector matrices statistical and pro cessing functions are already present as high level commands and a powerful plotting library is available Files created by the CLIO system are either in binary or text format In the following examples we will use frequency response CLIO txt files Such kind of files are simple three column text with frequency level and phase We show briefly
7. 0 normsens 1 fmins 500 fmaxs 2000 cumulative error threshold goldthres 0 075 golden sample file setting goldfile golden_sample txt The golden sample response is loaded and if requested aligned to sensitivity Mread fscanfMat goldfile goldfreq Mread 1 goldresp Mread 2 if normsens then apply normalization if normsens 1 then 12 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB errval fmini min abs goldfreq fmins errval fmaxi min abs goldfreq fmaxs goldsens mean goldresp fmini fmaxi 2 average on SPL goldresp goldresp goldsens ones 1 size goldresp 2 end Response of the other items on the same folder are loaded and normalized to sensitivity load other responses and apply normalization if requested S Gie eet filelist S 2 i 1 H as for j l size filelist 1 do if filelist j lt gt goldfile then measname i filelist i Mread fscanfMat measname i measfreq i Mread 1 measresp i Mread 2 i i 1 end end if normsens 1 then pay errval fmini min abs measfreq l fmins errval fmaxi min abs measfreq 1 fmaxs meassens mean measresp fmini fmaxi 2 measresp measresp meassens ones 1 size measresp 2 end Errors against the golden sample are computed and plotted F
8. DISCARDED end end else measOK l size measfreg 1 end drawnow P J 8 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB if measOK then disp Purge excess abort end The purge code returns a vector measoK which contains the indexes of the good curves the vector will be used later on to extract a reduced set of measurements Finally the average value is plot in bold red this curve is plotted as last to stay on top of the other curves see figure 4 plot statistics plot2d measfreq 1 measmean 3 e gce 7 e children 1 thickness 3 The statistics are calculated again on the reduced data set recompute statistics measmean mean measresp measOK 1 measdstd stdev measresp measOK 1 And finally the search of the golden sample is carried out golden sample research compute difference between average and whole set of measurements measerro measresp ones size measresp 1 1 measmean compute sum of squared errors and find minimum between valid items golden errval igolden min sum measerro measOK fmini igolden measOK igolden show golden disp measname igolden GOLDEN SAMPLE fmaxi 2 2 For each item and for each frequency point the algorithm computes the difference between measured data and the set average and store it in the mease
9. FERENCES 1 Ponteggia D Statistical Analysis of Electro Acoustic Measurements Sets Using Scilab E brief presented at the 131th AES Convention New York NY USA 2011 2 Audiomatica CLIO 10 QC Software Extension User s Manual http www audiomatica com download qcmanual10 pdf 2 Baudin M Introduction to Scilab Scilab Consortium 2010 http www scil ab org content download 1754 19024 file introscilab pdf i Rietsch E An Introduction to Scilab from a MAHAD User s Point of View 2010 4 Ponteggia D CLIO 10 Sinusoidal File Structure With Import Examples In SCIL AB http www audiomatica com download appnote_001 pdf 5 http en wikipedia org wiki Golden _ sample Accessed August 30 2011 15 15 www audiomatica com
10. TIFICATION USING CLIO AND SCILAB a grid 3 3 if normsens 1 then titlestring Loaded Responses Normalized string fmins Hz string fmaxs Hz else titlestring Loaded Responses end title titlestring xlabel frequency Hz ylabel level dB drawnow The following script computes the statistics of the data set compute statistics measmean mean measresp 1 measdstd stdev measresp 1 Frequency limits of the golden sample search are converted to indexes of the measfreg arrays golden sample search frequency range errval fmini min abs measfreq 1 fming errval fmaxi min abs measfreq 1 fmaxg If purgeout is selected the responses outside the average plus minus given times of the standard deviation are removed from the data set The curves of the outliers are plotted in green and the measurement names are displayed on the Scilab console if purgeout then find and purge outliers drawlater measOK if purgeout 1 then plusstd measmeantstdpurge measdstd minustd measmean stdpurge measdstd plot2d measfreq 1 plusstd 3 plot2d measfreq 1 minustd 3 j l for i l size measname 1 do if sum measresp i fmini fmaxi gt plusstd fmini fmaxi sum meas resp i fmini fmaxi lt minustd fmini fm axi 0 then measOK j i j j 1 else plot2d measfreq 1 measresp i 1 disp measname i
11. duced purged set of data Next we calculate the average value and standard deviation of the magnitude fre quency response Our research policy requires at this point to discard items whose response exceed the average response bold red curve plus minus two times the standard deviation thin red curves We end up with a new reduced set of microphones where the items with a frequency response which deviates too much from the average outliers are discarded Fig ure 5 At this stage the average frequency response is calculated again on the new set www audiomatica com 5 15 GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB shown in bold red curve and a research of the item with minimum deviation in a frequency range 200 Hz 16 kHz from the average is carried out The item that has less deviation from the average is the golden sample bold green in figure 5 not easily visible because overlaps with the average red curve The golden sample search process can be implemented with a fairly simple Scilab script We analyze here the code in depth The head of the script has only comments and a brief description of the script itself goldensample sce Load responses in CLIO txt format from a folder and search for the Golden Sample Td fming fmaxg analysis frequency range normsens sensitivity normalization fmins fmaxs sensitivity frequency range purgeout purge outlier
12. et the following code is executed Thanks to the native matrix pro cessing of Scilab the operation requires a very simple code if normsens then apply normalization if normsens 1 then errval fmini min abs measfreq l fmins errval fmaxi min abs measfreq 1l fmaxs meassens mean measresp fmini fmaxi 2 measresp measresp meassens ones 1 size measresp 2 end fmini and fmaxi are the indexes of the frequency vector measfreq bounded by the fmins and fmaxs sensitivity range meassens is a m size vector with the calculated sensitivities S of each measured response measresp as the average sound pressure level in the sensitivity range Once the sensitivities are calculated the responses are normalized The following code plot the set of loaded responses plot frequency response set after normalization f scf drawlater for i l size measname 1 do plot2d measfreq i measresp i 2 end a gca a box on atmax ceil max measresp 10 10 a data_bounds 20 atmax 50 20000 atmax a tight_limits on a log flags 1nn 3 Due to this simplified approach every measurement txt file that is loaded must have the same number of points The script do not provide any check on dimensions failing to provide txt files with a consistent number of fre quency point will lead to errors 7 15 www audiomatica com GOLDEN SAMPLE IDEN
13. goldcandidatesindex output names on console plot2d goldfreq goldresp 5 lt E i plot2d measfreq 1 end a gca a box on 3 3 7 a grid a log flags Inn Golden Sample measname goldcandidatesindex n oO n G O Q n oO w n e oO E p p G O D H Ko 4 G oo 4 O oO ow z oa O C r Gi 3 Now c OTa d m Sn Q Il E XM G OTD O n g oO p Goed 00 0 ov UO o v gt O ds4o r OWNH Ort 0U ae y oO Q oe U OD a0 2 oO o bo Oe doe il P K r drawnow www audiomatica com 14 15 GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB Golden Sample and Candidates Responses level dB D RP hoon ao PED i Oa oh Pe Paes a ee T r r a a a a a o a 2 3 10 10 10 10 10 frequency Hz Figure 9 Golden sample and golden candidates response CONCLUSIONS Using Scilab it is possible to easily create flexible post processing scripts that are able to handle very large sets of measurements This approach is well suited to deal with typical QC applications that often require statistical analysis tools over large sets of data The Scilab software can be freely downloaded from the www scilab org website if you are interested in the scripts presented in this application note please search on Audiomatica web site www audiomatica com or write an email to dp audiomatica com RE
14. igure 8 errors against golden golderro measresp goldresp ones size measresp 1 1 create plot f scf drawlater for i l size measresp 1 do plot2d measfreq 1 golderro i 2 end a gca a box on a log flags l1nn a grad 3 3 7 title Responses Error Against Golden Sample xlabel frequency Hz ylabel level dB drawnow Then the rating criteria is evaluated analysis frequency range indexes search errval fmini min abs measfreq 1l fming errval fmaxi min abs measfreq 1 fmaxg 13 15 www audiomatica com n GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB gp aaa frequency Hz Figure 8 Errors against golden sample compute cumulative error fmini size golderro 1l 2 72 sum sqrt golderro 1 fmini fmaxi fmaxi 2 ssnorm Candidates are identified response are plotted and name of the items displayed on the Scilab console n oO p O ae n O NG no u Ou DO bad 0 PA CTT O doo oD COS Gand ol S O V H ew 4 Il J oX QS O env Con G n ll d nn Goo Op yp OC OG OW 40 T O H H nO UV G G OO W GOO oes lt 0 O NOD do measresp goldcandidatesindex 1 size measresp goldcandidatesindex 1 scf drawlater QE i plot candidates and golden sample responses disp measname
15. le match process act as in figure 7 a batch of items is tested during the QC execution then the measured data is compared against the reference golden sample unit The Scilab script calculates the error between each sample of the batch and the refer ence then finds the candidates according to a specified criteria In this example the criteria is the sum of the absolute error against the response of the reference normal ized by the number of frequency points 11 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB I f mas E P F Healt lf fmaxi fmini 1 j f SSnorm As in the previous example the head of the script has only comments and a brief description of the script itself goldenmatch sce Load responses in CLIO txt format from a folder and search for substitutes to the Golden Sample response stored in a specified txt file fming fmaxg analysis frequency range normsens sensitivity normalization fmins fmaxs sensitivity frequency range goldthres cumulative error threshold goldfile golden sample response text file Memory and graphics cleanup clear clear memory lines 0 avoid console output halt closes all open graphic windows wins winsid for w wins xdel w end The following settings should be edited description of the variables is in the script head Analysis settings fming 200 fmaxg 1600
16. olden plot error against golden sample f scf drawlater for i l size measOK 1 do plot2d measfreq 1 golderro measOK i 2 end plot2d measfregq igolden golderro igolden 5 e gce e children 1 thickness 3 a gca a box on atmax ceil max golderro 5 5 a data_bounds 20 atmax 20000 atmax a tight_limits on a log flags 1nn a grid 3 3 title Error Against Golden Sample xlabel frequency Hz ylabel level dB drawnow An example of this latest plot is shown in figure 6 The relative error of each item re sponse against the golden sample can be useful to identify limit curves in a QC procedure 10 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB Error Against Golden Sample level dB frequency Hz Figure 6 Relative error against golden sample GOLDEN SAMPLE MATCH One of the problems of using a physical golden sample is the conservation of the item Due to aging or any accidental damage the golden sample may become unusable Identification of possible substitutes for the golden sample during production it is a very interesting feature Using Scilab it is possible to create a script which seeks for golden sample candidates in a production batch sever SET OF POSSIBLE GOLDEN SAMPLE SUBSTITUTES Figure 7 Golden Sample Match Process The golden samp
17. rro matrix Then a squared sum of the measerro matrix along the frequency points dimension is carried out this results in a vector with dimension equal to the number of items of the set ErrVal gt H fi f mini H meanl ai V j emeasOK A research of the index with the minimum of this vector returns directly the index igolden of the golden sample and the name of the item measurement is displayed in the Scilab console The response of the golden sample and the data set is plot with the following com mands plot frequency response set with golden sample f scf drawlater for i l size measOK 1 do 9 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB plot2d measfreq 1 measresp measOK i 2 end plot2d measfreq 1 measmean 3 e gce e children 1 thickness 3 plot2d measfreq igolden measresp igolden 5 e gce e children 1 thickness 3 a gca a box on atmax ceil max measresp 10 10 a data_bounds 20 atmax 50 20000 atmax a tight_limits on a log flags 1nn a grid 3 3 title Analyzed Responses xlabel frequency Hz ylabel level dB drawnow The error between the items of the data set and the item choose as the golden sample can be easily calculated and plotted compute error from golden golderro measresp ones size measresp 1 1 measresp ig
18. s stdpurge std purge multiplier Memory and already present graphic windows needed to be cleared clear clear memory lines 0 avoid console output halt closes all open graphic windows wins winsid for w wins xdel w end Then the settings must be edited to meet the golden sample search needs Analysis settings fming 200 fmaxg 16000 normsens 1 fmins 500 fmaxs 2000 purgeout 1 stdpurge 3 The response txt files that are present in the current active Scilab folder are loaded in memory Load frequency responses from CLIO txt files S dir txt filelist S 2 for i l size filelist 1 do measname i filelist i Mread fscanfMat measname i measfreq i Mread 1 2 If the script is loaded double clicking on it in the Windows Explorer the active Scilab folder becomes automatically the script folder 6 15 www audiomatica com GOLDEN SAMPLE IDENTIFICATION USING CLIO AND SCILAB measresp i Mread 2 end Please note that in this case only the first two columns of each imported file are used phase data is discarded The data is stored in two matrices measfreq and measresp with as many rows as the number of measurements m and with a number of columns equal to the number of points n on each measurement Frequency f i 1 n meas freq i 1 64 M 1 64 2 Sound Pressure Level H F If normalization is s

Download Pdf Manuals

image

Related Search

Related Contents

  CLONTECH    解体現場での粉じん取りに威力を発揮 散水機  Sony IPELA RZ25P User's Manual  Fujitsu LIFEBOOK E744  DIS IN NSLP Sponsor Enrollment 1.1  

Copyright © All rights reserved.
Failed to retrieve file