Shop OBEX P1 Docs P2 Docs Learn Events
UAC Universal Axis Controller From SPIN to TAQOZ-FORTH — Parallax Forums

UAC Universal Axis Controller From SPIN to TAQOZ-FORTH

ErNaErNa Posts: 1,752

Motion control can be simple or complex. However, the Propeller should allow to make a better solution in shorter time that will never be outdated. The first steps into this direction are made and I will present some ideas here, show an example written for the P1 and bring it to a new and better life. The goal is to implement this controller using TAQOZ to get acquainted with the system and hopefully the solution will be useful to both drive an axis as the usage of TAQOZ. So let's start with showing the basic ideas behind the controller and then go further step by step.

Comments

  • ErNaErNa Posts: 1,752
    edited 2022-04-11 13:08

    Let me see, how to make use of the first few entries.
    Here a link to Galil, an manufacturer of sophisticated modules and systems, just to show: there is a lot to do. Others are working into this field and now or then I will point to useful information here.

  • ErNaErNa Posts: 1,752

    intensionally left blank

  • ErNaErNa Posts: 1,752

    intensionally left blank

  • ErNaErNa Posts: 1,752
    edited 2022-04-12 07:10

    To make a first statement: This implementation will NOT try to squeeze out most from a propeller but make use of the COGs to implement parallel processes that exchange messages to synchronize the different activities. Universal inherits that the type of motor is not determined, but it should work for steppers, servos, linear motor with or without sensors for speed and position.
    The processes are (up to now): StepGenerator to create step/direction/enable signals to drive a stepper driver. Encoder reads a incremental encoder to have feedback. The low level motion profile is generates by a "Cascade" module. Such profiles are: go to position, ramped goto, do a sequence of elementary moves.
    An important aspect is: you can not be in a place x without having a certain velocity v . So if you are at rest at position x, your velosity is equal to zero. But there still is "movement".

    Another basic: If you are following a path using a stepper motor, the position in principle is always correct. If you ever miss a step, it's very unlikely, the motor doesn't stall. So it doen't matter if you check the set-values or the is-value of the position. That path is followed by executing steps. Using a servo motor, you need some means to determine the position as you command current, e.g. torque and the movement results from applying such torque to a complex mechanical system. The question now is: how to control the motor to minimize the error in speed and position, those two are linked.
    The answer could look like this: From your current position to the target you go a straight line with constant acceleration (even if zero). If over time you detect a deviation, you just can try to compensate for it OR you accept your position as a new current position and determine the new trajectory to the unchanged target.
    Why is this different, in both cases you correct an error? "Normaly" you would try to correct an error and in doing so, you could make new errors. But if your aim is to meet a target, you will never have to correct an error but always solve the problem to come from your current position to the target. This may sound unfamiliar, but is sound.

  • MicksterMickster Posts: 2,698
    edited 2022-04-13 07:53

    Sensorless makes absolutely no sense :)

    Apart from pioneering digital motion, Dr. Jacob Tal, the founder of Galil also gave us dual-loop feedback. I was able to produce the fastest and most accurate machines in my industry, thanks to this :+1:

    Incidentally, Galil are 1.3 miles away from Parallax.

    Craig

    Edit: https://a-m-c.com/what-is-dual-loop-position-control-and-where-is-it-needed/

    https://a-m-c.com/servo-drive-trends-for-2022/

  • ErNaErNa Posts: 1,752
    edited 2022-04-13 08:44

    We will see, what happens. But up to now I can say: sense is what we make from something. So how to understand this: "some can make from nothing something" ? Think about it.
    I will take a look to the links and study the article. So sensorless motor control makes sense, for example you can check the information from the sensor with the information you get sensorless and whenever they coincide, you are fine. But if not, you can check the sensor for malfunction. You even can detect if the insulation of the wires becomes worn out or if the flux guides sheet metal is in good condition to prevent Eddy currents.

    OK, took a look and can state: the first is known forever. It shows just that controlling a motor and controlling a position are two different shoes. The second link points to some good ideas, but there is no hint, how solutions look like, e.g. autotuning. Interesting: the compactness of the drives. That definitely is an advantage, mostly based on small processors, high frequencies possible with large band gap semiconductors and ceramic high capacity capacitors. So: yes, that is a playing ground for the propeller. And that's why I'll proceed.

    The point, why I'm going forward here is: this is were Forth should show it's forth.

  • I already have 3 closed-loop servos running on my 6-axis P2 on my desk (only have 3 motor/encoders). I trimmed it down from 12-axes because I need the pins for other things. Doesn't break a sweat from a processing standpoint. I'll be running several virtual axes.

    For a front-end command processor, I have gone with the PicoMite which is the RPi Pico, running the MMBasic interpreter.

    Autotuning: Not a fan. It flat doesn't work (much experience). In fact, I have read many, many papers on this and they all seem to have some form of the same conclusion: "probably better-off tuning manually" :lol:

    But here's the nut....and the thing that most theorists never experience:

    You have a failed drive, in the field and so you replace it. You have to connect a laptop to the new drive....did you remember to order their proprietary cable?
    Setup software insists on running their autotune. "Note: Motor must be decoupled from the load, prior to autotuning" :open_mouth: ....The 6KW motor is 4m above the floor with bolts that are near impossible to get to without dismantling the machine. Now autotune wants to bang step signals into this huge motor...good luck with holding it steady :lol:

    Give me a conventional analog drive with little more than a current-scale setting and current-limit. Select torque mode and that's it. The PID in my motion controller can handle the rest. :+1:

    Lots of BS creeping into this industry....don't get me started on EtherCAT :lol:

    Craig

  • ErNaErNa Posts: 1,752

    Your are absolutely right. We are running loops for more then 40 years what I experienced myself. So things must be done differently.

  • @ErNa said:
    So things must be done differently.

    It's a conspiracy I tell ya! :lol:

    The big players have done a number on the controls industry. Everything has become over-complicated. Just look at Beckhoff, for example and the hoops that their customers need to jump through to get a basic system up and running. It's absolutely ridiculous.....but people have been brainwashed to believe that it's the best thing out there.

    And then there is Siemens with their Profibus....another joke.

    I retrofitted a machine, 3 years ago and recently paid a courtesy visit to the factory. The engineering manager commented that he couldn't recall ever having to re-boot my system. He went on to explain that they re-boot their Trumpf laser machine, at least 4 times/week and always have had to do this. I asked why the heck they didn't get Trumpf in to fix the problem and he said that Trumpf didn't know if it was a Siemens/Windows issue or a Profibus issue but people just have to live with it...WTF :open_mouth:

    Craig

Sign In or Register to comment.