Digital-Twin-Based Diagnosis and Tolerant Control of T-Type Three-Level Rectifiers

This article proposes a digital twin (DT)-based diagnosis and fault-tolerant control for T-type three-level rectifiers. To develop the DT, a dense deep neural network (DNN) machine learning approach is used. The DT is trained offline using a set of experimental data and updated online to get the maximum possible accuracy. Then, the DT is used for the diagnosis and tolerance of open-switch faults (OSFs) and faults related to voltage and current sensors or for sensorless control. The OSF detection and localization algorithm is implemented based on the dynamic response difference between the physical system and its DT. First, the OSF is detected and localized based on the grid current dynamics, where each switch fault generates a specific pattern in the current dynamics. OSF is tolerated by changing the switching function based on the location of the fault. Second, the voltage and current sensor fault is detected when the DT provides a specific amplitude of currents while the physical sensors do not provide a correct measurement. This case is tolerated by feeding back the grid currents or voltages from the DT as an alternative to the physical sensors. The proposed technique has low overhead, enhances the reliability of the power converter, and is applicable for sensorless mode of control. Experimental investigations are conducted to validate the proposed concept.


I. INTRODUCTION
A digital twin (DT) refers to a computer-generated copy of a tangible entity, such as a machine or a power converter.
The key benefit of a DT lies in its ability to simulate and evaluate the functionality and actions of the actual asset in the digital realm. This can provide several benefits, including the following. 1) Predictive maintenance: By simulating the asset's performance in a virtual environment, it becomes possible to predict when maintenance or repairs are needed, allowing for proactive maintenance and reducing downtime.
2) Improved design: A DT can be used to test and optimize the design of the asset before it is built, allowing for improvements in performance and efficiency. 3) Increased understanding: DTs can provide a detailed understanding of how an asset functions, which can be used to identify potential problems and improve performance. 4) Remote monitoring and cyber-physical security: DTs can be connected to the real-world assets, allowing for remote monitoring, cyber-physical security, and control of the asset. 5) Cost savings: By using a DT to cosimulate and analyze the performance of an asset, it is then possible to reduce the costs associated with testing, maintenance, and repairs. DT is an emerging technology that is being increasingly used in many fields, such as monitoring systems, 3-D models, Internet of Things, transfer learning, artificial intelligence, distributed computing, mobile communications, augmented reality, virtual reality, and electronic sensors [1]. Recently, DT has become widely used in smart grid applications in general and for power electronics converters in particular [2], [3], [4] and [5]. DT has been used as a replica of a modular multilevel converter in [2], where the DT was implemented on a real-time controller and served as a hardware-in-the-loop simulator. In [3], the DT was employed for the fault diagnosis approach for a distributed photovoltaic system connected to a dc-dc power converter. The difference between the DT outputs and physical measurements is analyzed to generate an error residual signal that can be used to judge the state of operation of the system. DT was also used for online diagnostics of power converters [4], where the behavior of the physical converter is continuously compared with the behavior of the DT to make sure that the physical converter is working well. However, this method only indicates if the converter is working well or not and does not provide any details about the type or location of the fault. In [5], the DT was designed using the particle swarm optimization algorithm, and it was also used as a replica of a buck dc-dc converter for observing the degradation trends of the physical components, such as capacitors and power switches. To sum up, DT is used in power converters as hardware-in-the-loop simulator, for system monitoring, tracking passive component degradation trend, and as an indicator for the power converter's state of operation. However, DT has not yet been utilized as a fault detection, fault localization, and fault-tolerant control technique.
Fault detection and fault-tolerant control become requirements in the industrial power converter applications where reliability is crucial. In general, power converters are exposed to multiple possible faults that threaten the operating system's reliability. Most of these faults occur due to the power switches, as they are fragile components and may fail due to transient currents or voltages. The failure of a power switch causes higher currents to flow through the circuit and through the other switches, which may cause a fatigue failure in the entire system. Sensor faults are also common in power converters, which occur usually due to the harsh environment (high temperature and humidity), surrounding electromagnetic fields, and possible attacks [6]. Sensor faults deteriorate the response of the control process, leading to multiple severe problems, such as high steady-state errors, decreased power factor, and deteriorating power quality.
Therefore, the availability of the system and the control algorithm to operate in the case of switches and sensors is essential from a reliability point of view. Therefore, fault detection and fault-tolerant control become essential requirements for reliability enhancement.
In the literature, different methods were proposed to detect and localize such faults. For example, an open-switch fault (OSF) was detected and localized using the online machine learning algorithm (OMLA) [7]. However, OMLA is difficult to implement on an embedded system or a low-cost microcontroller. Total harmonic distortion (THD) [8] and current distortion [9] are among the most widely used methods to detect and localize the OSF. In fact, the computation of the distortion or the THD of three-phase currents is timeconsuming and requires high-speed and high-accuracy data acquisition. This increases the complexity and cost of the fault detection system. In [10], the fault-assumed strategy was used for OSF detection, where the computed voltage based on the switching states and the fault-assumed-based voltage are compared and analyzed to detect the OSF. However, the measurement or estimation of the poles' voltages is required for this method. Therefore, either extra three sensors are required or the complexity and computational load will increase due to the complexity of the pole's voltage estimation. In [11], the phase angle value was combined with the instant when the grid current was zero to pinpoint the fault. This method requires fast and real-time current measurements to detect the correct instant when the grid current is zero. Missing the zero-current instant will cause the fault detection to be delayed until the next cycle, or the results of the detection will be incorrect since distinct switch faults have slight phase angle variations.
For sensor fault problems, multiple sensorless control and state estimation methods have been investigated for grid voltages and currents [12], [13]. One of the most popular methods for grid voltage estimation is virtual flux (VF) [14], where the VF vector is constructed using an ideal integrator. However, in practical application, the dc drift and the initial bias are the main limitations of a pure integrator. These problems are usually addressed by using low-pass filters or second-order generalized integrators. However, a long delay may occur during the transient process (like startup or a sudden voltage change) if these filters are employed in an open-loop estimator. State feedback observers (SFO) [15] and the Luenberger observer [16] can also be used for grid voltage estimation, which have a closed-loop estimator, unlike VF. However, SFO completely depends on the mathematical model (state space) of the system, and any uncertainty in the model's parameters will deteriorate the accuracy of the observer. Moreover, a sensor-fault-tolerant method is proposed in [6] for both current and voltage sensors based on the Kalman filter algorithm (KFA). KFA was employed to estimate grid voltages based on the available current measurements and vice versa. However, KFA suffers from parameter initialization, high starting overshoot, and error variance and covariance matrix selection. Sliding-mode observers are rarely used for grid voltage estimation [17] as they are exposed to high-frequency chattering, especially under abnormal conditions, such as unbalanced and distorted grid voltages. On the other hand, a load current estimator is proposed in [13] based on the rectifier's mathematical model. However, this method requires measurements of both grid voltage and current to estimate the load current on the dc side. A look-up table was employed in [18] to perform current sensorless control. Despite the fact that the look-up table has a simple structure and is compatible with low-cost microcontrollers, it is not suitable for fast-dynamics applications that are exposed to noises and disturbances. Current reconstruction and mathematical-model-based compensation methods are widely used for current sensorless control [19]. However, these methods depend on determining the exact mathematical model, which is difficult to obtain in a practical application. Therefore, the estimation error is the main limitation of such methods, especially under the existence of noises and uncertainties. All of the mentioned problems can be overcome by using DT-based fault detection and fault-tolerant techniques.
Machine learning (ML) and deep neural networks (DNN) have been used in many fault detection and system modeling applications [20]. Recurrent neural networks (RNN) are one of the most common ML methods that offer internal memory in their neurons. This is helpful when the application considers past events in the prediction, like in time-series problems [21]. Convolutional neural networks (CNNs), on the other hand, are often used for two-dimensional inputs, like images, but also with a single-dimensional variant [22]. However, CNN has no memory of past events. Temporal convolutional networks combine the ideas of RNNs with a single-dimensional CNN, offering even higher performance [23]. One major issue with all the aforementioned methods is the high computational complexity. For the model to be applicable in the proposed application, it needs to be deployed on a low-cost microcontroller and to function with minimal time overhead. Unlike the previously mentioned DNNs, basic dense, fully connected DNNs can be built to fit in a computationally limited device while offering relatively accurate predictions, which are used in this work.
Existing fault-tolerant control techniques in the literature have major limitations in the realm of OSFs and measurement sensor faults. These limitations include high computational power, complex designs, reliance on costly redundant components, compatibility with only specific types of faults, the need for additional sensors, high-cost measurement acquisition systems, and dependence on precise time measurements during zero-current instances. Consequently, these limitations restrict the applicability of such methods in industrial applications, where low-cost microcontrollers are typically employed.
Hence, it becomes imperative to develop a unified algorithm that enables systems to detect and tolerate OSFs, voltage sensor faults, and current sensor faults and facilitates sensorless control of voltage and current. Furthermore, there are other important objectives to be achieved, including grid current regulation, dc-link voltage control, balancing of dcside capacitors, enhanced power quality, minimized tracking error and overshot, and increased robustness against parameter discrepancies, as well as resilience against weak grid conditions and abnormal grid situations. Consequently, the motivation behind this article lies in introducing a comprehensive solution that addresses all of these challenges collectively. The proposed algorithm relies on the principle of the DT, which acts as a replica of the physical system under normal conditions. This article proposes novel DT-based methods for OSF detection and localization and grid voltage and current sensor fault tolerant control. These methods are applied to a threelevel, three-phase T-type rectifier as a case study. The proposed methods have the advantages of simplicity, lower computational burden, applicability for low-cost microcontrollers, comprehensiveness against all kinds of faults, reliability, and higher accuracy. Moreover, the proposed sensor-fault-tolerant algorithm is applicable for both voltage and current sensor faults. The currents generated from the DT are used as alternatives to the current sensors in the case of current sensor faults, whereas the inverse of the DT is used to estimate grid voltages in the case of voltage sensor failure. Finally, the proposed OSF detection algorithm can detect and localize the faults within a short period (10 ms). The main contributions of this article are summarized as follows.
1) Novel design of a DT for a three-phase three-level Ttype converter: The DT is designed offline to minimize computation time and is further enhanced online to improve the efficiency and reliability of the proposed solution. 2) Novel design of OSF diagnosis and fault-tolerant control: This method provides the advantages of simplicity and eliminates the need for additional components, such as redundant switches or extra sensors. It exhibits a rapid response, enabling the rapid detection, localization, and tolerance of faults. 3) Novel design of voltage and current sensor fault diagnosis and tolerant control, including sensorless control: This method significantly enhances the reliability of the entire system when sensor-fault-tolerant control is employed and reduces the system's costs when sensorless control is implemented.

II. MODELING, DT DESIGN, AND CONTROL OF T-TYPE RECTIFIER A. MODELING AND DT DESIGN
The circuit diagram of a T-type rectifier is shown in Fig. 1(a). It consists of three legs connected to the grid through an input filter that has inductance (L g ) and resistance (R g ). The ac-side dynamics for this topology is given as follows: where V abc , I abc , and U abc are the grid voltage, grid currents, and the rectifier's input voltage, respectively. SXY represents the gate of each switch, where X ∈ [1234] and Y ∈ [ABC].
Equation (1) is used to provide the initial model of the DT, as shown in Fig. 1(b). The DT receives the physical measurements of the rectifier's inputs, namely grid voltages (V abc ) and the control signals (U abc ). These measurements are then used to compute rectifier's outputs, namely grid currents (I abc ) and the dc-link voltage (V dc ). Initially, the values of passive parameters are set by default to 1 mH, 1 m , and 20 for the input filter inductance, input filter inductor's resistance, and the load resistance, respectively. Then, these parameters are updated using ML techniques. When the ML model is trained, the obtained model is used as a DT for the T-type rectifier.
To train the ML model, data have to be first collected from real hardware measurements. A lab-scale experimental setup was used to collect 81 561 measurements while varying the load and the reference dc voltage (V * dc ). V dc , I abc , V abc , and U abc were collected from the controller and used to build the dataset. The collection of the data is performed using the STM Studio software, which communicating with ST-Link compatible hardware for debugging the code on the microcontroller. Measurements gathered from the sensors are stored on compile-time-defined addresses on the microcontroller's memory. These memory locations are accessed at run-time using the STM Studio debugger and are stored as log files. To vary V * dc , the memory address of V * dc is set to be writable from the debugger and is changed at different times. To vary the load, a programmable load is used with a wide range of different values. After the data collection step, the log files generated from the STM Studio are parsed and combined to build the dataset.
The dataset is processed to train a fully connected dense DNN model, as shown in Fig. 2. The model is composed of three hidden layers, a 6-unit input layer, and a 4-unit output layer. The number of units in the input and output layers is chosen to reflect the proposed DT model inputs and outputs. Given the proposed fully connected architecture, the model manages to predict I abc and V dc accurately with minimal computational time.
The ML model is trained offline and updated online using the TensorFlow library on a local PC and then deployed on a low-cost microcontroller using TensorFlow Lite Micro (TFLM). Unlike typical DNN-based systems, the trained model is optimized and compiled to low-level machine code with TFLM. The generated model occupies approximately 30 KB of the microcontroller's flash memory, and the inference of a single instance takes around 7 μs. Furthermore, the measurement acquisition process requires 2-4 μs, whereas the control algorithm itself requires nearly 3 μs. These characteristics make the proposed ML model highly suitable for integration into the control system, as it does not excessively consume the limited available hardware resources specified for the system's operation.
To ensure optimal training of the ML model, the collected dataset is divided into 80% for training purposes and 20% for validation. Following 100 epochs of training, the mean absolute error for the validation data reaches 0.7. The validated predicted curves are compared with the corresponding physical values, as depicted in Fig. 3(a) and (b) for the steady state and Fig. 3(c) and (d) for the transient period.
To evaluate the accuracy of the trained model, the mean square error (MSE) is computed over a single cycle. During the steady state, the training MSE error amounts to approximately 0.09 A for the grid currents and 0.93 V for the dc-link voltage. However, during transient periods, the MSE temporarily increases to 0.23 for the grid currents and 2.75 V for the dc-link voltage. This increase is attributed to the fact that the DNN model reacts slightly faster to changes compared to the physical system, due to the dense nature that lacks memory of past events.   The training process of the dc-link voltage is validated using multiple voltage levels, as demonstrated in Fig. 4. The MSE over the entire period amounts to 0.57 V. From a perspective standpoint, the mean absolute percent error remains at 0.85% in the worst-case scenario during the transient period, specifically during the voltage transition from 90 to 100 V. This indicates that the proposed ML-based DT model is capable of accurately predicting the dc-link voltage and grid currents. Finally, Fig. 5 shows the online validation of the designed DT compared to the physical measurement. It should be noted that the proposed DT can accurately simulate the response of the physical system in real-time.
Moreover, based on the error between sensor measurements and DT predictions, the model is updated online. This is done by considering the difference as a new state ( x). The objective of the online updating is solely to minimize x using a linear quadratic regulator (LQR). LQR is an optimal controller that is specifically used to force a specific state to diverge to zero. To this end, the outputs of the DT after the online updating can be represented as follows: where u v = −k V abc , u i = −k I abc , and u d = −k V dc , with k being a positive gain, which can be computed using the Riccati equation.

B. CONTROL AND REFERENCE CURRENT GENERATION FOR T-TYPE RECTIFIER
The control process of multilevel rectifiers typically aims to achieve the following three main objectives: 1) regulation of the dc-link voltage, 2) regulation of grid currents; 3) regulation of dc-side capacitor voltages. Various controllers have been proposed in the literature to accomplish these objectives [24]. Among these methods, the sliding mode controller (SMC) stands out due to its notable advantages, including simplicity, reduced number of tunable variables, shorter computational time, and robustness against parameter variations. As a result, in this study, the SMC is adopted as the chosen control strategy, given its favorable attributes and suitability for addressing the control requirements of the multilevel rectifier. Based on the principle of power balance between input and output, the relationship between the ac and dc sides can be written as follows [25]: where V d and I d are the d-terms of grid voltage and current represented in the dq frame. The input power is written as a function of the d-term only, as the q-term will be almost zero if the controller is well designed and the source grid is operating in normal conditions. To fulfill the first objective (dc-link voltage regulation), the reference currents (I * d ) must be generated such that they ensure the divergence of V dc from the reference dc-link voltage (V * dc ). As a result, (3) can be written as a function of the reference signals Then, the grid currents can be controlled using SMC [26] by selecting the sliding surface based on the error of grid current tracking as follows: S abc = I abc − I * abc (5) where The sliding surface of (5) ensures the divergence of the current tracking error to zero, which represents the second objective. To fulfill the dc-side capacitors' voltage balancing requirement, it is worth selecting the control law as a function of the selected sliding surface and the difference between the dc-side capacitors' voltages ( V c ) as follows: where k is a 3 × 1 symmetrical-positive constant gain.

A. OSF DETECTION
During normal operation, the current measurements and the currents obtained from the DT are almost the same, and the error between them ( I abc ) approaches zero. During the OSFs, each switch generates a specific and repeatable pattern of grid currents, as shown in Fig. 6. The main switches (S1A and S4A) slightly affect the grid currents of the physical system, and small I abc appears. In contrast, the secondary switches (S2A and S3A) deteriorate the quality of the grid currents, and a huge I abc appears. It can be noticed from Fig. 6(a) that I abc approaches zero during the normal operation. However, when a fault occurs in S1A, the negative error peaks appear in phase A. Similarly, S4A fault slightly increases the positive error peak of phase A, S3A significantly increases the negative error peaks of phase A, and S2A significantly increases the positive error peaks of phase A. Moreover, the same sequence is obtained for the other phases. Therefore, it can be concluded that each OSF will increase the current error of its phase in a specific pattern. The obtained patterns are summarized in Table 1, where (L + ) represents the location of the maximum positive error peak and (L − ) represents the location of the minimum error peak. The obtained patterns for each OSF scenario convert the problem of OSF detection and localization into a simple linear comparison. Once the OSF is detected and localized, multiple methods can be used to perform tolerant control, such as the one presented in [27]. Normally, the T-type converter is operated using the switching function shown in Fig. 7(a). Once the OSF is detected and localized, an alternative switching function is used to tolerate the fault. If the OSF is detected in the secondary switches of the ith leg, the gate signals of the secondary switches will be deactivated, and the main switches will be driven using the switching function shown in Fig. 7(b). Finally, if the OSF is detected in the main switches, the main switches signals will be disabled, and the secondary switches will be operated by the switching function shown in Fig. 7(c). The flowchart of OSF detection and localization is shown in Fig. 8.

B. SENSORLESS CONTROL AND SENSOR FAULT TOLERANCE
The designed digital twin can be used for the sensorless control in case of the decision to have the sensorless mode to be the only solution. At the same time, the DT can be used and integrated with physical sensors to provide the required feedback signals in the case of sensor failure. The first solution would provide significant benefits, such as adaptability to the environment, lower cost, and reduced space requirements, whereas the second one increases the reliability of the controlled system. Normally, the inputs of the physical system (V abc and U abc ) are applied to the DT, which then provides an estimation of the physical system's outputs (I abc and V dc ). Therefore, the outputs of the DT can be used for current sensorless or fault-tolerant control, as shown in Fig. 9(a). In this case, the DT continuously receives the voltage measurements and the   Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. control signal, computes the corresponding grid currents, and directly feeds them to the control law. On the other hand, if current measurements are available and healthy, the inverse of the DT is activated. In this case, the DT receives outputs of the physical system and provides grid voltages, as shown in Fig. 9(b). The estimated grid voltages are used with the phaselocked loop function [28] to estimate the phase angle. Finally, the flowchart of sensor fault detection is shown in Fig. 9(c). Measurements from the sensors are collected and compared with the DT outputs. If the voltage difference ( V abc ) between the voltage measurement and the DT-estimated voltage is larger than a specific threshold value (T max ), then the voltage sensors contain false or high noise. Therefore, the estimated grid voltage vector will be considered feedback instead of the physical measurements. Similarly, if the current difference ( I abc ) is larger than T max , the system will consider the estimated current vector as a feedback signal.

IV. EXPERIMENTAL RESULTS
The experimental implementation of the DT, OSF diagnosis, sensorless control, and sensor fault tolerance was conducted using the STM32H745 microcontroller. This microcontroller, known for its cost-effectiveness, features a dual-core architecture comprising the H7 and M4 cores. The control loop, fault-tolerant algorithms, and grid synchronization functions were implemented on the H7 core. On the other hand, the M4 core was responsible for the offline DT model, online updating of the DT, and measurement acquisition. This division of tasks between the two cores optimized the utilization of resources and facilitated the efficient execution of the proposed methodologies.
The proposed methods are applied to a lab-scale T-type rectifier, as shown in Fig. 10. The setup consists of an MX30 grid emulator to provide the input power, an L-input filter, a T-type rectifier, a Tektronix oscilloscope, and a programmable electrical load (Chroma 63084). All parameters used in these experiments are shown in Table 2.

A. OSF TOLERANCE: EXPERIMENTAL RESULTS
The first experiment shows the response of the proposed OSF detection and tolerant algorithm. Fig. 11(a) shows the response of the system under healthy conditions. It can be noticed that the grid currents are sinusoidal and in phase with the grid voltages, which means a unity power factor is obtained. Then, an intentional OSF is applied to S2A using a manual switch, and the results without and with fault-tolerant control are shown in Fig. 11(b) and (c), respectively.
It can be noticed that the response of the system deteriorates when S2A OSF exists. The currents increase, become out of phase with the grid voltages, and become highly distorted. Moreover, the ripple of the dc-link voltage dramatically increases. However, when the fault-tolerant control is enabled, the proposed algorithm allows the system to operate safely and satisfactorily.
The quality of grid currents is restored, the ripples of the dc-link voltage have vanished, and the unity power factor is restored. Similarly, the results of S3B OSF are shown in Fig. 11(d) and (e). For both faults, the detection and tolerance of the faults are done very fast, within 8 ms. Moreover, the algorithm was validated for all 12 switches, and the same results were obtained. However, only the results of S2A and S3B were added to avoid paper overlength.

B. SENSOR FAULT TOLERANCE: EXPERIMENTAL RESULTS
The proposed DT-based fault-tolerant control is validated under voltage and current sensor faults. This experiment is done by disconnecting the sensors during the online operation of the physical system. Fig. 12(a) shows the response of the physical system when the voltage sensors fail, whereas Fig. 12(b) shows the response when the current sensors fail. When the voltage sensors fail, the grid currents are slightly affected for a short time (<1 ms). This time represents the transient period between sensored and sensorless control. However, the quality of the grid currents is restored immediately after enabling the inverse of the DT. Similarly, when the current sensors fail, the DT is able to provide real-time current feedback and feed them to the control algorithm. It can be noticed that the current sensor faults are detected and tolerated within 0.2 ms, which can be considered one of the fastest detection algorithms. In both cases, the dc-link voltage is almost not affected and remains constant all the time.

C. SENSORLESS CONTROL WITH SEVERE PARAMETER UNCERTAINTY: EXPERIMENTAL RESULTS
To demonstrate the robustness of the proposed techniques against parameter uncertainty, two experiments were performed under highly uncertain conditions. To further enhance the level of challenge, these experiments were conducted in voltage sensorless control mode.
In the first experiment, a sudden doubling of the load was induced by reducing the load resistance from 50 to 25 . The outcomes of this experiment, illustrating the results obtained from the sudden load change, are presented in Fig. 13. VOLUME 4, 2023 239 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. Upon doubling the load, the dc-link voltage experiences a drop of 6.25%. However, this voltage drop is rapidly compensated within 10 ms, exhibiting minimal overshoot or ripples. Likewise, the grid currents promptly and smoothly adjust to the new load conditions. Although a slight amount of overshoot temporarily occurs due to the significant level of uncertainty in the model, the grid currents converged swiftly to their correct values, benefiting from the online updating of the DT.
Considering that capacitors are vulnerable components in power electronic systems, prone to rapid degradation or even complete failure, it is crucial to assess the effectiveness of the proposed methods under such severe conditions. In order to demonstrate the effectiveness of the proposed techniques, the dc-side capacitance is reduced online from 2200 to 1100 μF experimentally without changing any parameter in the DT or the SMC. The results obtained from this experiment are depicted in Fig. 14. It can be observed that the grid currents remain largely unaffected by the capacitance change, whereas a minor ripple emerges in the dc-link voltage with a magnitude of V rpp < 2%. It should be noted that despite the significant alteration in capacitance, the ripple of the dc-link voltage remains within the limits set by international standards.
These experiments serve as compelling evidence of the validity and robustness of the proposed DT-based sensorless control approach in dealing with severe parameter uncertainties and sudden changes in the system.

V. CONCLUSION
A novel fault detection and fault-tolerant control method was proposed in this article for a three-phase T-type rectifier based on DT technology. The proposed method was able to accurately simulate the dynamic behavior of the T-type rectifier in addition to its ability to provide detailed information and feedback signals of the physical system. The proposed DT, fault detection, and fault-tolerant techniques were designed, analyzed, and implemented on a lab-scale prototype to show the validity of the proposed method. The obtained results showed the correctness and high-speed response of both the proposed fault detection and fault-tolerant control. OSFs were detected and tolerated within 8 ms, whereas the sensor faults were detected and tolerated within 0.2 ms. Moreover, the proposed method is applicable for many kinds of power converters, including ac-dc converters, dc-dc converters, and dc-ac converters for both two-level and multilevel converters.