Electronics > Projects, Designs, and Technical Stuff

Motion control, S-curves and other stuff >> controlling lift with DC motor

<< < (10/14) > >>

capt bullshot:
CM inductor is useful for EMI mitigating purposes, but it's magnetizing inductance isn't added to the motor inductance since the motor current cancels out. Only the stray inductance will add to the motor inductance.

I've seen designs adding a small value inductor (e.g. 4.7uH) to each H-Bridge output - it's purpose is to limit dI/dt to some value the short circuit protection can handle. Depends on the ruggedness of the MOSFETs and the speed of the short circuit protection (if applicable). Also helps with capacitive charging currents of longer motor cable runs.

If you want to use higher switching frequencies to lower the ripple, your current control loop still can run on a lower frequency (if computing power is the limit) - a faster loop would still run with the same bandwith required by the system, doing more computation than necessary. Oversampling and averaging or downsampling (filtering) is a good measure to reduce noise and increase resolution, as long as you can meet your bandwith requirements.

Driving a MOSFET H-Brigde requires tuning and low impedance layout for best performance ;) Cross-conduction is rather easy, just increase the dead band. Diode recovery and ringing can be way more nasty, try slowing down the switching by increasing the turn-on gate resistors, keep turn-off fast - or try to find a very narrow dead band configuration that avoids MOSFET body diode conductance and switches fast. The latter one is difficult to maintain over a wider range of DC-Link voltages and loads characteristics.

krisRaba:
First thing I have to check is raw MCU output. I was a little bit surprised about its shape. Maybe it was some kind of ringing but looked like short turn off during ON state :-| On 21kHz everything looked perfect, I think, so it is strange that it behaves so different.. but I have to double check as it was just quick test before turning everything off ;-)

jbb:

--- Quote from: krisRaba on October 23, 2019, 02:57:43 pm ---In the meantime I have switched to 50kHz PWM ;) It works (without current control loop at the moment) but I have to check some bad things on output signals. From very quick investigation I think that ringing on MOSFET gates causes cross-conduction for short moments so motor works but H-bridge becomes hot...

--- End quote ---

I gotta say, cross-conduction (aka shoot-through) is bad at any switching frequency.  You should check for that; it might be fixable by adjusting the gate driver circuits.

Also, do you really need 50kHz PWM?  Assuming the same H Bridge, higher switching frequency will always lead to higher switching losses.  Also, laminate iron rotors will tend to show lower effective inductance (and higher iron losses) at higher switching frequencies.

capt bullshot:
Interesting - some kind of timer misbehaviour? Do you use the capture/compare shadow / buffer registers (don't remember real name in the datasheet and ATM I'm too lazy to look that up) so the PWM values get updated at the correct sampling point?
I've experienced some weird effects with STM timers, usually I could resolve them by checking and fixing my code ;)
From my experience, it's highly recommended to handle the bare metal timer, not to use ST HAL code. It's way more efficient and you've got to debug your own code only. Since I'm lazy, usually still leave the basic initialization to Cube/HAL, but no more HAL once it's up and running, especially within timing critical interrupts.

krisRaba:

--- Quote from: jbb on October 23, 2019, 07:30:37 pm ---I gotta say, cross-conduction (aka shoot-through) is bad at any switching frequency.  You should check for that; it might be fixable by adjusting the gate driver circuits.

--- End quote ---
I have to investigate what is the real source of that problem. Power section is quite nice layed-out, I think. It is not my design but I would give a thumb up for that part of PCB to my colleague ;) And the problem was also observed on MCU side, before isolated gate drivers, so I presume it just follows junky drive signals. These lines are quite long and one of them is rewired near gate driver because I had to do some pin re-arrangements to free additional hardware connections. But it worked perfectly with 21kHz and 50kHz doesn't sound like astronomic change ;)


--- Quote from: jbb on October 23, 2019, 07:30:37 pm ---Also, do you really need 50kHz PWM?  Assuming the same H Bridge, higher switching frequency will always lead to higher switching losses.  Also, laminate iron rotors will tend to show lower effective inductance (and higher iron losses) at higher switching frequencies.

--- End quote ---
I don't know, just to be honest ;) Company that designed these motors and controllers doesn't hire idiots.. I hope ;) It's rather top brand. These motors and controlers are designed to work together and their controllers use 50kHz and other parameters that I have already mentioned. So I think there is important reason for that.
I have already mentioned effective inductance and it looks like they know about that problem ;) And this is why they suggest to use 30-80% of its value in calculations...
Generally I have to check if there is any significant improvement in current ripple. I couldn't hear any difference in motor sound when working at 21kHz and 50kHz, no resonances, buzzing etc. in both situations ;)
I usually use 21kHz just to go above audible range but their 50kHz tortures my brain ;)


--- Quote from: capt bullshot on October 23, 2019, 07:36:22 pm ---Interesting - some kind of timer misbehaviour? Do you use the capture/compare shadow / buffer registers (don't remember real name in the datasheet and ATM I'm too lazy to look that up) so the PWM values get updated at the correct sampling point?
I've experienced some weird effects with STM timers, usually I could resolve them by checking and fixing my code ;)
From my experience, it's highly recommended to handle the bare metal timer, not to use ST HAL code. It's way more efficient and you've got to debug your own code only. Since I'm lazy, usually still leave the basic initialization to Cube/HAL, but no more HAL once it's up and running, especially within timing critical interrupts.

--- End quote ---
I use HAL only for GPIOs init because in CM4 it is designed so strange that it would be hard to write simple macro to set that and this is done only once at startup ;). Other things usually controlled in "bare metal" on registers. I use "preload" on all CCR registers so it's not that. And nothing was changed here between 21kHz and 50kHz.
Of course before blaming MCU vendor I always study datasheet, my code, datasheet, and so on.. ;)
But to still have good resolution after increasing output frequency I have switched clock source from PCLK2 to 2xPLL ;) So now this timer runs at 144MHz :D  8) But datasheet claims it can handle that ;) TBD in reality ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod