使用CC2591作为CC2530的功放
使用CC2591作为CC2530的功放, CC2591 PAThe absolute maximum ratings and operating conditions listed in the CC2530 datasheet [1]and the CC2591 datasheet [4] must be followed at all times. Stress exceeding one or more ofthese limiting values may cause permanent damage to any of the devicesNote that these characteristics are only valid when using the recommended register settingspresented in Section 4.6 and in Chapter 8, and the CC2530 - EM reference designOperating Frequency240524835MHzOperating Supply Voltage2036VOperating Temperature-40CTC=25C, VDD=3.0V, f=2440 MHz if nothing else is stated. All parameters are measuredon the CC2530-Cc2591EM reference design [11] with a 50 Q2 loadReceive CurrentWait for sync, -90 dBm input levelWait for sync, -50 dBm input level24mATXPOWER OXE5166mATXPOWER OXD5149mATXPOWER OXC5138mATXPOWER OXB5127mATransmit currentTXPOWER OXA5115ATXPOWER = 0X95100mATXPOWER = 0X8594ATXPOWE=0×75mATXPOWE=0×6579APower Down Current PM2UAISTRUMENTSPage 3 of 19SWRA308ATC=25C, Vdd=3.0V, f= 2440 MHz if nothing else is stated. All parameters are measuredon the CC2530-CC2591 EM reference design with a 50 Q2 loadReceive Sensitivity HGM 1 %PER, IEEE 802. 15.4[6] requires -85 dBm-988dBmReceive Sensitivity LGM1 PER, IEEE 802. 15.4 [6] requires -85 dBm-90.4dBmSaturationlEEE 802.15. 4 [6] requires-20 dBm10dBmWanted signal 3 db above the sensitivity levelIEEE 802.15.4 modulated interferer at ieee 802.15.4 channelsInterferer Rejection+5 MHz from wanted signal, IEEE 802. 15. 4 [6] requires 0 dBdB+10 MHz from wanted signal, IEEE 802. 15. 4 [6] requires 30 dB49dB+20 MHz from wanted signal wanted signal at- 82d BmdBdue to in the external lna and the offset in cc2530 the rssi readouts from cc2530CC2591 is different from rssi offset values for a standalone cc2530 design the offsetvalues are shown in table 4.4High Gain Mode79LoW Gain mode67Real rssi Register value-Rssl offsetISTRUMENTSPage 4 of 19SWRA308ATc=25C, Vdd=3.0V, f=2440 MHz if nothing else is stated All parameters are measuredon the CC2530-CC2591 EM reference design with a 50 Q2 load Radiated measurements aredone with the kit antennaRadiated Emissionwith TXPOWer Oxe5Conducted 2. RF (FCC restricted band)-462|dBmConducted 3. RF(FCC restricted band46.5 dBmComplies withFCC 15.247. SeeChapter 7 for moredetails about regulatoryRadiated 2.RF(FCC restricted band)42.2dBmrequirements andcomplianceIEEE 802.15.4[6]requires max.35%%Measured as defined by IEEE 802.15. 4 6TXPOWER OxE5. f= EEE 802.15. 4 channels13TXPOWER= OXD5. f= EEE 802.15.4 channelsTXPOWER= OXC5 f= EEE 802.15.4 channelsMax error∨ ectorTXPOWER OxB5 f= IEEE 802.15. 4 channelsMagnitude(EVM)TXPOWER OxA5. f= IEEE 802.15.4 channelsTXPOWER 0X95. f= IEEE 802. 15.4 channels643333%%%%%%%TXPOWER= 0x85. f= iEEE 802. 15.4 channelsTXPOWER =0x75 f= IEEE 802. 15.4 channels%TXPOWER= 065. f= iEEE 802. 15.4 channelsThe RF output power of the CC2530- CC2591 EM is controlled by the 7-bit value in theCC2530 TXPOWER register. Table 4.6 shows the typical output power and currentconsumption for the recommended power settings The results are given for Tc= 25 C, Vdd3.0V and f= 2440 MHz, and are measured on the cC2530-CC2591 EM reference designwith a 50 Q2 load. For recommendations for the remaining CC2530 registers, see Chapter 8 oruse the settings given by SmartRF StudioOXE520166OxD519149OxC18138OxB517127OxA5161150x95141000x8513940X75860x651079Note that the recommended power settings given in Table 4.6 are a subset of all the possibleTXPOWER register settings. However, using other settings than those recommended mightINSTRUMENTSPage 5 of 19SWRA308Aresult in suboptimal performance in areas like current consumption, EVM, and spuriousemissionTc=25C, Vdd=3.0V, f=2440 MHz if nothing else is stated All parameters are measuredon the CC2530-CC2591EM reference design with a 50 32 load2221-2V201918171611121314151617181920212223242526251510OxE5OxC5OxA50X850x65540-30-20-1001020304050607080ISTRUMENTSPage 6 of 19SWRA308A98Avg 3.6VAva 3vAvg 2V110111213141516171819202122232425261023.6V-1062V-110-40-30-20-100102030405060708070604020-Wanted signal at:-82 dBm10ISTRUMENTSPage 7 of 19SWRA308ACC2530-CC2591EM High Gain ModeC C2530-CC2591EM Low Gain Mode- CC2530EM40000-100110100908070-60-50-40-30-20-100The IEEE standard 802.15. 4 [8] requires the transmitted spectral power to be less than thelimits specified in table 4.7If-fc>3.5 MHz-20 dB-30 dBmThe results below are given for Tc=25 C, Vdd=3.0V and f= 2440 MHz, and are measuredon the CC2530-CC259 1EM reference design with a 50 Q loadIEEE absoluteChannel 182432.52435243752442524452447.5ISTRUMENTSPage 8 of 19SWRA308AOnly a few external components are required for the CC2530-CC2591 reference design. Atypical application circuit is shown below in Figure 5.1. Note that the application circuit figuredoes not show how the board layout should be done. The board layout will greatly influencethe RF performance of the CC2530-CC2591EM. TI provides a compact CC2530CC2591 EM reference design that it is highly recommended to follow. The layout, stack-upand schematic for the CC2591 need to be copied exactly to obtain good performance. Notethat the reference design also includes bill of materials with manufacturers and part numbersL102 L10=TI INF inductorVDD13cc2530LA 1RF PANTCC2591 RF NFNPA EN(P1 1)i工工I NA FNP:1HGM ENPO 7)T:1Proper power supply decoupling must be used for optimum performance. In Figure 5.1, onlythe decoupling components for the CC2591 are shown. This is because, in addition todecoupling, the parallel capacitors C11, C101, and C131 together with, L101, L102, TL11TL101 and TL131 also work as RF loads. These therefore ensure the optimal performancefrom the CC2591. C161 decouples the AvDD blAs power.The placement and size of the decoupling components, the power supply filtering and thePCB transmission lines are very important to achieve the best performance Details about theimportance of copying the CC2530-CC2591EM reference design exactly and potentialconsequences of changes are explained in chapter 6The RF input/output of CC2530 is high impedance and differential. The CC2591 includes abalun and a matching network in addition to the PA, LNa and RF switches which makes theinterface to the CC2530 seamless. Only a few components between the CC2530 andCC2591 necessary for RF matching For situation with extreme mismatch(VSWR 6: 1 till 12: 1out-of-band as shown in Figure 6.2) it is recommended to include all the components asshown in Figure 5.1ISTRUMENTSPage 9 of 19SWRA308ANote that the PCB transmission lines that connect the two devices also are part of the RFmatching. It is therefore important to copy the distance between the devices, the transmissionlines and the stack-up of the PCB according to the reference design to ensure optimumperformanceThe network between the CC2591 and the antenna(L111, C112, C111 C113 and L112matches the CC2591 to a 50 2 load and provides filtering to pass regulatory demands. C111also works as a dc-blockR151 is a bias resistor the bias resistor is used to set an accurate bias current for internaluse in the cc2591The TI reference design contains two antenna options. As default, the Sma connector isconnected to the output of CC2591 through a 0 Q2 resistor. This resistor can be soldered offand rotated 90 clockwise in order to connect to the PCB antenna, which is a planar invertedF antenna(PIFA). Note that all testing and characterization has been done using the SMAconnector. The PCB antenna has only been functionally tested by establishing a link betweentwo EMs. Please refer to the antenna selection guide [6] and the Inverted F antenna designnote [7 for further details on the antenna solutionsISTRUMENTSPage 10 of 19SWRA308A
- 2020-11-30下载
- 积分:1
Building Trading Bots Using Java [2016]
Building Trading Bots Using JavaEnglish | 6 Jan. 2017 | ISBN: 1484225198 | 300 Pages | PDF | 6.22 MBBuild an automated currency trading bot from scratch with java. In this book, you will learn about the nitty-gritty of automated trading and have a closer look at Java, the Spring Framework, event-Building Trading Bots Using Javahekhar VarshneyGrangesSwitzerlandISBN13(pbk):978-1-4842-2519-6ISBN-13(electronic): 978-1-4842-2520-2DOI10.1007/978-1-4842-2520-2Library of Congress Control Number: 2016961228Copyright o 2016 by Shekhar VarshneyThis work is subject to copyright All rights are reserved by the Publisher, whether the wholeor part of the material is concerned, specifically the rights of translation, reprinting, reuse ofillustrations, recitation, broadcasting, reproduction on microfilms or in any other physicalway, and transmission or information storage and retrieval, electronic adaptation, computersoftware, or by similar or dissimilar methodology now known or hereafter developedTrademarked names, logos, and images may appear in this book. Rather than use a trademarksymbol with every occurrence of a trademarked name, logo, or image we use the names, logos,nd images only in an editorial fashion and to the benefit of the trademark owner, with nointention of infringement of the trademarkThe use in this publication of trade names, trademarks, service marks, and similar terms, even ifthey are not identified as such, is not to be taken as an expression of opinion as to whetheror notthey are subject to proprietary rightsWhile the advice and information in this book are believed to be true and accurate at thedate of publication, neither the authors nor the editors nor the publisher can accept any legalresponsibility for any errors or omissions that may be made. The publisher makes no warranty,express or implied, with respect to the material contained hereinManaging Director: Welmoed SpahrLead Editor: Steve AnglinEditorial Board: Steve Anglin, Pramila Balan, Laura Berendson, Aaron Black, Louise Corrigan,Jonathan gennick, Robert Hutchinson, Celestin Suresh John, Nikhil KarkalJames Markham, Susan McDermott, Matthew Moodie, Natalie Pao, Gwenan SpearingCoordinating Editor: Mark PowersCopy Editor: Kezia EndsleyCompositor: SPi GlobalIndexer: SPi GlobaArtist: SPi GlobalDistributed to the book trade worldwide by Springer Science+ Business Media New York,233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505e-mailorders-ny@springer-sbm.comorvisitwww.springeronline.com.ApressMedia,Llcisa California LlC and the sole member(owner) is Springer Science Business Media FinanceInc(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporationForinformationontranslationspleasee-mailrights@apress.comorvisitwww.apress.comApress and friends of ed books may be purchased in bulk for academic, corporate, or promotionaluse eBook versions and licenses are also available for most titles For more information referenceourSpecialbUlkSales-ebookLicensingwebpageatwww.apress.com/bulk-salesAny source code or other supplementary materials referenced by the author in this text areavailabletoreadersatwww.apress.com.Fordetailedinformationabouthowtolocateyourbookssourcecodegotowww.apress.com/source-code/.ReaderscanalsoaccesssourcecodeatSpringerlink in the Supplementary Material section for each chapter.Printed on acid-free paperedicated to the angels in my lifemy mother, my wife Preshita, and my two daughters Mihika and anyaLast but not the least, my college professor, Dr. Rajat Moona,who sowed the seeds of computer programming in my dnaContents at a glanceAbout the authorChapter 1: Introduction to Trading Bota.Chapter 2: Account Management27Chapter 3: Tradeable Instruments47Chapter 4: Event Streaming: Market Data EventsChapter 5: Historic Instrument Market Data aeEERaar75Chapter 6: Placing Orders and trades97Chapter 7: Event Streaming: Trade/Order/Account Events159Chapter 8: Integration with Twitter aamna■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■175Chapter 9: Implementing Strategies.am.203Chapter 10: Heartbeating ammmmmmmmmmmn 219Chapter 11: E-Mail Notifications ammmmatmmammmmmmmnmamman 231Chapter 12: Configuration, Deployment, and Running the Bot 243Chapter 13: Unit Testing■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■口■■■■■263Index…277ContentsAbout the author,i币Chapter 1: Introduction to Trading Bot m mmmemmIRD■■■■■■■■■■■■■■■■■■■■■■■■■What Is a Trading Bot?Why do We need a trading bot?...3The capabilities of the Trading BotDesign goalsCode organization and software Stack Used .OANDA REST API as Reference Implementation.m....ammann. 8Opening an oanda practice Account80 ANDA JS0 N Keys…………Constructor Dependencies for OANDA Implementations15Event-Driven architectureG0 ogle eventBus…18Provider helper Interface20Trading Config class.........mmonann......mtnonnn.......tnn 22Obtaining the Source Code.aaeeaaaee... 24Try It Yourself section..aaaaaa.. 24Chapter 2: Account Managementa27Account provider interface31A Concrete Implementation for AccountDataProvider32Encapsulating Everything Behind a Generic AccountlnfoService37Try It yourself43VIlCONTENTSChapter 3: Tradeable Instruments47InstrumentA Concrete Implementation for InstrumentDataProvider52Encapsulating Everything Behind a Generic Instrumentservice56Try It yourself58Chapter 4: Event Streaming: Market Data Events mmmmmmmmmm. 61Streaming Market Data Interface.A Concrete Implementation for MarketData StreamingService .m..63Downstream Market data event disseminationMarketEventcallback……69Try It Yourself,…70Chapter 5: Historic Instrument Market Data mmmmmmmm 75How to read a candlestick75Enum Defining the Candlestick Granularity76Define pojo to hold candlestick information77Historical Data Provider Interface79A Concrete Implementation for HistoricMarketDataProvidern81Discussion An Alternate Database Implementation85Candlesticks for Moving Average Calculations....88MovingAverage calculation Service89Try lt YourselfChapter 6: Placing Orders and Trades■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■97Order pojo definition98Order Management provider Interface101A Concrete Implementation for Order ManagementProvider,103A Simple orderInfoService,115CONTENTSValidating Orders Before Execution: PreOrderValidationService... 116Putting It All Together in an OrderExecution Service .mmmm... 121Trade pojo definition124Trade Management provider Interface127A Concrete Implementation for TradeManagementProvider129Encapsulating Read Operations Behind TradelnfoService.....m. 136Try It yourself144Chapter 7: Event Streaming: Trade/order/Account Events m 159Streaming Event Interface161A Concrete Implementation for Events StreamingService162Try It Yourself171Chapter 8: Integration with Twitter■■■■■■■■■■■■■■■■■■■■175Creating a Twitter Application175Spring Social180Using and Configuring Spring Social180Harvesting FX Tweets181Tweetharvester Interface wmmm. 185XTWeethandler Interface,,,………AbstractFxtweethandler base class186User-Specific TweetHandlersTry lt Yourself.Chapter 9: Implementing Strategies.aa203Copy Twitter Strategy204Fade the Move Strategy210Try It Yourself214CONTENTSChapter 10: Heartbeating ammammmmmmmmmmmmmmm 219HeartBeatPayload. ..m......m. 219Streaming the Heartbeat Interface220A Concrete Implementation for HeartBeatstreamingService221HeartBeatcallback Interface223DefaultheartBeatservice223Try It Yourself226Chapter 11: E-Mail notifications n231Notification Design.EmailPayLoad poJoEmailContentgenerator interface……232Sample Implementations.EventEmailNotifier service mm...m. 235Try It Yourself.237Chapter 12: Configuration, Deployment, and running the bot m 243Configuring the Trading Bot243Core Beans configuration244Twitter-Related Beans Configuration.....................247Provider Beans Configuration248Strategies configuration…254Services Configuration254Building the Bot...,,,,,…,,……256Running the bot.....,,……259CONTENTSChapter 13: Unit Testinga263Using Mockito as a Mocking Framework.Mocking Http iNteraction..............m....................e........................ 264Mocking Streams.The versatile verify Mockit0…....,.,,…271Mocking Twitter Interaction .EclEmma Code Coverage Tool for Eclipse ide.nDDDDDDDDDm274Index■■■■■■■■■■■■■■■■■■■口En277
- 2020-12-07下载
- 积分:1