示例《Sensorless Field-Oriented Control of PMSM Using DC Shunt Current Sensing》中,仿真和代码生成的相移方向是相反的,应如何理解?
15 views (last 30 days)
Show older comments
noodle
on 15 Oct 2025
Commented: noodle
on 11 Nov 2025 at 11:33
在示例《Sensorless Field-Oriented Control of PMSM Using DC Shunt Current Sensing》示例网站中。我观察了代码生成的ePWM模块配置,能够看出,母线电流采样是发生在每一相的上升沿处。如下图所示。


如果是在上升沿处采样,则相移的方向在2个大占空比重叠时,将最大占空比的一相左移。以下图为例。
而在2个小占空比重叠时,将最小占空比的一相右移。

但在PWM移相处理的程序中,我注意到下图的注释。

这与在上升沿处采样的原则正好相反。
另外,在程序的母线电流采样仿真程序部分,有下图所示的采样逻辑。

经过我的分析,这是在模拟下降沿触发采样,这与ePWM的设置也相反。
我不明白这是示例中的错误,还是有什么我没有体会到的奥妙。
非常感谢。
0 Comments
Accepted Answer
MathWorks Motor Control Blockset Team
on 10 Nov 2025 at 5:00
Hello, thank you for the question. Your observation is correct. Hardware configuration is for rising edge but simulation plant logic is for falling edge. This is due to deadbend present in ePWM pulses. Eventhough hardware configuration is for rising edge the current measured is similar to falling edge measured current due to the deadbend.
To avoid this confution for future releases this example has been updated with correct 'Deadbend' value in ePWM block mask and 'SOC acquisition window' value in ADC block mask. This update does not have any mismatch in current measurement logics.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!