文档库 最新最全的文档下载
当前位置:文档库 › RWS2014_Zhou-Full Duplex Prototype of OFDM on GNURadio and USRPs

RWS2014_Zhou-Full Duplex Prototype of OFDM on GNURadio and USRPs

RWS2014_Zhou-Full Duplex Prototype of OFDM on GNURadio and USRPs
RWS2014_Zhou-Full Duplex Prototype of OFDM on GNURadio and USRPs

Full Duplex Prototype of OFDM on GNURadio and

USRPs

Wei Zhou,Guillaume Villemaud,Tanguy

Risset

To cite this version:

Wei Zhou,Guillaume Villemaud,Tanguy Risset.Full Duplex Prototype of OFDM on GNURa-dio and USRPs.IEEE Radio Wireless Symposium,Jan2014,Newport Beach,United States. 2014.

HAL Id:hal-00920902

https://hal.inria.fr/hal-00920902

Submitted on19Dec2013

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci-enti?c research documents,whether they are pub-lished or not.The documents may come from teaching and research institutions in France or abroad,or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL,est destin′e e au d′e p?o t et`a la di?usion de documents scienti?ques de niveau recherche,publi′e s ou non,′e manant des′e tablissements d’enseignement et de recherche fran?c ais ou′e trangers,des laboratoires publics ou priv′e s.

Full Duplex Prototype of OFDM on GNURadio and USRPs Wei Zhou,Guillaume Villemaud,and Tanguy Risset

Universit′e de Lyon,INRIA,INSA-Lyon,CITI-INRIA,F-69621,Villeurbanne,France

Abstract—Full-duplex is a technology in telecommunica-tion domain that can perform transmitting and receiving at the same time and in the same frequency band.The major obstacle of full-duplex is the self-interference(SI). Some previous works have focused on the SI cancellation in radio frequency(RF),and generally on a narrowband signal model.We have implemented a full-duplex prototype with orthogonal frequency-division multiplexing(OFDM) technology on GNURadio and Universal Software Radio Peripherals(USRP).We focus on the baseband,namely the digital part of the SI cancellation.Our testbed can achieve a digital cancellation of27dB.After the cancellation,the signal of interest can achieve a bit error rate(BER)in the scale of 10?5at4meters,which is very close to the performance of half-duplex.This is,to our knowledge,the?rst full duplex implementation for OFDM technology.

I.I NTRODUCTION

In telecommunication systems,normally the usage of the radio channel resource should be doubled to realize bidirectional communication.This kind of technology is called half-duplex.The full-duplex,on the other hand, permits the terminal to receive and transmit at the same time,in the same band of frequency.That makes the mechanism of access to media and spectrum allocation much easier and more?exible.It is also helpful for cognitive radio and wireless sensor networks.

A typical full-duplex transceiver requires at least one transmitting(TX)antenna and one receiving(RX)antenna. Normally the distance between the two antennas of the same node is much shorter than the distance between the two nodes.Thus the self-interference(SI)is signi?cantly more important than the signal of interest.According to the calculation made in[1],this difference is73dB,which makes SI cancellation the key issue in realizing a full-duplex system.

As SI cancellation is the most critical problem in the research of full-duplex,many researchers are involved in this topic.However,most of the works are focused on narrowband signal.We tend to analyze the performance of full-duplex on orthogonal frequency-division multiplexing (OFDM),which is a widely used standard in nowadays wireless telecommunication,e.g.in LTE and802.11.We have chosen GNURadio and the Universal Software Radio Peripherals(USRP)as our software and hardware platform respectively.This combination is a typical Software De-?ned Radio(SDR)solution.

II.S TATE OF THE A RT

Some related works[2][3]tend to divide the SI can-cellation into three major categories:antenna cancellation, RF cancellation and digital cancellation.

In[2],antenna cancellation was achieved by placing two TX antennas asymmetrically at d and d+λ/2distance from the RX antenna.This allows the transmit signals to addπout of phase and hence cancel each other.Analog cancellation is also proposed,which requires knowledge of the SI channel to create a copy of the SI signal in the RF domain and cancel it before the signal is digitized. Digital cancellation utilizes the digital samples of the transmitted signal and subtracts them from the received samples,removing up to25dB of SI in their work.

In[3],the authors propose a novel mechanism,balun cancellation,which uses signal inversion,through a balun (balanced/unbalanced)circuit.Being a method of analog cancellation,it pro?ts from the knowledge of the transmis-sion to cancel SI in the RF signal,before it is digitized. Melissa Duarte and Ashutosh Sabharwal discussed the existing approaches and proposed a experimental result on WARPLab framework in their article[4].Melissa Duarte also proposed in her thesis[5]a detailed plan of imple-menting a full-duplex system for802.11transceiver.But in these works,their effort is always focused on narrowband.

III.P LATFORM

We selected GNURadio and USRP as our platform of software and hardware respectively.

GNU Radio is a free and open-source software devel-opment toolkit that provides signal processing blocks to implement software radios[6].

The USRP is a family of products designed and sup-ported by Ettus Research,a National Instrument(NI) https://www.wendangku.net/doc/a014544407.html,RP products are used by engineers worldwide and remain the top choice in software de?ned radio hard-ware[7].We have chosen NI USRP2922as our testbed components.The daughter board of the NI USRP2922 supports a frequency band of400MHz to4.4GHz[8].To avoid potential collision with the existing802.11or blue-tooth signal in the widely used ISM band of2.4-2.5GHz, we have chosen2.15GHz as our testing frequency.

It should be noted that the GNURadio is not the only solution for implementing an SDR platform with USRP. The NI Company also provided LabVIEW as a very

powerful SDR developing toolkit for USRP products.In fact,the EPFL of Switzerland has already implemented their full-duplex prototype on the USRP and LabVIEW[9]. They had achieved a cancellation about30dB in the same frequency band as we used.But their experiment still focused on a narrowband signal,not wideband such as OFDM.

In our SI cancellation test,we have set up a full-duplex transceiver with two USRPs,connected by a MIMO cable. One USRP served as the transmit path,the other act as the receive path.In the part of full-duplex test,a third USRP is needed to act as the far-end transmitter that diffuses the signal of interest.Fig.1presents the scheme of the testbed.

Fig.1.Full-Duplex testbed scheme

IV.D ESIGN

Figure2represents the proposed?ow chart of full-duplex solution with OFDM.Both the conventional trans-mit path and the receive path from GNURadio take part in this procedure.The transmit path gives us the result of adding preamble of the being transmitted data,and it should be rebuilt according to the characteristics of the channel.The receive path is in charge of detecting the received signal,making frequency offset compen-sating and FFT demodulation.Inside the new formed ofdm frame rebuilder function,sub-carrier align-ment and channel estimation are taking place and rebuild the being transmitted data obtained from the transmit path according to the characteristics of the channel.Then it will pass through the IFFT to be transformed to time domain,and take a delay factor that is also estimated by ofdm sync function of the receive path to make sure that the two signals are well aligned in time domain.At last the rebuilt signal will be subtracted from the original received signal.Then the rest part after the subtraction,which is considered to be the data of interest,will be passed to the conventional receive path to be demodulated.

V.E XPERIMENTS AND A NALYSES

The experiment is divided into two parts.Firstly we focus on the performance of SI cancellation.Without the participation of the third USRP,we only test the cancel-lation performance of the near-end,which is composed of two USRPs and a MIMO cable.In the second part of the

Fig.2.Flow chart of ofdm full duplex

test,we add the third USRP into our test to act as the far-end.

A.SI Cancellation Experiment

In this part of test,our major measure metric is the cancellation rate,which is de?ned in making use of error vector magnitude(EVM)as following:

EV M=

||e||

||V||

||e||

||V r||

(1) where V represents the vector that we rebuild from the information provided by the transmitting path,V r repre-sents the vector that we actually received,thus e means the error between them,i.e.the residual SI.Therefore the average rate of cancellation is:

?C=1

nm

n

i=1

m

j=1

1

(EV M i j)2

(2)

where m represents the number of sub-carriers in one OFDM symbol,and n represents the total number of OFDM symbols during our test.In this way we have got the cancellation rate of our testbed that reaches27dB. B.Full-Duplex Experiment

In this part of the experiment,we make use of three USRPs.Both the near-end and the far-end transmit their own signals simultaneously.The major metric is bit error rate(BER)of the signal of interest after canceling the SI. As shown in Fig.3,we can observe that the BER declines as the TX Gain factor raises.As the distance get farther,the performance is getting worse.

B

E

R

TX Gain (dB)

?10?505101520

Fig.3.BER with different TX Gain and distance settings

Note that the TX Gain means the difference between TX Gain at the far-end and the TX Gain at the near-end,namely the relative TX Gain.We found that our full-duplex experiment can tolerate the distance less than 4meters.We tend to try some longer distances for example 5meters,but the preamble can hardly be sensed at that distance with the presence of SI.

Furthermore we tend to analyze the result in making use of SINR,which takes both the path loss caused by the distance and the TX gain into account.Note that the interference is much more powerful than the additive noise,so we tend to suppose that the noise level is negligible.Thus the SINR after the cancellation is supposed to be:SINR residual ≈SIR residual =P signal ?(P interference ??C )(3)In this sense,we can rebuild the above ?gure in another manner that compares the BER with SIR residual .

As shown in Fig.4,the different lines show the same trend:as the relative SINR increases,the BER declines.The lines cross with each other,which mean the relative SINR has well uni?ed the pass loss and TX gain factors.

B E R

R elative SINR (dB)

5

10

1520

25

Fig.4.BER with SIR residual

As shown in Fig.5,we compared the BER performance for several modulation settings provided by the GNURa-dio.As we raise the level of modulation,i.e.from BPSK to 8PSK,the BER raises.For the higher modulation levels,the difference among the constellation points decreases,thus the possibility of misjudging must be increasing.As a comparison,we also append the performance of half-duplex for each modulation as a reference.We can observe that our full-duplex result is worse than that of half-duplex,which means at the same SINR level,the residual SI is more harmful than additive noise.In addition,we attached the theoretical BER for BPSK modulation in OFDM with Rayleigh multipath channel [10]and AWGN channel [11]as a reference.As we can observe from Fig.5,both the results of half-duplex and full-duplex are between the theoretical performance of the two channel models.

B E R

Y A x i s T i t l e

SIR (dB)

Fig.5.BER with different modulation settings for full duplex (FD)and half duplex (HD).

VI.C ONCLUSION

We have achieved a prototype of full-duplex transceiver,which is by now the ?rst OFDM version full-duplex transceiver on GNURadio and USRP platform.Some re-lated works already exist in implementing the full-duplex on narrowband channel models,but our contribution is applying the full-duplex idea on a more practical wideband signal model.We focused on the digital cancellation,which reached a cancellation of 27dB.We also measured the BER of the signal transmitted from the far-end trans-mitter as a source of interest after the SI cancellation.The best result is in the scale of 10?5,which is very close to the performance of half-duplex.

R EFERENCES

[1] E. A.M. A.Khojastepour,K.Sundaresan,S.Rangarajan,and

M.Chiang,“Midu:Enabling mimo full duplex,”Mobicom’12,no.257-268,2012.

[2]J.Choi,M.Jain,K.Srinivasan,P.Levis,and S.Katti,“Achieving

single channel,full duplex wireless communication,”MobiCom ,September 2010.

[3]M.Jain,J.I.Choi,T.M.Kim,D.Bharadia,and S.Seth,“Practical,

real-time,full duplex wireless,”MobiCom ,September 2011.

[4]M.Duarte and A.Sabharwal,“Full-duplex wireless communications

using off-the-shelf radios:Feasibility and ?rst results,”Conference Record of the Forty Fourth Asilomar Conference ,no.1558-1562,2010.

[5]M.Duarte.Full-duplex wireless:Design,implementation and

characterization.[Online].Available:https://www.wendangku.net/doc/a014544407.html,/trac/raw-attachment/wiki/DuartePhDThesis/MDThesis.pdf

[6]The de?nition of gnuradio.[Online].Available:http://gnuradio.

org/redmine/projects/gnuradio/wiki

[7] E.Research.The de?nition of usrp.[Online].Available:

https://www.wendangku.net/doc/a014544407.html,/

[8]Speci?cation of ni usrp 2922.[Online].Available:http://sine.ni.

com/nips/cds/print/p/lang/fr/nid/211243

[9] B.Gozcu,“Full duplex wireless radio:Investigation and imple-mentation using universal software radio peripherals,”obtained by academic cooperation.

[10]Ber for bpsk in ofdm with rayleigh multipath chan-nel.[Online].Available:https://www.wendangku.net/doc/a014544407.html,/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/

[11]Bpsk ber with ofdm modulation.[Online].Available:http:

//https://www.wendangku.net/doc/a014544407.html,/2008/06/10/ofdm-bpsk-bit-error/

prototype

Prototype

Outline 1. Category 2. Prototype 2.1 Background 2.2 Definitions of Prototype 2.2 Factors that influence the Prototype

1. Category (范畴) 赵艳芳(2001):严格来讲,范畴是事物在认知中的归类。 F.Ungerer&H.J.Schmid(2001): The product of the mental process of classification. They can be understood as mental concepts stored in our mind. 王寅(2001): 范畴是人们在互动体验的基础上对客观事物普遍本质在思维上的概括反映,是由一个通常聚集在一起的属性所构 成的“完形”概念构成的。

2.1 Background 对原型的研究始于上个世纪60年代末, Berlin & Kay调查98种语言,发现“焦点色”(人们对颜色进行范畴化的参照系统)的存在(Berlin& Kay, 1969)。受到“焦点色”以及维特根斯坦“家族相似性”的启发, Rosch和Labov将研究范围扩展到其他范畴, 发现同样的现象,并提出原型(prototype) 概念(Rosch, Labov , 1973)。

2.2 Definition of Prototype 认知语言学家目前对“原型”主要有两种解释: 一是指范畴内典型代表; Rosch (1975)认为原型是与同一概念的成员有更多共同特征的实例, 这个典型代表对于识别范畴起重要作用。 Langacker(1987): "A prototype is a typical instance of a category."

浅谈javascript中原型(prototype)、构造函数、对象实例及三者之间的关系

浅谈javascript中原型(prototype)、构造函数、对象实例及三者之间的关系一下内容是本人的学习之余为了增强记忆做的笔记,理解上或者有些肤浅,望高手莫笑;同时,既然是笔记,就难免有错误,若给各位造成误解还望海涵,也希望多多指教,谢谢! 首先说一下javascript中prototype的作用;该对象的用途是包含一种类型的所有实例都能共享的一些属性和方法,即如果为一个类型的prototype对象定义了一些属性,则该类型的所有实例都能访问到这些属性。请看下面例子: function Person(name,sex){ https://www.wendangku.net/doc/a014544407.html,=name; this.sex=sex; } Person.prototype.sayHello=function(){ alert("Hello,I am "+https://www.wendangku.net/doc/a014544407.html,); } 定义一个Person对象,该对象有两个属性name和sex,为该对象的prototype属性定义一个sayHello方法;下面我们可以new两个Person的实例: var person1=new Person("Andy","man"); var person2=new Person("Jacky","man"); 现在,person1和person2都可以调用sayHello方法,因为sayHello方法属于Person 的原型对象,而该对象的所有属性对于Person的所有实例都是公用的。调用sayHello:

person1.sayHello();//Hello,I am Andy. person2.sayHello();//Hello,I am Jacky. js完全可以用另外一种方式给一个对象定义方法: function Person(name,sex){ https://www.wendangku.net/doc/a014544407.html,=name; this.sex=sex; this.sayHello=function(){ alert("Hello,I am "+https://www.wendangku.net/doc/a014544407.html,); } } 但是这种方式明显有一个问题,就是当我创建N个Person实例的时候会创建N个sayHello方法,而且这些方法功能相同!这很明显不合理,而用原型就能很好的避免这个问题,所以prototype的优越性也就体现出来了!同样用prototype还可以在js中实现继承。 用prototype实现继承: 首先我定义一个Animal对象,然后让Person继承Animal. 定义Animal对象: function Animal(){} Animal.prototype.canDo(){ alert("吃饭,睡觉……"); } 让Person对象继承Animal:

ASP Prototype框架概述

ASP Prototype框架概述 Prototype框架是一个基于客户端的Ajax框架,其实质就是将客户端常用的Aj ax代码,如创建XMLHttpRequest对象这些重复性代码,使用面向对象的方式进行封装,封装成一个js文件。Prototype框架使用过程,只需要调用相应的对象,而不必关系其具体的实现细节。 从这方面说,Prototype是一个基础的JavaScript应用框架,Prototype的目的是为了更方便的开发JavaScript的应用,使用它可以更加方便简单的使用JavaScript 编程,开发出面向对象的JavaScript程序,Prototype框架是JavaScript代码的自然扩展,更容易被人接受。 但是,Prototype是最受欢迎的AJAX框架之一。比较著名的https://www.wendangku.net/doc/a014544407.html,网站2006年的调查结果显示,Prototype同框架规模庞大的Yahoo! User Interface,Goog le Web Toolkit,and Atlas.等相比较起来,其排名竟然遥遥领先,这不能不令人感到惊异。答案很简单:Prototype使用起来就像是对于JavaScript语言的自然扩展。尝试过Prototype框架后,笔者几乎坚信Prototype框架应该被纳入JavaScript语言。Prototype中包含了一个功能强大好用的Ajax框架,Prototype是一个基础性的框架,很多更高层次的框架都以它为基础,例如scriptaculous效果库。 Prototype框架以面向对象的方式封装JavaScript代码,其封装文件为prototype. js。使用prototype.js可以大大简化客户端代码的开发工作。prototype.js引入了类的概念,用其编写的类可以定义一个initialize的初始化函数,在创建类实例的时候会首先调用这个初始化函数。正如其名字,prototype.js的核心还是prototype ,虽然提供了很多可复用的代码,但没有从根本上解决JavaScript的开发和维护问题。 Prototype框架包含下面几个部分: ●Base:Prototype中应用的基本功能,基本上其他所有部分都依赖于它,包 括用于面向对象风格的Class.create和Object.extend,一个Try对象,函数 绑定,number扩展,PeriodicalExecuter(周期性执行某个函数的功能)等 ●String:对String原型的扩展,为string添加了strip,escapeHTML等等好用 的方法 ●Enumerable:枚举类型(array, hash, range等)的父类对象,提供枚举类型的 共同方法 ●Array:对Array原型的扩展,为array添加了indexOf、without等方法 ●Hash:为JavaScript提供了一个好用简单的Hash实现 ●Range:继承于enumerable,一个范围(例如3—67)对象 ●Ajax:一个功能强大好用的Ajax框架 ●Dom:对基于浏览器的开发提供了很好的跨浏览器封装,并添加很多强大 的功能

singleton模式和prototype模式

spring 的单例模式 singleton---单例模式 单例模式,在spring 中其实是scope(作用范围)参数的缺省设定值 每个bean定义只生成一个对象实例,每次getBean请求获得的都是此实例 单例模式分为饿汉模式和懒汉模式 饿汉模式 spring singleton的缺省是饿汉模式:启动容器时(即实例化容器时),为所有spring配置文件中定义的bean都生成一个实例 懒汉模式 在第一个请求时才生成一个实例,以后的请求都调用这个实例 spring singleton设置为懒汉模式: 另一种和singleton对应的scope值---prototype多实例模式 调用getBean时,就new一个新实例 singleton和prototype的比较 singleton xml配置文件: 测试代码: ctx = new ClassPathXmlApplicationContext("spring-hibernate-mysql.xml"); DvdTypeDAO tDao1 = (DvdTypeDAO)ctx.getBean("dvdTypeDAO"); DvdTypeDAO tDao2 = (DvdTypeDAO)ctx.getBean("dvdTypeDAO"); 运行: true com.machome.hibernate.impl.DvdTypeDAOImpl@15b0333 com.machome.hibernate.impl.DvdTypeDAOImpl@15b0333 说明前后两次getBean()获得的是同一实例,说明spring缺省是单例 prototype 执行同样的测试代码 运行: false com.machome.hibernate.impl.DvdTypeDAOImpl@afae4a com.machome.hibernate.impl.DvdTypeDAOImpl@1db9852

JavaScript中prototype的解释

JavaScript prototype 的深度探索 J avaScript 中对象的prototype 属性,可以返回对象类型原型的引用。这是一个相当 拗口的解释,要理解它,先要正确理解对象类型(Type)以及原型(prototype)的概念。 1、什么是prototype JavaScript 中对象的prototype 属性,可以返回对象类型原型的引用。这是一个相当 拗口的解释,要理解它,先要正确理解对象类型(Type)以及原型(prototype)的概念。 前面我们说,对象的类(Class)和对象实例(Instance)之间是一种“创建”关系, 因此我们把“类”看作是对象特征的模型化,而对象看作是类特征的具体化,或者说,类 (Class)是对象的一个类型(Type)。例如,在前面的例子中,p1 和p2 的类型都是Point, 在JavaScript 中,通过instanceof 运算符可以验证这一点: p1 instanceof Point p2 instanceof Point 但是,Point 不是p1 和p2 的唯一类型,因为p1 和p2 都是对象,所以Obejct 也是它 们的类型,因为Object 是比Point 更加泛化的类,所以我们说,Obejct 和Point 之间有一 种衍生关系,在后面我们会知道,这种关系被叫做“继承”,它也是对象之间泛化关系的一 个特例,是面向对象中不可缺少的一种基本关系。 在面向对象领域里,实例与类型不是唯一的一对可描述的抽象关系,在JavaScript 中, 另外一种重要的抽象关系是类型(Type)与原型(prototype)。这种关系是一种更高层次的抽 象关系,它恰好和类型与实例的抽象关系构成了一个三层的链。 在现实生活中,我们常常说,某个东西是以另一个东西为原型创作的。这两个东西可以 是同一个类型,也可以是不同类型。习语“依葫芦画瓢”,这里的葫芦就是原型,而瓢就是 类型,用JavaScript 的prototype 来表示就是“瓢.prototype = 某个葫芦”或者 “瓢.prototype= new 葫芦()”。 要深入理解原型,可以研究关于它的一种设计模式——prototype pattern,这种模式 的核心是用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。 JavaScript 的prototype 就类似于这种方式。 关于prototype pattern 的详细内容可以参考《设计模式》(《Design Patterns》)它不 是本文讨论的范围。 注意,同类型与实例的关系不同的是,原型与类型的关系要求一个类型在一个时刻只能 有一个原型(而一个实例在一个时刻显然可以有多个类型)。对于JavaScript 来说,这个限制有两层含义,第一是每个具体的JavaScript 类型有且仅有一个原型(prototype),在默认的情况下,这个原型是一个Object 对象(注意不是Object 类型!)。第二是,这个对象所属的类型,必须是满足原型关系的类型链。例如p1 所属的类型是Point 和Object,而一个Object 对象是Point 的原型。假如有一个对象,它所属的类型分别为ClassA、ClassB、ClassC和Object,那么必须满足这四个类构成某种完整的原型链。 有意思的是,JavaScript 并没有规定一个类型的原型的类型(这又是一段非常拗口的 话),因此它可以是任何类型,通常是某种对象,这样,对象-类型-原形(对象)就可能构 成一个环状结构,或者其它有意思的拓扑结构,这些结构为JavaScript 带来了五花八门的 用法,其中的一些用法不但巧妙而且充满美感。下面的一节主要介绍prototype 的用法。 2、prototype 使用技巧 在了解prototype 的使用技巧之前,首要先弄明白prototype 的特性。首先,JavaScript 为每一个类型(Type)都提供了一个prototype 属性,将这个属性指向一个对象,这个对象就 成为了这个类型的“原型”,这意味着由这个类型所创建的所有对象都具有这个原型的特性。 另外,JavaScript 的对象是动态的,原型也不例外,给prototype 增加或者减少属性,将

8.3.4.3原型样件方案-IATF16949条款解读

8 运行 8.3产品和服务的设计和开发 8.3.4.3原型样件方案 当顾客要求时,组织应制定原型样件方案和控制计划。组织应尽可能地使用与正式生产相同的供应商、工装和制造过程。 应监视所有的性能试验活动的及时性完成和要求符号性。 当服务被外包时,组织应将控制的类型和程度纳入其质量管理体系的范围,以确保外包服务符合要求(见ISO 9001第8.4条)。 8 Operation 8. 3 Design and development of products and services 8. 3. 4 .3 Prototype programme When required by the customer,the organization shall have a prototype programme and control plan. The organization shall use,whenever possible,the same suppliers,tooling,and manufacturing processes as will be used in production. All performance-testing activities shall be monitored for timely completion and conformity to requirements.

When services are outsourced,the organization shall include the type and extent of control in the scope of its quality management system to ensure that outsourced services conform to requirements(see ISO 9001,Section 8.4) 术语 控制计划:对控制产品制造所要求的系统及过程的成文描述。 原型样件:对将会出现在原型样件制造中的尺寸测量、材料和性能试验的描述。如果顾客要求,组织应有原型样件控制计划。 指南 本条款强调的是原型样件的制作要求,包括原型方案和样件计划(当然顾客要求时需要做,没有要求时,可做可不做),制作过程要求(如果制作过程外包,应补管理)、试验要求。当然,制作原型样件是为了验证和确认产品和制造过程。

JavaScript中prototype的用法

JavaScript中类的定义方式有以下几种: 比如声明一个User类,方法有: 第一、 function User(userid,username,userage){ https://www.wendangku.net/doc/a014544407.html,erid = userid; https://www.wendangku.net/doc/a014544407.html,ername = username; https://www.wendangku.net/doc/a014544407.html,erage = userage; this.sleep = function(){ document.writeln(https://www.wendangku.net/doc/a014544407.html,ername + “睡觉!”); } } 第二、 function User(userid,username,userage){ https://www.wendangku.net/doc/a014544407.html,erid = userid; https://www.wendangku.net/doc/a014544407.html,ername = username; https://www.wendangku.net/doc/a014544407.html,erage = userage; this.sleep = localSleep; function localSleep(){ document.writeln(https://www.wendangku.net/doc/a014544407.html,ername + “睡觉!”); } } 第三、 function User(userid,username,userage){ https://www.wendangku.net/doc/a014544407.html,erid = userid; https://www.wendangku.net/doc/a014544407.html,ername = username; https://www.wendangku.net/doc/a014544407.html,erage = userage; this.sleep = localSleep; } function localSleep(){ document.writeln(https://www.wendangku.net/doc/a014544407.html,ername + “睡觉!”); } 前面三种方式其实可以算是一种声明类的方式,不同的只是各个类中对象的方法的声明不同,第一种方式直接将一个方法赋给对象的一个属性;第二种方式是现在类中定义一个方法,而后再将这个方法名赋给该类的对象的一个属性,这个方法由于定义在该类中,所以只能在该类中被使用,可以说是该类私有的方法;第三种方式就是将方法定义在了该类的外部,同时再将这个方法名赋给一个属性,此时的这个方法也同时可以被其他的类或程序调用。 第四、 function User(){ https://www.wendangku.net/doc/a014544407.html,erid = arguments[0]; https://www.wendangku.net/doc/a014544407.html,ername = arguments[1]; https://www.wendangku.net/doc/a014544407.html,erage = arguments[2]; this.sleep = function(){ document.writeln(https://www.wendangku.net/doc/a014544407.html,ername + “睡觉!”); }

JS对象与原型

面向对象设计-->引用类型(function string number array date) ----->Object---->对象原型----->函数表达式--->数据类型 面向对象:类和对象,通过类可以创建任意多个具有相同属性和方法的对象。 ECMA定义对象:无序属性的集合,其属性可以包含基本值、对象或者函数。相当于一组没有特定顺序的值,对象的每个属性或方法都有一个名字,而每个名字映射到一个值。 即:对象就是一组键值对,其中值可以是数据或函数。 每个对象都是基于一个引用类型创建的。 Object是所有JS对象的基类 prototype是对象的原型 obj.constructor是创造该对象的构造器 一、创建自定义对象 var person = new Object(); https://www.wendangku.net/doc/a014544407.html,="dujie"; person.say = function(){alert(https://www.wendangku.net/doc/a014544407.html,)}; 字面量法: var person = { name:"dujie", say:function(){alert(https://www.wendangku.net/doc/a014544407.html,);} } 二、对象属性 内部采用的特性,描述了属性的各种特征,这些特性是为了实现JavaScript引擎用的,在js中不能直接访问,为了表示特性是内部值,规范把他们放在了两对方括号里例如:[[Enumerable]] ECMAScript中有两种属性:数据属性和访问器属性 1.数据属性:包含一个数据值的位置,行为(在这个位置可以读取和写入值) 4个描述行为: @1.[[Configurable]]:表示能否通过delete删除属性从而重新定义属性,能否修改属性的特性或者能否把属性修改为访问器属性。默认值为true @2.[[Enumerable]]:表示能否通过for-in循环返回属性,默认为true @3.[[Writable]]:表示能否修改属性的值默认为true @4.[[Value]]:包含这个属性的数据值。默认为undefined,从这个位置读取或写入保存属性的值 定义对象时var person={name:"dujie"} [[Value]]特性将被设置为"dujie" 若要修改属性默认的特性,必须使用ECMAScript5的Object.defineProperty()方法 Object.defineProperty(obj,"属性名",描述符对象) 描述符对象的属性必须是configurable enumerable writable value 例如: var person = {}; Object.defineProperty(person,"name",{ writable:false, 属性值不可以修改,变成只读 configurable:false 不可从对象中删除属性delete https://www.wendangku.net/doc/a014544407.html, 无效果 value:"dujie" }); alert(https://www.wendangku.net/doc/a014544407.html,) //dujie https://www.wendangku.net/doc/a014544407.html,="jack"; alert(https://www.wendangku.net/doc/a014544407.html,) //dujie

SPRING中属性SCOPE的prototype是什么意思

重庆达渝仁科技官网:https://www.wendangku.net/doc/a014544407.html, 默认情况下,从bean工厂所取得的实例为Singleton(bean的singleton属性)Singleton: Spring容器只存在一个共享的bean实例, 默认的配置。Prototype: 每次对bean的请求都会创建一个新的bean实例。二者选择的原则:有状态的bean都使用Prototype作用域 ,而对无状态的bean则应该使用singleton作用域。 在Spring2.0中除了以前的Singleton和Prototype外又加入了三个新的web作用域,分别为request、session和global session。如 果你希望容器里的某个bean拥有其中某种新的web作用域,除了在bean级上配置相应的scope属性,还必须在容器级做一个额外的初始 化配置。即在web应用的web.xml中增加这么一个ContextListener: org.springframework.web.context.request.RequestContextListener 以上是针对Servlet 2.4以后的版本。比如Request作用域! 引用:https://www.wendangku.net/doc/a014544407.html,/blog/479049 singleton是单态模式的,有ioc容器管理,当然不是线程安全的啦,不过所谓的线程安全也是相对的 如果你的类是没有状态的,那用singleton 的性能要高一些,因为只有一个实例。 如果你的类是有状态的,那就必须显示的设置为prototype了 在ssh2 项目中,struts2的action交由spring管理的时候,spring默认是singleton的,而struts2的action显然是有状态的,所以必须显示设置为 scope=“prototype” prototype为原型模式,每次action请求过来都会创建一个action 但是对那些Dao的实现类推介scope=“singleton” ,因为这些类没有状态,用singleton只需维护一个实例,显然性能高一些

Dynamic Alias Protection in Prototype-Based Languages

Dynamic Alias Protection in Prototype-Based Languages James Noble,David Clarke,John Potter Microsoft Research Institute Macquarie University Sydney,Australia kjx@https://www.wendangku.net/doc/a014544407.html,.au October16,1998 Abstract One of the advantages of prototype-based languages is that they provide self-suf?cient objects which do not depend on classes or other objects for their de?nitions.But objects can refer to other objects,and the effects of these inter-object references introduce arbitrary,uncontrolled dependencies between objects.We propose adding an explicit notion of object ownership to control dependencies and references between objects.Object ownership can also enhance object cloning and avoid the prototype corruption problem,making programs easier to write and easier to understand. 1Introduction Aliasing is endemic in object oriented programs—whether class-based or object-based[15].Because objects have identity,and can be uniformly referred to by essentially any other object,the dependencies between objects in a program can be arbitrary.While many prototype-based languages try to make objects self-suf?cient—for example,by allowing each object to de?ne its own structure and behaviour,or by using concatenation rather than inheritance—they do not address interobject references and the dependencies these references introduce. Interobject references are particularly important because they can undermine programmer’s attempts to build encapsulated aggregate objects—objects outside an aggregate object can hold references—aliases—to ob-jects inside the aggregate,breaking the encapsulation of the aggregate object.Although many prototype-based languages include some kind of protection for the names of object’s slots,so an internal sub-object can be stored in a private slot,name protection is insuf?cient to protect objects—by error or by oversight,a programmer can write a public method which returns a value from a private slot. There have been a number of proposals to address this problem in classical object-oriented languages[10,14, 2].Most of these,including Islands[14]and Balloons[2],provide Full Alias Encapsulation—they statically restrict programs so that no aliases may cross an aggregate object’s encapsulation boundary.Unfortunately,full alias encapsulation also forbids objects inside the aggregate from referring to other objects outside,preventing one object being contained in two different collections. We are developing a model for Flexible Alias Protection[22,8]which separates the objects inside an aggregate into two categories—the aggregate’s representation,which should not be accessible outside the aggregate,and the aggregates arguments,which may be accessible outside,provided they are treated as immutable—similar to the distinction between aggregation and association in object-oriented design methodologies. Flexible alias protection provides three invariants on a system’s behaviour[22]: No Representation Exposure—An aggregate object’s mutable representation objects should only be ac-cessible via the aggregate object’s interface. No Argument Dependence—A aggregate should not depend upon its arguments’mutable state.

原型分类理论

浅议原型分类理论 摘要:国内语言学界利用原型理论阐释语义范畴的研究主要包括:语义范畴的描写、语义模糊的探究、一词多义模式的描写、语 义演变的分析等,近几年也出现了对原型理论的反证。 关键词:原型分类理论;语义分类 the discussion on the prototype categorical theory hu xuehong (anhui university of science and technology, 232001) abstract: it seems that our cognitive system for categorization is not like an “in or out” filing cabinet, but an arrangement of elements in a radical structure or network with central good examples, secondary poorer examples, and peripheral examples. key words: prototype categorical theory; categorization the process of people’s cognition to the external objects includes the categorization of the input information. the so-called categorization is the judgments on the objects, the classification and the naming of them. due to these categories, we can have a clear recognition and knowledge about an object. the category theory obtains a full development after the classical category theory and the prototype theory. the reference and the application of the classical category

Javascript继承机制原理

Javascript继承机制 一、讲个故事吧 澄清在先,Java 和Javascript是雷锋和雷峰塔的关系。Javascript原名Mocha,当时还叫做LiveScript,创造者是Brendan Eich,现任Mozilla公司首席技术官。 1994年,历史上第一个比较成熟的网络浏览器——Navigator0.9版诞生在网景公司(Netsc ape),极为轰动。 但是,Navigator0.9只能用来浏览,不具备与访问者交互的能力,比如,用户提交一个数据表单,如果表单为空,浏览器是无法判断的,只能直接提交给服务器端,再把空值的错误返回,让用户重新填写,这样显然是低效率和浪费资源的。 这个时候,对于正处于技术革新最前沿的Netscape,开发一种实用的客户端脚本语言来处理这些问题变得必要起来,于是,这个任务落到了工程师Brendan Eich身上。他觉得吧,木必要设计得很复杂,只要能搞定一些简单操作就够了,比如判断用户有没有填写表单。 1994年正是面向对象编程(object-oriented programming)的兴盛时代,C++是最流行的语言,而Java语言的1.0版即将于次年推出,Brendan Eich难免受其影响,他想将Java script里面所有的数据类型看做是对象(object),这一点与Java非常相似。但是,他马上就遇到了一个难题,到底要不要设计” 继承”机制呢? 二、继承的演变 1、采用new关键字生成实例 处理表单验证这样简单功能脚本语言显然是不需要”继承”机制的,然而如果Javascript里面都是对象,就需要有一种办法来把所有对象联系起来。最后,Brendan Eich还是设计了”继承”。只是,他并没有引入”类”(class)的概念,因为一旦有了”类”,Javascript就是一种完整的面向对象编程语言了, 这好像有点太正式了,与设计初衷也远了,同时增加了初学者的入门难度。 参照到C++和Java语言都使用new命令来生成实例: C++这样写: ClassName *object = new ClassName(param); Java这样写: Foo foo = new Foo(); 那么,也可以把new命令引入了Javascript,用来从原型对象生成一个实例对象。但是,J avascript中没有”类”的话,怎样表示原型对象呢? 依然是参照C++和Java使用new命令时,都会调用”类”的构造函数(constructor)。Bre ndan Eich简化了设计,在Javascript语言中,new命令后面跟的是构造函数,不再是类。

JSP Ajax Prototype框架简介

JSP Ajax Prototype框架简介 Prototype框架是一个基于客户端的Ajax框架,其实质就是将客户端常用的Aj ax代码,如创建XMLHttpRequest对象这些重复性代码,使用面向对象的方式进行封装,封装成一个js文件。Prototype框架使用过程,只需要调用相应的对象,而不必关系其具体的实现细节。 从这方面说,Prototype是一个基础的JavaScript应用框架,Prototype的目的是为了更方便的开发JavaScript的应用,使用它可以更加方便简单的使用JavaScript 编程,开发面向对象的JavaScript程序,Prototype框架是JavaScript代码的自然扩展,更容易被人接受。 但是,Prototype是最受欢迎的AJAX框架之一。比较著名的https://www.wendangku.net/doc/a014544407.html,网站2006年的调查结果显示,Prototype同框架规模庞大的Yahoo! User Interface,Goog le Web Toolkit,and Atlas.等相比较起来,其排名竟然遥遥领先,这不能不令人感到惊异。答案很简单:Prototype使用起来就像是对于JavaScript语言的自然扩展。尝试过Prototype框架后,笔者几乎坚信Prototype框架应该被纳入JavaScript语言。Prototype中包含了一个功能强大好用的Ajax框架,Prototype是一个基础性的框架,很多更高层次的框架都以它为基础,例如scriptaculous效果库。 Prototype框架以面向对象的方式封装JavaScript代码,其封装文件为prototype. js。使用prototype.js可以大大简化客户端代码的开发工作。prototype.js引入了类的概念,用其编写的类可以定义一个initialize的初始化函数,在创建类实例的时候会首先调用这个初始化函数。正如其名字,prototype.js的核心还是prototype,虽然提供了很多可复用的代码,但没有从根本上解决JavaScript的开发和维护问题。 Prototype框架包含下面几个部分: ●Base:Prototype中应用的基本功能,基本上其他所有部分都依赖于它,包 括用于面向对象风格的Class.create和Object.extend,一个Try对象,函数 绑定,number扩展,PeriodicalExecuter(周期性执行某个函数的功能)等。 ●String:对String原型的扩展,为string添加了strip,escapeHTML等等好用 的方法。 ●Enumerable:枚举类型(array, hash, range等)的父类对象,提供枚举类型的 共同方法。 ●Array:对Array原型的扩展,为array添加了indexOf、without等方法。 ●Hash:为JavaScript提供了一个好用简单的Hash实现。 ●Range:继承于enumerable,一个范围(例如3—67)对象。 ●Ajax:一个功能强大好用的Ajax框架。 ●Dom:对基于浏览器的开发提供了很好的跨浏览器封装,并添加很多强大 的功能。

理解Javascript[11] constructor实现原理

11_constructor实现原理 在理解了'对象模型'后,我们就可以看一下constructor属性是如何实现的. constructor是什么 简单的理解,constructor指的就是对象的构造函数。请看如下示例: 代码如下: function Foo(){}; var foo = new Foo(); alert(foo.constructor);//Foo alert(Foo.constructor);//Function alert(Object.constructor);//Function alert(Function.constructor);//Function 对于foo.constructor为Foo,我想应该很好理解,因为foo的构造函数为Foo。对于Foo、Object、Function的构造函数为Function,我想也没什么好争议的。(因为Foo,Object,Function 都是函数对象,又因为所有的函数对象都是Function这个函数对象构造出来,所以它们的constructor为Function,详细请参考《js_函数对象》) Prototype与Constructor的关系 代码如下: function Dog(){} alert(Dog === Dog.prototype.constructor);//true 在JavaScript 中,每个函数都有名为“prototype”的属性,用于引用原型对象。此原型对象又有名为“constructor”的属性,它反过来引用函数本身。这是一种循环引用,如图: constructor属性来自何方 我们来看一下Function构造String的构造过程:

IET:Prototype design for a high-voltage high-frequency rectifier transformer for high power use

Published in IET Power Electronics Received on15th October2009 Revised on17th February2010 doi: 10.1049/iet-pel.2009.0284 ISSN1755-4535 Prototype design for a high-voltage high-frequency recti?er transformer for high power use Y.A.Wang D.M.Xiao School of Electronic,Information and Electrical Engineering,Shanghai Jiaotong University,Minhang District, Shanghai200240,People’s Republic of China E-mail:wangyananxj@https://www.wendangku.net/doc/a014544407.html, Abstract:The traditional high-voltage high-frequency transformer has a drawback of low power density owing to the rigorous requirements of high-voltage insulation.This study proposes a new con?guration for the magnetic core based on planar EE cores. The parallel connection of planar cores was adopted as a unit,and several units were cascaded to form the high-voltage transformer.The electrical potential distribution of the proposed transformer is more uniform than a traditional transformer, and enables a decrease in the insulation distances.The mechanical con?guration of a laboratory prototype is discussed,as well as the electrical,parasitic and thermal behaviours.A prototype transformer has been designed and built with the following characteristics:30kV output voltage,60kW output power and20kHz inverting frequency.The transformer was tested and found to have an ef?ciency of better than96%.Compared with traditional high-voltage transformers,this transformer has good thermal behaviour,good line insulation properties and a high power density. 1Introduction In this paper,the discussion is focused on the design of a high-voltage high-frequency power transformer in switched supply for an electrostatic precipitator(ESP)application. There are several improvements in the switched supply compared with the conventional high-voltage DC power supply(50or60Hz transformer is adopted).For example, high-frequency switching operation will allow:(i)much more precise control over the operating parameters(such as output voltage level,current level,voltage rise times and response to variations in load demand),(ii)a reduction in the size and weight of the high-voltage transformer and enhancing the power density of the transformer[1,2]. However,the reduction in the size of the transformer is limited in high-voltage step-up transformers(.30kV).In order to obtain the required output high-voltage,it is necessary to employ a transformer with a large turns ratio and high insulation distances between primary and secondary windings, secondary windings and cores,and in the secondary itself[3]. The requirements for high-voltage insulation distances will become more and more rigorous with rated voltage of transformer https://www.wendangku.net/doc/a014544407.html,monly,the main insulation distance is proportional to the1.5th power of rated withstand voltage of the transformer.Consequently,the method of reduction transformer’s size only by increasing the transformer’s rated frequency is limited in high-voltage transformer. The other methods that may reduce in the size and weight of the high-voltage high-frequency transformer are as follows: 1.Adoption of high-performance magnetic materials such as nanocrystalline core[4,5];2.Adoption of superconducting material[6]; 3.Improvement of the transformer’s insulation structure[7,8]. The method(1)is able to increase the?ux density of core, and methods(2)will increase the current density of the windings of transformer and(3)enhances insulation structure of the high-voltage transformer mainly.But those methods do not overcome the contradiction between transformer’s power density decreasing at high voltage and its increasing at high frequency.In order to deal with the contradiction mentioned above,a new con?guration for the transformer magnetic core was proposed based on planar EE cores.The parallel connection of planar cores magnetic circuit was adopted as a unit,and several units were cascaded to form the high-voltage transformer.Cascade transformers have already been used for high-voltage test systems[9,10]and multilevel pulse width modulation (PWM)inverter applications[11,12].In[9],the frequency effect of cascade transformer was studied but it was used for 60Hz high-voltage test systems.In[11,12],high-quality output voltage waves were synthesised by a large number of output voltage levels using transformers,which have a series-connected secondary.In this paper,the cascade transformer has been used for high-frequency high-voltage applications.It has the merits of cascade transformer and planar cores[13].First,the output high-voltage is shared in the multistage voltage of transformer units,and the main insulation distance may decrease with voltage decreasing. Second,the planar cores provide a relatively large surface area for the transfer of dissipated heat to the environment. Thus,the contradiction of high-frequency and high-voltage impact on power density of transformer is eased largely. https://www.wendangku.net/doc/a014544407.html,

相关文档
相关文档 最新文档