Sei sulla pagina 1di 15

A quarterly publication brought to you by Motion Designs Inc.

November 2010

In this issue of Design Trends: Technology: Closed Loop Stepper ........................................................... page 1 New Product: IDM680 EtherCAT .............................................................. page 5 Product Feature: TMC-3D G-code............................................................ page 6 Application Solution: Unmanned Underwater Vehicles.......................... page 10

Closed Loop Stepper


Stepper motors have long been the work horse of low power positioning applications. High volume manufacturing has constantly driven down the cost of these fractional HP electric motors. However, the open loop nature of these devices has always labeled them as low performance and hence inferior compared to closed loop servos. This article will attempt to review a few techniques to use the stepper motor in a closed loop fashion. Open Loop Stepper Operation Stepper motors are inherent positioning devices and are a member of the brushless synchronous motor family. They are built in many forms and shapes, power range, step angle, phase count But the fundamental operation remains the same. A typical motor is constructed as follows: A multi-phase stator generates a rotating electro-magnetic field, while the rotor has many salient teeth. Depending on the rotor construction, stepper motors are permanent magnet, variable reluctance or hybrid based. By energizing the stator coils in the proper sequence, the rotor can be moved to specific locations. Torque production relies on interaction with the motor magnetic field (PM motor), minimal

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

reluctance or a combination of both (hybrid). In full step mode, the motor coils are energized such that every electric cycle is sub-divided in 4 steps. So a 1.8 degree 2-phase step motor then provides 200 steps per revolution and has 50 electrical cycles. Steps can be further sub-divided to provide more step resolution (not necessarily more precision), leading to so-called microstepping. Regardless of the step sub-divisions, some open loop torque Vs. speed curve can be established, typically looking like this:

If the motor is excited at a resonance frequency, the instability will result in motor stalling. The other limiting factor is of course available DC bus and motor back-EMF. As speed increases there is no more voltage over-head to control current hence the rapid decline in torque at higher speed. If the maximum motor torque is not sufficient to overcome the load torque, the rotor skips over one (or more) electrical cycle(s) and position synchronism is lost. In order to avoid loss of synchronism, stepper motors are typically over-sized such that during normal operation there is sufficient margin between worst case load torque and motor torque (often as much 100%). In applications where sufficient margin can not be designed in or where loss of synchronism is detrimental to the application, position feedback has to be added. The most common solution is addition of an optical incremental encoder. End Of Move Verification One of the simplest ways to operate a stepper motor in closed loop is to compare the theoretical position that should have been reached based on the number of steps and the actual position
PAGE

What is not shown on this curve is that there are a couple of speeds where torque drops out (at so-called resonance points). Remember that torque production relies on the angle between the stator and rotor field. In open loop, this angle is not explicitly controlled and is load dependent. At each step, there is a transient with some natural frequency. The plot below shows the motor position measured with an encoder for a sequence of steps:

WWW.MOTION-DESIGNS.COM

(805) 504-6177

that is reached based on the position feedback. If there is a difference in position after the move is completed, a correction move is made.
velocity position

There are many different algorithms that can be used to dynamically compensate once a position error has been detected: - increase the pulse rate - increase the current temporarily - adjust the step angle - In the example below, a stall condition during the move was corrected dynamically (red line is position reference; the blue line is encoder based position):

The black line is the theoretical position and velocity (per the open loop step command). The red line is the actual position from the feedback. Once the move is completed, when a difference is detected an additional correction move is made. One important consideration is the step resolution and encoder resolution. Typically the step resolution is much higher then the encoder resolution so the final position error is governed by the encoder resolution. This approach is acceptable for point-topoint applications where only the final position is important. This allows motor sizing with less margin. Dynamic Position Verification The disadvantage of the previous approach is that the move has to be completed prior to any detection and/or correction of loss of position synchronism. A second approach to closed loop operation is to continuously monitor the difference between the position step reference and encoder feedback. Torque Control The third method of controlling a stepper motor closed loop has been made possible by the availability of cost effective DSPs. As mentioned before, a stepper motor is a brushless synchronous motor, not unlike a traditional brushless servo motor. The key differences are: - high pole count - high torque constant (and backEMF) - high pole saliency But otherwise it is simply an extremely low cost brushless motor (in all fairness it may not have the mechanical construction that will provide the long life of a true brushless servo motor) . In order to properly commutate a stepper motor like a traditional brushless

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

servo motor, a few restrictions must be observed: - sufficient feedback resolution in order to have sufficient granularity in the electrical angle - sufficient current loop bandwidth - sufficiently rigid coupling between the motor and feedback Lastly, commutation start-up is typically restricted to a phase-align method as Hall sensors are not an available option for stepper motors. The first picture is an open loop configuration with velocity 80 rev/s and acceleration is 400 rev/s/s. This move profile leads to stalling.

One physical limitation that can not be overcome is maximum obtainable speed. Stepper motors are specifically designed to provide high torque with limited current, resulting in a high backEMF. Hence the DC bus of the drive will always impose a speed limitation. On the other hand, motor current has more room for adjustment. Continuous current ratings for stepper motors are based on continuous operation. As a brushless servo motor, intermittent regimes are allowed during which the peak currents can far exceed continuous current, for short time duration. Unfortunately, current ratings beyond continuous are not available, so peak regimes are not well defined. If the RMS current does not exceed the continuous rating, there should not be a thermal concern. Conclusion Stepper motors can be turned into very cost effective closed loop actuators by the addition of a simple, relatively low cost encoder. Moreover, they can even be transformed into powerful brushless servo motors that provide high torque in a small package. This always the motor to be used more efficiently and hence more power is available at the output shaft.

The same move profile for a closed loop configuration (with torque control) does not pose a problem.

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

Technosoft EtherCAT Drive


UNIVERSAL INTELLIGENT DRIVE FOR ROTARY AND LINEAR BRUSHLESS, DC BRUSH AND STEP MOTORS The IDM680 drive is a member of Technosofts new family of digital intelligent servo drives equipped with an EtherCAT communication interface. This high-performance intelligent servo drive combines motion controller, drive and PLC functionality into a single compact unit. It can operate either as a standard EtherCAT slave using CANopen over EtherCAT (CoE) protocol or it can be programmed to execute complex motion programs directly at drive level, using the high level Technosoft motion language (TML). This enables the user to reduce a master task by calling complex motion functions, pre-stored in the drive memory, or by triggering their execution via I/O signals. Compatible with EasySetUp and EasyMotion Studio for quick configuration and motion programming at the drive level, the IDM680 drive offers a flexible and easy to implement solution for a wide range of applications. FEATURES Suitable for control of DC brush, stepper and brushless rotary or linear motors
CANopen over EtherCAT (CoE) with full support of CiA402 Various modes of operation: position or speed profiles (trapezoidal, S-curve), 3rd order PVT (Position, Velocity, Time) and 1st order PT interpolation, electronic gearing and camming, external reference: analog or digital, open / closed loop and microstepping (up to 256 steps/step) for step motors Powerful Technosoft Motion Language (TML) instruction set including motion commands, program flow control, I/O handling, arithmetic and logic operations, axis synchronization Stand-alone operation with stored motion program RS-232 serial communication for setup and motion programming Opto-isolated digital I/O (6 outputs / 5 inputs) 2 Analog inputs +/- 10V differential (reference and tacho) Digital reference inputs: 2nd encoder / step and direction, RS422 differential Position feedback: RS422 differential encoder and digital Halls or absolute SSI encoders (IDM680-8EIET), linear Halls, sine / cosine incremental encoder or sine / cosine absolute encoder with EnDAT protocol (IDM680-8LI-ET), resolver (IDM680-8RI-ET), BiSS encoder (IDM680-8BI-ET) Power supplies for logic (12-48V) and motor (12-80V) 8A continuous, 16.5A peak current Protection for over current, short circuit, over temperature, over- and under-voltage, I2t, control error

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

Product Feature: TMC-3D G-code


Introduction G-code is a popular programming language used in Numerical Control. Although it is not a genuine programming language (like ANSI-C), it does provide a somewhat standard method for multi-axis path definition and is mostly used in machine tool applications. G-code is often the intermediary between high level CAD/CAM software where parts are designed and the actual machine that cuts the metal. Standardization around G-code is not very strict, leading to much user interpretation. Nevertheless, it does provide some framework for a common platform Technosoft TMC-3D The TMC-3D is a multi-axis motion controller, capable of generating 3-D paths and commanding up to 8 axes. The TMC-3D can power a single motor, the other motors in the system need to be controlled by other Technosoft drives. All programming is done via TML (Technosoft Motion Language). In order to accommodate standard path planning, a G-code interpreter is made available within EasyMotion Studio (the IDE for TML programming). This G-code interpreter can translate a G-code sequence into the proper TML commands, eliminating almost all motion specific programming. G-Code Support The following G and M codes are supported by the interpreter:

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

Remarks: 1. The home position parameters are set via #5161 - #5186. For details see below the table G-code parameters supported. 2. The coordinate system parameters are set via #5211 - #5386. For details see below the table G-code parameters supported. 3. If Stop program or End program M-words are used, and no cycle start button is defined the program restarts from the beginning of the G-code program imported. 4. G-code block M30 is converted to M2. G-code block M60 is converted to M0.Pallet shuttle commands are not supported. 5. Coolant valve can be set from the Import G-Code file dialog. You can set the axis to which the button is connected, the input line and the polarity. 6. The override percent can be changed from Import G-Code file dialog. By default the override percent is set to 100%. 7. The block delete switch can be enabled from the Import G-Code file dialog. By default this switch is disabled. 8. The optional program stop switch can be enabled from the Import G-Code file dialog. By default this switch is disabled. 9. In Import G-Code file dialog you can set values: traverse rate, spindle rate, feed rate, and the rotation sense. By default the positive sense for the spindle speed is clockwise. 10. The default units are millimeters. In the Import G-Code file dialog you can choose between inch and millimeter.

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

Configuration A G-code file can be imported into a TMC-3D project in EasyMotion Studio:

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

Within the configuration window the axes can be selected, as well as feed rates and spindle speeds and all other auxiliary functions. An example drawing, G-code list and resulting TML code are shown below:

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

Application Solution: Unmanned Underwater Vehicles

Although land and air robotic vehicles have increasingly been used by civilian and military agencies for border surveillance, intelligence gathering and offensive operations, the deployment of Unmanned Underwater Vehicles (UUV) is still in its infancy. In 2000 and 2004, the U.S. Navy published a master plan detailing size, weight, and mission for the two main types of UUVs. The two types were tethered (UUV power and control via an umbilical) and autonomous (AUV battery powered with onboard intelligence). Since then, with the creation of the Department of Homeland Security and two ongoing wars, research and development with UUVs has forged ahead worldwide. Two examples appear below, from the simple, tethered torpedo to the futuristic and combat-oriented:

A C'Inspector UUV with side-scan sonar for seabed and ship hull inspection.

Artist's concept: Trident World Systems Generally, UUV designers have looked to incorporate components and systems already used commercially and by the scientific community not only to keep costs down, but to speed development for ever-increasing types of missions. One of the main areas of concern for UUV engineers is motion. This involves depth control, back and forth propulsion and turning. The motion can be fully active, meaning motors are used to drive propellers, vanes and thrusters or semi-passive, meaning the UUV rides underwater currents and changes depth by

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

10

vanes and ballast pumps. Although brushed DC motors have been used, it is more common to see both brushless DC servomotors and stepping motors being used. With the use of COTS (Commercial Off-the-Shelf) motors, comes the need to match the requisite drive(s) for the stepper and servomotor. In doing so, most UUV engineers look for the following criteria in down selecting a drive solution: 1) universality in powering both servos and steppers 2) good power density 3) if battery powered , a range of low and high current on low voltage DC bus offerings 4) easy to program(for AUV apps), with multiple protocol options, even mixing some 5) standalone or networked slave operations, even the ability to do both simultaneously 6) ability to use one drive as a bus gateway to the other drives in the UUV 7) proven bus options such as RS485 and/or CAN 8) ability to be quickly modified down to the PCB 9) packaged versions for quick testing as well as OEM board level versions 10) broad power range for various size motors 11) drives easily integrated with a higher level, system controller if needed. There is in fact a company, Technosoft S.A. ( www.technosoftmotion.com ) , that provides intelligent drives meeting the criteria above, making them an excellent choice for incorporation in UUV designs. It will be the focus of the remainder of this article using a generic example of an active UUV motion layout to show how the Technosoft intelligent drives can accomplish the motion control system (hardware and software) of a UUV. The diagram below provides a typical scenario, common in rudimentary UUV designs. It consists of a main propeller (NEMA34 servo), two smaller thrusters (NEMA17 servos) which are each connected independently to a stepper motor (NEMA23 stepper) for depth control and turning the UUV. Also there is an embedded, single board computer running a Linux OS. The embedded computer provides supervisory control to the motors via the drives as needed.

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

11

As we review the layout above, some of the criteria previously listed become apparent. First, there is one drive type, the PIM2403, which is controlling both the NEMA23 steppers and the NEMA17 brushless servos. This function exists on almost all drive families from Technosoft. In addition, the software development environment is the same for all drive families, independent of motor type. This makes programming easy regardless of drive or motor type/size. The PIM2403 drives provide 3 amps continuous, 6 amps peak @ 24VDC in a small package and also are available in a packaged version with screw terminals for quick testing/prototyping. Secondly, the Linux SBC is connected serially only to the ISD720 drive which acts as a gateway to the PIM2403 drives via a separate CAN bus connection, relaying commands and data. See below:

Not only does this simplify wiring, but it also provides for different programming architecture options: Linux SBC acts as a true master with no local code on the drives Linux SBC acts as a master, but drives have some local code running independently Some/all of the drives act as intelligent network nodes running code independently and sharing data with each other. The Linux SBC acts only in a housekeeping mode.

Also, the ISD720 drive is able to use the same bus voltage (24VDC) as the smaller servos and steppers while providing 20 amps continuous and 49.5 amps peak current. One critical issue that is not readily apparent from the layout diagram is whether or not COTS drives can handle the uniqueness of enclosure pressurization in oil at relatively high pressures of greater than 1500psi to insure watertight sealing of the electronics. Generally, board level components such as power capacitors and clock crystals are susceptible and must be replaced with MIL-SPEC equivalent. To date, these changes have been relatively easy to make in-the-field on Technosoft's open frame drives. Let us now take a quick look at how programming is handled in our example. As seen from the layout, a Linux SBC has been incorporated and used as a higher level controller. It passes velocity information to the ISD720 to regulate main propeller speed, starts and stops the thrusters (PIM2403s) and adjusts the position of the steppers

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

12

(PIM2403s) to adjust depth of the UUV. All of this is accomplished using Technosoft's Motion Language (TML) commands sent as binary code in HEX format over the serial connection. As stated previously, the ISD720 acts as a gateway. As commands come in over the serial connection from the Linux SBC, the node ID is sampled and the command is relayed to the appropriate PIM2403 drive. In our example, determining the correct binary code string to send is accomplished using the Binary Code Viewer from within Technosoft's EasyMotion Studio programming environment. We will use the example of setting the velocity of Node 3 (one of the NEMA17 servos PIM2403 drive) to 10 rps. The code to run at constant velocity is shown below from the Main screen of Technosoft's EasyMotion Studio programming environment:

The variable of interest is CSPD, which is Commanded Speed , seen on the fourth line of the Main program section. To see the actual Binary code sent out, EasyMotion Studio includes a Binary Code Viewer, which helps you to quickly find how to send TML commands using one of the communication channels and protocols supported by the drives/motors. Using this tool, you can get the exact contents of the messages to send as well as of those expected to be received as answers. One can select it from the Application tab, the sub-menu Binary Code Viewer:

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

13

In this case, sending the HEX string 08 00 30 24 A0 CC CD 00 CC 61 from the Linux SBC results in Axis #3 (NEMA17 servomotor) running at 10 rev/sec until commanded to do otherwise. In summation, the Linux SBC packs the binary code of each TML command string into a message which is sent. The low-level simplicity of the binary code allows many different external platforms to communicate with the drives. This is one example of how a supervisory host can communicate with the Technosoft drives. An alternate way to exchange data with the Technosoft drives/motors is via the TML_LIB libraries. A TML_LIB library is a collection of high-level functions for motion programming which you can integrate in the host/master application, typically found on an industrial PC or PLC. One can see that Technosoft's intelligent drives meet the prerequisites of COTS drives looked for by designers and UUV engineers.

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

14

For more information about any of the above topics or general questions or comments, please contact us: Motion Designs contact@motion-designs.com Tel 805.504.6177
Motion Designs is a technical sales and engineering company with extensive machine and motion control experience. We work with some of the best manufacturers in the industry as witnessed by our present line card: www.amosin.com: AMO manufactures induction based precision linear and angle measurement encoders. www.arcus-technology.com: Arcus Technology manufactures stepper motor, drive and controller technology, providing USB, Ethernet and Mod-Bus connectivity. www.nanotec.com: Nanotec provides a comprehensive range of stepper and servo motor solutions. www.nipponpulse.com: Nippon Pulse manufactures the unique linear shaft motor, a direct drive linear brushless servo motor. www.stegmann.com : Stegmann is a leader in high performance motor feedback solutions. www.technosoftmotion.com : TSM is a leading DSP motion control technology company specialized in the development, design and manufacture of digital motor drive products and custom motion systems.

WWW.MOTION-DESIGNS.COM

(805) 504-6177

PAGE

15

Potrebbero piacerti anche