超低价的META工具RFtool功能的使用(中文版)
- 格式:doc
- 大小:797.50 KB
- 文档页数:11
Package‘metatools’March13,2023Type PackageTitle Enable the Use of'metacore'to Help Create and Check DatasetVersion0.1.5Description Uses the metadata information stored in'metacore'objects to check and build meta-data associated columns.License MIT+file LICENSEEncoding UTF-8RoxygenNote7.2.3Imports dplyr,metacore(>=0.0.4),purrr,rlang,stringr,tidyr,tibble,magrittrSuggests testthat(>=3.0.0),haven,covr,safetyData,admiral.testConfig/testthat/edition3URL https://pharmaverse.github.io/metatools/BugReports https:///pharmaverse/metatools/issuesNeedsCompilation noAuthor Christina Fillmore[aut,cre](<https:///0000-0003-0595-2302>), Mike Stackhouse[aut](<https:///0000-0001-6030-723X>),GlaxoSmithKline LLC[cph,fnd],F.Hoffmann-La Roche AG[cph,fnd],Atorus Research LLC[cph,fnd]Maintainer Christina Fillmore<****************************>Repository CRANDate/Publication2023-03-1310:00:05UTCR topics documented:add_labels (2)add_variables (3)build_from_derived (3)build_qnam (4)12add_labels check_ct_col (5)check_ct_data (6)check_variables (7)combine_supp (7)convert_var_to_fct (8)create_cat_var (9)create_subgrps (10)create_var_from_codelist (10)drop_unspec_vars (12)get_bad_ct (12)make_supp_qual (13)metatools_example (14)order_cols (14)remove_labels (15)set_variable_labels (15)sort_by_key (16)Index18 add_labels Apply labels to multiple variables on a data frameDescriptionThis function allows a user to apply several labels to a dataframe at once.Usageadd_labels(data,...)Argumentsdata A data.frame or tibbled parameters in the form of variable=’label’Valuedata with variable labels appliedExamplesadd_labels(mtcars,mpg="Miles Per Gallon",cyl="Cylinders")add_variables3 add_variables Add Missing VariablesDescriptionThis function adds in missing columns according to the type set in the metacore object.All values in the new columns will be missing,but typed correctly.If unable to recognize the type in the metacore object will return a logical type.Usageadd_variables(dataset,metacore,dataset_name=NULL)Argumentsdataset Dataset to add columns to.If all variables are present no columns will be added.metacore metacore object that only contains the specifications for the dataset of interest.dataset_name Optional string to specify the dataset.This is only needed if the metacore object provided hasn’t already been subsetted.ValueThe given dataset with any additional columns addedExampleslibrary(metacore)library(haven)library(dplyr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")data<-read_xpt(metatools_example("adsl.xpt"))%>%select(-TRTSDT,-TRT01P,-TRT01PN)add_variables(data,spec)build_from_derived Build a dataset from derivedDescriptionThis function builds a dataset out of the columns that just need to be pulled through.So any variable that has a derivation in the format of’dataset.variable’will be pulled through to create the new dataset.When there are multiple datasets present,they will be joined by the shared‘key_seq‘variables.These columns are often called’Predecessors’in ADaM,but this is not universal so that is optional to specify.4build_qnamUsagebuild_from_derived(metacore,ds_list,dataset_name=NULL,predecessor_only=TRUE,keep=FALSE)Argumentsmetacore metacore object that contains the specifications for the dataset of interest.ds_list Named list of datasets that are needed to build the fromdataset_name Optional string to specify the dataset that is being built.This is only needed if the metacore object provided hasn’t already been subsetted.predecessor_onlyBy default‘FALSE‘,but if‘TRUE‘will only use derivations with the origin of’Predecessor’keep Boolean to determine if the original columns should be kept.By default‘FALSE‘, so only the ADaM columns are kept.If‘TRUE‘the resulting dataset will haveall the ADaM columns as well as any SDTM column that were renamed in theADaM(i.e‘ARM‘and‘TRT01P‘will be in the resulting dataset)ValuedatasetExampleslibrary(metacore)library(haven)library(magrittr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")ds_list<-list(DM=read_xpt(metatools_example("dm.xpt")))build_from_derived(spec,ds_list,predecessor_only=FALSE)build_qnam Build the observations for a single QNAMDescriptionBuild the observations for a single QNAMUsagebuild_qnam(dataset,qnam,qlabel,idvar,qeval,qorig)check_ct_col5 Argumentsdataset Input datasetqnam QNAM valueqlabel QLABEL valueidvar IDV AR variable name(provided as a string)qeval QEV AL value to be populated for this QNAMqorig QORIG value to be populated for this QNAMValueObservations structured in SUPP formatcheck_ct_col Check Control Terminology for a Single ColumnDescriptionThis function checks the column in the dataset only contains the control terminology as defined by the metacore specificationUsagecheck_ct_col(data,metacore,var,na_acceptable=NULL)Argumentsdata Data to checkmetacore A metacore object to get the codelist from.If the variable has different codelists for different datasets the metacore object will need to be subsetted using‘se-lect_dataset‘from the metacore package.var Name of variable to checkna_acceptable Logical value,set to‘NULL‘by default,so the acceptability of missing values is based on if the core for the variable is"Required"in the‘metacore‘object.Ifset to‘TRUE‘then will pass check if values are in the control terminology orare missing.If set to‘FALSE‘then NA will not be acceptable.ValueGiven data if column only contains control terms.If not,will error given the values which should not be in the column6check_ct_dataExampleslibrary(metacore)library(haven)library(magrittr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")data<-read_xpt(metatools_example("adsl.xpt"))check_ct_col(data,spec,TRT01PN)check_ct_col(data,spec,"TRT01PN")check_ct_data Check Control Terminology for a DatasetDescriptionThis function checks that all columns in the dataset only contains the control terminology as defined by the metacore specificationUsagecheck_ct_data(data,metacore,na_acceptable=NULL)Argumentsdata Dataset to checkmetacore metacore object that contains the specifications for the dataset of interest.If any variable has different codelists for different datasets the metacore object willneed to be subsetted using‘select_dataset‘from the metacore package.na_acceptable Logical value,set to‘NULL‘by default,so the acceptability of missing values is based on if the core for the variable is"Required"in the‘metacore‘object.Ifset to‘TRUE‘then will pass check if values are in the control terminology orare missing.If set to‘FALSE‘then NA will not be acceptable.ValueGiven data if all columns pass.It will error otherwiseExampleslibrary(haven)library(metacore)library(magrittr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")data<-read_xpt(metatools_example("adsl.xpt"))check_ct_data(data,spec)check_variables7 check_variables Check Variable NamesDescriptionThis function checks the variables in the dataset against the variables defined in the metacore spec-ifications.If everything matches the function will return‘TRUE‘and a message starting everything is as expected.If there are additional or missing variables and error will explain the discrepancies Usagecheck_variables(data,metacore,dataset_name=NULL)Argumentsdata Dataset to checkmetacore metacore object that only contains the specifications for the dataset of interest.dataset_name Optional string to specify the dataset.This is only needed if the metacore object provided hasn’t already been subsetted.Valuemessage if the dataset matches the specification and the dataset,and error otherwiseExampleslibrary(haven)library(metacore)library(magrittr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")data<-read_xpt(metatools_example("adsl.xpt"))check_variables(data,spec)combine_supp Combine the Domain and Supplemental QualifierDescriptionCombine the Domain and Supplemental QualifierUsagecombine_supp(dataset,supp)8convert_var_to_fct Argumentsdataset Domain datasetsupp Supplemental Qualifier datasetValuea dataset with the supp variables added to itExampleslibrary(safetyData)library(tibble)combine_supp(sdtm_ae,sdtm_suppae)%>%as_tibble()convert_var_to_fct Convert Variable to Factor with Levels Set by Control TermsDescriptionThis functions takes a dataset,a metacore object and a variable name.Then looks at the metacore object for the control terms for the given variable and uses that to convert the variable to a factor with those levels.If the control terminology is a code list,the code column will be used.The function fails if the control terminology is an external libraryUsageconvert_var_to_fct(data,metacore,var)Argumentsdata A dataset containing the variable to be modifiedmetacore A metacore object to get the codelist from.If the variable has different codelists for different datasets the metacore object will need to be subsetted using‘se-lect_dataset‘from the metacore packagevar Name of variable to changeValueDataset with variable changed to a factorcreate_cat_var9Exampleslibrary(metacore)library(haven)library(dplyr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")dm<-read_xpt(metatools_example("dm.xpt"))%>%select(USUBJID,SEX,ARM)#Variable with codelist control termsconvert_var_to_fct(dm,spec,SEX)#Variable with permitted value control termsconvert_var_to_fct(dm,spec,ARM)create_cat_var Create Categorical Variable from CodelistDescriptionUsing the grouping from either the‘decode_var‘or‘code_var‘and a reference variable(‘ref_var‘) it will create a categorical variable and the numeric version of that categorical variable.Usagecreate_cat_var(data,metacore,ref_var,grp_var,num_grp_var=NULL)Argumentsdata Dataset with reference variable in itmetacore A metacore object to get the codelist from.If the variable has different codelists for different datasets the metacore object will need to be subsetted using‘se-lect_dataset‘from the metacore package.ref_var Name of variable to be used as the reference i.e AGE when creating AGEGR1 grp_var Name of the new grouped variablenum_grp_var Name of the new numeric decode for the grouped variable.This is optional if no value given no variable will be createdValuedataset with new column addedExampleslibrary(metacore)library(haven)library(dplyr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")10create_var_from_codelist dm<-read_xpt(metatools_example("dm.xpt"))%>%select(USUBJID,AGE)#Grouping Column Onlycreate_cat_var(dm,spec,AGE,AGEGR1)#Grouping Column and Numeric Decodecreate_cat_var(dm,spec,AGE,AGEGR1,AGEGR1N)create_subgrps Create SubgroupsDescriptionCreate SubgroupsUsagecreate_subgrps(ref_vec,grp_defs)Argumentsref_vec Vector of numeric valuesgrp_defs Vector of strings with groupings defined.Format must be either:<00,>=00, 00-00,or00-<00ValueCharacter vector of the values in the subgroupsExamplescreate_subgrps(c(1:10),c("<2","2-5",">5"))create_subgrps(c(1:10),c("<=2",">2-5",">5"))create_subgrps(c(1:10),c("<2","2-<5",">=5"))create_var_from_codelistCreate Variable from CodelistDescriptionThis functions uses code/decode pairs from a metacore object to create new variables in the datacreate_var_from_codelist11 Usagecreate_var_from_codelist(data,metacore,input_var,out_var,decode_to_code=TRUE)Argumentsdata Dataset that contains the input variablemetacore A metacore object to get the codelist from.If the‘out_var‘has different codelists for different datasets the metacore object will need to be subsetted using‘se-lect_dataset‘from the metacore package.input_var Name of the variable that will be translated for the new columnout_var Name of the output variable.Note:the grouping will always be from the code of the codelist associates with‘out_var‘decode_to_code Direction of the translation.By default assumes the‘input_var‘is the decode column of the codelist.Set to‘FALSE‘if the‘input_var‘is the code column ofthe codelistValueDataset with a new column addedExampleslibrary(metacore)library(tibble)data<-tribble(~USUBJID,~VAR1,~VAR2,1,"M","Male",2,"F","Female",3,"F","Female",4,"U","Unknown",5,"M","Male",)spec<-spec_to_metacore(metacore_example("p21_mock.xlsx"),quiet=TRUE)create_var_from_codelist(data,spec,VAR2,SEX)create_var_from_codelist(data,spec,"VAR2","SEX")create_var_from_codelist(data,spec,VAR1,SEX,decode_to_code=FALSE)12get_bad_ct drop_unspec_vars Drop Unspecified VariablesDescriptionThis function drops all unspecified variables.It will throw and error if the dataset does not contain all expected variables.Usagedrop_unspec_vars(dataset,metacore,dataset_name=NULL)Argumentsdataset Dataset to changemetacore metacore object that only contains the specifications for the dataset of interest.dataset_name Optional string to specify the dataset.This is only needed if the metacore object provided hasn’t already been subsetted.ValueDataset with only specified columnsExampleslibrary(metacore)library(haven)library(dplyr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")data<-read_xpt(metatools_example("adsl.xpt"))%>%select(USUBJID,SITEID)%>%mutate(foo="Hello")drop_unspec_vars(data,spec)get_bad_ct Gets vector of control terminology which should be thereDescriptionThis function checks the column in the dataset only contains the control terminology as defined by the metacore specification.It will return all values not found in the control terminologyUsageget_bad_ct(data,metacore,var,na_acceptable=NULL)make_supp_qual13Argumentsdata Data to checkmetacore A metacore object to get the codelist from.If the variable has different codelists for different datasets the metacore object will need to be subsetted using‘se-lect_dataset‘from the metacore package.var Name of variable to checkna_acceptable Logical value,set to‘NULL‘by default,so the acceptability of missing values is based on if the core for the variable is"Required"in the‘metacore‘object.Ifset to‘TRUE‘then will pass check if values are in the control terminology orare missing.If set to‘FALSE‘then NA will not be acceptable.eValuevectormake_supp_qual Make Supplemental QualifierDescriptionMake Supplemental QualifierUsagemake_supp_qual(dataset,metacore,dataset_name=NULL)Argumentsdataset dataset the supp will be pulled frommetacore A subsetted metacore object to get the supp information from.If not already subsetted then a‘dataset_name‘will need to be provideddataset_name optional name of datasetValuea CDISC formatted SUPP datasetExampleslibrary(metacore)library(safetyData)library(tibble)load(metacore_example("pilot_SDTM.rda"))spec<-metacore%>%select_dataset("AE")ae<-combine_supp(sdtm_ae,sdtm_suppae)make_supp_qual(ae,spec)%>%as_tibble()14order_cols metatools_example Get path to pkg exampleDescriptionpkg comes bundled with a number of samplefiles in its‘inst/extdata‘directory.This function make them easy to accessUsagemetatools_example(file=NULL)Argumentsfile Name offile.If‘NULL‘,the examplefiles will be listed.Examplesmetatools_example()metatools_example("dm.xpt")order_cols Sort Columns by OrderDescriptionThis function sorts the dataset according to the order found in the metacore object.Usageorder_cols(data,metacore,dataset_name=NULL)Argumentsdata Dataset to sortmetacore metacore object that contains the specifications for the dataset of interest.dataset_name Optional string to specify the dataset.This is only needed if the metacore object provided hasn’t already been subsetted.Valuedataset with ordered columnsremove_labels15Exampleslibrary(metacore)library(haven)library(magrittr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")data<-read_xpt(metatools_example("adsl.xpt"))order_cols(data,spec)remove_labels Remove labels to multiple variables on a data frameDescriptionThis function allows a user to removes all labels to a dataframe at once.Usageremove_labels(data)Argumentsdata A data.frame or tibbleValuedata with variable labels appliedExampleslibrary(haven)data<-read_xpt(metatools_example("adsl.xpt"))remove_labels(data)set_variable_labels Apply labels to a data frame using a metacore objectDescriptionThis function leverages metadata available in a metacore object to apply labels to a data frame.Usageset_variable_labels(data,metacore,dataset_name=NULL)Argumentsdata A dataframe or tibble upon which labels will be appliedmetacore metacore object that contains the specifications for the dataset of interest.dataset_name Optional string to specify the dataset.This is only needed if the metacore object provided hasn’t already been subsetted.ValueDataframe with labels appliedExamplesmc<-metacore::spec_to_metacore(metacore::metacore_example("p21_mock.xlsx"),quiet=TRUE)dm<-haven::read_xpt(metatools_example("dm.xpt"))set_variable_labels(dm,mc,dataset_name="DM")sort_by_key Sort Rows by Key SequenceDescriptionThis function sorts the dataset according to the key sequence found in the metacore object.Usagesort_by_key(data,metacore,dataset_name=NULL)Argumentsdata Dataset to sortmetacore metacore object that contains the specifications for the dataset of interest.dataset_name Optional string to specify the dataset.This is only needed if the metacore object provided hasn’t already been subsetted.Valuedataset with ordered columnsExampleslibrary(metacore)library(haven)library(magrittr)load(metacore_example("pilot_ADaM.rda"))spec<-metacore%>%select_dataset("ADSL")data<-read_xpt(metatools_example("adsl.xpt")) sort_by_key(data,spec)Indexadd_labels,2add_variables,3build_from_derived,3build_qnam,4check_ct_col,5check_ct_data,6check_variables,7combine_supp,7convert_var_to_fct,8create_cat_var,9create_subgrps,10create_var_from_codelist,10drop_unspec_vars,12get_bad_ct,12make_supp_qual,13metatools_example,14order_cols,14remove_labels,15set_variable_labels,15sort_by_key,1618。
META 工具1.4 META 工具软件的设置1.4.1 打开META,先对软件的使用作相应的配置,包括基带芯片型号、串口、波特率和基准时钟频率等关键参数。
使用前根据手机的基带芯片选择正确的型号,选择正确的时钟频率,如不知道则使用工具软件自动功能Auto detect。
如图1 至3:图1图2图31.4.2 打开数据库文件(文件名一般为DataBase..),用于调出手机的参数,注意数据库文件必须跟手机的软件版本对应,开发中心在下发新版软件时候会包括该版软件的数据库文件。
图42. 介绍META 工具生产过程中常用的几个方面内容Functions:1. RF Tool2. Update parameter2.1 RF Tool主要介绍RF Tool 的PM、Gain sweep、Continuous RX、Continuous TX、TX level andprofile、AFC Control 等功能图52.1.1PM (power measurement)测接收路径损耗该功能主要用于检测手机接收电路的功率接收性能,适合对不入网、接收信号弱等跟接收相关的机子的检测,本例以测量手机GSM 20 信道接收来介绍,操作步骤如下步骤1:用射频线把手机跟8960 连接,8960 的工作模式设置成【Active】,还要设置【CELL Power】=-85dbm,【CELL band】=PGSM ,【Broadcast Chan】=20图6步骤2:设置如下【Band】=GSM900, 根据需要设置手机的接收频段【ARFCN】=20,根据需要设置手机的接收信道【PM/Frame】=1,测量的帧数,建议使用默认值1【PM Count】=10,每帧测量的点数,建议使用默认值10【Gain】=40,手机整个射频接收电路的增益值,建议设成40db【Start】,按下该按钮则手机进入接收模式,并可以在白色文本框看到测量结果:图7读数结果各值代表的指标如下:【Ant.Power】指8960 信号经过射频口、天线开关、声表滤波器后得到的功率值,正常的值应该比原来信号功率衰减2dbm 以内,如果结果衰减远大于2dbm 或者出现“Invalid”都表示该模块电路出现了故障,这个值也是我们应该观察的。
RF组托:第一步:用登录物流大赛软件的账号登录RF;登录RF的界面如下:第二步:在NOS-WMS-RF主界面页面,如下图,点击【入库作业】按钮,进入到NOS-WMS-RF 入库作业页面;第三步:在NOS-WMS-RF入库作业页面,如下图,选择一个入库单状态是待组托的入库单ROD201004261001,点击【组托】按钮,进入到NOS-WMS-RF入库作业-组托页面;第四步:在NOS-WMS-RF入库作业-组托页面,如下图,将光标移动到“托盘”的输入框内,用RF扫描托盘的标签53500;第五步:扫描托盘标签53500之后,将光标移动到“货品”的输入框内,用RF扫描货品的标签80602,RF会自动的将扫描的货品80602的数量,显示在“数量”输入框中。
扫描货品80602之后,如果还有货品80602放到此托盘53500上,在“数量”输入框中输入相应的数量。
第六步:如果放到此托盘53500上所有货品80602扫描完成,如下图,点击【确定】按钮。
第七步:重复第四步、第五步和第六步,组托本入库单ROD201004261001上其他的货品,本入库单ROD201004261001所有货品组托完毕,如下图,点击【提交组托】按钮。
第八步:提交组托成功的提示,如下图RF上架:第一步:用登录物流大赛软件的账号登录RF;登录RF的界面如下:第二步:在NOS-WMS-RF主界面页面,如下图,点击【入库作业】按钮,进入到NOS-WMS-RF 入库作业页面;第三步:在NOS-WMS-RF入库作业页面,如下图,选择一个入库单状态是已组托的入库单ROD201004261001,点击【上架】按钮,进入到NOS-WMS-RF入库作业-上架页面;第四步:在NOS-WMS-RF入库作业-上架页面,将光标移动到“托盘”的输入框内,用RF扫描托盘的标签53500;第五步:扫描托盘标签53500之后,将光标移动到“仓位”的输入框内,用RF扫描仓位的标签51004,扫描结果如下图:第六步:重复第四步和第五步,上架本入库单ROD201004261001上其他的托盘,本入库单ROD201004261001所有托盘上架完毕,如下图,点击【提交上架】按钮。
RTool远程管理工具使用说明资料版本:V1.2—2019.03声明首先非常感谢您选择本公司产品!在使用前,请您仔细阅读本用户手册。
非本公司书面许可,任何单位和个人不得擅自摘抄、复制本书内容的部分或全部,并不得以任何形式传播。
由于不断更新,本公司不能承诺该资料与实际产品一致,同时也不承担由于实际技术参数与本资料不符所导致的任何争议,任何改动恕不提前通知。
本公司保留最终更改权和解释权。
版权所有©北京映翰通网络技术股份有限公司及其许可者版权所有,保留一切权利。
本手册图形界面约定格式意义< >带尖括号“< >”表示按钮名,如“单击<确定>按钮”。
“”带双引号“”表示窗口名、菜单名,如:弹出“新建用户”窗口。
>>多级菜单用“>>”隔开。
如“文件>>新建>>文件夹”多级菜单表示“文件”菜单下的“新建”子菜单下的“文件夹”菜单项。
提醒操作中应注意的事项,不当的操作可能会导致数据丢失或者设备损坏。
对操作内容的描述进行必要的补充和说明。
技术支持联络信息北京映翰通网络技术股份有限公司(总部)地址:北京市朝阳区利泽中园103号楼3层302电话:(8610)6439 1099 传真:(8610)8417 0089成都办事处电话:************地址:四川省成都市高新区府城大道西段399号,天府新谷10栋1406室广州办事处电话:************地址:广州市天河区棠东东路5号远洋新三板创意园B-130单元武汉办事处电话:************地址:湖北省武汉市洪山区珞瑜东路2号巴黎豪庭11栋2001室上海办事处电话:************地址:上海市普陀区顺义路18号1103室目录1. 介绍RTool (1)1.1. RTool的界面介绍 (1)1.2. RTool与DTU建立连接 (3)2. RTool的操作 (3)2.1. 远程升级 (3)2.2. 远程读取配置参数 (5)2.3. 查看/修改配置参数 (6)2.4. 远程下发配置参数 (7)2.5. 远程重启 (8)1.介绍RTool映翰通公司开发的远程管理工具(简称RTool),可对InDTU设备(简称DTU)进行远程管理。
r tool用法-回复R语言是一种用于统计分析和数据可视化的编程语言和环境。
它是由新西兰的罗斯·伊哈卡和罗伯特·杰特曼于1993年开发的,并于1995年首次发布。
R语言在数据科学和统计学领域非常受欢迎,其功能强大且易于使用,可以处理各种数据类型。
R语言是开源软件,这意味着它的源代码对任何人都是可用的并且免费。
当前,R语言的最新版本是R 4.1.0,在全球范围内得到广泛使用。
在本文中,我们将一步一步介绍R语言的用法和功能。
首先,我们需要安装R语言。
你可以从官方网站(在R环境中,你可以使用R的控制台进行交互式编程,也可以使用R脚本编辑器创建和运行脚本。
R脚本是包含一系列R命令的文本文件,用于自动化和批处理任务。
在R语言中,你可以使用各种数据结构,包括向量、矩阵、数据框和列表。
向量是R中最基本的数据结构,它由一组相同类型的元素组成。
你可以使用向量进行数值计算、集合操作和条件判断。
下面是一个简单示例,展示如何创建和操作向量:# 创建一个向量x <- c(1, 2, 3, 4, 5)# 计算向量元素的和sum(x)# 计算向量元素的平均值mean(x)# 选择向量中的部分元素x[2:4]除了向量,你还可以使用矩阵来处理二维数据。
矩阵是一个具有行和列的二维数据结构。
你可以对矩阵进行各种数学运算、转置和子集选择。
下面是一个简单示例,展示如何创建和操作矩阵:# 创建一个3行2列的矩阵m <- matrix(c(1, 2, 3, 4, 5, 6), nrow=3, ncol=2)# 计算矩阵的和sum(m)# 计算矩阵行的平均值rowMeans(m)# 计算矩阵列的平均值colMeans(m)# 选择矩阵中的部分元素m[2:3, 1]数据框是一种常用的数据结构,类似于数据库中的表格。
数据框可以包含不同类型的数据,并且可以使用列名和行索引进行访问。
下面是一个简单示例,展示如何创建和操作数据框:# 创建一个数据框df <- data.frame(name=c("Alice", "Bob", "Carol"), age=c(25, 30, 35))# 查看数据框的结构str(df)# 访问数据框中的列dfname# 访问数据框中的行df[2, ]# 根据条件筛选数据框中的行df[dfage > 30, ]列表是一种可以包含不同类型元素的数据结构,并且可以嵌套使用。
META工具的使用指引1.简述1.1工具介绍META(Mobile Engineering Testing Architecture)是在MTK平台中用于测试、校准、调试手机的一个开发工具,本文主要介绍该工具的使用方法,方便生产测试和维修对手机的射频性能进行调整以及故障的分析判断。
1.2系统配置软件环境●MS Windows ME,98,2000or XPThe following driver and library are needed for META factory:●NI(National Instruments)GPIB-USB driver(The driver is bundled with NI GPIB-USB device)or Agilent GPIB-USB driver.硬件环境●Generic Pentium III or above PC●Agilent8960or R&S CMU200The following hardware is needed for META factory●NI or Agilent GPIB-USB device●Agilent661x or Agilent663x2series power supply1.3META的安装执行“setup.exe”进行安装,请根据安装步骤提示来进行安装,如图1至4:图1图2图3图41.4META工具软件的设置1.4.1打开META,先对软件的使用作相应的配置,包括基带芯片型号、串口、波特率和基准时钟频率等关键参数。
使用前根据手机的基带芯片选择正确的型号,选择正确的时钟频率,如不知道则使用工具软件自动功能Auto detect。
如图5至7:图5图6图71.4.2打开数据库文件(文件名一般为DataBase..),用于调出手机的参数,注意数据库文件必须跟手机的软件版本对应,开发中心在下发新版软件时候会包括该版软件的数据库文件。
RF软件安装说明1、数据库的安装 (2)2 软件安装 (7)3 驱动安装 (8)4、动态库升级说明: (13)5、软件接口说明: (14)6、单机版软件升级为网络版软件处理方案 (17)7、网络版软件服务器移植处理方案 (17)1、数据库的安装1.1、功能如果安装的是RF-NK网络版软件,则必须先SQL2000数据库,其安装步骤如下。
1.2、操作说明运行sql2000安装文件:选择安装SQL Server 2000组件,出现如下图所示:选择安装数据库服务器:选择本地计算机,下一步:选择创建新的SQL Server实例,或安装“客户端工具”, 下一步:输入姓名和公司,下一步:选择是:下一步:下一步:选择混合模式,把空密码选上,下一步:下一步:点完成按钮,完成安装。
安装完成后重新启动计算机,计算机启动后,如系统有安装防火墙则关闭防火墙。
等待电脑重启完成后,双击桌面创建门锁数据库图标,运行创建数据库程序:点创建数据库按钮,当下方状态栏显示,数据库创建成功则数据库成功创建。
2 软件安装A.安装系统:插入光碟,运行文件“LS-RF-CN-ALL-ALLVer8.1.exe”,根据提示完成安装过程。
注意:如计算机已安装旧版本软件,安装提示以下界面时请选择“删除”,卸载原有版本软件。
卸载完成后再次运行文件“LS-RF-CN-ALL-ALLVer8.1.exe”安装本软件。
B.安装发卡机:串行口发卡机安装:将串行口发卡机电缆线中有串口和USB口的两端分别接在电脑的串口与USB口上,再把另外一端只有USB口的接在发卡机上。
USB口发卡机安装:将USB电缆分别连接电脑USB口与发卡机USB口。
注意:为确保正常使用,电脑端USB口请务必连接在主板上的USB插座(位于机箱后端)。
部分电脑,如连接机箱前端的USB插座存在工作不正常的可能。
注意:如果为RW-RF-34U的发卡机要正常运行需先安装发卡机驱动,请参见发卡机驱动安装说明。
META工具软件RFTool功能的使用
1.简述
1.1工具介绍
META(Mobile Engineering Testing Architecture)是在MTK平台中用于测试、校准、调试手机的一个开发工具,本文主要介绍其射频工具RFTool的使用方法,便于在生产维修中对手机的射频性能进行调整。
1.2 系统配置
软件环境
●MS Windows ME, 98, 2000 or XP
The following driver and library are needed for META factory:
●NI (National Instruments) GPIB-USB driver (The driver is bundled with NI GPIB-USB device) or Agilent GPIB-USB driver.
硬件环境
●Generic Pentium III or above PC
●Agilent 8960 or R&S CMU 200
The following hardware is needed for META factory
●NI or Agilent GPIB-USB device
●Agilent 661x or Agilent 663x2 series power supply
1.3 META的安装
执行“setup.exe”进行安装,请根据安装步骤提示来进行安装,如图1-3
图1
图2
图3
2.RF Tool的使用
主要介绍RF Tool的PM、TX level and profile、Continuous TX功能
2.1 软件的设置
2.1.1打开META,先对软件的使用作相应的配置,包括串口、基带芯片型号、波特率等关键参数。
目前使用的基带芯片主要有6205B、6218,后续还会有6219,使用前根据手机的基带芯片选择正确的型号,否则使用工具软件。
图4
2.1.2打开数据库文件(文件名一般为DataBase..),用于调出手机的参数,注意数据库文件必须跟手机的软件版本对应,开发中心在下发新版软件时候会包括该版软件的数据库文件。
图5
2.2 PM (power measurement)
该功能主要用于检测手机接收电路的功率接收性能,适合对不入网、接收信号弱等跟接收相关的机子的检测,本例以测量手机GSM 20信道接收来介绍,操作步骤如下
步骤1:用射频线把手机跟8960连接,8960的工作模式设置成【Active】,还要设置【CELL Power】=-85dbm,【CELL band】=PGSM ,【Broadcast Chan】=20
图6
步骤2:设置如下
【Band】=GSM900, 根据需要设置手机的接收频段
【ARFCN】=20,根据需要设置手机的接收信道
【PM/Frame】=1,测量的帧数,建议使用默认值1
【PM Count】=10,每帧测量的点数,建议使用默认值10
【Gain】=40,手机整个射频接收电路的功率补偿值,建议设成40db
【Start】,按下该按钮则手机进入接收模式,并可以在白色文本框看到测量结果:
图7
读数结果各值代表的指标如下:
【Ant.Power】指8960信号经过射频口、天线开关、声表滤波器后得到的功率值,正常的值应该比原来信号功率衰减2dbm以内,如果结果衰减远大于2dbm或者出现“Invalid”都表示该模块电路出现了故障,这个值也是我们应该观察的。
图8
【Userd Gain】实际手机整个射频接收电路的功率补偿值,跟软件上设置的【Gain】值存在一定的误差。
【DSP Power】基带DSP接收到的功率值。
【Deviation】表示每次功率测量结果的差别程度,表征了射频接收回路的一致性是否良好。
常见故障的分析:
特别是手机连不上网的,可以用这个PM功能来检测
1)如果【Ant.Power】的值非常低甚至出现Invalid,证明接收回路已经断路,重点检查滤波器、匹配电路、天线开关及其控制信号。
2)如果【Ant.Power】的值比正常值略低,则有可能是接收回路的天线开关、滤波器、匹配电路虚焊。
3)如果误码率较高,主要故障会出现在SAW滤波器上,因为滤波器不能正常工作的会使更多的干扰信号被LNA放大,或者是LNA加大Gain值,使在放大有用信号的同时干扰信号也被放大了。
2.3 TX level and profile
该功能主要通过META的命令实现对手机发射电路的控制和调试,工程师可以用测试仪器对发射的信号进行测量,本例以测量手机GSM 20信道PCL5发射来介绍,
2.3.1测量手机的发射功率及时间VS功率模板
步骤1:用射频线把手机跟8960相连接,并把8960的操作模式设置成【GSM BCH+TCH】, 频段设置【Cell Band】为PGSM,
【Broadcast Chan】为20信道,
【Traffic Band】=PGSM,传输信道
【Traffic Channel】=20,
【MS TX Level】=5,
图9
步骤2:设置META的发射模式的相关选项
【Band】=GSM900, 根据需要设置手机的接收频段
【ARFCN】=20,根据需要设置手机的接收信道
【TSC】=4,发射信号的时隙,该值要保持跟8960的设置一致
【PCL】=5,功率控制等级,该值要保持跟8960的设置一致
【AFC】=4100,自动频率控制补偿值,可以不作改变,按照默认值4100
【Burst Type】=NB,手机的发射脉冲方式,按照默认值NB(常规方式)
设置完毕后,按下“Start”按钮则可以测量到手机发射的burst
图10
步骤3:当控制手机处于发射状态后,则可以用8960来观察发射信号的各项指标性能,包括功率大小、功率时间模板、调制普和开关普等,例如下图为观察到的功率时间模板:
图11
步骤4:META工具提供了对发射功率曲线的微调,但是由于软件本身的缺陷,还不能较直观地对功率曲线进行调整,
●首先进入【Level and Ramp setting...】
●按下【Upload from flash】,功率校准的数值会自动显示在窗口上,
●设置【ARFCN】=20,
●选中PCL5,对应的数值是683,该值代表着发射功率的大小,如果功率大小不符合,可以对该值每次加或减5,按下【Start】,进行功率微调,直到合适为止。
●调整该功率等级对应的上升沿和下降沿数值,可以改变上下升沿的形状
●调整完毕后,按下【Download to flash】,更新后的数值将写入flash。
上升沿和下降沿
图12
说明:该功能只适合对PA的发射曲线进行微调,如果由于发射电路相关器件虚焊、损坏、短路而使发射信号出现比较怪异、严重偏离功率时间模板的情况将无法进行调整。
因为开发工程师是经过分析大量的PA曲线数据计算出的模板数值,所以写到每台手机的功率模板数值是一样的(只是功率大小不同),PA的工艺水平已经成熟,一致性较好,所以一般情况下不建议对模板数值作大的改动,如果更改失败,则需要重新校准。
常见故障分析:
1)META控制手机发射,观察不到发射信号,首先看发射电流是否足够大来判断PA是否处于工作状态,
●如果PA工作但是8960没有收到发射信号,则检查PA输出端的滤波器和天线开关是否正常工作
●如果发射电流很低,PA没有工作,则检查PA的控制电压(PA_EN、VAPC、VBAT等)和压控振荡器输出端衰减器的焊接是否正常(测量对地电阻),还要检查VCO是否已经工作,可以控制手机处于发射状态用频谱仪来测量输出信号。
2)发射的功率时间模板严重变形,用META一般是无法调整的,可能是Transceiver焊接不良或者损坏造成对发射信号的内部调整出现故障。
2.4 Continuous TX
该功能用于对手机发射IQ信号的观察,检测在发射状态下通过示波器可以从射频IC (MT6119)的43,44,45,46脚看到发射的I/Q信号,是一个67KHz的正弦信号,可以判断基带IC的工作是否正常:
图13
图14
2.5 Updata parameter
当升级时候需要对手机进行Format,该功能用于对校准参数和IMEI号等数据的保存,
图15
11。