Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RESOLVED - Improve voice-coil motor tuning
#1
Using a PowerBrickLV 5/15A

Hi,
we use voice-coil motors to scan a sample at nanometer scale with an x-ray.
So far we used a galil-controller to do that. Now we want to use the pmac for this purpose. We tuned the motors with the pmac and did not get better than +/- 100nm.
So the voice-coil is fluctuating nervously in that range.

The voice-coil is pushing a flexor bearing, which acts as a spring force. Therefore the voice-coil has to control permantly. We did so far only use the Kp, Kvfb and Ki parameters, as we did on the galil motion-controler. Are there special things to consider when controlling voice-coils? What can I do to improve the control?

best regards,
hannsx
Reply
#2
Update:

I discovered a problem which I did not consider before. I thought it would be possible to set the IC-Channels on my PowerBrickLV on different phase frequencies. But as there is only one parameter available for Sys.ServoPeriod and Sys.PhaseOverServoPeriod it can only be correct for one IC. Is it possible to set this value independently for each IC?
Reply
#3
What is the reason you need a particular phase frequency?
Reply
#4
You are correct that there is a single phase clock frequency and a single servo clock frequency for the entire system. These signals interrupt the processor to start the phase task and servo task updates for all of the motors.

But each motor channel on a Power Brick LV can be set to its own PWM frequency. fPWM can be set to fPhase * (N+1)/2, with N (Gate3[i].Chan[j].PwmFreqMult) having a range of 0 to 7.

For a very high-response actuator such as a voice coil motor, we recommend high servo clock frequency (for the position/velocity loop), phase clock frequency (for the current loop), and high PWM frequency (to reduce switching-induced jitter).

For fast-tool servos such as this, you may want to run servo and phase at 20 kHz, and PWM at 30 kHz. If you also have some standard servo motors, you may want to use the "servo-in-phase" feature (setting Motor[x].PhaseCtrl bit 3 [value 8] to 1). It is common in this type of application to set the servo clock to ~5 kHz and the phase clock to ~20 kHz, with the standard motors closing their position/velocity loops at the servo clock rate, and the fast tools closing theirs at the phase clock rate. This is what that feature is for.
Reply
#5
(07-01-2019, 10:11 AM)Eric Hotchkiss Wrote: What is the reason you need a particular phase frequency?

I try to improve the Performance of our control. Our Group built an experiment to scan a sample through the x-ray for 3d-tomography. Therefore we need nm-resolution. Up to now we have a lot of different controllers from galil for the different motor-types. We plan to control all these motors with the PowerBrickLV. The Voice Coils do the scanning-motion. For them I intended to have a high phase rate of about 30 kHz or whatever works best. Then there is a rotational stage and a tripod, each based on working with brushless motors. Those could have the phase-rate.
Reply
#6
(07-01-2019, 02:14 PM)curtwilson Wrote: You are correct that there is a single phase clock frequency and a single servo clock frequency for the entire system. These signals interrupt the processor to start the phase task and servo task updates for all of the motors.

But each motor channel on a Power Brick LV can be set to its own PWM frequency. fPWM can be set to fPhase * (N+1)/2, with N (Gate3[i].Chan[j].PwmFreqMult) having a range of 0 to 7.

For a very high-response actuator such as a voice coil motor, we recommend high servo clock frequency (for the position/velocity loop), phase clock frequency (for the current loop), and high PWM frequency (to reduce switching-induced jitter).

For fast-tool servos such as this, you may want to run servo and phase at 20 kHz, and PWM at 30 kHz. If you also have some standard servo motors, you may want to use the "servo-in-phase" feature (setting Motor[x].PhaseCtrl bit 3 [value 8] to 1). It is common in this type of application to set the servo clock to ~5 kHz and the phase clock to ~20 kHz, with the standard motors closing their position/velocity loops at the servo clock rate, and the fast tools closing theirs at the phase clock rate. This is what that feature is for.

That sounds like a good solution. I dove into the UserManual again and read about the clock settings. If I understand it right it is also possible to set one Gate, for example Gate3[0] to 20kHz. For that Gate I would set the parameter Gate3[0].PhaseServoDir=0. Then I would set Gate3[1].PhaseServoDir=3 and Gate3[1].PhaseClockDiv=3. That would give me half the phase frequency of Gate3[0] on Gate3[1], right? Unfortunately I cannot test it right now, but I will do that that as soon as possible. I guess that two phase signals have messed with the controlling ability.
Reply
#7
I don't see what you are trying to accomplish by setting a lower hardware phase clock frequency in the second ASIC. (Your setting would divide by 8, not by 2!)

The phase clock frequency set by the first ASIC (Gate3[0]) interrupts the CPU to tell it to start the software phase tasks, including any phase commutation and current loop. It will do these tasks for all of the motors, even those that use the second ASIC (Gate3[1]). If Gate3[1] is using a lower phase clock frequency internally, multiple software phase cycles will use the same data from the ASIC.

I would first just try using a 20kHz phase, 20kHz servo, and 20kHz or 30kHz PWM for your voice coil motors and see if you get the performance you need. Then you can decide if you need to somehow use other settings for standard actuators (if any).
Reply
#8
Curiosity:
If there were three motors configured in this way with 30k PWM, roughly what level of processor utilization (load) would that impose?
465?
ARM?
Reply
#9
The PWM frequency is hardware, so does not affect the CPU load. Three motors active at 20 kHz phase and servo will use about 15-20% of the time of a single core, 465 or ARM.
Reply
#10
(07-02-2019, 09:59 AM)curtwilson Wrote: I don't see what you are trying to accomplish by setting a lower hardware phase clock frequency in the second ASIC. (Your setting would divide by 8, not by 2!)

The phase clock frequency set by the first ASIC (Gate3[0]) interrupts the CPU to tell it to start the software phase tasks, including any phase commutation and current loop. It will do these tasks for all of the motors, even those that use the second ASIC (Gate3[1]). If Gate3[1] is using a lower phase clock frequency internally, multiple software phase cycles will use the same data from the ASIC.

I would first just try using a 20kHz phase, 20kHz servo, and 20kHz or 30kHz PWM for your voice coil motors and see if you get the performance you need. Then you can decide if you need to somehow use other settings for standard actuators (if any).

Ok, that is a good point. So do I understand it right, that if I use Gate3[1].ServoClockMult, in case I wanted to have a higher phase-frequency, that does not increase the frequency at which the CPU calculates the phase commutation and the current loop too? Are these operations always based on the phase-frequency of the master IC?
Reply
#11
You are making this far more complicated than it needs to be. Simply use the following settings:

Leave these at the defaults:
Gate3[0].PhaseServoDir=0 // 1st ASIC outputs clocks
Gate3[0].PhaseServoDir=3 // 2nd ASIC inputs clocks

Then set:
Gate3[0].PhaseFreq=20000 // 20kHz phase clock for ASIC and system
Gate3[0].ServoClockDiv=0 // Divide by 1 for 20kHz servo clock for ASIC and system

Gate3[1].PhaseFreq=20000 // So requires minimal adjustment to sync to incoming phase clock
Gate3[1].ServoClockDiv=0 // Doesn't really matter because using external signal only

For each channel used set:
Gate3[i].Chan[j].PwmFreqMult=1 // For 20kHz PWM
or
Gate3[i].Chan[j].PwmFreqMult=2 // For 30 kHz PWM

To get the software setting to match these, set:
Sys.ServoPeriod=0.05 // 50 usec (20 kHz)
Sys.PhaseOverServoPeriod=1 // Same frequency for both

With these settings, both ASICs will update their inputs and outputs for servo and phase at 20kHz. The CPU, getting its clocks from the first ASIC as interrupts, will execute both its phase and servo tasks at 20 kHz. The phase tasks are phase commutation and current loop closure. The servo tasks are position/velocity loop closure and trajectory interpolation.
Reply
#12
Ok, thank you for this guideline. This way I can make sure everything works as expected. I thought it might be a good Idea to have each channel operating only at its required phase frequency because of CPU load. But maybe that is negligible and just makes the settings unnecessarily prone to errors.
Reply
#13
Hi,
I now am able to test the voice coil motor again and I have only been partly successive. Though I managed to get the precision up to +/- 10nm, I want to get it to +/- 1nm, just as the other Motors which I only are precise to +/-1 encoder unit.
I attached the step responses I got while tuning it. When I zoom in on the following error I see these oscillations which the control semmingly isn't able to flatten out. I wonder why that is. Does this type of behaviour point to any problem you know of? I can also post my setup-files if that would be of any use,
best regards,
hannsx


Attached Files Image(s)
           
Reply
#14
When you are trying to control to the nanometer level, there are all sorts of factors that can cause multiple nanometers of transient errors, both mechanical and electrical. A good control loop can minimize the magnitude of the resulting errors, but never eliminate them completely. It is worth the effort to try to identify the sources of these disturbances.

With a crude peak-counting "Fourier transform" of your plots, I think I see significant 15 Hz and 120 Hz components to your errors. (If you were in North America using 60 Hz power, I would be recommending you look at power line issues, but I expect you are using 50 Hz power -- correct?) With less confidence, I think I see an ~2000 Hz component to your errors.

Mechanically, you want to be sure you do a very good job on the vibration isolation of your stage. When we test nanometer-level control, we often do the job at 5:30am, before the HVAC comes on in the building and before trucks start going by.

Electrically, you want to do the best job you can to prevent electromagnetic noise from getting to your feedback sensor. Putting chokes on the cable to the VCM is highly recommended to reduce switching noise. (Many people use linearly modulated amplifiers for nanometer-level control for this reason.) Careful shielding and grounding of your cables is very important as well.

If there are distinct spectral components to your errors, as I think I see, and you cannot eliminate the source of them, you can try "notch" (band-reject) filters in the servo loop. For the higher frequency components, a low-pass filter in the servo loop (with a few hundred Hz break point) can help.
Reply
#15
Please post the graph of your current loop tuning. If there are problems in the current loop it can cause problems in the position loop.
Reply
#16
(08-02-2019, 11:31 AM)curtwilson Wrote: When you are trying to control to the nanometer level, there are all sorts of factors that can cause multiple nanometers of transient errors, both mechanical and electrical. A good control loop can minimize the magnitude of the resulting errors, but never eliminate them completely. It is worth the effort to try to identify the sources of these disturbances.

With a crude peak-counting "Fourier transform" of your plots, I think I see significant 15 Hz and 120 Hz components to your errors. (If you were in North America using 60 Hz power, I would be recommending you look at power line issues, but I expect you are using 50 Hz power -- correct?) With less confidence, I think I see an ~2000 Hz component to your errors.

Mechanically, you want to be sure you do a very good job on the vibration isolation of your stage. When we test nanometer-level control, we often do the job at 5:30am, before the HVAC comes on in the building and before trucks start going by.

Electrically, you want to do the best job you can to prevent electromagnetic noise from getting to your feedback sensor. Putting chokes on the cable to the VCM is highly recommended to reduce switching noise. (Many people use linearly modulated amplifiers for nanometer-level control for this reason.) Careful shielding and grounding of your cables is very important as well.

If there are distinct spectral components to your errors, as I think I see, and you cannot eliminate the source of them, you can try "notch" (band-reject) filters in the servo loop. For the higher frequency components, a low-pass filter in the servo loop (with a few hundred Hz break point) can help.

The electromagnetic noise issue certainly is a possible problem in my prototype setup and wiring. You guessed right, I am located in Germany, Hamburg.
Reply
#17
(08-05-2019, 03:22 AM)Tony Wrote: Please post the graph of your current loop tuning. If there are problems in the current loop it can cause problems in the position loop.

I experimented with the tuning of the current loop and got the best results when I tuned it very smooth and slow. That is shown the first picture.

I also took a looked at the motion of the motor when it is in rest. It looks almost the same as the following error I have, when it is in closed loop. It is shown in the second picture.


Attached Files Image(s)
       
Reply
#18
If you are using the current loop feedback gains that you posted in another thread, these gains are at least an order of magnitude higher than is typical. This could easily result in repeated overcorrection causing the high frequency oscillation you see.
Reply
#19
(08-08-2019, 04:08 PM)curtwilson Wrote: If you are using the current loop feedback gains that you posted in another thread, these gains are at least an order of magnitude higher than is typical. This could easily result in repeated overcorrection causing the high frequency oscillation you see.

I experimented with different settings. I got the best results with very low gains. finally I set the integral gain to 0, the forward gain to 1 or less and the backward gain to either 0 or 1. At the moment we cannot test the galil motion controllers we operated in the past because they have some problems. Furthermore my boss believes it is due to vibrations and does not want to put more time into this. Also we won't repair the galils. So right now I can't say that the galil performes better on our setup. We were using the galil dmc4080. It has approximately the same current specs and resolution as our PowerBrickLV so there is no reason why there should be any difference in the performance. If I gain any new insight into this I will post it. I guess the resolution of the adc input and the dac amplifier is crucial. I already saw that when I switched from the 33.85A max gain Channel to the 6.77A max gain Channel. It would be interesting to see how much better it gets if I can further increase it.
Reply
#20
(08-09-2019, 03:39 AM)hannsx Wrote:
(08-08-2019, 04:08 PM)curtwilson Wrote: If you are using the current loop feedback gains that you posted in another thread, these gains are at least an order of magnitude higher than is typical. This could easily result in repeated overcorrection causing the high frequency oscillation you see.

I experimented with different settings. I got the best results with very low gains. finally I set the integral gain to 0, the forward gain to 1 or less and the backward gain to either 0 or 1. At the moment we cannot test the galil motion controllers we operated in the past because they have some problems. Furthermore my boss believes it is due to vibrations and does not want to put more time into this. Also we won't repair the galils. So right now I can't say that the galil performes better on our setup. We were using the galil dmc4080. It has approximately the same current specs and resolution as our PowerBrickLV so there is no reason why there should be any difference in the performance. If I gain any new insight into this I will post it. I guess the resolution of the adc input and the dac amplifier is crucial. I already saw that when I switched from the 33.85A max gain Channel to the 6.77A max gain Channel. It would be interesting to see how much better it gets if I can further increase it.

I have to walk back a little on my comment. I now am working with a voice coil motor on another setup. I deviates max +/-3nm from its position. I consider this to be super preicse under the conditions I operate it. Actually I would also be satisfied with that under best conditions. And I even achieve that on the 33.85A channel. On the 6.77A Channel, I can drive the voice smoother and it does not get into resonant oscillations that as quick. So I guess the problem on the other setup is of a mechanical kind, e.g. no stable and calm support for the motors. I achieved the greatest improvements by tuning the current loop to a soft response.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)