港股即時

Economic Calendar

Sunday, November 27, 2016

RFID



Radio-Frequency Identification (RFID) is the use of radio waves to read and capture information stored on a tag attached to an object.  A tag can be read from up to several feet away and does not need to be within direct line-of-sight of the reader to be tracked.




How does a RFID system work?

A RFID system is made up of two parts: a tag or label and a reader. RFID tags or labels are embedded with a transmitter and a receiver. The RFID component on the tags have two parts: a microchip that stores and processes information, and an antenna to receive and transmit a signal. The tag contains the specific serial number for one specific object.

To read the information encoded on a tag, a two-way radio transmitter-receiver called an interrogator or reader emits a signal to the tag using an antenna. The tag responds with the information written in its memory bank. The interrogator will then transmit the read results to an RFID computer program.



There are two types of RFID tags: passive and battery powered.  A passive RFID tag will use the interrogator’s radio wave energy to relay its stored information back to the interrogator.  A batter powered RFID tag is embedded with a small battery that powers the relay of information.




RFID Tags

RFID tags are classified as Class 0 through Class 5, depending on their functionality:

Class 0UHFl read-only, preprogrammed passive tag
Class 1UHF or HF; write once, read many (WORM)
Class 2Passive read-write tags that can be written to at any point in the supply chain
Class 3Read-write with onboard sensors capable of recording parameters like temperature, pressure, and motion; can be semipassive or active
Class 4Read-write active tags with integrated transmitters; can communicate with other tags and readers
Class 5Similar to Class 4 tags but with additional functionality; can provide power to other tags and communicate with devices other than readers

Reference above

Radio Basics for UHF RFID

Backscatter Radio Links
Passive and semipassive RFID tags do not use a radio transmitter; instead, they use modulation of the reflected power from the tag antenna. Reflection of radio waves from an object has been a subject of active study since the development of radar began in the 1930s, and the use of backscattered radio for communications since Harry Stockman's work in 1949.

A very simple way to understand backscatter modulation is shown schematically in Figure 3.14: current flowing on a transmitting antenna leads to a voltage induced on a receiving antenna. If the antenna is connected to a load, which presents little impediment to current flow, it seems reasonable that a current will be induced on the receiving antenna.


3.14. Simplified Physics of Backscatter Signaling.

In the figure, the smallest possible load, a short circuit, is illustrated. This induced current is no different from the current on the transmitting antenna that started things out in the first place: it leads to radiation. (A principle of electromagnetic theory almost always valid in the ordinary world, the principle of reciprocity, says that any structure that receives a wave can also transmit a wave.) The radiated wave can make its way back to the transmitting antenna, induce a voltage, and therefore, produce a signal that can be detected: a backscattered signal. On the other hand, if instead a load that permits little current to flow (that is, a load with a large impedance) is placed between the antenna and ground, it seems reasonable that little or no induced current will result. In Figure 3.14, we show the largest possible load, an open circuit (no connection at all). Since it is currents on the antenna that lead to radiation, there will be no backscattered signal in this case. Therefore, the signal on the transmitting antenna is sensitive to the load connected to the receiving antenna.

To construct a practical communications link using this scheme, we can attach a transistor as the antenna load (Figure 3.15). When the transistor gate contact is held at the appropriate potential to turn the transistor on, current travels readily through the channel, similar to a short circuit. When the gate is turned off, the channel becomes substantially nonconductive. Since the current induced on the antenna, and thus, the backscattered wave received at the reader, depend on the load presented to the antenna, this scheme creates a modulated backscattered wave at the reader.

Note that the modulating signal presented to the transistor is a baseband signal at a low frequency of a few hundred kHz at most, even though the reflected signal to the reader may be at 915 MHz. The use of the backscatter link means that the modulation switching circuitry in the tag only needs to operate at modest frequencies comparable to the data, not the carrier frequency, resulting in savings of cost and power. (Real RFID tag ICs are not quite this simple and may use a small change in capacitance to modulate the antenna current instead.)


3.15. Modulated Backscatter Using a Transistor as a Switch.

Note that in order to implement a backscattered scheme, the reader must transmit a signal. In many radio systems, the transmitter turns off when the receiver is trying to acquire a signal; this scheme is known as half-duplex to distinguish it from the case where the transmitter and receiver may operate simultaneously (known as a full-duplex radio).

RFID Basics: Backscatter Radio Links and Link Budgets

In a passive RFID system, the transmitter does not turn itself off but instead, transmits CW during the time the receiver is listening for the tag signal. RFID radios use specialized components known as circulators or couplers to allow only reflected signals to get to the receiver, which might otherwise be saturated by the huge transmitted signal. However, in a single-antenna system, the transmitted signal from the reader bounces off its own antenna back into the receiver, and the transmitted wave from the antenna bounces off any nearby objects such as desks, tables, people, coffee cups, metal boxes, and all the other junk that real environments are filled with, in addition to the poor little tag antenna we're trying to see (Figure 3.16).


3.16. Realistic Environments Create Many Reflected Waves in Addition to that from the Wanted Tag

If two antennas are used (one for transmit and one for receive), there is still typically some signal power that leaks directly from one to the other, as well as the aforesaid spurious reflections from objects in the neighborhood. The total signal at the receiver is the vector sum of all these contributions, most of which are much larger than the wanted tag signal, with appropriate amplitudes and phases, most of which are unpredictable a priori. Thus, the actual effect of a given change in the load on the tag antenna on the receiver signal is completely unpredictable and uncontrollable. For example, modulating the size of the tag antenna current (amplitude modulation) may not result in the same kind of change in the reader signal.


3.17. The Received Signal is not Simply Correlated to the Tag Signal. The AM Case Assumes the Tag Reduces its Scattered Magnitude Without Changing Phase; the Phase Shift Keying (PSK) Case Assumes Phase Inversion Without Amplitude Change.

In Figure 3.17, we show a case where changing the tag reflection from a large amplitude (HI) to a small amplitude (LO) causes the received signal to increase in magnitude without changing phase (the "AM" case). Changing the phase of the tag signal without changing the size of the reflected signal in order to symbolize a local oscillator (LO) state may change the amplitude of the reader signal at constant phase (Figure 3.17, PSK case). The only thing we can say with any confidence is that when we make a change in the state of the tag antenna, something about the phase or amplitude of the reader signal will change.
In order to make a backscatter link work, we need to choose a way to code the data that can be interpreted based only on these changes and not on their direction or on whether they are changes in phase or amplitude. As a consequence, all approaches to coding the tag signal are based on counting the number of changes in tag state in a given time interval, or equivalently on changing the frequency of the tag's state changes.
Therefore, all tag codes are variations of frequency-shift keying (FSK). It is important to note that the frequency being referred to here is not the radio carrier frequency of (say) 900 MHz but the tag (baseband) frequency of perhaps 100 or 200 kHz. A binary '1' might be coded by having the tag flip its state 100 times per millisecond, and a binary '0' might have 50 flips per millisecond.
Because the frequency being changed is the frequency at which a carrier is being amplitude modulated, techniques like this are sometimes known as subcarrier modulation. Let's look at one specific example of tag coding, usually known as FM0 (Figure 3.18).



3.18. FM0 Encoding of Tag Data.

In FM0, the tag state changes at the beginning and end of every symbol. In addition, a binary 0 has an additional state change in the middle of the symbol. Note that, unlike OOK, the actual tag state does not reliably correspond to the binary bit: for example, in the left-hand side of the figure, two of the binary '1' symbols have the tag in the LO state and another '1' symbol has the tag in the HI state. Remember, the reader can't reliably distinguish which state is which but can only count transitions between them. The right side of the figure shows the baseband signal corresponding to a series of identical binary bits to clarify the correspondence of binary '0's with a frequency twice as high as that of binary '1's. Different tag coding schemes can be used to adjust the offset from the carrier frequency at which the signal from the tags is found. Readers have an easier time seeing a tag signal when it is well separated from their own carrier frequency, so higher subcarrier frequencies help improve the ability to read a tag signal. However, if the separation is large compared to the channel size, the tag signal might lie on the signal of another reader in a different channel. Just as with readers, increasing the data rate of a tag signal tends to spread the spectrum out in frequency. To have a flexible choice of tag data rates while minimizing noise, the reader needs to be able to adapt the band of frequencies it tries to receive, adding cost and complexity.

In real receivers, noise and interference may be present as well as the desired signal. A certain minimum signal-to-noise ratio (S/N) is necessary for each type of modulation in order that it can be reliably decoded by the receiver. The exact (S/N) threshold depends on how accurate you're trying to be and to a lesser extent on the algorithms used for demodulation/decoding. For RFID using FM0, (S/N) of around 10 or better (10 dB or more) is usually sufficient. (Requirements for demodulation of reader symbols, like PIE, in the tag are generally similar.)

Link Budgets

Let's summarize the message of the last couple of sections. To transmit to a tag, a reader uses amplitude modulation to send a series of digital symbols. The symbols are coded to ensure that sufficient power is always being transmitted regardless of the data contained within in. The received signal can be demodulated using a very simple power detection scheme to produce a baseband voltage, which is then decoded by the tag logic. The whole scheme is depicted in Figure 3.19.




3.19. Schematic Depiction of Reader-to-tag Data Link.

Figure 3.20 shows the corresponding tag-to-reader arrangements. The tag codes the data it wishes to send and then induces changes in the impedance state of the antenna. The reader CW signal bounces off the tag antenna (competing with other reflections) and is demodulated by the reader receiver and then decoded back into the transmitted data.


3.20. Schematic Depiction of Tag-to-reader Data Link (A Separate Receive Antenna is Shown for Clarity).
While we have alluded several times to the fact that the reader must power the tag, so far we have avoided coming to grips with the crucial associated question of just how much power the tag needs to get and just how far we can go from the reader and still get it. The amount of power that one needs to deliver to a receiver across a wireless link in order that the transmitted data be successfully received is known as the link budget. Since readers and tags both talk, for an RFID system there are two separate link budgets, one associated with the reader-to-tag communication (the forward link budget) and one with the tag reply to the reader (the reverse link budget).


Reference above

Radio Basics for RFID, Part 1



Generation 2 Protocol Standard

http://www.gs1.org/sites/default/files/docs/epc/Gen2_Protocol_Standard.pdf


ST25RU3992 UHF RFID reader kit - using 8dBi antenna


http://www.soliddepot.com/index.php?main_page=product_info&cPath=38_42&products_id=232

Cottonwood: USB Long Range UHF RFID reader

http://learn.linksprite.com/rfid/how-to-program-the-rfid-reader/








Saturday, November 19, 2016

Android 學習



Android Manifest.xml 內的語法:


android version Apps版本
uses-permission 獲取權限
Application

存放位置示範:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   
package="com.testing.newrfid"
   
android:versionCode="1"
   
android:versionName="1.0">

    <
uses-sdk
       
android:minSdkVersion="14"
        
android:targetSdkVersion="19"/>

<
uses-permission android:name="android.permission.VIBRATE"/>

    <
application
       
android:allowBackup="true"
       
android:icon="@mipmap/winnington_logo"
       
android:label="@string/app_name"
       
android:supportsRtl="true"
       
android:theme="@style/AppTheme">
        <
activity android:name=".MainActivity">
            <
intent-filter>
                <
action android:name="android.intent.action.MAIN" />

                <
category android:name="android.intent.category.LAUNCHER" />
            </
intent-filter>
        </
activity>
    </
application>

Permissions 參考Link:
http://hyz301.iteye.com/blog/2211950

Intent-filter 的Main 和Launcher 意思參考link:
http://fanli7.net/a/caozuoxitong/android/2011/1103/139302.html
















Friday, November 4, 2016

PSL,SLF,MLF (殘體)

SLF (常备借贷便利)

借鉴国际经验,中国人民银行于2013年初创设了常备借贷便利(StandingLending Facility)。它是中国人民银行正常的流动性供给渠道,主要功能是满足金融机构期限较长的大额流动性需求。

对象主要为政策性银行和全国性商业银行。期限为1-3个月。利率水平根据货币政策调控、引导市场利率的需要等综合确定。常备借贷便利以抵押方式发放,合格抵押品包括高信用评级的债券类资产及优质信贷资产等。

主要特点:

1、由金融机构主动发起,金融机构可根据自身流动性需求申请常备借贷便利;

2、常备借贷便利是中央银行与金融机构“一对一”交易,针对性强;三是常备借贷便利的交易对手覆盖面广,通常覆盖存款金融机构。
MLF(中期结构便利/中期借贷便利)
M是Mid-term的意思。即虽然期限是3个月,临近到期可能会重新约定利率并展期。各行可以通过质押利率债和信用债获取借贷便利工具的投放。MLF要求各行投放三农和小微贷款。
目前来看,央行放水是希望推动贷款回升,并对三农和小微贷款有所倾斜。

它跟我们的比较熟悉的SLF也就是常备借贷便利是很类似的,都是让商业银行提交一部分的金融资产作为抵押,并且给这个商业银行的发放贷款。最大的区别是MLF借款的期限要比短期的要稍微长一些,而且临近到期的时候可能会重新约定的一个利率,就是说获得MLF这个商业银行可以从央行那里获得一笔借款,期限是3个月,利率是央行规定的利率,获得的这个借款之后,商业银行就有钱了,就可以拿这笔钱去发放贷款了,而且三个月到期之后,商业银行还可以根据新的利率来获得同样额度的贷款。

MLF的目的:
刺激商业银行向特定的行业和产业发放贷款。
通常情况下,商业银行它是通过借用短期的资金,来发放长期的贷款,也就是所谓的借短放长,短期的资金到期之后,商业银行就得重新的借用资金,所以为了维持一笔期限比较长的贷款,商业银行需要频繁借用短期的资金,这样做存在一定的短期利率风险和成本,由于MLF它的的期限是比较长的,所以商业银行如果它用MLF得到这个资金来发放贷款,就不需要那么频繁借短放长了,就可以比较放心发放长期的贷款。

所以通过MLF的操作,央行它的目标其实是很明确的,就是鼓励商业银行继续发放贷款,并且对贷款发放的对象有一定的要求,就是给三农企业、小微企业发放,以次来激活经济中的毛细血管,改善经过的状况。

市场人士认为,由SLF向MLF转变,标志着央行货币政策正从数量型为主向价格型为主转变。
PSL(抵押补充贷款)

(PSL,即Pledged Supplementary Lending的缩写)
PSL作为一种新的储备政策工具,有两层含义:
1、量的层面,是基础货币投放的新渠道;
2、价的层面,通过商业银行抵押资产从央行获得融资的利率,引导中期利率。 

PSL这一工具和再贷款非常类似,再贷款是一种无抵押的信用贷款,不过市场往往将再贷款赋予某种金融稳定含义,即一家机构出了问题才会被投放再贷款。出于各种原因,央行可能是将再贷款工具升级为PSL,未来PSL有可能将很大程度上取代再贷款工具,但再贷款依然在央行的政策工具篮子当中。

在我国,有很多信用投放,比如基础设施建设、民生支出类的信贷投放,往往具有ZF一定程度担保但获利能力差的特点,如果商业银行基于市场利率水平自主定价、完全商业定价,对信贷较高的定价将不能满足这类信贷需求。
央行PSL所谓引导中期政策利率水平,很大程度上是为了直接为商业银行提供一部分低成本资金,引导投入到这些领域。这也可以起到降低这部分社会融资成本的作用。
SLO(短期流动性调节工具)

SLO是Short-term Liquidity Operations的缩写,要理解清楚这个工具,咱先回顾下逆回购。 

每周二、周四,央行一般都会进行公开市场操作,目前最主要的是回购操作。回购操作又分成两种,正回购和逆回购。

正回购即中国人民银行向一级交易商卖出有价证券,并约定在未来特定日期买回有价证券的交易行为。正回购为央行从市场收回流动性的操作,正回购到期则为央行向市场投放流动性的操作。

逆回购即中国人民银行向一级交易商购买有价证券,并约定在未来特定日期将有价证券卖给一级交易商的交易行为,逆回购为央行向市场上投放流动性的操作,逆回购到期则为央行从市场收回流动性的操作。一言以蔽之,逆回购就是央行主动借钱给银行;正回购则是央行把钱从银行那里抽走。

知道逆回购后SLO就很好解释了,简单说就是超短期的逆回购。对于SLO,央行如此介绍:以7天期以内短期回购为主,遇节假日可适当延长操作期限,采用市场化利率招标方式开展操作。

人民银行根据货币调控需要,综合考虑银行体系流动性供求状况、货币市场利率水平等多种因素,灵活决定该工具的操作时机、操作规模及期限品种等。该工具原则上在公开市场常规操作的间歇期使用。
了解好以上工具的作用和特点,在之后”央妈“每一次的动作中,我们就可以把握”央妈“的意图和动向,可以更好的控制我们的投资方式和资金的流向。如果我们不能对宏观经济作出准确的预期,那我们就多涨一些姿势,让我们在”风向“变换时作出最快的反应!

在我们对于央行进行分析的时候,一定要记住央行背后有很多政策目标,它今天的货币政策操作可能出于调结构的考虑,明天的操作可能出于稳增长的考虑,是一套组合拳。如果我们离远一点距离看,可能会比较清晰,但如果单纯看一个动作,就事论事,则难免产生疑惑,误解了央行的意图。当然,央行原本目的为A的政策,也可能产生目的为B的效果,这也需要我们注意,另一方面,央行的透明度也有进一步提高的空间。
作者:央行观察
关于PSL的真相,只有一个。
6月1日,媒体上出现了央行展开1.5万亿PSL操作的消息,由于1.5万亿规模甚巨,再加上操作的利率很低。因此,有关央行放水的评论铺天盖地的袭来。在如今资本市场对消息面非常敏感之际,这样的传闻不啻又一剂强心针,进一步推动了A股市场上涨。
央行真的是在大水漫灌吗?为正视听,6月2日晚,央行网站公开了有关PSL操作的细节:
2014年4月25日,为贯彻落实国务院第43次常务会议精神,中国人民银行创设抵押补充贷款(PSL)为开发性金融支持棚改提供长期稳定、成本适当的资金来源。根据棚改贷款进度,中国人民银行2014年提供PSL资金3831亿元,2015年前5个月提供PSL资金2628亿元。截至2015年5月末,PSL余额为6459亿元。为适时发挥价格杠杆的作用,以及适应存贷款基准利率的调整,中国人民银行分别于2014年9月、11月,2015年3月、5月经四次将PSL利率从4.50%下调至目前的3.10%,以引导国家开发银行降低棚改贷款利率,加大对棚户区改造的支持力度,促进降低社会融资成本。中国人民银行通过PSL为国家开发银行棚改贷款提供长期稳定、成本适当的资金来源,对支持棚户区改造发挥了积极作用。
这则说明包含信息点较多,我们主要从三个维度分析:
1)额度:央行表明,2014年提供PSL资金3831亿元,2015年前5个月提供PSL资金2628亿元。将两者相加得出,截至2015年5月末,PSL余额为6459亿元。 
6459亿元的额度与1.5万亿额度的传闻相差太远,而媒体也不可能完全空穴来风,那这么大的差距是怎么产生的?这里,我只是试图提出一种可能的分析:事实上,去年媒体对于央行向国开行提供PSL操作就有详细的报道,当时就说额度是1万亿元,这种报道应该是确实的,但由于去年房地产形势不好,国开行没有放出去那么多贷款,在PSL到期后又还了央行一部分,这可能是导致央行公布出来的2014年PSL资金较少(3831亿元)的一个原因。而媒体将1万亿与今年的额度相加,得出的金额接近于1.5万亿。
2)利率:PSL利率分四次从4.5%下调至3.1%,这与这段时间内央行降息行为是一致的,可以认为是对于利率下行的顺应,并不具备所谓扭曲操作引导中长期利率下行的效果。在国务院的工作指导下,央行需要为开发性金融支持棚改提供长期稳定、成本适当的资金来源。
3)意图:相比于流动性的调节,央行的PSL对于结构调整的意义更为重大,首先PSL只投放给了国开行,而且央行说的很清楚,抵押补充贷款的主要功能是支持国民经济重点领域、薄弱环节和社会事业发展而对金融机构提供的期限较长的大额融资。
因此,在我们对于央行进行分析的时候,一定要记住央行背后有很多政策目标,它今天的货币政策操作可能出于调结构的考虑,明天的操作可能出于稳增长的考虑,是一套组合拳。如果我们离远一点距离看,可能会比较清晰,但如果单纯看一个动作,就事论事,则难免发出为何忽左忽右的疑惑,也会对央行的政策意图产生误解。当然,央行原本目的为A的政策,也可能产生目的为B的效果,这也需要我们注意。另一方面,央行的透明度也有进一步提高的空间。