## 2 Materials and Methods
### Classifier-in-a-Loop System  
Recently, advancements in machine learning techniques, sensing technologies, and computation capabilities in the control systems have led to increased interest in data-driven and learning-based control strategies [38]. The vast generation of data by complex  
Figure 4: Basic design concept of impedance meter with DAQ device.  
Figure 5: Ensemble of classifier for real-time classification.  
systems carry important information about the structure and operation of these systems, for example, data collected from brain, autonomous cars, unmanned aerial vehicles, and satellite navigation, to name a few. When a first-principle model is difficult to obtain and is complex, these data recordings can help scientists to understand, predict, classify, and ultimately control the behaviour of the system [39].  
For feedback control, one of the approaches utilizing sensor measurement data is to classify it into one of the finite sets of classes (situation), and each class corresponds to a known control action [40]. In one of such research projects, image data were used to design a controller, using this technique to control a quadrotor to navigate a forest trail [41]. Images were captured from three sides (left, centre, and right) of real-world hiking trails, and a multiclass (three) deep neural network classifier was trained and tested on these images. Real-time feedback controller was designed according to the three classes, for example, when an image is classified as right side of trail, the quadrotor will turn left, and so on. Based on this work, we have implemented our system using time series data acquired from an impedance sensing unit for EA optimized steering during cochlear implantation. A plastic ST perception technique based on machine learning algorithms was developed that bypasses the problem of determining the underlying characteristics of ST.  
Let us consider a dynamical system shown in Figure 6, where the dynamics of the system can be expressed as  
\[x^{\prime}=f(x,u) \tag{1}\]  
In Equation (1), state is represented as \(x\in X\) and control input is \(u\in U\). \(x^{\prime}\) represents change in the state \(x\). \(f\) is the function that defines the drift. From Figure 6, the sensor generates the feature \(s\in S\) and is dependent on the state \(x\), and their relationship is unknown. The classifier maps the feature \(s\) to a unique label \(b\in B\). The aim of the classifier is to learn the weights \(w\in R^{n}\) to minimize the error between the predicted label and the actual label associated with a certain feature vector. The set of labels \(B=\{b_{L},b_{M},b_{R}\}\) corresponds to the position of electrode array on the left, middle, or right of the ST model's horizontal plane. The three labels are associated with three different control actions that the carrier has to implement for electrode array to stay in the middle of the ST (away from walls). These are the following:  
1. **Move Left**, if the array is touching the right (lateral) wall.
2. **Move Right**, if the array is touching the left (modiolar) wall.
3. **Go Straight**, if the array is in the middle.  
The dataset consists of the features and the labels \((x^{j},s^{j},b^{j})\), where \(j\) represents index of an example in the dataset. The classifier tries to find the relationship between the features and the labels. The feature vector \(s\) depends on the state \(x\), so we can say that the classifier indirectly learns the mapping from state to the control. This way, the classifier generates the control input \(u\) to the system and it results in a closed-loop feedback system, as shown in Figure 6.  
Figure 6: A classifier in a loop feedback control system.