2025-03-08 9:25 PM
Hello everyone,
Based on the screenshots attached, I couldn't understand the formula obtained for the OCP feature of this inverter board.
3 phase currents are read through the shunt resistors, got offset, and amplified by the op-amp ICs. So far so good!
But PC1, PC2, and PC3 are tied together using 3 one kilo ohm resistors, then the common node is fed to the comparator pin of the MCU to do the OCP task.
I am wondering how the Equation 2 is obtained for implementing over current protection, and why it is like this.
Why is the G.Rs.Ioc term divided by 3?
If you could guide me, it'd be awesome, thanks.
2025-03-09 12:27 AM - edited 2025-03-09 12:28 AM
Hi,
>Why is the G.Rs.Ioc term divided by 3?
Because adding 3 signals together with simple 3 resistors, so "sum" is (a+b+c) /3 ;
if all "1" , sum is also 1; but if only one is "1", others zero, then sum is 1+0+0 /3 = 1/3 ;
and this is just cheaper than having 3 comparators , doing the same.
And its just error/overcurrent protection, so no need for a "precision" switching level,
in "normal" use, it never should be active, only on a short it protects the mosfets from exploding.
ok ?
2025-03-09 3:38 AM
*: Because adding 3 signals together with simple 3 resistors, so "sum" is (a+b+c) /3.
Yes, I see, but please refer to the screenshot attached. This is the formula for calculating the output of each op-amp network provided by ST.
Based on that, considering resistors values, PCx is equal to (Vref /2) + (G*Rsh*I).
So, (PC1+ PC2 + PC3) / 3 = ((3 * Vref /2) + (G*Rsh*(Ia+Ib+Ic))) / 3 = Vref /2 + (G*Rsh*(Ia+Ib+Ic)) /3
isn't this correct that at each specific instant, in FOC considering a balanced system: Ia+Ib+Ic = 0?
then, the sum would be Vref/2.
Please correct me if I'm mistaken.
2025-03-09 7:25 AM - edited 2025-03-09 7:26 AM
Yes, agree.
But this Over Current Protection (OCP) is not for normal working state - here it should do just nothing.
It should react, if maybe a motor coil gets shorted or a short at connection - then one (!) current suddenly going through the roof - and this event should trigger ocp error and stop all outputs.
And your "Ia+Ib+Ic = 0" is at the center point of the 3 coils , currents relative to the coils pos or neg polarity, but the current shunts are on the lo side ("gnd"), here always only positive current when power going to the motor,
so here you see the current going through the half-bridges and this is not "=0" , but always the sum of the currents going to the motor from the power supply !
2025-03-09 10:07 PM
Thanks for your time,
->So, (PC1+ PC2 + PC3) / 3 = ((3 * Vref /2) + (G*Rsh*(Ia+Ib+Ic))) / 3 = Vref /2 + (G*Rsh*(Ia+Ib+Ic)) /3
Now you are telling me that in this formula, I should see Ia+Ib+Ic as Id (total dc current supplied by the main power supply)
In other words, we can imagine the situation is like when there is only one shunt resistor and total dc(average) current of the inverter is being measured (the source pins of our MOSFETs are tied together, connected to one shunt resistor). But now that we have 3 shunts, this total dc current is split among these 3 shunts?
Is this explanation correct?
2025-03-09 11:17 PM - edited 2025-03-09 11:18 PM
Hello,
I understand your concern regarding the derivation of Equation 2 for OCP implementation. The reason the term G.Rs.Ioc is divided by 3 is likely due to the way the three-phase currents are summed at the common node before being fed into the MCU’s comparator. Since PC1, PC2, and PC3 are connected through equal resistances (1kΩ each), the resulting voltage at the common node represents the average contribution of the three phases, leading to the division by 3.
Essentially, this setup helps in obtaining a balanced overcurrent detection mechanism by averaging the phase currents rather than reacting to an individual phase spike. If you have specific doubts about the derivation, checking the circuit’s equivalent model might clarify how the equation is formed.
Let me know if you need further clarification! Also, if you're looking for the latest CapCut APK version , feel free to check the official sources for updates.
2025-03-09 11:50 PM
Right, so it's getting over current for the whole inverter, by using the sum of all three legs.
So it's just a cheap way to get the average sum, if the current sensing for each leg is already needed for feedback/ control.