Significant innovation and advancements in electrical technologies are accelerating the energy transition from fossil fuels to clean energy and enabling the electrification of everything. Breakthroughs in power density and efficiency, improvements in reliability, and reduction of size and cost of electrical components provide engineers with a level of design flexibility that was previously unobtainable.
At the same time, higher adoption of renewables, decentralization of the energy infrastructure, increasingly electrified transportation systems, and the rising threat of power disruption due to climate change are new concerns to be addressed in the design and operations of electrical systems.
Applying artificial intelligence (AI) techniques is a new way to help engineers cope with these challenges.
You can integrate AI into the development and operations of electrical technologies to increase reliability and improve efficiency for applications ranging from motor control and battery management for electric vehicles to integrating renewable energy into the power grid. Examples of using AI-based techniques extend to:
- Reduced order modeling (ROM)
- Control strategies
- Virtual sensors
- Energy forecasting
- Predictive maintenance
AI is showing significant potential for:
- Reducing computational time in simulation.
- Characterizing unique components that are difficult to model using traditional techniques.
- Serving as an effective alternative to physical sensors
- Building high-performance controls of complex, nonlinear systems
Reduced Order Modeling
For workflows that require heavy computations, such as design exploration, you can use AI to create reduced order models (ROM) in place of the high-fidelity model of the original physical system, such as brushless motors. Some electrical components, such as power system equipment, have novel and unique characteristics that are hard to model with traditional techniques. AI-based ROMs help capture the essential behavior of these components and systems while significantly speeding up simulations.
With MATLAB® and Simulink®, you can use a first-principles, physics-based model built with Simscape™ or third-party FEM/FEA simulations to generate synthetic data for training an AI-based reduced order model. Simscape enables you to create models of physical systems within Simulink that include domains such as electrical, mechanical, hydraulic, and others. Simscape Electrical™ provides component libraries for modeling and simulating electronic, mechatronic, and electrical power systems.
The simulation results capture the system’s physical interactions. The AI-based ROM you train using these results will also reflect the system dynamics. Once you have a trained ROM, you can integrate it into a system-level model and use the ROM as an alternative to replace a more accurate but slower physical model in simulation.
For example, with Simscape, you can model a motor and motor shaft load and generate synthetic data by running simulations with the first principles, physics-based model. After obtaining training data, you can select from a variety of AI algorithms in MATLAB to train a ROM.
Depending on your modeling requirements, you can choose between traditional machine learning models (such as support vector machines, regression trees, or shallow neural nets) and deep learning models (such as deep neural networks) to strike a balance between accuracy, training speed, inference speed, and explainability.
After training is complete, you can then import the trained AI model from MATLAB and use it in Simulink. You can verify the performance of the AI model by comparing AI model outputs against test data generated from the physics-based simulation or real-world data collected from production.
Virtual Sensor Modeling
When implementing controls for electrical devices or systems, it is sometimes impossible or impractical to measure signals of interest with a physical sensor. In these scenarios, AI models are used to create virtual sensors to estimate critical signals.
For example, you can use AI-based virtual sensors to estimate the position, speed, and temperature of a motor and eliminate the need for physical sensors, such as a motor encoder or a temperature sensor.
With MATLAB and Simulink, you can use AI algorithms inside a Simulink model to predict key operating characteristics of electrical systems. For example, you can estimate the state of charge (SOC) and state of health (SoH) of a battery system. Battery SOC is critical information for the controls of a battery management system and must be accurately estimated to ensure reliable and efficient battery system operations.
Traditional methods based on the extended Kalman filter (EKF) algorithm usually require precise parameters and knowledge of the physical characteristics. In contrast, an AI method, such as using a neural network, is a data-driven approach that requires minimal knowledge of the detailed physics. In addition, AI-based methods provide a solution that has no recurring bill-of-material cost, is noninvasive, and has no maintenance needs.
After you have completed the modeling and validation of your AI-based virtual sensor model, you can generate optimized, production-ready C/C++ code with Embedded Coder® from the AI model and deploy the algorithm to a microcontroller.
Learn More
- Battery State-of-Charge Estimation in Simulink Using Deep Learning Network - Example
- Battery State Estimation Using Deep Learning (34:19) - Video
- Using AI to Estimate Battery State of Charge (SoC) (19:48) - Video
- Battery SOH and SOC Estimation Using a Hybrid Machine Learning Approach (13:38) - Video
- How to Estimate Battery State of Charge Using Deep Learning (4 videos) - Video Series
- Onboard Battery Pack State of Charge Estimation Using a Trained Neural Network (15:02) - Video
- Deploying a Deep Learning-Based State-of-Charge (SOC) Estimation Algorithm to NXP S32K3 Microcontrollers (34:09) - Video
Control Strategy
AI-based controls, especially those using reinforcement learning (RL) techniques, demonstrate some significant advantages over traditional methods. AI-based strategies:
- Promise high-performance controls of complex, nonlinear, multi-input multi-output (MIMO) systems.
- Require little prior knowledge of the physics of the plant.
- Apply widely to other complex electrical systems, such as energy storage systems control and power system control.
You can model plant dynamics in Simulink and Simscape and use your model to train a reinforcement learning agent. The Reinforcement Learning Designer app provides an intuitive, interactive way for you to get started with agent creation and environment design with Reinforcement Learning Toolbox™. You can also specify your own custom RL agent as well as the RL environment by overriding agent behavior and customizing actions, observations, rewards, and dynamics of the environment.
For example, with MATLAB and Simulink, you can implement field-oriented control of a permanent magnet synchronous motor by using reinforcement learning controls instead of the PI controllers by training a reinforcement learning agent. Linear controllers often do not produce good tracking performance outside their regions of linearity. In such cases, reinforcement learning provides a good nonlinear control alternative.
Learn More
AI methods are improving electrical system operations by enabling:
- Reliable energy forecasts
- Predictive maintenance of electrical components and systems
Energy Forecasting
AI-based energy forecasting provides valuable inputs for mitigating the uncertainty in power system operations. AI methods can be used to predict electricity loads, demand, and pricing and help inform risk analysis and management in power system operations.
MATLAB and Simulink help you leverage AI models to provide data input to the physical system model and enable intelligent system operations. For energy management systems, energy forecasting plays a key role in providing reliable estimates of technoeconomic and environmental factors, such as electricity demand and generation, electricity price, and weather conditions (such as temperature and humidity), that are important for optimizing system operations.
There are four steps for performing energy forecasting in MATLAB:
- Import energy or weather data from one or a combination of data sources. With MATLAB, you can access, explore, and import energy data stored in files, the web, and data warehouses.
- Preprocess the data so that it is in a clean, consistent, and readable format for modeling purposes. MATLAB provides interactive tools for cleaning, exploring, visualizing, and combining complex multivariate data sets.
- Prototype, test, and refine predictive models in MATLAB using machine learning methods. For example, you can create a dynamic, self-tuning model for predicting long term energy load.
- Integrate, run, and scale the energy forecasting system within enterprise business systems or as interactive web applications.
In Simulink, you can:
- Integrate the AI-based energy forecasting model in your energy management system to provide key inputs for smart operations of residential or commercial buildings.
- Validate the forecasting algorithm and energy management strategies against the electrical system.
- Run hardware-in-the-loop (HIL) simulations.
- Generate readable, efficient C/C++ code from the energy management system model in Simulink for deployment on edge devices, such as an embedded processor.
Learn More
- Use MATLAB for Energy Data Analytics - File Exchange
- Use MATLAB for Long-Term Energy Forecasting - File Exchange
- Turning an Idea into a Data-Driven Production System: An Energy Load Forecasting Case Study (42:53) - Video
- Using MATLAB to Empower Modern Numerical Weather Forecasts (22:31) - Video
- Using Machine Learning and Deep Learning for Energy Forecasting with MATLAB (39:29) - Video
Predictive Maintenance
To ensure reliability and reduce downtime, power systems organizations are starting to adopt AI-based predictive maintenance. With predictive maintenance, engineers can detect and classify faults and anomalies, diagnose, and predict failures, and estimate remaining useful life (RUL) of key electrical components and systems, such as the electrical grid and the underground utility distribution cable systems.
You can train predictive maintenance algorithms using historical sensor data from electrical systems or generate synthetic data from physics-based models using Simulink and Simscape.
Fault data is hard to obtain since fault scenarios are rare and usually associated with equipment damage or other catastrophic consequences, so fault data is especially valuable for training AI models for predictive maintenance. With MATLAB and Simulink, you can inject faults into the system model and generate data from the model under both normal and fault conditions.
After you have trained the AI algorithm on fault data or sensor data (or a combination of both), you can generate C/C++ code directly from the algorithm for real-time edge processing, or scale by integrating with enterprise IT/OT systems in the cloud.
Learn More
Predictive maintenance on electrical components:
Predictive maintenance on power systems:
- Detect Anomaly in a DC Distribution System Using Autoencoders and Wavelets - Example
- Predict the Real-Time RUL of Wind Turbine Bearings in a Wind Farm - Example
- Train a Classification Model for Detecting Faults in Electric Vehicle (EV) Chargers - Example
- Use Convolutional Neural Networks (CNNs) to Identify and Classify Faults in Underground Power Cable Systems - Article
Recommended Next Steps
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)