DATASHEET SEARCH SITE | WWW.ALLDATASHEET.COM

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 14

Technical content

to select a transmit frequency, and select optimal frequencies because all channels in the band can be evaluated. antenna. This received power is referred to as the Receive Noise Level (RNL).

  1. Algorithms for Selecting Candidate Channels

candidate stations using this method. Figure 1. Selecting Stations Using Minimum Noise Level in Five FM Frequency Bands

illustrates an RPS spectrum (in red) along with the averaged noise level spectrum (in black). Figure 2. Selecting Stations Using Average Minimum Power in Five FM Frequency Bands

Rev. 0.2 3 3. RPS Algorithm Implementation This section provides pseudocode for the algorithms for implementing the RPS scan algorithms discussed previously. In order to determin e the noise level at a given frequency the Si 4712/13/20/21 function TX_TUNE_MEASURE is called with the desired frequency. The results are read using the TX_TUNE_STATUS command. The GET_INT_STATUS command must be performed between sending the TX_TUNE_MEASURE command and reading the TX_TUNE_STATUS to ensure that the measurement has completed. The measurement completion is indicated by the Seek Tune Complete (STCINT) bit. Pseudocode for this algorithm is shown below. TCL code that demonstrates scanning the entire US FM band is included as Appendix A. This code allows the number of filter taps and the number of bands to break the scan into to be set via variables. It is straightforward to modify this code to use a single RNL measurement when choosing the minimum noise level rather than the filtered (averaged) version. This algorithm requires the host to maintain 3 arrays: the filter values to average (e.g. 3, 5 or more consecutive measurements), the filter coefficients (3, 5, or more matc hing the filter width), and the list of minimal values found per FM frequency range. INIT FilterData to {0 0 0 0 0} //FilterData array holds the noise values of the current, adjacent, // alternate channels. The values are arranged in the array as: INIT FilterCoefficients to {1 1 2 6 2} //FilterCoefficients array holds the filter coefficients for weighing //the value of each channel in the average. INIT Minima to {0 0 0 0 0} //Minima array stores the frequency with the lowest averaged noise //level for each of the 5 bands. INIT ChannelsPerBand to ( number of channels in the FM band) / ( number of bands ) //ChannelsPerBand stores how many FM channels exist //in each of the bands FOR each i = ( number of channels in the FM band + ( FilterWidth / 2 ) ) //Scan the entire FM band SET CurrentChannel to ( StartingFreq + ( i * ChannelSpacing ) ) SET CurrentBand to ( i / ChannelsPerBand ) SET FilterPointer to ( i MODULUS ( FilterWidth ) ) //FilterPointer indicates the location in FilterData to fill //with the next noise level reading IF CurrentChannel > (top of the FM band) SET FilterData at FilterPointer to 0 ELSE //Tune and measure the noise level CALL TX_TUNE_MEASURE with CurrentChannel and 1 REPEAT CALL GET_INT_STATUS UNTIL SEEK TUNE COMPLETE SET MeasuredRNL to ( CALL TX_TUNE_STATUS with 0 ) SET FilterData at FilterPointer to (MeasuredRNL) IF i > ( FilterWidth / 2)

4 Rev. 0.2 //If half of the filter has been filled with noise level values, //calculate the average noise level SET AverageFreq to ( StartingFreq + ( i - ( FilterWidth / 2 ) ) * ChannelSpacing ) SET NewAverage to 0 SET FilterWeighting to 12 //Multiply the noise levels by with filter weight coefficients FOR each j = 0 to FilterWidth SET Index to ( ( j + FilterPointer ) MODULUS FilterWidth ) SET NewAverage to ( NewAverage + ( FilterData at Index ) * ( FilterCoefficients at j ) ) IF ( FilterData at Index ) = 0 SET FilterWeighting to ( FilterWeighting - ( FilterCoefficients at j ) ) SET NewAverage to ( NewAverage / FilterWeighting ) IF NewAverage < ( Minima at CurrentBand ) SET ( Minima at CurrentBand ) to NewAverage //Record the lowest noise level in the current band

8 Rev. 0.2 5. Conclusion The RPS algorithm provides a robust solution for select ing optimal FM transmit fr equencies. Selection can be based upon minimum noise level or averaged minimum noise level. Dividing the FM b and into smaller divisions prevents environmental noise from dominating the select ion criteria. The RPS algorithm is easily implemented on the host and is flexible enough to accommodate memory-constrained applications. In strong, weak, and multipath signal environments, RPS consistently selects two to four stations that show good performance. By automating the frequency selection process, users can easily transmit on the optimal frequencies without any manual scanning.

Rev. 0.2 9 APPENDIX A: TCL IMPLEMENTATION OF RPS TCL code that demonstrates scanning the entire US FM ba nd is show below. Refer to Section 3 of this document for more information. #This example will find the minimum power for a FM channel. #it will calculate the average power based on a weighted average spanning +/-N channels. # Variables used to configure the operation of the scan # These variables define the FM band characteristics # startFreq - The lower end of the FM band (in 10kHz steps) # endFreq - The upper end of the FM band (in 10kHz steps) # spacing - channel spacing: 50kHz, 100kHz, 200kHz (in 10kHz steps) # numBands - Breaks the FM band into a number of smaller bands. The min power is found # in each of these frequency bands. # filterWidth - sets the width of the FIR filter in channels # filter - an array of filterWidth elements which is used to compute the average # coeff - an array of filter coefficients for weighing the value of each channel # in the average. The coefficients are listed in the following order # filterWeight- The scaling factor used to normalize the summed coefficient terms # This term is optional and is only required to normalize results between a single # RNL measurement and the averaged RNL measurements. # Calculating the filter in place with the proper weighting is done as follows: # filterPtr is the location where the next sample is placed in the FIR array and is calculated by # taking the current loop number modulo the filterWidth. The channel whose average power is being # calculated is located at a frequency filterMid steps lower than the current frequency. To ensure # that the measured RNL is averaged with the proper coefficients consider the following case: # freq array A B C D E # ^ ^ # fltPtr chan N # N+2 N-2 N-1 N N+1 # coeff 1 1 2 6 2 # filterPtr always points to N+2 so when weighting the filter values with the coefficients, we can # pull the N+2 coefficient from the coefficient array location 0, and start pulling measurements # from the filter at the filterPtr location. By incrementing filter pointer and taking the modulo we # ensure that we always pull the filter elements in the order that the coefficents are stored in the # coeff array. set startFreq 8750 set endFreq 10790

10 Rev. 0.2 set spacing 20; #channel spacing set numBands 5; # number of bands to find best channel set filterWidth 5; # number of channels to average set numChans [expr ($endFreq - $startFreq) / $spacing] set chanBand [expr $numChans / $numBands + 1] set filterMid [expr $filterWidth / 2]; #offset from current freq to middle of filter set minAvg 100 array set filter { 0 0 1 0 2 0 3 0 4 0 array set bandMin { 0 {0 1000} 1 {0 1000} 2 {0 1000} 3 {0 1000} 4 {0 1000} #FIR Filter coefficients array set coeff { 0 1 1 1 2 2 3 6 4 2 set filterWeight 12 ;#Normalization number is 1+1+2+6+2 = 12 #Add an additional 1/2 filter bins to the upper end to make #averaging easier for {set i 0} {$i <= $numChans + $filterMid} {incr i 1} { set currentFreq [expr $startFreq + $i * $spacing] set freqBand [expr $i / $chanBand] set filterPtr [expr $i % $filterWidth] #Handle the top of the band by filling extra array locations with 0 set filter($filterPtr) 0 ;#pack upper 1/2 of filter with 0 at top of band } else { txTuneMeasure $currentFreq 0 while {![expr [getIntStatus] & 0x1]} { after 1 array set measure [d::txTuneStatus 1] set filter($filterPtr) $measure(rnl) #Don't calculate average for lower channels until 1/2 of filter is full set avgFreq [expr ($startFreq + ($i - $filterMid) * $spacing)] set newAvg 0 set filterWeight 12

Rev. 0.2 11 set index [expr (($j + $filterPtr) % 5)] set newAvg [expr $newAvg + $filter($index) * $coeff($j)] #Adjust filter weight for empty taps if { $filter($index) == 0 } { incr filterWeight [expr $coeff($j) * -1] set newAvg [expr $newAvg / $filterWeight] if {$newAvg <= [lindex $bandMin($freqBand) 1]} { set bandMin($freqBand) [list $avgFreq $newAvg]

12 Rev. 0.2 APPENDIX B: FREQUENTLY ASKED QUESTIONS Q: Why does RPS performance vary between some vehicles? A: The amount of FM signal attenu ation can vary between ve hicles depending on the chassis, construction materials, FM receiver antenna placement, and Si4 712/13/20/21 placement. For vehicles that show high chassis attenuation, placing the Si4712/13/20/21 closer to the FM receiver antenna (such as on the dashboard) may improve performance. Q: Can the RPS algorithm identify more or fewer candidate frequencies? A: The variable numBands determines how many bands the FM spectrum will be divided into. The default value is 5, but it may be increased or decreased. Q: How can the amount of memory required to implement RPS on the host be reduced? A: The algorithm is already optimized to use the least amount of memory possible and maximize performance. The filter size (filterWidth) may be reduced to three so that the averaging includes only ±1 channels. For further memory reduction, the averaging can be omitted such that the algorithm selects the minimum noise level in each band. Reducing or removing the averaging may redu ce performance with receivers that suffer from poor performance due to blockers at either adjacent (N±1) or alternate channels (N±2). Q: What is the benefit of using filter weighting? Can the filter weighting coefficients all be 1? A: Filter weighting extends the RPS algorithm to consid er both adjacent (N±1) and alternate channels (N±2), in addition to the current channel (N ). The noise level of the current channel will have the most effect on performance, so it is scaled by 6. The adjacent channel noise levels will have a smaller effe ct, so they are scaled by 2. Alternate channels will have even less effect, so they are scaled by 1. If the Minimum Averaged Noise Level RPS algorithm is used, it is important to use th e correct filter weighting coefficients. Since the current, adjacent, and alternate channels have different effects on performance, the coefficients should vary.

Rev. 0.2 13 DOCUMENT CHANGE LIST Revision 0.1 to Revision 0.2  Updated title.

Silicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products must not be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are generally not intended for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Trademark Information Silicon Laboratories Inc., Silicon Laboratories, Silicon Labs, SiLabs and the Silicon Labs logo, CMEMS®, EFM, EFM32, EFR, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZMac®, EZRadio®, EZRadioPRO®, DSPLL®, ISOmodem ®, Precision32®, ProSLIC®, SiPHY®, USBXpress® and others are trademarks or registered trademarks of Silicon Laboratories Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders. http://www.silabs.com Silicon Laboratories Inc.

400 West Cesar Chavez

Austin, TX 78701 USA Smart. Connected. Energy-Friendly Products www.silabs.com/products Quality www.silabs.com/quality Support and Community community.silabs.com