A Portrayal of Sliding Mode Control Through Adaptive Neuro Fuzzy Inference System With Optimization Perspective

Sliding mode control is a promising approach for designing controllers for systems with empirical characteristics. This is a favored nonlinear control strategy that effectively addresses the uncertainties present in derived mathematical models. To further enhance the stability of such systems, an Adaptive Neuro Fuzzy Inference System is employed by adapting to dynamic changes and inconsistent correlations between excitation and response. In this study, Sliding Mode Control was deployed in the feedback loop, effectively serving as a state feedback controller based on a nonlinear control law. As a two-parameter control approach, Sliding Mode Control requires careful tuning to achieve optimal performance. The integration of the Adaptive Neuro-Fuzzy System aims to bestow the two parameters of Sliding Mode Control with the ability to rapidly reduce errors to zero, thereby enhancing overall control efficiency. The research focuses on utilizing an Adaptive Neuro Fuzzy Inference System to implement Sliding Mode Control for a DC servo system while emphasizing state feedback control. The Harmony Search Optimization method is employed to optimize controller parameters effectively. The results of the research demonstrate the achievement of a best-fit value, where the minimal standard error and Best fitness are considered. This highlights the successful integration of the proposed control strategy and validates its effectiveness in providing accurate and reliable control of the real-time DC servo system.


I. INTRODUCTION
A servo motor is a type of variable speed drive that is widely used in modern creation, process mechanization and building innovation.Controlling the motor position is essential for applications that use an accurate control structure.Servo motors are widely used in applications that require precise positioning, rapid switching and excellent performance.They are often used in mechanical technology, global positioning systems, PCs, CNC machines, radar frameworks, mechanized assembly lines, machine apparatuses, and other applications.The response of the position control is the ideal position The associate editor coordinating the review of this manuscript and approving it for publication was Zheng Chen .
of the DC servo provided it is in closed loop.The servo position needs to be controlled and the process involves a) System modeling b) Feedback Control c) Controller Design d) Actuator Control e) Closed-Loop Operation and f) Tuning and Optimization.
According to [1], the position control of a dc servomotor is achieved through the use of an adaptive back-stepping controller.To select an appropriate control structure, the recommended approach is to adjust the control parameters to accommodate plant limitations.Reference [2] outlines an online iterative process for identifying data based on input yield, utilizing fault-responsive control for adaptability.Implementation challenges include speed, level of control, and the preferred method.Reference [3] stated that DC motor models can be developed without any prior knowledge using Markovian-based and direct pseudo-inversion methods.Reference [4] demonstrated the application of sliding mode observer-based control on a DC servo, which involves brief transient stages, rapid combinations, and a reduction in unwanted response.As stated in [5], a proposal for a wireless servo motor drive that incorporates wireless power transfer into the DC servo motor drive enables a wireless bidirectional servo motion.As scripted in [6], addressing uncertainties and disturbances in the motor system to achieve accurate position control is achieved by robust control.A mathematical model applied to servo position control was highlighted in [25].
Sliding mode control is a highly effective nonlinear control technique that utilizes a dynamic control law to direct a system toward boundaries known as the sliding mode.This method involves defining a hyper-surface or sliding surface in the system's state space, which is then used by the control law to guide the system towards it via switching and reaching control.One of the most significant advantages of sliding mode control is its robustness against uncertainties and disturbances.However, to achieve optimal performance, tuning the control gains and parameters may be necessary, and a mathematical model of the system is required.Overall, sliding mode control is an excellent choice for systems that require a high level of precision and stability.
As discussed in [7], a fuzzy-based Sliding Mode Control (SMC) approach is used to examine missile-to-target maneuvering situations.ANFIS-based SMC is used to develop an optimal path-tracking algorithm, which considers factors such as impact angle and acceleration constraints to accurately hit a moving target within a specific time frame.Two methods -SMC and RBF-NTSMC.are employed in [8].The RBF-NTSMC was designed to minimize speed errors, improve throttle responsiveness, and minimize system chattering.As discussed in [9], this approach aims to reduce sloshing in a partially filled fluid compartment through controlled horizontal forces and moments using a pendulum model.It involves creating a stable surface for better slosh damping and employs a sliding mode observer to monitor the sloshing conditions.Experimental findings closely match simulations, and the possibility of implementing advanced filters is considered to enhance the controller performance by reducing delays.The focus of [10] was adaptive sliding mode control for uncertain nonlinear systems.It is designed to handle uncertainties and maintain a robust performance despite unknown nonlinearities, and external disturbances.Adaptive techniques continuously update control parameters to ensure stability and tracking performance.Reference [11],proposes an observer-based sliding mode control strategy for uncertain nonlinear systems with time-varying delays.The control design utilizes an observer to estimate system states and ensures robustness in the presence of uncertainties and time-varying delays.Reference [12] presents an adaptive sliding mode control approach for DC servo systems with time delay.Control design utilizes adaptive techniques to handle uncertainties and time delays and achieve robust tracking performance in the presence of these effects.
Combining fuzzy logic and neural networks, the ANFIS computational paradigm enables human-like adaptive learning and reasoning through its five key components: fuzzy sets, a fuzzy rule base, a fuzzy inference system, a neural network structure, and a hybrid learning method.ANFIS serves various purposes, including data modeling, system identification, pattern recognition, and control, utilizing if-then rules to describe the relationships between input and output variables.Its fuzzy inference system parameters are learned and adjusted iteratively through a hybrid learning algorithm within the network.ANFIS proves effective in a range of data modeling and control applications.
As indicated in [13], ANFIS is a hybrid intelligent strategy that translates fuzzy logic into neural networks and vice versa, facilitating efficient reasoning.Input space partitioning is employed to handle complex nonlinear systems, utilizing training techniques such as Gradient Descent, RLS, or Particle Swarm Optimization.The highlight of [14] is the efficacy of ANFIS applied to a dc motor for modeling and control applications.The controller applied provides dynamic control parameters based on the change in motor parameters.The design and deployment of ANFIS based controller for dc servo is described in [15].This controller fine-tunes control signals based on input error and the rate of change of error.Experimental results from this study substantiate the controller's effectiveness, showcasing its ability to achieve precise position control and enhance overall motor performance.According to [16], the ANFIS controller adapts its parameters based on motor conditions, enabling precise control.Compared with PID control, it shows superior tracking accuracy and stability.As accentuated in [17], the application of adaptive neuro-fuzzy control and particle swarm optimization enhances the DC servo motor performance.These techniques adapt to motor dynamics and optimize control parameters, thereby improving the accuracy and efficiency of conventional methods.The experiments confirm the superior control performance of this approach.As proposed in [28], an adaptive neural-fuzzy sliding mode controller is used for the magnetic suspension system of a low-speed maglev train.Simulations showed that it effectively minimizes disturbances and parameter fluctuations, with a robust and fast dynamic response.As mentioned in [27], an adaptive fuzzy-based suspension cooperative control system for Maglev Trains improves stability and reduces errors using Adaptive Fuzzy Control.This approach is proficient in optimizing energy consumption and managing the concerns associated with nonlinear dead loads and irregularities.The performance and comparison of SMC and Conventional PI Controllers under various conditions, including no-load and load, static, and transient states are performed in [29].The evaluation encompasses an analysis of control robustness, observing variations in system position and speed, as well as investigating the chattering effect.It highlights that while PI Controllers typically maintain fixed Proportional Gain (K p ) and Integral Gain (K i ), practical applications demonstrate that this practice leads to uncertainty and variations in system parameters.Reference [30], investigates three models, including sliding mode evaluation, step response of a permanent magnet DC motor, and a fractional order sliding mode controller for the DC motor.Emphasizing a multi-input and multi-output nonlinear system, the project uniquely addresses the reduction of chattering effects through fractional order sliding mode, examining critical parameters like load disturbance rejection and reference velocity tracking capability essential for servo motor speed control and revealing speed changes with varying parameters.Reference [31] introduces an adaptive neural network tracking control method designed for a specific group of uncertain strict-feedback nonlinear systems with quantized input and output constraints.The control strategy employs radial basis function neural networks to approximate uncertain nonlinearities and utilizes a disintegration of hysteresis quantizer.Additionally, it incorporates a log-type Barrier Lyapunov function.This results in a computationally efficient design that guarantees bounded signals, convergence of output tracking error to a small domain around the origin, and adherence to output constraints.Simulation examples are provided to demonstrate the effectiveness of the proposed control scheme in handling uncertainties, quantized input, and output constraints.As mentioned in [32], develops a method, utilizing the hyperbolic tangent function, to ensure that designed virtual control signals adhere to state constraints on virtual control states.Additionally, the research proposes an adaptive neural fixed-time tracking control strategy for nonlinear systems with full-state constraints, expressing plans for future application to practical issues and exploration of significant control challenges, such as simultaneous arrival at the origin, addressing unknown constants in Lyapunov functions, and compensating for input nonlinearities using approaches from existing literature.
Optimization is an intricate process that aims to identify the optimal solution while considering the constraints and objectives.This method involves a series of steps such as defining the problem, selecting the appropriate technique, enhancing the solution, and evaluating the outcome.It encompasses different types of optimization such as deterministic and stochastic approaches, continuous and discrete optimization, single and multi-objective optimization, and global and local optimization.In addition, heuristic and meta-heuristic methods can be utilized to achieve the best results.
As accentuated in [18], an efficient track to tune PID controllers for DC servo motors using the LJ optimization algorithm which outperformed the ZN technique in minimizing the ISE, is ideal for this application.According to [19], the ASO and ChASO algorithms optimize the FOPID controller parameters for the DC motor speed control, resulting in improved performance and robustness.ChASO utilizes chaotic sequences for faster convergence and precision, avoiding local minima.As stated in [20], the Genetic Algorithm can optimize a PID controller for a DC servo speed and position control.A GA-tuned PID controller performs better than a ZN-tuned PID controller, improving the control over the motor's speed and position.As discussed in [21], the OBL/HGO method was used to control the DC motor speed using optimized PID parameters.This approach minimizes errors and improves speed regulation while avoiding local optima.In [22], a new version of the ASO algorithm, hASO-SA, uses simulated annealing to improve search capabilities.It outperformed other meta-heuristic algorithms in optimization tasks.The study in [23] focused on a PID controller to maintain a steady pace for a DC motor.The Ziegler-Nichols method determines PID parameters.Particle Swarm Optimization and Genetic Algorithms were used for parameter estimation.The PSO algorithm outperformed GA in achieving the desired results.In [24], K-DBSCAN clustering was introduced, which combines the DBSCAN algorithm with the novel-HS optimization algorithm to overcome limitations in handling non-convex clustering and local optima.The proposed method achieved superior performance and shows promise for further clustering research.
This study contributes to the implementation of state feedback sliding mode control, which is integrated with the Adaptive Neuro-Fuzzy Inference System.The key states considered for feedback in the DC servo system are angular velocity (ω) and angular displacement (θ).By feeding back these states, the sliding mode control parameters were determined by ANFIS and then applied to the sliding mode control law.To improve the system performance, the obtained results were further optimized using the metaheuristic Harmony Search Algorithm.The effectiveness of this optimization process and the optimal values obtained are shown through plots that illustrate the number of iterations and the best-fit analysis.Two crucial factors that contribute to evaluating the performance of the closed-loop system are the number of iterations and best-fit analysis.These factors are presented as plots, supplemented by information on standard deviations and standard errors.This comprehensive analysis aids in understanding and assessing the efficiency and reliability of the closed-loop control systems.Overall, this study employs a combination of state feedback sliding mode control, an Adaptive Neuro-Fuzzy Inference System, and meta-heuristic optimization to enhance the performance of the DC servo system.The research findings and visual representations presented in the plots provide valuable insights into the behavior of the system and the benefits of the applied control strategies.
The organization of the paper is as follows: Section II details the architecture of the Adaptive Neuro-Fuzzy Inference System based on Sliding Mode Control, the mathematics involved in sliding mode control, the Hardware in Loop implementation of SMC, and the design of ANFIS for determining Sliding Mode Control parameters and comparison of actual and predicted sliding mode control parameters highlighting standard error and standard deviation respectively.Section III highlights Harmony Search Optimization and the determination of the optimal periodic phase trajectory based on the best fitness.Section IV presents on the results and discussion.The results are obtained such that the best fitness value coincides with a minimal value of the standard error and standard deviation.Section V discusses conclusions and provides a nutshell of the major findings.

II. ADAPTIVE NEURO FUZZY INFERENCE SYSTEM BASED SLIDING MODE CONTROL OF DC SERVO
The focus of this work is to develop an equivalent ANFIS for determining sliding mode control parameters of DC servo as per section (5) in [26].The matching parameters with respect to state variables x 1 and x 2 are θ and ω which account for the angular position and angular velocity of the servo.The entire control structure is designed and analyzed.In the design phase, the design of ANFIS for the determination of sliding mode control parameters is designed (refer to Figure 1) and in the analysis phase, the performance of the system based on the standard error, standard deviation, and the optimization algorithm is discussed.

A. SLIDING MODE CONTROL
The Sliding Mode Control strategy is a two-phase strategy.During the reaching phase, the system is directed along a deterministic trajectory which drives towards a sliding surface.As the system approaches this surface, a switching function guides it to adhere to the sliding surface.This dualstep process ensures stability by employing rigorous control during the transient phase and surface control during steady state.In essence, the system becomes locked onto the sliding surface, reducing the need for continuous control.However, it is important to note that sliding mode control does not achieve zero error but ensures stability with minimal error.Its applicability is limited to cases where the system is subjected to bounded or limited disturbances.The subsequent section highlights the mathematical expressions for the design of the Sliding Mode controller.A key advantage of Sliding Mode control is the ability to manipulate the system by adjusting two parameters, thereby enabling effective control [33].

1) MATHEMATICS OF SLIDING MODE CONTROL
The Degree of Freedom are considered to be the angular position θ and angular velocity ω for dc servo.Considering bounded disturbance χ as a function of θ and ω with respect to time The state model of dc servo is given in equation ( 2) and( 3) Equation ( 4) highlights the control rule for zero convergence Compensation dynamics is highlighted in equation ( 5) Asymptotic mode convergence is obtained under equation ( 6) and (7).
Rate of change of ζ is given in equation ( 8) Lyapunov function candidate is shown in equation ( 9) The equilibrium is ζ = 0 Stability constraints are as given in equation (10).
For stability V should be negative definite.Derivative of Lyapunov function is given in equation (11), Sliding Mode Control law is highlighted in equation (13).
2) SLIDING MODE CONTROL-HIL IMPLEMENTATION Sliding Mode Control implementation technique is illustrated in Figure 2.This study focuses on determining the sliding mode control parameters based on ANFIS.

3) DETERMINING SLIDING SURFACE
The initial phase data were obtained by applying the following set of ρ and c values to the Sliding Mode Controller.
Equation ( 14) presents a mathematical representation of the sliding surface, with equilibrium point ζ = 0 taken into consideration.The slope of the sliding surface is governed by the factor c, which influences the chattering effect.The different sliding surfaces corresponding to the varying values of c are shown in Figure 3.

B. ADAPTIVE NEURO FUZZY INFERENCE SYSTEM 1) ARCHITECTURE
Adaptive Neuro-Fuzzy Inference System (ANFIS) is a hybrid computational model that combines the adaptive capabilities of neural networks with the fuzzy logic   Layer 5 (Output Layer): The output is computed as a weighted sum of the neurons' outputs from the fourth layer.

2) PARAMETERS
Membership Functions: Each input variable has associated membership functions that define the degree of membership for each fuzzy set.Rule Parameters: Parameters in the fuzzy rules, typically represented as antecedent and consequent parameters.Learning Parameters: ANFIS uses a learning algorithm to adapt the parameters during the training process.Common algorithms include gradient descent and least squares.

3) MATHEMATICAL MODEL OF ANFIS
Layer 1: Layer 1 of the Adaptive Neuro-Fuzzy Inference System (ANFIS) is the Input Layer, responsible for fuzzifying the input variables using Gaussian membership functions.Considering input variables as x 1 ,x 2 ,..,x m ,y 1 ,y 2 ,. . .,y m degree of membership calculation is as shown in equation (15).
Equation ( 15), represents membership value of x i in the j-th fuzzy set with input i.The parameters c i,j and d i,j are the mean and standard deviation of the Gaussian membership functions, respectively.These parameters are usually initialized randomly and then adjusted during the training process using a hybrid learning algorithm.Gaussian membership functions define the fuzzy sets associated with each input variable, and the Gaussian membership function equation determines the degree of membership of each input variable in each fuzzy set.These membership values are then used in subsequent layers of the ANFIS for further computations.Layer 2: The Fuzzy Inference Layer is Layer 2. Equations ( 16) and (17) show how rules are activated and firing strength normalized.respectively.The activation strength of each rule in Layer 2 is driven by the degree of membership of the input variables in the corresponding fuzzy sets.
Each input variables (m) are correlated with n fuzzy sets and n m rules.The equations provided explicate the process through which the membership functions of input variables are utilized to determine the firing strength for each rule within Layer 2. Subsequently, these firing strengths are normalized and utilized by subsequent ANFIS layers for additional calculations.Layer 3: The Consequent Layer is Layer 3 of the Adaptive Neuro-Fuzzy Inference System (ANFIS).In this layer,for each rule, a linear function connecting the input variables is associated with the consequent parameters.With y j being the result of the j-th rule and P 0,j , P 1,j , P 2,j ,. . ., P m,j as the consequent parameters for rule j: Equation ( 18) presents the inputs' linear combination.
y j = P 0,j + P 1,j x 1 + P 2,j x 2 + . . .+ P m,j x m (18) y j represents the output of the j-th rule based on the linear combination of input variables.These equations describe how the consequent parameters are associated with a linear function of the input variables in Layer 3 of the ANFIS.Layer 4: Layer 4 of the Adaptive Neuro-Fuzzy Inference System (ANFIS) is the Output Layer, where the overall output is computed based on the weighted sum of the outputs from the Consequent Layer.Considering w ′ j as the normalized firing strength of j-th rule and y i,j as the ouput of the j-th rule, In Equation (19), n is the number of fuzzy sets for each input variable, m is the number of input variables,n m is the total number of rules, and y is the overall output of the ANFIS.This equation represents the weighted sum of the outputs from the Consequent Layer, where each term is multiplied by the normalized firing strength w ′ j of the corresponding rule.The sum of the normalized firing strengths in the denominator ensures proper normalization of the output.
Layer 5:Layer 5 of the Adaptive Neuro-Fuzzy Inference System (ANFIS) is the Output Layer, where the overall output is calculated based on the weighted sum of the outputs from the Consequent Layer where f j is the linear combination of consequents, antecedents and bias.

4) STEPS FOR DESIGNING ANFIS FOR ρ (ANFIS 1)
Membership function plots for inputs θ and ω and ρ as output is shown in Figure 5 and Figure 6.Mathematical details of corresponding membership functions are given in Table 2 and Table 3.
Step 1: Inputs are θ and ω Step 2: Select membership function of inputs as Gaussian membership functions    Step 3: Take data of ρ.The data were obtained from the SMC deployed individually.The data set is shown in Figure 7.
Step 4: The ANFIS architecture for ρ is shown in Figure 8.The weight matrix is set to unity.The rule set with outputs  8.
Step 7: The input and rule surface for ρ are plotted are shown in Figures 10,11,12 and 13.

5) STEPS FOR DESIGNING ANFIS FOR C (ANFIS 2)
Membership function plots for inputs θ and ω and c as output is shown in Figure 14 and Figure 15.Mathematical details of 3228 VOLUME 12, 2024 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.corresponding membership functions are given in Table 5 and Table 6.
Step 1: Inputs are θ and ω Step 2: Select membership function of inputs as Gaussian membership functions Step 3:Take data of c.The data is obtained from SMC control deployed individually.The data set is shown in Figure 15.Step 4: The ANFIS architecture for c is shown in Figure 8.The weight matrix is set to unity.The rule set with outputs of the Takagi-Sugeno Model Type 3 ANFIS is shown in Table 7.
Step   Training of ρ and c was performed using a hybrid algorithm.In the context of ANFIS, a hybrid algorithm refers to the combination of different optimization or learning techniques to train the parameters of the ANFIS model effectively.The purpose of using a hybrid algorithm is to leverage the strengths of multiple algorithms and overcome their individual limitations, leading to improved performance and faster convergence in training the ANFIS models.The hybrid algorithm in ANFIS typically combines two main components: fuzzy logic-based inference and neural network-based learning.
The hybrid algorithm combines the fuzzy inference system and neural network learning using a single optimization process.The process usually involves two main steps: a) Forward Pass: Fuzzy Inference System processes data, determines rule firing strengths, and calculates output values using membership functions and fuzzy rules.
b) Backward Pass: ANFIS model parameters update through gradient descent, minimizing errors in a hybrid algorithm that combines fuzzy logic's interpretative reasoning with neural networks' learning capabilities for adaptive optimization.The process continues until a satisfactory condition of performance or convergence is obtained.The hybrid algorithm in ANFIS combines the strengths of fuzzy logic, which provides interpretative and human-like reasoning, with the learning capabilities of neural networks, which enable the adaptation and optimization of fuzzy inference system parameters.This combination allows ANFIS to learn from data and effectively adapt to complex and nonlinear systems.By utilizing a hybrid algorithm in ANFIS, the model can benefit from the efficient pattern recognition and generalization of neural networks while maintaining the transparency and interpretability provided by fuzzy logic.
Table 8 shows the minimal Root Mean Square Error corresponding to different ρ and c values.From table 8, the minimal RMSE is obtained for ρ = 0.2 and c = 0.9.

C. COMPARISON OF ACTUAL AND PREDICTED VALUES OF SLIDING MODE CONTROL PARAMETERS
The parameters of the sliding mode control are ρ and c.Table 1 lists the values assigned to the physical system for position control.In lieu of the given values (actual values), it is necessary to check the efficiency of the ANFIS.A comparison table along with the errors is given in Tables 8 and 9.The standard deviation and standard error are both statistical measures used to describe the dispersion or variability of a data set.

III. HARMONY SEARCH OPTIMIZATION
Harmony Search (HS) is a metaheuristic optimization algorithm that draws inspiration from the creative process of musicians in the jazz band.The objective is to discover optimal solutions by emulating improvisation and   harmonious collaboration among musicians.HS is applicable to a wide array of optimization problems that are capable of accommodating both continuous and discrete variables.The fundamental steps of the Harmony Search algorithm are as follows: Step 1:Initialization Generate an initial collection of potential solutions called ''harmonies'' within the predefined bounds of the decision variables of the problem.

Fitness function:
The fitness function is given as in equation (21).
• This fitness function determines best-fitness (length) that minimizes the sum of squared differences between the model predictions and the actual data.
• (θ * length -ω) computes the vector of differences between the values obtained by multiplying each element of θ with length and the corresponding elements in ω.
• The sum of squares term in the objective function calculates the sum of squared differences, which represents the fitness function value for a given length.In the context of the objective function, the length represents the magnitude or value of the objective function output when evaluated with a specific set of decision variables.The algorithm uses this length as a measure of the closeness of the current harmony to the optimal solution.During the optimization process, the HSO iteratively updates and evaluates different harmonies, seeking to converge towards harmony with the shortest (in case of minimization) or longest (in case of maximization) length, which corresponds to the optimal solution for the given problem.In summary, the ''length'' in the objective function of Harmony Search Optimization refers to the value of the objective function for a specific harmony, serving as a measure of the harmony's quality and guiding the search for the optimal solution.
Step 3: Harmony Memory Update Selects new harmonies by combining elements from the existing harmony memory.This process mirrors musicians building upon Step 4:Improvisation Generates novel harmonies by perturbing selected harmonies.This involves altering specific components while adhering to the harmony rules.For instance, adjusting the values of the decision variables within VOLUME 12, 2024 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
predetermined ranges or applying specialized operators for discrete variables.
Step 5: Harmony Evaluation Evaluates the objective function for newly generated harmonies.
Step 6: Harmony Memory Update Update the harmony memory by replacing certain existing harmonies with newly generated ones based on their fitness values.The aim is to enhance the quality of the harmonies stored in memory over subsequent iterations.
Step 7: Termination Criteria Repeat steps 4-6 until the termination condition is met.The termination condition can be defined by the maximum number of iterations, achievement of a desired convergence level, or any other condition tailored to the specific problem.
Step 8: Solution Extraction Once algorithm concludes, extract the best solution from the harmony memory based on its fitness value.This solution represents the optimized solution for the problem at hand.

A. PHASE TRAJECTORY
The phase variables considered are θ and ω.The phase trajectory for the application of the ANFIS-based Sliding mode control is shown below.To determine the optimal phase trajectory optimization is performed.The unique nature of the excitation signal establishes the initial condition as (0,0), with two distinct final states: (1,0) and (−1,0).In terms of radians and using a conversion factor, the final state (1,0) indicates a clockwise rotation of π/4 radians, whereas the final state (−1,0) signifies a counterclockwise rotation of −π/4 radians.Analysis of the phase trajectory reveals that the system endeavors to settle around these final states.However, within a time span of 5 seconds, the excitation undergoes variation.Consequently, the system toggles the two final states.In addition, the phase trajectory exhibited a stable node mode when the controller was applied.The phase trajectories obtained in this study exhibited periodic behavior, as they are influenced by the time-dependent variables of the angular position (θ) and angular velocity (ω) [33].As a result, an analysis based on equilibrium points becomes irrelevant.Moreover, the stability of the phase trajectory is indicated by its closed nature.As the phase trajectory approaches the sliding surface, the phenomenon of chattering occurs which is apparent.The periodic phase trajectories for different values of θ and ω are plotted in Figures 22,23,24,25,26 and 27.The concept of a periodic phase trajectory is a fundamental element in the analysis of dynamic systems.It refers to the path followed by a system over time when it displays periodic characteristics.As the system functions with respect to time, it traces a trajectory in the phase space, where each point on the trajectory corresponds to a specific state of the system at a particular time.In instances of periodic behavior, the system repeats its states after a defined time interval.The recurring evolution of the system characterizes its periodic behavior.The path taken by a system can take the form of either a closed loop or a sequence of closed loops, indicating that specific states are revisited at intervals throughout its progression.This trajectory serves as a valuable tool for gaining a deeper understanding of the stability, periodic nature, and overall dynamics inherent in diverse physical phenomena.By analyzing periodic phase trajectories, researchers can gain a deeper understanding of the underlying principles governing the systems and make predictions about their future behavior.The optimal phase trajectory was determined by the assessing best fitness based on the Harmony Search Optimization technique.This in turn provides the performance index which accounts for the low value of the Standard deviation and Standard Error.

B. DETERMINATION OF OPTIMAL PHASE TRAJECTORY
The parameters of Harmony Search optimization are listed in Table 10.The significance of choosing an appropriate value for Harmony Memory Consideration rate (hmCR) and Harmony Memory Bandwidth (hmBW) is: 1)The HMCR determines the probability of selecting a value from the Harmony Memory (a repository of previously generated solutions) during the search process.A higher HMCR value increases the likelihood of selecting values from the Harmony Memory, thereby promoting the exploitation of promising solutions.However, lower HMCR value encourages the exploration of new solutions.The appropriate choice of HMCR depends on the characteristics of the optimization problem, balancing the exploration and exploitation trade-off.
2) The HMBW determines the range within which new values are generated based on the values selected from the Harmony Memory.It controls the diversity of solutions generated during the search process.A wider bandwidth allows for a broader exploration of the solution space, potentially finding global optima.Conversely, a narrower bandwidth narrows the search for promising solutions, focusing on the local optima.The selection of an appropriate HMBW value depends on the landscape of the problem and the balance between exploration and exploitation.The  results of the Harmony Search optimization are plotted in Figures 28,29,30,31,32 and 33.The Harmony Search algorithm's fitness value, in general, can be either maximized or minimized as shown in nature of the optimization problem was applied.In the context of maximization problems, the algorithm aims to achieve higher values or accuracy for the fitness function.It explores and exploits candidate solutions that yield the best possible fitness values.However, from the perspective of the phase trajectory, the Harmony Search Approach can be considered as a minimization problem.Specifically, it aims to minimize the length of the phase trajectory.This trajectory refers to a sequence of states through which a system evolves over time.The objective of the algorithm is to find the optimal set of parameters that result in the most efficient trajectory.In the case of periodic phase trajectories, the Harmony Search algorithm emphasizes toggling equilibrium points.The goal was to identify the parameter configurations that lead to a periodic trajectory with minimal error.fitness values to approach the optimal solution.Termination criteria, such as reaching a certain fitness threshold or a maximum number of iterations, are established based on these fitness values.d)Solution Evaluation: Acting as an evaluator, the fitness function enables the HSO to assess the performance of candidate solution without having to explore the entire solution space.By doing so, the algorithm can concentrate its efforts on promising solutions, leading to more efficient convergence towards the optimal outcome.e)View into the Landscape: The relationship between solutions and the accompanying fitness values is shown visually in the fitness landscape.This realization aids in understanding the complexity of the issue, including the smoothness of the landscape and the occurrence of several local optima.This knowledge makes it easier to modify the algorithm's parameters for improved performance.f)Finding the Correct Balance Between Exploration and Exploitation: In the HSO, the fitness function helps determine the appropriate ratio of exploration to exploitation.The method utilizes high fitness values to identify potential solutions and optimize the search process while simultaneously exploring new regions in the solution space to prevent getting stuck in local optima.g) Parameter Tuning: Since HSO frequently incorporates a number of parameters, including bandwidth, pitch adjustment rate, and harmony memory consideration rate, the fitness function is essential in fine-tuning these parameters.Through tweaking, the algorithm's performance is improved and its capacity to adjust to the particular challenge at hand is guaranteed.

IV. RESULTS AND DISCUSSIONS
To find the best values for the control parameters, two techniques were used.ANFIS is used for the first, and Harmony Search optimization is used for the second.When ρ = 0.2 and c = 0.9 are used, an interesting occurrence is seen using the ANFIS algorithm, which is characterized by an encirclement of the contour plot.This   fascinating finding clearly suggests the construction of an ideal phase trajectory and demonstrates the effectiveness of the ANFIS method in producing better outcomes.These particular parameter values are determined in large part by the hybrid optimization technique built into the ANFIS framework, which further supports the validity of the results that are produced.Notably, we may achieve good outcomes in a variety of problem domains by following the ρ = 0.2 and c = 0.9 values thanks to the adaptability of the ANFIS algorithm.These findings demonstrate the efficiency of the algorithm across different scenarios and highlight its versatility as a powerful tool for solving complex problems across various domains.Validation through the Harmony Search Optimization technique adds an extra layer of confidence to the algorithm's capabilities and sets the stage for further exploration and application in practical settings In essence, the fitness function serves as the driving force behind Harmony Search Optimization, allowing for the evaluation of candidate solutions, guiding the search for optimal solutions, and determining the conditions for termination.As a critical component, it profoundly influences the behavior and effectiveness of the algorithm in addressing complex optimization problems.Tables 12 and 13 show the standard error and standard deviation with respect to the actual and predicted values of the sliding mode and the best fitness value for the same.Table 13 indicates that the Best fitness value achieved through the Harmony Search Optimization algorithm aligns perfectly with the minimum value of the standard error observed for the relevant parameters.Table 14 highlights the variation of ISE for different values of control parameters.This finding provides strong evidence to support the claim that the optimal value with the least error for sliding mode control of DC servo systems for position control is achieved when the parametersρ and c take on the specific values of 0.2 and 0.9 respectively.The Harmony Search Optimization algorithm demonstrated its effectiveness in determining the optimal values for the control parameters.The minimization of standard error and Integral Square error points ρ = 0.2 and c = 0.9 as the best fit for achieving superior performance in the DC servo position control system.

V. CONCLUSION
This study addresses the precise position control of a real-time dc-servo system.The dc-servo is excited by the periodic reference signal.The response and its derivative form the periodic phase trajectory.The optimal periodic phase trajectory is determined on the basis of the optimal values of the sliding mode control derived through ANFIS and HSO.These techniques supplement each other for the same value of sliding mode control parameters In this investigation, the sliding mode control concept, reinforced by ANFIS, is applied to the feedback loop, with the novelty of the state feedback control.By comparing this novel architecture with traditional sliding mode control in the feedback loop, the study demonstrated superior results, highlighting the effectiveness of the proposed approach.To ensure the optimality of the obtained control parameters, this study employed a meta-heuristic Harmony Search Algorithm.The primary goal of this algorithm is to maximize the fitness value, aligning it with the objective of minimizing the standard error and standard deviation associated with the control parameters.This alignment of the maximum fitness value with minimal error and deviation serves as a crucial performance index, providing valuable insights along with other standard indices to evaluate the system's effectiveness.
The key findings of this study are highlighted below.
• Optimal values of ρ and c are 0.2 and 0.9 respectively.
• Minimal Root Mean Square error for output of Sliding Mode Control law is obtained for the aforementioned optimal values of ρ and c.Refer to Table 8.
• The standard error and standard deviation corresponding to optimum values from the ANFIS perspective is minimal.Refer to Table 12 and Table 13.
• Minimal ISE for obtained at ρ = 0.2 and c = 0.9 respectively.Refer to Table 14.
• Harmony Search optimization supplements the above findings by Best-fitness value corresponding to least squares estimation based on the length of phase trajectory.Refer to Table 13.The proposed control design and optimization technique can make meaningful contributions to the field of control systems by addressing challenges related to robustness, adaptability, and optimization in diverse industrial applications.Its potential impact lies in improving the efficiency, stability, and reliability of control systems across a wide range of industries.
In conclusion, SMC contributes to robustness by maintaining the system on the sliding surface despite uncertainties and disturbances.ANFIS adapts to varying system dynamics, enhancing robustness in the face of changing conditions.HSO optimizes the parameters of the combined SMC-ANFIS controller, fine-tuning the system for better response and minimizing error.The combination leverages the strengths of each technique, leading to a controller that is both robust and adaptable, capable of providing optimal performance under different conditions.In this research, ANFIS was meticulously adjusted to attain optimal parameters for sliding mode control.The validation process affirmed the effectiveness of the proposed approach.Integrating the periodic phase trajectory concept with sliding mode control through ANFIS, along with employing meta-heuristic optimization, enhances the robustness and effectiveness of the real-time DC servo system's position control strategy.Through validating the control parameters' optimality and assessing diverse performance indices, this study establishes the superiority of the proposed method in achieving accurate and dependable position control for a real-time DC servo system.

FIGURE 1 .
FIGURE 1.Control structure showcasing state feedback sliding mode control via ANFIS.

FIGURE 2 .
FIGURE 2. Sliding mode control-hardware in loop implementation.
system's ability to represent and handle uncertainty.ANFIS is particularly useful for modeling complex, nonlinear relationships.ANFIS typically consists of five layers: Layer 1 (Input Layer): Input variables θ and ω are represented by nerons Layer 2 (Fuzzy Inference Layer): Each neuron in this layer corresponds to a fuzzy rule.The input values are fuzzified here using membership functions.Layer 3 (Normalization Layer): This layer normalizes the degree of firing of the fuzzy sets.Layer 4 (Consequent Layer): Neurons in this layer represent the consequent parameters of the fuzzy rules.These parameters are adapted during the learning process.

FIGURE 10 .
FIGURE 10.Contour plot of ρ with angular velocity and angular position as input.

FIGURE 11 .
FIGURE 11.Contour plot of ρ with angular velocity and angular position as input (top view).

5 : 7 :
Training error for c.Refer to Figure 17.Step 6: Mapping of training data and actual data with respect to c is tabulated in Table3in a concise form.Step The input and rule surface for c were plotted as shown inFigures 18,19,20 and 21.

FIGURE 12 .
FIGURE 12. Contour plot of ρ with angular velocity and angular position as input (side view from ω-ρ plane).

FIGURE 13 .TABLE 5 .
FIGURE 13.Contour plot of ρ with angular velocity and angular position as input (side view from θ -ρ plane).

FIGURE 14 .
FIGURE 14. Membership function of θ for c.

FIGURE 17 .
FIGURE 17. Training error for c.

FIGURE 18 .
FIGURE 18. Contour plot of c with angular velocity and angular position as input.

FIGURE 19 .
FIGURE 19.Contour plot of c with angular velocity and angular position as input (top view).

Step 2 :
Harmony Evaluation Assesses the objective function for each harmony.The objective function encapsulates the optimization criteria specific to the problem being solved.

FIGURE 20 .
FIGURE 20.Contour plot of c with angular velocity and angular position as input (side view θ -c plane).

FIGURE 21 .
FIGURE 21.Contour plot of c with angular velocity and angular position as input (side view ω-c plane).

TABLE 1 .
Set of ρ and c values for Sliding Mode Control.

TABLE 2 .
Membership function -gaussian membership function of θ for ρ.

TABLE 3 .
Membership function -gaussian membership function of ω for ρ.

TABLE 6 .
Membership function -gaussian membership function of ω for c.

TABLE 8 .
Minimal Root Mean Squared Error (RMSE) for output of ANFIS-based SMC for different control parameters.

TABLE 12 .
Standard Error for ρ and c with respect to predicted values.

TABLE 13 .
Standard Deviation (σ ) for ρ and c with respect to predicted values and best fitness.

TABLE 14 .
Integral Square Error for variation in control parameters.