# Reduce Processing Time for Motion Profiles with Polar Representation

September 06, 2012
By Anonymous

Motion control follows conventional algorithms that take each transitional point as a tuple in the Cartesian space. Basically, each motion point is handled as X and Y coordinates; a hardware example could be an X-Y table. While this approach is simple and easy to implement, it can become redundant by adding too many repetitions in the controller’s (e.g. PLC) code. When using a circumference to represent a motion profile, each point in the circumference will have a set of X and Y coordinates. A simple 10 point circumference requires up to twenty X and Y tuples. Each set could be an instruction or a memory location (registers). Executing the instructions or reading the memory location where the tuples were saved will impact the processing time of the controller. However, a more significant consideration are the errors induced through linear parameterization of the curve. Polar parameterization is a simple method that can be used to avoid repetition, reduce errors, optimize a controller’s program, and simplify the motion profile logic. This method has been successfully applied in robotic motion to provide an optimal representation of nonlinear measurements/calculations distributed in the Cartesian space as linear distributions in polar space. Our previous example, 20 X-Y points in a circumference can be reduced to only 11 measurements or polar coordinates, this effectively lessens the processing time with 45% less data for the controller to handle. Figure 1- Polar and rectangular (Cartesians) coordinates of a 10 points circumference-.

Figure 1 shows how using one single variable for  R (radius) and 10 variables ʘ (angle) successfully replaces the 20 variables need to save all of the X and Y coordinates for the same curve. Converting between polar and rectangular coordinates is simple to implement in your controller. Figure 2 below shows the ladder logic used in a Panasonic FPX C30T PLC developed with Panasonic PLC programming software FPWINPRO. Figure 2- Panasonic PLC Program: Polar to Rectangular Coordinates Conversion

Formal equations used: Creating a motion profile with polar coordinates and then converting them to rectangular coordinates is a simple solution that will optimize your controller’s code, minimized the number of registers used by the program, and accurately describe each position. In my next article I will discuss how to use the Polar representation to control a servo configured in positioning mode. If you have any questions or additional thoughts on Polar parameterization please leave them in the comments area below, I'd love to hear your feedback.