* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download RMS, power, dB, PDF. Analogue-to
Oscilloscope history wikipedia , lookup
Time-to-digital converter wikipedia , lookup
Surge protector wikipedia , lookup
Power MOSFET wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Index of electronics articles wikipedia , lookup
Battle of the Beams wikipedia , lookup
Analog television wikipedia , lookup
Radio transmitter design wikipedia , lookup
Valve RF amplifier wikipedia , lookup
Signal Corps (United States Army) wikipedia , lookup
Power electronics wikipedia , lookup
Opto-isolator wikipedia , lookup
Dynamic range compression wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Audio power wikipedia , lookup
Cellular repeater wikipedia , lookup
High-frequency direction finding wikipedia , lookup
Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Retrieval of experimental data files. Signal types. Signal characteristics: RMS, power, dB, PDF. Analogue-to-Digital Conversion (ADC). Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Outline • Retrieval of experimental data files • Power in signal analysis • Root Mean Squares (RMS) • dB scale • Dynamic range • Specification of ADC ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Retrieval of experimental data files • Text (ASCII) files • Binary files, e.g. – – – – *.mat (Matlab native compressed) *.wav files *.daq files (Matlab data acquisition) other binary files. e.g. ‘float32’ Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Reading *.wav file in Matlab [fName, fPath] = uigetfile('*.wav',… 'Select *.wav file'); [g,sFreq] = audioread([fPath fName]); %or wavread ([fPath fName]); dt = 1 / sFreq; %sampling interval nPts = length(g); time = (0:nPts-1)’ * dt; plot(time*1000,g(:,1)) %2 cols if stereo xlabel('Time, ms') ylabel('Intantaneous sound pressure, -') ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Example of reading a binary file • Each data point is stored as 4 byte floating point number: %open the file for reading fid = fopen(([fPath fName], ’r’); %read the whole contents g = fread(fid, ’float32’); Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Reading an ASCII file %Example: %A single column data file %first number is the sample frequency: [fName, fPath] = uigetfile('*.txt',… 'Select data file’); g = load([fPath, fName], ’-ascii’); sFreq = g(1); %first data point is sample freq. g(1) = []; %eliminate the first point dt = 1/sFreq; %sample interval nPts = length(g); time = (0 : nPts – 1)’ * dt; %or time = linspace(0, (nPts-1) * dt, nPts); plot(time, g) ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Signal types • Stationary (average properties don’t vary with time) – Deterministic • Instantaneous value is predictable at all points in time – Random • Only statistical properties are predictable • Spectrum is continuous • Non-stationary – Continuous - eg speech – Transient – eg shock Dr Michael Sek – Signal characteristics: rms, power, dB; ADC wav ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Signal characteristics ? 0.4 0.3 0.2 0.1 0 -0.1 -0.2 -0.3 -0.4 0 2 4 6 8 10 Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Power of a signal X’er Signal Conditioning (amplifier) V2 Power Vi R V Units sensitivity V Units sensitivity i i=V/R R Voltage across a resistor (recording device) V2 Units sensitivity 2 R R sensitivity 2 Power Units2 R Power Units2 Power ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Instantaneous power • In signal analysis the instantaneous sample squared is referred to as ‘POWER” Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Mean power of vibration and Root Mean Squares (RMS) • Mean power of a sampled vibration signal (mean squares) 1 Mean power N N gi 2 i 1 • Mean level that produces the same power as the signal 0.4 RMS 0.3 0.2 0.1 0 -0.1 -0.2 -0.3 RMS 1 N N gi -0.4 2 0 i 1 or Root Mean Squares (RMS) 2 4 6 8 10 1 N g i g 2 N i 1 Standard deviation ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC RMS of a signal stored in vector g • rms=sqrt(mean(g.^2)) 0.4 0.3 0.2 0.1 0 -0.1 -0.2 -0.3 -0.4 0 2 4 6 8 10 Average Power RMS 2 RMS Average Power Dr Michael Sek – Signal characteristics: rms, power, dB; ADC 1 Mean power of harmonic signal A cos x over the period of 2 (analytical solution) 0.5 0 -0.5 -1 1 2 2 A 2 cos2x dx 0 RMS of a harmonic signal 0 1 2 3 4 5 6 7 1 A 1 A 2 x sin 2x 2 2 4 2 0 2 RMS 2 A2 A 0.707 A 2 2 ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC dB scale (decibel) • dB scale is a relative logarithmic scale dB 10 log Power Powerref Since Power RMS 2 RMS dB 10 log RMS ref 2 20 log RMS RMSref • 0 dB corresponds to ? the reference level Dr Michael Sek – Signal characteristics: rms, power, dB; ADC dB scale • In air acoustics in which the sound pressure level is measured, the reference for the dB scale is the average lowest threshold of audibility, by convention taken as 20 Pa (2 x 10-5 Pa ) • This 20 Pa is the RMS of the reference signal • In other applications, however, the dB scale is used to compare the levels of two signals and the choice of reference level is arbitrary ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC dB - example • The level increases from the reference level (0 dB) to 40 dB in increments of 10 dB. What is the corresponding factor by which the RMS level and power increase? dB 20 log RMS 10 P 10 dB 10 RMS RMS ref dB 20 RMS ref Pref dB 0dB 10dB 20dB 30dB 40dB RMS 1 3.16 10 31.6 100 Power 1 10 100 1000 10000 Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Dynamic range of ADC • Dynamic range (in dB), ref.=1 – bi-polar ADC Dynamic range = 20 log (2^resolution/2) Eg. 20 log (2^12/2) = 20 log 4096/2 = 66 dB 20 log (2^16/2) = 20 log 65536/2 = 90 dB – uni-polar ADC Dynamic range = 20 log (2^resolution) Eg. 20 log (2^12) = 20 log 4096= 72 dB ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Probability Density Units random-gaussian ‘pdfExample.m’ Probability Density Function 4 4 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -4 -4 0 5 10 15 0 0.05 0.1 0.15 0.2 Time (s) • Normally distributed (Gaussian) random signal • White noise Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Probability Density Function - PDF random-gaussian Probability Density Function 3 2 1 0 i p p / length( g ) / diff (bins (1 : 2)); plot (bins, p ) %or bar (bins, p) xlabel (' Signal g (units)' ) 0 -1 t T binWidth In MATLAB : [ p, bins ] hist ( g , nBins ); 2 1 Units pdf (bin) -1 t1 t2 ylabel (' PDF (1/unit ' ) -2 -2 -3 -3 5 10 Time (s) 15 0 0.1 0.2 0.3 0.4 -3 x 10 • PDF estimate – the fraction of total time the signal is within a particular bin, normalised (divided) by the bin width. • The same as the number of points of data within a bin divided by the bin width • Histogram of frequency of occurrence ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Exercise • Calculate the 3-phase mains voltage in Australia. Dr Michael Sek – Signal characteristics: rms, power, dB; ADC ADC parameters • Analogue-to-Digital Converter • Sample rate or frequency (Hz) • Sampling interval (s, ms, s) Sample interval 1 Sample frequency • Resolution – the ability of ADC to distinguish the voltage • Gain ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Resolution of ADC • Expressed in bits, eg. 12 bit resolution 212 4096 states from 0 to 4095 • 16 bit resolution 216 65536 states from 0 to 65535 Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Gain • Internal amplification in the ADC • Input voltage is amplified the ‘gain’ times and supplied to the AD converter • Why bother? • Gain is used to improve the resolution of ADC conversion for lower voltage signals • Example – Voltage of 2V measured with the gain of 4 would appear to the ADC as 8V • Low level ADC boards with the high gain (eg 500) are used for low sensitivity transducers such as thermocouples (eg full range +/-10V/500 = 20mV) ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC ADC - Voltage range (span) • Bi-polar, eg. +/-10V • Uni-polar, eg. 0-5V • The range is divided into the 2resolution number of states, eg 212 = 4096 • Bi-polar +/-10V, 12 bit resolution Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Offset binary coded ADC • The lowest voltage of the range is mapped to 0 by the ADC • The highest voltage is mapped to 2bit_ resolution 10V 4096 = 212 0V 2048 -10V Voltage 0 Digital values ‹#› Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Example – offset binary coding • A bi-polar ADC with the voltage range of +/-10V, 12 bit resolution and the gain of one returns a digital value (DV) of 2500. What is the voltage? • Voltage span is 20 V (from –10V to 10V) • Number of states is 4096 (212) • -10V correspond to the DV of zero • 10V correspond to the DV of 4096 • 0V corresponds to 2048 (4096/2) DV 2048 10 2048 2500 2048 Voltage 10 2.207V 2048 Voltage Dr Michael Sek – Signal characteristics: rms, power, dB; ADC Conversion of DV to voltage • Various forms of conversion DV 2048 10 or 2048 Specific cases 20 Voltage DV 10 or 4096 Span Voltage resolution DV lowest voltage 2 Span DV lowest voltage resolution 2 Voltage gain Voltage ‹#›