## 1 Introduction  
Currently, modern industry uses electric drive systems equipped with advanced diagnostic systems. Such systems are called fault-tolerant control (FTC) [1, 2]. FTC systems are divided into two types: passive (PFTC) and active (AFTC) [3]. In passive systems, controllers adjust their parameters to changing operating conditions in the event of a failure; adaptive or neural controllers are used. PFTC somehow compensates for the impact of failure on the control structure. However, this type of a system does not detect failure, so the failure may still progress. They only work well in the early stages of minor failures. Scientists are definitely more interested in active systems. In this case, traditional control structures are equipped with additional blocks for failure detection and compensation. Failure compensation may be hardware- or software-based. In electric drive systems, failures are divided into three main categories [4]. The first is damage to the electric motor itself. These failures mainly affect the bearings and stator windings. In the event of a bearing failure, the component must be replaced; the failure cannot be compensated [5, 6, 7, 8]. Attempts to compensate for stator short circuits were made by using additional redundant windings [9]. This is a typical hardware compensation. Another type of failure mentioned in the literature is the failure of the frequency converter [10, 11, 12]. Here, the compensation is usually done by redundant components, e.g., transistors. The detection of both of the above-mentioned failures is performed with the use of measuring sensors, which are the last type of basic failures. Usually, detection is based on current measurement. PMSM drive systems, which are the subject of research using two or three current sensors, depend on the method of determining the stator current components [13]. Current sensors based on the Hall effect are most often used in drive systems. It is a component that is exposed to many types of damage. Some of them can only worsen the performance of the drive system, and some prevent it completely. This is why fast detection and compensation of their damage are so important. This is essential in sensitive industries such as electric vehicles, the space industry, and the aviation industry. Such sensors provide non-invasive measurements. A conductor with the flowing current is placed in the magnetic core. The Hall sensor is placed in a small air gap. The magnetic field generated by the conductor is recreated on the secondary winding. The magnetic field is then detected by a Hall sensor and a voltage proportional to the conductor current is generated at its output [14]. Damage in such a sensor may be caused by the corrosion of the core, changes in the magnetic properties of the ferrite core due to temperature, or, e.g., changes in the orientation of the magnetic field induced in the sensor [15]. These damages can lead to a complete break of the sensor and loss of measurement signal or phase shift, noise, and gain changes. Current sensor fault detection methods are divided into signal-based [16; 17] and model-based [18; 19]. State variable observers are used in model-based methods, which require the knowledge of motor parameters [20]. Most of them depend heavily on them. Correct operation requires precise parameterization. Different parameters are used depending on the observer type, but the stator resistance and inductance are reproducible for most of them. However, these are parameters whose values change over time. This may worsen the estimation properties. A significant advantage of this type of method is that the estimator used for detection can also be used to compensate for failures. In the paper [21], the authors described a sliding-mode observer (SMO) for the detection of faults in current sensors in the PMSM control system. Online diagnostics of the ABC phase current sensor failure is performed based on the relationship between residual errors, generated by SMO and phase current sensor errors and the rules of failure diagnostics.