COMP5211_Algorithms_2012 Semester 2_lec1
算法导论课程作业答案
算法导论课程作业答案Introduction to AlgorithmsMassachusetts Institute of Technology 6.046J/18.410J Singapore-MIT Alliance SMA5503 Professors Erik Demaine,Lee Wee Sun,and Charles E.Leiserson Handout10Diagnostic Test SolutionsProblem1Consider the following pseudocode:R OUTINE(n)1if n=12then return13else return n+R OUTINE(n?1)(a)Give a one-sentence description of what R OUTINE(n)does.(Remember,don’t guess.) Solution:The routine gives the sum from1to n.(b)Give a precondition for the routine to work correctly.Solution:The value n must be greater than0;otherwise,the routine loops forever.(c)Give a one-sentence description of a faster implementation of the same routine. Solution:Return the value n(n+1)/2.Problem2Give a short(1–2-sentence)description of each of the following data structures:(a)FIFO queueSolution:A dynamic set where the element removed is always the one that has been in the set for the longest time.(b)Priority queueSolution:A dynamic set where each element has anassociated priority value.The element removed is the element with the highest(or lowest)priority.(c)Hash tableSolution:A dynamic set where the location of an element is computed using a function of the ele ment’s key.Problem3UsingΘ-notation,describe the worst-case running time of the best algorithm that you know for each of the following:(a)Finding an element in a sorted array.Solution:Θ(log n)(b)Finding an element in a sorted linked-list.Solution:Θ(n)(c)Inserting an element in a sorted array,once the position is found.Solution:Θ(n)(d)Inserting an element in a sorted linked-list,once the position is found.Solution:Θ(1)Problem4Describe an algorithm that locates the?rst occurrence of the largest element in a?nite list of integers,where the integers are not necessarily distinct.What is the worst-case running time of your algorithm?Solution:Idea is as follows:go through list,keeping track of the largest element found so far and its index.Update whenever necessary.Running time isΘ(n).Problem5How does the height h of a balanced binary search tree relate to the number of nodes n in the tree? Solution:h=O(lg n) Problem 6Does an undirected graph with 5vertices,each of degree 3,exist?If so,draw such a graph.If not,explain why no such graph exists.Solution:No such graph exists by the Handshaking Lemma.Every edge adds 2to the sum of the degrees.Consequently,the sum of the degrees must be even.Problem 7It is known that if a solution to Problem A exists,then a solution to Problem B exists also.(a)Professor Goldbach has just produced a 1,000-page proof that Problem A is unsolvable.If his proof turns out to be valid,can we conclude that Problem B is also unsolvable?Answer yes or no (or don’t know).Solution:No(b)Professor Wiles has just produced a 10,000-page proof that Problem B is unsolvable.If the proof turns out to be valid,can we conclude that problem A is unsolvable as well?Answer yes or no (or don’t know).Solution:YesProblem 8Consider the following statement:If 5points are placed anywhere on or inside a unit square,then there must exist two that are no more than √2/2units apart.Here are two attempts to prove this statement.Proof (a):Place 4of the points on the vertices of the square;that way they are maximally sepa-rated from one another.The 5th point must then lie within √2/2units of one of the other points,since the furthest from the corners it can be is the center,which is exactly √2/2units fromeach of the four corners.Proof (b):Partition the square into 4squares,each with a side of 1/2unit.If any two points areon or inside one of these smaller squares,the distance between these two points will be at most √2/2units.Since there are 5points and only 4squares,at least two points must fall on or inside one of the smaller squares,giving a set of points that are no more than √2/2apart.Which of the proofs are correct:(a),(b),both,or neither (or don’t know)?Solution:(b)onlyProblem9Give an inductive proof of the following statement:For every natural number n>3,we have n!>2n.Solution:Base case:True for n=4.Inductive step:Assume n!>2n.Then,multiplying both sides by(n+1),we get(n+1)n!> (n+1)2n>2?2n=2n+1.Problem10We want to line up6out of10children.Which of the following expresses the number of possible line-ups?(Circle the right answer.)(a)10!/6!(b)10!/4!(c) 106(d) 104 ·6!(e)None of the above(f)Don’t knowSolution:(b),(d)are both correctProblem11A deck of52cards is shuf?ed thoroughly.What is the probability that the4aces are all next to each other?(Circle theright answer.)(a)4!49!/52!(b)1/52!(c)4!/52!(d)4!48!/52!(e)None of the above(f)Don’t knowSolution:(a)Problem12The weather forecaster says that the probability of rain on Saturday is25%and that the probability of rain on Sunday is25%.Consider the following statement:The probability of rain during the weekend is50%.Which of the following best describes the validity of this statement?(a)If the two events(rain on Sat/rain on Sun)are independent,then we can add up the twoprobabilities,and the statement is true.Without independence,we can’t tell.(b)True,whether the two events are independent or not.(c)If the events are independent,the statement is false,because the the probability of no rainduring the weekend is9/16.If they are not independent,we can’t tell.(d)False,no matter what.(e)None of the above.(f)Don’t know.Solution:(c)Problem13A player throws darts at a target.On each trial,independentlyof the other trials,he hits the bull’s-eye with probability1/4.How many times should he throw so that his probability is75%of hitting the bull’s-eye at least once?(a)3(b)4(c)5(d)75%can’t be achieved.(e)Don’t know.Solution:(c),assuming that we want the probability to be≥0.75,not necessarily exactly0.75.Problem14Let X be an indicator random variable.Which of the following statements are true?(Circle all that apply.)(a)Pr{X=0}=Pr{X=1}=1/2(b)Pr{X=1}=E[X](c)E[X]=E[X2](d)E[X]=(E[X])2Solution:(b)and(c)only。
INFO1105_Data structure_2012 Semester 2_w05_solution
Also, show a tree that achieves the best-case running time. Answer (a) Consider a degenerate case, i.e., a binary tree where for every internal node there is only one child. (b) Consider a complete binary tree. 2. Let T be a tree with more than one node. Is it possible that the preorder traversal of T visits the nodes in the same order as the postorder traversal of T ? If so, give an example; otherwise, argue why this cannot occur. Likewise, is it possible that the preorder traversal of T visits the nodes in the reverse order of the postorder traversal of T ? If so, give an example; otherwise, argue why this cannot occur. Answer It is not possible for the postorder and preorder traversal of a tree with more than one node to visit the nodes in the same order. A preorder traversal will always visit the root node first, while a postorder traversal node will always visit an external node first. It is possible for a preorder and a postorder traversal to visit the nodes in the reverse order. Consider the case of a tree with only two nodes.
PetroMod_2012_2_Installation_Guide
Installation GuideVersion 2012.2PetroModPetroMod petroleum systems modeling software PetroModPM*Mark of SchlumbergerCopyright © 2012 Schlumberger. All rights reserved.Copyright © 2012 Schlumberger. All rights reserved.This work contains the confidential and proprietary trade secrets of Schlumberger and may not be copied or stored in an information retrieval system, transferred, used, distributed, translated or retransmitted in any form or by any means, electronic or mechanical, in whole or in part, without the express written permission of the copyright owner.Trademarks & Service MarksSchlumberger, the Schlumberger logotype, and other words or symbols used to identify the products and services described herein are either trademarks, trade names or service marks of Schlumberger and its licensors, or are the property of their respective owners. These marks may not be copied, imitated or used, in whole or in part, without the express prior written permission of Schlumberger. In addition, covers, page headers, custom graphics, icons, and other design elements may be service marks, trademarks, and/or trade dress of Schlumberger, and may not be copied, imitated, or used, in whole or in part, without the express prior written permission of Schlumberger. Other company, product, and service names are the properties of their respective owners.An asterisk (*) is used throughout this document to designate a mark of Schlumberger.iv PetroMod 2012.2 Installation GuideContents1 Information Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-1Schlumberger Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 About Schlumberger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Typestyle Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Alert Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Contacting Schlumberger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3 Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-32 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-43 Installation (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1Downloading the Installation Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3 Files Installed During Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6 Optional: Installing Runtime Environment for Parallel Processing . . . . . . . . . . . . . . . . . . . . . . . .3-7 Installing Runtime Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7 Activating Parallel Processing in the PetroMod Simulation Interface . . . . . . . . . . . . . . . . . . .3-7 Installing the Licensing Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9 CodeMeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9 Schlumberger Licensing Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 Configuring the PetroMod License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Before you start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Obtaining the license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Activating a local license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 Activating an external license server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 Checking the License Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16Contents v4 Uninstalling PetroMod (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1Uninstalling PetroMod (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 Uninstalling PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 Results of the Uninstallation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-25 Installation (Unix) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1Downloading the Installation Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3 Files Installed During Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-4 Parallel Processing Set-up (Systems Admin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 Intel MPI runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 PetroMod Machine Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 Configuring users for ssh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-7 Configuring users for rsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-7 Activating Parallel Processing in PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-8 Load Sharing Facility (LSF) in Conjunction with Parallel PetroMod . . . . . . . . . . . . . . . . . . . . . . .5-9 Editing the MPI location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-9 Intel MPI Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-9 Running Parallel PetroMod with Queuing Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Running PetroMod Software with LSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Configuring the License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Setting the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Obtaining a License Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Setting up the License Server (Systems Administrator) . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-136 Uninstalling PetroMod (Unix) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-1Uninstalling PetroMod (Unix) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2 Uninstalling PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2 Files Removed During Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2vi PetroMod 2012.2 Installation Guide1Information ResourcesIn This SectionSchlumberger Product Documentation.........................................................1-2About Schlumberger.............................................................................1-2Documentation.....................................................................................1-2Typestyle Conventions..........................................................................1-2Alert Statements..................................................................................1-2 Contacting Schlumberger............................................................................1-3Technical Support.................................................................................1-3Information Resources 1-1Schlumberger Product Documentation1-2PetroMod 2012.2 Installation GuideSchlumberger Product DocumentationAbout Schlumberger Schlumberger is the leading oilfield services provider, trusted to deliver superiorresults and improved E&P performance for oil and gas companies around the world.Through our well site operations and in our research and engineering facilities, wedevelop products, services, and solutions that optimize customer performance in asafe and environmentally sound manner.Documentation Documentation is provided in the following electronic formats via the listed location:•PetroMod 2012.2 Installation Guide (Adobe ® Acrobat ® PDF file):https://•PetroMod 2012.2 User Guides (Adobe ® Acrobat ® PDF files):https://•Online help for some applications: PetroMod -> HelpYou must have Adobe ® Reader ® installed to read the PDF files. Adobe Readerinstallation programs for common operating systems are available for a freedownload from the Adobe Web site at .Typestyle Conventions The following conventions are observed throughout this guide:•Bold text is used to designate file and folder names, dialog titles, names ofbuttons, icons, and menus, and terms that are objects of a user selection.•Italic text is used for word emphasis, defined terms, and manual titles.•Monospace text (Courier ) is used to show literal text as you would enter it, or asit would appear onscreen.Alert Statements The alerting statements are Notes, Cautions, and Warnings. These statements areformatted in the following style:• • • • • •Note:Information that is incidental to the main text flow, or to an important pointor tip provided in addition to the previous statement or instruction.• • • • • •Caution:Advises of machine or data error that could occur should the user fail totake or avoid a specified action.• • • • • •Warning:Requires immediate action by the user to prevent actual loss of data orwhere an action is irreversible, or when physical damage to themachine or devices is possible.Contacting SchlumbergerInformation Resources 1-3Contacting SchlumbergerTechnical Support Schlumberger has sales and support offices around the world. For information oncontacting Schlumberger, please refer to the information below.For Technical Support for PetroMod software please contact the Customer CareCenter via the Schlumberger Support Portal at https://Internet Postal Mail SchlumbergerAachen Technology Center (AaTC)Ritterstr . 2352072 Aachen - GermanyContacting Schlumberger1-4PetroMod 2012.2 Installation Guide2Getting StartedIn This ChapterOverview...................................................................................................2-2Introduction.........................................................................................2-2System Requirements...........................................................................2-2System Requirements...........................................................................2-2Licensing.............................................................................................2-4Getting Started 2-1Overview2-2PetroMod 2012.2 Installation GuideOverviewIntroduction This document describes the steps necessary to install PetroMod* 2012.2. Theinstaller includes a full PetroMod installation.•Installing on a workstation using a local license•Installing on a workstation using a license on a central license serverThis guide also explains the procedures required after installation:•Defining your license environmentThis module has been designed by the Schlumberger Aachen Technology Center(AaTC), Germany.Note:The screen shots in this document show PetroMod 2012.1.Audience This guide is useful for the following people:•PetroMod users who install PetroMod on their workstations•System Administrator who installs PetroMod on a network shared diskSystem Requirements Before you install PetroMod 2012.2 your machine must meet the followingrequirements:Hardware Requirements Table 2-1Hardware Requirements for workstation (e.g. Dell T7500)Table 2-2Hardware Requirements for laptop (e.g. Dell M4600)Computer CPU 2 x Intel X5667 (quad core) or X5675 (hexa core)Physical Memory12 GB RAM Hard Disk Space 5 GB of free disk space Graphic CardNvidia Quadro 5000 Network Card 1000 Mbit NicComputerIntel Core i7-2860Q 2.5 GHz Physical Memory 16 GB RAMOverview Getting Started 2-3Table 2-3Hardware Requirements for Linux Cluster • • • • • •Warning:Linux Users - Due to known issues concerning the instability ofOpenGL graphics, PetroMod only supports local rendering on 3Dgraphic cards with stable graphic drivers. Rendering via a networkcould cause stability issues. In particular, we observed problems withthe Mesa OpenGL package that is delivered with RHEL5 and works asa fall-back when no other driver is installed.Software Requirements Table 2-4Software Requirements• • • • • •Caution:It is possible that graphics do not display correctly when using older ATIgraphics cards and drivers. Thus, we recommend the use of Nvidiagraphics cards. We also recommend to install the latest graphicsdrivers available from Nvidia to avoid OpenGL graphic display errors.The driver version that comes with the OS in most cases is quite old oreven generic drivers are used if the graphics hardware is notrecognized correctly during the installation of the OS. These driversonly support basic functionalities and do not offer the OpenGL featuresrequired by PetroMod. Please be aware that most onboard graphicshardware does not support OpenGL at all. A dedicated graphics card isrequired for PetroMod.Hard Disk Space5 GB of free disk space Graphic Card Nvidia Quadro 2000M Computer CPU 2 x Intel X5667 (quad core) or X5675 (hexa core)Physical Memory48GB RAM Network Card1000 Mbit Nic Hard Disk Space 5 GB of free disk spaceMicrosoft Vista64-bit Microsoft Windows 7(recommended)64-bit RedHat EnterpriseLinux 5.3(recommended)64 bit Framework 2.0Overview••••••Note:Software applications created under older operating system versions willrun under newer operating system versions, but not vice versa. Licensing Licenses are required to access PetroMod. Certain functionalities or modules willonly be available with the respective licenses. Contact your Schlumberger SISCustomer Support representative to obtain the necessary licensesMaintenance contracts are usually yearly contracts, renewed at any time during theyear. Prior to 2012.1, PetroMod licenses allowed you to step up to a new PetroModversion based on the PetroMod license expiration date without having a validmaintenance contract. Beginning with 2012.1, upgrades are based on yourmaintenance contract expiration date. This is how you read the new licensingformat:FEATURE petrobuilder3D slbsls <yyyy.mm> <dd-mmm-yyyy> <#>Where• <yyyy.mm> is the maintenance expiration year and month• <dd-mmm-yyyy> is the license expiration day, month, year• <#> is the number of licensesMaintenance renewal is required to run any PetroMod version released after yourmaintenance expiration date. You will be automatically contacted by SchlumbergerInformation Systems before your maintenance expires.2-4PetroMod 2012.2 Installation Guide3Installation (Windows)In This ChapterDownloading the Installation Package..........................................................3-2Installing PetroMod.....................................................................................3-3Installing PetroMod...............................................................................3-3Files Installed During Installation...........................................................3-6 Optional: Installing Runtime Environment for Parallel Processing....................3-7Installing Runtime Environment.............................................................3-7Activating Parallel Processing in the PetroMod Simulation Interface..........3-7 Installing the Licensing Tool........................................................................3-9CodeMeter...........................................................................................3-9Schlumberger Licensing Tool................................................................3-10 Configuring the PetroMod License...............................................................3-13Before you start..................................................................................3-13Obtaining the license...........................................................................3-13Activating a local license......................................................................3-14Activating an external license server.....................................................3-15Checking the License Status.................................................................3-16Installation (Windows)3-1Downloading the Installation PackageDownloading the Installation PackageTo install PetroMod, you need the installation package. If you have a DVD, you canuse it. Otherwise, download PetroMod from the Software Download Center.••••••Note:If you are a new user of the Software Download Center, you must registerbefore you can download PetroMod.To download PetroMod 2012 from the Software Download Center1Go to .2Click SIS Software download center.3Log in to the site.4On the Welcome Message page, click Continue.5In the Product Group Name list (in the upper-left corner), click Geology &Geophysics.6In the table on the right, click PetroMod.7In the table of PetroMod downloads, click the Download icon for the PetroMod2012.2 file you need.You are ready to install PetroMod 2012.3-2PetroMod 2012.2 Installation GuideInstalling PetroModInstallation (Windows)3-3Installing PetroModPerform the following tasks prior to beginning the installation:•Ensure that you have admin privileges on the machine on which you are installing PetroMod and/or install the software together with your systems administrator since superuser passwords are required.•Ensure that the “System Requirements” on page 2-2 are met.PetroMod 2012 is a full installation. If you are already using an earlier PetroMod release, copy the new release into a new directory! Do not install the new version ‘over’ the old version to ensure that all programs and files can be updated and will then be compatible.Installing PetroMod The installation ensures that the files required to run PetroMod are installed on yourcomputer.To Install PetroMod 20121Insert the DVD or navigate to the location where you downloaded theinstallation files.2Double-click PetroMod2012.2.exe to start the installation. The folderPetroMod2012.2.msi will be unpacked, then the InstallShield Wizard will open, see Fig. 3-1. Click Next .Fig. 3-1PetroMod InstallShield Wizard3Fill in your User Name and Organization , see Fig. 3-2, then click Next.Installing PetroMod3-4PetroMod 2012.2 Installation GuideFig. 3-2Filling in user name and organization 4Determine the location of the files, see Fig. 3-3. Default is a folder calledSchlumberger in your Program Files folder. If this is not what you want you need to change that manually by clicking the Change button.When you are content with the location, click Next.Fig. 3-3Determining the location of the files 5 A summary of the settings will be displayed, see Fig. 3-4. Click Install .Installing PetroModInstallation (Windows)3-5Fig. 3-4Summary of settings 6You can follow the progress of the installation in the InstallShield Wizard, seeFig. 3-5.Fig. 3-5Installation progress 7Once the installation is complete the InstallShield Wizard will display the finaldialog, see Fig. 3-6. Click Finish .Installing PetroMod3-6PetroMod 2012.2 Installation Guide Fig. 3-6Installation complete 8The PetroMod 2012.2 icon will appear on your desktop . PetroMod 2012.2 willalso be added to the Schlumberger folder in the Progams list of your Start menu.Proceed with the installation of the .NETruntime environment, the MS HPC runtime for parallel processing and / or with installing Flexnet.Files Installed During Installation The following files / folders are installed during the installation of PetroMod:•one folder: PetroMod 2012.2:-client folder incl. sub folders/files-cult folder incl. sub folders/files-def folder incl. sub folders/files-doc folder incl. sub folders/files-geo folder incl. sub folders/files-well folder incl. sub folders/files-WIN64 folder incl. sub folders/files-PetroMod2012.2.batOptional: Installing Runtime Environment for Parallel Processing Optional: Installing Runtime Environment for Parallel ProcessingPetroMod 2012.2 supports parallel processing on Windows platforms usingMicrosoft HPC Pack 2008 R2 SP3. Using parallel processing from the SimulationInterface Microsoft requires the previous installation of Microsoft HPC runtimeenvironment.Installing Runtime Environment You can find the files in the installation package in the RuntimeEnvironment/ Windows folder:•mpi_x64.exe - MS MPI runtime•HpcClient_x64.exe - MS HPC web interface (optional)Once you have installed the files you need to obtain and activate the necessary licenses.••••••Note:If you want to consolidate your existing MS HPC runtime environments (installed with PM 11 or PetroMod 2011) to the latest version that shipswith PetroMod 2012.2, then you have to uninstall the MS HPC Pack 2008SDK on your system and manually set the required environment variable(called CCP_SDK) to C:\Program Files|Microsoft HPC Pack 2008 R2.Otherwise, PetroMod 2011.1 or PetroMod 11 SP4 will complain about themissing MPI runtime environment.Activating Parallel Processing in the PetroMod Simulation Interface 1After the licenses have been activated open the PetroMod Simulation Interface and select Processors for Parallel Run, see Fig. 3-7.Fig. 3-7Activating parallel processing in the PetroMod Simulation InterfaceOptional: Installing Runtime Environment for Parallel Processing2Increase the number of processors in the Processors Selection dialog.••••••Caution:Parallel processing is only supported on your local machine. Youcannot run a simulation on several nodes (as you could on Linuxclusters).Installing the Licensing Tool Installing the Licensing ToolPetroMod 2012 supports the use of the CodeMeter dongle as well as HOSTIDs forlicense authentication.•If you use CodeMeter, you must install CodeMeter software prior to installing theSchlumberger Licensing tool.•If you use HOSTIDs, you can continue by installing the Schlumberger Licensingtool.CodeMeter PetroMod 2012 uses the CodeMeter dongle for license authentication. Before youinsert your CodeMeter dongle into a USB port on your local workstation or on acentral license server, you must install the CodeMeter software. You should useCodeMeter 4.40 in the following circumstances:•If you use a local license (that is, your local workstation is your local licenseserver), install the CodeMeter dongle, appropriate CodeMeter driver, and theSchlumberger Licensing tool on your computer.•If you use a license on a central license server, the Administrator installs theCodeMeter dongle, CodeMeter driver, and the Schlumberger Licensing tool on theserver. Individual users do not need to install any licensing hardware or softwareon their computers.Installing CodeMeter Follow the steps in this section to uninstall previous versions of CodeMeter, andinstall the version required for this PetroMod release.◆To uninstall previous versions of CodeMeterIf you have an older version of CodeMeter installed on your computer, uninstall itand then install the latest version.1If you want to check the version of CodeMeter you are currently using beforeuninstalling it, on the Windows toolbar right-click the CodeMeter icon and selectAbout to open the About CodeMeter window.2Remove your CodeMeter dongle from the USB port.3Select Start > Control Panel > Programs and Features.4On the list of currently installed programs, select CodeMeter Runtime Kit vx.x.5Click Remove.You are ready to install the latest CodeMeter version.◆To install Codemeter••••••Note:CodeMeter automatically installs in your default Program Files directory:%program files%/Codemeter (usually C:/Program Files).1From the Licensing folder in the PetroMod installation package run the correctprogram (.exe) file:Installing the Licensing Tool•For PetroMod 64-bit, run CodeMeterRuntime64.exeAlternatively, go to the CodeMeter website () anddownload CodeMeter 4.40 from their website.The CodeMeter installation wizard opens.2On the Welcome panel, click Next.3On the License Agreement panel, read the agreement, select I accept thelicense agreement, and then click Next.4On the User Information panel, enter your name, your company’s name, andwho will use CodeMeter on your computer, and then click Next.5On the Select Features panel, select the features you want to install and thenclick Next.Schlumberger recommends that you accept the default settings.6On the Ready to Install panel, click Next to begin the installation.7When the installation is complete, on the last panel click Finish.8Restart your computer.The CodeMeter icon appears in your Windows taskbar. When you insert yourCodeMeter dongle into the USB port, the icon changes to show that your computerrecognizes the dongle. If you double-click the icon, you can view information aboutthe dongle.You are ready to install the Schlumberger Licensing tool.Schlumberger Licensing Tool PetroMod uses FlexNet for licensing. The Schlumberger Licensing tool is a simple interface for FlexNet. Using the Schlumberger Licensing 2012 tool to configure and manage your PetroMod license is recommended, but you may use FlexNet tools instead.If you do not already have the Schlumberger licensing tool on your computer, install the Licensing tool as follows:•If you use a local license (that is, your local workstation is your local license server), install the licensing tool on your computer.•If you use a license on a central license server, the Administrator installs the licensing tool on the server. The Schlumberger Licensing tool is not required for the Administrator to install, configure, and manage the PetroMod license. The Administrator may choose to manage PetroMod licenses with FlexNet native tools.The computer that you use to run the Schlumberger licensing tool is the license server for your PetroMod 2012 installaton.Installing the Schlumberger Licensing Tool Follow the steps in this section to install the Schlumberger Licensing tool. If you have a previous version of the licensing tool and want the latest version (2012), uninstall the older version first, and then install the latest version.。
2012-HCI-MA-H2-P1-Prelim
(i)
f :x→
kx 2 − 5 x + 3 , x−2
(ii) (iii)
Use the standard series for ln(1 + x ) to find the first three terms of the 1 Maclaurin's series for y = . [3] 1 + ln (1 + 2 x )
One NETO logistics commander was tasked to deliver goods to an army camp in Abghan during June 2012. The commander delivered 1000 tons of goods on 1st June, 1100 tons on 2nd June, ... etc. Each subsequent day’s delivery was 100 tons more than the previous day’s delivery. After several days of delivery, due to more road attacks from Bl Paeda, the commander had to change the plan so that each subsequent day’s delivery was 100 tons less than the previous day’s delivery. By 15th June, the commander managed to deliver a total of 21300 tons of goods for the past 15 days. On which day did the commander deliver the most goods to the camp? How many tons of goods did he deliver on this particular day? [5] Given that all terms in a geometric progression {un } , n = 1, 2, 3, ... are positive with first term a and common ratio r, where r ≠ 1, the sums H and C are defined as follows:
A File is Not a File
A File is Not a File:Understanding the I/O Behaviorof Apple Desktop ApplicationsTyler Harter,Chris Dragga,Michael Vaughn,Andrea C.Arpaci-Dusseau,Remzi H.Arpaci-DusseauDepartment of Computer SciencesUniversity of Wisconsin,Madison{harter,dragga,vaughn,dusseau,remzi}@ABSTRACTWe analyze the I/O behavior of iBench,a new collection of produc-tivity and multimedia application workloads.Our analysis reveals a number of differences between iBench and typicalfile-system workload studies,including the complex organization of modern files,the lack of pure sequential access,the influence of underlying frameworks on I/O patterns,the widespread use offile synchro-nization and atomic operations,and the prevalence of threads.Our results have strong ramifications for the design of next generation local and cloud-based storage systems.1.INTRODUCTIONThe design and implementation offile and storage systems has long been at the forefront of computer systems research.Inno-vations such as namespace-based locality[21],crash consistency via journaling[15,29]and copy-on-write[7,34],checksums and redundancy for reliability[5,7,26,30],scalable on-disk struc-tures[37],distributedfile systems[16,35],and scalable cluster-based storage systems[9,14,18]have greatly influenced how data is managed and stored within modern computer systems.Much of this work infile systems over the past three decades has been shaped by measurement:the deep and detailed analysis of workloads[4,10,11,16,19,25,33,36,39].One excellent example is found in work on the Andrew File System[16];de-tailed analysis of an early AFS prototype led to the next-generation protocol,including the key innovation of callbacks.Measurement helps us understand the systems of today so we can build improved systems for tomorrow.Whereas most studies offile systems focus on the corporate or academic intranet,mostfile-system users work in the more mun-dane environment of the home,accessing data via desktop PCs, laptops,and compact devices such as tablet computers and mo-bile phones.Despite the large number of previous studies,little is known about home-user applications and their I/O patterns. Home-user applications are important today,and their impor-tance will increase as more users store data not only on local de-vices but also in the ers expect to run similar applications across desktops,laptops,and phones;therefore,the behavior of these applications will affect virtually every system with which a Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on thefirst page.To copy otherwise,to republish,to post on servers or to redistribute to lists,requires prior specific permission and/or a fee.Copyright2011ACM978-1-59593-591-5/07/0010...$er interacts.I/O behavior is especially important to understand since it greatly impacts how users perceive overall system latency and application performance[12].While a study of how users typically exercise these applications would be interesting,thefirst step is to perform a detailed study of I/O behavior under typical but controlled workload tasks.This style of application study,common in thefield of computer archi-tecture[40],is different from the workload study found in systems research,and can yield deeper insight into how the applications are constructed and howfile and storage systems need to be designed in response.Home-user applications are fundamentally large and complex, containing millions of lines of code[20].In contrast,traditional U NIX-based applications are designed to be simple,to perform one task well,and to be strung together to perform more complex tasks[32].This modular approach of U NIX applications has not prevailed[17]:modern applications are standalone monoliths,pro-viding a rich and continuously evolving set of features to demand-ing users.Thus,it is beneficial to study each application individu-ally to ascertain its behavior.In this paper,we present thefirst in-depth analysis of the I/O behavior of modern home-user applications;we focus on produc-tivity applications(for word processing,spreadsheet manipulation, and presentation creation)and multimedia software(for digital mu-sic,movie editing,and photo management).Our analysis centers on two Apple software suites:iWork,consisting of Pages,Num-bers,and Keynote;and iLife,which contains iPhoto,iTunes,and iMovie.As Apple’s market share grows[38],these applications form the core of an increasingly popular set of workloads;as de-vice convergence continues,similar forms of these applications are likely to access userfiles from both stationary machines and mov-ing cellular devices.We call our collection the iBench task suite. To investigate the I/O behavior of the iBench suite,we build an instrumentation framework on top of the powerful DTrace tracing system found inside Mac OS X[8].DTrace allows us not only to monitor system calls made by each traced application,but also to examine stack traces,in-kernel functions such as page-ins and page-outs,and other details required to ensure accuracy and com-pleteness.We also develop an application harness based on Apple-Script[3]to drive each application in the repeatable and automated fashion that is key to any study of GUI-based applications[12]. Our careful study of the tasks in the iBench suite has enabled us to make a number of interesting observations about how applica-tions access and manipulate stored data.In addition to confirming standard pastfindings(e.g.,mostfiles are small;most bytes ac-cessed are from largefiles[4]),wefind the following new results. Afile is not afile.Modern applications manage large databases of information organized into complex directory trees.Even simple word-processing documents,which appear to users as a“file”,arein actuality smallfile systems containing many sub-files(e.g.,a Microsoft.docfile is actually a FATfile system containing pieces of the document).File systems should be cognizant of such hidden structure in order to lay out and access data in these complexfiles more effectively.Sequential access is not sequential.Building on the trend no-ticed by V ogels for Windows NT[39],we observe that even for streaming media workloads,“pure”sequential access is increas-ingly rare.Sincefile formats often include metadata in headers, applications often read and re-read thefirst portion of afile before streaming through its contents.Prefetching and other optimizations might benefit from a deeper knowledge of thesefile formats. Auxiliaryfiles dominate.Applications help users create,mod-ify,and organize content,but userfiles represent a small fraction of thefiles touched by modern applications.Mostfiles are helper files that applications use to provide a rich graphical experience, support multiple languages,and record history and other metadata. File-system placement strategies might reduce seeks by grouping the hundreds of helperfiles used by an individual application. Writes are often forced.As the importance of home data in-creases(e.g.,family photos),applications are less willing to simply write data and hope it is eventuallyflushed to disk.Wefind that most written data is explicitly forced to disk by the application;for example,iPhoto calls fsync thousands of times in even the sim-plest of tasks.Forfile systems and storage,the days of delayed writes[22]may be over;new ideas are needed to support applica-tions that desire durability.Renaming is popular.Home-user applications commonly use atomic operations,in particular rename,to present a consistent view offiles to users.Forfile systems,this may mean that trans-actional capabilities[23]are needed.It may also necessitate a re-thinking of traditional means offile locality;for example,placing afile on disk based on its parent directory[21]does not work as expected when thefile isfirst created in a temporary location and then renamed.Multiple threads perform I/O.Virtually all of the applications we study issue I/O requests from a number of threads;a few ap-plications launch I/Os from hundreds of threads.Part of this us-age stems from the GUI-based nature of these applications;it is well known that threads are required to perform long-latency oper-ations in the background to keep the GUI responsive[24].Thus,file and storage systems should be thread-aware so they can better allocate bandwidth.Frameworks influence I/O.Modern applications are often de-veloped in sophisticated IDEs and leverage powerful libraries,such as Cocoa and Carbon.Whereas UNIX-style applications often di-rectly invoke system calls to read and writefiles,modern libraries put more code between applications and the underlyingfile system; for example,including"cocoa.h"in a Mac application imports 112,047lines of code from689differentfiles[28].Thus,the be-havior of the framework,and not just the application,determines I/O patterns.Wefind that the default behavior of some Cocoa APIs induces extra I/O and possibly unnecessary(and costly)synchro-nizations to disk.In addition,use of different libraries for similar tasks within an application can lead to inconsistent behavior be-tween those tasks.Future storage design should take these libraries and frameworks into account.This paper contains four major contributions.First,we describe a general tracing framework for creating benchmarks based on in-teractive tasks that home users may perform(e.g.,importing songs, exporting video clips,saving documents).Second,we deconstruct the I/O behavior of the tasks in iBench;we quantify the I/O behav-ior of each task in numerous ways,including the types offiles ac-cessed(e.g.,counts and sizes),the access patterns(e.g.,read/write, sequentiality,and preallocation),transactional properties(e.g.,dura-bility and atomicity),and threading.Third,we describe how these qualitative changes in I/O behavior may impact the design of future systems.Finally,we present the34traces from the iBench task suite;by making these traces publicly available and easy to use,we hope to improve the design,implementation,and evaluation of the next generation of local and cloud storage systems:/adsl/Traces/ibench The remainder of this paper is organized as follows.We begin by presenting a detailed timeline of the I/O operations performed by one task in the iBench suite;this motivates the need for a systematic study of home-user applications.We next describe our methodol-ogy for creating the iBench task suite.We then spend the majority of the paper quantitatively analyzing the I/O characteristics of the full iBench suite.Finally,we summarize the implications of our findings onfile-system design.2.CASE STUDYThe I/O characteristics of modern home-user applications are distinct from those of U NIX applications studied in the past.To motivate the need for a new study,we investigate the complex I/O behavior of a single representative task.Specifically,we report in detail the I/O performed over time by the Pages(4.0.3)application, a word processor,running on Mac OS X Snow Leopard(10.6.2)as it creates a blank document,inserts15JPEG images each of size 2.5MB,and saves the document as a Microsoft.docfile.Figure1shows the I/O this task performs(see the caption for a description of the symbols used).The top portion of thefigure il-lustrates the accesses performed over the full lifetime of the task:at a high level,it shows that more than385files spanning six different categories are accessed by eleven different threads,with many in-tervening calls to fsync and rename.The bottom portion of the figure magnifies a short time interval,showing the reads and writes performed by a single thread accessing the primary.doc productiv-ityfile.From this one experiment,we illustrate eachfinding de-scribed in the introduction.Wefirst focus on the single access that saves the user’s document(bottom),and then consider the broader context surrounding thisfile save,where we observe aflurry of ac-cesses to hundreds of helperfiles(top).Afile is not afile.Focusing on the magnified timeline of reads and writes to the productivity.docfile,we see that thefile format comprises more than just a simplefile.Microsoft.docfiles are based on the FATfile system and allow bundling of multiplefiles in the single.docfile.This.docfile contains a directory(Root),three streams for large data(WordDocument,Data,and1Table),and a stream for small data(Ministream).Space is allocated in thefile with three sections:afile allocation table(FAT),a double-indirect FAT(DIF)region,and a ministream allocation region(Mini). Sequential access is not sequential.The complex FAT-based file format causes random access patterns in several ways:first,the header is updated at the beginning and end of the magnified access; second,data from individual streams is fragmented throughout the file;and third,the1Table stream is updated before and after each image is appended to the WordDocument stream.Auxiliaryfiles dominate.Although saving the single.doc we have been considering is the sole purpose of this task,we now turn our attention to the top timeline and see that385differentfiles are accessed.There are several reasons for this multitude offiles. First,Pages provides a rich graphical experience involving many images and other forms of multimedia;together with the15in-serted JPEGs,this requires118multimediafiles.Second,usersF i l e sSequential RunsF i l e O f f s e t (K B )Figure 1:Pages Saving A Word Document.The top graph shows the 75-second timeline of the entire run,while the bottom graph is a magnified view of seconds 54to 58.In the top graph,annotations on the left categorize files by type and indicate file count and amount of I/O;annotations on the right show threads.Black bars are file accesses (reads and writes),with thickness logarithmically proportional to bytes of I/O./is an fsync ;\is a rename ;X is both.In the bottom graph,individual reads and writes to the .doc file are shown.Vertical bar position and bar length represent the offset within the file and number of bytes touched.Thick white bars are reads;thin gray bars are writes.Repeated runs are marked with the number of repetitions.Annotations on the right indicate the name of each file section.want to use Pages in their native language,so application text is not hard-coded into the executable but is instead stored in25different .stringsfiles.Third,to save user preferences and other metadata, Pages uses a SQLite database(2files)and a number of key-value stores(218.plistfiles).Writes are often forced;renaming is popular.Pages uses both of these actions to enforce basic transactional guarantees.It uses fsync toflush write data to disk,making it durable;it uses rename to atomically replace oldfiles with newfiles so that afile never contains inconsistent data.The timeline shows these invo-cations numerous times.First,Pages regularly uses fsync and rename when updating the key-value store of a.plistfile.Second, fsync is used on the SQLite database.Third,for each of the15 image insertions,Pages calls fsync on afile named“tempData”(classified as“other”)to update its automatic backup.Multiple threads perform I/O.Pages is a multi-threaded appli-cation and issues I/O requests from many different threads during the ing multiple threads for I/O allows Pages to avoid blocking while I/O requests are outstanding.Examining the I/O behavior across threads,we see that Thread1performs the most significant portion of I/O,but ten other threads are also involved.In most cases,a single thread exclusively accesses afile,but it is not uncommon for multiple threads to share afile.Frameworks influence I/O.Pages was developed in a rich pro-gramming environment where frameworks such as Cocoa or Car-bon are used for I/O;these libraries impact I/O patterns in ways the developer might not expect.For example,although the appli-cation developers did not bother to use fsync or rename when saving the user’s work in the.docfile,the Cocoa library regularly uses these calls to atomically and durably update relatively unim-portant metadata,such as“recently opened”lists stored in.plist files.As another example,when Pages tries to read data in512-byte chunks from the.doc,each read goes through the STDIO library, which only reads in4KB chunks.Thus,when Pages attempts to read one chunk from the1Table stream,seven unrequested chunks from the WordDocument stream are also incidentally read(off-set12039KB).In other cases,regions of the.docfile are repeat-edly accessed unnecessarily.For example,around the3KB off-set,read/write pairs occur dozens of times.Pages uses a library to write2-byte words;each time a word is written,the library reads, updates,and writes back an entire512-byte chunk.Finally,we see evidence of redundancy between libraries:even though Pages has a backing SQLite database for some of its properties,it also uses.plistfiles,which function across Apple applications as generic property stores.This one detailed experiment has shed light on a number of in-teresting I/O behaviors that indicate that home-user applications are indeed different than traditional workloads.A new workload suite is needed that more accurately reflects these applications.3.IBENCH TASK SUITEOur goal in constructing the iBench task suite is two-fold.First, we would like iBench to be representative of the tasks performed by home users.For this reason,iBench contains popular applications from the iLife and iWork suites for entertainment and productivity. Second,we would like iBench to be relatively simple for others to use forfile and storage system analysis.For this reason,we auto-mate the interactions of a home user and collect the resulting traces of I/O system calls.The traces are available online at this site: /adsl/Traces/ibench.We now describe in more detail how we met these two goals.3.1RepresentativeTo capture the I/O behavior of home users,iBench models the ac-tions of a“reasonable”user interacting with iPhoto,iTunes,iMovie, Pages,Numbers,and Keynote.Since the research community does not yet have data on the exact distribution of tasks that home users perform,iBench contains tasks that we believe are common and usesfiles with sizes that can be justified for a reasonable user. iBench contains34different tasks,each representing a home user performing one distinct operation.If desired,these tasks could be combined to create more complex workflows and I/O workloads. The six applications and corresponding tasks are as follows.iLife iPhoto8.1.1(419):digital photo album and photo manip-ulation software.iPhoto stores photos in a library that contains the data for the photos(which can be in a variety of formats,including JPG,TIFF,and PNG),a directory of modifiedfiles,a directory of scaled down images,and twofiles of thumbnail images.The library stores metadata in a SQLite database.iBench contains six tasks ex-ercising user actions typical for iPhoto:starting the application and importing,duplicating,editing,viewing,and deleting photos in the library.These tasks modify both the imagefiles and the underlying database.Each of the iPhoto tasks operates on4002.5MB photos, representing a user who has imported12megapixel photos(2.5MB each)from a full1GBflash card on his or her camera.iLife iTunes9.0.3(15):a media player capable of both audio and video playback.iTunes organizes itsfiles in a private library and supports most common music formats(e.g.,MP3,AIFF,W A VE, AAC,and MPEG-4).iTunes does not employ a database,keeping media metadata and playlists in both a binary and an XMLfile. iBench containsfive tasks for iTunes:starting iTunes,importing and playing an album of MP3songs,and importing and playing an MPEG-4movie.Importing requires copyingfiles into the library directory and,for music,analyzing each songfile for gapless play-back.The music tasks operate over an album(or playlist)of ten songs while the movie tasks use a single3-minute movie.iLife iMovie8.0.5(820):video editing software.iMovie stores its data in a library that contains directories for raw footage and projects,andfiles containing video footage thumbnails.iMovie supports both MPEG-4and Quicktimefiles.iBench contains four tasks for iMovie:starting iMovie,importing an MPEG-4movie, adding a clip from this movie into a project,and exporting a project to MPEG-4.The tasks all use a3-minute movie because this is a typical length found from home users on video-sharing websites. iWork Pages4.0.3(766):a word processor.Pages uses a ZIP-basedfile format and can export to DOC,PDF,RTF,and basic text. iBench includes eight tasks for Pages:starting up,creating and saving,opening,and exporting documents with and without images and with different formats.The tasks use15page documents. iWork Numbers2.0.3(332):a spreadsheet application.Num-bers organizes itsfiles with a ZIP-based format and exports to XLS and PDF.The four iBench tasks for Numbers include starting Num-bers,generating a spreadsheet and saving it,opening the spread-sheet,and exporting that spreadsheet to XLS.To model a possible home user working on a budget,the tasks utilize afive page spread-sheet with one column graph per sheet.iWork Keynote5.0.3(791):a presentation and slideshow appli-cation.Keynote saves to a.key ZIP-based format and exports to Microsoft’s PPT format.The seven iBench tasks for Keynote in-clude starting Keynote,creating slides with and without images, opening and playing presentations,and exporting to PPT.Each Keynote task uses a20-slide presentation.Accesses I/O MB Name DescriptionFiles (MB)Accesses (MB)RD%WR%/CPU Sec/CPU Seci L i f e i P h o t oStart Open iPhoto with library of 400photos 779(336.7)828(25.4)78.821.2151.1 4.6Imp Import 400photos into empty library 5900(1966.9)8709(3940.3)74.425.626.712.1Dup Duplicate 400photos from library2928(1963.9)5736(2076.2)52.447.6237.986.1Edit Sequentially edit 400photos from library 12119(4646.7)18927(12182.9)69.830.219.612.6Del Sequentially delete 400photos;empty trash 15246(23.0)15247(25.0)21.878.2280.90.5View Sequentially view 400photos 2929(1006.4)3347(1005.0)98.1 1.924.17.2i T u n e s Start Open iTunes with 10song album 143(184.4)195(9.3)54.745.372.4 3.4ImpS Import 10song album to library 68(204.9)139(264.5)66.333.775.2143.1ImpM Import 3minute movie to library 41(67.4)57(42.9)48.052.0152.4114.6PlayS Play album of 10songs 61(103.6)80(90.9)96.9 3.10.40.5PlayM Play 3minute movie56(77.9)69(32.0)92.37.7 2.2 1.0i M o v i e Start Open iMovie with 3minute clip in project 433(223.3)786(29.4)99.90.1134.8 5.0Imp Import 3minute .m4v (20MB)to “Events”184(440.1)383(122.3)55.644.429.39.3Add Paste 3minute clip from “Events”to project 210(58.3)547(2.2)47.852.2357.8 1.4Exp Export 3minute video clip 70(157.9)546(229.9)55.144.9 2.3 1.0i W o r kP a g e s Start Open Pages218(183.7)228(2.3)99.90.197.7 1.0New Create 15text page document;save as .pages 135(1.6)157(1.0)73.326.750.80.3NewP Create 15JPG document;save as .pages 408(112.0)997(180.9)60.739.354.69.9Open Open 15text page document 103(0.8)109(0.6)99.50.557.60.3PDF Export 15page document as .pdf 107(1.5)115(0.9)91.09.041.30.3PDFP Export 15JPG document as .pdf 404(77.4)965(110.9)67.432.649.7 5.7DOC Export 15page document as .doc 112(1.0)121(1.0)87.912.144.40.4DOCP Export 15JPG document as .doc 385(111.3)952(183.8)61.138.946.38.9N u m b e r s Start Open Numbers283(179.9)360(2.6)99.60.4115.50.8New Save 5sheets/column graphs as .numbers 269(4.9)313(2.8)90.79.39.60.1Open Open 5sheet spreadsheet119(1.3)137(1.3)99.80.248.70.5XLS Export 5sheets/column graphs as .xls 236(4.6)272(2.7)94.9 5.18.50.1K e y n o t e Start Open Keynote517(183.0)681(1.1)99.80.2229.80.4New Create 20text slides;save as .key 637(12.1)863(5.4)92.47.6129.10.8NewP Create 20JPG slides;save as .key654(92.9)901(103.3)66.833.270.88.1Play Open and play presentation of 20text slides 318(11.5)385(4.9)99.80.295.0 1.2PlayP Open and play presentation of 20JPG slides 321(45.4)388(55.7)69.630.472.410.4PPT Export 20text slides as .ppt 685(12.8)918(10.1)78.821.2115.2 1.3PPTP Export 20JPG slides as .ppt 723(110.6)996(124.6)57.642.461.07.6Table 1:34Tasks of the iBench Suite.The table summarizes the 34tasks of iBench,specifying the application,a short name for the task,and a longer description of the actions modeled.The I/O is characterized according to the number of files read or written,the sum of the maximum sizes of all accessed files,the number of file accesses that read or write data,the number of bytes read or written,the percentage of I/O bytes that are part of a read (or write),and the rate of I/O per CPU-second in terms of both file accesses and bytes.Each core is counted individually,so at most 2CPU-seconds can be counted per second on our dual-core test machine.CPU utilization is measured with the UNIX top utility,which in rare cases produces anomalous CPU utilization snapshots;those values are ignored.Table 1contains a brief description of each of the 34iBench tasks as well as the basic I/O characteristics of each task when running on Mac OS X Snow Leopard 10.6.2.The table illustrates that the iBench tasks perform a significant amount of I/O.Most tasks access hundreds of files,which in aggregate contain tens or hundreds of megabytes of data.The tasks typically access files hundreds of times.The tasks perform widely differing amounts of I/O,from less than a megabyte to more than a gigabyte.Most of the tasks perform many more reads than writes.Finally,the tasks exhibit high I/O throughput,often transferring tens of megabytes of data for every second of computation.3.2Easy to UseTo enable other system evaluators to easily use these tasks,the iBench suite is packaged as a set of 34system call traces.To ensure reproducible results,the 34user tasks were first automated with AppleScript,a general-purpose GUI scripting language.Apple-Script provides generic commands to emulate mouse clicks through menus and application-specific commands to capture higher-level operations.Application-specific commands bypass a small amount of I/O by skipping dialog boxes;however,we use them whenever possible for expediency.The system call traces were gathered using DTrace [8],a kernel and user level dynamic instrumentation tool.DTrace is used toinstrument the entry and exit points of all system calls dealing with the file system;it also records the current state of the system and the parameters passed to and returned from each call.While tracing with DTrace was generally straightforward,we ad-dressed four challenges in collecting the iBench traces.First,file sizes are not always available to DTrace;thus,we record every file’s initial size and compute subsequent file size changes caused by system calls such as write or ftruncate .Second,iTunes uses the ptrace system call to disable tracing;we circumvent this block by using gdb to insert a breakpoint that automatically re-turns without calling ptrace .Third,the volfs pseudo-file sys-tem in HFS+(Hierarchical File System)allows files to be opened via their inode number instead of a file name;to include path-names in the trace,we instrument the build path function to obtain the full path when the task is run.Fourth,tracing system calls misses I/O resulting from memory-mapped files;therefore,we purged memory and instrumented kernel page-in functions to measure the amount of memory-mapped file activity.We found that the amount of memory-mapped I/O is negligible in most tasks;we thus do not include this I/O in the iBench traces or analysis.To provide reproducible results,the traces must be run on a sin-gle file-system image.Therefore,the iBench suite also contains snapshots of the initial directories to be restored before each run;initial state is critical in file-system benchmarking [1].4.ANALYSIS OF IBENCH TASKSThe iBench task suite enables us to study the I/O behavior of a large set of home-user actions.As shown from the timeline of I/O behavior for one particular task in Section2,these tasks are likely to accessfiles in complex ways.To characterize this complex behavior in a quantitative manner across the entire suite of34tasks, we focus on answering four categories of questions.•What different types offiles are accessed and what are the sizes of thesefiles?•How arefiles accessed for reads and writes?Arefiles ac-cessed sequentially?Is space preallocated?•What are the transactional properties?Are writesflushed with fsync or performed atomically?•How do multi-threaded applications distribute I/O across dif-ferent threads?Answering these questions has two benefits.First,the answers can guidefile and storage system developers to target their systems better to home-user applications.Second,the characterization will help users of iBench to select the most appropriate traces for eval-uation and to understand their resulting behavior.All measurements were performed on a Mac Mini running Mac OS X Snow Leopard version10.6.2and the HFS+file system. The machine has2GB of memory and a2.26GHz Intel Core Duo processor.4.1Nature of FilesOur analysis begins by characterizing the high-level behavior of the iBench tasks.In particular,we study the different types offiles opened by each iBench task as well as the sizes of thosefiles. 4.1.1File TypesThe iLife and iWork applications store data across a variety of files in a number of different formats;for example,iLife applica-tions tend to store their data in libraries(or data directories)unique to each user,while iWork applications organize their documents in proprietary ZIP-basedfiles.The extent to which tasks access dif-ferent types offiles greatly influences their I/O behavior.To understand accesses to differentfile types,we place eachfile into one of six categories,based onfile name extensions and us-age.Multimediafiles contain images(e.g.,JPEG),songs(e.g., MP3,AIFF),and movies(e.g.,MPEG-4).Productivityfiles are documents(e.g.,.pages,DOC,PDF),spreadsheets(e.g.,.numbers, XLS),and presentations(e.g.,.key,PPT).SQLitefiles are database files.Plistfiles are property-listfiles in XML containing key-value pairs for user preferences and application properties.Stringsfiles contain strings for localization of application text.Finally,Other contains miscellaneousfiles such as plain text,logs,files without extensions,and binaryfiles.Figure2shows the frequencies with which tasks open and ac-cessfiles of each type;most tasks perform hundreds of these ac-cesses.Multimediafile opens are common in all workloads,though they seldom predominate,even in the multimedia-heavy iLife ap-plications.Conversely,opens of productivityfiles are rare,even in iWork applications that use them;this is likely because most iWork tasks create or view a single productivityfile.Because.plistfiles act as generic helperfiles,they are relatively common.SQLitefiles only have a noticeable presence in iPhoto,where they account for a substantial portion of the observed opens.Stringsfiles occupy a significant minority of most workloads(except iPhoto and iTunes). Finally,between5%and20%offiles are of type“Other”(except for iTunes,where they are more prevalent).Figure3displays the percentage of I/O bytes accessed for each file type.In bytes,multimedia I/O dominates most of the iLife tasks,while productivity I/O has a significant presence in the iWork tasks;file descriptors on multimedia and productivityfiles tend to receive large amounts of I/O.SQLite,Plist,and Stringsfiles have a smaller share of the total I/O in bytes relative to the number of openedfiles;this implies that tasks access only a small quantity of data for each of thesefiles opened(e.g.,several key-value pairs in a.plist).In most tasks,files classified as“Other”receive a more significant portion of the I/O(the exception is iTunes). Summary:Home applications access a wide variety offile types, generally opening multimediafiles the most frequently.iLife tasks tend to access bytes primarily from multimedia orfiles classified as“Other”;iWork tasks access bytes from a broader range offile types,with some emphasis on productivityfiles.4.1.2File SizesLarge and smallfiles present distinct challenges to thefile sys-tem.For largefiles,finding contiguous space can be difficult,while for smallfiles,minimizing initial seek time is more important.We investigate two different questions regardingfile size.First,what is the distribution offile sizes accessed by each task?Second,what portion of accessed bytes resides infiles of various sizes?To answer these questions,we recordfile sizes when each unique file descriptor is closed.We categorize sizes as very small(<4KB), small(<64KB),medium(<1MB),large(<10MB),or very large (≥10MB).We track how many accesses are tofiles in each cate-gory and how many of the bytes belong tofiles in each category. Figure4shows the number of accesses tofiles of each size.Ac-cesses to very smallfiles are extremely common,especially for iWork,accounting for over half of all the accesses in every iWork task.Smallfile accesses have a significant presence in the iLife tasks.The large quantity of very small and smallfiles is due to frequent use of.plistfiles that store preferences,settings,and other application data;thesefiles oftenfill just one or two4KB pages. Figure5shows the proportion of thefiles in which the bytes of accessedfiles rge and very largefiles dominate every startup workload and nearly every task that processes multimedia files.Smallfiles account for few bytes and very smallfiles are essentially negligible.Summary:Agreeing with many previous studies(e.g.,[4]),we find that while applications tend to open many very smallfiles (<4KB),most of the bytes accessed are in largefiles(>1MB).4.2Access PatternsWe next examine how the nature offile accesses has changed, studying the read and write patterns of home applications.These patterns include whetherfiles are used for reading,writing,or both; whetherfiles are accessed sequentially or randomly;andfinally, whether or not blocks are preallocated via hints to thefile system.4.2.1File AccessesOne basic characteristic of our workloads is the division between reading and writing on openfile descriptors.If an application uses an openfile only for reading(or only for writing)or performs more activity onfile descriptors of a certain type,then thefile system may be able to make more intelligent memory and disk allocations. To determine these characteristics,we classify each openedfile descriptor based on the types of accesses–read,write,or both read and write–performed during its lifetime.We also ignore the ac-tualflags used when opening thefile since we found they do not accurately reflect behavior;in all workloads,almost all write-only file descriptors were opened with O RDWR.We measure both the。
sEparaTe包的说明文档:最大似然估计和似然比检验函数说明书
Package‘sEparaTe’August18,2023Title Maximum Likelihood Estimation and Likelihood Ratio TestFunctions for Separable Variance-Covariance StructuresVersion0.3.2Maintainer Timothy Schwinghamer<***************************.CA>Description Maximum likelihood estimation of the parametersof matrix and3rd-order tensor normal distributions with unstructuredfactor variance covariance matrices,two procedures,and for unbiasedmodified likelihood ratio testing of simple and double separabilityfor variance-covariance structures,two procedures.References:Dutilleul P.(1999)<doi:10.1080/00949659908811970>,Manceur AM,Dutilleul P.(2013)<doi:10.1016/j.cam.2012.09.017>,and Manceur AM,DutilleulP.(2013)<doi:10.1016/j.spl.2012.10.020>.Depends R(>=4.3.0)License MIT+file LICENSEEncoding UTF-8LazyData trueRoxygenNote7.2.0NeedsCompilation noAuthor Ameur Manceur[aut],Timothy Schwinghamer[aut,cre],Pierre Dutilleul[aut,cph]Repository CRANDate/Publication2023-08-1807:50:02UTCR topics documented:data2d (2)data3d (2)lrt2d_svc (3)lrt3d_svc (5)mle2d_svc (7)12data3d mle3d_svc (8)sEparaTe (10)Index11 data2d Two dimensional data setDescriptionAn i.i.d.random sample of size7from a2x3matrix normal distribution,for a small numerical example of the use of the functions mle2d_svc and lrt2d_svc from the sEparaTe packageUsagedata2dFormatA frame(excluding the headings)with42lines of data and4variables:K an integer ranging from1to7,the size of an i.i.d.random sample from a2x3matrix normal distributionId1an integer ranging from1to2,the number of rows of the matrix normal distributionId2an integer ranging from1to3,the number of columns of the matrix normal distribution value2d the sample data for the observed variabledata3d Three dimensional data setDescriptionAn i.i.d.random sample of size13from a2x3x2tensor normal distribution,for a small numerical example of the use of the functions mle3d_svc and lrt3d_svc from the sEparaTe packageUsagedata3dFormatA frame(excluding the headings)with156lines of data and5variables:K an integer ranging from1to13,the size of an i.i.d.random sample from a2x3x2tensor matrix normal distributionId3an integer ranging from1to2,the number of rows of the3rd-order tensor normal distribution Id4an integer ranging from1to3,the number of columns of the3rd-order tensor normal distribu-tionId5an integer ranging from1to2,the number of edges of the3rd-order tensor normal distribution value3d the sample data for the observed variablelrt2d_svc Unbiased modified likelihood ratio test for simple separability of avariance-covariance matrix.DescriptionA likelihood ratio test(LRT)for simple separability of a variance-covariance matrix,modified tobe unbiased infinite samples.The modification is a penalty-based homothetic transformation of the LRT statistic.The penalty value is optimized for a given mean model,which is left unstruc-tured here.In the required function,the Id1and Id2variables correspond to the row and column subscripts,respectively;“value2d”refers to the observed variable.Usagelrt2d_svc(value2d,Id1,Id2,subject,data_2d,eps,maxiter,startmat,sign.level,n.simul)Argumentsvalue2d from the formula value2d~Id1+Id2Id1from the formula value2d~Id1+Id2Id2from the formula value2d~Id1+Id2subject the replicate,also called the subject or individual,thefirst column in the matrix (2d)datafiledata_2d the name of the matrix dataeps the threshold in the stopping criterion for the iterative mle algorithm(estimation) maxiter the maximum number of iterations for the mle algorithm(estimation)startmat the value of the second factor variance-covariance matrix used for initialization,i.e.,to start the mle algorithm(estimation)and obtain the initial estimate of thefirst factor variance-covariance matrixsign.level the significance level,or rejection rate in the testing of the null hypothesis of simple separability for a variance-covariance structure,when the unbiased mod-ified LRT is used,i.e.,the critical value in the chi-square test is derived bysimulations from the sampling distribution of the LRT statistic n.simul the number of simulations used to build the sampling distribution of the LRT statistic under the null hypothesis,using the same characteristics as the i.i.d.random sample from a matrix normal distributionOutput“Convergence”,TRUE or FALSE“chi.df”,the theoretical number of degrees of freedom of the asymptotic chi-square distribution that would apply to the unmodified LRT statistic for simple separability of a variance-covariance structure“Lambda”,the observed value of the unmodified LRT statistic“critical.value”,the critical value at the specified significance level for the chi-square distribution with“chi.df”degrees of freedom“mbda”will indicate whether or not the null hypothesis of separability was rejected, based on the theoretical LRT statistic“Simulation.critical.value”,the critical value at the specified significance level that is derived from the sampling distribution of the unbiased modified LRT statistic“mbda.simulation”,the decision(acceptance/rejection)regarding the null hypothesis of simple separability,made using the theoretical(biased unmodified)LRT“Penalty”,the optimized penalty value used in the homothetic transformation between the biased unmodified and unbiased modified LRT statistics“U1hat”,the estimated variance-covariance matrix for the rows“Standardized_U1hat”,the standardized estimated variance-covariance matrix for the rows;the standardization is performed by dividing each entry of U1hat by entry(1,1)of U1hat“U2hat”,the estimated variance-covariance matrix for the columns“Standardized_U2hat”,the standardized estimated variance-covariance matrix for the columns;the standardization is performed by multiplying each entry of U2hat by entry(1,1)of U1hat“Shat”,the sample variance-covariance matrix computed from the vectorized data matrices ReferencesManceur AM,Dutilleul P.2013.Unbiased modified likelihood ratio tests for simple and double separability of a variance-covariance structure.Statistics and Probability Letters83:631-636.Examplesoutput<-lrt2d_svc(data2d$value2d,data2d$Id1,data2d$Id2,data2d$K,data_2d=data2d,n.simul=100)outputlrt3d_svc An unbiased modified likelihood ratio test for double separability of avariance-covariance structure.DescriptionA likelihood ratio test(LRT)for double separability of a variance-covariance structure,modified tobe unbiased infinite samples.The modification is a penalty-based homothetic transformation of the LRT statistic.The penalty value is optimized for a given mean model,which is left unstructured here.In the required function,the Id3,Id4and Id5variables correspond to the row,column and edge subscripts,respectively;“value3d”refers to the observed variable.Usagelrt3d_svc(value3d,Id3,Id4,Id5,subject,data_3d,eps,maxiter,startmatU2,startmatU3,sign.level,n.simul)Argumentsvalue3d from the formula value3d~Id3+Id4+Id5Id3from the formula value3d~Id3+Id4+Id5Id4from the formula value3d~Id3+Id4+Id5Id5from the formula value3d~Id3+Id4+Id5subject the replicate,also called individualdata_3d the name of the tensor dataeps the threshold in the stopping criterion for the iterative mle algorithm(estimation) maxiter the maximum number of iterations for the mle algorithm(estimation)startmatU2the value of the second factor variance-covariance matrix used for initialization startmatU3the value of the third factor variance-covariance matrix used for initialization,i.e.,startmatU3together with startmatU2are used to start the mle algorithm(estimation)and obtain the initial estimate of thefirst factor variance-covariancematrix U1sign.level the significance level,or rejection rate in the testing of the null hypothesis of simple separability for a variance-covariance structure,when the unbiased mod-ified LRT is used,i.e.,the critical value in the chi-square test is derived bysimulations from the sampling distribution of the LRT statistic n.simul the number of simulations used to build the sampling distribution of the LRT statistic under the null hypothesis,using the same characteristics as the i.i.d.random sample from a tensor normal distributionOutput“Convergence”,TRUE or FALSE“chi.df”,the theoretical number of degrees of freedom of the asymptotic chi-square distribution that would apply to the unmodified LRT statistic for double separability of a variance-covariance structure“Lambda”,the observed value of the unmodified LRT statistic“critical.value”,the critical value at the specified significance level for the chi-square distribution with“chi.df”degrees of freedom“mbda”,the decision(acceptance/rejection)regarding the null hypothesis of double sep-arability,made using the theoretical(biased unmodified)LRT“Simulation.critical.value”,the critical value at the specified significance level that is derived from the sampling distribution of the unbiased modified LRT statistic“mbda.simulation”,the decision(acceptance/rejection)regarding the null hypothesis of double separability,made using the unbiased modified LRT“Penalty”,the optimized penalty value used in the homothetic transformation between the biased unmodified and unbiased modified LRT statistics“U1hat”,the estimated variance-covariance matrix for the rows“Standardized_U1hat”,the standardized estimated variance-covariance matrix for the rows;the standardization is performed by dividing each entry of U1hat by entry(1,1)of U1hat“U2hat”,the estimated variance-covariance matrix for the columns“Standardized_U2hat”,the standardized estimated variance-covariance matrix for the columns;the standardization is performed by multiplying each entry of U2hat by entry(1,1)of U1hat“U3hat”,the estimated variance-covariance matrix for the edges“Shat”,the sample variance-covariance matrix computed from the vectorized data tensorsReferencesManceur AM,Dutilleul P.2013.Unbiased modified likelihood ratio tests for simple and double separability of a variance-covariance structure.Statistics and Probability Letters83:631-636.Examplesoutput<-lrt3d_svc(data3d$value3d,data3d$Id3,data3d$Id4,data3d$Id5,data3d$K,data_3d=data3d,n.simul=100)outputmle2d_svc Maximum likelihood estimation of the parameters of a matrix normaldistributionDescriptionMaximum likelihood estimation for the parameters of a matrix normal distribution X,which is char-acterized by a simply separable variance-covariance structure.In the general case,which is the case considered here,two unstructured factor variance-covariance matrices determine the covariability of random matrix entries,depending on the row(one factor matrix)and the column(the other factor matrix)where two X-entries are.In the required function,the Id1and Id2variables correspond to the row and column subscripts,respectively;“value2d”indicates the observed variable.Usagemle2d_svc(value2d,Id1,Id2,subject,data_2d,eps,maxiter,startmat)Argumentsvalue2d from the formula value2d~Id1+Id2Id1from the formula value2d~Id1+Id2Id2from the formula value2d~Id1+Id2subject the replicate,also called individualdata_2d the name of the matrix dataeps the threshold in the stopping criterion for the iterative mle algorithmmaxiter the maximum number of iterations for the iterative mle algorithmstartmat the value of the second factor variance-covariance matrix used for initializa-tion,i.e.,to start the algorithm and obtain the initial estimate of thefirst factorvariance-covariance matrixOutput“Convergence”,TRUE or FALSE“Iter”,will indicate the number of iterations needed for the mle algorithm to converge“Xmeanhat”,the estimated mean matrix(i.e.,the sample mean)“First”,the row subscript,or the second column in the datafile“U1hat”,the estimated variance-covariance matrix for the rows“Standardized.U1hat”,the standardized estimated variance-covariance matrix for the rows;the stan-dardization is performed by dividing each entry of U1hat by entry(1,1)of U1hat“Second”,the column subscript,or the third column in the datafile“U2hat”,the estimated variance-covariance matrix for the columns“Standardized.U2hat”,the standardized estimated variance-covariance matrix for the columns;the standardization is performed by multiplying each entry of U2hat by entry(1,1)of U1hat“Shat”,is the sample variance-covariance matrix computed from of the vectorized data matrices ReferencesDutilleul P.1990.Apport en analyse spectrale d’un periodogramme modifie et modelisation des series chronologiques avec repetitions en vue de leur comparaison en frequence.D.Sc.Dissertation, Universite catholique de Louvain,Departement de mathematique.Dutilleul P.1999.The mle algorithm for the matrix normal distribution.Journal of Statistical Computation and Simulation64:105-123.Examplesoutput<-mle2d_svc(data2d$value2d,data2d$Id1,data2d$Id2,data2d$K,data_2d=data2d) outputmle3d_svc Maximum likelihood estimation of the parameters of a3rd-order ten-sor normal distributionDescriptionMaximum likelihood estimation for the parameters of a3rd-order tensor normal distribution X, which is characterized by a doubly separable variance-covariance structure.In the general case, which is the case considered here,three unstructured factor variance-covariance matrices determine the covariability of random tensor entries,depending on the row(one factor matrix),the column (another factor matrix)and the edge(remaining factor matrix)where two X-entries are.In the required function,the Id3,Id4and Id5variables correspond to the row,column and edge subscripts, respectively;“value3d”indicates the observed variable.Usagemle3d_svc(value3d,Id3,Id4,Id5,subject,data_3d,eps,maxiter,startmatU2,startmatU3)Argumentsvalue3d from the formula value3d~Id3+Id4+Id5Id3from the formula value3d~Id3+Id4+Id5Id4from the formula value3d~Id3+Id4+Id5Id5from the formula value3d~Id3+Id4+Id5subject the replicate,also called individualdata_3d the name of the tensor dataeps the threshold in the stopping criterion for the iterative mle algorithmmaxiter the maximum number of iterations for the iterative mle algorithmstartmatU2the value of the second factor variance covariance matrix used for initialization startmatU3the value of the third factor variance covariance matrix used for initialization,i.e.,startmatU3together with startmatU2are used to start the algorithm andobtain the initial estimate of thefirst factor variance covariance matrix U1Output“Convergence”,TRUE or FALSE“Iter”,the number of iterations needed for the mle algorithm to converge“Xmeanhat”,the estimated mean tensor(i.e.,the sample mean)“First”,the row subscript,or the second column in the datafile“U1hat”,the estimated variance-covariance matrix for the rows“Standardized.U1hat”,the standardized estimated variance-covariance matrix for the rows;the stan-dardization is performed by dividing each entry of U1hat by entry(1,1)of U1hat“Second”,the column subscript,or the third column in the datafile“U2hat”,the estimated variance-covariance matrix for the columns“Standardized.U2hat”,the standardized estimated variance-covariance matrix for the columns;the standardization is performed by multiplying each entry of U2hat by entry(1,1)of U1hat“Third”,the edge subscript,or the fourth column in the datafile“U3hat”,the estimated variance-covariance matrix for the edges“Shat”,the sample variance-covariance matrix computed from the vectorized data tensorsReferenceManceur AM,Dutilleul P.2013.Maximum likelihood estimation for the tensor normal distribution: Algorithm,minimum sample size,and empirical bias and dispersion.Journal of Computational and Applied Mathematics239:37-49.10sEparaTeExamplesoutput<-mle3d_svc(data3d$value3d,data3d$Id3,data3d$Id4,data3d$Id5,data3d$K,data_3d=data3d) outputsEparaTe MLE and LRT functions for separable variance-covariance structuresDescriptionA package for maximum likelihood estimation(MLE)of the parameters of matrix and3rd-ordertensor normal distributions with unstructured factor variance-covariance matrices(two procedures),and for unbiased modified likelihood ratio testing(LRT)of simple and double separability forvariance-covariance structures(two procedures).Functionsmle2d_svc,for maximum likelihood estimation of the parameters of a matrix normal distributionmle3d_svc,for maximum likelihood estimation of the parameters of a3rd-order tensor normaldistributionlrt2d_svc,for the unbiased modified likelihood ratio test of simple separability for a variance-covariance structurelrt3d_svc,for the unbiased modified likelihood ratio test of double separability for a variance-covariance structureDatadata2d,a two-dimensional data setdata3d,a three-dimensional data setReferencesDutilleul P.1999.The mle algorithm for the matrix normal distribution.Journal of StatisticalComputation and Simulation64:105-123.Manceur AM,Dutilleul P.2013.Maximum likelihood estimation for the tensor normal distribution:Algorithm,minimum sample size,and empirical bias and dispersion.Journal of Computational andApplied Mathematics239:37-49.Manceur AM,Dutilleul P.2013.Unbiased modified likelihood ratio tests for simple and doubleseparability of a variance covariance structure.Statistics and Probability Letters83:631-636.Index∗datasetsdata2d,2data3d,2data2d,2data3d,2lrt2d_svc,3lrt3d_svc,5mle2d_svc,7mle3d_svc,8sEparaTe,1011。
ACM2012
Common Mode Choke Coils for Signal Line SMDFEATURES•Although greatly miniaturized, this wire-wound chip-type filter maintains the characteristics needed for a common-mode filter. Common-mode impedance is 1000Ω [at 100MHz], so this filter is greatly effective in supporting noise.•Almost no affect upon even high speed signals since differential mode impedance is kept low.•This series includes both 2-line and 3-line types. They are used for various types of circuits and noise.APPLICATIONS•Used for radiation noise suppression for any electronic devices. •Used to counter common-mode noise affecting signals within high speed lines.•USB line for personal computers and peripheral equipment. •IEEE1394 line for personal computers, DVC, STB, etc.•LVDS, panel link line for liquid crystal display panels.SHAPES AND DIMENSIONS/CIRCUIT DIAGRAMS/RECOMMENDED PC BOARD PATTERNS 2-LINE TYPE ACM2012-2PPRODUCT IDENTIFICATION (1) Series name (2) Dimensions L ×W 2012: 2.0×1.2mm(3) Impedance[at 100MHz]900: 90Ω(4) Number of line 2P:2-line 3P:3-line(5) Packaging styleT: ø180mm reel taping TL: ø330mm reel taping (6) TDK internal code TEMPERATURE RANGESPACKAGING STYLE AND QUANTITIESACM2520-2PACM3225-2PACM 2012 -900-2P -T Operating–25 to +85°CPackaging styleType Reel QuantityTapingACM2012ø330mm 10000 pieces/reel ACM2520ø180mm 2000 pieces/reel ø330mm 10000 pieces/reelACM3225ø330mm 5000 pieces/reel ACM4532ø180mm 500 pieces/reelCommon Mode Choke Coils for Signal Line SMDSHAPES AND DIMENSIONS/CIRCUIT DIAGRAMS/RECOMMENDED PC BOARD PATTERNS 3-LINE TYPE ACM2520-3P ACM4532-102-3PELECTRICAL CHARACTERISTICSPart No.(Ω)typ.[100MHz](Ω)max.[Per 1line]Edc(V)max.Idc(A)max.2-LINEACM2012-201-2P 2000.25500.35ACM2520-451-2P 4500.4200.35ACM2520-601-2P 6000.45200.3ACM3225-800-2P 800.15200.4ACM3225-161-2P 1600.2200.353-LINECommon Mode Choke Coils for Signal Line SMDTYPICAL ELECTRICAL CHARACTERISTICSIMPEDANCE vs. FREQUENCY CHARACTERISTICS ACM2012-900-2P ACM2012-121-2PACM2012-201-2PACM2012-361-2PACM2520-301-2PACM2520-451-2PACM2520-601-2PACM2520-102-2PACM3225-800-2PACM3225-161-2PACM3225-271-2PACM3225-102-2PMEASURING CIRCUITS 2-LINECommon Mode Choke Coils for Signal LineSMDTYPICAL ELECTRICAL CHARACTERISTICSIMPEDANCE vs. FREQUENCY CHARACTERISTICS MEASURING CIRCUITS ACM2520-801-3P ACM4532-102-3P3-LINE。
COMP5211_Algorithms_2012 Semester 2_5_dp
What’s the pattern?
Dynamic Programming - Julián Mestre
2
A counting problem
To see the pattern, condition on the last move
Dynamic Programming - Julián Mestre
7
Recursive algorithm
def MWIS(intervals,w): def helper(i): if i == 0: return 0 return max(helper(i-1), w[i] + helper(p[i])
6
The structure of optimum
Assume intervals are sorted so that f1 ≤ f2 ≤ ⋯ ≤ fn Let OPT(i) be an optimal solution for intervals {1, …, i} Obs 1: If interval n ∉ OPT(n) then OPT(n) = OPT(n-1) Obs 2: If interval n ∈ OPT(n) then OPT(n) = {n} ∪ OPT(p(n)), where p(i) is the largest index such that fp(i) ≤ si Let M(i) be the value of the optimal solution then M(i) = max { M(i-1), w(i) + M(p(i) } for i > 0
COMP5211_Algorithms_2012 Semester 2_10_beyond_NP
Beyond NP - Julián Mestre
4
Asymmetric definition of NP
Recall that a problem is in NP if we can verify “yes instances” efficiently. Why not verifying “no instances”? Def.: coNP is the class of problems that admit a polynomial time verifier for “no instances” Examples of coNP problems:
Here is an example using Sydney suburbs:
- Darlington, Newtown, Neutral Bay,Yarramundi, Illawong, Glebe, Enmore, Eveleigh, Haymarket, The Rocks, Summer Hill, Lewisham, etc.
Examples:
- Suppose ∃ x1∀ x2 ∃ x3 : (x1 ∨ x2) ∧ (¬x1 ∨ x3) ∧ (¬x2 ∨ ¬x3)? The answer is “no”: If x2 = x1, the formula is False, no matter the value of x3 - Suppose ∃ x1∀ x2 ∃ x3 : (x1 ∨ x2) ∧ (¬x3 ∨ x2) ∧ (¬x2 ∨ x3)? The answer is “yes”: x1= True and x3 = x2
The Not So Short Introduction to LATEX 2ε Or L ATEX2e in 85 minutes
Chapter 2 goes into the details of typesetting your documents. It explains A most of the essential L TEX commands and environments. After reading this chapter you will be able to write your first documents.
The Not So Short A Introduction to L TEX 2ε
A Or L TEX2e in 85 minutes
by Tobias Oetiker Hubert Partl, Irene Hyna and Elisabeth Schlegl Version 3.1, 14. April, 1998
Thank you!
Much of the material used in this introduction comes from an Austrian A introduction to L TEX 2.09 written in German by: Hubert Partl <partl@mail.boku.ac.at>
Elisabeth Schlegl <no email>
in Graz
If you are interested in the German document you can find a version A updated for L TEX 2ε by J¨ org Knappen at CTAN:/tex-archive/info/lkurz
A Chapter 3 explains how to typeset formulae with L TEX. Again a lot of exA amples help you to understand how to use one of L TEX main strengths. At the end of this chapter you will find tables, listing all the matheA matical symbols available in L TEX.
ACER_用户手册说明书
Figure 3: ACER program main window.
Within the first section “Build ACER functions for different k” you have to load data and initiate constants that enable calculation and plotting of ACER functions.
3 www.cesos.ntnu.no
Figure 1: Extraction of files
1. Using “Browse…” and “Install” buttons to extract files. Installation of MATLAB Compiler Runtime (MCR) will start automatically after extracting files. This is crucial since the MATLAB Compiler lets you run ACER_v2 application outside the MATLAB environment. We recommend that you to restart your computer after setup has finished.
ACER_v2_Online_Installer - 3 Mb installation wizard, which also comprises the ACER app, but this time - together with the downloader of the MATLAB Runtime Compiler R2021b. It requires a good stable Internet connection to first download the MCR and then install it and the ACER app. Other than that, the installation wizard is absolutely alike the offline one. Download ACER_v2_Online_Installer.exe
glpkAPI - GLPK(GNU Linear Programming Kit)的低级接口 Qu
glpkAPI–Quick StartGabriel Gelius-DietrichNovember10,20221IntroductionThe package glpkAPI provides a low level interface to the C API of GLPK1,the GNU Linear Programming Kit.It is similar in purpose to the package glpk2,but glpkAPI relies on a separate installation of GLPK.2InstallationThe package glpkAPI depends on a working installation of GLPK(in particular libraries and headerfiles).It is recommended to link GLPK to the GNU Multiple Precision Arithmetic Library Library(GMP)3in order to gain more performance when using the exact simplex algorithm.See INSTALL for installation instructions and platform specific details.CRAN4provides binary versions of glpkAPI for Windows and MacOS X,no other software is required here.3Usage3.1Creating and solving a linear optimization problemIn the following,an example lp-problem will be created and solved.It is the same lp-problem which is used in the GLPK manual:maximizez=10x1+6x2+4x3subject tox1+x2+x3≤10010x1+4x2+5x3≤6002x1+2x2+6x3≤300With all variables being non-negative.1Andrew Makhorin:GNU Linear Programming Kit,Version4.42(or higher)http://www.gnu.org/software/glpk/glpk.html 2Maintained by Lopaka Lee,available on CRAN /package=glpk3/4/1Load the library.>library(glpkAPI)Create an empty problem object.>prob<-initProbGLPK()Assign a name to the problem object.>setProbNameGLPK(prob,"sample")Set the direction of optimization.The object GLP_MAX is a predefined constant used by GLPK.A list of all available contants is written in the documentation glpkConstants. >setObjDirGLPK(prob,GLP_MAX)Add three rows and three colunms to the problem object.>addRowsGLPK(prob,3)[1]1>addColsGLPK(prob,3)[1]1Set row and column names.>setRowNameGLPK(prob,1,"p")>setRowNameGLPK(prob,2,"q")>setRowNameGLPK(prob,3,"r")>setColNameGLPK(prob,1,"x1")>setColNameGLPK(prob,2,"x2")>setColNameGLPK(prob,3,"x3")Set the type and bounds of the rows.>setRowBndGLPK(prob,1,GLP_UP,0,100)>setRowBndGLPK(prob,2,GLP_UP,0,600)>setRowBndGLPK(prob,3,GLP_UP,0,300)Set the type and bounds of rows using a function which has the ability to work with vectors.>lb<-c(0,0,0)>ub<-c(100,600,300)>type<-rep(GLP_UP,3)>setRowsBndsGLPK(prob,1:3,lb,ub,type)2Set the type and bounds of the columns.>setColBndGLPK(prob,1,GLP_LO,0,0)>setColBndGLPK(prob,2,GLP_LO,0,0)>setColBndGLPK(prob,3,GLP_LO,0,0)Set the objective function.>setObjCoefGLPK(prob,1,10)>setObjCoefGLPK(prob,2,6)>setObjCoefGLPK(prob,3,4)Set the type and bounds of columns and the objective function using a function which has the ability to work with vectors.>lb<-c(0,0,0)>ub<-lb>type<-rep(GLP_LO,3)>obj<-c(10,6,4)>setColsBndsObjCoefsGLPK(prob,1:3,lb,ub,obj,type)Load the constraint matrix.>ia<-c(1,1,1,2,3,2,3,2,3)>ja<-c(1,2,3,1,1,2,2,3,3)>ar<-c(1,1,1,10,2,4,2,5,6)>loadMatrixGLPK(prob,9,ia,ja,ar)Solve the problem using the simplex algorithm.>solveSimplexGLPK(prob)[1]0Retrieve the value of the objective function after optimization.>getObjValGLPK(prob)[1]733.3333Retrieve the values of the structural variables(columns)after optimization.>getColPrimGLPK(prob,1)[1]33.33333>getColPrimGLPK(prob,2)[1]66.666673>getColPrimGLPK(prob,3)[1]0Retrieve all primal values of the structural variables(columns)after optimization.>getColsPrimGLPK(prob)[1]33.3333366.666670.00000Retrieve all dual values of the structural variables(columns)after optimization(reduced costs).>getColsDualGLPK(prob)[1]0.0000000.000000-2.666667Print the solution to textfile sol.txt.>printSolGLPK(prob,"sol.txt")[1]0Write the problem tofile prob.lp in lp format.>writeLPGLPK(prob,"prob.lp")[1]0Read problem fromfile prob.lp in lp format.>lp<-initProbGLPK()>readLPGLPK(lp,"prob.lp")[1]0Free memory,allacated to the problem object.>delProbGLPK(prob)>delProbGLPK(lp)3.2Setting control prarmetersAll parameters and possible values are described in the documentation,see>help(glpkConstants)for details.The control parameters used by glpkAPI have the same names like those from GLPK,except that they are written in capital letters.For example,the parameter tm_lim in GLPK is TM_LIM in glpkAPI.The prarmeters are stored in a structure available only once per R session.Set the searching time limit to one second.>setSimplexParmGLPK(TM_LIM,1000)44Function names4.1SearchingThe function names in glpkAPI are different from the names in GLPK,e.g.the function addColsGLPK in glpkAPI is called glp_add_cols in GLPK.The directory inst/containes afile c2r.map which maps a GLPK function name to the corresponding glpkAPI function name.Additionally,all man-pages contain an alias to the GLPK function name.The call>help("glp_add_cols")will bring up the man-page of addColsGLPK.Keep in mind that most of the GLPK functions do not work on vectors.For example the function setColBndGLPK(which is glp_set_col_bnds in GLPK)sets the upper and lower bounds for exactly one column. The function setColsBndsGLPK in glpkAPI can handle a vector of column indices.Assume,we have a problem containing1000columns and600rows,with all variables having a lower bound of zero and an upper bound of25.The problem will be created as follows.>prob<-initProbGLPK()>addColsGLPK(prob,1000)[1]1>addRowsGLPK(prob,600)[1]1Now we can set the column bounds via mapply and setColBndGLPK.>system.time(+mapply(setColBndGLPK,j=1:1000,+MoreArgs=list(lp=prob,type=GLP_DB,lb=0,ub=25))+)User System verstrichen0.0080.0000.009Or we use the simpler call to setColsBndsGLPK.>system.time(+setColsBndsGLPK(prob,j=1:1000,+type=rep(GLP_DB,1000),+lb=rep(0,1000),+ub=rep(0,1000))+)User System verstrichen000The latter call is also much faster.54.2MappingThefile c2r.map in inst/maps the glpkAPI function names to the orininal GLPK function names of its C-API.To use the latter,run>c2r<-system.file(package="glpkAPI","c2r.map")>source(c2r)now either>pr1<-initProbGLPK()>delProbGLPK(pr1)or the original functions>pr2<-glp_create_prob()>glp_delete_prob(pr2)work both.Keep in mind that the mapping only affects the function names not the arguments of a function.6。
CC110x CC111x OOK ASK Register Settings说明书
CC110x/CC111x OOK/ASK Register SettingsBy Sverre HellanKeywordsOOKASKPER (Packet Error Rate)CC1100CC1100ECC1101CC1110CC1111CC4301 IntroductionThis design note provides guidelines forfinding optimum register settings forOOK/ASK operation. The starting point forthe optimization is the preferred settingsgiven by the SmartRF®Studio SW. Theuser needs to measure the sensitivity(PER) over the full input dynamic range todetermine the optimum settings.This design note uses CC1101 as anexample on how to find optimum registersettings, but it is also applicable forCC1100, CC1100E, CC1110, CC1111,and CC430.Table of ContentsKEYWORDS (1)1INTRODUCTION (1)2ABBREVIATIONS (2)3OOK/ASK REGISTER SETTINGS (3)3.1AGC S ETTINGS (3)3.2IF F REQUENCY (4)3.3P ROCEDURE FOR F INDING OOK/ASK S ETTINGS USING S MART RF®S TUDIO (5)4GENERAL INFORMATION (8)4.1D OCUMENT H ISTORY (8)2 AbbreviationsAGC Automatic Gain ControlASK Amplitude Shift KeyingEM Evaluation Module2-FSK Frequency Shift KeyingGFSK Gaussian shaped Frequency Shift KeyingIF Intermediate FrequencyMSK Minimum Shift KeyingOOK On-Off KeyingPER Packet Error RateSW Software3 OOK/ASK Register Settings3.1 AGC SettingsThe register settings provided by SmartRF®Studio have been optimized for 2-FSK/GFSK/MSK modulation and when using one of the preferred settings and only changing the modulation format to OOK/ASK, the AGC settings might result in unstable or non-optimum reception (i.e. degraded sensitivity). This is pictured in Figure 1.Figure 1. Example of Unstable, Non-Optimum, and Optimum ReceptionThe optimum AGC settings change with RX filter bandwidth and data rate, but for OOK/ASK the following has been found to give good results:AGCCTRL2 = 0x03 to 0x07AGCCTRL1 = 0x00AGCCTRL0 = 0x91 or 0x92In the example shown in Figure 2, the best sensitivity is achieved with AGCCTRL2 = 0x04, AGCCTRL1 = 0x00, and AGCCTRL0 = 0x92. Please note that optimum register settings change with data rate so it is important to measure sensitivity for different combinations of AGCCTRL2 and AGCCTRL0. Furthermore, as shown in Figure 1, some combinations of AGC settings results in unstable reception. That is, for some input power levels above the sensitivity limit there will be degraded packet error rate (PER). It is therefore important to check the PER for the entire dynamic range and not only at the sensitivity limit. One option is to check the PER for every 2 dB increase in input power level.AGCCTRL2.MAGN_TARGET[2:0] is used to set an on-chip target value for the peak signal amplitude. MAGN_TARGET is used by the AGC loop to set the correct gain.AGCCTRL0.FILTER_LENGTH[1:0] is used to configure the ASK decision boundary. If the ASK decision boundary is set to 8 dB, the “low” bit must be at least 16 dB below the “high” bit.Figure 2. PER versus Input Power Level for Different AGC Register Settings (3.8 kBaud,100 kHz RX Filter Bandwidth) 3.2IF FrequencyRegister FSCTRL1 sets the IF frequency and the optimum value is different for different RX filter bandwidths. It is therefore recommended to find the FSCTRL1 setting using one of thepreferred RX filter bandwidth settings in SmartRF ®Studio (see Figure 3). If the wanted RX filter bandwidth is not given by one of the preferred settings, choose the FSCTRL1 setting for the first RX filter bandwidth that is wider than the wanted RX filter bandwidth.As an example, for a wanted 150 kHz RX filter bandwidth use the FSCTRL1 setting given for 232 kHz RX filter bandwidth.RX filter bandwidthsused by preferred settings:58 kHz, 100 kHz, 232 kHz, 325 kHz, 540 kHz, 812 kHzFigure 3. Available RX Filter Bandwidths Given by the Preferred Settings in SmartRF ®StudioNote that the FREND1, FIFOTHR, TEST2, and TEST1 register settings change for different RX filter bandwidths.FREND1:RX filter bandwidth > 101 kHz, FREND1 = 0xB6RX filter bandwidth ≤ 101 kHz, FREND1 = 0x56TEST2:RX filter bandwidth > 325 kHz, TEST2 = 0x88RX filter bandwidth ≤ 325 kHz, TEST2 = 0x81TEST1:RX filter bandwidth > 325 kHz, TEST1 = 0x31RX filter bandwidth ≤ 325 kHz, TEST1 = 0x35FIFOTHR:RX filter bandwidth > 325 kHz, FIFOTHR = 0x07RX filter bandwidth ≤ 325 kHz, FIFOTHR = 0x473.3 Procedure for Finding OOK/ASK Settings using SmartRF® StudioAs an example, assume 4.8 kBaud data rate and 203 kHz RX filter bandwidth.1) Use SmartRF®Studio to find the optimum IF frequency. Select the preferred setting that has an RX filter bandwidth equal to the wanted bandwidth. If the wanted RX filter bandwidth is not given by one of the preferred settings, chose the first RX filter bandwidth that is wider than the wanted bandwidth. For a 203 kHz wanted RX filter bandwidth, select the 232 kHz RX filter bandwidth for optimum IF frequency.2) Change the data rate and the RX filter bandwidth to the wanted values. Change the modulation format to ASK/OOK. Press “Reset CC1101 and write settings” (if SmartRF® Studio is being used to control a CC1101EM) and then “Copy settings to Register View”3) In Register View, change the AGCCTRL2, AGCCTRL1, and AGCCTRL0 settings as explained in Section 3.1. Make sure the FSCTRL1, FIFOTHR, FREND1, TEST2, and TEST1 registers are set as explained in Section 3.2. It is possible to print the register settings to a file using “Export CC1101 Registers” under “File”.Press the “Write” butt on for the register to be updated if SmartRF® Studio is being used to control a CC1101EM.4) If SmartRF ®Studio is being used to perform the test, go back to Normal View. Check the Manual Init box for the changes done in Register View to take effect.4 General Information4.1Document HistoryIMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries(TI)reserve the right to make corrections,modifications,enhancements,improvements, and other changes to its products and services at any time and to discontinue any product or service without notice.Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty.Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty.Except where mandated by government requirements,testing of all parameters of each product is not necessarily performed.TI assumes no liability for applications assistance or customer product design.Customers are responsible for their products and applications using TI components.To minimize the risks associated with customer products and applications,customers should provide adequate design and operating safeguards.TI does not warrant or represent that any license,either express or implied,is granted under any TI patent right,copyright,mask work right, or other TI intellectual property right relating to any combination,machine,or process in which TI products or services are rmation published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement e of such information may require a license from a third party under the patents or other intellectual property of the third party,or a license from TI under the patents or other intellectual property of TI.Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties,conditions,limitations,and notices.Reproduction of this information with alteration is an unfair and deceptive business practice.TI is not responsible or liable for such altered rmation of third parties may be subject to additional restrictions.Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice.TI is not responsible or liable for any such statements.TI products are not authorized for use in safety-critical applications(such as life support)where a failure of the TI product would reasonably be expected to cause severe personal injury or death,unless officers of the parties have executed an agreement specifically governing such use.Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications,and acknowledge and agree that they are solely responsible for all legal,regulatory and safety-related requirements concerning their products and any use of TI products in such safety-critical applications,notwithstanding any applications-related information or support that may be provided by TI.Further,Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in such safety-critical applications.TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are specifically designated by TI as military-grade or"enhanced plastic."Only products designated by TI as military-grade meet military specifications.Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at the Buyer's risk,and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are designated by TI as compliant with ISO/TS16949requirements.Buyers acknowledge and agree that,if they use any non-designated products in automotive applications,TI will not be responsible for any failure to meet such requirements.Following are URLs where you can obtain information on other Texas Instruments products and application solutions:Products ApplicationsAudio /audio Automotive and Transportation /automotiveAmplifiers Communications and Telecom /communicationsData Converters Computers and Peripherals /computersDLP®Products Consumer Electronics /consumer-appsDSP Energy and Lighting /energyClocks and Timers /clocks Industrial /industrialInterface Medical /medicalLogic Security /securityPower Mgmt Space,Avionics and Defense /space-avionics-defense Microcontrollers Video and Imaging /videoRFID OMAP Mobile Processors /omapWireless Connectivity /wirelessconnectivityTI E2E Community Home Page Mailing Address:Texas Instruments,Post Office Box655303,Dallas,Texas75265Copyright©2012,Texas Instruments Incorporated。
字母不重复的子串-概述说明以及解释
字母不重复的子串-概述说明以及解释1.引言1.1 概述字母不重复的子串是指在一个字符串中,找出不包含重复字母的最长子串。
也就是说,子串中的每个字符在该子串中只出现一次。
这个问题在字符串处理和算法设计方面有着广泛的应用。
在实际生活中,我们经常需要处理包含字母的字符串,例如英文单词、句子甚至是DNA序列。
而找出其中不重复的子串,能够帮助我们理解字符串的特征和模式,从而进行更深入的分析和处理。
字母不重复的子串问题在实际应用中有着很广泛的应用。
以文本信息处理为例,比如在自然语言处理中,我们需要通过分析文本中的子串来提取关键词、识别命名实体等。
另外,在数据压缩和加密中,也经常需要使用字母不重复的子串来提高存储和传输的效率。
本文将深入探讨字母不重复的子串问题的意义和应用,并通过具体的算法设计与实例分析,展示如何高效地找出字母不重复的子串。
最后,我们将对问题进行总结,并展望未来该领域可能的发展方向。
让我们一起来探索吧!1.2 文章结构本文将分为三个主要部分进行讨论。
第一部分是引言部分。
在这部分中,我们将概述本文的主要内容,包括字母不重复的子串的概念和意义,以及本文的结构和目的。
第二部分是正文部分。
在这部分中,我们将详细讨论字母不重复的子串的意义和应用。
首先,我们将探讨字母不重复的子串在计算机科学领域的重要性,并介绍一些相关的算法和数据结构。
然后,我们将探讨字母不重复的子串在其他领域的应用,如自然语言处理、图像处理等。
通过这些案例研究,我们将阐述字母不重复的子串在现实生活中的实际应用和潜在价值。
第三部分是结论部分。
在这部分中,我们将对前文进行总结,并提出一些展望。
我们将回顾字母不重复的子串对于解决实际问题的作用,并讨论可能的未来研究方向。
我们还将提供一些实用建议,以帮助读者更好地理解和应用字母不重复的子串的概念。
通过以上结构,本文旨在全面介绍字母不重复的子串的意义和应用,并为读者提供深入理解和有效运用该概念的指导。
RCU 501 远程控制单元产品说明书
RCU501 is a high performance, general purpose, real-time process control computer for use in a wide variety of system applications in both on- and offshore installations. The processor core is an embedded Power PC™ architecture and the module is approved for Ex Zone 2 applications.Application types• Dynamic Positioning Systems• Thruster Control / Steering Systems • Navigation Sensor Integrator• Integrated Process Control Systems • Alarm and monitoring Systems • Safety SystemsFunction• Dual ethernet LAN process networks • Dual RedundancyNet interface for redundant RCU con fi guration• Dual Remote IO process BUS (RBUS) • 4 general purpose Digital Input channels • 4 general purpose Digital Output channels• 32 serial lines for 3rd party interface • 2 PROFIBUS channels for 3rd party interface• 2 CANBUS channels for 3rd party interfaceFeature• Single unit topology: SIL 1 compliant • Dual unit topology: SIL 2 and SIL 3compliant• Triple unit topology • Ex Zone 2 approved• Compliant to the following protocols:1. Modbus (Serial and TCP)2. NMEA 01833. PROFIBUS/PROFIsafe4. CAN/DeviceNet • 3rd party vendor speci fi c protocols are available upon request • Power:1. Redundant power input with power alarm monitoring2. Inrush current and over-voltage protection• Enhanced watchdog with fail-safe function and system status outputBene fi tsThe following built-in functions minimize system downtime:• Extended Built-in Self- Test (BIST) for computer diagnostics and fault identi fi cation during start-up and runtime • Prepared for online remote diagnostics • Prepared for online fi rmware upgrade • Bootable from fi le server or local fl ash memory• Easy installation and replacement 1. DIN Rail mounting2. All connections are pluggable3. 3 digit address switches• Hot swap in redundant applications,dual and triple Hot-Standby redundancy, 1oo2 redundancy• Status LED indication (Normal/Error)• RoHS compliantComputer performance• RCU501 performance is application dependant and governed by process complexity, updating frequency and number of interfaced I/O. Maximum updating frequency is 50 Hz.• Con fi guration guidelines:1. ESD/PSD: max. 800 I/O,F&G: max. 700 I/O both at scan rate: 1 Hz 2. Process/ Automation:max. 2000 I/O,design advice: 1280 I/O both at scan rate: 1 Hz3. Anti-surge: 3 loops, Scan rate: 50 Hz4. Dynamic Positioning: Tripleredundant DP system combined with Position Mooring. (Scan rate is adapted to signal processing and varies from 1 to 10 Hz).312729 Rev. B / September 2010KM article numberRCU501: 603439StandardsRCU501 complies with the following:• IACS E10• IEC 60533• IEC 60945• IEC 61508• IEC 62061Type approvalRCU501 is type approved by:• Det Norske Veritas (DNV)• The American Bureau of Shipping(ABS) • TÜV Rheinland• Wurldtech™; Achilles level 1certi fi edCE markingCE mark compliant, con fi rm to:• 2004/108/EC (EMC directive)• 94/9/EC (Atex directive)Ex certi fi cationEx nA II T4 (Zone 2)Environmental speci fi cationsAmbient temperatures and humidity:• Temp. Operation: -15˚C to 70˚C • Temp. Storage: -25˚C to 70˚C• Humidity Operation: Up to 98% RH • Humidity Storage: Up to 98% RH Protection Standards: IP 20DimensionsHeight: 355 mm Width: 158 mm Depth: 87 mm Weight: 1.35 kgCross point screw lock on DIN Rail T35 7.5/15 according to EN 50022ElectricalInput supply voltage: 24 VDC (+30%, -25%)Nominal current consumption: ≈ 0.8 A Start-up current: Max. 2.7 A Power consumption: Max. 20 W Heat dissipation: Max. 20 W Power connectors:• Screw terminals (slotted) • Cable cross section: 2.5 mm²Processor and memory Processor:• Type: Power PC TM host processorMPC8245• Clock frequency: 400 MHzMemory:• RAM size and speed: 64 MB @ 133MHz• PROM: 16 MB application fl ash-fi leSerial lineChannels: 32 insulated serial lines, distributed on 8 RJ45 connectors Physical layer: RS232, RS422 and RS485 Multidrop via RSER200Bit rate: Max. 115 kb/sGeneral purpose I/O channelsDigital Output (DO):• 4 x opto-isolated outputs• 1 x opto-isolated watchdog (forexternal interface)Digital Input (DI): 4 x opto-isolated inputsI/O connectors: • Cage clamps• Cable cross section: 1 mm²LAN interfaceProcess network & RedundancyNet: 2 x RJ45 Ethernet IEEE 802.3 type 10BASE-T/100BASE-TXRBUS interfaceConnector: 2 x RJ45Bit-rate: 2 Mb/sSignal code: Manchester encoded (Self-clocked)Copper wire topology:• Insulation: 500 V (Optocoupler)• Physical layer: RS485 Multidrop • Cable attenuation: < 6.5 db/100m @10 MHz (CAT 5)• Cable length: Max. 200 m betweenrepeaters. Max. 3 repeatersFibre optical topology (w/ additional fi bre media converter):• Fibre cable: 62.5/125 μm. Multimodus • Connector: ST • Cable length: Max. 1000 m (point to point). 500 m if used in patch-panel topology Field interfaceCAN interface:• 2 x CANopen/DeviceNet @ 5 polecage clamp terminals. 2.5 mm² cable • Bit rate: Max. 1 Mb/s. (DeviceNet notde fi ned above 500 kb/s)PROFIBUS interface:• 2 x opto-isolated 9 Pin femaleD-Sub connectors • Bit rate: Max. 12 Mb/sLife cycle predictionPredicted failure rate @ GB 25˚C (60% con fi dent, based on chip suppliers data): 24.2 YearsPredicted failure rate @ NS 35˚C(Environmental de-rating based on RomeLaboratory toolkit): 6.5 Years* KM reserves the right to make changes to the material or product described, at any time without notice.。
《网络服务器搭建、配置与管理-Linux(第二版)》课后习题答案
《网络服务器搭建、配置与管理-Linux版(第二版)》课后习题答案1.6 练习题一、选择题1. Linux最早是由计算机爱好者 B 开发的。
A. Richard PetersenB. Linus TorvaldsC. Rob PickD. Linux Sarwar2. 下列 C 是自由软件。
A. Windows XPB. UNIXC. LinuxD. Windows 20003. 下列 B 不是Linux的特点。
A. 多任务B. 单用户C. 设备独立性D. 开放性4. Linux的内核版本2.3.20是 A 的版本。
A. 不稳定B. 稳定的C. 第三次修订D. 第二次修订5. Linux安装过程中的硬盘分区工具是 D 。
A. PQmagicB. FDISKC. FIPSD. Disk Druid6. Linux的根分区系统类型是 C 。
A. FATl6B. FAT32C. ext4D. NTFS二、填空题1. GUN的含义是:GNU's Not UNIX。
2. Linux一般有3个主要部分:内核(kernel)、命令解释层(Shell或其他操作环境)、实用工具。
3. 安装Linux最少需要两个分区,分别是swap交换分区和/(根)分区。
4. Linux默认的系统管理员账号是root 。
三、简答题(略)1.简述Red Hat Linux系统的特点,简述一些较为知名的Linux发行版本。
2.Linux有哪些安装方式?安装Red Hat Linux系统要做哪些准备工作?3.安装Red Hat Linux系统的基本磁盘分区有哪些?4.Red Hat Linux系统支持的文件类型有哪些?2.6 练习题一、填空题1.SMB Server Message Block2.4453.nmbd smbd4.yum 源文件repo /etc/yum.repos.d/5./etc/samba smb.conf6.share user server domain ads user二、选择题1. (C )2. (C )3.(B )4. (AD )5.(B)6. (C )7.(A )8.(D )三、简答题(略)1.简述samba服务器的应用环境。
05_TestRequMaster1_2_Rev1_1_020808
AS-International AssociationActuator Sensor Interface(AS-Interface®)Test Requirements MasterVersion 1.2, Revision 1.1Apr. 05, 2002ConfidentialFor internal use of the members only or for companies which have bought the documentation from the AssociationTest Requirements Master 1.2 Rev. 1.1AcceptanceThese test requirements have been accepted by the Technical Commission of the AS International Association in its meeting on April 10, 2002 and by the Management Committee in its meeting on May 14, 2002.File date: August 8th, 2002Test Requirements for AS-Interface MasterContents:A. General (1)1. Basic tests (4)2. Simplified test (4)3. Additional tests (4)4. Precedence (4)B. Test instructions (4)1. Test instruction: Current consumption (5)2. Test instruction: Noise emission AS-i master (8)3. Test instructions: Impedance and symmetry measurement (11)4. Test instruction: Power-on behaviour (21)5. Test instruction: Burst test (25)6. Test instruction: Analogue part (31)7. Test instruction: Voltage cutoff (34)8. Test instruction: Logical start-up behaviour (37)9. Test instruction: Logical behaviour in normal operation (40)10. Test instruction: Analogue profile (43)11. Test instruction: Functions in accordance with PICS (45)12. Test instruction: Time response (49)13. Test instruction: Security of data (52)C. Forms for technical reports (56)Annex: (77)Test Requirements Master 1.2 Rev. 1.1A. General1. Basic testsThese test requirements for the AS-Interface master describe the minimum extent of a basic test to be carried out on the AS-i master to section 4.4 (2) of the Certification Guidelines (ZRL) for AS-i products.AS-i masters forming a part of a higher-level system, e.g. couplers (gateways) to higher-level bus systems or masters with integrated host functions (AS-i control) are also tested in accordance with these test requirements if applicable. Host functions shall be accessible or realised in the higher-level system in accordance with these test requirements.If an AS-i power supply is integrated in the AS-i master, the master is additionally subject to the test requirements for AS-i power supplies.If the AS-i master contains components already tested and approved by the AS-i Association these components will not be tested again (section 4.4 (3) of the ZRL).All standard AS-i components used for testing purposes shall be AS-i certified.2. Simplified testSimplified tests to section 4.5 ZRL shall use parts of these test requirements if applicable.3. Additional testsIn special cases the test laboratory is entitled to execute additional tests beyond these test requirements in accordance with the valid specification or shall demand them from the manufacturer.4. PrecedenceIn the case of discrepancies between these test requirements and the AS-i specifications the complete specification takes precedence.instructionsB. TestAll tests described in these test requirements shall have an accuracy of 1% unless stated otherwise, and shall be documented accordingly in the test protocols.For test purposes, the connection between the master and the AS-i shall be made by means of a split plug.All logical tests shall be recorded via AS-i bus monitor. All recordings of the monitor are saved as a file on a diskette which shall be part of the test report. In the case of errors in the logical tests a printout of the monitor recordings shall be made additionally. To protect the files from corruption, a check sum shall be put on the contents of the files. The directory listing contents and check sum shall be enclosed with the test report.1. Test instruction: Current consumptionReference: Specification AS-i master (chapter 7 of the Complete Specification),Master profiles,Test requirements for AS-i power supplies1.1 GeneralThe test requirements allow measurement of the current consumption of an AS-i master. These test requirements become obsolete if the master has an integrated AS-i power supply. In that case, however, all tests of the test requirements for AS-i power supplies have to be additionally fulfilled by the master.The manufacturer shall provide the following information:1. current data sheet,used2. profile1.2 Test circuitFigure 1 shows the required test circuit.Figure 1: Test circuit for current consumption test1.3 Measuring and test equipment·AS-i reference network·AS-i data decoupling network· ammeter· oscilloscope·test circuit to figure 1·variable power supply1.4 Test procedure1. Set up test circuit to figure 12. Operate the master to be tested in normal operation3. Check the master functions at the following DC voltages on the AS-i-line: 31.6V,26.5V, 23.5V, 21.5V and again at 23.5V4. Check the maximum current consumption1.5 EvaluationThe maximum current consumption as stated by the manufacturer shall not be greater than the value stated in the data sheet or than the requirements of the specification.The function test at the operating voltage limits shall correspond to the data stated in the data sheets and the applicable specifications, i.e. at DC voltages on the AS-i line of 31.6V, 26.5Vmaster activity is detected by means of an oscilloscope directly on the AS-i line.Test recordingsDate:Tested by:Test laboratory:Test report no.:ofPage:Current consumptionTest piece code: ___________________Network configurationMaster: __________________________Power supply: __________________________ Data decoupling: ___________________ Slaves: __________________________Measured values:Voltage U /(V) 31.6 26.5 23.5 21.5 23.5Current I / (mA)Communication yes/no yes/no yes/no yes/no yes/nomax. current consumption: ______mA < current stated in data sheet:yes/noResult:Test passed: Yes / No Signature: _________________Test Requirements Master 1.2 Rev. 1.1 2. Test instruction: Noise emission AS-i masterReference: Specification AS-i master (chapter 7 of the Complete Specification),2.1 GeneralThis test instruction allows the measurement of the noise emission of an AS-i master in a power-fail state on the AS-i network.2.2 Test circuitFigure 1 shows the required test circuit.Figure 1: Test circuit noise emission AS-i masterThe change in current consumption in a master should only cause a noise voltage £ 50mVss on the AS-i line in the frequency range between 10kHz and 500kHz. The voltage on the AS-i line is measured by means of an oscilloscope via a bandpass (see figure 2, see spice simulation in the appendix to the test requirements for impedance and symmetry measurement). The oscilloscope is to be operated in the mode Envelope, Peak Detection on at a cut-off frequency > 10 MHz. The FET probe is to be terminated with an impedance of 50 Ohm. The test circuit is to be screened from noise so that the measured maximum noise voltage without the master is smaller than 15 mV. For this purpose, the cable length between master and AS-i equivalent line (see figure 3) is to be limited to max. 20 cm. The master is to be operated in the power-fail state (direct voltage on the AS-i line of 21 V).50 Ohm or AS-i 10 … 1MOhm 10 … 30 pFFigure 2: bandpass 10kHz ... 500kHzR = 0,125O hmL = 1,25 µHC=700 p FFigure 3: equivalent circuit of the 10m AS-i equivalent line2.3. Measuring and test equipment·AS-i power supply·oscilloscope with FET probe (50 Ohm output impedance)· bandpass·test circuit to figure 12.4 Test procedure1. Apply a voltage of 21 V to the AS-i line2. Measure the noise voltage without the master by means of the oscilloscope over 60seconds3. Connect the master4. Check the power-fail state of the master5. Measure the noise voltage with the master on the AS-i line by means of an oscilloscopeover 60 secondsThe measurements shall have an accuracy of 5%.2.5 EvaluationThe noise voltage on the AS-i line must not be increased by more than 50 mVss by the master in the power-fail state.Test Requirements Master 1.2 Rev. 1.1 Test recordingsDate:by:TestedTest laboratory:Test report no.:Page:of Noise emission AS-i masterTest piece code: ___________________Network configurationMaster: __________________________Power supply: _________________________Measured values:Noise voltage:without master: _______mVsswith master: _______mVss difference: ______ £ 50mVss : yes / noTest criteria: In the power-fail state the noise voltage of the master on the AS-i line must not exceed 50 mVss!Result:Test passed: Yes / No Signature: _________________3. Test instructions: Impedance and symmetry measurementReference: Specification AS-i master (chapter 7 of the Complete Specification),3.1. Impedance measurement3.1.1 GeneralThe impedance measurement of the master is to be performed in the "ready state" under laboratory conditions.An AC signal U~ with Ri £20 Ohm is to be superimposed on the AS-i DC voltage. This AC voltage and the resulting AC current I~ of the master are to be measured3.1.2 Test circuitFigure 1 shows the test circuit for the impedance measurement. The operation of the master in switch position "test" has been purposefully selected as asymmetrical, i.e. metal parts of the master must not be grounded. Switch S1 allows a switching of AC ground (switch position shown: AS-i- = GND).The AC input current I~ is measured by means of the current probe. The input impedance is calculated as follows:| Z | = | U~ | / | I~ |The distance to the AS-i master shall be 20 cm.The DC voltage is to be set to 21V to put the master in the offline state.3.1.3 Measuring and test equipment·power supply (universal)· signal generator· current probe·test circuit (IMP_SYM) to figure 1for point 3.2 (symmetry measurement)· FET probe· HF voltmeter· bandpassFigure 1: Test circuit impedance measurement (IMP_SYM)3.1.4 Test procedure·Switch S1: position "AS-i- = GND"·Determine the AC current I~ at U~ = 6 Vss·The measurement is to be carried out as described in chapter 7.2.1.1 of the Complete Specification.The accuracy of the measurements shall be within 3%.3.1.5 EvaluationThe evaluation is to be carried out as described in chapter 7.2.1.1 of the Complete Specification and must not exceed the limit values stated there.3.1.6 DC resistanceThe DC resistance between ASI+, ASI- and all metallic parts of the master with the exception of outer connections shall be ³ 250 kOhm.3.2. Symmetry measurement:3.2.1 General:Figure 2: Master connection for symmetry measurementThe partial impedances Z1 and Z2 respectively form a voltage divider at measurement point M. This measurement point may be the metallic housing or a metallic mounting plate. The measurement point shall be connected to the external supplies of the master or the host respectively.In the off-load state the currents through Z1 and Z2 are identical.For an asymmetry of 10% this means10.190.02121£=£Z Z U U r r .r U 1r: voltage between M and ASI+ for ASI+ = GNDU 2: voltage between M and ASI- for ASI- = GND3.2.3 Test circuit:Figure 3: Test circuit symmetry measurement of the AS-i master50 Ohm or AS-i10 … 1MOhm 10 … 30 pFFigure 4: bandpass 10 kHz ... 500 kHzThe test circuit corresponds to the one of the impedance measurement (compare figures 1 and 2). With the test circuit in figure 3 the voltage drops U1 of ASI+ to M and U2 of ASI- to M are determined by means of a FET probe (Ri=1MOhm//2pF) with AC coupling Ck ³1nF at an output impedance of 50 Ohm and an HF voltmeter (frequency range up to 300 kHz, Ri=10MOhm//30pF). The capacitance Ckomp=Cfet is to be taken into account in the circuit to compensate for the probe capacitance.By means of calibrating C 3, |U1| = |U2| = UE/2 can be achieved and the capacitances of C 1 and C 2 can be determined independent of Z.A possible measurement error of the HF voltmeter in higher frequency ranges is eliminated by means of the ratio |U1| / |U2|.The appendix shows the frequency response of the bandpass from a SPICE simulation with different combinations of the terminating resistor.3.2.4 Test procedure· Set a measurement voltage Ue of 2.0 Veff displayed on the evaluation meter at afrequency of 160 kHz· Determine |U1| and |U2| at a frequency of 300 kHz without C 3 · Check the condition10.190.02121£=£Z Z U U r r .· If this condition is met, determine at frequencies of 50kHz, 100kHz, 125kHz, 160kHz,200kHz, 300kHz and check if this condition is met.· for ASI+ = GND determine the frequency response of |U1| · for ASI- = GND determine the frequency response of |U2| · define the ratio |U1| / |U2| as stated in point 2.1 (General)·If the condition10.190.02121£=£Z Z U U r ris not met:· Add C3 between ASI+ and M or ASI- and M respectively, depending on the voltage testand calibrate until you reach |U1| = |U2| = UE/2 at a measurement frequency of 300kHz · Determine C3The accuracy of the measurements shall be within 3%.3.2.5 Evaluation / symmetry criteriaOne of the following conditions shall be met:1. 10.190.02121£=£Z Z U U r r or2.90.080.021££U U r r or 20.110.21££U U r 1r with C 3 £ 15 pF or3. 80.021£U U r r or 2120.1U U r r £ with C 3 £ 30 pFTest recordingsDate: Tested by: Test laboratory: Test report no.: Page: ofImpedance and symmetry measurementNetwork configurationMaster: _________________________ Test circuit: IMP_SYMImpedance measurement:R min L min C maxlimits5k W3mH 400pF measurementsTest criteria: R meas > R min ; L meas > L min ; C meas < C maxDC resistance (R ³ 250 kOhm): ASI+ - M: _______ ASI- - M: _______Symmetry measurement:f / (kHz) 50 100 125 160 200 300 |U1| / (V)|U2| / (V)|U1 / |U2||U1| / |U2| = ________ , C3=______ pFOne of the following conditions shall be met: 1.10.190.02121£=£Z Z U U r r2.90.080.021££U U r r or 20.110.21££U U r 1r withC 3 £ 15 pF or 3.80.021£U U r r or 2120.1U U r r £ with C 3 £ 30 pFSymmetry sufficient? yes/noResult:_________________ Yes/No Signature:passed:TestAppendix: Frequency responses bandpass with different terminating impedances4. Test instruction: Power-On behaviourReference: Specification ASI master (Chapter 7 of the Complete Specification),4.1 GeneralBy testing the Power-ON behaviour, the switch-on delay time t E of the ASI master and its current consumption shall be tested. The settings of the oscilloscope can be seen on the oscillograms.AS-i masters with integrated AS-i power supply must have an internal voltage supply which is accessible and can be interrupted for this test so that the external AS-i supply can be connected.4.2 Measuring and test equipment· power supply with AS-i data decoupling network· oscilloscope· constant current source (KONST_I)4.3 On-delay4.3.1 GeneralThe offline flag of the master is reset (normal operation). In the initial state the master is not connected with the AS-i line (switch S is open). The master shall communicate with the slaves for min. one second after switch S has been closed. The oscilloscope shall be triggered by the rising edge of the supply voltage on the AS-i line. The start of communication is shown on the oscilloscope via peak detection on and DC coupling.4.3.2 Test circuitFigure 1: Test circuit: On-delayFigure 2: Oscillogram on-delay (example)4.3.3 EvaluationThe time t E is to be determined from the oscillogram. It shall be longer than 1.00s. The accuracy of the measurements shall be within 3%.4.4 Current consumption4.4.1 GeneralIf the master is supplied (see circuit figure 4) with a current corresponding to the total current consumption as stated in the data sheet + 12.5mA (to be set with an accuracy of ± 2.5 mA), the master shall have reached an operating voltage of 26.5V within one second after closing switch S in figure 4. The final operating voltage value to be reached shall be 30V at the output of the circuit with a set constant current.4.4.2 Test circuitFigure 3: Block circuit diagram current consumption measurement of the AS-i master++--Trigger output30V in the stationary state Figure 4: Constant current source with trigger output (KONST_I)Figure 5: Oscillogram current consumption (example)4.4.3 EvaluationThe time t shall be determined from the oscillogram to figure 5. It shall be smaller than 1s. The accuracy of the measurement shall be within 3%.Test recordingsDate:by:TestedTest laboratory:Test report no.:ofPage:Power-On behaviourTest piece code: __________________Network configurationMaster: _________________________Power supply: ______________________ Data decoupling: _____________________Test circuit: KONST_IMeasured values:On-delay t E: ______ s > 1s: yes / noCurrent consumption t : __________ s < 1s: yes / noThe oscillograms are to be added to the appendix.Result:Test passed: Yes / No Signature: _________________5. Test instruction: Burst testReference: Specification AS-i master (Chapters 7 and 8 of the Complete Specification),5.1 GeneralThe test shall be performed with fast transient bursts in form of pulse groups. The interferences are injected on the AS-i line by means of a capacitive coupling clamp. The test shall be made with the following data:·level 3 for data lines·test voltage 1 kV·pulse rate 5 kHz·burst length 15 ms·burst period 300 ms.The following requirements are to be met to minimise the environmental influence on the test results:·ambient temperature: 15° C to 35° C·relative humidity: 45% to 75%·air pressure: 680 hPa to 1060 hPaFigure 1 shows the curve of the transient interferences.Figure 1: Overall curve of the transient interference5.2 Test circuit (principle)Figure 2 shows the test circuit (principle) for the burst test of the AS-i master. Figure 3 shows the circuit diagram of the filter to be used to protect the slaves from burst pulses.K a p . 5.2.2Figure 3: Test installation burst tester (BURST_T)The master operates an AS-i network (see figure 2, consisting of the first 90m of the reference network, see test instruction "Operation on the reference network" from the test requirements for AS-i-slaves and and a burst tester at measurement point 1 of the reference network, see figure 3) in the cyclic normal operation with active data exchange. The burst tester includes 2 AS-i slaves (addresses 1 and 2) and a data strobe evaluation for these two slaves, i.e. all data strobe pulses of slaves 1 and 2 are recorded, the timing is defined for the undisturbed case and the timing violation in the case of bursts is recorded. If the time defined in undisturbed operation is exceeded by more than 100 µs, this indicates an error. In the case of double pulses at slave 1 the time measurement refers to the first pulse.The reference measurements (no faults in the case of burst) require ferrite cores (define number and position) for decoupling (filter).Burst pulses of the burst generator are injected via a capacitive coupling clamp.Measurements are taken over a longer period of time (e.g. 2 min, but for a minimum of 100,000 cycles).5.3 Test installationFigure 4 shows the test installation for the burst test.10 cm above the grounded metal plateFigure 4: Test installation burst test5.4 Measuring and test equipment· burst generator·capacitive coupling clamp·20 m AS-i line (burst setup)· filter·part of the AS-i reference network (90m)·burst tester (BURST_T)·AS-i power supply5.5 Test procedure·The AS-i slaves shall be protected from the effects of burst pulses by means of filters. ·The master shall be grounded according to IEC 801 part 4. The master shall be mounted as described in the data sheet. Supplied mounting material shall be used. Measurements shall be carried out at a distance of 10cm from the metal plate for all designs.·10m AS-i line shall be mounted s-shaped at 10cm above the grounded metal plate; the remaining 10m shall be used to connect the AS-i slaves of the reference network protected by filters and the burst tester.· A test voltage of 1kV shall be set at the burst generator.·The tests shall be made with both burst polarities.·The test period shall be 2 min.5.6 EvaluationThe errors caused by the master to be tested shall be evaluated.To calculate the error rate caused by the system without the master, a test with insensitive reference master (symmetrical design) is performed.5.6.1 Calculation of the maximum error rateBased on the assumption that each AS-i message is disturbed during the burst period of 15 ms each we get a maximum percentage of disturbed messages of (see figure 1):15 ms / 300 ms = 5% = Nmax .5.6.2 Measurement of the actual error rate using a reference masterThe reference master is set up with the lowest possible stray capacitance to mass. It is assumed that no error in the network will occur during operation without burst.5.7 TestThe master shall be installed ready for operation (see data sheet) and – if applicable – connected to mass (ground).Under the influence of the burst pulses the number of exceeded timings of the data strobe pulses between slaves 1 and 2 is measured5.8 EvaluationThe limit value according to specification defines: "Max. every 30th message shall be distorted".This means that:Nmess £ Nmax ·1 30Nmess £16 %has to be met.Test criteria: The number of exceeded timings must not exceed 1 %. 65.9 Enhanced test5.9.1 Test voltage 2kVThe test master shall be installed ready for operation and – if applicable – connected to mass (ground). Refer to the installation notes in the data sheet or the instructions in the box.A test voltage of 2kV shall be set at the burst generator. The test period shall be 2 min.For this test one of the AS-i line shall be grounded at the power supply (protective earth). The functional earth of the power supply shall be removed.5.9.2 EvaluationAt a voltage of 2kV it has to be ensured that no errors occur, in particular:· no RESET,·no destruction of the master during the test.Test recordingsDate: Tested by: Test laboratory: Test report no.: Page: ofBurst test to IEC 801, part 4Test piece code: __________________________ Test piece type: ____________________________ Switching state: ___________________________ Burst generator type: _______________________ Coupling clamp type: ________________________ Mass reference surface: ______________________ Ambient temperature: _______________ Relative humidity: ________________ Air pressure: ________________Network configurationSlaves: __________________Power supply: ___________________ Test level: 3 (1kV)Burst duration: 15ms, burst period 300ms, spike frequency 5kHz Test duration (> 1min): ______________ Test condition: Nmess £ 1/6 % + Nref Test circuit: BURST_TTest results:Test at 1kV:Polarity Nref 1/6 % + Nref Nmess at a distance of 10 cmTest passed:positive yes / no negativeyes / noTest at 2kV:positive polarity negative polarity yes no yes no RESET destructionResult:Test passed: Yes / No Signature: _________________6. Test instruction: Analogue partReference Specification AS-i master (Chapter 7 of the Complete Specification),profiles,Master6.1 GeneralThis test instruction will assess the analogue part of the master.A manufacturer declaration is to guarantee a bit time of the master transmitter of 6µs ±0.1% .6.2 Measuring and test equipment· AS-i master·AS-i power supply· 2 pcs. 4O modules as slaves 1 and 2·AS-i monitor (e.g. SINEC S1 – PC card (CP 2413) with monitor program SCOPE S1, version 1.0), with a capacitive load on the AS-i line of C monitor≤ 0.4 nF·equivalent network (29 slaves, 300 Ohm||(3 nF-C monitor))·data decoupling with HF ground6.3 Test circuit1m (+/-0,1m)99m (+/- 1m)Laboratorypower supply39 OhmFigure 2: Data decoupling and HF groundThe AS-i line (99m) shall be mounted s-shaped (length: 2.50m, distance 0.1m). The data decoupling network shall be made up of a core EF 25 consisting of 2 parts, material N27(Siemens, order nos.: B 66 317-G-X127 and B 66 317-G-X127, see data sheet) with 1mm total air gap, equipped with a bifilar winding of 16.5 windings, wire diameter 0.8mm, wound parallel and the parallel resistor of 39R 1%. The equivalent circuit Zn (copy of an impedance of 29 slaves) is to consist of the parallel wiring of 10 pcs. 3.3kOhm 1% metal film resistors and a capacitance of 3nF 2% (The equivalent circuit Zn includes the impedance of the AS-i monitor, i.e. Zn = 330W || (3nF-C monitor) || monitor).6.4 Test procedureTest 1:1. Set up the test installation as shown in figure 1,2. Set slave 1 on address 21 and slave 2 on address 13. Slave 1 shall be polled by the master with data message ("0xA"), slave 2 with datamessage ("0x0")4. After the error rate has been measured via the monitor, the positions of slaves 1 and2 shall be changed and test shall be repeatedTest 2:1. The test installation shall be changed by removing the 99m AS-i line between slaves 1and 2 and the equivalent network Zn, i.e. slave 2, the AS-i monitor and slave 1 shall be connected at a distance of 1m from the master2. Set slave 1 on address 21 and slave 2 on address 13. Slave 1 shall be polled by the master with data message ("0xA"), slave 2 with datamessage ("0x0")4. The error rate shall be measured via monitor6.5 EvaluationThe monitor shall show an error rate of £ 0.5% for all tests.The error rate shall be defined as the number of master request /slave response combinations for slave 1 not correctly detected by the master, referred to a total number of master requests to slave 1.Test recordingsDate:by:TestedTest laboratory:Test report no.:ofPage:Analogue partTest piece code: ___________________AS-i master: ______________________Power supply: _________________________Test results:Test 1:correct? yes/no Error rate measurement 1: _____% £0.5%correct? yes/no Error rate measurement 2: _____% £0.5%Test 2:correct? yes/no Error rate measurement: _____% £0.5%Result:Test passed: Yes / No Signature: _________________7. Test instruction: Voltage cutoffReference: Specification AS-i master (chapter 7 of the Complete Specification),profiles,Master7.1 GeneralThe reaction of the master to voltage cutoff on the AS-i line of 1ms and a reduced voltage on the AS-i line from approx. 23.5V to 14.5V shall be tested.7.2 Measuring and test equipment· AS-i master·AS-i power supply·AS-i bus monitor· generator· oscilloscope7.3 Test circuitFigure 1 shows the basic principle of the test installation to check the reaction of the master to voltage cutoffs as well as the reduction of the DC voltage on the AS-i line. The connectedslave puts the master in the normal operation mode.7.4 Test procedure:1. Interrupt the voltage on the AS-i line for 0.6 ms with a repetition frequency of < 1Hzand check the AS-i messages by means of the bus monitor.2. Interrupt the voltage on the AS-i line for 2.1ms with a repetition frequency of <1Hz andcheck the AS-i messages by means of the bus monitor.3. Check the transmitting amplitude of the master at an AS-i-DC voltage of 23.5V4. Reduce the DC voltage on the AS-i line from 23.5V to 14.5V.Check AS-i message sequence "RESET_Slave" to all slaves by the master by means of a bus monitor and check their transmitting amplitude and subsequent offline operation of the master.7.5 Evaluation。
CS5211_06资料
CS5211Low Voltage Synchronous Buck ControllerThe CS5211 is a low voltage synchronous buck controller. It contains all required circuitry for a synchronous buck converter using external N −Channel MOSFETs. High current internal gate drivers are capable of driving high gate capacitance of low RNFETs for Soft −Features•♦N −♦V 2♦♦♦♦♦♦♦♦♦•♦♦♦•Pb −*For additional information on our Pb −Free strategy and soldering details, please download the ON Semiconductor Soldering and Mounting Techniques Reference Manual, SOLDERRM/D.See detailed ordering and shipping information in the package dimensions section on page 2 of this data sheet.ORDERING INFORMATIONRecommended Operating Conditions is not implied. Extended exposure to stresses above the Recommended Operating Conditions may affect device reliability.1.60 second maximum above 183°C.MAXIMUM RATINGSPin Name Pin Symbol V MAX V MIN I SOURCE I SINKIC Power Input V CC16 V−0.3 V N/A50 mA DC Power input for the low side driver V C16 V−0.3 V N/A 1.5 A Peak, 200 mA DC Power Supply input for the high side driver BST20 V−0.3 V N/A 1.5 A Peak, 200 mA DC Compensation Capacitor COMP 6.0 V−0.3 V 1.0 mA 1.0 mA Voltage Feedback Input V FB 6.0 V−0.3 V 1.0 mA 1.0 mA Oscillator Resistor R OSC 6.0 V−0.3 V 1.0 mA 1.0 mAFast Feedback Input V FFB 6.0 V−0.3 V 1.0 mA 1.0 mAHigh−Side FET Driver GATE(H)20 V−0.3 V−2.0 V for 50 ns 1.5 A Peak200 mA DC1.5 A Peak, 200 mA DCLow−Side FET Driver GATE(L)16 V−0.3 V−2.0 V for 50 ns 1.5 A Peak,200 mA DC1.5 A Peak, 200 mA DCPositive Current Sense IS+ 6.0 V−0.3 V 1.0 mA 1.0 mA Negative Current Sense IS− 6.0 V−0.3 V 1.0 mA 1.0 mA Power Ground PGND0.3 V−0.3 V 1.5 A Peak,200 mA DCN/A Logic Ground LGND0 V0 V100 mA N/A Sense Ground SGND0.3 V−0.3 V 1.0 mA 1.0 mAPACKAGE PIN DESCRIPTIONPIN NO.PIN SYMBOL FUNCTION1GATE(H)High Side Switch FET driver pin. Capable of delivering peak currents of 1.0 A.2BST Power supply input for the high side driver.3LGND Reference ground. All control circuits are referenced to this pin. IC substrate connection.4V FFB Input for the PWM comparator.5V FB Error amplifier input.6COMP Error Amp output. PWM Comparator reference input. A capacitor to LGND provides error ampcompensation.7SGND Internal reference is connected to this ground. Connect directly at the load for ground remotesensing.8R OSC A resistor from this pin to SGND sets switching frequency.9V CC Input Power Supply Pin. It supplies power to control circuitry. A 0.1 m F Decoupling cap isrecommended.10IS−Negative input for overcurrent comparator.11IS+Positive input for overcurrent comparator.12V C Power supply input for the low side driver.13GATE(L)Low Side Synchronous FET driver pin. Capable of delivering peak currents of 1.0 A.14PGND High Current ground for the GATE(H) and GATE(L) pins.Characteristic Test Conditions Min Typ Max Unit Error AmplifierV FB Bias Current V FB = 0 V−0.1 1.0m A COMP Source Current V FB = 0.8 V153060m A COMP SINK Current V FB = 1.2 V153060m A Open Loop Gain−−98−dB Unity Gain Bandwidth C = 0.1 m F−50−kHz PSRR @ 1.0 kHz−−70−dB Output Transconductance−−32−mmho Output Impedance−− 2.5−M W Reference Voltage−0.1 V < SGND < 0.1 V, COMP = V FB, Measure V FB to SGND0.9770.992 1.007V COMP Max Voltage V FB = 0.8 V 2.5 3.0−V COMP Min Voltage V FB = 1.2 V−0.10.2V GATE(H) and GATE(L)High Voltage (AC)GATE(L),GATE(H) 0.5 nF < C GATE(H) = C GATE(L) < 10 nFV C− 0.5BST − 0.5−−VLow Voltage (AC)GATE(L) or GATE(H) 0.5 nF < C GATE(H); C GATE(L) < 10 nF−−0.5V Rise Time V C = BST = 10 V, Measure:1.0 V < GATE(L) < 9.0 V, 1.0 V < GATE(H) < 9.0 V−4080nsFall Time V C = BST = 10 V, Measure:1.0 V < GATE(L) < 9.0 V, 1.0 V < GATE(H) < 9.0 V−4080ns GATE(H) to GATE(L) Delay GATE(H) < 2.0 V, GATE(L) > 2.0 V4070110ns GATE(L) to GATE(H) Delay GATE(L) < 2.0 V, GATE(H) > 2.0 V4070110ns GATE(H)/(L) Pull−Down Resistance to PGND2050115K W Overcurrent ProtectionOVC Comparator Offset Voltage0 V < IS+ < V CC, 0 V < IS− < V CC546066mV IS+ Bias Current0 V < IS+ < V CC−1.00.1 1.0m A IS− Bias Current0 V < IS− < V CC−1.00.1 1.0m A COMP Discharge Threshold−0.200.250.30V COMP Discharge Current inOVC Fault ModeCOMP = 1.0 V 2.0 5.08.0m A PWM ComparatorTransient Response COMP = 0 − 1.5 V, V FFB, 20 mV overdrive−100200ns PWM Comparator Offset V FB = V FFB = 0 V; Increase COMP until GATE(H) starts switching0.4250.4750.525V Artificial Ramp Duty Cycle = 90%4070100mV V FFB Bias Current V FFB = 0 V−0.1 1.0m A V FFB Input Range(Note 4)−− 1.1V Minimum Pulse Width−−−200ns OscillatorSwitching Frequency R OSC = 18 k600750900kHz Switching Frequency R OSC = 51 k240300360kHz Switching Frequency R OSC = 115 k W120150180kHz R OSC Voltage− 1.21 1.25 1.29V 2.Guaranteed by design. Not tested in production.Characteristic Test Conditions Min Typ Max UnitTHEORY OF OPERATIONV 2 Control MethodThe V 2 method of control uses a ramp signal that isgenerated by the ESR of the output capacitors. This ramp is proportional to the AC current through the main inductor and is offset by the value of the DC output voltage. This control scheme inherently compensates for variations in either line or load conditions, since the ramp signal is generated from the output voltage itself. This control scheme differs from traditional techniques such as voltage mode, which generates an artificial ramp, and current mode,the main switch. The reaction time to an output load step has no relation to the crossover frequency of the error signal loop, as in traditional control methods.The error signal loop can have a low crossover frequency,since transient response is handled by the ramp signal loop.The main purpose of this “slow” feedback loop is to provide DC accuracy. Noise immunity is significantly improved,since the error amplifier bandwidth can be rolled off at a low frequency. Enhanced noise immunity improves remote sensing of the output voltage, since the noise associated with long feedback traces can be effectively filtered.Line and load regulations are drastically improved because there are two independent voltage loops. A voltage mode controller relies on a change in the error signal to compensate for a deviation in either line or load voltage.This change in the error signal causes the output voltage to change corresponding to the gain of the error amplifier,which is normally specified as line and load regulation. A current mode controller maintains fixed error signal under deviation in the line voltage, since the slope of the ramp signal changes, but still relies on a change in the error signal OSC FFB .There is no switching action while the PWM comparator output is high.After the COMP voltage exceeds the 0.5 V offset, the output of PWM comparator toggles and releases the PWM latch. The narrow pulse generated by the oscillator at the beginning of the next oscillator cycle will set the latch so that the main switch can be turned on and the regulator output voltage ramps up. When the output voltage achieves a level set by the COMP voltage, the main switch will be turned off.The V 2 control loop will adjust the main switch duty cycle as required to ensure the regulator output voltage tracks theCOMP voltage. Since the COMP voltage increases gradually, the soft −start can be achieved. The start −up period ends when the output voltage reaches the level set by the external resistor divider.Output EnableSince there can be no switching until the COMP pin exceeds the 0.5 V offset built into the PWM comparator, the COMP pin can also be used for an enable function. Hold the COMP pin below 0.4 V with an open collector circuit to disable the output. When the COMP pin is released to enable startup, the user must ensure there is no leakage current fromFigure 4. Inductor Current SensingIf the values of R and C are chosen such that:L R L+RC Then the voltage across the capacitor C will be:V C +R L I LTherefore, if the time constant of the RC network is equal to that of the inductor, the voltage across the capacitor is proportional to the inductor current by a factor of the inductor ESR. In practice, the user should ensure that under all component tolerances, the RC time constant is larger than the L/R time constant. This will keep the high frequencyAPPLICATIONS INFORMATIONAPPLICATIONS AND COMPONENT SELECTIONInductor Component SelectionThe output inductor may be the most critical component in the converter because it will directly effect the choice of other components and dictate both the steady −state and transient performance of the converter. When selecting an inductor the designer must consider factors such as DC current, peak current, output voltage ripple, core material,magnetic saturation, temperature, physical size, and costLo MIN +αand f sw ⋅ I O,MAX .from the RMS current level. The RMS of the AC component of the inductor is given by the following relationship:I AC +IPPǸwhere IPP = α ⋅ I O,MAX .The total I RMS of the current will be calculated from:I RMS +I OUT 2)I AC 2ǸThe power dissipation for the inductor can be determined from:P +I RMS 2 R LInput Capacitor Selection and ConsiderationsThe input capacitor is used to reduce the current surges caused by conduction of current of the top pass transistor charging the PWM inductor.The input current is pulsing at the switching frequency going from 0 to peak current in the inductor. The duty factor will be a function of the ratio of the input to output voltage and of the efficiency.DF +VO V I 1EffThe power dissipation in the output capacitor can be calculated from:P +I AC 2 C ESRwhere:I AC = AC RMS of the inductorC ESR = Effective series resistance of the output capacitor network.MOSFET & Heatsink SelectionPower dissipation, package size, and thermal solution drive MOSFET selection. To adequately size the heat sink,non−P)(I)(Q thesynchronous Where I I RMS,CNTL I Lo,MAX I Lo,MIN I O,MAX D I Loinductor of value Lo:D I Lo+(V IN*V OUT)@Dń(Lo@f SW)R DS(on) is the ON resistance of the MOSFET at the applied gate drive voltage.Q switch is the post gate threshold portion of the gate−to−source charge plus the gate−to−drain charge. This may be specified in the data sheet or approximated from the gate−charge curve as shown in the Figure 5.Q switch+Q gs2)Q gdWhen the MOSFET power dissipations are known, the designer can calculate the required thermal impedance to maintain a specified junction temperature at the worst case ambient operating temperatureq T t(T J*T A)ńP Dwhere;q T is the total thermal impedance (q JC + q SA).q JC is the junction−to−case thermal impedance of the MOSFET.q SA is the sink −to −ambient thermal impedance of the heatsink assuming direct mounting of the MOSFET (no thermal “pad” is used).T J is the specified maximum allowed junction temperature.T A is the worst case ambient operating temperature.For TO −220 and TO −263 packages, standard FR −4copper clad circuit boards will have approximate thermal resistances (q SA ) as shown below:30 m where:soft −start = output ramp −up timeV FFB(REG) = V FFB voltage when in regulation 30 m A = COMP output current, typ.The COMP output current range is given in the data sheet and will affect the ramp −up time. The value of the capacitor on the COMP pin will have an effect on the loop response and the transient response of the converter. Transient response can be enhanced by the addition of a parallel combination of a resistor and capacitor between the COMP pin and the comp capacitor.R OSC SelectionThe switching frequency is programmed by selecting the resistor connected between the R OSC pin and SGND (pin 7).The grounded side of this resistor should be directly connected to the SGND pin, without any other currents flowing between the bottom of the resistor and the pin. Also,avoid running any noisy signals under the resistor, since injected noise could cause frequency jitter. The graph in Figure 6 shows the required resistance to program the frequency. Below 500 kHz, the following formula is three grounds for this part is 200 mV .Feedback Divider SelectionThe feedback voltage measured at V FB during normal regulation will be 1.0 V . This voltage is compared to an internal 1.0 V reference and is used to regulate the output voltage. The bias current into the error amplifier is 1.0 m A max, so select the resistor values so that this current does not add an excessive offset voltage.V FFB Feedback SelectionTo take full advantage of the V 2 control scheme, a smallamount of output ripple must be fed back to the V FFB pin,typically 50 mV . For most application, this requirement is simple to achieve and the V FFB can be connected directly to the V FB pin. There are some application that have to meet stringent load transient requirements. One of the key factor in achieving tight dynamic voltage regulation is low ESR.Low ESR at the regulator output results in low output voltage ripple. This situation could result in increase noise sensitivity and a potential for loop instability. In applications where the output ripple is not sufficient, the performance ofnode V where:V FB C2Maximum Frequency OperationThe minimum pulse width may limit the maximum operating frequency. The duty factor, given by the output/input voltage ratio, multiplied by the period determines the pulse width during normal operation. This pulse width must be greater than 200 ns, or duty cycle jitter could become excessive. For low pulse widths below 300 ns, external slope compensation should be added to the V FFB pin to increase the PWM ramp signal and improve stability. 50 mV of added ramp at the V FFB pin is typically enough.Current Sense Component SelectionThe current limit threshold is set by sensing a 60 mV voltage differential between the IS+ and IS − pins. Referring to Figure 8, the time constant of the R2,C1 filter should be set larger than the L/R1 time constant under worst case tolerances, to prevent overshoot in the sensed voltage and tripping the current limit too low. Resistor R3 of value equal to R2 is added for bias current cancellation. R2 and R3should not be made too large, to reduce errors from bias current offsets. For typical L/R time constants, a 0.1 m F capacitor for C1 will allow R2 to be between 1.0 k and 10 k W .The current limit without R4 and R5, which are optional, is ńR1OUTvoltage to drive the upper FET. This voltage may be provided by a fixed higher voltage or it may be generated with a boost capacitor and charging diode, as shown in Figure 10. The voltage in the boost configuration would be the summation of the voltage from the charging diode and the output voltage swing. Care must be taken to keep the peak voltage with respect to ground less than 20 V peak. The capacitor should be large enough to drive the capacitance of the top FET.−× 20.1 −0.1 m Figure 10. Additional Application Diagram, 12 V to 5.0 V Bias to 3.3 V/8.0 A Converter withDifferential Remote SensePACKAGE DIMENSIONSSOIC−14D SUFFIXCASE 751A−03ISSUE Gand are registered trademarks of Semiconductor Components Industries, LLC (SCILLC). SCILLC reserves the right to make changes without further notice to any products herein. SCILLC makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does SCILLC assume any liabilityPUBLICATION ORDERING INFORMATION。
ACM-GIS%202006-A%20Peer-to-Peer%20Spatial%20Cloaking%20Algorithm%20for%20Anonymous%20Location-based%
A Peer-to-Peer Spatial Cloaking Algorithm for AnonymousLocation-based Services∗Chi-Yin Chow Department of Computer Science and Engineering University of Minnesota Minneapolis,MN cchow@ Mohamed F.MokbelDepartment of ComputerScience and EngineeringUniversity of MinnesotaMinneapolis,MNmokbel@Xuan LiuIBM Thomas J.WatsonResearch CenterHawthorne,NYxuanliu@ABSTRACTThis paper tackles a major privacy threat in current location-based services where users have to report their ex-act locations to the database server in order to obtain their desired services.For example,a mobile user asking about her nearest restaurant has to report her exact location.With untrusted service providers,reporting private location in-formation may lead to several privacy threats.In this pa-per,we present a peer-to-peer(P2P)spatial cloaking algo-rithm in which mobile and stationary users can entertain location-based services without revealing their exact loca-tion information.The main idea is that before requesting any location-based service,the mobile user will form a group from her peers via single-hop communication and/or multi-hop routing.Then,the spatial cloaked area is computed as the region that covers the entire group of peers.Two modes of operations are supported within the proposed P2P spa-tial cloaking algorithm,namely,the on-demand mode and the proactive mode.Experimental results show that the P2P spatial cloaking algorithm operated in the on-demand mode has lower communication cost and better quality of services than the proactive mode,but the on-demand incurs longer response time.Categories and Subject Descriptors:H.2.8[Database Applications]:Spatial databases and GISGeneral Terms:Algorithms and Experimentation. Keywords:Mobile computing,location-based services,lo-cation privacy and spatial cloaking.1.INTRODUCTIONThe emergence of state-of-the-art location-detection de-vices,e.g.,cellular phones,global positioning system(GPS) devices,and radio-frequency identification(RFID)chips re-sults in a location-dependent information access paradigm,∗This work is supported in part by the Grants-in-Aid of Re-search,Artistry,and Scholarship,University of Minnesota. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on thefirst page.To copy otherwise,to republish,to post on servers or to redistribute to lists,requires prior specific permission and/or a fee.ACM-GIS’06,November10-11,2006,Arlington,Virginia,USA. Copyright2006ACM1-59593-529-0/06/0011...$5.00.known as location-based services(LBS)[30].In LBS,mobile users have the ability to issue location-based queries to the location-based database server.Examples of such queries include“where is my nearest gas station”,“what are the restaurants within one mile of my location”,and“what is the traffic condition within ten minutes of my route”.To get the precise answer of these queries,the user has to pro-vide her exact location information to the database server. With untrustworthy servers,adversaries may access sensi-tive information about specific individuals based on their location information and issued queries.For example,an adversary may check a user’s habit and interest by knowing the places she visits and the time of each visit,or someone can track the locations of his ex-friends.In fact,in many cases,GPS devices have been used in stalking personal lo-cations[12,39].To tackle this major privacy concern,three centralized privacy-preserving frameworks are proposed for LBS[13,14,31],in which a trusted third party is used as a middleware to blur user locations into spatial regions to achieve k-anonymity,i.e.,a user is indistinguishable among other k−1users.The centralized privacy-preserving frame-work possesses the following shortcomings:1)The central-ized trusted third party could be the system bottleneck or single point of failure.2)Since the centralized third party has the complete knowledge of the location information and queries of all users,it may pose a serious privacy threat when the third party is attacked by adversaries.In this paper,we propose a peer-to-peer(P2P)spatial cloaking algorithm.Mobile users adopting the P2P spatial cloaking algorithm can protect their privacy without seeking help from any centralized third party.Other than the short-comings of the centralized approach,our work is also moti-vated by the following facts:1)The computation power and storage capacity of most mobile devices have been improv-ing at a fast pace.2)P2P communication technologies,such as IEEE802.11and Bluetooth,have been widely deployed.3)Many new applications based on P2P information shar-ing have rapidly taken shape,e.g.,cooperative information access[9,32]and P2P spatio-temporal query processing[20, 24].Figure1gives an illustrative example of P2P spatial cloak-ing.The mobile user A wants tofind her nearest gas station while beingfive anonymous,i.e.,the user is indistinguish-able amongfive users.Thus,the mobile user A has to look around andfind other four peers to collaborate as a group. In this example,the four peers are B,C,D,and E.Then, the mobile user A cloaks her exact location into a spatialA B CDEBase Stationregion that covers the entire group of mobile users A ,B ,C ,D ,and E .The mobile user A randomly selects one of the mobile users within the group as an agent .In the ex-ample given in Figure 1,the mobile user D is selected as an agent.Then,the mobile user A sends her query (i.e.,what is the nearest gas station)along with her cloaked spa-tial region to the agent.The agent forwards the query to the location-based database server through a base station.Since the location-based database server processes the query based on the cloaked spatial region,it can only give a list of candidate answers that includes the actual answers and some false positives.After the agent receives the candidate answers,it forwards the candidate answers to the mobile user A .Finally,the mobile user A gets the actual answer by filtering out all the false positives.The proposed P2P spatial cloaking algorithm can operate in two modes:on-demand and proactive .In the on-demand mode,mobile clients execute the cloaking algorithm when they need to access information from the location-based database server.On the other side,in the proactive mode,mobile clients periodically look around to find the desired number of peers.Thus,they can cloak their exact locations into spatial regions whenever they want to retrieve informa-tion from the location-based database server.In general,the contributions of this paper can be summarized as follows:1.We introduce a distributed system architecture for pro-viding anonymous location-based services (LBS)for mobile users.2.We propose the first P2P spatial cloaking algorithm for mobile users to entertain high quality location-based services without compromising their privacy.3.We provide experimental evidence that our proposed algorithm is efficient in terms of the response time,is scalable to large numbers of mobile clients,and is effective as it provides high-quality services for mobile clients without the need of exact location information.The rest of this paper is organized as follows.Section 2highlights the related work.The system model of the P2P spatial cloaking algorithm is presented in Section 3.The P2P spatial cloaking algorithm is described in Section 4.Section 5discusses the integration of the P2P spatial cloak-ing algorithm with privacy-aware location-based database servers.Section 6depicts the experimental evaluation of the P2P spatial cloaking algorithm.Finally,Section 7con-cludes this paper.2.RELATED WORKThe k -anonymity model [37,38]has been widely used in maintaining privacy in databases [5,26,27,28].The main idea is to have each tuple in the table as k -anonymous,i.e.,indistinguishable among other k −1tuples.Although we aim for the similar k -anonymity model for the P2P spatial cloaking algorithm,none of these techniques can be applied to protect user privacy for LBS,mainly for the following four reasons:1)These techniques preserve the privacy of the stored data.In our model,we aim not to store the data at all.Instead,we store perturbed versions of the data.Thus,data privacy is managed before storing the data.2)These approaches protect the data not the queries.In anonymous LBS,we aim to protect the user who issues the query to the location-based database server.For example,a mobile user who wants to ask about her nearest gas station needs to pro-tect her location while the location information of the gas station is not protected.3)These approaches guarantee the k -anonymity for a snapshot of the database.In LBS,the user location is continuously changing.Such dynamic be-havior calls for continuous maintenance of the k -anonymity model.(4)These approaches assume a unified k -anonymity requirement for all the stored records.In our P2P spatial cloaking algorithm,k -anonymity is a user-specified privacy requirement which may have a different value for each user.Motivated by the privacy threats of location-detection de-vices [1,4,6,40],several research efforts are dedicated to protect the locations of mobile users (e.g.,false dummies [23],landmark objects [18],and location perturbation [10,13,14]).The most closed approaches to ours are two centralized spatial cloaking algorithms,namely,the spatio-temporal cloaking [14]and the CliqueCloak algorithm [13],and one decentralized privacy-preserving algorithm [23].The spatio-temporal cloaking algorithm [14]assumes that all users have the same k -anonymity requirements.Furthermore,it lacks the scalability because it deals with each single request of each user individually.The CliqueCloak algorithm [13]as-sumes a different k -anonymity requirement for each user.However,since it has large computation overhead,it is lim-ited to a small k -anonymity requirement,i.e.,k is from 5to 10.A decentralized privacy-preserving algorithm is proposed for LBS [23].The main idea is that the mobile client sends a set of false locations,called dummies ,along with its true location to the location-based database server.However,the disadvantages of using dummies are threefold.First,the user has to generate realistic dummies to pre-vent the adversary from guessing its true location.Second,the location-based database server wastes a lot of resources to process the dummies.Finally,the adversary may esti-mate the user location by using cellular positioning tech-niques [34],e.g.,the time-of-arrival (TOA),the time differ-ence of arrival (TDOA)and the direction of arrival (DOA).Although several existing distributed group formation al-gorithms can be used to find peers in a mobile environment,they are not designed for privacy preserving in LBS.Some algorithms are limited to only finding the neighboring peers,e.g.,lowest-ID [11],largest-connectivity (degree)[33]and mobility-based clustering algorithms [2,25].When a mo-bile user with a strict privacy requirement,i.e.,the value of k −1is larger than the number of neighboring peers,it has to enlist other peers for help via multi-hop routing.Other algorithms do not have this limitation,but they are designed for grouping stable mobile clients together to facil-Location-based Database ServerDatabase ServerDatabase ServerFigure 2:The system architectureitate efficient data replica allocation,e.g.,dynamic connec-tivity based group algorithm [16]and mobility-based clus-tering algorithm,called DRAM [19].Our work is different from these approaches in that we propose a P2P spatial cloaking algorithm that is dedicated for mobile users to dis-cover other k −1peers via single-hop communication and/or via multi-hop routing,in order to preserve user privacy in LBS.3.SYSTEM MODELFigure 2depicts the system architecture for the pro-posed P2P spatial cloaking algorithm which contains two main components:mobile clients and location-based data-base server .Each mobile client has its own privacy profile that specifies its desired level of privacy.A privacy profile includes two parameters,k and A min ,k indicates that the user wants to be k -anonymous,i.e.,indistinguishable among k users,while A min specifies the minimum resolution of the cloaked spatial region.The larger the value of k and A min ,the more strict privacy requirements a user needs.Mobile users have the ability to change their privacy profile at any time.Our employed privacy profile matches the privacy re-quirements of mobiles users as depicted by several social science studies (e.g.,see [4,15,17,22,29]).In this architecture,each mobile user is equipped with two wireless network interface cards;one of them is dedicated to communicate with the location-based database server through the base station,while the other one is devoted to the communication with other peers.A similar multi-interface technique has been used to implement IP multi-homing for stream control transmission protocol (SCTP),in which a machine is installed with multiple network in-terface cards,and each assigned a different IP address [36].Similarly,in mobile P2P cooperation environment,mobile users have a network connection to access information from the server,e.g.,through a wireless modem or a base station,and the mobile users also have the ability to communicate with other peers via a wireless LAN,e.g.,IEEE 802.11or Bluetooth [9,24,32].Furthermore,each mobile client is equipped with a positioning device, e.g.,GPS or sensor-based local positioning systems,to determine its current lo-cation information.4.P2P SPATIAL CLOAKINGIn this section,we present the data structure and the P2P spatial cloaking algorithm.Then,we describe two operation modes of the algorithm:on-demand and proactive .4.1Data StructureThe entire system area is divided into grid.The mobile client communicates with each other to discover other k −1peers,in order to achieve the k -anonymity requirement.TheAlgorithm 1P2P Spatial Cloaking:Request Originator m 1:Function P2PCloaking-Originator (h ,k )2://Phase 1:Peer searching phase 3:The hop distance h is set to h4:The set of discovered peers T is set to {∅},and the number ofdiscovered peers k =|T |=05:while k <k −1do6:Broadcast a FORM GROUP request with the parameter h (Al-gorithm 2gives the response of each peer p that receives this request)7:T is the set of peers that respond back to m by executingAlgorithm 28:k =|T |;9:if k <k −1then 10:if T =T then 11:Suspend the request 12:end if 13:h ←h +1;14:T ←T ;15:end if 16:end while17://Phase 2:Location adjustment phase 18:for all T i ∈T do19:|mT i .p |←the greatest possible distance between m and T i .pby considering the timestamp of T i .p ’s reply and maximum speed20:end for21://Phase 3:Spatial cloaking phase22:Form a group with k −1peers having the smallest |mp |23:h ←the largest hop distance h p of the selected k −1peers 24:Determine a grid area A that covers the entire group 25:if A <A min then26:Extend the area of A till it covers A min 27:end if28:Randomly select a mobile client of the group as an agent 29:Forward the query and A to the agentmobile client can thus blur its exact location into a cloaked spatial region that is the minimum grid area covering the k −1peers and itself,and satisfies A min as well.The grid area is represented by the ID of the left-bottom and right-top cells,i.e.,(l,b )and (r,t ).In addition,each mobile client maintains a parameter h that is the required hop distance of the last peer searching.The initial value of h is equal to one.4.2AlgorithmFigure 3gives a running example for the P2P spatial cloaking algorithm.There are 15mobile clients,m 1to m 15,represented as solid circles.m 8is the request originator,other black circles represent the mobile clients received the request from m 8.The dotted circles represent the commu-nication range of the mobile client,and the arrow represents the movement direction.Algorithms 1and 2give the pseudo code for the request originator (denoted as m )and the re-quest receivers (denoted as p ),respectively.In general,the algorithm consists of the following three phases:Phase 1:Peer searching phase .The request origina-tor m wants to retrieve information from the location-based database server.m first sets h to h ,a set of discovered peers T to {∅}and the number of discovered peers k to zero,i.e.,|T |.(Lines 3to 4in Algorithm 1).Then,m broadcasts a FORM GROUP request along with a message sequence ID and the hop distance h to its neighboring peers (Line 6in Algorithm 1).m listens to the network and waits for the reply from its neighboring peers.Algorithm 2describes how a peer p responds to the FORM GROUP request along with a hop distance h and aFigure3:P2P spatial cloaking algorithm.Algorithm2P2P Spatial Cloaking:Request Receiver p1:Function P2PCloaking-Receiver(h)2://Let r be the request forwarder3:if the request is duplicate then4:Reply r with an ACK message5:return;6:end if7:h p←1;8:if h=1then9:Send the tuple T=<p,(x p,y p),v maxp ,t p,h p>to r10:else11:h←h−1;12:Broadcast a FORM GROUP request with the parameter h 13:T p is the set of peers that respond back to p14:for all T i∈T p do15:T i.h p←T i.h p+1;16:end for17:T p←T p∪{<p,(x p,y p),v maxp ,t p,h p>};18:Send T p back to r19:end ifmessage sequence ID from another peer(denoted as r)that is either the request originator or the forwarder of the re-quest.First,p checks if it is a duplicate request based on the message sequence ID.If it is a duplicate request,it sim-ply replies r with an ACK message without processing the request.Otherwise,p processes the request based on the value of h:Case1:h= 1.p turns in a tuple that contains its ID,current location,maximum movement speed,a timestamp and a hop distance(it is set to one),i.e.,< p,(x p,y p),v max p,t p,h p>,to r(Line9in Algorithm2). Case2:h> 1.p decrements h and broadcasts the FORM GROUP request with the updated h and the origi-nal message sequence ID to its neighboring peers.p keeps listening to the network,until it collects the replies from all its neighboring peers.After that,p increments the h p of each collected tuple,and then it appends its own tuple to the collected tuples T p.Finally,it sends T p back to r (Lines11to18in Algorithm2).After m collects the tuples T from its neighboring peers, if m cannotfind other k−1peers with a hop distance of h,it increments h and re-broadcasts the FORM GROUP request along with a new message sequence ID and h.m repeatedly increments h till itfinds other k−1peers(Lines6to14in Algorithm1).However,if mfinds the same set of peers in two consecutive broadcasts,i.e.,with hop distances h and h+1,there are not enough connected peers for m.Thus, m has to relax its privacy profile,i.e.,use a smaller value of k,or to be suspended for a period of time(Line11in Algorithm1).Figures3(a)and3(b)depict single-hop and multi-hop peer searching in our running example,respectively.In Fig-ure3(a),the request originator,m8,(e.g.,k=5)canfind k−1peers via single-hop communication,so m8sets h=1. Since h=1,its neighboring peers,m5,m6,m7,m9,m10, and m11,will not further broadcast the FORM GROUP re-quest.On the other hand,in Figure3(b),m8does not connect to k−1peers directly,so it has to set h>1.Thus, its neighboring peers,m7,m10,and m11,will broadcast the FORM GROUP request along with a decremented hop dis-tance,i.e.,h=h−1,and the original message sequence ID to their neighboring peers.Phase2:Location adjustment phase.Since the peer keeps moving,we have to capture the movement between the time when the peer sends its tuple and the current time. For each received tuple from a peer p,the request originator, m,determines the greatest possible distance between them by an equation,|mp |=|mp|+(t c−t p)×v max p,where |mp|is the Euclidean distance between m and p at time t p,i.e.,|mp|=(x m−x p)2+(y m−y p)2,t c is the currenttime,t p is the timestamp of the tuple and v maxpis the maximum speed of p(Lines18to20in Algorithm1).In this paper,a conservative approach is used to determine the distance,because we assume that the peer will move with the maximum speed in any direction.If p gives its movement direction,m has the ability to determine a more precise distance between them.Figure3(c)illustrates that,for each discovered peer,the circle represents the largest region where the peer can lo-cate at time t c.The greatest possible distance between the request originator m8and its discovered peer,m5,m6,m7, m9,m10,or m11is represented by a dotted line.For exam-ple,the distance of the line m8m 11is the greatest possible distance between m8and m11at time t c,i.e.,|m8m 11|. Phase3:Spatial cloaking phase.In this phase,the request originator,m,forms a virtual group with the k−1 nearest peers,based on the greatest possible distance be-tween them(Line22in Algorithm1).To adapt to the dynamic network topology and k-anonymity requirement, m sets h to the largest value of h p of the selected k−1 peers(Line15in Algorithm1).Then,m determines the minimum grid area A covering the entire group(Line24in Algorithm1).If the area of A is less than A min,m extends A,until it satisfies A min(Lines25to27in Algorithm1). Figure3(c)gives the k−1nearest peers,m6,m7,m10,and m11to the request originator,m8.For example,the privacy profile of m8is(k=5,A min=20cells),and the required cloaked spatial region of m8is represented by a bold rectan-gle,as depicted in Figure3(d).To issue the query to the location-based database server anonymously,m randomly selects a mobile client in the group as an agent(Line28in Algorithm1).Then,m sendsthe query along with the cloaked spatial region,i.e.,A,to the agent(Line29in Algorithm1).The agent forwards thequery to the location-based database server.After the serverprocesses the query with respect to the cloaked spatial re-gion,it sends a list of candidate answers back to the agent.The agent forwards the candidate answer to m,and then mfilters out the false positives from the candidate answers. 4.3Modes of OperationsThe P2P spatial cloaking algorithm can operate in twomodes,on-demand and proactive.The on-demand mode:The mobile client only executesthe algorithm when it needs to retrieve information from the location-based database server.The algorithm operatedin the on-demand mode generally incurs less communica-tion overhead than the proactive mode,because the mobileclient only executes the algorithm when necessary.However,it suffers from a longer response time than the algorithm op-erated in the proactive mode.The proactive mode:The mobile client adopting theproactive mode periodically executes the algorithm in back-ground.The mobile client can cloak its location into a spa-tial region immediately,once it wants to communicate withthe location-based database server.The proactive mode pro-vides a better response time than the on-demand mode,but it generally incurs higher communication overhead and giveslower quality of service than the on-demand mode.5.ANONYMOUS LOCATION-BASEDSERVICESHaving the spatial cloaked region as an output form Algo-rithm1,the mobile user m sends her request to the location-based server through an agent p that is randomly selected.Existing location-based database servers can support onlyexact point locations rather than cloaked regions.In or-der to be able to work with a spatial region,location-basedservers need to be equipped with a privacy-aware queryprocessor(e.g.,see[29,31]).The main idea of the privacy-aware query processor is to return a list of candidate answerrather than the exact query answer.Then,the mobile user m willfilter the candidate list to eliminate its false positives andfind its exact answer.The tighter the spatial cloaked re-gion,the lower is the size of the candidate answer,and hencethe better is the performance of the privacy-aware query processor.However,tight cloaked regions may represent re-laxed privacy constrained.Thus,a trade-offbetween the user privacy and the quality of service can be achieved[31]. Figure4(a)depicts such scenario by showing the data stored at the server side.There are32target objects,i.e., gas stations,T1to T32represented as black circles,the shaded area represents the spatial cloaked area of the mo-bile client who issued the query.For clarification,the actual mobile client location is plotted in Figure4(a)as a black square inside the cloaked area.However,such information is neither stored at the server side nor revealed to the server. The privacy-aware query processor determines a range that includes all target objects that are possibly contributing to the answer given that the actual location of the mobile client could be anywhere within the shaded area.The range is rep-resented as a bold rectangle,as depicted in Figure4(b).The server sends a list of candidate answers,i.e.,T8,T12,T13, T16,T17,T21,and T22,back to the agent.The agent next for-(a)Server Side(b)Client SideFigure4:Anonymous location-based services wards the candidate answers to the requesting mobile client either through single-hop communication or through multi-hop routing.Finally,the mobile client can get the actualanswer,i.e.,T13,byfiltering out the false positives from thecandidate answers.The algorithmic details of the privacy-aware query proces-sor is beyond the scope of this paper.Interested readers are referred to[31]for more details.6.EXPERIMENTAL RESULTSIn this section,we evaluate and compare the scalabilityand efficiency of the P2P spatial cloaking algorithm in boththe on-demand and proactive modes with respect to the av-erage response time per query,the average number of mes-sages per query,and the size of the returned candidate an-swers from the location-based database server.The queryresponse time in the on-demand mode is defined as the timeelapsed between a mobile client starting to search k−1peersand receiving the candidate answers from the agent.On theother hand,the query response time in the proactive mode is defined as the time elapsed between a mobile client startingto forward its query along with the cloaked spatial regionto the agent and receiving the candidate answers from theagent.The simulation model is implemented in C++usingCSIM[35].In all the experiments in this section,we consider an in-dividual random walk model that is based on“random way-point”model[7,8].At the beginning,the mobile clientsare randomly distributed in a spatial space of1,000×1,000square meters,in which a uniform grid structure of100×100cells is constructed.Each mobile client randomly chooses itsown destination in the space with a randomly determined speed s from a uniform distribution U(v min,v max).When the mobile client reaches the destination,it comes to a stand-still for one second to determine its next destination.Afterthat,the mobile client moves towards its new destinationwith another speed.All the mobile clients repeat this move-ment behavior during the simulation.The time interval be-tween two consecutive queries generated by a mobile client follows an exponential distribution with a mean of ten sec-onds.All the experiments consider one half-duplex wirelesschannel for a mobile client to communicate with its peers with a total bandwidth of2Mbps and a transmission range of250meters.When a mobile client wants to communicate with other peers or the location-based database server,it has to wait if the requested channel is busy.In the simulated mobile environment,there is a centralized location-based database server,and one wireless communication channel between the location-based database server and the mobile。