Professional Documents
Culture Documents
Abstract—These days a term Internet of Things (IoT) is often CaaS is special kind of SaaS. As it was mentioned SaaS is
mentioned in commercial and academic sphere so it can some- usually accessed by user in browser. In CaaS case, controller
times sound as a buzzword. Nevertheless the IoT idea moving service is accessed by a device that is able to communicate
the world further in terms of almost unlimited connectivity
of fog components, meaning sensors, actuators, gateways, with with server, process response and do the actuation. How this
cloud components meaning high cpu power and memory capacity can be done is explained later after IoT architecture definition.
computers in data centers with all kind of software services Before that a terms fog and cloud, mentioned before, is needed
connectable, that can add value to data coming from fog to cloud to explain. Fog computing, also known as fog networking, is
and from cloud to fog. By this approach of connecting fog with a decentralized computing infrastructure in which computing
cloud it is possible to do cpu and memory power demanding
operation in cloud and so sophistically affecting actuators in the resources and application services are distributed in the most
field. This papers is inspired by the IoT architecture and proposes logical, efficient place at any point along the continuum from
an idea of Controller as a Service approach in automation. the data source to the cloud. The goal of fog computing is
MPC online method was chosen as demanding controller and is to improve efficiency and reduce the amount of data that
exposed as a service for use of everyone or better every internet needs to be transported to the cloud for data processing,
thing. The complicated computation is done in the cloud, only
communication with cloud is needed in fog area. analysis and storage. This is often done for efficiency reasons,
Index Terms—Computer and Control Systems, Controller but it may also be carried out for security and compliance
Hardware/Software, Controller as a Service, Model predictive reasons. [2] In other words, fog components are devices with
and optimization-based control the ability to interconnect themselves and that are placed
in the environment e.g. power plant - indoor example or
I. I NTRODUCTION city - outdoor example. Devices are sensors, actuators and
This paper describes the principle of controller as a service gateways. Through gateways or also denoted as edge devices
approach. For better understanding a prototype application or aggregators, fog is connecting to cloud. In the simplest
was created and is described here. Then it describes IoT terms, cloud computing means storing and accessing data
architecture, fog and cloud components and an advantage of and programs over the Internet instead of your computer’s
IoT architecture in controller as a service bringing into reality. hard drive. The cloud is just a metaphor for the Internet. It
This paper outlines future possible extensions of controller as goes back to the days of flowcharts and presentations that
a service idea. Mathematical background of model predictive would represent the gigantic server-farm infrastructure of the
controller is described in this paper, what makes it that compu- Internet as nothing but a puffy, white cumulus cloud, accepting
tational demanding and why online form of this algorithm was connections and doling out information as it floats. [3]
chosen. At the end an application prototype with experiment
A. IoT definition
is described.
It can be said that IoT architecture bringing CaaS into the
II. C ONTROLLER AS A S ERVICE - C AA S life. There are many definition what IoT is and IEEE even cre-
These days terms SaaS, PaaS, IaaS are used very often. ated a 86 pages long document with title Toward a definition
They are abbreviation of software, platform, infrastructure as a of the Internet of Things (IoT) [4]. Main characteristics, that
service. What means that user does not need to install software, are common in the most of the definitions of IoT in general
platform or buy hardware infrastructure, but can take advan- are summarized in this chapter and after that there is IoT
tage of installed software or platform by service provider also architecture specification.
with provider’s responsibility of service availability. Software • First common feature of all definition is that IoT consists
as a Service (SaaS), represent the largest cloud market and are of objects that can sense environment, sensors’s state
still growing quickly. SaaS uses the web to deliver applications and objects that can actuate. In other words, it contains
that are managed by a third-party vendor and whose interface sensors and actuators. [5]
is accessed on the clients’ side. Most SaaS applications can • Second common feature is interconnection between them.
be run directly from a web browser without any downloads So If there are sensors and actuators without access
or installations required, although some require plugins. [1] interface they cannot be found as a part of IoT system. In
with constraints
IV. E XPERIMENT
Experiment consists of description of real testing IoT system
and control of desired light intensity by CaaS application, Fig. 4. Step responses at 30% working point
where online MPC algorithm is provided by the service.
It is needed to mention that value provided by photoresistor
A. IoT system components is 0 - 255 and it is converted to lux intensity according to
For the experiment these devices are used at different level. reference lux meter. 255 represents the darkest point and 0 the
It is an intelligent household IoT system. lightest. Above 140 lux the measurement has almost 40 lux
For IoT Gateway, VeraLite device is chosen, because of noise level as the conversion has exponential characteristic. For
its abilities to handle Z-Wave and other application protocols identification at 80% level a filtration with moving average is
above TCP/IP protocol and possibilities of custom develop- done, so it is possible to obtain better result with Matlab’s ident
ment in Lua and UPnP combined together in framework called toolbox. Best transfer functions results for these two measured
Luup. datasets are
IoT Device to actuate light intensity is FIBARO FGD 211 14.71 ∗ s + 0.0291
connected directly to VeraLight. G1 = 2 (10)
s + 11.17 ∗ s + 0.0232
IoT Device to measure light intensity is photoresistor con- 8.074 ∗ s + 57.6
nected via PCF8591 converter to Raspberry Pi’s GPIO port. G2 = 2 (11)
s + 7.645 ∗ s + 18.4
120 lux. Above 120 lux, noise of measured light intensity is
higher and because of that noise a quality of control is lower.
But later in the step to 50 and 100 again the quality is much
higher. Sample period of MpcMaster device was set to 15
seconds not to overload the VeraLite device as it responsible
for management of all Z-Wave nodes. Because of this period
an input delay can be seen. Finally there is an obvious control
error at 20 lux set point that is most probable caused by the
first not linear part of the graph 4, that was ignored during
identification. It is not visualized here that it was combination
of two separate controllers, but the decision rule is simple so
Fig. 5. Step responses at 80% working point
all set points above 75 lux are handled by second MPC and
below by first.