 Okay, now let's look at the runtime issues So there are a couple of Standard runtime issues. So let's go through a simple decision tree Well, if our application burns when we turn it on We probably have a hardware issue. So which we shall revisit our hardware setup and Possibly even our hardware design If motor don't move doesn't move Check power stage if you have power supply check PWM also the reconstruction from ADC and overcurrent setup Then if the motor moves just a little bit But doesn't start to the required speed check alignment The startup and rev up phase this we will see later If motor move but fails at speed Then check G2 parameter or speed speed PI regulator Okay, now we have our motor running, but the speed is unstable in such situation. We need to Set up properly the speed PI regulator If it move well, then you are win. You finish congratulations okay, and finally About your application design Please check if you really need a speed control because if you have doubts try torque mode and If you really really need speed control then use the speed mode But again, tune the speed PI very well Next thing that may happen is that when you generate your code, you don't see any changes of the software So you try new parameters, but it doesn't move Doesn't change the overcurrent readings and so on so a question is if you generated your project in the correct folder if You recompiled the software After applying the changes in the motor controller bench if you load it new software to your application and Finally, if you don't use the other debugger connected to the second stn32 design placed on your table Okay, then continuing in your application process Please ask yourself if your application reads Evaluates and reacts on the error states reported by the SDK functions If not, please come back to your program and rewrite it so that it does one possible Fault it's a foc duration. This fault comes usually if you use a very high frequency PWM frequency and MCU it's too too loaded and it's not Possible catch the calculation of a foc algorithm with this frequency You can decrease the frequency or use execution rate, which reduce by Integer number one two three The foc frequency apart from PWM frequency if you combine the project of SDK with your own setup, please Check again the IRQ priorities the motor control Functions must always have the highest interrupt priority because the timing is crucial in this case Best PWM frequency that's the first question if you start the motor what frequency it's necessary to to use it's Depend on some Aspects if you if you use the low frequency and you reduce switching losses If you use a high frequency you increase losses, but for some application, it's necessary to use a high PWM frequency main mainly for Low inductance motors in this case current shake a lot of average value and for that we have to switching fast if you increase foc and PWM frequency then you increase also the MCU load and for that you can use execution rate Okay, then if we want to start our engine properly, we have to Choose the proper startup settings We can achieve best startup settings initially by setting these pre-calculated parameters And we will tune them later The speed ramp duration shall be set to three seconds initially the speed ramp final value 30% of the maximum motor speed The current ramp final value 50% of the nominal motor current we shall as well include alignment initially we can choose two seconds and 50% of the nominal motor current and We can set up a minimum startup speed test as 15% of the maximum motor speed You can reach some some issue after the startup first. It's quite simple over current. What is Happen, it's mean that during startup or generation of PWM frequency. We reach some threshold of Over of the limit of our current this threshold is usually defined by by hardware or Some setup and we have to check what what is happen Usually we have to check the hardware setup if it selected good topology single shunt reshunt We have to select proper current range Then we have to check the shortcut on the motor or check all rent line Okay, it can happen that some of the MOSFETs are shot through so this may be as well one of the reasons for the overcurrent detection Then we shall check and verify again the current path That's measured by the ADC so please take an oscilloscope and check that the ADC input gets the current readout from the faces properly and That the polarity of the PWM outputs Connected to the PWM drivers Are as well set up properly according to the data sheet of the MOSFET drivers You have one Filtering for the current reading which is defined by by bandwidth Number and there is some recommendation that for three shunt. It's good to Reduce this number to two thousand for one shunt to one thousand and it's could be it could be useful If you have quite noisy signal from current reading When the PWM frequency is too low the face current may rise too quickly Especially when the motor exhibits a very low inductance in such case we need to increase the PWM frequency and to avoid the FOC duration, please see the previous slide and increase the FOC execution rate speed feedback it's fault which is appear after after the startup and We can reach this this fault if we have a better definition of us use start ramp and we can Change the startup setup Also, we can find this this feedback speed feedback if you have a bad setting on in the observer and Also, if we go with the speed very very low and the reconstruction. It's not reliable on this speed level If you see this speed feedback issue First start in the torque mode if in the torque mode the motor runs stable we can retune the speed PI regulator because it can make the system oscillating and creating the speed variation and finally if We have a speed feedback because the speed variation is Reasonable, but it's still detected as a over limit. We can increase the variance threshold we can gradually increase up to 100 percent and Increase the speed before depth These parameters significantly reduce sensitivity for rotor locked condition So we shall return them back to as slow possible as Low value as possible later when our system is stable and fine-tuned if it speed feedback appears immediately after start up then it's a case with the bed set up of the start up startup setup usually it's due to that we select a low number for the threshold about the speed and Immediately after switch to the closed loop we reach a better bet value more than defined Arithmetic threshold and we reach the speed speed feedback for that we can increase the minimum start up speed to 15 percent or more dependent application We can additionally enable the rev up algorithm to align a gradually the forced torque ramp with the sensor less control and And this gradual alignment avoids the sudden speed change at the transition. So the Variation of the speed will not be that big to be kicked down by the speed feedback check next case it's a startup file. It's Happen just before the speed feedback. It's mean that Open loop startup. It's not finished with the locket system to the to the send in the sensor less algorithm in this case we we have to take care about the torque and current and we have to Decrease acceleration rate. It's mean take much time for for the startup or make make up final value to the proper speed for the switching increase the startup current due to Required torque for for the startup up to nominal or enable Alignment phase because we this alignment we can start from the known position and Increase the chance to start up success successful Okay, and finally if the motor doesn't start immediately after the start command We have typically opted for alignment which can take some time so in this time the motor waits for stabilization in a specific position and Only after that it starts spinning or We have enabled the option startup on the fly Where the detection phase has started and waits some time for a signal from the observer to detect that the engine is rotating and If no rotation is found within a timeout then standard alignment and startup applies Which will a little bit delay the initial startup process Thomas why we use the startup on the fly if it prolonged the time of the start This is because We can detect the moving load and We can connect to the load without stopping the load first and then Restarting it in the same option in the same direction It's typically because we have not enough power for stopping such system like a Ventilations on the buildings where the airflow doesn't allow us to stop the ventilation Completely so we wouldn't be able to control the motor from the beginning from zero Okay, maybe good to good to say it's that We speak about the sensor less algorithm and so sensor less algorithm has some some limitation of the speed because the reconstruction is coming through the reconstruction of big EMF back EMF it's Depend on the speed and less than five percent of the nominal speed. It's not a Realable range and we have to skip this part of the of the rotation with the sensor less if he if he want to go slowly then we have to find some additional algorithm like HFI or use some some sensor like whole sensor or encoder If the speed control is unstable at different speeds It has typically several different reasons first. It can be that the load Torque changes in a non-linear fashion depending on the speed so It may mean that at low speed the torque is very low with increasing speed the torque Increases non-linearly and with a very high speed again the load Derivation changes to the lower values So it may be too light at low and high speeds and heavy at medium speeds The typical example of such load is an air pump so in such case in May require different setup of the speed PI regulator at different speeds and We can use some linear interpolation between the measured regions of the speeds and loads It is implemented in standard library. No, it's not but it's very easy to add