 Zato sem tukaj pošličnja v pošličnji v motorkotrolnih boljbenju. To je vse 5-stap in vse 6-stap. Zato je motorkotrolnih boljbenje. Taskov z vse 5-stap in vse 4-stap. Zato sem tukaj pošličnji vse monitor. Zato sem tukaj pošličnji vse monitor. nekaj debakov, kako je FOC začneva in biti o tuniku. Prvno, skupaj skripčenje motorkontrolnej monitori. Vse možete prišli tudi, kaj je prišli prišli prišli projekti, kaj smo kratili v studiju. Vse možete prišli v studiju. Vse možete prišli v debak, kaj je vse na mikrocontrolleru in prišli vse načinje monitori. Vse načinje projekti And that is a button to open the monitor. This is how it looks like. If you have it, then the next step is to connect to the board. So please choose your COM port and 115.200 for the board rate and click on this world adapter to connect the board to the board. If you are successfully connected you should see here with the green one firmware and firmware version Kaj sem vnit, v povedku, v podobnih vseh na motore na mikro-kontroljer. V sej zelo si začeliš, da počeš se zelo povedku. Na izgleda je zelo, da se začeliš, da je zelo izgleda leda, na rednev, in nam je na idelji staj, da je bolj je odličen za input, da pa zapravila nisem, vs. na podobnih vseh. Kaj je start motor, sorry, start motor, not start button. Tudi indikatori na povrstku. Zdaj ima načinje basa, in načinje motor povrst, in načinje. Zdaj najbolj, je načinje motor spet, kaj je načinje načinje, ne načinje, načinje. Zdaj si da se povrstavimo načinje, načinje. Kaj je načinje, načinje, na 750 rpm. Zato, da se je zelo začel, in taj zelo začel motor. Vse sem se zelo začel motor. If you try to manually stop it with your hand, you should see the error on the left side, there should be a fault. One of them should be indicating with red color. And while the motor is spinning, you can change the speed with this knob. But if you will try to change the direction, you have to stop it, then change and then start again. This is the basic view, you can play a little bit. There is also temperature information, if the board would have a feedback for the temperature, which is seen in this case, I think there is no feedback. So it's either zero or some dummy value. In case of an error, so if you try to spin the motor and you manually press it to, let's say make an error, you should see on the left top side, there is a marking with fault now, and red LED. The error says under voltage. So our voltage was too low, because the current is not, there is no feedback about current on the tool. When the fault occurs, you have to stop the motor, press the buttons for stop the motor, and then acknowledge the fault. Okay, let's continue. The next very useful feature is the plotter. There is an icon in the main view. You have this icon on top. You can open up the plotter, and the plotter will show you the difference between desired speed and actual speed. The red one is desired, and the white one is the actual. So you can see the difference. Because, as we already mentioned, it's a little bit hard to debug application like motor control, because you need continuous calculation in the interrupts. You can open the plotter in the separate window, which actually is always, and you can play with the knob a little bit, and you will see the red curve is changing the altitude. Okay, so this is basically, you can play with the knob and see the values between desired and actual speed. If you go back to the monitor view, and in the advanced section, as you remember Roman explained earlier, we have option to set the control mode as a speed or torque. So here in the dropdown, we can choose either we want fixed speed or only fixed torque. In both cases, torque regulation is always active, but on top of that, we can also have a speed one. In the middle red rectangle, here you can see, you can configure the speed ramp. So basically what you can set is the target speed, and how fast from the current one this change should happen. In this case, it is set to 1,000 millisecond. From the current one, go to minus 2,000 rpm. So depends on what is the current one, the slow piece is different. In the register section, so register step, you can see the current values, which are in the system. So all possible variables physically presented on the board are seen here. So let's continue with a little bit of overview for the debug features. I will go very fast through that. So the first feature, which we offer is the plotter. Here you can check in case of control regulation, you have a current speed versus desired speed. In case of torque regulation, you have desired torque versus current torque. So that's the catch with the plotter. The second very useful feature is DAC output. So digital to analog converter output. Again, why do we have this? Because you cannot break point of the system to stop it because your motor will, I mean the FOC algorithm needs continuous processing. We offer two outputs on basically on PA4 and PA5. Of course, if you don't need this, we can disable. There is an option to disable the feature. And we can select which output do we want on the DAC. So which value we want to see on the DAC output. What are the options? So this is the case, how it looks like. The green one, a little bit thick, is the actual phase A motor current measured with oscilloscope. This is the green one. And then the smallest one below are the deck channel 1 and deck channel 2 with IA and IB, IB values for the motor. This is the case number one. Case number two, we have again phase A motor current in the green, but below we have back EMF observation for alpha and beta. So different values for the same motor current. So we can decide what we want to plot with the DAC output. About the tuning flow, we were just discovering something now here about the tuning flow. The basic startup with the FOC algorithm offers, let's say, three values. The first one is alignment. So before we start applying any speed, we can align our motor. This is basically speed equals zero, and we are applying the current to the one or two phases. This is the green part. Usually the maximum current we should put here is up to nominal current. Usually half of that is enough. But in some cases, depends on the load on the motor, we can apply up to 100% of nominal current. Step number one is to apply the speed with almost steady current. In this case, this is the open loop approach. We try to observe the back EMF. And then here is the third value. When we have the back EMF observation, let's say valid one, and then we switch to the closed loop. This is the basic what happens behind the FOC startup. So are we able now to find this view? If so, there is an option to have basic settings, view before, or there is also an option to have advanced settings. In advanced settings, we can manually, by hand, specify the startup procedure. For example, in this case, here is specified that on the beginning, for one second, we want zero speed and 1.5 amps of current. Basically, it means align my motor. In the second phase, we want to apply in duration of 1.17 seconds speed of 588 rpms. And after that, we will stay at 588 rpms with the FOC algorithm. If you want more, let's say change the speed after 10 seconds, we can use more of them, more lines, more rows of these settings. This is the idea. And you can also specify when to execute sensorless algorithm at which point. So in the first step, when we want to align our motor, we don't need sensorless algorithm because there is no point to do it. Starting from 2, we want to apply some speed and we want to read what is happening in the feedback. So this is what I explained. The duration values, for your information, they are, let's say, cumulative. So 1.176 means after first one second. So you have to sum all of them before and then you start with your value. Speed is always absolute value. So basically if you are at zero, then 588, then minus 200, basically it would mean go to the opposite direction, not only slow down for 200 rpms. In the RPM, here is also information. When do we switch from open loop to closed loop? What should be the speed when we decide, OK, now it's safe to go to closed loop and control the motor with closed loop. This is the monitor, which we already saw. So how it behaves from this view to this view. The limit, how many rows you have is today set to 5. So up to 5 different points for your startup procedure. You cannot have them unlimited. Maybe in the future we will add this feature as well. So the tuning flow of the regulators, of course we can change them here, but it's also possible to change them in the C code directly. So this tool is not always mandatory. We can change the current regulator. We can change the observer and its regulator, so PLL variables and constants. And we can also change, of course, speed regulator KP and KI parameters.