CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > Gecko Drives


Gecko Drives Discuss all Gecko drives here and get direct support!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-21-2012, 02:39 AM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road
Requesting some help

Hi,

I recall a post from someone who had done tests on the AMT102 encoder and reported processor time delays in the quadrature signals coming the encoder.

A failing on my part was at the time it didn't have relevance to what I was doing so I neglected to note the name of author or investigate his findings. My error then has now taken on an unexpected urgency now and I would dearly love to revisit what he found.

Let me give a little bit of background for what prompts this request. This is kind of technical so feel free to tune out here.

I have pursued designing a step-motor servo for over 12 years. All of my attempts from all different directions over the years met with failure. It also puzzled why no one else had come up with one.

A successful solution is one that uses the Clark-Park and inverse Clark-Park transform equations. In literature these transforms are universally solved using DSP-enabled microprocessors for brushless DC motors.

Brushless-DC motors, properly called PSMS (permanent magnet synchronous motors) typically have 6 poles. The microprocessor running them can barely execute the firmware in 50 microseconds (20,000 times a second).

A step motor, (also a PMSM motor) has 50 poles instead of 6 poles. The math transforms would have to execute over 8 times faster (50 poles / 6 poles). This is beyond the ability of any microprocessor to handle.

Of the transforms, the Clark transform and its inverse is more trivial. It converts a rotating 3-phase vector into an orthogonal rotating 2-phase vector. A step motor is an orthogonal 2-phase motor to begin with so the Clarke transform and its inverse can be discarded.

The Park transform converts a rotating 2-phase vector to a stationary reference. The servo PID magic is applied to stationary vector and the inverse Park transform restores it to a rotating vector to move the motor.

The problem is the Park transform requires requires 4 multiplications by sine and cosine and its inverse requires 4 more multiplications by sine and cosine for a total of 8. At 6.000 RPM, these calculations and the sum of the products as well as 2 proportional-integral calculations have to be done in 5 microseconds. This cannot be done even with a fast MCU.

I just found a way around this problem and then some and it doesn't involve an MCU at all. It works so well I destroyed some perfectly fine NEMA 23 step motors well past 18,000 RPM (the motor ball-bearings failed). The Park transform and its inverse is solved using an analog circuit technique.

Regards to the encoder and my original request. The Park transform yields intermediary results in the form of D and Q signal components. Both decompositions were expected to be near constant DC volt values yet they were not. There was considerable modulation on these signals indicating there was a phase delay from encoder signal.

This calls into question the signal phase delay integrity from the encoder. I'm hoping the author of the AMT102 encoder study will respond. Otherwise I will have to revert to using an optical encoder.

Mariss
Reply With Quote

  #2   Ban this user!
Old 01-21-2012, 05:21 AM
 
Join Date: May 2005
Location: canada
Posts: 1,149
cyclestart is on a distinguished road

Jon Elson of Pico Systems did some testing and mentioned it on the emc mailing list.
Link:
Gmane Loom

It may not be the info you're trying to remember but hope it helps in some way.
__________________
Anyone who says "It only goes together one way" has no imagination.
Reply With Quote

  #3  
Old 01-21-2012, 02:30 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

cyclestart,

Thanks! That is what I was looking for.

The attached jpeg shows a repetitive, once per revolution waveform on vQ that shouldn't be there. This makes me think the CUI encoder is the source of this artifact.

Mariss
Attached Thumbnails
Click image for larger version

Name:	TEK00003.jpg‎
Views:	60
Size:	113.1 KB
ID:	150728  
Reply With Quote

  #4   Ban this user!
Old 01-21-2012, 03:37 PM
 
Join Date: Apr 2004
Location: VA, USA
Posts: 75
morestuff is on a distinguished road

The issue with the CUI encoders is the quality of the
internal phase lock loop that tries to generate quadrature
pulses that represent the result of the sine/cosine signals
provided by their internal capacitive sensors being
interpolated to provide sufficient resolution. This PLL
has issues with acceleration causing lag and overshoot
in the quadrature that it outputs. The higher the
resolution setting, the worse the problem. Of course
the problem is less if acceleration is low. Moderate
performance servo motors can usually get by with
them, but low inertia and high performance servos
may have problems.

Jon Elson of Pico Systems did a good bit of testing
with small servos running on an EMC controlled system.
The discussion that this caused can be found here in
the archives of the EMC-developers discussion list. See:

http://thread.gmane.org/gmane.linux....emc.devel/4499

He has used HAL Scope (the internal "scope" in the EMC
software) to capture simultaneous feedback from AMT
encoders and traditional optical encoders mounted on
the same motor.

Regards,
Steve Stallings
www.PMDX.com
Reply With Quote

  #5  
Old 01-21-2012, 04:15 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

Steve,

I'll be sure to thank Jon for discovering this CUI encoder behavior. The attached jpeg shows the same test setup but the motor is being commanded to run in the opposite direction. Ignore the 366Hz ripple on the yellow trace; I didn't have a summing node properly nulled.

What's interesting is the yellow trace waveforms are markedly different depending on the direction of rotation; if the motor was the cause of this then I would have expected to see a mirror image of the previous waveform.

The CUI encoder was set to 1,000 lines resolution (4,000 counts per rev). Monday I will replace the CUI encoder with an optical encoder. It will be interesting to see if the waveform flattens to an expected single minima and maxima per revolution.

Note the FOC control causes the 3.5A motor winding to draw only 130mA RMS (green trace) at no-load.

Mariss
Attached Thumbnails
Click image for larger version

Name:	TEK00002.gif‎
Views:	40
Size:	35.9 KB
ID:	150751  
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-22-2012, 10:53 AM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

That's an interesting project. Close loop stepper control looks quite a bit more difficult than I thought it would be at first glance.
Reply With Quote

  #7  
Old 01-22-2012, 11:55 AM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

What's also interesting is when I realized there is really no fundamental difference between a brushless DC motor (BLDC) and a step motor. Both are permanent magnet synchronous motors (PMSM).

Their only differences are pole-count and the number of phases. Step motors are 50-pole 2-phase motors while BLDC motors are typically 6-pole 3-phase motors.

There is a lot of literature on controlling 3-phase PMSM motors. The most popular control method is field oriented control (FOC) using the Clarke-Park transforms.

The Clarke transform converts a 3-axis current vector to a 2-axis current vector. The Clark transform isn't needed because a step motor's currents are already 2-axis vectors.

The Park transform converts the rotating orthogonal 2-axis vector to a stationary vector. The math is:

Id = Ia (cos theta) + Ib (sin theta)
Iq = Ib (cos theta) - Ia (sin theta)

and:

Vq = Kp (Iq + REFq) + integral Ki (Iq + REFq)
Vd = Kp (Id + REFd) + integral Ki (Id + REFd)

Inverse Park math:

Va = Vd (cos theta) - Vq (sin theta)
Vb = Vd (sin theta) + Vq (cos theta)

Microchip has a excellent application note AN1078 that summarizes the FOC math.

The FOC math computations are normally done by an MCU at a 20kHz repetition rate. This is fine for a BLDC motor because the low pole-count allows for a high RPM at a 20kHz sampling rate. To work with a step motor which has about 8 times more poles, the sampling rate would have to be 8 times higher for the same RPM. In effect, the math would have to be computed in 6uS instead of 50uS. This is beyond what is practical with an MCU.

My approach gets around this sampling problem entirely and doesn't use an MCU for these calculations.

Mariss
Reply With Quote

  #8   Ban this user!
Old 01-24-2012, 05:32 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

Thanks for the reference. I will take a look at it.

Not knowing any better, my initial approach to a step servo would be to scale the set point current in response to the positional error. But if it was that easy, it would not have taken you years to perfect. =)
Reply With Quote

  #9  
Old 01-24-2012, 09:54 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

H500,

When run with an FOC drive, a step servo (and a BLDC servo) takes on attributes of a true servo:

1) Motor current is proportional to torque load. A normal step motor drive running a 3A motor at 60 RPM from 24VDC at no load put 11 Watts into the motor. The FOC servo put only 0.5 Watts into the same motor at no-load at 60 RPM and the no-load phase current was less than 125mA. The only torque demand from the motor at no-load is the ever-present detent torque. Detent torque is listed as 3% of the motor's holding torque, and it requires 0.48 Watts to overcome that torque at 60 RPM. Theory meshes with experimental measurements very well here.

The Park transform generates two intermediate vector terms; iQ and iD. iQ is the torque producing vector and iD is the non-productive flux vector. The FOC algorithm nulls the iD vector to zero at low speeds while a step motor drive (open-loop) has this vector at a maximum (near zero iQ component, near maximum iD component). Big "thumbs-up" for the FOC algorithm.

2) An open-loop step motor drive excites the motor into various vibration producing resonance modes. The open-loop drive requires careful design to mitigate this bad behavior; 3rd harmonic compensation to limit low-speed resonance, 2nd order damping for mid-band resonance.

An FOC closed-loop servodriven step motor exhibits no resonant behavior at all because the motor response is entirely bound the encoder. The closed-loop's damping factor completely suppresses all native resonances and the motor is utterly vibration free at all speeds.

3) Accuracy: An open-loop step motor drive accuracy is determined by motor characteristics; its cyclic error non-accumulative tolerance, inductive reactance phase lag and its angular position error versus restoring torque transfer function. The first is least significant because it accounts for +/- 0.09 degrees error. The second introduces a 1.8 degree lag error and the third introduces an additional 1.8 degrees angular error.

Simply put, a stopped or slowly moving open-loop motor has to be displaced from its position by +/-1.8 degrees to develop full torque. At high speeds (inductive phase lag), an unloaded motor lags 1.8 degrees behind where it should be and develops full torque when its 3.6 degrees behind.

A closed-loop motor develops full torque when it's displaced +/-0.09 degrees (using a 1,000-line encoder). The servoed motor's "stiffness" is much higher than for an open-loop drive.

4) Motor power. An-open-loop step motor has to have at least a 50% power reserve to insure reliable operation; one momentary overload event will stall the motor. A closed-loop drive is more forgiving; an momentary overload event will generate a following error which is then made up once the event passes.

5) Finally, why bother with a difficult step motor servo design when there are perfectly reliable BLDC servo designs available?

Step motors are high pole-count permanent magnet synchronous motors. They are high-torque, low RPM motors when compared to their low-torque, high RPM BLDC brethren.

On most mechanisms a BLDC motor has to be geared down to trade in unneeded RPM for badly needed torque. A step motor generates about 8 times more low-speed torque for the same frame size motor and often requires no gearing down at all. Gearing is expensive, adds to a mechanism's complexity and subtracts from its reliability.

Mariss
Reply With Quote

  #10   Ban this user!
Old 01-26-2012, 05:54 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

Close loop definitely have very desirable characteristics. The only drawback is the cost of the encoder. But the improved efficiency might allow the use of smaller motors to offset the cost.

When do you expect to have a commercial product ready?
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 02-21-2012, 07:45 PM
 
Join Date: Jan 2005
Location: Toronto, Canada
Posts: 1,102
H500 is on a distinguished road

Mariss,

Have you experimented with sensorless FOC? I see several write-ups describing deducing the rotor position from the back EMF. At low speeds, regular microstepping is used since there is no EMF. At higher speeds, the drive switches to FOC. The drive would lack the resolution of an encoder base system, but it's not needed for common applications. I think the option to not pay for an encoder would be very appealing.
Reply With Quote

  #12  
Old 02-21-2012, 09:01 PM
Gold Member
 
Join Date: Mar 2003
Location: United States
Posts: 2,717
Mariss Freimanis is on a distinguished road

I'm familiar with the literature regarding sensorless motor drives. Some of the techniques are very clever in implementation using Kalmann equation filters. Sensorless FOC is viable if your intent is to manufacture a PMSM (permanent magnet synchronous motor) speed control. It isn't a viable solution if the intent is to manufacture a PSMS servodrive.

Mariss
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cutting PVC, requesting Help!!!! Burnit0017 General Material Machining Solutions 4 07-14-2011 09:34 AM
Requesting help with DeskCNC ??? Burnit0017 Carken Products (Deskam, DeskCNC etc) 4 06-22-2011 05:48 PM
Requesting Programs from Machines stang623 General CNC (Mill and Lathe) Control Software (NC) 0 10-19-2010 02:48 PM
Newbie- Requesting suggestions for aluminum cutting h4x354x0r General Metal Working Machines 6 08-02-2010 10:54 AM
Newbie Requesting Help.. Photos Attached cflanagan CNCzone Club House 0 01-20-2007 06:43 PM




All times are GMT -5. The time now is 08:29 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361