## 1 Introduction  
Cyber-physical systems integrate physics-based and digital world models. A seamless integration of these two worlds will contribute immeasurably to a broad range of industries, including energy, infrastructure, healthcare, manufacturing and military [1; 2; 3]. Although many researchers have been working on different aspects of CPS design in these application domains, there are many open challenges in integrating science and technology foundations towards design methodology, security and system composition. One of them is resource generation and allocation in CPS. In traditional computer science applications, the operating system manages hardware and software resources to handle all computation [4]. It may use resource models, such as RDF (Resource Description Framework) and REST (Representational State Transfer) [5; 6; 7]. In CPS, resource is not restricted to traditional computation and memory resources. Resource, in a generic sense, denotes any entity that is relevant to both the production and consumption of a service. In a CPS, physical devices are resources, which are hence first class entities. Services may be either generated or consumed by physical devices, which might, in turn, be consumed by cyber computational resources, such as communication protocols. Software services may be generated by the computational resources that reside in either a static or dynamic host computer in a CPS network and may be consumed by other physical devices to make changes in the environment. In general, a CPS resource might offer many services; a CPS service might require several resources; a CPS resource might use other resources; and a complex service in CPS may be produced by combining several services and resources. Thus, the service-oriented view of a CPS is more rich and complex than the service-oriented view for traditional business applications, as discussed in the SOC literature [8].  
In this paper, resource generation and allocation mechanisms in a CPS are first investigated. The \"resource supply\" is investigated separately, and a basic resource supporting model is proposed to deal with resource generation and supply. In Section 2, we discuss the dynamic resource supply model (DRSM). It is built from both the description and utilization points of view. Resources in the CPS are described by introducing two concepts: Resource Supply Description Template (RSDT) and Resource Instance Notation (RIN). RSDT is used to describe the resources with static properties, and the RIN is used for describing the dynamic changing of attributes. The management of resources is handled by a resource operating decision machine (RODM). In Section 3, the related mechanisms are explained by illustrating how DRSM can be used in a CPS with a three-layer service-oriented architecture. In Section 4, DRSM is applied to a smart grid environment in order to achieve a cost-effective electric power distribution, whose twin goals are wireless monitoring and optimized power distribution. Section 5 discusses the mechanism and design of the interaction between plug-in hybrid electric vehicles (PHEV) and DRSM through the Android system. Section 6 discusses a design and a mechanism to automatically collect data on electricity consumption and to re-allocate power supply through ZigBee network. In Section 7, our work is summarized and further work is proposed.