A proportional controller based on clustering theory: an academic example of a machine learning discipline

Abstract. The main objective of this paper is to present a controller design based on the K-means clustering theory. The controller is realized in such way that when the plant output is located outside of the designed clustering set, the controller forces it to be in it. Moreover, and according to our real experiment applied to stabilize an unstable integrator plant, our controller approach design is also robust against un-vanishing perturbations and nonlinearity effects on the overall closed-loop system such as saturation, slew-rate limit, and limit bandwidth frequency operation.


Introduction
Machine learning is the science to attain a computer to continuously learn by itself from (time-varying) data, and also named computer automatic learning based on data analysis [1].Nowadays, machine learning is a huge field with many disciplines.Among them is the data clustering technique.Data clustering is the task of grouping a set of data in such a way that they share some similarities [2,3].Hence, while a computer is realizing a data clustering, the machine is continuously learning important features from the reading data and it may be performed on real time operation.For instance, in a control scheme, the clustering data may be employed as an efficient technique to control a system due to data may be used to learn how to properly navigate a system to fulfill a given control objective.Hence, and due to automatic control of systems is a fundamental key in many important engineering innovations [4], and from the academic point of view, it results interesting to propose a control design based on data analysis as an application of a discipline of the machine learning theory like the clustering theory is.
Therefore, the main objective of this work is to offer a control design based on the clustering data theory and by also proving the required stability-proof of the obtained closed-loop system.Moreover, to support our main contribution, a real experiment by using analog electronic is designed carefully.This experiment is armed by following the control regulation objective to the equilibrium point of the closed-loop system and applied to an open-loop integrator plant, which is in fact an unstable system.According to the experimental results, the proposed controller is also robust against external non-vanish perturbations.
The rest of this document is structured as follows.In Section 2 we present the knowledge base of the K-means clustering theory.Then, we propose a sub-optimal solution to its objective statement.In Section 3 we develop our control design by invoking the result manifested in Section 2. Section 4 presents our experiment results carefully designed to support our main contribution.Finally, the conclusions are written in Section 5.

K-means clustering theory: a review
Given a data set X = {x 1 , x 2 , . . ., x N } of N random Ddimensional observations, the K-means clustering objective is to realize a partition of the data set into K clusters.Hence, a cluster is a set of data points whose interpoint distances are small in comparison to the distances to points outside of the related cluster.Therefore, being k = 1, 2, . . ., K, the K-means clustering objective can be also formulated as follows.Given the objective function [5]: where µ k is a prototype associated to the k th cluster, r ik ∈ {0, 1} is a binary indicator that describes which of the K cluster a data point x i is assigned to.So, if a data point x i is assigned to the cluster k, then r ik = 1, otherwise r ik = 0 for j k, the called 1-of-K coding scheme.Then, the K-means clustering objective consists to minimize the cost function (1) by finding appropriate values for {r ik } and {µ k }.
Usually, the above optimization problem can be realized by following an iteration procedure.But, sometimes, it https://doi.org/10.1051/matecconf/201821002005CSCC 2018 can be solved by giving a closed form solution [5].In other words, we have the following solution [5]: and In the special case when K = N = 1, we may infer the next sub-optimal solution to our optimization objective: and where β may be a given constant.

A proportional controller design based on K-means clustering theory
In order to formalize a controller design based on the basic clustering theory, let us consider the next SISO-system to be controlled: where A, B, and C are matrices on theirs corresponding dimensions.Then, based on the above clustering theory for the stated special case, we propose the following controller design: where g 1 and g 2 are the controller gains, and by redefining r as follows: By combining equations ( 7) and (8), we arrive to the following compact expression to our controller approach: where sign(•) represents the signum function.Next is our main result.
Proof.-The closed-loop system ( 6) and ( 9) can be straightforwardly represented as: and because of the Hurwitz condition to (A + g 1 BC) and the boundedness of the second term in (10), BIBOstability of the closed-loop system (10) is then concluded.
Remark 1.-Obviously, a state-observer such as the Luenberger one can be also invoked in our control design.
Remark 2.-A special case deserves to highlight.This corresponds to the scenario when our plant to be controlled is an integrator system.This special scenario is addressed in the experimental validation section of our approach.
Remark 3.-Due to we are dealing with the regulation control objective of the origin of the closed-loop system, we set the cluster mass center at this location; that is, we set µ = 0.

Experimental validation
To begin with, consider a SISO-integrator plant (an unstable system) stated as: where a is the system gain.Because of the studied system, let us employ the next particular controller realized from (9): To conclude stability of the closed-loop system, this yields: Surprisingly, if β = 0 we arrive to a well-known dynamic system which is asymptotically stable [6].
In order to describe our system based on analog electronic, the closed-loop model, the plant process and the proposed controller, is shown in Figure 1.Therefore, our overall system realization is granted in Figure 2.This electronic system was carried out by utilizing operational amplifiers in LM358N integrated circuits and supplied by ±12 volts.The value of β is the conduction voltage of the related diode, about 0.7 volts.Moreover, to simulate an external perturbation, we use Leds polarization such that the induced noisy values belong to the set {−0.7, 0.7} approximately by intensionally selecting the supplied voltage 12volts or -12volts (see Figure 2).Observe that because of a constant perturbation, the plant output will saturate (integral action) to its related voltage saturation.Finally, we activated and deactivate the control action by manipulating the switch SW 1 .Lately, and due to the operational amplifiers, the plant and controller have the main following nonlinearities [7]: slew-rate behavior, limit bandwidth frequency operation, and saturation effect.https://doi.org/10.1051/matecconf/201821002005CSCC 2018   Figure 3 shows a photograph of the overall closed-loop system.Finally, Figure 4 gives the experimental results.This picture depicts the moment when the controller is activated and deactivated.In each time, the external perturbation was commanded to 0.7 volts or -0.7 volts producing plant output voltage saturation, negative or positive, according to its related value and clearly observed on the experiment results.The related perturbation was kept on all the corresponding time when the controller is actuated, and commuted when the controller was deactivated.This was done manually.Finally, from our experiment, the controller action is able to stabilize the system around the closed-loop equilibrium point even when a non-vanishing perturbation is affecting our system.

Conclusions
In this paper, we have developed a controller based on K-means clustering theory.In our philosophy design, the controller continuously observes the plant output and when the data measurement is located outside of the desired cluster size located around the closed-loop system equilibrium point, it is forced to be in it.Moreover, the obtained controller is robust against un-vanishing perturbation and nonlinearity effects on the overall closed-loop system such as saturation, slew-rate limit, limit bandwidth frequency operation, and so on.Finally, and from the academic point of view, the employed base to reach our controller approach seems interesting.

Figure 1 .
Figure 1.Block diagram of the proposed controller.

Figure 2 .
Figure 2. Analog electronic realization of our plant and controller.

Figure 3 .
Figure 3.A photo of the experimental platform.