-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DC Switching Frequency #48
Comments
Hi Hug0, can you just elaborate the issue for me? If I understand you correctly, you are expecting the current to be 40A, instead of the 39,37A displayed? I think the small steady-state error can be expected, do you get less error on the output current when connecting a BLDC motor? Maybe it's not a firmware fault at all... |
Hello, thank you for the interest. At m_dc_f_sw = 20kHz values are ok (consistent with the drained power from the laboratory power supply) But when m_dc_f_sw is decreased, the true output power decrease, 420W-> 217W -> 109W as IBatt. Which is consistent with the drained power. I haven't investigated more into the code, but it's as if the value of dc_f_sw, isn't taken into account, or hardcoded in the calculation of I Motor. I hope I have been explicit enough, Hugo |
This is because at you are turning on the mosfet, turning it off, taking a sample of the current, wait, repeat. When you reduce the switching frequency the time between pulses increases, 20kHz -> 10kHz means the current falls twice as much and you will see much lower average current, the vesc will still see the same current. Same happens at 5kHz and is why you see almost exactly 50% drop in each step you made. If you tried this test again with a big inductor as a load you would see a very different result. |
In DC mode, calculations relative to motor current are not consistent versus switching frequency
Here are 3 results when ordering 40amp current for different switching frequency values
Note that the value of the motor current is wrong in the 3 cases ...
m_dc_f_sw = 20kHz
![20khz](https://user-images.githubusercontent.com/537067/34215709-8a1b5e36-e5a6-11e7-82e5-a6df9665bc40.png)
m_dc_f_sw = 10kHz
![10khz](https://user-images.githubusercontent.com/537067/34215720-92ef48e2-e5a6-11e7-97e8-3b9f9620d021.png)
m_dc_f_sw = 5kHz
![5khz](https://user-images.githubusercontent.com/537067/34215730-9c00bfd8-e5a6-11e7-9f80-73cf0b75655c.png)
The text was updated successfully, but these errors were encountered: