Predictive Maintenance of Power Converters using Simulated Data
Overview
Power converters are the backbone of modern industries, enabling efficient energy conversion and distribution. In this session, we explore how to model a power converter in Simscape Electrical that can simulate faults and aging. This synthetic data is used to build a predictive maintenance algorithm that can detect faults and estimate remaining useful life, enabling enhanced performance, reduced downtime, and better maintenance strategies. Whether you work in renewable energy, manufacturing, utilities, or other industries that apply power electronics, understanding power converters is crucial for ensuring reliable and sustainable operations.
Highlights
- Modeling and simulating a power converter system using Simscape Electrical
- Generating synthetic voltage and current data to represent IGBT aging
- Automating feature engineering using the Diagnostic Feature Designer
- Integrating custom domain-specific features
- Training a machine learning model to detect and isolate faults, and predict their severity
- Deploying predictive algorithms in operational systems or edge devices
About the Presenters
Rahul Choudhary is a senior application engineer at MathWorks specializing in System Modeling and Control Design. He has over 9 years of experience in power electronics control, motor control, multi-domain modeling, and real-time simulation. Before joining MathWorks, Rahul worked with Eaton India Engineering Centre as a Control Engineer where he was involved in developing prognostics and health monitoring algorithms for proof-of-concept projects for their electrical business using MATLAB and Simulink. He holds a master’s degree in Systems and Control Engineering from Indian Institute of Technology Bombay, Mumbai and a bachelor’s degree in Electronics and Instrumentation Engineering from Institute of Engineering and Technology, Lucknow, India
Sammit Jain is an AI Application Engineer at MathWorks. He works with Engineers and Scientists across India, helping them develop and deploy AI systems using MATLAB. He has a special interest in using Machine Learning and Deep Learning techniques to solve complex problems in medical imaging, computer vision, and Natural Language Processing (NLP). Prior to joining MathWorks, he worked on Bioimage Analysis and Spine segmentation techniques during his time as a research fellow at Institut Pasteur, Paris. He has a Master’s in Mathematics and a Bachelor’s in Electrical and Electronics Engineering from Birla Institute of Technology and Science (BITS) Pilani – Goa
Recorded: 21 May 2024
Hello, everyone. Welcome to this webinar on predictive maintenance of power converters using simulated data. My name is Rahul and I'm part of MathWorks application engineering team focusing on electrification segment. This includes modeling, simulation, and control design of electrical systems.
Today I'll be doing a roleplay, where I'll be playing my own role as a power electronics engineer to bring domain expertise to the problem we are going to solve. Along with me, I have my colleague Sammit, who is also from application engineering team. Sammit, why don't you introduce yourself.
Hey, thanks, Rahul. Hi, everyone. I'm Sammit, an application engineer at MathWorks. And I spend my time working on data science and AI problems with scientists, researchers, and engineers across multiple industries, like medical devices and oil and gas.
Today I'll be focusing on predictive maintenance using AI and I'll be playing the role of a data scientist who works with Rahul but coming back to the topic of power converters.
Thanks, Sammit. So let's start with the agenda for the session today. First, we are going to see how we can use Simscape to model a power converter and simulate its aging and generate simulation data and then use this data to interactively build predictive algorithms. Then enhance the accuracy of these predictive algorithms by incorporating some domain expertise. And, finally, deploy these algorithms either on the edge devices or on the cloud to make predictions for newer data. Eventually, we would like to develop a dashboard where we can incorporate signs of aging on the power converters and idea is to detect these changes with the help of these predictive algorithms.
So before we move forward, I would request Sammit to tell us more about maintenance. Sammit, over to you.
When it comes to maintenance, we see a few different flavors in the field. One could go for maintenance once there's failure. For example, you know, replace a car battery once it fails. This is reactive and it could open you up to unexpected failures, which are expensive and potentially dangerous.
You could go for maintenance at a regular rate at a scheduled interval, but unnecessary maintenance can also be wasteful and you might still see some failures which are a bit more unexpected. The more optimal strategy often is to go with predictive maintenance, which involves gathering smarter insights about your machine and forecasting when problems are going to arise so that you can choose an optimal time for your maintenance.
Now, we have a number of customers building predictive maintenance algorithms for various industries, using both field and simulation data, from transformers and compressors all the way to Coca-Cola. I'll leave the links here for your reference.
But more specifically a predictive maintenance algorithm can help us answer a few questions about our machine based on, let's say, some sensor data that we're getting from the field. The first kind of question can be is my machine operating normally? It falls into a category of a yes or no binary answer. So it's an anomaly detection a problem.
Now, there are a lot of things that could go wrong in a complex device, for example, even a power converter. So I'm more interested in understanding why is my machine behaving abnormally? And this falls into a category of fault classification or fault detection.
A third and often a more challenging question to answer is how much longer can I operate my machine? Now, this falls into the category of Remaining Useful Life estimation, also known as RUL. And before we see how all these three questions can be answered in the context of our converters, let me first go back to Rahul and see what goes on inside one.
Thanks, Sammit. Why power converters? So power converters are enablers of advancement of electrification across various industry segments, be it transportation, consumer electronics, energy production, or medical devices. These converters, they efficiently convert electricity into different forms suitable for transmission, storage, or consumption by electrical loads, such as motors.
Now, imagine if these converters or part of these converters fail. They can bring the entire system down. Detecting failure of these converters is one thing, but what we want to do today is to detect some precursors, some early signs that would lead to failure of these devices, and, hence, prevent unexpected downtime of these systems. Now, let's understand why power converters fail.
So power converter is made of different components, such as semiconductor devices, electrolytic capacitors, and other passive components. The two main cause of failure for power converters or leading cause of failures for power converters are semiconductor devices and electrolytic capacitors. Today we are going to focus on semiconductor devices. But if you are interested in understanding the failure mechanism and detecting remaining useful life of electrolytic capacitors, then we have a very good shipping example which you can explore. Now let's focus on failure precursors of IGBTs.
What changes an IGBT is going to see when it is going to age? So there are different parameters of IGBTs which are going to change as they are going to age. And these changes are-- one is in threshold voltage, so the voltage at which device is going to be on. The second one is transconductance, which is a ratio of output current by input gate voltage. And third one is V CE on or on-state resistance.
In the context of a power converter, the precursor which is going to be most significant is V CE on or on-state resistance. In the literature, we have seen that V CE on or on-state resistance is somewhere going to change from 20% to 25% when device is going to reach at its end of life. Even though the number 20%, 25% looks significant-- but when you think from a systems point of view where the failure is going to happen at the IGBTs or the sign of aging we are going to see at the IGBTs and its impact can be seen only on the output voltage and current waveform measurement noise or presence of other passive components, such as harmonic filter. And they can basically dilute this sign of aging and make it harder for us to detect.
Now, to understand the impact of all these components on the sign of aging, what we can do is create a simulation model of a power converter and then try to do different what-if scenario simulation to generate the data and verify our understanding. And for that we are going to use a tool called Simscape.
Simscape is our physical modeling tool and it allows us to model and simulate electronic system, mechatronic system, or electrical power system. What do I mean by physical modeling tool? It means if you have a schematic of your system, you can quickly convert that schematic into a working simulatable model where we can simulate different what-if scenario and generate synthetic data to verify our understanding of the system. Now let's see how we can quickly create a power converter model in Simscape.
So this is a power converter model developed in Simscape electrical, where we have different components which you would typically find in a power converter. So the first subsystem is the inverter subsystem, where we have a three-phase inverter made by six IGBTs, two for each phase. And if we double click on these IGBTs, there are different parameters which we can change. So, in this case, we are going to change on-state resistance of the device and then generate the data.
There are other components which are part of this three-phase inverters, such as the LC filter to remove the high frequency harmonics-- the impact of high frequency harmonics from the inverter to the load side. And then we are measuring the three-phase voltage and currents and also simulating a load, which is connected to this power converter. Along with these components, we also have model the control algorithm, a voltage regulator, which is going to regulate the voltage of the power converter irrespective of changes on the load side.
Now, to generate the data out of this model, I can write a simple script where I'm going to individually change on-state resistance of these devices and then store the data in a file format for further processing. The other approach what we can follow is I can go to the simulation tab and then click on this multiple simulations and I can set up how I'm going to vary the parameters.
So here I have already configured where I'm going to vary on-state resistance of all six IGBTs in a sequential manner and going to store the data. Now, I can click on this Run All. It is going to run through different scenarios and going to store the data, which I'm not going to do because I have already done that and plus this activity is going to take some time.
Once the data has been generated, I can write a simple script where I can basically classify the severity of aging of these IGBTs based on the change in on-state resistance. So what I have done here is basically I have used this multiple simulation capability to generate synthetic data of the IGBT and then use a small script to basically label these data.
So, for example, if the change in on-state resistance is less than 5%, I'm classifying that as healthy condition. When the change is between 6% to 11%, I consider that as a mild sign of aging. And, similarly, if it is more than 11% and less than 18%, the device is showing a moderate sign of aging. And any number which is more than 18%, I'm considering that as extreme sign of aging. These thresholds I have decided based on my understanding of the system. And based on your converter or your topology, you can change these thresholds and basically define the healthy, and mild, moderate, and extreme sign of aging.
Another thing which I did after generating this data-- I took this data to Simulink Data Inspector just to do a quick comparison between, let's say, a healthy scenario or when device is showing some sign of aging. And as you can see between these three waveforms, the difference is negligible. Just by looking at these three waveforms, I'm not able to make any difference out of it.
However, if I go to the compare tab of Simulink Data Inspector, just to compare between, let's say, a healthy scenario versus when device is showing some sign of aging, I do see some difference. And if you look at the magnitude of these waveforms-- so for a voltage waveform of 300 volts, the difference between the healthy and device with some sign of aging is merely a 0.1 or 0.15 volt. And definitely these differences are very hard to detect just by using some thresholding technique. So we need to work on some kind of algorithm to differentiate between the healthy data and the data when device is showing early sign of aging.
So I'll go back and look through some literature. In the meantime, I'll request Sammit to explore this data and see if we can fit some kind of predictive algorithm to differentiate between these different severity of aging. Sammit.
Hey, thanks, Rahul, that was impressive. So now that I have some data to work with, let me walk you through a typical workflow when designing a predictive maintenance solution. Now, this also maps reasonably well to what is recommended for designing an AI system.
There are four steps. We start with acquiring data, either from the field or from simulation, as we did today. Next, we clean and preprocess data, taking care of noise, outliers, et cetera. The third and usually the most fun part is to then build a model that learns from our data and is able to make predictions on new data. Finally, we take this algorithm, deploy it to the field, maybe on hardware or on the cloud, the end result being that when you get some new current or voltage readings from a power converter, you can predict how severely the power converter may have aged.
And remember that, for the most part, this is an iterative process. So we keep on adding new data and keep refining our models based on data from the field.
All right, so let's jump into MATLAB. I have the data set here in my workspace and I see V a, V b, V c, and I a, I b, I c readings from multiple power converters along with the aging severity level of that device-- Healthy, mild, moderate, or extreme signs of aging.
This is a table of tables. So if I look into one of these, I can see that these are either current or voltage readings sampled at a specific frequency. And this quick plot also confirms the same.
To capture features from these current and voltage values, I'm going to use the Diagnostic Feature Designer app. And you can see I use it frequently because I have it marked as one of my favorites here. I'm going to start a new session here and point it to my data set in the workspace.
Now, as for data loads, you'll see that it has accurately picked up various signals, along with the aging severity level, which is a condition variable here that basically describes the health of my device. I'm going to start with some quick visualization here by selecting V a, V b, V c signals and tracing them. Let me plot them on separate axes and also group them by the aging severity.
We could see again that the different aging levels cannot be discerned just by looking at them because they seem to overlap each other extremely well. So it's going to be a bit challenging. Now, to get some information out, I'm going to extract a few features out of these signals.
You typically start with an understanding of what filters or features make sense for your data, including maybe some information hidden in the frequency domain. I'm going to stick to basic signal statistics today. But just in case you have more advanced techniques you want to try out, you can do that here and even bring in bring in custom MATLAB algorithms that you've written previously.
Now, as I select signal features, I can see multiple features like mean value, standard deviation, kurtosis, all the way to signal-to-noise and distortion metrics. I'm not sure which ones might come in handy, so let me just select all of them for now. And I'll also make sure I select all the signals available to me and hit Apply.
Now, instead of me having to write code for calculating all of these metrics, right now MATLAB is calculating these 13 features for all of my current and voltage readings. Now, I can explore these features visually through histograms to see how well each feature is doing in separating out various aging severity levels, but let me just see all of them together in a table.
So I can see that all of these features are nothing but extra columns that have been added to my original data set. And I would like to make some sense of all of these 78 features. So maybe it's worthwhile to use this rank features button here. And I see there are two methods for multiclass feature ranking. So let me go with one of these here to see which features come out on top.
It looks like the V c signal to noise and distortion ratio comes out on top, followed by these others that you see here. And now that we have a sense of which features are more important in this context, it's time for me to take these out for further analysis.
Now, it's also important that I'm able to calculate these metrics, even for new readings from the field. So there's an option to generate the MATLAB function that will do this for you or even get an equivalent Simulink .
First, I'm going to actually just export these out to the workspace and let me go with the top 15 features for now. Now, in MATLAB, as expected, these features come out as additional columns to my original data set. And because I want to model my algorithm that figures out aging using these features, I can directly take these features into the Classification Learner app. I'm going to stick to the same top 15 ranked features and MATLAB is going to set up the Classification Learner for me with everything configured.
Now, I have my feature table set as the data set, which looks good. And the response that I'm eventually trying to model is the aging severity-- is also preselected. I'd already shortlisted my features here, so this looks good to go. But typically when building models, we set aside some data for validation and testing. You can configure those here, but I'm just going to go ahead with the defaults for now.
Now, as the Classification Learner loads our data, I see this 2D scatter plot that I can use to compare pairs of features and see how well they segregate various classes. This is helpful, but it's not looking like it's going to be straightforward. So let me look at some of the AI models that are available to me for classification.
Now, that's a lot of models. I see support vector machines, k-nearest neighbors, decision trees, random forests, and, towards the end, even some neural networks. So when I'm exploring new data, I generally let MATLAB do the hard work and let it train all models to give me a sense of which direction do I go in. And I also want to speed things up, so I'm going to make use of parallel computing to train multiple models at once.
Now, as the model starts training and learning how to use features to classify the aging level of these power converters, I can see that some models did not do well, but some others here actually did pretty well. So the k-nearest neighbors model here seems to give me more than 90% accuracy. So let me take a look at its confusion chart.
There are some extremely aged cases that got classified-- or misclassified, should I say, as mild or moderate. But, overall, I feel Rahul is going to be pretty pleased with these results and this accuracy. So I'm going to share a table of results with him and let me sort them by accuracy so it's easier for him to see.
Now, let's say after some tinkering we're happy with this KNN model, the next thing to do is to export out this model for making new predictions. Again, there are a bunch of different ways of doing that depending on whether you want to do it in Simulink or in the MATLAB workspace. What I'm going to do is I'm just going to export it out into MATLAB and I'm going to use this trained model to make new predictions using the predict function on, let's say, the old feature table that we had exported out.
So it spits out the aging severities of all those power converters we had in the table. And this is how we basically make predictions on new data.
Now, to get a better understanding of how good our model is we can actually test it against an external benchmarking data set. Or, more interestingly, the explain tab here can help us gain insights into how the model is making certain decisions. For example, the partial dependence plot here shows how an increasing value of the V a crest factor actually is decreasing the likelihood of it being classified as healthy.
So in building our predictive maintenance solution, we went through a bunch of different steps. So let me just recap them quickly for all of you here.
I started with some basic data preparation. So we looked at what our current and voltage profiles look like, which is nothing but actually these table of values sampled at some frequency. And we had multiple such tables. So we turned it into an ensemble data set, which is nothing but a table of tables. And what we tried to do was then answer a few questions by building AI models. So we can answer the question of whether a power converter is healthy or aged, what is the severity level of this aging-- healthy, mild, moderate, extreme-- and we can actually also go to the level of figuring out the localization of this aging, which leg of the device actually has this aging or maybe which phase.
Now, today focused on looking at the aging severity. But because all these other problems are also classification flavored, you can basically apply the same techniques that you saw right now.
The second thing that we did was extract features out of our data. And this was to be able to get some condition indicators out which can give us some link that can relate the current and voltage readings to the aging severity level of the power converters.
Finally, we took a look at different classification algorithms that are available to us. We were looking at classification specifically today, but there are other AI algorithms that you can use, depending on the kind of problem that you are solving. And to help make our lives easier. I actually use two apps today, the Diagnostic Feature Designer and the Classification Learner, to do things quickly.
Now, for all that hard work and the great accuracy, I decided to give myself a medal here. And let me check in with Rahul, if he's happy with the results that I shared.
These early results are very impressive, but I think if you add some of the practical scenarios, such as measurement noise to this data, then your accuracy might go a little bit down. And I'll be interested in knowing how your accuracy is going to change when you add these measurement noise in V a, V b, V c waveforms.
I have also worked on some technique from literature to overcome these challenges and I would like to walk you through that. So what I did-- I basically extracted the fundamental frequency component from this data because whatever sign of aging we are going to look, it is going to equally affect all the frequency components. So if you extract the fundamental frequency component from this noisy data, we are going to preserve that information.
And as you can see here, I'm extracting the fundamental frequency component for all three voltage and current waveforms. And then I'm using something called symmetrical component analysis, where we can break any three phase system into three equal components known as positive sequence, negative sequence, and zero sequence. I'm not plotting the zero sequence here, but essentially you can break any unbalanced three-phase system into three balanced system-- positive, negative, and zero sequence.
Now, any change which is going to affect all three phases equally or any change in a balanced system, such as change in your DC bus voltage or maybe change in the balance load, it is going to affect your positive sequence component, whereas a change which is going to affect only one phase or two phase, it is going to we can see its impact on the negative sequence component.
So, in our case, the sign of aging can be seen in our negative sequence component and, hence, we can consider this negative sequence component as one of the condition indicator for our case. So I'm doing this transformation where I'm converting these three fundamental components into positive, negative, and zero sequence component and then using this negative sequence component magnitude as one of the condition indicator.
Based on the current application, I have defined some thresholds. So for any change in the magnitude of negative sequence component, if it is less than 5%, I'm considering that as a healthy case. And, similarly, for other cases-- mild, moderate, and extreme-- I have defined these thresholds. And if I run this model, you can see it is accurately able to predict what is the symptom of aging in a particular IGBT.
So with this particular approach, I'm able to get almost 80% accuracy where algorithm is successfully able to differentiate between healthy IGBT versus aged IGBTs. Where it is getting little bit confused is when it is trying to differentiate between a mid severity of aging and high severity of aging.
Currently, I'm using only magnitude of negative sequence component. But if I incorporate effect of angle and other sequence component, then we can improve this accuracy further. So now I'm wondering if we incorporate these additional feature into your algorithm, how the accuracy is going to change?
That was interesting, Rahul. I hadn't considered the noise, as you had mentioned. So when I actually take noise into account, you're right, my accuracy actually does take quite a hit. So let me show you what that looks like in MATLAB.
So just as you mentioned, I wrote a small script to add some noise to mirror the sensor artifacts that we might see. And when I check the confusion chart for this sort of a model, the best accuracy that I'm doing is around 63% to 64%. I see that the confusion chart is also all over the place, so our AI algorithm isn't doing as well as it was doing with the noise around.
And the interesting thing that I saw here was some of the features that you had identified, so the sequence component analysis that you're doing in your signals. Maybe we can actually use those to get rid of the noisy artifacts, just as you mentioned. So before I actually even go further, let me give the medal back to you and let me see if I can do something further with my data here.
So what I'm going to do is I'm just going to bring in these new features that you've just identified. And instead of you having to put in the hard work of identifying these thresholds to classify the aging severity, why don't I add these features to the other signal statistics features that I was already calculating.
So if I take both of these together, let's see what I get inside the Classification Learner and the Diagnostic Feature Designer. So the first thing that I want to show you is-- and you are going to be pretty pleased with this-- is with these new features, I'm actually able to get to an accuracy of over 94%, 95%. And there's some confusion in the mild class, but this is actually even better than what we started with. So this looks good.
And what you are going to be even more pleased about is if I look at the ranking of the new features, which is a combination of my older features and the new custom features that you've added, your feature actually ranks on the very top. So there's a lot of information that this feature is perhaps contributing in making these decisions.
So I think at this point, the best strategy that we can go with is to split the metal between the two of us. And we realized that leveraging domain expertise for building a machine learning model is actually giving us decent results and even the best results in this case. And the strategy that we went with was combining the features that Rahul contributed from his domain expertise, along with the signal features that was calculating and letting the AI algorithm do the work in combining both of them optimally.
Now, one small note before we conclude our session is that all these algorithms that we built-- you can take them to the field by deploying them on, say, an edge device or on the cloud, depending on what may be needed. So, for example, because these features need to be calculated, you may not want to stream them all to the cloud, you can probably do some computing on the edge. So you can convert all the code that you have here to maybe some hardware level C+ code that can run on some specific device. And you can, in fact, put your model on an enterprise system or on the cloud for making predictions and even retraining the model when new data comes in.
To sum up, what we saw today is that Rahul showed us very brilliantly how we can generate power converter aging data using Simscape. In fact, we can model certain parameters that we do not even have access to in the real world. What this allows us to do is build models interactively for predictive maintenance. So I realize that did not actually write any line of code while doing our AI modeling.
What we also saw was that you can actually leverage domain expertise to enhance the accuracy of these models that you're building. And, finally, we saw how we can put these algorithms either on the hardware or on the cloud directly.
Now, if you're interested in exploring more such predictive maintenance problems, we have a bunch of different examples that you can use to look at various aspects of building a predictive maintenance algorithm. And the neat part is that you can actually reuse these examples as starting points for your own analysis.
So we also offer a two-day instructor-led predictive maintenance training, where we dive deeper into all these aspects that we talked about today. So in addition to training, if you have a specific predictive maintenance problem that you would like, one of the experts from our consulting team to look at, then you can reach out to us. And with this. I think we can move on to our Q&A session. And, once again, thank you for joining us today.