585,758 active members*
4,608 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > KFlop/SnapAmp - BDC Servo Beginning Tuning - Oscillations - Tracking Errors
Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2013
    Posts
    23

    KFlop/SnapAmp - BDC Servo Beginning Tuning - Oscillations - Tracking Errors

    Hi All,

    I'm beginning setting up a Brushed DC Servo on Ch0 -> CH8 on Snap.
    First off - I'm more than a bit rusty on the servo stuff.
    There's a lot of options and possible combinations - too many to digest really.
    So, I just made a few guesses and the results not too favorable.
    The motor quickly goes into oscillation or doesn't track well.
    I've tried to attach some screenshots of bode plots and step responses.

    I hope the attachments get uploaded correctly...

    On the smaller steps 100 to 750, things seem to work ok. At 1000 and above
    it has problems. At the point that the move fails, the motor gets stuck at an
    encoder count and then periodically 'pings' and moves like 1 or 2 counts.
    I don't seem to be able to get the P - gain above 1.5 without problems.

    Looking at the bode plots I'm not sure what to make of them other than they
    don't look quite like others I've seen.

    So, any thoughts as to what to try, things I might have missed on/in setup or
    anything else relevant would be appreciated. Is there any type of a flowchart
    that when you see this - try this?

    Additional System info:
    Motor voltage 72V
    Encoder 1000 ppr
    Geared 3:1
    Ballscrew 5.08 tpi

    Thanks in advance for the assistance,
    Matt
    Attached Thumbnails Attached Thumbnails 100.PNG   250.PNG   750.PNG   1000.PNG  

    B-250.PNG   B-500.PNG  

  2. #2
    Join Date
    May 2006
    Posts
    4045
    Hi Matt,

    Here are some comments:

    It seems like your encoders are quite noisy. Are they magnetic or capacitive rather that optical?

    There seems to be a large amount of stiction. I can tell because the output (green plot) ramps up significantly without any movement.

    DC Servos are inherently unstable with only P Gain. This is because the output is acceleration. It is like being in a car and taking your foot off the accelerator as you reach a stop sign - you will overshoot your target. Some sort of phase lead is required to start stopping before you reach the target. The simplest way to add phase lead is to add D Gain. Try that.

    Regards
    TK
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Mar 2013
    Posts
    23
    Hi,

    I did some testing and found that reducing the values in the output and integrator boxes helped some. Dropped to 200.
    Initial testing does validate that adding considerable D - 3x or more than P helps a lot.
    It seems the higher values of P : D try to hold the non-moving position much stronger but also creates
    quite a lot of audible noise.
    I'll post more plots Tues when I can get back to testing.

    Thanks,
    Matt

  4. #4
    Join Date
    May 2006
    Posts
    4045
    It shouldn't be necessary to limit the Output to make things stable.

    With higher D gain the Output (green plot) will have "spikes" whenever the encoder suddenly changes by a count. Those can be smoothed out using a Low Pass Filter and become more effective. Use the 3rd Filter and something like 2nd Order Low Pass Freq=1000 Q=1.4.

    Or actually a Lead/Lag filter that only gives phase lead where it is needed (at the 0db Gain crossover frequency) can work better than D Gain.

    Regards
    TK
    http://dynomotion.com

  5. #5
    Join Date
    Mar 2013
    Posts
    23
    Here are the results from round two (attached screenshots)

    Seems like a fine line to adjust performance for small steps vs large steps

    I would like more info on implementing the lead/lag filter.
    Also it looks like feed forward could/should be useful too.

    There's not a lot of info on these in the manual or in the online manual
    I'll do some searches on the forum to see what turns up.

    If anyone can point me to more/better info on any of this, it would be appreciated.

    Thanks for the help,
    Matt
    Attached Thumbnails Attached Thumbnails 2K-Step 1st Corner.PNG   2K-Step 2nd Corner.PNG   2K-Step 3rd Corner.PNG   2K-Step.PNG  

    20K-Step 1st Corner.PNG   20K-Step.PNG   BodePlot.PNG  

  6. #6
    Join Date
    Mar 2013
    Posts
    23
    Did some more searching - found that the lead/lag (also referred to as lead-lag in the documentation - diff syntax doesn't help the search)
    Is created using the pole-zero filter - and there is some documentation to support this.
    Albeit not quite as straightforward as it would appear - at least in my case.
    Applying the filter occasionally shifted the crossover point - that was interesting. Seems like minor tweaks to the values allow you to
    hone in on what seems to work.
    It definitely seems to take the need for the D parameter out.
    It also creates quite a bit of chatter trying to hold position.

    Still not really sure how to tune in with the feed forward parameters yet.
    Also read that the dead band parameters may help in the chatter department.

    I'll post the results tomorrow with anything else I find.

  7. #7
    Join Date
    Mar 2013
    Posts
    23
    Still working on things.
    Getting rather frustrated with the tuning effort.
    It would be really nice if there were some sort of guidelines on this process, especially since there
    are so many parameters that can be adjusted.
    Like - when you see this in the step response or bode plot - try adjusting this parameter.
    Or - current is spiking or approaching limits - adjust this parameter to smooth the current out.
    There is lots of info to be had, just not very cohesive in its presentation.

    Another item that is frustrating is when the drive does fault - there is really no information about the fault.
    Yes there is a "ShowSnapStatus.c" - but in my case that tells me nothing. Just the fault bit set - none of the others.
    And where is the documentation on the SnapAmp functions? Or the KFlop funtions, for that matter - info given is really just like a 'C' function prototype.
    I'm not even going to get started on, oh - there's a fault/error... If the hw/sw can detect it, just tell me what it is.
    (I could rant for some time on this subject)

    I have also determined that I need to change the direction of one of my axis. The manual seems to infer that changing the 'input gain'
    to a negative value should accomplish this. This does not work. Immediately faults. The position just goes in the other direction.
    What is needed to change positive movement in one direction to be positive in the other/opposite direction?

    I think I'll stop now before I do go off on a rant/tangent and get counter productive.

  8. #8
    Join Date
    May 2006
    Posts
    4045
    Hi Matt,

    If you have a more or less working servo system then if you invert any single thing in the feedback loop you will have positive feedback (the motor will drive the wrong way to correct an error) that will result in a fault.

    You can reverse your DC motor connections also to restore negative feedback.

    KMotionCNC also allows a negative resolution to move an axis the opposite direction

    Regards
    TK
    http://dynomotion.com

  9. #9
    Join Date
    Mar 2013
    Posts
    23
    Yes - that is obviously what I observed.

    This one question was - "What is needed to change positive movement in one direction to be positive in the other/opposite direction?"
    Let's say the axis moves left to right and back right to left when the step move is applied. How to make it go right to left and back left to right when the same step move is applied.
    Is there anyway to do this in the settings/software/setup?

    The other main question was: How do I get more detailed information about a drive fault?

  10. #10
    Join Date
    May 2006
    Posts
    4045
    Hi Matt,

    Reversing InputGain0 can be used to reverse the Encoder Input. For a DC Motor most Users just reverse the two motor connections to reverse the output. If you are not able to do this for some reason you should be able to change the signs of the B coefficients of IIR Filter #2 to reverse the drive (for a Unity Gain Filter change B0 from 1 to -1) See here and here.

    If you are using KMotionCNC you can also just reverse the sign of the Counts/inch in the Tool Setup.

    There isn't any other information on a drive fault. It is either over current or over temperature. Over temperature is usually rare and obvious as it is a slow process and you could check the temperature readings on the Analog Screen. Otherwise it is over current. For diagnosis you can make a move on the Step Response Screen and check the Current Plots to see if it is peaking too high.

    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. Replies: 158
    Last Post: 12-08-2014, 05:41 PM
  2. KFlop + External Servo Drives
    By arvidj in forum Dynomotion/Kflop/Kanalog
    Replies: 5
    Last Post: 12-13-2012, 11:16 PM
  3. KFLOP+Kanalog Analog Velocity Servo tuning
    By bradodarb in forum Dynomotion/Kflop/Kanalog
    Replies: 9
    Last Post: 07-01-2012, 01:19 AM
  4. Servo tuning with SnapAmp
    By powerr in forum Dynomotion/Kflop/Kanalog
    Replies: 11
    Last Post: 12-23-2011, 08:16 PM
  5. Servo tuning or other errors when circular interpulating
    By Zipdrive in forum Mechanical Calculations/Engineering Design
    Replies: 6
    Last Post: 02-02-2006, 01:37 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •