Your SlideShare is downloading. ×
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Measuring the cutoff frequency of a low pass filter
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Measuring the cutoff frequency of a low pass filter

24,299

Published on

It is required to setup an automated test and measurement system for measuring the cutoff frequency of a low pass filter using LabView and estimate the frequency response of the filter.

It is required to setup an automated test and measurement system for measuring the cutoff frequency of a low pass filter using LabView and estimate the frequency response of the filter.

1 Comment
5 Likes
Statistics
Notes
No Downloads
Views
Total Views
24,299
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
1
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Instrument Networking & Communication Assessment 1 1.1.Objective: The main objective of this assessment is to become familiar with the instrument networking and monitor and control instruments using PC based controller. 1.2.Task Statement: It is required to setup an automated test and measurement system for measuring the cutoff frequency of a low pass filter using LabView and estimate the frequency response of the filter. The system is divided into two parts. Part 1: To setup hardware using GPIB instruments and PC based controller and design software on LabView to determine the frequency response of a Low pass filter. Part 2: To develop a test & measurement system based on developed in stage 1 to determine the cut-off frequency of number of filters. Moreover estimate the performance and results, store the required information in a file and propose any future improvements. 1.3.Introduction: Thanks to the enhancements in instruments networking and communication in monitoring and controlling applications and processes which led to the production of a diversity of transducers and interfaces over the years and play
  • 2. a revolutionary role in industrial processes by the efficient and effective Instrument networking & communication. Moreover Software based on textual programming was used until now which consisted of complex programming and requires hardware knowledge too.Now a new approach depends on the graphical programming has been used extensively and there is no need of advanced computer programming knowledge for the development of complex applications and it resembles the typical measurement and control block diagram.A graphical overview of the difference is shown below in figure 1.b Figure 1.b Difference between Traditional and Virtual Instrument (ni.com) Virtual Instrument (VI) is the basic component having specialized software and hardware resides in a PC and contains the functionality of a traditional stand alone instrument.The measurement system based on Virtual Instrument is able to solve complex and specific systems and results can be viewed graphically. (Baican 2000)
  • 3. 1.4.Task Solution overview: The following block diagram illustrates the developed instrumentation system. PC Function Filter Oscilloscope generator Block Diagram To achieve the measurement task firstly it is required to calculate the filter’s input and output voltage and different input frequency. Secondly calculate the gain by calculating the ratio of output and input voltage at different frequencies and plot the dB gain magnitude at different frequencies to get the frequency response of the system. Moreover it is required to measure the cut-off frequency of low pass filter which is achieved by measuring frequency when filter gain is reduced to -3dB. Also a file storage is required in spreadsheet to log data of frequency response of the filter in order to analyze and manipulate data.
  • 4. 1.5.A Little about RC Low Pass Filter: A common circuit to attenuate high- frequency components in an analog signal is the RC Low Pass Filter. Examine the diagram below, where Vin is the applied voltage and the voltage Vout across C1 is the output. Figure 12. Simple RC Low Pass Filter The RC Low Pass Filter passes low frequency and DC signals to the output, but blocks out high frequency signals. This could be either desirable or undesirable. As the variation increases in frequency, the impedance of C eventually becomes lower than R and starts to attenuate the signal. The frequency where the value of Vout is at 0.707 of Vin, is defined as the –3dB frequency or the half-power point, because the output is down –3dB of the input signal at that point. Single-Pole RC Low Pass f3dB = 1/(2πRC) (NI.com)
  • 5. 1.6.Suitable Techniques for Task: There are numerous techniques for measuring the cutoff frequency of a low pass filter both by hardware only or hardware and software combination.There are different techniques to find out the cut-off frequency of low pass filter.some techniques are 1-Curve Fitting 2-Interpolation 3-Ramp input or Successive approximation 1.6.1.Curve Fitting : In curve fitting we try to find the parameter values which is best fit to the model for the data given.From the curve fitting one can find out the important characterstics of the data like gradient,minima and maxima and area under the curve.(aip.org)To find out how closely the curve fits to the data the regresiion procedure minimizes the sum of the squares of the vertical distances of the points from the curve.Due to this reason linear and nonlinear regressions sometimes called least square methods. This technique acquires data from oscilloscope and plot the curve which is best describe by the equation given to the curve fitting tool and we can measure the cut-off frequency at frequency at -3dB point.
  • 6. 1.6.2.Interpolation Interpolation is the process of using known data values to estimate unknown data values. Various interpolation techniques are often used in the atmospheric sciences. One of the simplest methods, linear interpolation, requires knowledge of two points and the constant rate of change between them. With this information, you may interpolate values anywhere between those two points. Linear Interpolation Linear interpolation is a simple technique used to estimate unknown values that lie between known values. The concept of linear interpolation relies on the assumption that the rate of change between the known values is constant and can be calculated from these values using a simple slope formula. Then, an unknown value between the two known points can be calculated using one of the points and the rate of change. (iridl.ldeo.columbia.edu) To implement this method we need to proceed as follows 1 Start with a high initial frequency 2 Take measurements, calculate the gain and store it in an array 3 Split the frequency interval Take difference between Fi and Fs i.e Fdifference=Fi-Fs If gain > 0.707 then decrease the frequency difference. if gain < 0.707 then increase the frequency difference 4 Repeat step 2 5 End if frequency is approximately zero 1.6.3. Ramp Input or Successive approximation:
  • 7. This technique requires the increase of frequency at each step until the frequency become closer to the desired value.A handy and easy to implement the concept is a straight forward procedure. One could proceed as follows: 1 Configure hardware with initial settings i.e,initial frequency,input voltage,autoscale. 2 Measure Lowpass filter voltage,input voltage,and calculate the gain, compare it with 0.707 3 If gain is larger than this 0.707 Increase the frequency by a defined step If frequency is larger than a 50000Hz then End Jump to step 2 else break 4 Write the last frequency Fmax to a spreadsheet file. 5 End 1.6.4.Choosen Technique This is the simple logic to achieve the cut off frequency of filter and it is easily implemented and produce good results with accuracy and it best describes the task solution that is the reason to choose this technique for our measurement system. For understanding this simple technique for an automated test and measurement system for measuring the cutoff frequency of low pass filters using software let us consider the flow diagram describe below.
  • 8. Start Hardware Setup Develop Software Start Software Configure Function Generator and Oscilloscope Increase I/P Frequency and monitor LPF Output Voltage Vlpf No Vlpf≤0.70 7 Yes Measure Cutoff Frequency END 1.7.Hardware Setup:
  • 9. 1.7.1.Available Equipments: • NI-Controller PC Based Controller • GPIB Interface IEEE 488.2 • Function generator (33220A) • Oscilloscope (Agilent 3000 Series) 1.7.2.Setup: As our main objective is to develop a PC based automated test and measurement system which could determine the cutoff frequency of low pass filter using Labview program on PC. So to achieve the objectives we have to setup hardware which could measure the cutoff frequency of low pass filter using the above mentioned equipments. Firstly we need to configure input voltage and frequency of the function generator we can do it either by function generator itself manually or by controlling through software as our system is automated hence we use software to configure the parameters. There are two outputs from function generator one is connected to the channel1 of oscilloscope directly and the other is connected to the channel2 of oscilloscope through low pass filter. The oscilloscope function is to display the waveforms of both the inputs at channels 1&2 coming from Function generator.Oscilloscope parameters such as time base and amplitude are also configured through software program LabView in this application. To generate commands or to retrieve data to both function generator and oscilloscope, they are connected and communicating to Ni- PXI controller with E series data acquisition card through IEEE-488 GPIB interface cable which is a parallel interface.
  • 10. 1.7.3.General Purpose Interface Bus,IEEE.488.2: GPIB interface is a bidirectional,asynchronous communication with up to 30 compatible instruments can be connected.There are three types of devices which can be connected to the interface bus namely, 1-Talker:which transmit data onto bus and only one talker can be active at any one time. 2-Listner:which receives information from the bus.there can be more than one listners at any one time. 3-Controller:which sends control commands,messages and data . . It defines the communication links and sends GPIB commands to devices. 1.7.4.GPIB Address All devices on the bus have a talk/listen address which is used by the controller to assign the state of devices on the bus. All GPIB devices and interfaces must have a unique address consists of primary and secondary address.There are from 0 to 30 address available in GPIB interface where 0 address is normally assigned to the controller .Hence 30 instruments can be connected to the GPIB interface having address between 1 and 30.. GPIB devices can be talkers, listeners, or controllers. A talker sends out data messages. Listeners receive data messages. In our system there are two instruments function generator and oscilloscope having addresses 10 and 7 respectively connected to the NI controller through GPIB interface. We can configure,assign address and test these instruments manually or through NI-MAX software.MAX is software program used to read and write to the selected instruments.Below is the instrument name and their addresses.
  • 11. Instrument Description Address 0 HP 33220A 10 Function Generator 1 Oscilloscope (Agilent 3000 7 Series) Table 1 1.8.Software:
  • 12. The software used to measure the cut-off frequency of low pass filter and analysis system response is designed on LabView which is a powerful graphical programming language with advance tools,data analysis techniques and great presentation of results. In our design we used GPIB tools for writing and reading to instruments.GPIB tools are the VI’s which are user friendly and even a basic programmer can easily use these instruments to write data or gather data from the instruments interface with GPIB cable. 1.8.1.LabView VI’s:
  • 13. Before explaining software program let us explain some major tools used in our program to have a better understanding. 1.8.1.1.GPIB Write tool: Figure 3: GPIB Write ‘GPIB Write’ writes data to the GPIB device identified by the address string. The address string contains the address of the GPIB device with which the function communicates. Data is the data the function writes to the GPIB device and mode indicates how to terminate the GPIB Write. Error in detects error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. 1.8.1.2.GPIB Read tool Figure 4: GPIB Read Reads byte count number of bytes from the GPIB device at address string.. The function of this GPIB Read is similar to the GPIB Write. Byte count specifies the number of bytes the function reads from the GPIB device and data is the data the function read. 1.8.1.3. Description of the LabView VI.
  • 14. We used ramp method to design our test and measurement system for measuring cut-off frequency of low pass filter. The LabView program for the given task is divided into 5 steps. 1. In the first step it initializes the hardware 2. Secondly it starts loop to measure cut off frequency of low pass filter by increasing frequency steps of 1000 Hz. So that it will quickly reach near to the desired cut-off frequency value.
  • 15. 3. Then it repeats the measurement with smaller steps of frequency usually 100 Hz. 4. Then we further reduce the frequency steps i.e., 10Hz to increase the resolution so that the cut off frequency will be accurate. 5. Write the cut off frequency to the spreadsheet file. 1.8.2.Flow Chart: Here the program flow has been described to have a better understanding of the system.
  • 16. Start Initialize Hardware 6s Set FG Frequency Add 1000 Fs=1000Hz Fc should not exceed Fmax>50000 50000Hz for Low Pass Filter Caliber Input Voltage END Read Low Pass Filter Voltage Vlpf Calculate Gain No Vlpf≤0.707*V Yes Measure Frequency Fmax Fmax1=Fmax-Fs No Initialize Fmax1≤ hardware 0 Yes 6s A B
  • 17. A B Set Set Fs=25Hz Fs=Fmax1+100Hz Add 100 Add 25 Read Low Pass Filter Voltage Vlpf Calculate Gain No No Vlpf≤0.707*Vi n Yes Measure Frequency Fmax Fmax2=Fmax-Fs Fmax2<0 Yes No Yes C D Yes 6s
  • 18. C D Set Fs=Fmax2+10 Fs=Fs-25+1 Add 10 Add 1 Read Low Pass Filter Voltage Vlpf Calculate Gain No No Vlpf≤0.707*Vi n Display Fc,Gain,Gain Yes (dB),Vout Data Storage END END
  • 19. 1.8.3.Program Flow Explanation: In the start the programme first configure the initial frequency i.e,1000Hz and input voltage i.e, 5V of Function generator and auto scale the oscilloscope which normally takes 5s to 6 s so there is a delay for 6s. Figure 5: Initialization., The frequency number and input voltage after converting to a engineering string passed from concatenated strings which combines the different string together and this combine string i.e., FR1000HZ and VOLT5VPP then writes to Function generator by GPIB Write tools if properly addressed. The function generator is addressed properly and the corresponding signal is transferred to the filter. : Auto command auto scale the oscilloscope if properly addressed. In the second step we measured the input voltage Vin at channel 1 of oscilloscope because we realized that the input voltage coming to oscilloscope is not exactly equal to the input voltage we assigned to function generator due to different device characterstics.In the following circuit GPIB write function first write the command to measure the oscilloscope VPP at defined address from channel 1 and then read function reads the voltage VPP at channel1.
  • 20. Also we saw that Vin is slightly changing by changing the input frequency.Therefore in order to get the same input voltage at all the frequencies we developed the following logic to calibre the input voltage which compares the measured input voltage with the assigned voltage value and make the measured voltage equal to the assigned value. To measure Filter voltage at channel 2 of oscilloscope the same logic is used as in measuring the input voltage only the channel is different. We used GPIB read tool at address 7.
  • 21. 1.8.3.1.Measuring Cut-off Frequency: As we know that when filter voltage VLPF=0707*Vin i.e -3dB point on log scale the frequency at this point would be equal to Fc cut off frequency of the filter.Hence to measure the cut off frequency we used the same logic and when VLPF becomes equal to or less tha 0.707 of Vin the 1st loop will terminate after calculating the gain and dB gain describe in the diagram below. If the filter voltage VLPF will not equal or less than 0.707 of Vin then the frequency Fs will increase to Fs1=Fi1+1000 where Fs1 is the last set frequency and Fi1 is the current frequency.
  • 22. Since we first started our loop with frequency steps of 1000 which are not accurate and produce a large error.Hence to be more precise we repeat the procedure with smaller steps. These smaller steps depends on the the difference between the last max frequency Fmax1=Fi1 and the setup frequency FS we measure from the 1st loop. i.e, Fdifference1=Fmax1-Fs1 If the Fdifference is greater than zero then it means that the low pass filter has the cut of frequency greater than 1000.In this condition we repeat the measurement procedure with Fs2=Fdifference1+100 Hz steps.For example if Fmax1=4200 Hz then Fdifference1=5000-1000=4000Hz Therefore new Fs2=4000+100=4100Hz If Fdifference1 is less than or equal to zero then it means that the low pass filter has the cut-off frequency of equal to or less than 1000 Hz because in this case Fmax1=1000 Hz since first step frequency equals to 1000Hz and therefore the 1st loop will terminate at Fmax1=1000Hz. Therefore Fdifference1=1000-1000 Fdifference1=0 Hence we start our next loop with Fs2=25 Hz we choose this frequency as our step frequency for 2nd loop for filters having cut off frequency less than 1000Hz because below 25 Hz the oscilloscope is out of its range even after autoscale it remains out of scale.
  • 23. To start the oscilloscope from 25 Hz immediately after the frequency setting to 1000Hz doesn’t read the proper voltage due to out of scale and gives the read error so to eliminate the error we do auto scale the oscilloscope before starting the measurement of cut-off frequency again. To get more accurate and precise results we increase the resolution by decreasing the step frequency and it is achieved by repeating the cut-off frequency measurement with further smaller steps of frequency.To achieve this we again take the difference between Fi2=Fmax2 and Fs2 and check if Fdifference2 is less than or greater zero. If the Fdifference2 is less than or equal to zero than our new Fs starts from Fs3=Fmax2-25 since our max step in the last loop was 25 Hz. For example if filter cut-off frequency stops at 50 hz in the 2nd loop then in the third loop frequency step will start from Fs3=25+1=26Hz i.e., the testing system is able to measure the cut off frequency in 1Hzrange if the low pass filter has the cut off frequency less than 1000 Hz. And if Fdifference2 is greater than zero then the third loop will start from Fs3=Fdifference2+10 since our last frequency step was 100 Hz in the 2nd loop. Consider the above example again suppose our system stops at 4300 Hz then Fmax2=4300 Hz and Fs2=100Hz therefore Fdifference2=Fmax2-Fs2=4300-100=4200Hz Then our new step frequency for third loop will be Fs3=4210Hz and it will take the steps of 10 Hz each time until VLPF≤0.707*Vin .This means that this testing system is able to measure cut of frequency in 10 Hz range if the low pass filter has Fc greater than 1000Hz .
  • 24. As we know that cut-off frequency range of low pass filter should be in few Hz to 50000 Hz .Hence we developed a logic to check the frequency range of low pass filter if it exceeds 50000Hz it will terminate the program with the message that the frequency range is out or exceeds 50000Hz. 1.9. Performance Evaluation To evaluate the performance of our software based measurement system we measured the cut-off frequency of low pass filter given starting from an initial frequency of 1000 Hz, a step change of 100 Hz and at the final 10 Hz step and calculate the dB gain as well . The observations are shown in the diagram below. Figure:System Measurements
  • 25. Notice that in the step input of 1000Hz the system measures the following readings. 1.Frequency=5000Hz 2.Input voltage =5.2 Volts 3.VLPF=Vo/p=3.2 V 4.VLPF/Vin=0.615 ,where VLPF is the Filter output voltage. 5.Gain = - 4 dB we can see that by using 1000 Hz we got Fmax=5000Hz at which gain -4dB,Vo/p=3.2 V and VLPF/Vin=0.615 .By using 1000Hz steps the results are very poor and the final values are very far away with the desired results.but the advantage of using big step of 1000Hz is that we reach nearer to the desired value very quickly.For example in above measurement we got Fc=5000Hz in 5 quick steps .Hence the reasons and advantage for using 1000 Hz ramp input are 1-To trace the range of filter cut-off frequency quickly in 1000Hz . 2-That the cut off frequency lies between 1000Hz window Since our filter has Fc=5000Hz therefore its cut-off frequency should lie between 4000 Hz and 5000 Hz. To be more accurate and near to desired value we repeat the measurement of cut off frequency by reducing the frequency steps of ramp input to 100 Hz. And we got the following results: 1.Frequency=4010 Hz 2.Input voltage =5. Volts 3.VLPF=Vo/p=3.6 V 4.VLPF/Vin=0.692 ,where VLPF is the Filter output voltage.
  • 26. 5.Gain = - 3 dB we can see that by using 100 Hz we got Fmax=4300 Hz at which gain -3dB,Vo/p=3.6 V and VLPF/Vin=0.692 .By using 100 Hz steps the results are good and very close to the desired results . Hence the advantages for using 100 Hz ramp input are: 1- This measurement gives us the resolution of 100 Hz 2- Tells that the cut off frequency lies between 100 Hz window within maximum 10 steps of 100 Hz 3- Close to the desired results. For example in above measurement we got Fc=4300 Hz in 3 quick steps.This informs us that Fc should be between 4000 Hz to 4300 Hz. Now finally to get the results in 10 Hz resolution we repeat our measurement with ramp input of 10 Hz steps and observed the following results:
  • 27. We can see that by using 10 Hz we got Fmax=4010 Hz at which gain -3dB,Vo/p=3.68 V and VLPF/Vin=0.707 .By using 10 Hz steps the results have become more precise i.e.,Fc=4010 Hz and very close to the desired results i.e,VLPF=3.676V. Hence the advantages for using 10 Hz ramp input are: 1- This measurement gives us the resolution of 10 Hz 3- Results become more precise 1.9.1.Theoretical Calculation of Cut-off frequency: To calculate Cut-off frequency of filter manually as we know that Fc=1/(2πRC) ……………(1) For the calculation of Fc the given filter has the following R & C values R=1800 Ohms (nominal value) C=0.022 µ F When we substitute R & C values in the above formula we see that Fc=1/(2*π*1800*22*^-9 ) ………………(2) Fc=4019.06 Hz The cut-off frequency of a filter can manually be calculated by the formula:
  • 28. 1.10.Results: The experimental value of Fc= 4010 Hertz ,VLPF=3.68 V,VLPF/Vin=0.707 and Gain = -3 dB is considered value if one considers the tolerances in the resistor and capacitor and variation in the filter output voltage. 1.10.1.Range: The instrumentation system can measure frequency up to 50000Hz because low pass filter has maximum range of 50000Hz.This is the complete range of Low pass filter. 0 Hz < fc ≤50000 Hz 1.10.2.Resolution: The test and measurement system has the following resolution. 10 Hz if 1000 Hz< Fc ≤50000 Hz 1 Hz if 0 Hz < Fc ≤ 1000 Hz For above 1000 Hz low pass filters resolution of 10 gives good result and it can be more precise by using lower frequency steps.But it doesn’t make dominant change in the performance of the system. 1.10.3.Time Performance: Testing Time is very important in measurement systems.The less the time consumed by the system with accuracy the better the system performance is. In our measurement system we experimentally measure time of the system by using stop watch and get the following approximate results.
  • 29. Time Filter # Fc (sec) 15 4010 16 10 475 20 3 2820 14 12 16210 22 4 160 17 7 3130 15 Table:Cut-off frequency and time response for different filters The above table shows the cut-off frequency and time response for different filters which has been calculated experimentally.To verify the above time response we will perform some manual calculation next for the given filter # 15 . 1.10.4.Time Calculations: It is also possible to calculate the time of the system manually. For example for filter # 15 we know that Fc=4010 Hz. Let’s calculate it’s time. At the start program do auto scale which will take 6 sec.Then next loop start for frequency step input with frequency step of 1000 Hz first in this loop there is a delay of 500 ms .Since we know that the frequency range of filter is between 4000 Hz to 5000 Hz.Therefore loop will continue to 5 times to reach 5000 hz. Therefore it will take 0.500 * 5=2.5 sec Then the program again do auto scale which means 6 sec more. Then again next loop will start with frequency step of 100 Hz with initial value of 5000-1000 =1000 Hz+100 and with 500 ms delay as well and in the first step it will reach to 4100 Hz.
  • 30. Then in the next loop of 10 hz frequency steps it will start with initial frequency of 4000 Hz+10 Hz and also in this stepit will reach to 4010 Hz in the first step which means 500 ms more. In short if we sum all these time consumed by the program it is evaluated to be Total time (seconds)=6+5 * 0.500+6+0.500+0.500 =15.5 sec which satisfy our experimental time which is approximately 16 sec. Actually all the time is consumed by the two time delays in the program .The reason for using time delay is we need to auto scale the oscilloscope from jumping higher resolution to smaller resolution as discussed earlier in detail in the software section.Different instruments consume different time for auto scale.In our system auto scale command for the given oscilloscope is taking around 4-5 sec that’s why we used 6 sec delay for auto scale each time. The system time could be reduced by using instruments with fast time response. 1.10.5. Conclusions This test and measurement system described above is able to measure low pass filter cut-off frequency with the minimum resolution of 1 Hz and covering whole range of low pass filter with fast response and accuracy .Although in this report the example and calculations has been done for only one filter for showing the performance of the system but the system has been checked for different filters and is working well. In the next session we will present results for other filters as well. Although the software is somewhat complex but the accuracy is fine and more important.
  • 31. The software could be made simpler and time can be reduced by reducing number of loops or by using alternate techniques like interpolation and curve fitting which has been briefly described in the Technique session befor. By using more precise instruments and calibration techniques the system performance could be made more accurate and system response could be made fast. 2.PART 2 Objective:
  • 32. The basic aim of this part is to develop understanding about monitoring data from user defined input from GPIB based instruments and analysis data and write the data with results on the spreadsheet file for data logging purpose. 1. The Task The task is to determine the cut-off frequency of 15 filters identified by serial numbers by using the developed measurement system in part 1.So we able to determine frequencies of interest and will log them with the serial number r to a spreadsheet file. The hardware setup remains the same as in part 1 and only some addition will be required in the above software program. 2.1 The Program flow: The following process explains the flow: 1. Prompt the user for the serial number of filter and start the system with an initial frequency 2. Measure the voltages, calculate the gain, compare it with 0.707 3. If gain is larger than this value 4. Increase the frequency by a defined step 5. Jump step 2 6. else end this loop 7. Save the serial number and the cut-off frequency at a spreadsheet. 8. Ask for 15 times 2.2 LabView VI Description: The whole program logic will be the same as in pert1 except the following changes • An additional while loop to overall program has been added in the program . The purpose of this loop is to iterate for a given number of available filters.
  • 33. • A flat sequence is added in the start to prompt the user to connect the filter and enter filter serial number. It checks the filter numbers. Figure 1:Loop to prompt user to enter filter number • A function write to spreadsheet file has beed added to log serial numbers of filters and cut-off frequency in a spreadsheet file. Figure 2: Writing to a spreadsheet The error out signal from prompt user loop is connected to the measurement loop developed in part 1 and then runs the internal loops and When the gain becomes less or equal to 0.707 the internal loop stops, the cut-off frequency is stored in an array and at then passed to a spreadsheet file using the Write to Spreadsheet.vi , included in Labview tools.
  • 34. The Vi runs for 15 iterations and after that the program stops and writes the measurement data on the spreadsheet file provided with the path.New values will be appended to the file when next time VI will run. 3. Results & Performance Evaluation: Here we discuss the repeatability and uncertainty in measurements.
  • 35. Repeatability: ‘Repeatability is the closeness of agreement of a group of outputvalues for a constant input under given environmental conditions’ To find out the repeatability of the testing and measurement system we measured the values of cut-off frequency of low pass filter 15;fifteen times as shown in the table. The program first start with initial frequency of 1000 Hz then 100 Hz and finally calculate the cut-off frequency with 10 Hz by comparing the gain with 0.707.. Frequenc Serial y (Hz) Vout/Vin 15 4010 0.707692 15 4010 0.70723 15 4010 0.693613 15 4010 0.707152 15 3880 0.707982 15 4010 0.707825 15 4010 0.707214 15 3830 0.707821 15 3910 0.707721 15 4010 0.704214 15 4010 0.698214 15 4010 0.706912 15 4010 0.707695 15 4010 0.706641 15 4010 0.693241 Table: Cut-off frequency measurements of filter # 15 From the above table we can see that the cut-off frequency repeated 12 times in 15 measurements which means that the percentage of repetition is % repetition= (12/15)*100 = 80 % Checking for Different Filters:
  • 36. Here ten different filters have been tested and their results has been recorded in the spreadsheet file.The table below shows the results written in the spreadsheet file for ten different filters with their cut-off frequency measurement. Filter Number Frequency Hz 3 2820 4 160 5 706 7 3130 8 4750 9 310 10 475 11 7290 12 16220 15 4010 Table 2: Cut-off frequencies for ten filters Cut-Off Frequency Calculations & Measurements: Theoretical Calculation of Cut-off frequency: To calculate Cut-off frequency of filter manually as we know that Fc=1/(2πRC) ……………(1)
  • 37. For the calculation of Fc the given filter has the following R & C values R=1800 Ohms ± 5% C=0.022 µ F When we substitute R & C values in the above formula we see that Fc=1/(2*π*1800*22*^-9 ) ………………(2) Fc=4019.06 Hz The above value is the ideal value but we see that due to tolerance in the components the value may vary between minimum and maximum value of cut-off frequency. To find out the variation in frequency due to the tolerance in resistor .lets proceed as follows Since Resistor tolerance = ± 5% (gold) Hence Our Rmin=1800- (5%*1800)=1710 Ohms Rmax=1800+(5%*1800)=1890 Ohms Rmin gives the Fc maximum and Rmax gives the FC minimum. Hence,by substituting Rmin and Rmax in place of R in equation 1 one by one we get the following results. Fcmin=3827 Hz Fcmax=4230 Hz
  • 38. Hence the acceptable range of cut-off frequency would be between 3827 Hz and 4230 Hz. This tell us that • Our test & measurement system should be within the limits of between 3827 Hz and 4230 Hz for the measurement of the cut-off frequency for the given filter. • The system would be more better and accurate the more it would be nearer to the desired value i.e,in our example Fc=4019 Hz. Now to evaluate the performance of our system and to find out how well it’s accuracy is we will do some statistical analysis below. Performance Evaluation of the System: Uncertainty in Cut-off Frequency: Uncertainty of a measurement can be defined as
  • 39. “The range of values about the final result within which the true value is believed to lie.” The mean of N measurements is the best estimate of the true value in random errors. For calculating uncertainty in the measurement we have to measure the results three times or more.In our experiment we performed the procedure 15 times and got the following results. To calculate the uncertainty in the we measure the frequency and gain several times and write in the spreadsheet file.The following table shows the measurement results. Type A Uncertainty Calculations: These are uncertainties evaluated by the statistical analysis of a series of Measurements. To calculate the uncertainty in cut-off frequency lets take out the mean,uncertainty and standard uncertainty of the measured values.here in this example we measured the cut-off frequency of filter # 15 ,seven times and then calculate its mean,uncertaint and standard uncertainty and try to evaluate the system performance. Below are the tables showing 7 readings for cut-off frequency of filter 15 and their statistical analysis. Serial Frequency (Hz) 15 4010 15 4010
  • 40. 15 4010 15 4010 15 3880 15 4010 15 4010 Table: cut-off frequency of filter 15 Mean 3991.429 Uncertainty 49.13538 Standard Uncertainty 18.57143 Table:Statistical calculations for cut-off frequency for filter 15 Hence the best estimate of the true value =3991.429 Hz it is preferable to quote an interval within which there is a specified probability (usually 0.95) that the true value will lie. Specifically, we can write, y-U<Y<y+U Y is the true value of the quantity, y is the best estimate of the true value, and U is the expanded uncertainty. Or we can write above equation as Y=y±U U = ku k is referred to as the coverage factor In our calculation • The best estimate of true value is 3991.429 Hz
  • 41. • When Type A evaluations are carried out, the standard uncertainty is equal to the standard error of the mean i.e, u = 18.57143 Hz. • the number of degrees of freedom, n = 7 - 1 = 6 • the corresponding value for k is 2.447 … (Note for value of K see appendix) • U = ku = 2.447 *18.57143 = 45.444 Hz We would like to be able to say: The best estimate of the true value of the cut-off frequency of the given filter at room temperature is 3991.429 Hz. There is a probability of 0.95 that the true value lies between (3991.429 ± 45.444) Hz. This maybe abbreviated to, Fc = (3991.429 Hz ± 45.444) Hz From the above analysis we prove that the system is working well within the desired range of cut-off frequency i.e., 4019 Hz. Verification: To verify our system performance we also measured the frequency response of the given filter and calculated the cut-off frequency by directly recording the output voltage of filter from oscilloscope through increasing the frequency using function generator .Then we recorded data on the spreadsheet and calculate its gain and then plot the frequency response graph between dB gain Vs Frequency (Hz). The table below is showing measurement data for frequency response of filter # 15. Frequency Hz Vin (Volts) Vout (Volts) Gain Gain dB
  • 42. 100 5.2 5.12 0.984615 -0.13467 500 5.2 5.12 0.984615 -0.13467 1000 5.2 4.96 0.953846 -0.41043 1500 5.2 4.81 0.925 -0.67717 2000 5.2 4.64 0.892308 -0.98971 2500 5.2 4.24 0.815385 -1.77275 3000 5.2 4.08 0.784615 -2.10686 3500 5.2 3.87 0.744231 -2.56585 3700 5.2 3.8 0.730769 -2.72439 3800 5.2 3.75 0.721154 -2.83944 3900 5.2 3.68 0.707692 -3.00311 4000 5.2 3.59 0.690385 -3.21818 4010 5.2 3.56 0.684615 -3.29107 4020 5.2 3.56 0.684615 -3.29107 4500 4.99 3.13 0.627255 -4.05112 5000 4.96 2.83 0.570565 -4.8739 5500 4.8 2.39 0.497917 -6.05687 Table:Frequency response measurement data By plotting the graph between dB gain and frequency we got the following frequency response of the filter as follows. Frequency Response Of Filter 100 500 0 1000 0 1000 2000 3000 4000 5000 6000 1500 -1 2000 -2 3900, - 2500 3.003110499 Gain (dB) -3 3000 3500 -4 3700 -5 3800 -6 3900 4000 -7 4010 Frequency (Hz) 4020 4500 Figure:Frequency response of the given filter. 5000
  • 43. From the above graph we can see that the -3dB gain point (highlighted in red color) is at 3900 Hz which means that the cut-off frequency of this filter is near about 3900 Hz which is in favor of our practical results. The above results proves that the Test and measurement system do not only lie within the desired range of cut-off frequency of the given filter but it performance is well evaluated in terms of accuracy, repeatability and system response. Features: • Able to measure frequency response of any low pass filter . • GPIB interface . • High resolution up to 1 Hz, repeatability and accuracy. • File storage for frequency response data of filter with serial number. Sources Errors: Even the most carefully designed and executed experiments using 'state of the art'instruments and which are performed in temperature and humidity controlled environments, yield values that are influenced by various sources of error. Practically due to loadind effects,cable impedence,components tolerance and instrument limitations there is always some error in the measurement system. Also due to thermal noise in instruments the final measurements are affected. We observed that oscilloscope measure different voltages at different frequencies.The input voltage at filter is varying with the frequency as well. For the same signal it seems that they give a different measurement.
  • 44. Error Reduction: There are some suggestions to reduce the errors. • Used standard filters. • Use smoothing circuits at the output of filter. • Use shielded cables • Calibration of instruments • Calibration through Software program. Hence to reduce errors and to obtain the smooth system response calibration of input and output voltage is required.The calibration of input voltage is already been done in the software .Now only the calibration of out voltage is required which certainly improve the system response. Errors can never be evaluated.Therefore it is of no worth to say that the measurement has unknown errors. The better way is to define some number which related to the error that we are able to determine. This will allow us to express a value of a quantity obtained through measurement in such a way that we indicate, i) the most likely true value (i.e. the 'best estimate') of the quantity ii) the range of values that may reasonably be assigned to the true value, based on our 'Imperfect' measurements and any other factors that we are aware of.( Kirkup 2007) Conclusions: 5. Conclusions The above results proves that the Test and measurement system do not only lie within the desired range of cut-off frequency of the filter but its
  • 45. performance is well evaluated in terms of accuracy,resolution,range, repeatability and system response. Summarizing, the developed measuring system is tuned to best deal with frequencies 500-10000 Hz. Also from the above results we can see that by increasing the number of measurements; uncertainty and standard uncertainty has become better and the system is more nearer to accuracy. Input and output voltage calibration and instrument calibration will also help to improve the accuracy, repeatability and system response. Smaller steps would improve the system’s performance at the small frequencies, but also increase the cost of time. Therefore the alternative technique described in part 1 chapter 2.2 could lead to faster solutions, for this reason it is a proposal for future improvement of the system Future Improvement : • Using either Interpolation method which will increase the accuracy by converging on single point or curve fitting method to have a fast response . • Network/Web access control to monitor and control the system remotely by using either web publishing tool,data socket or shared variable. • Using Calibration techniques. • Using signal condiditoning.
  • 46. Appendix If uc is determined through a Type A evaluation of uncertainty, then it is usual to assume that the t distribution may be applied when determining the coverage factor, k. When the level of confidenceis 0.95 (i.e. the probability that the true value lies within a specified interval is 0.95), then table 4.1 gives the coverage factor for various degree of freedom, n. For values of n > 10, k tends towards a value of close to 2. When n > 10, experimenters often use 2 as the coverage factor when the level of confidence required is 0.95 (when the level of confidence is 0.99, the corresponding value of k is 3). Table: Coverage factors in Type A evaluations for n degrees of freedom when the level of confidence is 0.95.(science.uts.edu.au)
  • 47. Reference: Baican R. and D.N (2000),Applied Virtual Instrumentation,Wit press,pp 1-3,ISBN:1-85312-800-7 zone.ni.com/devzone/cda/tut/p/id/4084 ni.com/automatedtest. http://www.aip.org/tip/INPHFA/vol-9/iss-2/p24.html (http://iridl.ldeo.columbia.edu/dochelp/StatTutorial/Interpolation/) Les Kirkup 2007,Calculating and Expressing Uncertainty in Measurement , Department of Applied Physics, Faculty of Science, University of Technology, Sydney, New South Wales, Australia. http://www.science.uts.edu.au/physics/uncertainty.pdf

×