Design of a soft sensing technique for measuring pitch and yaw angular positions for a Twin Rotor MIMO System

Background: This paper presents a soft sensor design technique for the estimation of pitch and yaw angular positions of a Twin Rotor MIMO System (TRMS). The objective of the proposed work was to calculate the value of pitch and yaw angular positions using a stochastic estimation technique. Methods: Measurements from optical sensors were used to measure fan blade rotations per minute (RPM).  The Kalman filter, which is a stochastic estimator, was used in the proposed system and its results were compared with those of the Luenberger observer and neural network. The Twin Rotor MIMO System is a nonlinear system with significant cross-coupling between its rotors. Results: The estimators were designed for the decoupled system and were applied in real life to the coupled TRMS. The convergence of estimation to the actual values was checked on a practical setup. The Kalman filter estimators were evaluated for various inputs and disturbances, and the results were corroborated in real-time. Conclusion:  From the proposed work it was seen that the Kalman filter had at least Integral Absolute Error (IAE), Integral Square Error (ISE), Integral Time Absolute Error (ITAE) as compared to the neural network and the Luenberger based observer.


Introduction
The study of aerospace systems has always been a subject of interest by many researchers, engineers, and technical students. However, it is practically very difficult to analyze these aerospace systems, so a replica is designed to understand the behavior of the actual systems. One such system, which replicates the behavior of a helicopter system, is a TRMS. The TRMS has two of the three movements of a helicopter, pitch angle, and yaw angle. 1 The TRMS position is controlled by the rotor speed. The two input variables to the TRMS are voltage to the main rotor and tail rotor, and the outputs are the pitch and yaw angle as shown in Figure 1. Excitation to these motors is given by a controller based on a set point given by the user. Desired control action can be achieved only by accurate measurements of pitch and yaw.
Modeling of the real-time TRMS system is a key step carried out for the execution of control action or any other estimation in presence of noise. Physical models are either based on Newtonian or Lagrangian concepts. 2,3 But building a model based on the first principle approach is a very tedious task, hence the mathematical models are always preferred based on measured data. In some cases, the structure of the model is predefined, but rigorous algorithms are applied to estimate the parameters of the model. The estimation is done based on algorithms like genetic algorithm, 4 particle swarm optimization, recursive least squares, artificial neural network, and evolving fuzzy modeling. 5 Quasi-Linear parameter varying modeling 6 and feedforward neural network 7 are also used for system identification of TRMS.
Several researchers have reported work on computing the yaw and pitch positions using different techniques. Different algorithms are incorporated to maintain and retain the stability of the TRMS. Controllers like Proportional Integral Derivative (PID), fuzzy PID, sliding mode controller, fuzzy sliding mode controllers, and estimators like Luenberger and Kalman are incorporated on the TRMS. 8 Rahideh and Shaheed 9 discussed the design of a model predictive controller for a TRMS. The controller is simulated based on the state model using motor armature current and angular speed as inputs. Jahed and Farrokhi 10 discussed the design of a fuzzy-based robust control for a TRMS using angular speed given by a tachometer in a simulation platform, and Tao et al. 11 discussed the fuzzy sliding and integral sliding controller design for a TRMS. In Rohith, 12 a new control law was proposed for the design of sliding motor controllers, which mitigate the

REVISED Amendments from Version 1
The revised version of this manuscript addresses comments and suggestions that were pointed out by the reviewers. The updates are meant to improve the report and are as follows: chattering problem with the gain variation and thereby guarantees faster system response and robustness. The design of an auto-tuning based PID controller with fractional-order reference model approximation for a DC rotor in a TRMS model is discussed in Alagoz et al. 13 The data regarding the process variable is derived from the angular position of pitch and yaw.
In Patel and Janardhanan, 14 a tuning method based on the Moore Skelboe Algorithm for a PID controller was presented. This was effective in finding the optimal PID values for the given initial range and applicable for some of the higher-order Linear Time-Invariant (LTI) systems as well as for all first and second-order linear time-invariant systems. Further, the method was effective in stabilizing unstable systems. Halim and Ismail 15 presented a PID controller tuning using tree physiology optimization, which was based on the tree growth concept whose simulation results showed better results compared to other tuning methods in Single Input Single Output (SISO) and MIMO problems. Rao et al., 16 reported design of an observer using robust PID controller logic with H∞ observer to obtain the stable output in TRMS with sensor and actuator failure. Netto et al., 17 reported an Adaptive PID controller to cancel the effect of cross-coupling between the tail rotor and main rotor when operating simultaneously in a TRMS. Adaptive linear quadratic regulator design for stable system operating at a single reference point with six tail and main rotors is reported by Faisal and Omar Waleed. 18 Ghellab et al., 19 reported an adaptive radial basis function neural network with a dynamic terminal sliding mode control with cross-coupling between the tail and main subsystem for tracking the set point in the presence of wind gust and other external disturbance.
In Sleimi et al. 20 a linear time-varying controller was designed using a differential flatness property leading to a two Degree of Freedom (DOF) controller for which the system must be in canonical controllable form with no need to define its dynamics. In Panda et al., 21 the proposed control strategy used an adaptive backstepping controller implemented on a Twin Rotor Multi Input Multi Output System. It provided an explicit relationship between the saturation bound of the input signal and upper bounds of tracking errors, uncertainties, and disturbances. Mondal and Dey 22 presented the development of a two DOF control system design providing an additional degree of freedom depending on the nature of the plant and loop compensators. The design methodology can be implemented for integer as well as non-integer order plants with better tracking and loop robustness.
Neural network-based controller design using model inversion control for a twin-rotor MIMO system was reported in Rahideh et al. 23 The design of a differential evolution-based neural network model to control the TRMS with data of angular positions was reported by Subudhi and Jena. 24 Pratap and Purwar, 25 reported the implementation of a neuroadaptive robust backstepping controller for TRMS.
The TRMS dynamics are given in Rahideh et al., 26 Sun and Song 27 and Ahmad et al. 28 It was found that the system was a nonlinear and coupled one with considerable error in the measurements. The method based on the Kalman filter is considered as it provides for updating the estimates based on errors, and also takes into account the process and the measurement noise uncertainties to give out the best estimate. Model dynamics of the system are known and are used for estimation. The Kalman filter is widely used as a state estimator and is used in various fields.
In Maiti et al., 2019 29 authors have proposed and designed an adaptive fuzzy low-pass filter-based L1 adaptive controller and implemented it on a TRMS. The main ideology behind the proposed work is to adapt the low pass filter, when the system is subjected to unknown disturbances, cancel them accordingly, and also provide efficient tracking performance. A control technology mainly intended to address the regulator problem by considering the uncertainties in TRMS motion control is proposed in. 30 The proposed work is a cascaded control technology wherein nominal state and input trajectories are obtained in the first phase followed by obtaining a linearized model for tracking the reference yaw and pitch angles in the second phase.
The TRMS is a prototype device used to understand the dynamics of a helicopter system. It consists of two rotor fans to operate the device in two Degrees of Freedom (2-DoF). For controlling/stabilizing the system performance based on the desired set point, it is essential to sense the actual pitch and yaw positions. The presence of faults during data transmission to the controller leads to the controller failing to take the desired action and thus the system destabilizes. Hence, a technique is proposed to design an estimator so that it can be used in case of any contingencies.
The present work attempts to estimate the yaw and pitch angle of the TRMS in presence of sensor faults. To achieve this target, a data-driven model of TRMS is developed in presence of no disturbance and faults. Models are developed with measured data of yaw and pitch in the system identification toolbox of MATLAB. The toolbox employs a non-linear least square algorithm to estimate the parameters (coefficient s) of the transfer function (TF). The Kalman filter and Luenberger observer are based on data-driven mathematical models. The soft sensing techniques can be stochastic or deterministic. The Kalman filter is a stochastic sensing technique where there is no certainty in the reproducibility of the output for a given input. The Luenberger observer is based on a deterministic approach, where for a particular input always there is the same output. The neural network is developed based on input and output data; the trained model is deterministic.
The sensor failure condition is artificially created during the operation of the TRMS and the performance of these soft sensing techniques is compared for the selection of the better one. The outline of the work carried out is shown in Figure 2, where yaw and pitch angles are measured and estimated simultaneously, if the sensor is faulty, there is a deviation between measured and estimated output. The estimated output is compared with the output of the TRMS under no faults to check its accuracy by the performance indices like ISE, IAE, and ITAE.

Experimental setup
The twin-rotor MIMO system is a prototype of a helicopter propeller system. It is shown in Figure 3. The system was a non-linear MIMO system with significant cross-coupling. The angle of attack of the rotors was fixed and the aerodynamic forces were controlled by varying the speed of the motors. Significant cross-coupling was observed between the actions of the rotors, with each rotor influencing both angle positions. Two propellers were driven by DC motors controlled by their supply voltages. The two-position angles are measured by rotary optical encoders mounted on each of the rotor shafts. It was calibrated for the inertial axis using the loop-up table approach.
Maxon A-max motor of 18V,6W,30 mA, graphite brushed DC motors are used for the tail and main rotors with a maximum speed of 8300 RPM. The communication between the computer and TRMS system is established by PCI 1711 Multi-purpose Input/output card. It has sixteen channel single-ended analog inputs,12-Bit ADC with a 100 kHz sampling rate. To communicate with the computer, it has 16-channel digital input and output. The estimators are designed in the Simulink environment of MATLAB, PCI 1711 card helps to receive and transfer data between MATLAB and TRMS.

Estimator design
The TRMS has two modes of operation, namely, 1-DOF control and 2-DOF control. In 1-DOF control, the pitch and the yaw are controlled individually and independently, whereas in 2-DOF control the pitch and the yaw are controlled simultaneously in a coupled system. The block diagram of the proposed scheme is shown in Figure 4. Here the coupled TRMS was controlled by two separate PID controllers for the pitch and the yaw respectively. The controllers were tuned to maintain the angles at the desired positions or set point, except in the event of some contingency such that the pitch or the yaw failed to maintain the desired position. The transient output of the sensors was used to design an estimator to find the angles where models were generated using a system identification process. A decoupled pitch and yaw model was used for designing the estimator. In this case, pitch and yaw angles were independently calculated using the Kalman filter.

Kalman filter
The Kalman filter is developed from the Bayesian filter. It was initially used to extract the signal from the noisy output data of sensors, and/or actuators. 31-33 Over time, it has been used as a state estimator also. It is a stochastic estimator and requires explicit modeling of the process noise and the measurement noise in addition to the system model. The Kalman filter estimation is a two-step process. Initially, it generates an estimate from the knowledge of the system dynamics, which is embedded in the system model along with the noise model. This is called the apriori estimate. Once the measurement output is available, the apriori estimate is updated to the posteriori estimate. The second stage involves the Kalman gain which is altered in every step based on an optimization problem.
The Kalman gain was the main feature of this estimator and it decided if the estimate derived much of its information from the measurement output or the system dynamics. Hence, the Kalman gain was also updated on every step such that the error between the actual output and the estimate was reduced i.e. the residue reduced to zero. The noise covariance matrix was also updated at each step based on the error. Here the Markovian model was used where the state was said to be Markovian but the measurement was usually not Markovian. Also, we considered the process noise and measurement noise as Gaussian, and they were not correlated with each other. It is also called the Gauss-Markov model. This allows  nonlinearity. The mean was assumed to be zero for both measurement and process noises. Covariance was chosen in this case such that the covariance of measurement noise was slightly less than the covariance of the process noise. In general, the probability distribution of the state is given by equation (1) where p X kþ1 ð Þwas determined by p W k ð Þwhich was the probability distribution of the process noise. The system state X k was modeled as a linear combination of the previous states along with the input U and the process noise W, as given in equation (2) For the considered TRMS, the matrices for the decoupled pitch model were found to be: The matrices for the decoupled yaw model were found to be: The measurement obtained was modeled as a linear combination of the system states and measurement noise V as in equation (5) In the TRMS model, the measured output i.e. pitch and yaw were related to states directly through output matrices S i.e. H p ¼ S p , H y ¼ S y . Hence for pitch, H p ¼ 0:0166 0:4194 2:454 ð Þ . For Yaw, H y ¼ 0:001 0:0336 0:4065 ð Þ . Let Q and R be processed noise covariance and measurement noise covariance respectively. The apriori error covariance P is given by equation (6).
Once the measurement was obtained, the Kalman gain was computed and the apriori state estimates and the apriori error covariance were updated as follows: Kalman gain: The posteriori estimate: The posteriori error covariance Here c X k was the estimate of the state at k given the measurement at k and the apriori estimate X k at time k. Also, it should be noted that the Kalman filter was a one-step ahead predictor. The noise covariance matrices R and Q were the most complex matrices to compute, therefore the idea was to start with an initial estimate of identity matrices for both R and Q and to change them based on the convergence between the actual and the estimated outputs. The Kalman filter estimated the states. However, the objective was to estimate the pitch and the yaw which were the output of the TRMS. Hence, the output was obtained from equation (10).
and the output residue (error) was given by equation (11) Error, where Y 0 k ð Þ was the actual value of pitch and yaw.
Estimation with the Luenberger observer and neural network The Kalman filter provided a stochastic method of estimation, whereas the Luenberger observer and neural network provided a deterministic method of estimation of the states. The estimation of yaw and pitch carried out with these deterministic methods had a poorer performance due to their inability to incorporate uncertainties that emerge inherently in any real systems, such as the uncertainties due to modeling errors or sensor output errors. However, these estimates can be feasible if the error margin is not very stringent.
Luenberger based observers are widely used for numerous applications and modified according to the type of the system. 34 The extended Luenberger observer and adaptive Luenberger observer are the latest class of these observers. 34 The Luenberger observer is used for estimation of battery charge for electric vehicles, 34 flux in motor drives, 35 motorcycle dynamics, 36 sensor-less speed estimation. 37 The scheme of this observer is shown in Figure 5. The following were the expressions for the observer design from Figure 5.
Assume a plant: y ¼ Cx (13) Figure 5. Block diagram of the Luenberger Observer used for estimation of pitch and yaw.
State equations of the observer: y Àb y ¼ Ce x From equation 17, it is understood that if the eigenvalues were all negative, the estimated state vector error, e x , would decay to zero. The design then consisted of solving for the values of L to yield a desired characteristic equation.
Then the selection of eigenvalues for the observer was carried out to achieve a required closed-loop response. These eigenvalues determined a characteristic equation that was made equal to equation 19 to solve for L. The poles for the observer for both pitch and yaw were chosen to be at À1, À2, and À3.
The Luenberger gain L for pitch was: The Luenberger gain L for yaw was: The estimation based on the neural network was based on a time-series correlation between the input and the output, also called the targets. This assumed a black body model, where the dynamics of the system were not explicitly parameterized and the forecasting was done only from the input-output relationship of the system. Here the neural network was trained to replicate the behavior of the system by using the given set of input-output pairs of data. The Levenberg-Marquardt algorithm with a back-propagation network having one hidden layer with a size of 10 neurons, which was used to predict the output i.e. the pitch and the yaw from the input. The neural network used for the present work is shown in Figure 6. The 'nftool' of MATLAB version R2014a, 38 provided the platform to train the neural network and this was used in the current work.

Results
A soft sensor for computing the yaw and pitch in TRMS using three different techniques, a neural network, a Kalman filter, and a Luenberger observer, was designed. The regression graph for the trained neural network is shown in Figure 7 for pitch and Figure 8 for yaw systems.
The efficacy of different techniques adopted is tested in the real scenario. Tests were conducted by applying input and disturbance. The response of the proposed sensing system using the Luenberger observer is represented in Figures 9-12. The output obtained for the Kalman filter is shown in Figures 13 and 14. Similarly, the output obtained from the neural network is shown in Figures 15 and 16. From the responses, it was found that the proposed sensing technique was able to track the pitch and yaw positions accurately in a practical system. The performance measures IAE, ISE, and ITAE were used to quantitatively compare the outputs obtained from the Luenberger observer, Kalman filter, and neural network estimator. The results of these for the pitch and yaw measurement are shown in Figures 17 and 18, respectively. This method provided a way to classify the errors that occurred in different stages of the system operation and provided a means to judge the accuracy of estimation. . The best-suited estimator is decided based on the performance indices values,          the estimator having the least value in terms of ISE, IAE and ITAE are selected for further operation. The steady-state of the system occurred at around time = 50 seconds, and the errors at that instant for all the estimators were tabulated for pitch and yaw measurements in Table 1.

Discussion and conclusions
Twin rotor multi-input systems are fundamental elements for any aerial system, analysis of its performance is very much essential to further modify the system for better efficiency. The TRMS contains a motor system along with a sensor system for testing. Sensors are an integral part of the TRMS for providing actual information to the controller. Failure of the sensors would lead to errors in control action and thus lead to system failure.
The reported work attempted to design an observer-based system, which would function accurately even with sensor faults. Sensor data is an essential input for any controller, erroneous sensor data would cause the controller to produce erroneous results. An estimator is designed using Kalman filter, Luenberger observer, and neural network model to predict the sensor output based on the secondary data of the TRMS system. The effectiveness of the Kalman filter algorithm for estimation of pitch and yaw angular positions was verified in real life on the TRMS with external disturbances. The estimate was updated at every sampling time to predict the yaw and pitch for angular positions for the given input and measurement data. The performance of the Kalman filter was compared with that of the neural network and Luenberger observer. From the results of IAE, ISE, and ITAE, the error was least when using the Kalman filter followed by the Luenberger observer, and lastly, the neural network. Hence, the estimation by the Kalman filter was more accurate during both transient and steady states.
In the study, the work is carried out considering the system dynamics for given environmental conditions. External influence is not considered in the present work and in future work we would like to consider the same. Optimization of the estimator can also be achieved in future work.  Some sentences are difficult to read or incomplete (e.g. "Twin rotor multi input systems are fundamental for any aerial system, analysis of any property on the TRMS makes it important when designing any system further; It was subjected to tests in real life"). Sentence structure and rephrasing is needed.
Instead of Comparative graphs, it may be mentioned as Comparative results. 4.
Distinguish the various soft sensing technique in terms of the stochastic methods? Which among the studied are stochastic and deterministic?

5.
The Luenberger observer based system, Kalman filter algorithm and gain, and neural network model using Levenberg-Marquardt algorithm and gain.

6.
The various gain values and the noise covariance may be compared in a tabular format. 7.
The transient, steady states, 1-DOF control and 2-DOF control may be explained a bit clearly in the methodology and results section.

8.
Please provide the technical details of the TRMS containing the Twin Rotor motor system 9. and the sensor system.
The neural network regression model results for both pitch and yaw control may be introduced under the results section.

10.
What is the major contribution of this study? The soft sensing technique designed and tested for the senor motor by the authors is useful for other applications? Please elaborate on those aspects.

11.
What are the major limitations and future scope of the study. 12.
The conclusion lacks significant numbers to support the major outcome of the study. 13.
List down the key conclusion on the various numerical values obtained from the study. 14.

If applicable, is the statistical analysis and its interpretation appropriate? Partly
Are all the source data underlying the results available to ensure full reproducibility? Yes Are the conclusions drawn adequately supported by the results? Partly pitch and yaw angular positions for a Twin Rotor MIMO System. The research result is interesting. However, some suggestions are provided to improve the quality and presentation of the study: Please maintain consistency in the use of Terminologies. For instance, is it MIMO or MIMI?
○ Response: Sorry for the mistake, we have consistently used MIMO, in the revised article. Some sentences are difficult to read or incomplete (e.g. "Twin rotor multi-input systems are fundamental for any aerial system, analysis of any property on the TRMS makes it important when designing any system further; It was subjected to tests in real life"). Sentence structure and rephrasing are needed.

Abuabiah Mohammad
Mechanical and Mechatronics Engineering Department, Faculty of Engineering & Information Technology, An-Najah National University, Nablus, Palestinian Territory

Contribution:
The paper addresses the problem of estimation pitch and yaw angular positions of a Twin Rotor MIMO System (TRMS) using the soft-sensor technique. In particular, the authors propose an estimation to calculate the value of pitch and yaw angular positions using Kalman filter, Luenberger observer and neural network. More specifically, measurements from optical sensors were used to measure fan blade rotations per minute (RPM), and then Kalman filter estimators were evaluated for various inputs and disturbances. Finally, different experimental results have been presented to compare Kalman filter estimation with those of the Luenberger observer and neural network. The results show that the Kelman filter has the least IAE, ISE and ITAE as compared to the two other mentioned methods.

General Evaluation:
The submitted paper has some novelty in the field of soft sensing techniques using the Kelman filter approach for the Twin Rotor MIMO system. Although the paper suffers from a lack of deep analysis and comparison with other previous works, it is the reviewer opinion that the presented approach is of some interest since it provides an approach for estimating TRMS using Kalman filter in a comparison with Luenberger observer and neural network approach.
All considered, it is my opinion that the paper deserves the merit to be considered for publication, provided that the comments reported below are properly taken into account by the authors.

Comments:
The paper in general is organized. However, the authors are invited to take into account the following comments in order to improve the quality of the contribution.
1) It is my opinion that the literature review is not satisfactory. Although the authors mentioned some of the previous methods related to the topic, they didn't provide a full literature overview of the proposed problem and more specifically to model estimation of the TRMS system. The authors are advised to add e.g., the work of A. Tastemirov  2) It is not clear on which basis the poles for the observer for both pitch and yaw were chosen to be at -1, -2, and -3. The authors are advised to add more details about the chosen values and how these can affect the accuracy of the obtained model.
3) The matrices for the decoupled pitch and yaw models in Equations 3 and 4 are exactly the same; which is strange. The authors are advised to re-check again the values and discuss more the founded model. Moreover, the S y matrix is not clear, there should be spaces between each column.
4) R and Q matrices computation was missing or not well discussed. The authors are advised to explain more the procedure they used to compute R and Q and how this leads to equation 10. Fig. 2 is missing. The authors are advised to comprehensively discuss the outline of this paper. Furthermore, it suggested removing any literature that is out of the scope of the provided topic (e.g., 23 -26).

5) An explanation of
6) The authors stated the following "The estimator having the highest number of errors was not accurate" on page 11. However, it is not so clear and it is suggested to re-write it in a better way.
Reviewer Expertise: Control, system identification, mechatronics systems, automotive I confirm that I have read this submission and believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above.
Author Response 13 Nov 2021 Santhosh Venkata, Manipal Institute of Technology, Manipal, India 1) It is my opinion that the literature review is not satisfactory. Although the authors mentioned some of the previous methods related to the topic, they didn't provide a full literature overview of the proposed problem and more specifically to model estimation of the TRMS system. The authors are advised to add e.g., the work of A. Tastemirov  Response: Thank you for the suggestion, we have included recent and relevant publications in the literature review.
2) It is not clear on which basis the poles for the observer for both pitch and yaw were chosen to be at -1, -2, and -3. The authors are advised to add more details about the chosen values and how these can affect the accuracy of the obtained model.

Response:
Any observer design aims to drive the error between the outputs of the plant and observer to zero. The error function is multiplied with the gain which enhances the convergence of the estimates to the true states. A high gain leads to fast convergence but too high causes a peaking phenomenon. By choosing the eigenvalues of the observer on the left half of the s-plane, the error dynamics can be controlled appropriately. For computation, poles are considered by multiplying by at least 10 times to the poles of the system.
3) The matrices for the decoupled pitch and yaw models in Equations 3 and 4 are exactly the same; which is strange. The authors are advised to re-check again the values and discuss more the founded model. Moreover, the Sy matrix is not clear, there should be spaces between each column.
Response: The decoupled pitch model was found to be: (3) The matrices for the decoupled yaw model were found to be: