COMP5211_Algorithms_2012 Semester 2_lec10
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.
COMP5214_Java_2012 Semester 2_Tutorial2_
COMP5214 Software Development in JavaTutorial and Lab 02CONDITIONALS & LOOPSThe key topic for this week includes: 1. Conditional structures that select different paths through the program depending on particular conditions, such as the value of a variable. 2. Iteration structures that repeat segments of code to complete a task that has an iterative step or that inherently requires repetition; TASK 1. Learn how to use control structures and loops 2. Carry out tracing with pencil and paper the steps that a computer goes through when executing a simple program TUTORIAL EXERCISES1. Assume there is an int variable called classSize. Write a code fragment that prints “This class is small” if the number is less than 150 or “This class is large” if the number is greater than or equal to 150. A soft drink vending machine has control software that uses a switch statement to decide what drink to give to the buyer. Write the switch fragment to represent this (the drinks can be served by just printing their names). a. If button 1 is pressed, cola is served. b. If button 2 is pressed, lemonade is served. c. If button 3 is pressed, orange is served. d. Button 6 serves both cola and lemonade while all other buttons serve no drinks. 3. Trace the code below and figure out what will be printed for the case where: a=1 and b=-8int a = Integer.parseInt(args[0]); int b = Integer.parseInt(args[1]); int c; if (a>0) { if (a<b) c=b-a; else c=a-b; } else c=0; c=c*c; System.out.print(c);2.4.Write the following for loops: a. b. c. prints on a separate line every number from 15 to 2 (both inclusive) prints on a separate line every number from 15 to 2 (both exclusive) prints on a separate line every even number between 2 to 20 (both inclusive)5.Trace the following code for the situations: a. b. int x = 3; int x = 7;1COMP5214 Software Development in JavaTutorial and Lab 02for (int i = 0; i < 5; i++) { int j = x - i; if (j % 3 == 0) { System.out.println(“i: “ + i + “, j: “ + j); } else { i++; }}LABORATORY EXERCISES NOTE on Eclipse When there are multiple classes in a project, you may follow the procedure to execute a specific Java class which required input argument(s): 1. Locate the “Package Explor…” tab on the left. 2. Highlight the class name to choose the class to be run. 3. Click Run−>Run… and a dialog named “Run” will pop up. 4. In the “Main” tab, click button “Search…”. A dialog will pop up. Choose the class name to be run, and click “OK”. 5. In the “Arguments” tab; inside the “Program arguments” box, type the command line argument(s); finally, press the “Run” button on the bottom right corner of the dialog. Exercise 1. Even or Odd? Write code that reads in a single number from the command-line argument and prints whether the number is even or odd. Exercise 2. Grade classification by if-else Write a program to read the student’s mark (in range of 0 to 100) from the command-line argument. Use if-else structure to convert the mark to the corresponding grade, and print out the grade. For instance, 85—100: HD, 75—84: D, …… Exercise 3. Body Mass Index (BMI) by if-else Body Mass Index (BMI) is used to estimate the risk of weight-related problems and it is calculated as: BMI = mass / height2; where mass in kilograms, and height in meters. Health assessment can be estimated according to: BMI < 18.5 Underweight 18.5 ≤ BMI < 25 Normal weight 25 ≤ BMI < 30 Overweight 30 ≤ BMI Obese Write a program to read body weight and height, calculate BMI and then print health assessment. HOMEWORK EXERCISES Exercise 1. Converting student’s grade to mark range by switch Input the student’s grade: H, D, C, P, or F (case insensitive), output the corresponding mark range for the grade. (Use charAt(int index) method in String class, which returns the character at the specified index.) Exercise 2. Factorial (n!=1*2*3*…*n) Write a program that takes a single command-line argument, and calculates the factorial of that number. Exercise 3. Triangle Write a program that takes a single command-line argument, which is a number between 1 and 9, and prints a triangle such that the base of the triangle has all numbers from 1 to that number with spaces between numbers. An example of the system in operation is:> java Triangle 42COMP5214 Software Development in Java1 1 2 1 2 3 1 2 3 4Tutorial and Lab 02Exercise 4: Scissor-Rock-Paper Game The rule for this popular game is: the scissor cuts the paper; the rock knocks the scissor; and the paper wraps the rock. Write a program to simulate the game. Your program: (1) randomly generates a number (0, 1, or 2) to represent scissor, rock, or paper; (2) prompts the user to enter “scissor”, “rock”, or “paper”; (3) and displays the computer or the user wins, loses, or draws. Exercise 5: Pyramid Write a program that takes in an odd positive integer n from the command line and draw a pyramid on the screen, with the highest level having 1 block, the 2nd 3 blocks, …, and the last n blocks. An example in operation: > java Pyramid 7 * *** ***** *******3。
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.。
RcppEnsmallen 0.2.21.0.1 头文件 C++ 数学优化库的说明说明书
Package‘RcppEnsmallen’November27,2023Title Header-Only C++Mathematical Optimization Library for'Armadillo'Version0.2.21.0.1Description'Ensmallen'is a templated C++mathematical optimization library (by the'MLPACK'team)that provides a simple set of abstractions for writing anobjective function to optimize.Provided within are various standard andcutting-edge optimizers that include full-batch gradient descent techniques,small-batch techniques,gradient-free optimizers,and constrained optimization.The'RcppEnsmallen'package includes the headerfiles from the'Ensmallen'library and pairs the appropriate headerfiles from'armadillo'through the'RcppArmadillo'package.Therefore,users do not need to install'Ensmallen'nor'Armadillo'to use'RcppEnsmallen'.Note that'Ensmallen'is licensed under3-Clause BSD,'Armadillo'starting from7.800.0is licensed under Apache License2, 'RcppArmadillo'(the'Rcpp'bindings/bridge to'Armadillo')is licensed underthe GNU GPL version2or later.Thus,'RcppEnsmallen'is also licensed undersimilar terms.Note that'Ensmallen'requires a compiler that supports'C++11'and'Armadillo'9.800or later.Depends R(>=4.0.0)License GPL(>=2)URL https:///coatless-rpkg/rcppensmallen,https:///rcppensmallen/,https:///mlpack/ensmallen,https:/// BugReports https:///coatless-rpkg/rcppensmallen/issues Encoding UTF-8LinkingTo Rcpp,RcppArmadillo(>=0.9.800.0.0)Imports RcppRoxygenNote7.2.3Suggests knitr,rmarkdownVignetteBuilder knitrNeedsCompilation yes12RcppEnsmallen-package Author James Joseph Balamuta[aut,cre,cph](<https:///0000-0003-2826-8458>),Dirk Eddelbuettel[aut,cph](<https:///0000-0001-6419-907X>)Maintainer James Joseph Balamuta<*********************>Repository CRANDate/Publication2023-11-2721:20:03UTCR topics documented:RcppEnsmallen-package (2)lin_reg_lbfgs (3)Index5 RcppEnsmallen-package RcppEnsmallen:Header-Only C++Mathematical Optimization Li-brary for’Armadillo’Description’Ensmallen’is a templated C++mathematical optimization library(by the’MLPACK’team)that provides a simple set of abstractions for writing an objective function to optimize.Provided within are various standard and cutting-edge optimizers that include full-batch gradient descent techniques, small-batch techniques,gradient-free optimizers,and constrained optimization.The’RcppEns-mallen’package includes the headerfiles from the’Ensmallen’library and pairs the appropriate headerfiles from’armadillo’through the’RcppArmadillo’package.Therefore,users do not need to install’Ensmallen’nor’Armadillo’to use’RcppEnsmallen’.Note that’Ensmallen’is licensed under3-Clause BSD,’Armadillo’starting from7.800.0is licensed under Apache License2,’Rcp-pArmadillo’(the’Rcpp’bindings/bridge to’Armadillo’)is licensed under the GNU GPL version2 or later.Thus,’RcppEnsmallen’is also licensed under similar terms.Note that’Ensmallen’requiresa compiler that supports’C++11’and’Armadillo’9.800or later.Author(s)Maintainer:James Joseph Balamuta<*********************>(ORCID)[copyright holder] Authors:•Dirk Eddelbuettel<**************>(ORCID)[copyright holder]See AlsoUseful links:•https:///coatless-rpkg/rcppensmallen•https:///rcppensmallen/•https:///mlpack/ensmallen•https:///•Report bugs at https:///coatless-rpkg/rcppensmallen/issues lin_reg_lbfgs Linear Regression with L-BFGSDescriptionSolves the Linear Regression’s Residual Sum of Squares using the L-BFGS optimizer. Usagelin_reg_lbfgs(X,y)ArgumentsX A matrix that is the Design Matrix for the regression problem.y A vec containing the response values.DetailsConsider the Residual Sum of Squares,also known as RSS,defined as:RSS(β)=(y−Xβ)T(y−Xβ)The objective function is defined as:f(β)=(y−Xβ)2The gradient is defined as:∂RSS=−2X T(y−Xβ)∂βValueThe estimatedβparameter values for the linear regression.Examples#Number of Pointsn=1000#Select beta parametersbeta=c(-2,1.5,3,8.2,6.6)#Number of Predictors(including intercept)p=length(beta)#Generate predictors from a normal distributionX_i=matrix(rnorm(n),ncol=p-1)#Add an interceptX=cbind(1,X_i)#Generate y valuesy=X%*%beta+rnorm(n/(p-1))#Run optimization with lbfgstheta_hat=lin_reg_lbfgs(X,y)#Verify parameters were recoveredcbind(actual=beta,estimated=theta_hat)Indexlin_reg_lbfgs,3RcppEnsmallen(RcppEnsmallen-package),2 RcppEnsmallen-package,25。
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:
COMP5212_Software Construction_Semester1_2012_week8_aggregates
Reference:Hanly and Koffman, Ch 7, 8, 11.1-566.06666666666666666666A 2 7 m l * y char , each of the boxes in the diagram below isreally 1 byte. Adding ‘1’ to the pointer adds 1 byte.-1 234 17 12 53 92 725, each of the boxes in the diagram below is really 4 bytes. Adding ‘1’ to the pointer adds 4 bytes.Another simple type enum day_name -1 234 17 12 53 92 725With arrays of int , each of the boxes in the diagram below is really 4 bytes. Adding ‘1’ to the pointer adds 4 bytes.Sun Sat Sun Mon Wed Sat Thu With arrays of int-enum , each of the boxes in the diagram below is really 4 bytes. Adding ‘1’ to the pointer adds 4 bytes.0 6 0 1 3 6 5With arrays of enum , each of the boxes in the diagram below is really 4 bytes. Adding ‘1’ to the pointer adds 4 bytes.struct car_descA 2 7 m l * ychar , each of the boxes in the diagram below is really 1 byte. Adding ‘1’ to the pointer adds 1 byte.-1 234 17 12 53 92 725, each of the boxes in the diagram below is really 4 bytes. Adding ‘1’ to the pointer adds 4 bytes.jkjkjjjjjkjkjjkjkjjjjjkjkjjkjkjjjjjkjkjjkjkjjjjjkjkjjkjkjjjjjkjkj jkjkjjjjjkjkj jkjkjjjjjkjkjTHING each of the boxes in the diagram below is sizeof(THING) bytes. Adding ‘1’ to the pointer addsThis works because of a special (hidden) value associated with asizeof operatorstruct mine s1;Given the following declarations,。
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
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。
IBM Maximo 资产配置管理器 7.6.3 快速入门指南说明书
IBM Maximo Asset Configuration ManagerVersion 7.6.3Quick Start GuideThis guide introduces IBM Maximo Asset Configuration Manager Version 7.6.3, provides a link to a list of prerequisite software, gets you started with a typical installation, and provides a roadmap to other important information.National Language Version:To obtain the Quick Start Guide in other languages, print the language-specific PDF file from the installation media.Product overviewIBM®Maximo®Asset Configuration Manager provides organizations with features to manage the builds of high-value, complex, and regulated assets such as aircraft, locomotives, or missiles. Maximo Asset Configuration Manager is a rules-based configuration management system that is based on MIL-STD-1388-2B, a United States military standard that uses the Logistics Support Analysis Record (LSAR).Before you install the product, read the IBM Maximo Asset Configuration Manager version 7.6.3 Installation Guideexisting release notes for this product (/support/knowledgecenter/SSLKSJ_7.6.3/com.ibm.acm.doc/common/relnotes.html). Release notes contain the latest information that is relevant to the installation of this product. If no additional information is available, this link returns no search results.For complete information, including installation instructions, see the Maximo Asset Configuration Manager in IBMKnowledge Center (/support/knowledgecenter/SSLKSJ_7.6.3/com.ibm.acm.doc/welcome.html).2Step 2: Plan the installationYou install Maximo Asset Configuration Manager on a Microsoft Windows administrative workstation. Ensure that IBM Maximo Asset Management version 7.6.0.5 is installed on the same administrative workstation where you plan to install Maximo Asset Configuration Manager version 7.6.3, and in the same language as Maximo Asset Configuration Manager version 7.6.3.You must have system administrator rights and privileges to install the product.For information about the hardware, software, and network requirements for your product, see the System Requirements section in the Overview and Planning page on the Maximo Asset Management wiki (https:///developerworks/community/wikis/home?lang=en#!/wiki/IBM%20Maximo%20Asset%20Management/page/Overview%2 0and%20planning)3Step 3: Install the productTo install Maximo Asset Configuration Manager:1.Review the software requirements.2.If you are upgrading to Maximo Asset Configuration Manager version 7.6.3 from an earlier version of Maximo AssetConfiguration Manager, see the Upgrade Guide for IBM Maximo Products on the IBM Support Portal(/support/entry/portal/Overview/Software/Tivoli/Maximo_Asset_Management).3.Prepare to install.4.Install Maximo Asset Configuration Manager.5.For Oracle WebLogic Server environments only: you must deploy the Enterprise Application Archive (EAR) files.6.For the IBM WebSphere®Application Server environments: The EAR files are installed when you install the processautomation engine. If this task was deferred during the Maximo Asset Configuration Manager installation, deploy the EAR files.Detailed instructions are in the IBM Maximo Asset Configuration Manager 7.6.3 Installation Guide in IBM Knowledge Center (/support/knowledgecenter/SSLKSJ_7.6.3/com.ibm.acm.doc/welcome.html).IBM®More informationAfter you install the product, use IBM Knowledge Center to learn more about the product.For more information, see the following resources:v Product support (/support/entry/portal/Overview/Software/Tivoli/Maximo_Asset_Configuration_Manager)v IBM User Communities (https:///social/aggregator/ibm)Maximo Asset Configuration Manager Licensed Materials - Property of IBM. © Copyright IBM Corp. 2008, 2016. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.IBM, the IBM logo, and ®are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” (/legal/copytrade.shtml).Printed in Ireland。
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。
matlab2012 运行节 -回复
matlab2012 运行节-回复IntroductionMATLAB is a programming language and development environment that is widely used in the fields of mathematics, engineering, and scientific research. It provides a flexible platform for data analysis, simulation, and visualization. In this article, we will explore the main features and functionalities of MATLAB 2012, and provide a step-by-step guide on how to run it effectively.Step 1: Installing MATLAB 2012To begin, you need to install MATLAB 2012 on your computer. The installation process is straightforward and involves running the MATLAB installer and following the on-screen instructions. Once the installation is complete, you can launch MATLAB 2012 by double-clicking on its icon.Step 2: Understanding the MATLAB EnvironmentOnce MATLAB 2012 is launched, you will be presented with the MATLAB desktop, which consists of several windows and panels.The main window is the Command Window, where you can directly enter MATLAB commands and execute them. Additionally, you will find the Current Folder window, which displays the files and folders in your current working directory. The Workspace window displays the variables and their values that are currently in memory. Finally, the Command History window shows the previously executed commands.Step 3: Running MATLAB CommandsMATLAB 2012 is an interactive environment, which means that you can enter commands directly into the Command Window and have them executed immediately. For example, you can perform basic operations such as addition, subtraction, multiplication, and division by simply entering the corresponding arithmetic expression.In addition to basic operations, MATLAB 2012 provides a wide range of built-in functions for mathematical computations, data analysis, and visualization. These functions can be called directly from the Command Window. For example, you can use the "sin" function to calculate the sine of an angle, or the "sqrt" function tocalculate the square root of a number.Step 4: Managing and Analyzing DataMATLAB 2012 provides powerful tools for manipulating and analyzing data. You can import data from various file formats, such as Excel spreadsheets or CSV files, into MATLAB using the "importdata" function. Once the data is imported, you can perform various operations on it, such as sorting, filtering, and aggregating.Furthermore, MATLAB 2012 provides numerous functions and tools for data visualization. You can create 2D and 3D plots, histograms, scatter plots, and more. These visualizations not only help in understanding the data but also make it easier to communicate the findings to others.Step 5: Writing MATLAB ScriptsWhile MATLAB 2012 allows you to execute commands directly in the Command Window, it also provides the ability to write and run scripts. A MATLAB script is a file that contains a series of MATLAB commands, which are executed in sequential order. Writing scriptscan be beneficial if you have a set of repetitive or complex calculations to perform.To create a MATLAB script, you need to use a text editor and save the file with a ".m" extension. Once the script is saved, you can execute it in MATLAB by typing the name of the script in the Command Window. The script will run, and the output (if any) will be displayed in the Command Window.ConclusionMATLAB 2012 is a powerful programming language and development environment that is widely used in various scientific and engineering fields. In this article, we have covered the main steps involved in running MATLAB 2012. We discussed the installation process, the MATLAB environment, executing commands, managing and analyzing data, and writing MATLAB scripts. By following these steps, you can effectively utilize MATLAB 2012 for various computational tasks and data analysis projects.。
《网络服务器搭建、配置与管理-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服务器的应用环境。
算法导论(第二版)课后习题解答
Θ
i=1
i
= Θ(n2 )
This holds for both the best- and worst-case running time. 2.2 − 3 Given that each element is equally likely to be the one searched for and the element searched for is present in the array, a linear search will on the average have to search through half the elements. This is because half the time the wanted element will be in the first half and half the time it will be in the second half. Both the worst-case and average-case of L INEAR -S EARCH is Θ(n). 3
Solutions for Introduction to algorithms second edition
Philip Bille
The author of this document takes absolutely no responsibility for the contents. This is merely a vague suggestion to a solution to some of the exercises posed in the book Introduction to algorithms by Cormen, Leiserson and Rivest. It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message to beetle@it.dk. It is important that you try hard to solve the exercises on your own. Use this document only as a last resort or to check if your instructor got it all wrong. Please note that the document is under construction and is updated only sporadically. Have fun with your algorithms. Best regards, Philip Bille
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。