I’m having trouble with my current measurements on a setup using a Nucleo F439ZI board paired with a DRV8301 driver board.
12 次查看(过去 30 天)
显示 更早的评论
Hi there!
If it’s not too much trouble, I actually have two different questions I’d love to ask.
1, Question
I’m building a field-oriented control (FOC) algorithm in Simulink. My closed-loop system is set up, but I’m having trouble with the motor’s startup routine. To “catch” the back-EMF and establish initial current, I switch into an open-loop mode:
output of the NUCLEO board: six sinusoidal waveforms with a dead-time compensation algorithm.
I’m testing on a DRV8301 evaluation board (half-bridge drivers, FETs), and when I run the BLDC motor in open-loop, the phase currents look noisy and distorted even after I apply basic filtering.

Current

Filtered Current
The resulting waveforms don’t resemble clean sine currents, so I’m not sure whether they’re acceptable or if something’s completely off. Do you think these current shapes are reasonable for an open-loop startup? And are there other filtering techniques beyond simple low-pass or Kalman filters that I could use to clean up the measurements?
2, Question
I’m using MATLAB Simulink Coder together with STM32 CubeMX, and I’m not sure if the sampling time specified in the Simulink ADC block needs to match the ADC frequency configured in CubeMX. Could you clarify it please?

Simulink_ADC_Block

Simulink_ADC_BlockSTM32CubeMX_ADC_Parameter_Settings
0 个评论
采纳的回答
Adit Kirtani
2025-7-22
Hi Virag,
Here is an example which allows you to generate an open loop model for your target hardware:
You may use this to compare your current feedback with your current model.
You can also compare the peripheral configurations in the STM32CubeMX ioc files. Instead of using the ADC in a trigger and read configuration, we use the ADC in read only mode. In the IOC, we set the ADC to be triggered by the timer controlling PWM. This allows for the ADC to sense currents at a point when we know current is flowing through the inverter (PWM is high).
Perhaps this may be why the readings are quite noisy. I hope this helps.
Regards,
Adit Kirtani.
0 个评论
更多回答(1 个)
Sameer
2025-7-9
Hi @Virag
Yes, distorted current waveforms are expected during open-loop startup, especially when running in six-step or sinusoidal commutation without current feedback.
- PWM and dead-time effects introduce high-frequency noise and distortion, especially near zero crossings.
- Raw current measurements often include switching spikes from the inverter and are not clean sinusoids.
- Low-pass filtering (like with a Butterworth filter) helps, but even then, the result won’t be perfect — some flattening or ripple is normal.
From your images, the filtered waveform looks fine — fairly stable with reasonable amplitude and small ripple. That’s expected in open-loop where the current isn’t actively controlled. In startup, you're likely just applying a fixed torque (Iq), so the current stays nearly constant.A few things to check:
- Current sensor filtering: Make sure the RC filter on the shunt amp output is not too aggressive (e.g., 100 Ω / 1 nF is commonly stable for DRV83xx). Over-filtering can cause ringing; under-filtering lets noise through.
- PCB layout: Poor grounding or layout can add extra noise. Follow the driver IC's layout guidelines.
Unless your filtered current is wildly distorted or the system becomes unstable, what you’re seeing is normal and acceptable during open-loop startup.
Hope this helps!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Communications Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!