Machsupport Forum

Third party software and hardware support forums. => CS-Lab => Topic started by: Davek0974 on November 01, 2016, 09:18:13 AM

Title: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 01, 2016, 09:18:13 AM
Is it possible for some kind soul to explain if I have any issue here or not please... :)

I have 3000rpm AC servo motors and they are controlled by 10-0-10v from the IP-A as normal.

However, I have my motor tuning velocity set to 3000mm/min as its not a very big mill and pretty old.

With the lead-screws I have (inch) they are 5.08mm/rev and I have 2:1 belt reduction so I think the motor will never do more than 1181rpm ((3000/5.08)*2)

Does this matter or am i ok here - I'm finding confusing info about motor tuning and matching the control signal to the speed etc.

I cant change the belt drive reduction but I have found the setting parameter for the drives that reduces the motor speed per input volt.

Thanks
Title: Re: IP-A and Servo drives, voltage matching...
Post by: mikecole on November 04, 2016, 10:19:25 PM
Dave,

Most closed loop servo systems utilize amps that have tachometer feedback from the motors. Many have amps with encoder feedback as well. Also, the IP-A control can compute the RPM of the motor based upon encoder feedback. This is how my machine works. I am running at about 175imp for my rapids even though the machine is capable of running at 200ipm rapids based upon max RPM for my servo motors. So, to directly answer your question, your settings should be fine as long at your amps are getting proper tachometer feedback from the motors and as long as the CSMIO-IP/A is getting proper encoder feedback.

The automatic PID tuning worked really well on my machine. You should run the auto-tune first and see if you get good results. For me, good results were errors less than 5 encoder pulses. Make sure your amps are in good tune to start with, otherwise you will never get good results from the CSMIO/IP-A autotune.


Hope this helps!
Mike
 

 
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 05, 2016, 10:12:09 AM
Thanks Mike

The best tune i can get is manually and gives around 300 count following error when doing rapid jogs back and forward, encoders are 10,000 count.

I cannot tune the amp to motor as it is 'supposed' to be automatic just by setting the motor type parameter, the manual is in heavy Chinglish so not much help.

The drives and motors came from China via AliExpress store.

The parameters are all there but without knowing exactly what to do, i would not fiddle with them.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: mikecole on November 07, 2016, 12:24:52 AM
ah bummer about the Chinglish... Some ideas for you:

Do you have a oscope? If yes you should verify the amps are seeing tachometer feedback from the servos.
Verify your encoders are 10k count or is that 10k edges? Remember that a 10k encoder would provide 40k edges which is what the IP-A cares about. That's a lot of precision!
You could also remove a belt from one of your servos and run it with a fixed DC voltage to the amp. As an example, +5vdc should spin the servo at 1500 RPM clockwise. If this is not the case you need to futz the settings for the amp. You'd need an oscope to look at the tach signal to measure RPM.

Is this a new machine your building or is it a retofit?

Mike



Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 07, 2016, 02:21:49 AM
Hi

this is a retrofit/conversion of a manual mill to cnc.

Yes i do have a 'scope but would not know how to do those tests, the encoders are 10,000 all edges, 2,500 count. I would feel certain that they are working correctly or else it would run away / fault out ?

They do run at 3000rpm for 10v input so that sounds ok?

Its just the amp pID loop that I can't tune due to the chinglish, as well as lack of knowledge.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: mikecole on November 07, 2016, 04:07:06 PM
Hmm,

Well your troubleshooting instincts are good... Testing the tach signal should be easy, it's likely a +5vdc square wave, one pulse per rev so 3khz = 3000 rpm. 1.5khz = 1500rpm. Probe at the connection to the amp.
It's good that the servos run 3k @10vdc but it would be reassuring to know they run at 1500 rpm at 5vdc. This will at least tell you that there is a linear relationship between control voltage and RPM since this is what the IP-A expects.

I agree with you, this really sounds like a problem with the amp parameters... Can you even be sure that you have connected the tachs to the right pins given the poor docs?

Good luck!
Mike





Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 07, 2016, 04:19:30 PM
The motor cables are pre-wired to sockets/plugs so pretty much impossible to get wrong :)

The encoder signals from the drive to the IP-A would also give fault is wired wrong.

It all seems to work right, just with a bit of a following error, the best tune i could get was to tune for lowest following error in sequence - P, I, D, Vff they seem pretty stiff and stop sharp except for the Z drive which has a smaller motor and is still like jelly - you can move the pulley by hand a fair bit and it will pull back whereas the X & Y are locked solid.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: mc on November 09, 2016, 04:43:49 AM
Dave, the motors you're using don't have any tach signal, they only have encoders. If things weren't wired correctly, then the drive would trigger a fault.

Your following error does sound pretty high. My Lathe can manage sub 50 on both axis, but it took a bit of manual tuning to get there, with some tips thrown in from somebody who really knows about tuning.

Essentially you keep increasing P until things go unstable, back it of slightly, increase D until things go unstable, then back it of slightly.
Repeat the above a few times, until you find the limit of stability.
Then apply some I, but once you apply I, you may have to decrease PD, as I makes things unstable.
Auto-tuning will usually get reasonable performance, but it rarely works well with unbalanced axis i.e. vertical Z axis.

There could also be a problem with the controller fighting against any inbuilt filtering in the servo drives, which is something I hit when trying to run my Kinco servos in Torque mode. Torque mode should in theory give you better performance, but tuning is far more critical.
I'm not sure what tuning/plotting capabilities CS-Labs have, but KFlop comes with some very good tools so you can generate various plots, and see exactly what is happening. Being able to see the output oscillating, along with the following error under different conditions makes tuning far easier.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: mc on November 09, 2016, 04:47:06 AM
Just found a relevant post from Tom Kerekes (The man behind Dynomotion), from the yahoo group explaining a bit about tuning-

Quote
Unfortunately Servo Tuning is complex. There isn't really a simple - this parameter causes this problem situation.  Everything somewhat interacts and needs to work together to get the desired result.  Every system is different and has different requirements.

But basically and simplistically:

P Gain simply applies an Output Drive Proportional to error (how far the system is away from the Desired Target Destination).  This is usually the primary source of corrective feedback.  ie used for: "If way off to the right side of the road turn way left"

I Gain increases or decreases the Output Drive at a rate proportional to error (Output is proportional to all previous errors accumulated).  Corrects small persistent errors.  ie used for: "If slightly off to the right keep gradually rotating the steering wheel to the left until centered"

D Gain applies an Output Drive proportional to the rate of approach to the target.  ie used for: "Rapidly approaching a stop sign - apply brakes until speed is reduced"

PID values will influence how the system responds dynamically to errors.  Filters will also influence the dynamics of how the system responds and offer additional and more flexibility than PID values.  It is very difficult to intuitively predict how a change to PID+Filters will affect the dynamic system behavior when thinking in the time domain.   Working in the frequency domain is much more intuitive.  There is a considerable learning curve involved which is beyond most Users but is really the only way to have an understanding of the dynamics of a system.  It involves a two step process.  #1 one must understand how the shape of the Magnitude/Phase plot (Bode Plot) of the system will determine its response. #2 one must understand how PID+Filters will affect the Bode Plot.  For example a Bode Plot with a High Bandwidth and with large Gain and Phase Margins will correct errors quickly and be a stable system.  A Low pass Filter will reduce the amplitude of higher frequencies and introduce phase lag at higher frequencies.   Integrator Gain will increase the magnitude of low frequencies and add phase lag.  D gain will increase the magnitude of higher frequencies and add phase lead. 

This is all classical control theory.  There are numerous resources on-line
http://www.google.com/search?q=pid+tuning+tutorial

Regarding Max Limits: in general when a system is operating normally Max Limits (Errors, Output, Integrator, Following) should have no limiting effect and should have no influence on the dynamic response.  Generally the Max Limits are designed to help in abnormal situations in order to avoid an overly violent system response to the abnormal situation.  For example Max Integrator reduces a problem referred to as Integrator Wind-up.  If you take a well behaved and well tuned system (with some I Gain) and force the motor off of target a small amount and hold it off for a long time the Integrator will accumulate a huge amount of error.  If you suddenly release the motor shaft the system will respond with a violent overshoot.  Max Integrator can be used to make the integrator stop accumulating error at some level.

The order of tuning operations are usually:
#1 start with P gain
#2 add D gain (2nd order low pass filter 1000Hz Q1.4 will reduce output spikes)
#3 repeat #1 and #2 a few times
#4 add small amount of I gain

HTH
Good luck
Regards
TK
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 09, 2016, 05:58:11 AM
Thanks, that really does read as a complex process and some skill needed ;)

I know the parameters are all there, but the manual gives no help at all, does not describe them very well and just presumes the user would enter a simple motor code and all will be well - this does not take any notice of what load you have on the motor though which seems important to me I think??

Tuning the drive sounds like the answer but with little knowledge and no display - its just LED numbers, I would not know where to start really, the supplier was of little help as expected "Just enter the motor code" was the reply.

The CSMIO controller does have a good graph display on the PID screen but as it states in the manual, if the drive is not tuned correctly it is a waste of time trying to get a good setup.

Drive manual link below...
Title: Re: IP-A and Servo drives, voltage matching...
Post by: mc on November 09, 2016, 06:19:56 PM
The default drive tuning for the selected motor should be pretty good on modern digital drives. I know trying to tune my drives didn't make much difference to the end result. Depending on what mode you're running the drives in, depends on just how much the drive tuning affects thing. Torque mode at most you'll get some input filtering, Speed mode you'll also get a bit more tuning to ensure the speed is stable, and Step/Dir mode the full tuning in the drive is used.
What CS-Labs will be referring to is older amplifiers, where you had to manually tune the amplifier to match the motor, otherwise you ended up trying to tune the PID loop with an already unstable motor/amplifier.

I'd try adjusting the PID loop in the IP-A as per the instructions above, and see if you can improve things.
I'm not sure how you test moves with the IP-A, but the KFlop software gives you the option to quickly edit the settings, then command a back and forth move, at which point a plot is displayed, so you can see almost instantly how things have changed. It is wise to have your hand over the E-Stop though, just in case you trigger some big oscillations (been there, got the medal, and even managed to overheat the motor!)
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 10, 2016, 02:18:19 AM
Thanks, that does make sense, we have some older machines at work with manual drives and they had to be tuned properly so i think i know what type you mean.

I will revisit the tuning this weekend and see what happens.

The Flop sounds very similar - the CS-Labs have a graph and easy to set variables so its not too hard to do - the hard part is knowing what to look for and when to back off.

Also what speed do you tune at?

Needs a concise write-up i think, should help many users - any takers???

:)
Title: Re: IP-A and Servo drives, voltage matching...
Post by: mc on November 10, 2016, 04:24:49 AM
Ideally the tuning move should reach the maximum speed the machine will run at, however you should gradually work up to that when tuning, just to avoid causing any prolonged wild oscillations if a change in PID settings makes things badly unstable.

KFlop lets you do two different types of moves. A block step move, and a move limited by the Velocity, Acceleration, and Jerk settings.
The block step is an instantaneous command (i.e. Acceleration and Jerk settings are ignored) to move the requested position amount, which you use to determine just how quickly the system can accelerate, and how quickly it can handle peaks in command, but it's brutal on the machine.

The VAJ limited move is more like a move you'd command during G-Code running, which is what you use for normal tuning.

What you're looking for when tuning, is for when things become unstable, then backing of a bit.
Ideally after sudden change in requested position/speed, there should be a short peak in output, which should quickly settle down with minimal oscillation.
If you have no peak, then the output isn't being driven hard enough, and you're following error will most likely jump up until things catch up.
If you have a peak, that is followed by endless oscillations, then best case scenario the following error can be pretty low, but the servo will be continually oscillating to stay on position, and in the worst case, the servo will be wildly oscillating with a huge swing in following error.
You're aiming for a compromise between the two.

And I've just remembered there's a guide on the Dynomotion wiki - http://www.dynomotion.com/wiki/index.php?title=Main_Page#Axes_Servo_Tuning_and_Trajectory_Planner
Some of it won't apply, but the underlying process will be very similar.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 10, 2016, 05:41:47 AM
Thanks,

i had a look at the link but the terminology is totally different so could not apply it to my system.

I will re-read the earlier posts and have another play this weekend hopefully.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on November 13, 2016, 08:32:09 AM
Spent a good few hours this morning playing with tuning, did not get any further forwards or any improvement over where i was at the start.

I can get it the oscillate, vibrate, overshoot etc but its all speed relative - tune slow, will not run fast, tune fast will not run slow.

There seems to be a massive amount of contradiction on tuning as well - the CS-Labs manual says tune P first then add I, earlier in this thread I was advised tune P first then D.

I have tried both, D seems to very little.

In the end i pushed P until i got oscillation at a certain speed, checked it at various speeds then backed it off, the added I until I saw no further improvement in following error, then tweaked it with a little Kvff. So its back to where I was before, I cannot get following error below about 380-400 on this axis (X).

I can't find any videos either - it must be specific to CS-Labs controllers or it makes no sense.

Auto-Tune is terrible - very poor rigidity and pretty poor following error too.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: slovenec on January 31, 2017, 03:25:04 AM
Greetings Davek 0974

Have you solved the problem? I have  some similar problesm with the asuto tuning. I have  new motors servo motors and drivers from kinco, also the linear scales are new  Iskra. I have tied the auto tune
but it simply does not work properly. I'm starting to lose faith in the csmio controller.

Before changing the motors i have used the original bosch driver and dc motors and i have managed to tune them porll. But there was another problem as soon as i pushed the button go to zero and after that stop
the machine started to go in some kind of a auto tune state.  I have contacted the spupport  and they have said i should send them the mach file. Now its about 4 months and still no answer.

So im a litle disapointed.


Best regards

slovenec
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on January 31, 2017, 03:29:36 AM
Hi

I did not get anywhere with autotune, i just played with the numbers until i felt it was working ok

I have no doubts it could do better but would need a specialist i think in servo drives.

I would send CS labs your email again, I have never found them to be slow to reply and the product is excellent, it is my knowledge in tuning what is an advanced piece of industrial control equipment that is lacking.
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Azalin on October 03, 2018, 05:58:26 PM
Hi,

I have a DM-26EA servo drive however I can't find an English manual for it (came with a manual in full Chinese). The drive looks identical to the ASDD-30A.

https://www.aliexpress.com/item/Best-price-great-quality-Servo-motor-set-6-N-M-1-8KW-3000RPM-AC-110ST-M06030/32423941086.html (https://www.aliexpress.com/item/Best-price-great-quality-Servo-motor-set-6-N-M-1-8KW-3000RPM-AC-110ST-M06030/32423941086.html)

Do you think I can use the ASDD-30A manual for my DM-26EA?
Title: Re: IP-A and Servo drives, voltage matching...
Post by: Davek0974 on August 20, 2019, 05:37:00 AM
Possibly, look at some of the values and compare to the manual, if they seem sensible or similar then it might be ok. The supplier should provide a link though.