From: david.brown@hesbynett.no   
      
   On 27/09/2025 21:23, BGB wrote:   
   > On 9/27/2025 6:52 AM, David Brown wrote:   
   >> On 27/09/2025 10:14, Thomas Koenig wrote:   
   >>> Michael S schrieb:   
   >>>> On Fri, 26 Sep 2025 12:10:41 -0000 (UTC)   
   >>>> Thomas Koenig wrote:   
   >>>>   
   >>>>> BGB schrieb:   
   >>>>>   
   >>>>>> Brings up a thought: 960VDC is a semi-common voltage in industrial   
   >>>>>> applications IIRC.   
   >>>>>   
   >>>>> I've never encountered that voltage. Direct current motors are   
   >>>>> also mostly being phased out (pun intended) by asynchronous motors   
   >>>>> with frequency inverters.   
   >>>>>   
   >>>>   
   >>>> Are you sure?   
   >>>> Indeed, in industry, outside of transportation, asynchronous AC motors   
   >>>> were that most wide-spread motors by far up to 25-30 years ago. But my   
   >>>> imressioon was that today various type of electric motors (DC, esp.   
   >>>> brushlees, AC sync, AC async) enjoy similar popularity.   
   >>>   
   >>> I can only speak from poersonal experience about the industry I   
   >>> work in (chemical). People used to use DC motors when they needed   
   >>> variable motor speed, but have now switched to asynchronous (AC)   
   >>> motors with frequency inverters, which usually have a 1:10 ratio   
   >>> of speed. There are no DC network in chemical plants.   
   >>>   
   >>> If you have high-voltage DC system (like in an electric car) then   
   >>> using DC motors makes more sense.   
   >>>   
   >>   
   >> These are not "DC motors" in the traditional sense, like brushed DC   
   >> motors. The motors you use in a car have (roughly) sine wave drive   
   >> signals, generally 3 phases (but sometimes more). Even motors   
   >> referred to as "Brushless DC motors" - "BLDC" - use AC inputs, though   
   >> the waveforms are more trapezoidal than sinusoidal.   
   >>   
   >   
   > Yes.   
   >   
   > Typically one needs to generate a 3-phase waveform at the speed they   
   > want to spin the motor at.   
   >   
      
   Details of motor drives is perhaps getting a bit OT for this group - but   
   there are people here interested in all sorts of things. If you want to   
   have more discussions on motor drives, comp.arch.embedded might be a   
   nice place for a new thread - the group appears fairly empty, but   
   experts crawl out of the woodwork whenever an interesting new thread is   
   started!   
      
   >   
   >   
   > I had noted in some experience when writing some code to spin motors   
   > (typically on an MSP430, mostly experimentally) or similar:   
      
   Experiments are always good, but it is also helpful to combine them with   
   a bit of theory so that you don't generalise too much from a small   
   number of tests. In particular, the motor windings in a three phase AC   
   motor can be done in several different ways, optimised for different   
   kinds of controlling waves. The two main ones for small and medium   
   permanent magnet motors are for sinusoidal waves (aiming for smoothest   
   and most controlled driving - often called "PMSM - permanent magnet   
   synchronous motors") and for trapezoidal driving (for simpler driving,   
   often referred to as "BLDC - Brushless DC").   
      
   Then there are different ways to track the position of the motor. You   
   can have hall effect sensors, which are simple and cheap, giving 6   
   positions per electrical rotation (motors can have multiple sets of   
   windings and magnets, giving two or more electrical rotations per   
   mechanical rotation). These are good for trapezoidal BLDC control. It   
   is also possible to use sensorless control, where the hall effect   
   signals are calculated by measuring the back EMF from the motor windings   
   during the off periods of the driver half bridges. This avoids the   
   sensors and can make cabling easier, but can't be used at low speed - it   
   is only suitable for continuously running motors rather than positioning   
   motors.   
      
   Or you can have encoders, which give the more precise position needed   
   for sine wave or PMSM waves. These are usually quadrature encoders,   
   which are accurate and reliable but need to pass through an index   
   position to get their absolute position. Sometimes absolute encoders   
   are used - these are either cheaper but less precise using analogue hall   
   effect sensors, or much more expensive using multiple Grey code rings   
   with optical or inductive sensing.   
      
   For trapezoidal drives, you usually have a simple 6-step switching   
   sequence, with each of the three half-bridges driving high for 2 steps,   
   off for 1 step, low for 2 steps, off for one step. You can control the   
   speed of the motor by the speed of the steps, and the power by using PWM   
   modulation when driving high or low (or by using a single PWM control   
   for the common DC bus voltage).   
      
   For sine wave driving, you need fast PWM for each of the three half   
   bridges to generate three sine waves at 120° phase differences. The PWM   
   frequency has to be high enough so that after the filtering in the motor   
   windings, you have little in the way of harmonics.   
      
   Generally, however, instead of actively producing sine waves, you do   
   what is known as "vector control" - you measure the currents in the   
   three branches, and use the angle data to convert these to currents   
   perpendicular to and aligned to the motor position. You then regulate   
   the PWM values to control these two currents - aiming to get the desired   
   current in the active direction, and zero current perpendicular to it   
   (since that is just wasted effort). The resulting waveforms are   
   somewhat distorted sine waves.   
      
      
   An msp430 is fine for trapezoidal control and hall effect sensors, but a   
   bit underpowered for serious sine wave or vector control. You are   
   better with a Cortex-M4 for motors.   
      
      
   > Sine waves give low noise, but less power;   
      
   Sine waves are closer to the ideal for many motors, but you'll get even   
   lower noise with good vector control.   
      
   You can also try adding some third harmonic - use sin(x) + 1/9 sin(3x).   
   The third harmonic disappears in the motor, since it affects all three   
   phases equally. But it flattens out the peaks of the sine wave and lets   
   you then increase the amplitude by about 12.5% before hitting 100% of   
   your DC bus voltage.   
      
      
   > Square waves are noisier and only work well at low RPM,   
   > but have higher torque.   
      
   Square waves are a really bad idea - you jump between high torque and   
   low torque, and will regularly be pulling the motor back a bit rather   
   than forwards. Prefer trapezoidal control - it is just as easy, and   
   works vastly better. You of course get more torque ripple than with   
   sine waves or vector control.   
      
   > Sawtooth waves seem to work well at higher RPMs.   
   > Well, sorta, more like sawtooth with alternating sign.   
      
   Do you mean trapezoidal control?   
      
   > Square-Root Sine: Intermediate between sign and square.   
      
   [continued in next message]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|