Upload
trinhdat
View
222
Download
3
Embed Size (px)
Citation preview
Sound card as digital signalprocessor for Doppler sodar
Prof. M. Purnachandra RaoHead, Department of Systems Design
ANDHRA UNIVERSITYVisakhapatnam-530003
It is said..
Just as the 19th century belongedto coal and the 20th century to oil,the 21st century will belong to thes n the ind and energ fromsun, the wind, and energy fromwithin the earth.
American Wind Energy Association
Survey
A worldwide survey of wind energyindicated that harnessing one fifth ofthe earth’s available wind energy wouldgyprovide as much as seven timeselectricity the world currently uses.
Wind energy principle
The usage of wind energy is essentiallythe usage of the kinetic energycontained in an atmospheric volumeth t th h th t lthat passes through the rotor planeduring a certain time interval.
First wind turbine
The first electricity generating wind turbine,was a battery charging machine installed in July1887 by Scottish academic James Blyth to lighthis holiday home in Marykirk (Scotland).
Wind energy
Some months later, American inventor Charles F.Brush built the first automatically operated windturbine for electricity production in Cleveland,Ohio.
Wind farm
A wind farm is a group ofwind turbines in the samelocation used to produceelectric power. A largewind farm may consist ofseveral hundred windturbines, and cover anextended area ofhundreds of square km.
The land between the turbines may be used foragricultural or other purposes.
Wind farms - Types
Onshore Offshore
Onshore wind farms - Trends
Onshore wind energy represents more than10% of the electricity consumed in someregions of Denmark, Spain, Germany orS d It’ th th l t d dSweden. It’s growth over the last decadehas been spectacular. Most of thiselectricity is produced by large turbines.
Offshore wind farms - Trends
Trends point to a growing importance of theoffshore wind energy segment. Most of thehighest goals on renewable energy productionare based on offshore wind systems involvingare based on offshore wind systems, involvinglarge numbers of mega-turbines and largescale resources and investments.
Onshore versus offshore wind farms
Onshore wind farms are often subject torestrictions and objections: Objections based ontheir negative visual impact or noise, restrictionsassociated with obstructions (buildings,mountains, etc.), land-use disputes or limitedavailability of lands.availability of lands.
These reasons may explain part of the growingimportance of offshore systems, but part of theexplanation concerns genuine advantages of theoffshore turbines, namely higher and moreconstant wind speeds and, consequently, higherefficiencies.
Advantages of onshore wind farms
Cheaper foundations
Cheaper integration with the electrical-grid network
Cheaper installation and access duringCheaper installation and access duringthe construction phase
Cheaper and easier access foroperation and maintenance
Wind energy in USA
Many of the largest operational onshore wind farmsare located in the USA. 3% of nation’s electricity isgenerated from the wind.
World’s largest onshore wind farms
Wind farm Capacity (MW) CountryRoscoe 781.5 USAHorse Hollow 735.5 USAAlta 720 USACapricorn Ridge 662.5 USAFlower Ridge 599.8 USASweetwater 585.3 USABuffalo Gap 523.3 USAMeadow Lake 500 USADabancheng 500 ChinaPanther Creek 458 USA
World’s largest proposed onshore wind farms
The largest wind farm under construction isthe 845 MW Shepherds Flat Wind Farm inOregon, USA.
The largest proposed project is the 20,000g p p p j ,MW Gansu Wind Farm in China.
USA Wind Farm Growth
USA Wind Farms – Mid-Atlantic wind energy areas
In a bid to helplaunch offshore windpower in the USA,the Administrationsaid on February 2,said on February 2,2012 that it wasmoving forward tolease four areas offthe Mid-Atlanticcoast.
UK Wind Farm
Onshore and Offshore wind farms in UK.
UK Wind Farm Growth
Total wind power installed in the world
Wind farms in other countries
Wind farms in other countries (contd..)
Wind farms in other countries (contd..)
Indian scenario
The Indian wind energy sector has an installedcapacity of 14,158 MW (as on March 2011)
In terms of wind power installed capacity, Indiais ranked 5th in the world.
Indian Wind Energy Association has estimatedthat with the current level of technology, theonshore potential for utilization of wind energyfor electricity generation is of the order of65,000 MW.
The unexploited resource availability has thepotential to sustain the growth of wind energysector in India in the years to come.
Indian scenario
Indian scenario
Indian scenario
Wind power growth in India
Clouds forming in the wakes of the front row of wind turbines atHorns Rev in the Black Sea off the Denmark coast
Wind resources
Before a wind energy facility can be constructed,developers need to determine the wind resourceof the site with a high degree of certainty.
The wind resource map of a region is a tool usedby many developers to identify prospectiveby many developers to identify prospectiveproject sites.
The wind map provides site-specific estimates ofwind speed and direction characteristics thatcan be used to predict the annual output of aproposed wind energy project.
Meteorological Masts and Towers
Installing meteorological towersand masts allows the developerrecord wind speed, wind direction,gusts, etc which can be used tocharacterize the long-term windresources at the site.
The masts and towers come in avariety of heights up to 100 m.
The cup anemometers and windvanes are installed at five or sixheights on the masts forcontinuous measurements.
Wind measurementsThe wind data is used to select the appropriateturbine for the site, optimize the turbine layout ofthe farm, and predict the energy production.
As turbines grow in height, mast instrumentation,erection and maintenance have becomeexpensive; prices increase with height.
At the same time, the discrepancies between themeasured wind at the rotor centre and theturbine performance have increased the need fordetermining the wind over the entire turbinerotor.
Wind measurements
Power law index
u/ur = (z/zr)αr ( r)
Inventor of Doppler effect
Christian Andreas Doppler (Austria), 1842
Born: November 29, 1803
Salzburg, Austria
Died: March 17 1853Died: March 17, 1853
Venice, Italy
Nationality: Austria
Doppler effect
A source of waves movingto the left The frequencyto the left. The frequencyis higher on the left thanon the right.
Doppler effect equation
Applications of Doppler effect
Doppler radar
Doppler sodar
Doppler lidar
Doppler sonar
Proximity fuse
Echocardiogram
Doppler radar
Object detection
The antenna transmits the energy. The signal is intercepted by thetarget and a tiny part of it comes back to the antenna. This isdetected and analyzed to get the characteristics of the target.
Doppler sodar
SOund Detection And Ranging
Provides wind vector profiles up to about1000 m for every 30 m height and for every 2min time, and displays temperaturestructure.
�Monostatic�Bistatic
Monostatic single-axis sodar
Monostatic single-axis Doppler Sodar (tilted)
Bistatic single-axis sodaraxis sodar
Bistatic tri-axial sodar
Monostatic tri-Axial sodar
Monostatic sodar built at Andhra University
Power supply unit
Power supply unit (±5 V)
Block diagram of a typical clock circuit
It oversees the timing and control of all the subsystems in thetransmission, reception and display.A highly stable crystal oscillator was always the best choicefor the clock circuit. A typical clock circuit involves a crystaloperating at any frequency ranging from a few tens of KHz toa few MHz.Several divide-by-counters are usually employed to derive allother frequencies.
Control unit
Tone-burst generator
Preamplifier & T/R switch
Active filter unit
Amplifier and detector unit
Facsimile recorder schematic
Antenna assembly
Parabolic antenna
Parabolic antenna
Electronic and facsimile recording units
Block diagram of thetri-axial monostatic
sodarsodar
Block diagram of a typical transmit-frequency generator
The transmitter subsystem typically consists of threechannels to generate the three transmit frequencies. Eachchannel contains a suitable divide-by counter and a wave-shaping circuit. A frequency-selective switch along with anelectronic gate is employed for the transmission of therequired frequency. The gate is controlled by the timingsignal from the clock circuit.
Circuit diagram of the transmitter subsystem
The circuit diagram of the three-frequency generation.
Block diagram of the receiver subsystem
Circuit diagram of the receiver subsystem
Antenna assembly of the tri-axial monostatic sodar
Another view of the antenna assembly
Electronic and other sub-units
AVR-32 DSP card with TMS320C32 processor
Architecture of AVR-32 DSP card
AVR-32 DSP card specifications
•TI TMS320C32 DSP at 60 MHz•512 K SRAM•512 K flash memory•Xilinx Virtex FPGA•4-Channel high-speed ADC (6 MHz,12-bit)g p ( , )•2-Channel DAC (25 MHz, 12-bit)•Direct Digital Synthesizer•Digital I/O•PCI Master / Slave Interface•Software (assembler, debugger, device drivers for Windows,FPGA and DSP support utilities, DAQ and signal display programs
Generation of transmission frequencies
Adlib sound card with manual volume control
Typical ISA bus sound card
Typical PCI bus sound card
Typical PCI-E bus sound card
Photograph of a typical USB sound card
Photograph of a typical PCMCIA bus sound card
Photograph of a typical IEEE 1394 (Firewire) sound card
Sound card features
The most basic four components are:
•ADC
•DAC
•PCI interface to the motherboard•PCI interface to the motherboard
•Input and output connections for microphone and speakers
Block diagram of a typical sound card
Sound Ports for On-BoardSound Card
On-board sound card I/O port
Connection diagram of an add-on sound card
Generation of transmitting signals
Xin (t) = A Sin (2*π*1750*t) + B Sin (2* π*2000*t) +C Sin (2* π *2250*t)
Where A,B,C are the amplitudes of the respective frequencies
+X1(t)
+
+=X2(t)
X3(t) Xin(t) = XI(t) + X2(t) + X3(t)
CPP code for above equation
#define OUT_PUT_BUFFER 800 // No of samples for 100 mSec duration.#define SAMPLE_RATE 8000 // Sampling rate for recording#define Freqn1 1750#define Freqn2 2000#define Freqn3 2250#define GAIN 127
for(int i=0;i<OUT_PUT_BUFFER;i++){
pbuf[i] =BYTE (127 +(GAIN*sin(fAngle1)+GAIN *sin(fAngle2)+GAIN *sin(fAngle3)));fAngle1 += 2*PI*Freqn1/SAMPLE_RATE;if (fAngle1 >2*PI)fAngle1 -= 2*PI;fAngle2 += 2*PI*Freqn2/SAMPLE_RATE;if (fAngle2 >2*PI)fAngle2 -= 2*PI;fAngle3 += 2*PI*Freqn3/SAMPLE_RATE;if (fAngle3 >2*PI)fAngle3 -= 2*PI;
}
Timing
• Sleep
• The Sleep function suspends the execution of the current thread for at least thespecified interval.
• To enter an alertable wait state is SleepEx function.• VOID Sleep( DWORD dwMilliseconds );• waveOutWrite()• The waveOutWrite function sends a data block to the given waveform-audio output
device.
• MMRESULT waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh );
• Remarks• When the buffer is finished, the WHDR_DONE bit is set in the dwFlags member of
the WAVEHDR structure.• The buffer must be prepared with the waveOutPrepareHeader function before it is
passed to waveOutWrite. Unless the device is paused by calling the waveOutPausefunction, playback begins when the first data block is sent to the device.
Thread functioning for synchronization
• UINT ThreadTrFunc(LPVOID pParam)• {• CDocument* disp = (CDocument*) pParam;• disp->m_control.m_sinobj.Start();• disp->m_control.m_recdobj.Start();• for(;;)• {• disp->m_control.m_sinobj.BufferDone();• disp->m_control.m_sinobj.DispTrSignal();• Sleep(100);• disp->m_control.m_recdobj.BufferDone();• }• return 0;• }
Digitization of Audio Signal
• The electrical signal further boosted by an operationalamplifier and fed to the Analog to Digital Converter (ADC).
• On-board sound card acts as codec and it gives digitizedsignals to the application layer.
• On-board sound card offers various ranges of sampling rates,between 8 KHz – 192 KHz.
• To record the digitized samples one need to communicateith th d dwith the soundcard.
• To add the soundcard to the application layer, MicrosoftVisual C++ provides Window Application Interface (WINAPI)calls, and these calls are handled by the Windows operatingsystem at Kernel level of the PC.
• Extra advantage of the WINAPI calls is that we cansynchronize the various thread methods with the API onreturn events.
Digitization of Audio Signal
• The available recording WINAPI calls For Opening and Closing
• WAVEFORMAT
• WAVEFORMATEX
• waveInClose()
• waveInProc()
• waveInOpen()
• waveOutClose()
• waveOutProc()
• waveOutOpen()
Digitization of Audio Signal
• The WINAPI calls for Soundcard Handling
• waveInAddBuffer()
• waveInPrepareHeader()
• waveInReset()
• waveInStart()
• waveInStop()
• waveInUnprepareHeader()
Initializing Sound card for recording
• class WaveFormatIn:public WAVEFORMATEX, public CObject• {• public:• WaveFormatIn ( WORD nCh, DWORD nSampleRate, WORD BitsPerSample)• {• wFormatTag = WAVE_FORMAT_PCM;
• nChannels = nCh;
• nSamplesPerSec =nSampleRate;
• nAvgBytesPerSec = nSampleRate * nCh * BitsPerSample/8;
• nBlockAlign = nChannels * BitsPerSample/8;
• wBitsPerSample = BitsPerSample;
• cbSize = 0;• }
Sampling time and range gates
• The maximum height is defined by the time of the SODAR measurementbackscattered signals.
• To measure up to the height of 680 meters it will take 4.2 seconds of time.
• The SODAR measures the wind speeds at various heights. These heights are alsocalled the range gates.
• The maximum resolution that can be obtained for these range gates by twoformulas.
and
czv 2τ=∆
s
sv fcNz2
=∆
Sampling time and range gates
The total range resolution is the sum of the resolutioncaused by the tone burst and
metercR 172
)100*340(2
=== τδ
The resolution caused by the sampling gate i.e.
metersf
CN
s
52.4316000696320
8000*2)2048*340(
2===
Fast Fourier Transforms (FFT)
∑−
=
−=1
0
][][N
n
mn
NWnxmX
11 2 3 N2048N
/2Where=
= eW Nj
N
π
1-1,2,3....Nm =
9062.320488000 ===
Nfδf s
Here N also defines the spectral resolution
Implementation of FFT
• Total number of samples must be expressed in the form of N=2M
• The input sequence is shuffled through bit reversal
• The number of stages in the flow graph is given by M= log2N
• Each stage consists of N/2 butterflies
• The number of complex multiplication and additions are given as N/2 log2Nand N log2N respectively
• For every N-pint Fast Fourier Transform we’ll get N out put points.
• The result points also is in the combination of Real and Imaginary terms.Hence the power of the each frequency point can be calculated as sqrt (Re*Re + Im * Im)/sqrtPoints
• Here sqrtPoints is defined as sqrt (Points)
CPP code for FFT implementation
void Fft::Transform (){
int step = 1;for (int level = 1; level <= _logPoints; level++){
int increm = step * 2;for (int j = 0; j < step; j++){
Complex U = _W [level][j];f (i t i j i P i t i i )for (int i = j; i < _Points; i += increm){
Complex T = U;T *= _X [i+step];_X [i+step] = _X[i];_X [i+step] -= T;_X [i] += T;
}}step *= 2;
}}
Intensity Plot
• The obtained power is converted into the equivalent Gray Scale.• The Gray Scale for different RGB values is shown in below figure.
RGB(255,255,255)
RGB(240,240,240)
RGB(220,220,220)
RGB(200,200,200)
RGB(140,140,140)
RGB(110,110,110)
RGB(90,90,90)
RGB(50,50,50)
RGB(10,10,10)
RGB(0,0,0)
Real-time data at Andhra University
Power Spectum
• The power spectrum from the range gate i consists of value Rik at frequencies fik(k=1,2,….Ns)
−=
2s
s
sik
NkNff
• Which is the combination of signal and noise. The power spectrum forsubsequent range gates are illustrated belowsubsequent range gates are illustrated below
Labeling of power spectrum values in profile
Y
i=1
k=1
Z
i=m
k=Ns X
Vertical Wind Determination
The Tri-axial SODAR system is capable of determining the Verticalas well as Horizontal wind velocities.
In the process of determining the wind, Doppler shift is crucial taskof the Digital signal process
In order to carryout Doppler shift balancing method is adopted
After detection of Doppler shift one can obtain the Vertical WindVelocity by using following formulaVelocity by using following formula.
Where c is the speed of the sound app.. 340 m/secT
RT
fffcW )(
2−
≈
Echo region identification and peak detection
ctra
l den
sity
Frequency
FMoving Window
δf
Pow
er s
pect
ral d
ensi
ty
The application of the balancing method to determine the approximatelocation of the spectra
Echo region identification and peak detection
∑=
Ns
kikik Rf
f 1)
By applying the balancing method we can localize the Echo region.
To detect the peak ,here first moment integral of the spectrum gives theaccurate (peak) center frequency.
The first moment integral of the spectrum can be defined as
∑=
== Ns
kik
ki
Rf
1
1
valuesspectrumpowerRandpeakspectraltheoffrequencyestimatedisWhere
ikisf
Parabola Fit
• To get more accuracy of the center frequency, the least mean square method isadapted.
• The second order polynomial for least square method can be written as
cbxaxy ++= 2y
Real-time data at Andhra University
Horizontal Wind
• To determine the Horizontal Wind we need uvw components• From the geometry Tri-axial SODAR previous Vertical wind calculation we can
calculate V1,V2,V3 components by applying the balancing method and parabola fit.• Then have to substitute these values in the formula
=
−
2
11
00
00
vv
CosSinSinCos
CosSinCosSin
vu
φφφφ
θθθθ
3
2
1000
1000
vvCosSinCosSin
wv φφθθ
Here Wind Direction =
22 vu +Wind velocity =
−
vuTan 1**2 π
Time-height horizontal wind vector plot of the tri-axial monostatic sodar during a trial run
Time-height horizontal wind vector plot of the tri-axial monostatic sodar during a trial run
Time-height horizontal wind vector plot of the tri-axial monostatic sodar during a trial run
The present workThe bulkiest part of the sodar is theantenna and the acoustic enclosure.
Designing an antenna with light-weightacoustic transducer elements that cansimultaneously produce three beamssimultaneously produce three beamsconsiderably reduces both the size andweight.
Making the acoustic enclosure withlight-weight fibre and other absorbingmaterials reduces its weight.
8x8 Acoustic array antenna with 40piezoelectric elements
8x8 Acoustic array antenna with 40neodymium magnet elements
8x8 Acoustic array antenna with 40 neodymiummagnet elements for another frequency
8x8 Acoustic array antenna with 40piezoelectric elements
8x8 Acoustic array antenna with 40piezoelectric elements under test
8x8 Acoustic array antenna with 40piezoelectric elements under test
8x8 Acoustic array antenna with 40piezoelectric elements under test
g{tÇ~ lÉâ‹g{tÇ~ lÉâ‹