Tải bản đầy đủ - 0 (trang)
3 An Example: A Private Application Protocol on USB Host Test

3 An Example: A Private Application Protocol on USB Host Test

Tải bản đầy đủ - 0trang

111 Simulation Testing Apparatus and Method for Embedded System Based on. . .



Embedded product

(Target under test)



Private application protocol



CDC Class Driver



CDC Device

driver



USB Host stack



RS232 Driver



Simulator

Software



PC

Control application test

program

User interface

Application

protocol



Test

case



User Console



Control

application



USB device simulator



977



USB Device

stack

RS232



USB



RS232



Actual communications flow

Logical communications flow



Fig. 111.6 Control application on USB host test platform



Conclusion and Future Work

With this method and apparatus, developers can get many benefits.

USB device simulator can work as various USB devices, so it is very

useful for USB host system developers to test host functionality and different

class drivers before accessories are available. In addition, test program to test

client applications on USB host is built on PC which brings high flexibility

and maintainability.

Besides that, accessory firmware developers can get benefit from this

method. They can develop prototype based on this method before the hardware are ready and use it to validate the concept and requirement of the

accessory. Unsuitable requirements can be discarded before design phase and

incorrect design can be avoided before code phase. This method will reduce

the risk and cost of accessory development.

Equipment to test USB host system is a shortage currently. Especially, it is

difficult to test USB host behavior in error conditions. This apparatus not only

has capabilities of testing functionalities of USB host system but also can be

extended to simulate error conditions based on specified requirements.

With the increasing needs of market, embedded product is required to

support more and more applications based on USB host system. The high

flexibility and extendibility of the apparatus allow various test programs to be

developed under the environment of PC to test different applications on USB

host system.



978



X. Li et al.



References

1. USB Implementers Forum. Universal Serial Bus 3.1 Specification, Revision 1.0 [S/OL]. http://

www.usb.org. Accessed 26 July 2013.

2. USB Implementers Forum. Universal Serial Bus Specification, Revision 2.0 [S/OL]. http://

www.usb.org. Accessed 27 Apr 2000.

3. USB Implementers Forum. Universal Serial Bus Class Definitions for Communication Devices,

Version 1.1 [S/OL]. http://www.usb.org. Accessed 19 Jan 1999.

4. USB Implementers Forum. Device Class Definition for Human Interface Devices, Version 1.11

[S/OL]. http://www.usb.org. Accessed 27 June 2001.

5. Tournemille J, Tamagno D. System and method for simulating universal serial bus smart card

device connected to USB host [P]. US Patent: US6769622 B1. Accessed 3 Aug 2004.

6. Hu W, Zhang X, Li M, Zhang D, Liu H. Design of USB2.0 protocol analyzer based on FPGA

[J]. Comput Meas Contr. 2008;9:047.

7. Ye C. Design and implementation of USB device stack [D]. Wuhan: The Huazhong University

of Science and Technology; 2011 (In Chinese).



Chapter 112



Simple Simulation of Abandoned Farmland

Based on Multiagent Modeling Approach

Xuehong Bai, Lihu Pan, Huimin Yan, and Heqing Huang

Abstract In recent years, the agent-based model (ABM) has been widely applied

and popularized in land-use and land-cover change (LUCC). It expresses the

spatiotemporal heterogeneities of a model with individuals and ultimately obtains

the emergence of individuals’ behaviors on a macroscopic scale. This paper takes

Taipusi Banner in the Inner Mongolia farming-pastoral zone as the study area based

on local questionnaire data. The model synthesizes climate factors, the Grain for

Green policy, direct subsidies of grain, and socioeconomic factors and simulates

household farmland use behaviors in the next 30 years based on the Repastj toolbox

in the Java language and in Eclipse. This model precisely reflects the LUCC process

and its corresponding factors’ interactions, provides deep insight into the integration process of these factors, and gives advice to governments on how to make landuse and food-security policies long-lasting and reasonable.

Keywords Agent-based model • Artificial intelligence • Inner Mongolia farmingpastoral zone • Abandoned farmland • Climate



112.1



Introduction



Farmland use plays an irreplaceable role in the development of agriculture and

national economy [1]. Few studies focus on the relationship of livelihoods and land

use in China. Integrating households’ livelihood to study changing trends in

farmland and ways of adapting to those changes is a frontier area of research that

can be explored to realize the sustainable development of ecologically fragile

regions [2].



X. Bai (*)

Institute of Geographic Sciences and Natural Resources Research, University of Chinese

Academy of Sciences, 100049 Beijing, China

e-mail: baixh.12b@igsnrr.ac.cn

L. Pan

School of Computer, Taiyuan University of Science and Technology, 030024 Taiyuan, China

H. Yan • H. Huang

Institute of Geographic Sciences and Natural Resources Research, 100101 Beijing, China

© Springer International Publishing Switzerland 2015

W.E. Wong (ed.), Proceedings of the 4th International Conference on Computer

Engineering and Networks, DOI 10.1007/978-3-319-11104-9_112



979



980



X. Bai et al.



A land system is a coupled system comprised of a human society and the natural

environment. The Global Land Project asserts that we need to improve our understanding of how human activities influence the natural processes of the terrestrial

biosphere [3]. However, traditional models, for example, System Dynamics,

CLUE-S, Cellular Automata, and Markov chain, often ignore human activity. The

agent-based model (ABM) can simulate individuals in complex systems from a

bottom-up perspective. It defines behavior rules and interactive mechanisms of

individuals and pays more attention to human influences. More and more applications and spreads have been adopted using ABM in the area of land-use and landcover change (LUCC) [4]. In an early application of ABM in another country,

Balmann developed a simulation of agricultural land change based on ABM in

1977. This simulation concerns the competitive relationships of farms under different policies [5]. In China, Chen [6] explored households’ decision-making

processes on different scales. Pan [7] studied different types of household landuse behaviors under natural-environment, government, and enterprise-subsidy

mechanisms.

In recent years, farmers in the Inner Mongolia farming-pastoral zone have

experienced land degradation, frequent drought, government subsidies, working

in the city, among other things. Households’ livelihood strategies and farmland use

modes in this location change frequently. Farmers and related management institutions try new farmland uses, so an exhaustive study should be conducted to offer

support for adaptive and sustainable farmland use.



112.2



Overview of Study Area



Taipusi Banner (Fig. 112.1) is located in the south of the Xilin Gol League. It is a

fragile area in the north farming-pastoral zone. This banner is located in a fastgrowing, high-yielding region, is part of a grain subsidy project, and falls within the

Grain for Green project, so studying the effects of government policies can assist

government in making improvements in policies. Recently, as the drought has

intensified and the social economy developed, an increasing number of agricultural

labors have gone to the big cities and more and more farmland has been abandoned.

Because currently China’s land system is one that gives responsibility to households, households’ land-use decisions (especially for abandoned farmland) are

directly related to farmland-use changes. The study of farmland-use changes

necessarily entails understanding the households’ farmland using behaviors.



112 Simple Simulation of Abandoned Farmland Based on Multiagent. . .



981



Fig. 112.1 Geographic location and land cover of Taipusi Banner (LUCC data in year 2000 are

from the Data Center for Resources and Environmental Sciences, Chinese Academy of Sciences)



112.3



Research Data and Methods



This study uses questionnaire data gathered from households on the spot and

statistical data on socioeconomic development. Questionnaire surveys can be

used to obtain household information related to population and economic structure,

means of livelihood, and farmland use.

Questionnaire surveys were carried out in July of 2011. Study villages’ information is listed below (Table 112.1), and 161 households were interviewed.

Questionnaires include three parts: (1) basic socioeconomic characteristics of

households and their family members, for example, gender, age, job, and educational level; (2) farmland quality, current use and transfer, households’ livelihoods’

behaviors, sources of family income; (3) natural disasters and households’ adaptive

abilities.

In this paper, a statistical analysis technique is used to extract households’

behavior rules based on questionnaire data. For ABM, the RepastJ toolbox and

Java language are used to build a multiagent model platform for simulating

households’ farmland-use behaviors in a secondary development way.



982



X. Bai et al.



Table 112.1 Basic information on villages surveyed in questionnaires

Village



Longitude

(E)



Latitude

(N)



Elevation

(m)



Distance to

center (km)



Number of

questionnaires



Sample

rate (%)



Jianguo

Jiuyingpan

Xidajing

Yonghong

Chongguang



115 290

115 240

115 180

114 570

114 590



41 470

41 450

41 480

41 370

41 370



1,439

1,421

1,446

1,418

1,390



20

15

10

50

45



28

36

19

40

39



9

12

13

17

17



112.4



Framework of Abandoned Farmland Model Based

on ODD Protocol



Because theoretical research on ABM lags behind application research, Volker

Grimm at the Leipzig-Halle Research Center in 2006 proposed the overview,

design concepts, and details (ODD) protocol to describe a standard ABM [8]. He

updated this protocol in 2010 [9]. This study describes ABM in abandoned farmland by households according to the ODD protocol (Table 112.2).



112.5

112.5.1



Main Model Components

Configuration of Running Environment



This study takes the RepastJ toolbox as the modeling tool and uses Java to construct

an ABM platform in the Eclipse integrated development environment. Repast

(Recursive Porous Agent Simulation Toolkit) is an agent modeling tool developed

by Social Sciences Computing at the University of Chicago [10]. The initial

running environment is land-use/land-cover data of a real geographical environment in the year 2010 with 100 m cell size. In the left panel of Fig. 112.2, the purple

cells represent farmland, green cells represent grassland, red cells represent building land, blue cells represent water bodies, and white cells represent no data. In

Fig. 112.2, middle, green cells represent planted farmland, pink cells represent

abandoned farmland, and yellow cells represent rented farmland. In Fig. 112.2,

right, in the parameter configuration window, some running parameters can be set

initially by modelers.



112 Simple Simulation of Abandoned Farmland Based on Multiagent. . .



983



Table 112.2 Structure of ABM of abandoned farmland in inner Mongolia based on ODD protocol

Element of ODD

protocol

Overview



1. Purpose



2. Entities, state variables, and scales



Design

concepts



Details



3. Process overview

and scheduling

4. Design concepts



5. Initialization

6. Input data

7. Submodels



Model description using ODD

Simulating process and trend of farmland use in study area

under the influence of socioeconomics, climate, and governmental policies in the next 30 years

Entities: households and government; state variables:

external–internal factors of households; scales: households—regional

Decision making: farmland-use decisions, abandon or

plant?; rule: profit maximization; model update: annually

Whether households abandon their farmland or not is

related to the local environment, socioeconomic factors,

and governmental policies. Households adjust their

planting behaviors to adapt to changes based on profit

maximization

Land cover of study area, internal factors of households in

2010

Climatic factors, governmental policies (for related details

see Table 112.3)

Agent-generating module, agent-classification module,

and agent decision-making module



Table 112.3 Main input parameters of ABM and its initial value

Name



Meaning



Initial value



Source



averageLand



Farmland per person



0.39 hm2



Questionnaire



maxDeathAge

numAgents



Life expectancy

Number of

households

Family size

Income from

migrant workers per

person

Subsidy for green for

grain

Food subsidy



65–100

1,000



Questionnaire

Statistical data



5

11,000 yuan/year



Statistical data

Questionnaire



160 yuan/acre



Questionnaire



30 yuan/acre



Questionnaire



numPerHousehold

everEarned



subsidyGFG

subsidyFood



112.5.2



Changing

rule

Do not

change

65–100

Do not

change

3–8

Increase by

1–10 %

Do not

change

Do not

change



Behaviors and Properties of Agents



This model includes three types of agent. PersonAgent represents family members,

householdAgent represent families, and governmentAgent represents a nation

which is used to describe government policies.

The properties of PersonAgent include ID, age, gender, education, status (e.g.,

children, farmer, undergraduate, migrant workers, the elderly). The activities of

personAgent include, for example, studying, producing, and going out for job.



984



X. Bai et al.



Fig. 112.2 Initial running interface (left), running interface at a specific time (middle), and

parameter configuration window (right)



Farming Income

in Current Year

> a?



> 1.2a?

Rent



> 0.8a?

Remain the

same



Land Quality<3?



Rent Out



Remain

the same



Land Quality<3?



Remain

the same



Abandon

farmland



Fig. 112.3 Decision trees of household farmland-use behaviors



The properties of householdAgent include, for example, ID, family member, land,

and family income. The activities of householdAgent include planting going out for

job. The properties of governmentAgent include subsidy money and number of

years of subsidies under the Grain for Green policy and food subsidies.

Based on questionnaires of people surveyed on the spot, this study obtains an

average planting income for each household in 2010 of 1 yuan. Households adjust

their planting decisions (rent, rent out, do not change, or abandon farmland)

according to their planting income. The running rules of the model are displayed

in a decision tree, as in Fig. 112.3.



112.6



Simulation Results



The model simulates changes in the number of current households that abandoned

their farmland and population distribution of in the next 30 years. In this paper, the

author analyzed five types of people: local workers, migrant workers, farmers, the

elderly, and minors.



112 Simple Simulation of Abandoned Farmland Based on Multiagent. . .



a

x10



985



b



4



4



The Number of Abandoned Households



Population State Distributions



x10

Abandoned Household Number



Local workers

Migrant workers

Farmers

Elderly

Underaged



5

1.5

4

A

v 1.0

g

s



A

v 3

g

s 2



0.5

1

0.0



0

0



5



10



15



20



25

Time



30



35



40



45



50



0



5



10



15



20



25



30



35



40



45



50



Time



Fig. 112.4 Trends in number of abandoned households (a) and population distributions (b)



In Fig. 112.4, the x-axis represents the year, and the y-axis stands for the number

of people. Figure 112.4a shows the number of households that abandoned their

farmland remaining the same in the next 0–15 years. But in 15–26 years, the

number of such households shows an increasing trend. Figure 112.4b shows that, in

the next 0–15 years, the number of farmers will remain the same. But in

15–30 years, this number shows a decreasing trend. This changing pattern complements the trend of households abandoning their farmland. The number of migrant

workers first shows a decrease and later an increase. The number of local workers

does not obviously change, but there is a slightly increasing trend. The number of

elderly people and minors shows a clear increasing trend.

On the basis of Fig. 112.4 we arrive at the conclusion that, under current

conditions, a large proportion of farmland will be abandoned, and the composition

of the population in the study area will be made up of elderly and young people.

The Grain for Green policy provided households with some financial support.

This support caused some farmers to minimize their dependence on farmland and,

to some extent, minimize the number of farmers. But the direct grain policy did not

arouse the enthusiasm of households for planting farmland. This strategy needs to

be adjusted; otherwise, more farmland will be abandoned in the future.

Conclusion and Discusssion

The ABM represents a combination of a complex adaptive system and

distributed artificial intelligence and has been applied and popularized in

the area of LUCC. This paper adopts the ABM as the modelling method,

simulates the process of changing land-use behaviors by households under

current natural factors, socioeconomic factors, and national governmental

policies and predicts changes in trends in decision making regarding farmland

use by households in the next 30 years. The simulation results show that if the

current situation continues, more farmland will be abandoned. The government’s Grain for Green policy has a negative impact on households’ willingness to plant, but the policy of direct subsidies for grain has not motivated

households to plant. To change this severe situation with respect to farmland

(continued)



986



X. Bai et al.



(continued)

use, households’ awareness of the importance of planting needs to improve,

and guidance is also needed on government policies.

The operating rules of this model are simple, for example, neglect state

transfer mechanisms of households and family members and climate hazard

factors. Households’ decisions may have irregularities in this phenomenon,

i.e., different households make the same decisions while the same households

make different decisions. What’s more, topographical factors, which may

include spatial heterogeneities, are not included in this simulation. Last but

not least, more multivariable and and multiscenario analyses will need to be

conducted in the future.



Acknowledgments This work was supported by a special international cooperation program of

the Ministry of Science and Technology (ID: 2013DFA91700) and the National Natural Science

Foundation of China (41071344).



References

1. Cai Y, Fu Z, Dai E. Minimum per cultivated area regionally and farmland resources regulation.

J Geogr Sci. 2002;57(2):0127–34 (in Chinese).

2. Munroe DK, van Berkel DB, Verburg PH, et al. Alternative trajectories of land abandonment:

causes, consequences and research challenges. Curr Opin Environ Sustain. 2013;5(5):471–6.

3. IGBP Secretariat. Global land project: science plan and implementation strategy. Stockholm:

IGBP Secretariat; 2005. p. 64.

4. Matthews RB, Gilbert NG, Roach A, et al. Agent-based land-use models: a review of

applications. Landsc Ecol. 2007;22(10):1447–59.

5. Balmann A. Farm-based modelling of regional structural change: a cellular automata

approach. Eur Rev Agric Econ. 1996;24(1):85–108.

6. Chen H, Wang T, Liang X. Building and simulation of households’ land use based on multiagent modeling. J Geogr Sci. 2009;64(12):1448–56 (in Chinese).

7. Pan L, Huang H. Application of artificial society model to study of land use change. J Syst

Simul. 2010;22(8):1965–9 (in Chinese).

8. Grimm V, Berger U, Bastiansen F, et al. A standard protocol for describing individual-based

and agent-based models. Ecol Model. 2006;198(1):115–26.

9. Grimm V, Berger U, DeAngelis DL, et al. The ODD protocol: a review and first update. Ecol

Model. 2010;221(23):2760–8.

10. Repast CN. An extensible framework for agent simulation. Univ Chicago Soc Sci Res.

2003;36(1):1–18.



Chapter 113



Parallel Parity Scheme for Reliable

Solid-State Disks

Jianbin Liu, Hui Xu, Hongshan Nie, Hongqi Yu, and Zhiwei Li

Abstract Recently, solid-state disks (SSDs) have been extensively applied in

many fields. However, with increasing storage density in SSDs, a liability problem

has emerged as a significant restriction. A parallel parity scheme is proposed in this

paper. This scheme employs a mapping table based on a physical block address and

a partial delayed parity update. Experimental results demonstrate the proposed

scheme not only improves the reliability of SSDs, but also enhances their

performance.

Keywords SSD • Reliability • Erasure code • Parity scheme



113.1



Introduction



With the development of solid-state disk technology, more and more people are

choosing SSDs for storage memory. At present, three kinds of NAND Flash memory

are used to build SSDs: SLC (single-level cell), MLC (multi-level cell), and TLC

(triple-level cell). SLC flash memory has high performance and reliability, MLC

flash memory has middling performance and reliability, while TLC flash memory

has low performance and reliability. Manufactures prefer to use the denser MLC and

TLC options rather than SLC in the commercial market. With the increasing

capacity of SSDs, their reliability has become an increasingly serious problem.

Previous research on the reliability of SSDs has focused on error correct codes

(ECC), which can ensure that fault tolerance is less than several bits in each page.

Because of the structure of flash memory, the error rates of each bit are related to

each other [1], so the traditional method of calculating the UPER (uncorrectable

page error rate) is not accurate. When a bit is in error, the probability of error in

adjacent bits is greatly increased. This has posed a great challenge for the ECC

algorithm which only has limited error correction ability. In the face of low

reliability flash memories such as MLC and TLC, SSDs need a more complex

algorithm to ensure a certain reliability. In the case where a full page or full block

has failed, even the most complex ECC algorithm is useless.

J. Liu (*) • H. Xu • H. Nie • H. Yu • Z. Li

National University of Defense Technology, 410073 Changsha, China

e-mail: liujianbin08@163.com

© Springer International Publishing Switzerland 2015

W.E. Wong (ed.), Proceedings of the 4th International Conference on Computer

Engineering and Networks, DOI 10.1007/978-3-319-11104-9_113



987



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

3 An Example: A Private Application Protocol on USB Host Test

Tải bản đầy đủ ngay(0 tr)

×