AC and DC Servo projects with Kaflop+Kanalog - Page 5


Page 5 of 6 FirstFirst ... 23456 LastLast
Results 81 to 100 of 102

Thread: AC and DC Servo projects with Kaflop+Kanalog

  1. #81
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Went back and made sure each drive channel was disabled. I then loaded the KanalogInitial.mot file and got movement. Did it a few times before I enabled the limits and this time it kept working. I checked that the limits stopped any movement and they do. I still dont know what was wrong but at least I can start tuning.

    So many projects, so little time...


  2. #82
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    I think I am done working out of town and can get back to spending some time on this project. I have tuned the servo on the Z axis as far as I can using PID and dont know what to do next. The response right now is fair and the position stays on track with the command output that is given but I would like to speed it up. I have only used P and D. Anything over the current levels doesn't produce any better output from the servo. Being new to all this I really dont know what numbers to put in or what to use now to get the motor to respond better. Any dirrection on what to do next would be a great help.
    AC and DC Servo projects with Kaflop+Kanalog-img_1041-jpg

    So many projects, so little time...


  3. #83
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default

    Hi Myk,

    The first obvious thing would be to reduce the spikes in the commanded output (green plot) by adding a low pass filter. Because of the high D gain of 800 a single change of 1 encoder count causes a spike of 800 in the output (which is also your Max Allowed Output). Add a 2nd order Low Pass Filter of 500 or 1000Hz Q=1.4 into the 3rd IIR Filter on the Filter Screen. This should smooth out the Output and reduce the spikes in the green plot.

    Don't be surprised if this causes your system to go unstable. It doesn't mean this is making things worse. It just means that the effect of the D and P Gains is now more effective and these gains need to be reduced.

    Instead of taking a photograph of your screen you can use the Alt-Print Screen Button on your Keyboard to copy the current Window. Then paste into some program like Paint.exe and save it as a *.png file. Also we need to see all 3 screens that configure your axis:Step Response/Filter/Config. And it isn't possible to see the performance on such a large scale. You need to plot the error rather than the position, or zoom in (left click drag), or save the raw data to a file. By saving the raw data we can then display and zoom in however we wish.

    Regards

    Regards
    TK http://dynomotion.com


  4. #84
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Here is the image from the 2nd low pass filter. I fist used 500 but it got noisy after the move. I then changed to 1000 which worked fine. Performance is unchanged.
    AC and DC Servo projects with Kaflop+Kanalog-2lpf_1000k-png

    So many projects, so little time...


  5. #85
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Not sure what to change next. I have played with the "V" and "A" in feed forward. I get great response but it is bouncy. the motor is capable of much higher speeds but I cant keep position using just the "V" and "A". I dont know enough about KFLOP and CNC Motion to control that. I have attached an image of the point where things noticable start to fall apart. Hopefully this gives and indicator of what to try next.
    It appears that the next steps are:
    #3 add Lead/Lag compensator to increase phase margin (this often works better than using D gain)
    #3 increase Max values (Output, Integrator) to allow driving the motor amplifier higher to allow higher speeds
    But I dont know what values to try.
    AC and DC Servo projects with Kaflop+Kanalog-2lpf_1000k_vafallout-png

    So many projects, so little time...


  6. #86
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    I have ventured into the territory of Filters in an effort to move ahead. Had read another post from Tom that talked about the "Pole-Zero" Filter being the next step after the 2nd low pass filter. From what I read this is a way of adjusting Lead/Lag to increase phase margin and not using "D". I tried the numbers on the other post and other numbers but the result was basically the same. The output almost completely saturates the screen (green background). The move profile changed little.
    AC and DC Servo projects with Kaflop+Kanalog-2lpf_1000k_filters-png

    So many projects, so little time...


  7. #87
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default

    Hi Myk,

    Your FeedForwards are too big, leave them to zero until after you have set the feedback parameters. As you can see in the plot the output is going too much positive and causing the axis to move too fast and get way ahead of the trajectory. This happens as soon as the feedback loses the fight against the huge feedforward values.

    On the filter screen you have 2 low pass filters. One is in Filter #0 and the other is in Filter#1. The bottom coefficients are what matter. The top portion of the Filter Screen is is only to help compute the Z coefficients that KFLOP actually uses. Clear Filter #0.

    The plot from several posts ago looks pretty good but you forgot to post the data or zoom in so it is impossible to tell what the performance really is.

    You will probably need to increase the Max Output to get higher speeds. 2047 corresponds to the full 10V range. Do not increase beyond that value.

    Regards

    Regards
    TK http://dynomotion.com


  8. #88
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Here are some new screen shots. Full Screen, Zoomed into top left corner of the full screen, and a filter screen. I included a Bode Plot but have no idea how to read it.
    After making changes to the Filter screen I now get an audible noise after the move. I had a fan going earlier so maybe it was there but I did not notice. After the screen shots I changed the max output to 2047 and the integrator to 1600 but got no performance change.

    AC and DC Servo projects with Kaflop+Kanalog-bodeplot-pngAC and DC Servo projects with Kaflop+Kanalog-filterscreen-pngAC and DC Servo projects with Kaflop+Kanalog-lpf2_fullscreen-pngAC and DC Servo projects with Kaflop+Kanalog-lpf2_zoom-png

    So many projects, so little time...


  9. #89
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default

    Hi Myk,

    You should place the Low Pass filter into Filter #2. I tried to explain to clear Filter #0 not Filter#2. This is because filter #2 is used by the feed forward as well to smooth it so later if feed forward is used it will make a difference. See:

    Servo Flow Diagram

    The Bode Plot shows a bandwidth of over 100 HZ which is pretty good. Can you see where the blue plot crosses through the 0db level? The bandwidth is the highest frequency where errors will still be significantly corrected. So errors introduced at less than 100 Hz the servo feedback will be able to significantly reduce, but errors higher than 100 Hz the servo will react too slowly to make a significant reduction.

    However the phase margin is fairly low at only 20 degrees. The phase margin is a measure of how stable a system is. It is the margin from where the corrections would lag by 180 degrees. Lagging by 180 degrees basically results in a system with positive feedback instead of negative feedback and a system that oscillates.

    Reducing the gains will lower the bandwidth and increase the stability. Or utilizing a lead/lag filter can be used to improve the phase margin. But this is fairly complex for someone who doesn’t understand the relationships between parameters to achieve a good result. The tendency is to assume that if adding one thing (like a low pass filter or Lead/Lag compensator) causes the system to go unstable then it is a bad thing. So they give up on that thing. But often it can result in a better result if other things are adjusted as well.

    Although the zoomed in plot shows the tracking a bit better the left axis is still over 3000 counts which makes it impossible to see any details to determine how small the errors really are. If you were to post the data then we could zoom in to whatever level we want or plot the errors. Another option is to plot the error. This makes it much easier to see the error without zooming in at all. But overall I suspect the performance is fairly good.

    The noise while sitting still is a fairly common issue with servos. The servo will always be trying to make corrections which may result in a noise. This usually has no effect on performance but can be annoying. It can often be reduced by reducing gains (and performance) or by adding a small deadband.

    Increasing the Max Output had no effect because the move speed you were testing did not require higher output. So it makes sense that it had no effect whatsoever on the result. However you should now be able to attempt higher speed moves.

    You should calculate the resolution of your system in terms of counts per inch. Then determine what your requirement for accuracy is and how it relates to number of encoder counts. You should also determine your requirements for maximum speed and the associated accuracy at various speeds. The accuracy while performing Rapid movements is likely to be less then at cutting speeds.

    HTH

    Regards
    TK http://dynomotion.com


  10. #90
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Tom, that is a lot of good information. I changed the Filter screen. Thanks for the explanation, that makes it more clear. I have also attached some data so you can have a look at the results of the current settings. As for using a lead/lag filter I am up for the challenge as long as you can guide me along. I do not at this point understand how all the numbers influence each other but I cant learn it if I don't do it. This project was for getting the machine to work but even more so for the education in servo systems.

    I saved the data from the last plot and attached it. Hope that helps out more... Ooops max file size is for a txt file is 500KB and my (ANSI) file is 928KB. I have converted it to a PDF but that ended up being over 300 pages. Next I chose Excel but that was 519KB. Let me know if there is another way. I dont have any way to zip a file or I would try that.

    Calculating the resolution in counts per inch is foreign language to me. I have no idea where to start. Again I'm in this to learn what I can so I'll do some looking into it and see what I can find. Any help would be great.

    AC and DC Servo projects with Kaflop+Kanalog-filterscreen-png

    So many projects, so little time...


  11. #91
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default

    Hi Myk,

    Thanks for sending me the data off-line. But there are many ways to zip a file. I like 7-Zip. It is free at:

    7-Zip

    If you can't calculate your resolution just measure it. Make a big move and measure the distance. For example if you move 20000 counts and the axis moves 10 inches then your resolution is 2000 counts per inch.

    Please move the Low pass filter to the 3rd IIR filter as I requested before.

    I've plotted the position error. It looks reasonable but there is some low amplitude oscillation. I also zoomed in on the oscillation so you could see it better. The first step should be to reduce this. Probably by reducing the P Gain. Try that. Please include screen shots of all your settings so we don't have to assume what they are.

    There is also some relatively constant error while moving at high speed. About 45 encoder counts. Adding some I gain (start with 0.001) should reduce this. As you increase it the error should reduce. At some point the servo will go into oscillation. Then reduce it by about a factor of 2.

    HTH
    Regards
    TK

    Attached Thumbnails Attached Thumbnails AC and DC Servo projects with Kaflop+Kanalog-poserror-png   AC and DC Servo projects with Kaflop+Kanalog-poserrorzoom-png  
    Regards
    TK http://dynomotion.com


  12. #92
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    I measured a move of 82,000 on the step response screen. I tracked the distance with digital calipers. The distance moved was 1.002. If my math is right that is 80,392 counts per inch. That is assuming 82,000 in one direction and then 82,000 back to the starting point.

    Last edited by Myk Bates; 05-31-2013 at 02:59 PM.


  13. #93
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24216
    Downloads
    0
    Uploads
    0

    Default

    Not 81,836/inch?
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  14. #94
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Your right Al. I must have fat fingered a number. This is on the Z axis but I dont know if that number is good bad or indifferent.

    So many projects, so little time...


  15. #95
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24216
    Downloads
    0
    Uploads
    0

    Default

    Smallest input increment or a resolution of .3098µm or 0.00001222" !!
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  16. #96
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    So it's not good or bad. It's extreme! I guess 3d profiling will work but I'm sure this will slow down the system as the servo tries to compensate for all the resolution. I probably could have done fine with an encoder that had 1/4 the resolution



  17. #97
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Can anyone tell me how this outrageous resolution will affect me tuning these servos? How critical is position error? What is an allowable amount? Or does it make no difference at all? I need to move forward on this project again but in light of the absurd resolution I am wondering just how to move forward.

    So many projects, so little time...


  18. #98
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default

    Hi Myk

    Hi resolution is good. The only real disadvantage is that it can limit the top speed because the encoder inputs have a max count rate. KFLOP encoder inputs are specified at 1MHz. So you should keep your speed under 12ips (700ipm).

    It doesn't really have any effect on the Servo calculations.

    It is up to you to decide what is a reasonable following error for your machine and requirements. Just divide the following error by your resolution to determine the distance. So for example a following error of 83 encoder counts at a resolution of 83,000 counts per inch would correspond to a following error of 0.001 inches. Also realize that when doing a high speed rapid you probably don't care what the errors are. So better to check what your errors are when at useable cutting speeds.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  19. #99
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Tom

    I am confused about the filter screen. On 4-29 you asked me to move the low pass filter to the second screen. On 5-19 you asked me to move it to the third screen. What should I have on each of the three screens ?

    So many projects, so little time...


  20. #100
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default

    Hi Myk,

    It seems we have a communication problem. Please read carefully. First of all there is just one screen that has 3 filters.

    The 3 Filters are Labeled #0, #1, #2 (not 1,2,3)

    The 1st filter is #0
    The 2nd filter is #1
    The 3rd filter is #2

    Put the Low Pass Filter in the 3rd Filter (#2). Make sure the lower section of any unused filters are clear.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


Page 5 of 6 FirstFirst ... 23456 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

AC and DC Servo projects with Kaflop+Kanalog

AC and DC Servo projects with Kaflop+Kanalog