Research Article  Open Access
Yaohua Deng, Sicheng Chen, Bingjing Li, Jiayuan Chen, Liming Wu, "Study and Testing of Processing Trajectory Measurement Method of Flexible Workpiece", Mathematical Problems in Engineering, vol. 2013, Article ID 798274, 9 pages, 2013. https://doi.org/10.1155/2013/798274
Study and Testing of Processing Trajectory Measurement Method of Flexible Workpiece
Abstract
Flexible workpiece includes the materials like elasticity spline, textile fabric, and polyurethane sponge, due to the fact that processing trajectory is composed by small arc or small line segment primitives and the deformation of the flexible workpiece during the processing trajectory, making the captured image of processing trajectory not clear, the edge of processing image over local uneven gray, and also the pixels of boundaries between the processing trajectory image edge and background organizations not obvious. This paper takes corner search of processing trajectory as the cutinpoint, slope angle curve of starting and terminal point of each primitive is also designed, put forward the search algorithm that regards Daubechies (4) as wavelet operator to conduct slope angle curve for multiple scales wavelet transform, by judging whether there is a point of the curve appears wavelet transform extremum to determine whether the point is a corner point based on wavelet edge modulus maxima extract principle. Finally, proposed a decomposition/reconstruction design method of FIR filters based on wavelet transform of processing image. Eighttap transpose FIR filter is used to design the decomposition of Daubechies (4) and reconfigurable computing IP core. The IP core wavelet decomposition of the total timeconsuming increases only 5.561% in comparsion with PC. Trajectory angle relative error is 2.2%, and the average measurement time is 212.38 ms.
1. Introduction
Flexible workpiece trajectory processing refers to the procedure of conducting all kinds of complicated image processing in workpiece which is consisted of multilayer soft material, and emerged some uneven pattern on the surface of workpiece [1, 2]. Straightness, roundness, and primitives angle error geometrical are the important measurement parameters of machining profile of flexible workpiece trajectory processing which is an important indicator of evaluating the trajectory processing precision, also providing a basis for the processing feedback compensation control [3]. However, the edge and corner of the pattern of flexible workpiece processing trajectory are fuzzy and shaped; the extraction of processing image feature information (such as edges, corners and shapes) is a key issue in processing trajectory visual measure method. At present, there are two main kinds of fuzzy edge detection algorithms: Pal fuzzy edge detection algorithm and multiresolution image detection algorithm. Pal and King put forward the Pal fuzzy edge detection algorithm that the awaiting image is mapped into fuzzy membership matrix; maximum and minimum operator are used to extract edge [4] from the viewpoint that the uncertainty of the image is caused by the fuzziness, while Shi Chengxiang puts forward the extended multiscale fuzzy edge detection algorithm that extends 8 neighborhood to 16 of gray, making a merger of wavelet multiscale and fuzzy theory and using competition rules to select the edge points from the viewpoint that the image pixel of the edges changes in different neighborhoods gray [5]. Literature [6] puts forward an error compensation method that consists of an elementfree error interpolation scheme and a recursive software error compensation scheme. Literature [7] proposes a densitybased clustering algorithm for trajectory data stream.
Flexible workpiece includes the materials like elasticity spline, textile fabric, and polyurethane sponge; its material mode shows the physics nonlinearity or geometry nonlinearity, macroscopic property respond to low rigidity intensity, low elasticity modulus, soft mechanics property, and so on. The processing trajectory discussed in this paper refers to processing completion in flexible workpiece, with the following characteristics. The deformation is generated by extruding during the process of flexible workpiece trajectory processing; there is a certain lag about elastic recovery of workpiece after processing, it will make the captured image not clear especially the edges of the image over local gray uneven near the trajectory. Due to the fact that processing trajectory is composed by small arc or small line segment primitives and the diversity of geometry, the pixels of boundaries between the processing trajectory image and background organizations are not obvious in the convergence department of small arc and small line segment. Thinking about the edge blur and diversity of geometry of flexible workpiece processing trajectory pattern, the edge detection based on multiscale fuzzy and rapid positioning of the image corner is the key to accurately measure trajectory profile. This paper focuses on the measurement of the angle error due to the fact that the processing angle error can evaluate processing effects of right, sharp angle and line or arc which are the composition of the angle and can be easily measured online.
2. Mathematical Description and Measurement Ideas of Flexible Workpiece Processing Trajectory Angle
The trajectory straightness error , angle error , and roundness error all can reflect the deviation of trajectory, owing to the fact that the angle error can evaluate the integration processing effects of right angles, sharp corners, and the included angle which consists of straight lines or arcs, and the angle error can measure online easily, so the paper focuses on the method of flexible workpiece trajectory processing distortion compensation control with angle error that can measure feedback. Processing trajectory is composed by small arc or small line segment primitives; Figures 1 to 3 are the three types of processing trajectory element angle (including straight linestraight lineangle , arcarcangle , and straight linearcangle ). From Figures 1 to 3 we can know that the angle of the handover of lines and line segments is easy to obtain; as for seeking the angle of handover of arc and line segment (or arc), we must firstly seek the arc tangent, and then the angle between tangent and line segment; therefore, the actual angle can be found by correctly extracting line segment, arc profile of processing trajectory.StraightStraightAngle of Figure 1. , are the processing trajectory fitting straight lines , after the extraction of profile is the angle between the two straight lines, , , and , , and are constants; formula (1) can be obtained by the linear equation of , : ArcArcAngle of Figure 2. is the intersection point of two extracted fitting arcs trajectory , ; arcarcangle is formed by tangents , of circle P1, P2, , , , and , , are the geometric equation coefficients of circle P1, P2; formula (2) can be obtained by the tangents equation of , : Straight LineArcAngle of Figure 3. straight linearcangle is formed by fitting straight line of straight line trajectory and the tangent of fitting arc of arc trajectory. , , and are constants, , , and are the geometric equation coefficients of circle P1, and formula (3) can be obtained by straight line and tangent equation : Figure 4 is the flow chart of processing trajectory angle measurement. The processing is composed by the following parts. Firstly, PAL analog camera collects and processes image video information; the information enters into image sensor signal acquisition module after it converted to digital video through decoder chip TVP5150. Secondly, conduct wavelet transform of processing image, thirdly, extract processing trajectory profile. Finally, locate the origin and terminal of primitive, and calculate the angle of primitives.
3. Angle Measurement and Implementation of Flexible Workpiece Processing Trajectory Base on Wavelet Multiscale
Angle measurement of flexible workpiece processing trajectory is based on the wavelet decomposition of processing image; measure angle can be obtained by extracting processing trajectory profile, determining corner of each trajectory primitive (the start and terminal position of primitive), and drawing out the angle measurement auxiliary line. Since the processing trajectory profile can be extracted through wavelet modulus maxima [8, 9], in the following content, the positioning algorithm of starting, terminal points position will be discussed combining the information processing of wavelet multiscale [10].
3.1. Corner Multiscale Wavelet Positioning Algorithm of the Flexible Workpiece Processing Trajectory
For closed processing trajectory of geometric patterns, the place where starting, terminal points of primitive located is also the place of each corner in the trajectory; they are in the greater curvature of the trajectory image profile. As Figure 5 shows, the curve can be obtained by obtaining the slope angle of each point along the processing trajectory profile, and the corner region of each corner shows a step change on the curve; the sharper the corner is, the greater the step amplitude will be. If the adjacent angle curves are not overlapped, the corner of the corner point is in the range of ~ (, and is an integer), the slope is represented by , the constant is represented by , and assuming its curve is monotonic rise (or fall), in that way, the curve can be seen as Figure 6 shows, a monotonic rise curve composed by three lines; the curve equation is shown as follows:
According to extraction algorithm of wavelet edge modulus maxima, at an arbitrary point of the image, if the modulus value is a local maxima along given gradient direction of the argument , it is considered as the proof of an edge point [9, 10]; the curve can be conducted multiple scales wavelet transform and by judging whether a point of the curve appears wavelet transform extrema to determine whether that point is a corner one.
Let be the scale factor, cubic spline is smooth function , and is the first derivative of , let be the basic wavelet; therefore, conducts wavelet transform on : It can be seen that extremum of appears in the place where ; that is,
Then, the extrema ratio of two different scale factors , (), can be obtained as formula (9).
Therefore, corner detection procedure of processing trajectory image is expressed as follows. Extract the edge profile of processing image trajectory based on wavelet edge rapid extraction algorithm. Calculate the wavelet transform of in the three adjacent scales , , and , and the result is stored in the specified array. Detect the extremum in three adjacent scales of , if there is wavelet extrema in each corresponding position of the three adjacent scales and its value is not less than the set value , the corner is a candidate one. Calculate the extrema ratio of two different scale factors while , , or , , if (, ), the corner is a candidate one, otherwise, forgone the corner:
3.2. Hardware Implementation of Processing Image Wavelet Transform of FIR Filter Accelerating Decomposition/Reconstruction
Let be the flexible workpiece trajectory processing image. reflects lowfrequency components in both the horizontal direction () and vertical direction () after conducting the twodimensional wavelet transform of processing image, reflects the lowfrequency components in direction and highfrequency components in direction , and reflects the highfrequency components in direction and lowfrequency components in direction , reflects highfrequency in both directions , [11]; represents the lowpass filter having the impulse response and represents the highpass filter having the impulse response, according to Mallat algorithm, wavelet decomposition, or reconstruction of is consisted of several levels highpass filter and lowpass filter , , can be built by using finite length (FIR) filter as Figure 7 shows when the filter coefficients is known [12–14].
Based on Figure 9, choose Daubechies as the filter of wavelet decomposition and reconstruction procedure of ; since the wavelet filter coefficients are eight, each , filter can be built by 8 gap FIR filter.
Figure 8 is the structure of FIR filter based on Xilinx VC4VSX25 FPGA and DSP48 Slice of Xilinx Xtreme DSP.
Configure port OPMODE = 0000101 of the left first DSP48 slice in the figure while other OPMODE = 0010101, port of all levels are the input terminal of image signal , expressing it in complement; data width is 18 bits, including 1 sign bit, 9 integer bits and 8 decimal bits. Response of Daubechies filter coefficients of each level is stored in register , expressing it in complement; data width is 18 bits, including 1 sign bit and 17 decimal bits. By connecting port BCIN, BCOUT of all levels of register to form a register chain, it can easily modify the entire filter coefficients of all levels by operating port of the first level DSP48. The input CIN and output COUT of processing results at all levels interconnect; the final result is output through port , with the width 48 bits. As for the input of 8bit image pixel, the data is first shifted to the left by 8 and then input; finally output intercept high 32 bits 8tap FIR filter is connected to VC4VSX25 FPGA embedded Microblaze Processor in coprocessing way, performing data communication through interface of fast singlelink bus FSB bus and control logic state machine is consisted of awaiting image data input (IDLE), configuration register coefficient (CONFIG), and start filter (EXEC) three states. The switch of each state is controlled by the two signals FSL_S_ Exists and FSL_S_ Control of FSL interface. Figure 9 is an 8tap FIR filter FSL control state machine.
4. Testing Laboratory
Figure 10 is physical photo of the Xilinx FPGA IP core verification platform. Experimental hardware environment is Computer PC, Intel Core i5 processor, the operating frequency 2.19 GHz, memory 2 GB, Xilinx VC4VSX25 FPGA development system; software environment is Microsoft Windows XP Professional operating system, Xilinx ISE10.1i EDK 10.1i Modelsim6.5, MATLAB R2008a. To establish IP core verification project by using Xilinx Platform Studio (XPS), the frequency of MicroBlaze Processor processor is 165 Mhz and PLB bus clock cycle is 1 × 10^{5} ms. Processing trajectory image (grayscale image) of Figure 11 is taken as test picture, with the size of 720 × 576 pixels; Daubechies filter is choose as wavelet transform [11].
4.1. FIR Hardware Implementation Test of the Processing Image Wavelet Transform
Conduct a twostage wavelet decomposition on trajectory processing test image, with each stage including the horizontal and vertical direction wavelet decomposition, image decomposition effect, and wavelet decomposition time of each stage.
Wavelet decomposition of processing image is divided into 2 levels: the first level of decomposition includes 2 stages; the first stage is the wavelet transform in vertical direction, and in this stage, the lowfrequency component is in the upper half part of the image, while highfrequency component is in the below half part; the decomposition results can be seen in Figure 12(a). The second stage is the wavelet transform in horizontal direction; in this stage, the lowfrequency component is in the left half part of the image, while highfrequency component is in the right half part; the decomposition results can be seen in Figure 12(b). The second level decomposition also includes 2 stages; the first stage is the wavelet transform in horizontal direction, and in this stage, the lowfrequency component is in the left half part of the image, while highfrequency component is in the right half part; the decomposition results can be seen in Figure 13(a). The second stage is the wavelet transform in vertical direction; in this stage, the lowfrequency component is in the left half part of the image, while highfrequency component is in the right half part; the decomposition results can be seen in Figure 13(b).
(a) The first stage
(b) The second stage
(a) The first stage
(b) The second stage
From Figures 12 and 13, we can know that frequency components of the first and second level decomposition relative to wavelet decomposition result of given in Section 3.2.
Figure 14 is the processing image after conducting wavelet transform reconstruction; the image is nearly the same with original drawing in Figure 11, proving that the correctness of designing processing image wavelet transform of FIR filter for image decomposition and reconstruction.
In the condition that PLB bus clock cycle is 1 × 10^{5} ms, make a test of 11 times about the time required to FIR filter wavelet decomposition, respectively, statistic the consuming time of two levels wavelet decomposition , , and the total consuming time , and make a comparation with consuming time of computer PC. The total consuming time of two levels wavelet decomposition calculated by hardware in Table 1 is ms which is 5.561% longer than ms the calculated time of PC.

4.2. The Angle Measurement Laboratory of Processing Trajectory
Let , , , = 0.95, and = 1, put them into formula (6), and make a search for the corner in specified region of processing trajectory image which is shown in Figure 15 (arc primitive , ), and Figure 16 shows that the testing results of origin and terminal location.
It can be seen that algorithm can accurately locate the position of the corner, the position where the starting, terminal points are of arc primitive , . In order to make a further test of angles , , firstly take 12 fitting points of each arc , and search outwardly with the length of 20 pixels, finally the fitting circles , can be got. Combining with calculation formula (2) of arcarc angle, the angle of arc primitive , can be calculated (see Figure 17). Table 2 is the comparison table of measured value resulting from repeating 10 times measurements and actual value; the average relative error of measurement method is 2.2% and the average measured time is 212.38 ms.

5. Conclusions
(1)According to the fact that processing trajectory is composed by small arc or small line segment primitives and the pixels of boundaries between the processing trajectory image and study a search algorithm of origin and terminal location combined with wavelet multiscal algorithm, the results show that relative error and average measure time of trajectory angle is 2.2% and 212.38 ms.(2)FIR filters accelerated decomposition/reconstruction design method of processing image wavelet transform is put forward. Eighttap transpose FIR filter is used to design the decomposition of Daubechies and reconfigurable computing IP core; total consuming time of the two level hardware core wavelet decomposition is only 5.561% longer than the calculated time of PC.
Acknowledgments
This work is partially supported by National Natural Science Foundation of China (no. 51205069), Natural Science Foundation of Guangdong Province, China (no. S2013010013288), and Combination Project of Industryuniversity research of Huizhou city of Guangdong Province China (2011C010002008).
References
 D. Yaohua, L. Guixiong, and W. Liming, “Deformation decision knowledge extraction of FWP processing based on RS and entropy,” Advances in Intelligent and Soft Computing, vol. 146, no. 3, pp. 407–414, 2012. View at: Google Scholar
 D. Yaohua, L. Guixiong, and W. Liming, “Research of flexible workpiece deformation prediction and error compensation method of CNC machining process,” Mechanical Science and Technology, vol. 29, no. 7, pp. 846–851, 2010. View at: Google Scholar
 Y. Deng, G. Liu, Q. Liao, L. Zeng, and L. Wu, “Research of FWP process deformation compensation forecasting on the basis of TSFNN,” Advanced Materials Research, vol. 295–297, pp. 2430–2437, 2011. View at: Publisher Site  Google Scholar
 Y. Yang and S. Huang, “Modified Pal and King algorithm for fuzzy edge detection,” Chinese Journal of Scientific Instrument, vol. 29, no. 9, pp. 1918–1922, 2008. View at: Google Scholar
 C. Shi and S. YanDan, “Extended multiscale fuzzy edge detection,” Computer Engineering and Applications, no. 7, pp. 65–68, 2006. View at: Google Scholar
 W. ShihMing and L. JiJun, “Onmachine volumetric measurement and compensation methods for Micro machine tools,” International Journal of Precision Engineering and Manufacturing, vol. 14, no. 6, pp. 989–994, 2013. View at: Google Scholar
 Y. Yu, Q. Wang, X. Wang, H. Wang, and J. He, “Online clustering for trajectory data steam of moving objects,” Computer Science and Information Systems, vol. 10, no. 3, pp. 1293–1317, 2013. View at: Google Scholar
 Y. Liu, Y. Liu, and Z. Cen, “Multiscale Daubechies waveletbased method for 2D elastic problems,” Finite Elements in Analysis and Design, vol. 47, no. 4, pp. 334–341, 2011. View at: Publisher Site  Google Scholar
 C. Ducottet, T. Fournel, and C. Barat, “Scaleadaptive detection and local characterization of edges based on wavelet transform,” Signal Processing, vol. 84, no. 11, pp. 2115–2137, 2004. View at: Publisher Site  Google Scholar
 D. E. Dutkay, P. E. T. Jorgensen, and S. Silvestrov, “Decomposition of wavelet representations and Martin boundaries,” Journal of Functional Analysis, vol. 262, no. 3, pp. 1043–1061, 2012. View at: Publisher Site  Google Scholar
 K. Maleknejad, M. Yousefi, and K. Nouri, “Computational methods for integrals involving functions and Daubechies wavelets,” Applied Mathematics and Computation, vol. 189, no. 2, pp. 1828–1840, 2007. View at: Publisher Site  Google Scholar
 R. Lehto, T. Taurén, and O. Vainio, “Recursive FIR filter structures on FPGA,” Microprocessors and Microsystems, vol. 35, no. 7, pp. 595–602, 2011. View at: Publisher Site  Google Scholar
 B. Krill, A. Ahmad, A. Amira, and H. Rabah, “An efficient FPGAbased dynamic partial reconfiguration design flow and environment for image and signal processing IP cores,” Signal Processing, vol. 25, no. 5, pp. 377–387, 2010. View at: Publisher Site  Google Scholar
 R. Salvador, A. Vidal, F. Moreno, T. Riesgo, and L. Sekanina, “Accelerating FPGAbased evolution of wavelet transform filters by optimized task scheduling,” Microprocessors and Microsystems, vol. 36, no. 5, pp. 427–438, 2012. View at: Google Scholar
Copyright
Copyright © 2013 Yaohua Deng et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.