Jump to content
OMRON Forums

How to use potentiometer for position and velocity


iws

Recommended Posts

Hi again.

 

I am using a Geo Brick LV, and several 12VDC Brush motors. I have successfully set up several rotary motors using incremental encoders for position and velocity feedback. These motors are working great, so I believe that I have a decent understanding of the Geo Brick configuration.

 

The final motor needed for my project is a Midwest Motion LA10 Linear Actuator. It uses a 10K potentiometer for position and velocity feedback. The Geo Brick Setup Assistant Spreadsheet does not appear to handle this type of motor at all. Searching the datasheets for "ACC-28" or "Potentiometer" does not help much.

 

I have set up the encoder table such that I can read the potentiometer using the ACC-28 A/D register $78105. Using open loop mode, I can drive the Linear Actuator all the way out. At this point the ADC reading (from M505) is about 12300. If I drive the Linear Actuator all the way in, the ADC reading is about 540. This confirms that the ACC-28 ADC is reading sane values.

 

I have also added an Exponential Filter.to the encoder table. This smooths out the position and velocity readings in the Position window.

 

Here is my encoder table:

Encoder Table Definitions.
 Executed - Thu May 01 16:00:44 2014

Entry    Address     Y-Word     Conversion Method  
----------------------------------------------------
  1      Y:$  3501   $1F8105    A/D conversion of location $78105
  2      Y:$  3502   $D03501    Exponential filter from conv. location $3501
         Y:$  3503   $000010     Maximum change in cts/cycle
         Y:$  3504   $05D000     Filter gain
  3      Y:$  3505   $1F8105    A/D conversion of location $78105
  4      Y:$  3506   $078200    1/T extension of location $78200
  5      Y:$  3507   $078100    1/T extension of location $78100
  6      Y:$  3508   $078108    1/T extension of location $78108
  7      Y:$  3509   $078110    1/T extension of location $78110
  8      Y:$  350A   $078118    1/T extension of location $78118
  9      Y:$  350B   $078000    1/T extension of location $78000

 

I have set I103=$3504 and I104=$3504.

 

Driving the Linear Accelerator in open loop mode, I can see the position and velocity change. Therefore I believe I have the encoder table set up correctly.

 

At this point, I have two problems.

 

Problem 1: If I drive the motor in open loop mode (command O100) the motor drives out at a constant speed. This is good. If I drive the motor in open loop mode in the other direction (command O-100) the motor DOES NOT move at constant speed.

 

The motor moves at 100% speed for about 1 second, then slows down for about 1 second. This process repeats until the limit is reached.

 

Watching this process with a volt meter, the voltage is not constant. It runs at -12VDC for about 1 second, then drops to about -5VDC. This corresponds to the motor slowing down.

 

I have confirmed that this behavior DOES NOT happen with a bench supply. I have also confirmed that this behavior DOES NOT happen with a PWM supply where I can control the output voltage.

 

Question 1: Why is the Geo Brick dropping the voltage when I've told it "O-100"? My understanding is that open loop commands should be constant speed!

 

Problem 2: Using Jog commands, the motor oscillates around the target

 

I have tried using the PID auto tune procedure, which does not work very well for this motor. I have then tried changing all PID parameters systematically. Nothing I can choose works well with this motor. When a Jog command is issued, the motor oscillates around the target by about 1000 counts in each direction.

 

This behavior exists even if I set the PID loop to extremely conservative values (for example, I130=2000 and all other PID parameters at 0).

 

Have I done something wrong with the encoder conversion table? What could be going wrong?

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

One more piece of information about this motor. It takes 4A of current to get it moving at all. However, once moving (without a load), it draws about 1.6A to keep moving.

 

Will this confuse the Geo Brick?

Link to comment
Share on other sites

I have finally gotten this motor moving smoothly with open loop commands.

 

My setup has not changed significantly from the above, though I have increased the Phase interrupt, servo interrupt, and PWM frequency per the Geo Brick Setup Assistant spreadsheet.

 

The motor still oscillates around the target with Jog commands. I have tried tweaking the PID parameters extensively, and made no significant progress.

 

The attached images show the results of the AutoTune algorithm. I do not know what to change to make this better. Please help.

 

step-move.thumb.png.3ec8fb718b86ec95c0adbd7a45bd611c.png

parabolic-move.thumb.png.3bb71ed01825b01ffbbef25683731b4c.png

parabolic-move-2.thumb.png.aae027a020dd6d98a4b1aba6e8160c2c.png

Link to comment
Share on other sites

You should not be attempting any closed loop moves prior to verifying that open loop commands are working properly, in both directions.

Can you post an open loop plot response? Also, can you post your motor settings (Ixx00 - Ixx99)?

 

This sounds like an odd actuator, with non-linear characteristics. Are you referring to stiction when you say it requires 4A to get going? You may need to implement an open servo to get it over the initial hump and into the linear working range. Friction feedforward in the standard PID loop should help as well.

 

To answer an earlier question: Yes, if you issue an O100 for a given load and then change the load on-the-fly, the velocity/voltage will change.

Link to comment
Share on other sites

You should not be attempting any closed loop moves prior to verifying that open loop commands are working properly, in both directions.

Can you post an open loop plot response? Also, can you post your motor settings (Ixx00 - Ixx99)?

 

This sounds like an odd actuator, with non-linear characteristics. Are you referring to stiction when you say it requires 4A to get going? You may need to implement an open servo to get it over the initial hump and into the linear working range. Friction feedforward in the standard PID loop should help as well.

 

To answer an earlier question: Yes, if you issue an O100 for a given load and then change the load on-the-fly, the velocity/voltage will change.

 

Hi Richard. Thanks for your help. See my other thread where I am trying to get the open loop stuff resolved.

 

http://forums.deltatau.com/showthread.php?tid=1597

 

Here is all of the information I have about the motor. I have the 12V 20:1 version with 288mm stroke length with integrated limit switches and potentiometer. The ACC-28 ADC values range from approximately 500 to 12500 over the full travel of the motor. Very low resolution compared to quadrature encoders!

 

http://www.midwestmotion.com/products/la3/MMP%20LA10%20Series.pdf

 

Since the original post, I have taken some advice and increased the filter gain in the exponential filter. This decreases the number of servo cycles that are used in the averaging. This makes my plots significantly more noisy. Here is my current encoder table definitions.

 

Encoder Table Definitions.
 Executed - Thu May 08 11:20:15 2014

Entry    Address     Y-Word     Conversion Method  
----------------------------------------------------
  1      Y:$  3501   $1F8105    A/D conversion of location $78105
  2      Y:$  3502   $D03501    Exponential filter from conv. location $3501
         Y:$  3503   $000400     Maximum change in cts/cycle
         Y:$  3504   $1F0000     Filter gain
  3      Y:$  3505   $078010    1/T extension of location $78010
  4      Y:$  3506   $078018    1/T extension of location $78018
  5      Y:$  3507   $078100    1/T extension of location $78100
  6      Y:$  3508   $078108    1/T extension of location $78108
  7      Y:$  3509   $078110    1/T extension of location $78110
  8      Y:$  350A   $078118    1/T extension of location $78118

 

Here are the motor I variables.

 

I100=1
I101=1
I102=$78002
I103=$3504
I104=$3504
I105=$35C0
I106=0
I107=96
I108=96
I109=96
I110=$78105
I111=8388607
I112=16000
I113=0
I114=0
I115=1000
I116=32
I117=0.015625
I118=0
I119=0.015625
I120=0
I121=1
I122=0.1
I123=32
I124=$820001
I125=$78000
I126=0
I127=0
I128=160
I129=0
I130=180000
I131=0
I132=0
I133=2000
I134=0
I135=0
I136=0
I137=0
I138=0
I139=0
I140=0
I141=0
I142=$0
I143=$0
I144=$0
I145=0
I146=0
I147=0
I148=0
I149=0
I150=0
I151=0
I152=0
I153=0
I154=0
I155=$0
I156=0
I157=5927
I158=1283
I159=0
I160=3
I161=0.014716982841
I162=0
I163=4194304
I164=0
I165=16
I166=1423
I167=4194304
I168=2550
I169=10981
I170=0
I171=0
I172=512
I173=1976
I174=50
I175=0
I176=0.3526718616
I177=0
I178=0
I179=0
I180=0
I181=$0
I182=$78006
I183=$78001
I184=$FFFC00
I185=0
I186=0
I187=64
I188=0
I189=0
I190=0
I191=$0
I192=10
I193=0
I194=0
I195=$B10000
I196=1
I197=0
I198=0
I199=0

 

Here is a graph of command O30. I issued the O30 command at about 0.60 seconds from the start. At about 3.00 seconds, the motor suddenly accelerated to maximum velocity. The load did not change during the test!

 

O30.thumb.png.e1920a9c6536e9d029e6bc9354cea509.png

 

Here is a graph of command O-30. I issued the O-30 command at about 0.75 seconds from the start. After a strange negative motion, the velocity remains relatively constant.

 

O-30.thumb.png.187c627e75998c04033f5e44c1504108.png

 

With the help of an engineer, I have experimented with the PID loop parameters. The motor is able to jog to a target position fairly accurately, but it moves extremely slowly. It also seems to stop abruptly when near the target, rather than decelerate slowly. I still think that the current loop is not tuned correctly, and that is what is causing the problems.

 

Thanks again for your help!

Link to comment
Share on other sites

Have you looked at the manual procedure at all?

 

I have successfully set up numerous DC brush motors with the stated procedure in the manual. I never had to tune the current loop. You would need to position it at a "phased" angle to get a good response. Not a trivial task with Brush motors. As mentioned, only Ixx61 is used slightly to obtain a satisfactory open loop response. Ixx76 may be hindering the performance.

 

You do want to be able to use the open loop test utility in the Tuning software to move it back and forth. I would focus on this before getting to tuning the position loop.

 

Also, as mentioned in the manual. A plc which zeros the current loop integrator seems more effective than just setting Ixx96 = 1. You do want to configure the tuning to allow PLCs to execute while using it, it disables them by default.

 

I would remove the filter for now until I get satisfactory open loop motion in both directions. Your cut off may be clipping data, causing the jump which you are seeing. Correction, this may be the current loop integrator acting up (because you are in open loop). Otherwise, I can't think of anything but mechanical friction, change of load. As far as the tracking filter, you may want to test it manually first, that is plotting the unfiltered versus filtered data while moving the actuator by hand (if that is possible) or just by applying constant voltage from a power supply.

 

Lastly, it would be beneficial for everyone to stick to one thread per issue. Thanks!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...