LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

motor drift

hi all
i want to measure the frequency response of my motor with the input as a sine wave voltage to the motor and the output is the motor speed.
When i input a sine wave to the motor, the motor rotate clockwise and then anticlockwise depending on the motor voltage but the motor will drift out of postion (rotating more towards clockwise) even though i am inputting a pure sine wave.
is there any way to solve this problem?
0 Kudos
Message 1 of 11
(4,327 Views)
leongchuan,
1. Are you certain the sine wave has no DC offset -- are the +peak and -peak of equal magnitude?

2. Does the position drift need to be considered a problem? Isn't your frequency response measurement going to be based on velocity amplitude? Just be sure to use peak-to-peak measurements, since the position drift indicates some DC offset in the velocity response.

3. If the drift lasts a while, I suspect you're exciting the motor at a pretty low frequency. Here's some hand-waving about what you might be seeing:

a. Think of the input sine wave as a sort of "energy pump." A half-cycle of CW input energy followed by a half-cycle of output energy, then repeat.
b. The first half-cycle brings the motor from rest to some level of momentum in the CW direction.
c. The next half-cycle now delivers energy that tries to deliver momentum in the CCW direction. However, most of it is used up just bring the motor from CW rotation to zero speed. Not much is left to make it rotate with CCW momentum.
d. Now you get a half-cycle to give it more CW momentum. It first overcomes the little bit of CCW it had, then most of the energy is left to make the motor rotate with CW momentum again. However, it's a bit less than the first time.
e. The CCW half-cycle now has less CW momentum to overcome and will leave the motor with a bit more CCW momentum than the first time.
f. ... This push-pull continues until a steady-state is reached where the motor (should) oscillate with no further drift. Any freq response measurements should be taken after reaching steady-state.

Good luck!

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 11
(4,306 Views)
hi kevin

1.yes the sine wave has no dc offset.+ and - peak are of equal magnitude

2.it is not a problem in my measurement purposes.but i would like to know the reason and if possible solve it.

3.Even after a long time for the motor to reach its steady state, the drifting still occurs

And to highlight one thing, i have a similar model using simulink and the drifting is hardly noticeable.Therefore I wonder if labview has any calibration tools to solve this problem.
0 Kudos
Message 3 of 11
(4,293 Views)
leongchuan,

Perhaps you have a motor that is constructed to have a preferred direction? Sometimes the location of the commutation slots relative to the winding poles are adjusted to make a motor most efficient for a particular speed in a particular direction. A standard motor model wouldn't usually include this asymmetry.

A quick test of this would be to apply a modest constant DC voltage to the motor (I'm assuming
this is a DC motor, right?) and measure the resulting speed. Do the same after switching polarity of the applied DC voltage. If you notice a significant difference in speed, there's a good chance the motor design was tweaked to favor one direction of rotation over the other.

The same type of asymmetry can also develop over time (due to brush wear) if the motor usually spins in one direction.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 11
(4,287 Views)
so is it possible to implement a control system to make the drifting to zero?
0 Kudos
Message 5 of 11
(4,241 Views)
I think Kevin hit the nail on the head. To eliminate drift you would have to make your stimulus waveform assymetrical too, no longer a true sinewave.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 11
(4,236 Views)
leongchuan,

Yes, it's very likely that a control system can be implemented to eliminate this open-loop drifting effect. Was closed-loop control the plan right from the start? Were you originally characterizing freq response to try to verify a model you used to try out control algorithms?

I wouldn't count on good results from simply running LabVIEW in Windows with a standard multifunction DAQ card. The simplest path forward with LabVIEW is to use one of NI's motion control cards. You'll need to also add a position feedback device (such as a quadrature encoder) to your motor shaft.

If you plan to develop or study your own control algorithms, then the best LabVIEW approach is to get LabVIEW Real-Time. Post back with more details & description of your long-term goals if you need more help.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 7 of 11
(4,228 Views)
I develop motion control devices for a laser galvonometer company, so I think I can add a few things to this conversation.

Is your motor being driven by a differential amplifier? For example, for this type of amplication usually the DAQ sinewave is input to a differential amplifier (opamp) configured as a current amplifier. If this is the case the drift you are seeing is almost certainly a result of mismatch of the two sides of the amp.

Take a current probe or shunt resistor and measure the current that is actually driving your motor. This is where you should check the DC offset. There will probably be some offset even though your DAC output has none.

If you are commanding a current amplifier with a sinewave voltage think of the velocity as a function of the current through the motor. The current waveform is really like the acceleration waveform. The velocity will be the integral (antiderivative) of the current, so since you are inputting a sinusoidal current the velocity will also be sinusoidal with a 90 degree phase shift from current. Position is the integral of the velocity waveform, so it should also be a sinewave that is 90 degrees phase shifted from velocity. There should be no DC offset or drift for this unless your amplifier has some small offset. Any DC offset in current through the motor would be integrated to produce a net velocity in one direction, which is exactly what you are seeing.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 8 of 11
(4,221 Views)
By the way you are approaching the problem correctly, and your simulink simulation is probably correct. You definitely want to use a pure sinewave for this problem since of course without a pure single frequency sinewave you would have corrupted frequency response. The only problem is simulink doesn't take imperfect differential amplifiers into account. You can add potentiometers to each side of your diffamp circuit and you should be able to tune the current offset to zero by turning the potentiometers, which would slightly adjust the gain of each half of the diffamp to match each other. Also you could try adding a very small offset to your DAQ output in your labview program. It would take some trial and error, but you could set it to the perfect amount of offset to calibrate out the intrinsic offset of your amplifier. If you have a very small current offset it wouldn't move the motor on its own because it couldn't break the forces of static friction, but when the motor is already moving it would do its part to add velocity in one direction of the other. Just remember, any waveform you use to drive the system will give you a net velocity of the integral of the waveform for whatever duration you applied it.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 9 of 11
(4,215 Views)
hello everyone
appreciate the help i have received from all of u
from the replies i can c that the problem is either a dc offset or a preferred direction of rotation

i intend to try out 1st if the drift is caused by preferred direction of rotation.
what I will do is to add in a multiplier k to the motor voltage for a clockwise rotation and I varies k until i can get both clockwise and anticlockwise rotation even out.
hope can get some suggestions on whether this way is recommended or is there other better ways.

i have a few question about drifting caused by the dc offset. from my result the offset increase when motor voltage increase. is the offset value proportional to the motor voltage? if i want to add in an offset to cancel out the drifting can i jus add in a k*motor voltage where k is a porportional constant?
0 Kudos
Message 10 of 11
(4,143 Views)