Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Open-loop for performance, closed-loop for error recovery.

    Scheduled Pinned Locked Moved
    Hardware dev
    7
    15
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • fcwiltundefined
      fcwilt @alankilian
      last edited by

      @alankilian

      Perhaps I am missing something but I have used closed loop systems with RRF v3.3 without issue.

      Frederick

      Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

      alankilianundefined 1 Reply Last reply Reply Quote 0
      • alankilianundefined
        alankilian @fcwilt
        last edited by

        @fcwilt That's excellent news!

        • What are you using?
        • Have you measured the position error?

        SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

        fcwiltundefined 1 Reply Last reply Reply Quote 0
        • fcwiltundefined
          fcwilt @alankilian
          last edited by

          @alankilian said in Open-loop for performance, closed-loop for error recovery.:

          @fcwilt That's excellent news!

          • What are you using?
          • Have you measured the position error?

          Products like these:

          Closed Loop Systems

          I haven't done any error measurements to date, just verified that prints seemed right.

          Frederick

          Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

          alankilianundefined 1 Reply Last reply Reply Quote 0
          • o_lampeundefined
            o_lampe @T3P3Tony
            last edited by

            @t3p3tony said in Open-loop for performance, closed-loop for error recovery.:

            the 1HCL board runs in openloop, but reports the error from the quadrature encoder

            That's quite handy to tune in the motor current, too. Sometimes too much current reduces the max. possible speed (higher backEMF).

            1 Reply Last reply Reply Quote 0
            • alankilianundefined
              alankilian @fcwilt
              last edited by

              @fcwilt

              Here's a thread where I measured the performance of a similar closed-loop stepper motor controller and found the MEASURED performance quite unacceptable.

              It also contains images from a user who gets unacceptable prints. We never heard back if he ever got it working well.

              If you're getting good enough prints for you that's an excellent data point and shows that is IS possible to get good prints.

              I just haven't quite seen it yet, but there is some hope.

              SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

              1 Reply Last reply Reply Quote 0
              • DigiDundefined
                DigiD @alankilian
                last edited by

                @alankilian
                This is the system used by shopbottools cnc

                Pretty well exactly as you described

                https://www.orientalmotor.com/stepper-motors/alphastep-closed-loop-stepper-motors.html

                alankilianundefined 1 Reply Last reply Reply Quote 2
                • alankilianundefined
                  alankilian @DigiD
                  last edited by

                  @digid

                  MIND BLOWN!!!

                  SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

                  o_lampeundefined 1 Reply Last reply Reply Quote 0
                  • o_lampeundefined
                    o_lampe @alankilian
                    last edited by

                    @alankilian
                    Someone had a lot of fun making this video! But there's no disturbance in the motion to demonstrate the abilities of closed loop.

                    They could stick a ballpen between the steppers, while they were thumbwrestling.

                    1 Reply Last reply Reply Quote 0
                    • rjenkinsgbundefined
                      rjenkinsgb @alankilian
                      last edited by

                      @alankilian said in Open-loop for performance, closed-loop for error recovery.:

                      I'm seeing several groups attempt to make a closed-loop stepper motor controller using encoder feedback and they are all experiencing the same difficulties everyone does implementing a PID control loop.

                      Large errors during speed changes.
                      Unstable oscillation
                      Differing error performance for long and short moves
                      Differing error performance for slow and fast movements

                      The simple solution is not to use a PID system.

                      Running the drives/motors in "following error" mode with appropriate gain settings should not cause any instability.

                      That's how a lot of older industrial CNCs work, and still some new ones.

                      The motor speed is defined by:
                      (Difference between the present target position [a virtual value] and the measured position) * a gain factor.

                      As long as the gains are equal for any interpolating axes, path following accuracy is good.

                      "Look ahead" where PID calculations are added in is a refinement, but can be extremely touchy to set up if the machine mechanical performance, drive system response and measuring system response are not near perfect.
                      Any performance problems or response delays make it very difficult or impossible to get a system stable with lookahead / PID control and keep a fast response.

                      (Working with industrial CNCs for several decades, including designing and programming a control system from scratch in the early 80s).

                      Robert J.

                      Printers: Overlord pro, Kossel XL+ with Duet 6HC and "Frankentron", TronXY X5SA Pro converted to E3D toolchange with Duet 6HC and 1LC toolboards.

                      alankilianundefined 1 Reply Last reply Reply Quote 0
                      • alankilianundefined
                        alankilian @rjenkinsgb
                        last edited by alankilian

                        @rjenkinsgb said in Open-loop for performance, closed-loop for error recovery.:

                        The motor speed is defined by:
                        (Difference between the present target position [a virtual value] and the measured position) * a gain factor.

                        That would be identical to a PID system with:

                        • P = gain
                        • I = 0
                        • D = 0

                        In that system, you ONLY get "Motor speed" when you have a following error.
                        Speed = error * gain

                        That CAN be acceptable if you allow a large enough error.
                        (Note: This error is the difference between the desired position and the actual position, and can be made very very small if you have very high resolution position-measuring system, so "large enough error" might be a fraction of a step of a stepper motor.)

                        Without some mechanical damping (or D coefficient) purely proportional controls like this will oscillate as you attempt to get lower error by increasing the gain. That's just the physics of the situation.

                        I would be interested in seeing prints from a proportional-only 3D printer as well as the specifications of the position-measurement system to get a feeling for how well they can perform.

                        My experience says that with a 300-line or 500-line encoder like is available on most stepper systems that a P-only controller will perform extremely poorly.

                        But I'd LOVE to be shown to be wrong with some prints!

                        (Reference. Here's PID tuning guide I wrote 21 years ago.)

                        SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

                        rjenkinsgbundefined 1 Reply Last reply Reply Quote 0
                        • rjenkinsgbundefined
                          rjenkinsgb @alankilian
                          last edited by

                          @alankilian said in Open-loop for performance, closed-loop for error recovery.:

                          That would be identical to a PID system with:

                          P = gain
                          I = 0
                          D = 0

                          In that system, you ONLY get "Motor speed" when you have a following error.
                          Speed = error * gain

                          A machine too servo drive look-ahead PID system factors in the instantaneous speed that the target point is moving, before any feedback.

                          A perfectly tuned machine runs with in effect no following error using that system, but it can be extremely difficult to use on an imperfect machine.

                          Example block diagram from a Heidenhain manual - note the Velocity input to the system.

                          That particular diagram is for a DC or BLDC type servo, so includes motor current control. The same concept can be used with a drive system that only has a velocity command input though.

                          ServoLoop.png

                          I'm limited for time just now to start looking things up, but if I remember right, in lookahead mode the PID system takes the proportional component from command velocity, the integral from following error and the derivative from feedback velocity.

                          It's not a simple all-in-one PID as for a heater or whatever.

                          Robert J.

                          Printers: Overlord pro, Kossel XL+ with Duet 6HC and "Frankentron", TronXY X5SA Pro converted to E3D toolchange with Duet 6HC and 1LC toolboards.

                          1 Reply Last reply Reply Quote 0
                          • rjenkinsgbundefined
                            rjenkinsgb
                            last edited by

                            This is the other info I was thinking of, from a 1980s system with separate, analog servo drives.

                            The lookahead / PID is probably easier to replicate from this version:

                            Servo_Feedforward.png

                            That's the CNC section of this overall drive system diagram:

                            ServoLoops.png

                            The control those diagrams relate to (Heidenhain TNC360) runs everything on a 16MHz MC68000 if I remember correctly, for machines operating with multi-axis interpolation and contouring at accuracies down to microns, but with totally separate servo drives.

                            Robert J.

                            Printers: Overlord pro, Kossel XL+ with Duet 6HC and "Frankentron", TronXY X5SA Pro converted to E3D toolchange with Duet 6HC and 1LC toolboards.

                            1 Reply Last reply Reply Quote 2
                            • First post
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA