White Paper

AI Techniques for Electrical Technologies

Why Is AI Important for Electrification?

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
section

AI for Development

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.

Two motor and load system diagrams, one including a physics-based model, the other including an AI-based reduced order model.

Creating an AI-based reduced order model for a load model in Simulink. The AI model is based on a long short-term memory (LSTM) deep neural network.

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 (19:48) 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) (13:38) 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.

A diagram of an AI-based battery state-of-charge estimator.

Creating a deep learning–based virtual sensor for estimating battery state of charge (SOC) in Simulink.

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 (15:02), 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 (34:09).

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.

“Reinforcement Learning Toolbox considerably reduced development time. The toolbox really helped in fast prototyping and generation of reinforcement learning agents.”

Vivek Venkobarao, Vitesco

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 (6:12) 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.

A Simulink diagram for real-time system testing.

Creating a reinforcement learning–based field-oriented control of a permanent magnet synchronous motor in Simulink and deploying it for real-time testing.

section

AI for Operations

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 (42:53) 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.

“We were able to significantly reduce deviation costs between the wind power forecast and the real production, resulting in millions of euros saved per year.”

Daniel Cabezón, EDP Renováveis

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 (22:31) (such as temperature and humidity), that are important for optimizing system operations.

There are four steps for performing energy forecasting (39:29) in MATLAB:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
A map of New York state with graphs of energy forecasting data.

Creating an energy forecasting system using machine learning and deploying it as a web application.

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 (35:27).

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.

“Despite having little previous experience with AI, within a limited budget and a tight deadline, we completed a diagnostics model in MATLAB capable of detecting wind turbine component failure with over 90% accuracy.”

Jung Chul Choi, Korea Institute of Energy Research