Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Laboratory Protocol
By GROUP 3 on 16.01.2014 Micro & Nano Systems (MNS_1) Name Karthikeyan Manga Lakshmi Varadharajan Binh Duong Nguyen Longqian Xu Matrikel-Nr. 334707 353975 336644 355643 E-mail karthikeyan.manga@s2013.tu-chemnitz.de lakshmi.varadharajan@s2013.tu-chemnitz.de binh-duong.nguyen@s2013.tu-chemnitz.de longqian.xu@s2013.tu-chemnitz.de
CONTENTS
1. Objectives 2. Components & Setup 3. Theory 4. Experimental Procedure 5. Experimental Tasks 5.1. Measurement in Time Domain 5.2. Measurement in Frequency Domain 6. Preparatory Tasks 7. Conclusion 8. References
3 3 4 5 5 5 8 33 34 35
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 2
FFT Analysis
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 3
3. THEORY: Frequency is usually represented as angular frequency in radians/second, or as in seconds-1, also known as the unit hertz (Hz). You also can use beats per minute (BPM) and revolutions per minute (RPM) to represent frequency. Angular frequency (rad/sec) and (Hz) are related by the following formula: =2. Frequency is also spoken of in correlation to a phase , which describes an offset of the wave from a specified reference point at the initial time t0, and is usually given in degrees or radians. Taking the example of a sinusoidal wave, the waveform function is expressed in terms of time as F(t) = Asin(t + ) , with amplitude A, angular frequency , and phase as constants. Periodic signals in applications and can represented sinusoid. analysis is decompose analog real are complex rarely be by a simple Fourier used to any complex
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 4
waveform into a sum of simpler functions, either sines and cosines or complex exponentials. The frequency components that make up such a signal are often the properties of interest, and this analysis is known as frequency-domain or spectral analysis. For a digital frequency acquisition of low-frequency signals, it is sufficient to use one counter, or timebase. The rising edge of the input signal triggers the number of timebase ticks to be counted. Because the timebase is of a known frequency, you can easily calculate the frequency of the input signal.
Figure 2 : Digital Signal with Respect to Internal Timebase (One Counter for Low Frequency)
When the frequency of the digital signal is very high or varies, it is better to use a two-counter method described below. Note that the same hardware limitation applies to both two-counter methods. That is, the frequency you are measuring cannot exceed the maximum input frequency supported by the counter, even though it may exceed that of the internal timebase.
Figure 3 : Digital Signal Frequency Measured with Two Counters (High Frequency)
4. EXPERIMENTAL PROCEDURE: To start the program FFTANA, you first have to call the program MATLAB in Windows. After that you input FFTANA. To perform the wanted tasks of this experiment, below are listed time signals in the form of data files, e. g. the file name (sin10_0) contains a sampled sinusoidal harmonic with 10 time periods shown and recorded in the screen. Click on the LOAD bottom in the interface of the program to select a signal file and run it. The data are found in the path: C:\matlab4\toolbox\dfm\ 1. sin2_0.mat 3. sin10_0.mat 5. sin369_0.mat 2. sin2_5.mat 4. sin10_5.mat 6. sin368_5.mat
Page | 5
Lab Protocol_SSS_Group_3_MNS_1_WS2013
5. EXPERIMENTAL TASKS 5.1. Measurement in Time Domain 5.1.1 Compare the number of the samples per period which were determined during the experiment with the results in the preparation task 3.5 for the measuring signals 1 8.
Signal 1 2 3 4 5 5 6 6 7 7 8 8
Samples/cycle - Exp. 1024 819 204 195 5.5 5.55 5.6 5.55 2.2 2.2 2.3 2.25
5.1.2
Determine the frequency of the measured signals 1 8 with using the cycle duration in time domain. Note the following: - The determination of the cycle duration is based on the measuring arrangement shown in Figure 1. That means that the comparator switches when crossing the zero of the harmonic signal. So the time measurement shall always start with the first positive value of the sampled signal after passing the zero and end before the first positive value after the zero crossing. The frequency divider is fixed to 1:1. - Determine the frequency with the help of the duration of just one cycle and also by using more cycles (10), (signals 4-8).
5.1.2.1 Calculate the frequencies of the measured signals using number of cycles and the sampling frequency. Give the values of the measurement deviations (absolute and relative error) of each frequency that you determined in this experiment. The results are tabulated as follows :
Signal
No. of cycles
Samples/cycle - Calc.
Samples/cycle - Exp.
1 2 3 4 5 5 6 6 7 7 8 8
2.00E+07 2.00E+07 2.00E+07 2.00E+07 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06
2 2.5 10 10.5 369 369 368.5 368.5 922 922 921.5 921.5
1024 819.2 204.8 195.047619 5.550135501 5.550135501 5.557666214 5.557666214 2.221258134 2.221258134 2.222463375 2.222463375
Table 2
19531.25 24414.0625 97656.25 102539.0625 720703.125 720703.125 719726.5625 719726.5625 1800781.25 1800781.25 1799804.688 1799804.688
1024 819 204 195 5.5 5.55 5.6 5.55 2.2 2.2 2.3 2.25
19531.25 24420.02442 98039.21569 102564.1026 727272.7273 720720.7207 714285.7143 720720.7207 1818181.818 1818181.818 1739130.435 1777777.778
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 7
Signal 1 2 3 4 5 5 6 6 7 7 8 8
Sampling Rate fs (Hz) 2.00E+07 2.00E+07 2.00E+07 2.00E+07 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06 4.00E+06
No.of cycles 2 2.5 10 10.5 369 369 368.5 368.5 922 922 921.5 921.5
Samples/cycle - Calc. 1024 819.2 204.8 195.047619 5.550135501 5.550135501 5.557666214 5.557666214 2.221258134 2.221258134 2.222463375 2.222463375
Frequency Calc. (Hz) 19531.25 24414.0625 97656.25 102539.0625 720703.125 720703.125 719726.5625 719726.5625 1800781.25 1800781.25 1799804.688 1799804.688
Samples/cycle - Exp. 1024 819 204 195 5.5 5.55 5.6 5.55 2.2 2.2 2.3 2.25
Table 3
Frequency Exp. (Hz) 19531.25 24420.02442 98039.21569 102564.1026 727272.7273 720720.7207 714285.7143 720720.7207 1818181.818 1818181.818 1739130.435 1777777.778
Absolute error (Hz) 19.07348633 29.81687963 480.5843906 525.9697567 13223.1405 6492.979466 12755.10204 6492.979466 82644.6281 41322.31405 75614.36673 39506.17284
55 (10) 111 (20) 56 (10) 111 (20) 22 (10) 44 (20) 23 (10) 45 (20)
5.1.1
Discuss the results! Under which condition can you actually determine a frequency from the sampled signal? Frequency from a sampled signal can be obtained under the following conditions Sampling frequency must satisfy Nyquist Theorem No. of samples must be relatively higher per cycle. ADC should have reasonable resolution to measure the desired amplitude range.
5.2 Evaluation in frequency domain A frequency determination in frequency domain is useful, if the original shape of the sampled signal cannot be represented in time domain anymore, e. g. when the number of sampled values in one cycle of a harmonic signal is less than 10. Especially when having signals that just exist for a short time (like the ones that result from measuring methods based on the Doppler Effect) the frequency domain is advantageous. Then a linear (flat) interpolation within the main lobe can be useful for such frequency spectra. For such interpolation, the centroid method is used. 5.2.1 Transform the measuring signals 1 8 into frequency domain and discuss the representation. The transformation always happens with a rectangular window (idx 1 2048). Use the ZOOM function and if necessary print some examples for further explanation (details about the zeros). The corresponding signals in time domain were transformed to their frequency domain counterparts using the module FFTANA, as shown below : T
Figure 5 : Signal 2.5 (a); Dominant peak Frequency (1) = 19.53215 KHz
Figure 6 : Signal 2.5 (b); Dominant peak Frequency (2) = 29.29688 KHz; Average frequency (KHz)= (19.53215 + 29.29688) / 2 = 24.414515 KHz
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 10
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 11
Figure 9 : Signal 10.5 (b); Dominant Frequency (2) = 107.4219 KHz; Average frequency (KHz)= (107.4219 + 97.65625) / 2 = 102.539075 KHz
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 12
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 13
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 14
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 15
5.2.2
Load measuring signal 3 and find out the time interval for exactly one cycle (idx j ... idx k). Open the submenu OPTION and set the idx-values. By pushing OK you get back and see the time interval with detail showing the single cycle. Transform this signal and discuss the result. Give reasons why the spectral line with the maximum amplitude can lie on another frequency than that determined easily in time domain. Repeat this task by setting other time intervals you can choose on your own.
The spectral line with the maximum amplitude can lie on another frequency than that determined easily in time domain accounting to spectral width error due to Quantization error (Discretization error) Very few samples Low Sampling Frequency
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 16
5.2.3
Load the measuring signal 12 (do not cut off the offset). Discuss the representation in time domain. Give the number of bits the A-D converter has to be used when the measuring range for the sampling of the signal is 2 V. The measuring signal represented in the time domain as shown in Figure 19 is a DC signal. Quantization Voltage level, Vq = (0.664 0.656) V = 8 mV Levels of Amplitude required to measure 2 V = (2 / 0.008) = 250 ~ 256 Thus, No. of Bits required by the ADC to measure a 2 V range, n, is determined from: 2n = 256 = > n = 8
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 17
5.2.4
Show how the spectra of box-car pulses (rectangular) look like. The duration of the pulses have to be set according to the preparation task 3.4 (OPTION). Compare the roots with the calculated values. Frequency, F = 1 / T T = N . Ts
F = 1 / (( 2048/10) . (50 x 10-9)) = 97656.25 Hz = 97.65625 KHz This value can be verified from the first root on the frequency domain, i.e. 97.65625 KHz
Lab Protocol_SSS_Group_3_MNS_1_WS2013 Page | 18
Frequency, F = 1 / T T = N . Ts
F = 1 / (( 2048/100) . (50 x 10-9)) = 976562.5 Hz = 976.5625 KHz This value can be verified from the first root on the frequency domain which is comparable to the calculated value, i.e. 986.3281 KHz
5.2.5
Evaluate the spectra of box- car pulses according to task 5.2.4for the following pulse durations: six-, two- and one-fold of the sampling cycle duration! Document what you find out. Frequency, F = 1 / T T = N . Ts
When N = 6 and Ts = (1 / 20 MHz) = 50 ns F = 1 / (6 . (50 x 10-9)) = 3333333.3 Hz = 3.333333 MHz This value can be verified from the first root on the frequency domain which is comparable to .e. 3.330078 MHz.
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 21
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 22
Frequency, F = 1 / T T = N . Ts
When N = 2 and Ts = (1 / 20 MHz) = 50 ns F = 1 / (2 . (50 x 10-9)) = 10 MHz This value can be verified from the first root on the frequency domain, i.e. 10.0000 MHz.
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 23
Frequency, F = 1 / T T = N . Ts
When N = 1 and Ts = (1 / 20 MHz) = 50 ns F = 1 / (1 . (50 x 10-9)) = 20.0000 MHz This signal cannot be transformed by FFT as the sampling frequency does not satisfy the Nyquist Theorem or criterion.
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 24
5.2.6
Load measuring signal 6, make a window of 200 samples (from OPTIONS, e. g. idx 100 to idx 300), show the spectrum with the ZOOM function. Calculate the minima of the signal in the spectrum and decide whether an interpolation within the main lobe of the spectrum is sensible. Calculate the measuring frequency more exactly by using 6 spectral lines in your calculation (centroid method). Compare the result with the frequency line that has the maximum amplitude in the spectrum and with the evaluation in time domain.
Figure 26 : Signal 6
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 25
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 27
The frequency for such a signal having a wide amplitude spectrum width can be computed using the Centroid formula: F = Sum (fi.Ai) / Sum of (Ai) fi (KHz) 714.8438 716.7969 718.7500 720.7031 722.6562 724.6094 Sum Ai 0.907796 0.968744 1 0.999795 0.968139 0.906827 5.751301 fi.Ai 648.9323 694.3927 717.7500 720.5554 699.6317 657.0954 4138.3575 ; fi = Frequency of dominating frequency
i = Index
F = 4138.3575 / 5.751301 = 719.5515 KHz The frequency spectrum with the maximum amplitude is 718.7500 KHz.
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 28
The value of frequency of the signal found out from the Centroid formula is comparable to the frequency with the maximum amplitude.
5.2.7
The measuring signal 9 is a digitalized noise signal (white noise). Determine the spectrum that is belonging to it and interpret the result.
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 29
As observed from the frequency spectrum of white noise, it consists of superposition of various signals from a wide range of frequency. FFT decomposes the components of the
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 30
white noise and helps to resolve the frequencies of the individual signals contained in the white noise.
5.2.8
Measuring signal 10 was measured as an output signal of an operational amplifier, while the input quantity was white noise generated by a noise generator. Determine the spectrum of the output signal, interpret it and compare it with the result from task 5.2.7. How would the figure change if the signal was not sampled just 2048 times, but with a measuring time (measuring window) that is ten times longer, so that the signal is sampled 20,480 times now?
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 31
When compared with the frequency spectrum from the previous task, it is observed that the signal components of low frequencies have been filtered. Hence this implies that the operational amplifier acts as a low pass filter. And the frequency spectrum does not produce more resolved results upon increasing the sampling range. Hence no change would be observed in the frequency spectrum upon sampling 10 times more.
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 32
6. Preparatory Tasks 6.1 What are the cycle durations for the given sampling frequencies? Cycle duration = 1/fs Cycle duration for the the given frequencies are calculated as follows Frequency Cycle Duration 20 MHz 1/(20 x 106) = 50 ns 10 MHz 40 MHz 2 MHz 1/(10 x 106) 1/(40 x 106) 1/(2 x 106) = = = 100 ns 250 ns 500 ns
6.2. Compare the characteristic values in time and frequency domain. Name the interactions between (grid points) sampling rate, width of the measuring window (time domain), the number of (usable) spectral lines, frequency resolution and the maximum frequency (frequency domain). The relationship between sampling rate, measuring window in time domain is as follows : f = 1/ NTA f = Spectral Width NTA = Measuring Time Window Sampling frequency, fs = 1/TA 6.3. For which frequency range is it physically meaningful to describe the calculated amplitude density spectrum? According to the Nyquist criterion, fs 2 fm . Hence the frequency of the measuring signal should satisfy this criterion. 6.4. For a periodic rectangular pulse (a periodic box-car pulse) amounts to the ratio of pulse duration to period duration = window width T=1/f0, a) 1: 10 and b) 1: 100. At which frequencies (reference frequency f0) the calculation gives roots in the spectrum?
Frequency, F = 1 / T T = N . Ts
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 33
N = 2048 / n
When n = 10 and Ts = (1 / 20 MHz) = 50 ns F = 1 / (( 2048/10) . (50 x 10-9)) = 97656.25 Hz = 97.65625 KHz When n = 100 and Ts = (1 / 20 MHz) = 50 ns F = 1 / (( 2048/100) . (50 x 10-9)) = 976562.5 Hz = 976.5625 KHz 6.5. Calculate the expected number of samples per cycle for the signals 1-8 we want to analyze. Sampled signal 1-4: fsampling=20 MHz; sampled signal 5-8: fsampling=4 MHz
Number of samples per cycle = No. of samples / No. of cycles Number of samples = 2048 Expected number of samples for signals (1-8) (from experimental procedure)
Signal 1 2 3 4 5 6 7 8
No. of Samples 2048 2048 2048 2048 2048 4.00E+06 4.00E+06 4.00E+06
Samples/cycle - Calc. 1024 819.2 204.8 195.047619 5.550135501 5.557666214 2.221258134 2.222463375
CONCLUSION: From the practical experiment carried out, the concepts and operating conditions of Digital Frequency Measurement were studied. The governing parameters of such a measurement were also studied. FFT and counter methods are widely employed to analyse signals in various types of spectroscopies.
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 34
REFERENCES: 1. Lab Manual (2014), Digital Frequency Measurement, retrieved on 10.01.2014 from https://www.tu-chemnitz.de/etit/messtech/material/secure/psss/practical_dfm.pdf 2. National Instruments (2013), Frequency Measurements: How-To Guide, retrieved on 10.01.2014 from http://www.ni.com/white-paper/7111/en/
Lab Protocol_SSS_Group_3_MNS_1_WS2013
Page | 35