 Hello everybody, I am Mohammad Shah Nawaz. I work at Artificial Intelligence Solution Group at SD Microelectronics. In this video we will see how we can easily implement condition-based monitoring and motor control on a single microcontroller using machine learning. In these days, condition-based monitoring and predictive maintenance are one of the major investment domains for their applications in manufacturing, energy, transportation and well beyond. One of the main reason is that in these days it's the time of automation and your performance and efficiency intrinsically depend on reduction of your downtime and improvement of your maintenance costs. Observations from a skilled person can help us to easily predict when a certain part is going to fail with high accuracy but in some cases the parts are inaccessible for traditional ways of observation and in some case it's even impossible to access these parts for any observation. This is where the artificial intelligence based condition monitoring can come to play and solve this problem. This can provide us accurate and continuous results on the device. Let us now take a look at this demonstration which uses a single STM32 microcontroller to run the motor as well as to perform the condition-based monitoring. This kit includes a nuclear board powered by STM32G4 and it also has an ex-nuclear board IHM16M1 which is used to power and drive the motor. In this demonstration we'll show you four steps which will include to run the motor, to learn the normal behavior, to detect the anomaly and then raise an alarm to tell the user that there is an anomaly in the motor. The first step is to run the motor in a predefined sequence. Once the motor is running the second step is to perform the on-device learning. This helps us to fine-tune and individualize our solution for every single motor. After the learning has been performed and we have learned the normal behavior of the motor we can start performing the condition monitoring in the third phase. In this phase we continuously observe if the motor is running in normal or abnormal condition. In the fourth step whenever there is an anomaly we raise an alarm and let the user know the motor is not working properly. Let us have a look on these steps now. In the first step I'll start the motor in a predefined sequence. In this sequence the motor starts from a standstill and it accelerates to a high speed using two or three second long ramp. After this the motor keeps on running at high speed for some seconds and then it decelerates to a lower speed and then keeps running at this lower speed for a few seconds and then it again decelerates to a standstill position. This way we are exploring a wide range of speeds and showing that our solution works are all the speeds. Once the motor is running we can start performing the learning on the device. To do this we simply turn on the learning. The training process is very quick and it only takes few seconds on the device. For this setup it takes about 30 seconds to start seeing some accurate results but to have more robust performance we strongly advise you to train for longer time. In addition to this the AI libraries which we are using here for condition monitoring comes with the possibility of incremental learning. This incremental learning lets you add learning to your previously learned behavior without forgetting or overwriting the learning. This functionality could be very handy when you want to add a new pattern to your previously learned patterns. Because with the incremental learning you do not have to worry about retraining for the previous patterns and you just train for the new pattern and it's done. With this functionality you can switch between learning and condition monitoring on the edge without any problems. Once the normal behavior has been learned we can start the condition monitoring phase. Here you see if your motor is running properly or not. Proper behaviors are indicated using green lights and whenever there is an anomaly the lights turn red. Using the current sensing we can detect a wide variety of faults which include friction, misalignment, bearing faults, voltage drops, bed starting sequence and many more. In addition to this these faults are detected at any connecting rotating part not just on the motor. Also the solution is able to ignore all the surrounding noises. For example the disturbances coming from the motor running next to it and any other external noises. The demo you are seeing performs at 98% of accuracy with 84% confidence. Let us now simulate an anomaly by adding friction to the driving belt. As you see as soon as I put the part next to the belt and it starts rubbing against it the motor is reporting now an anomaly. Also as soon as I put away the part from the belt it turns into green which means it is very spontaneous. In addition to this the anomalies are detected at all the sequences we mentioned before which means high speed, low speed, acceleration and deceleration. This shows the robustness of our solution on all the speeds. This demo uses an STM32 G4 microcontroller running at 170 megahertz which is one of our well-known family for motor control applications. More precisely we are using PNUCLEO IHM03 motor control NUCLEO pack with the NUCLEO G431 RB one of the smallest NUCLEO in G4 family. It embeds 128 kilobytes of flash memory and 32 kilobytes of frame. The kit also includes a power board XNUCLEO IHM16M1. The motor control algorithm used to run the motor in the predefined sequence is coming from STM32 motor control SDK and the AI part is coming from Nano edge AI studio from Carthusium. Just to highlight the AI library coming from Nano edge AI studio, the motor control part and the integration algorithm all combined only take 17 kilobytes of flash and 40 kilobytes of frame. This small footprint allows us to have the condition monitoring and motor control applications on a single MCU. The demo you have just seen is directly performing the condition monitoring on the driving currents using current sensing. By the way the same functionality can be also achieved using vibration-based sensing. This functionality has already been implemented and integrated in STM32 cube function. This function is available as a function pack on STM32 cube family. The function pack is an out-of-the-box complete software package and it is named as FPAI Nano Edge 1. It is completely free of charge and it benefits from our partner Carthusium. The function pack enables you to have a running condition-based monitoring solution in just matter of few clicks. Thank you so much for your attention. I hope you like this demo. For more information on our AI solutions please visit us at st.com slash STM32 cube AI. You can also contact us at edge.ai at st.com for any further information or queries regarding our predictive maintenance solutions.