Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Forum Jump:


Users browsing this thread: 1 Guest(s)