Embodiment
The present invention will be further described below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, according to spraying profile planing method of the present invention, comprise the following steps:
1, the importing of structuring workpiece cad model and cutting apart
Cad model by guiding structure chemical industry spare STL form, according to its triangle gridding data characteristics, extract geometric properties, the geometric properties that deviates from angle, triangle area, adjacent edge length, normal vector etc. of adjacent triangular plate particularly, then according to these geometric properties, the structuring part model is cut apart, by its burst, be some simple standardization workpiece (as plane, the face of cylinder, circular conical surface, sphere etc.), and the geometric parameter of each standardization workpiece of extraction represent after burst.Concrete steps are as follows:
The first step: import the STL triangle gridding model of workpiece, namely surface to be sprayed adopts spatial triangle to be similar to, and each triangle obtains its three summits, and calculates thus its normal vector.
Second step: the Extraction of Geometrical Features of model and analysis.The geometric properties of required extraction mainly comprises the area that deviates from angle, each adjacent sub-sheet between adjacent sub-sheet, the length of adjacent sub-sheet common edge, the normal vector of sub-sheet etc.
The 3rd step: according to the geometric properties relation of each adjacent sub-sheet, the antithetical phrase sheet adopts the mode of region growing to make up, thereby original structure chemical industry spare is divided into to some single standard beggar's workpiece, in conjunction with the mode of man-machine interactively, segmentation result is done further to revise simultaneously.
Concrete cutting procedure need to carry out according to the resemblance of standardization workpiece to be determined, as shown in Fig. 8-11, the triangle grid model that forms the standardization workpiece shapes such as plane, the face of cylinder, circular conical surface and sphere differs from one another: the leg-of-mutton normal vector of each of plane is all substantially equal, and its error should be within certain scope; A triangular plate on the face of cylinder only has two adjacent triangular plates, and the area approximation of each triangular plate equates, the normal vector angle of arbitrary neighborhood triangular plate equates and all perpendicular to cylinder axis; Circular conical surface is as a special case on the face of cylinder, and triangular plate only has two adjacent triangular plates, and the area of adjacent triangular plate is unequal but equate with the area every a triangular plate, and the normal vector angle of arbitrary neighborhood triangular plate equates but out of plumb and circular cone axis; The Gaussian curvature of sphere any point all equates and is 1/R
2, R is spherical radius.
The 4th step: extract the geometries characteristic of the standardization workpiece that burst obtains, as the length on plane and wide, the radius on the face of cylinder and height, the height of circular conical surface, spherical radius.This process can adopt NUMERICAL MATCH METHOD FOR to carry out.
2, the spraying modeling of standardization workpiece
Plane spraying experimental data according to collection in worksite, employing is set up corresponding plane coating cumulative speed model based on the NUMERICAL MATCH METHOD FOR of L-M algorithm, according to infinitesimal geometry area amplification principle, obtain on this basis the spraying model of the coating cumulative thickness of free form surface, then derive for other each standardization workpiece (face of cylinder, circular conical surface, sphere etc.) spraying model, complete the coating distribution modeling process of standardization workpiece.
(1) plane spraying experiment, obtain the coating distributed data
In the process of reality spraying, the distribution effect of coating is relevant with many factors.At first the spraying model that the present invention sets up has guaranteed to be set by the expert from parameters such as spray gun structure, coating characteristic, coating concentration, atomization air pressure, spraying swath air pressure, in spraying process, remains unchanged; The height h of spray gun takes the optimized parameter of recommending in the spray gun instructions; The direction of spray gun is perpendicular to the spraying surface of the work.Thus externally under the condition of ambient stable, the distribution situation of coating can be similar to be considered as constant.As shown in Figure 2, S is the coating distributed areas, is generally oval circular.Concrete steps are as follows:
The first step: be ready to plane steel plate, its light plate needs removing rust to process to guarantee to have an even surface smooth and dry;
Second step: allocate paint vehicle by the expert, and corresponding spray parameters is set, comprise fan-shaped control air pressure, atomization air pressure, spraying swath air pressure etc.;
The 3rd step: the examination spray guarantees that spray channel is unobstructed;
The 4th step: formal spraying.In experiment, by PLC, control the switching time of spray gun, carried out the repeatedly spraying experiment at different time interval;
The 5th step: coated and dried prevents sagging;
The 6th step: the distribution range (being the radius R of circular spraying area S) of determining coating;
The 7th step: adopt the rasterizing method divide and sample the coating distribution range, utilize contactless layer thickness gauge measurement to obtain the thickness profile data of each Grid Sampling point.
(2) based on L-M algorithm match coating cumulative speed model
For plane spray-on coating Accumulation Model, the present invention adopts the oval gaussian sum model description that following precision is higher:
P=[q wherein
1, σ
1x, σ
1y, q
2, σ
2x, σ
2y]
TFor treating the model parameter vectors of match.According to experimental data, adopt the nonlinear least square method based on L-M to carry out iterative fitting to following formula, to obtain the identification result of model parameter, concrete iterative step is as follows:
The first step: the initial value of p is set, calculates initial matrix Z;
Second step: the mould F of error of calculation matrix f, Jacobin matrix J and error matrix;
The 3rd step: calculate Hessian matrix H and gradient g;
The 4th step: calculate step-length H_lm, and judge that whether F is less than convergency value ε;
The 5th step: calculate p_new=p+H_lm, and calculated gains compares ρ;
The 6th step: judge that whether ρ is greater than 0, and upgrade iterative value;
The 7th step: judge that whether F is less than convergency value ε, if meet the iteration end, otherwise return to the 4th step, and upgrade coefficient u, v and H_lm.
(3) modeling of standardization Workpiece painting model
The present invention has mainly considered the spraying problem of three kinds of standardization workpiece such as the face of cylinder, circular conical surface and sphere, on the basis of above-mentioned areal model, adopt differential geometric area amplification principle further to derive and obtain the coating cumulative speed model of these three kinds of standardization workpiece, thereby provide foundation for the parametric programming technique of standardization workpiece.
As shown in Figure 3, s is the arbitrfary point on free form surface, plane P
1For the reference planes of a certain spray gun vertical incidence, plane P
2For crossing s point and and plane P
1Parallel plane, h and h
sBe respectively the s o'clock vertical height to two planes; Define four small planes, c
1For spray site and s point line and P
1The small plane at the intersection point place on plane, c
2For P
2On plane, cross the small plane that s order, the small section that c3 and c4 cross respectively s point and order with mistake s on the vertical plane of s point injection direction with spray gun, c
2With c
3Angle is θ, c
3With c
4The angle on plane is γ; q
i(i=1,2,3,4) are respectively small plane c
iUpper coating cumulative thickness; Lance ejection is put the distance that s orders and is l
s.According to constant hypothesis and the area amplification principle of paint flux, can obtain s point coating cumulative thickness
1) the coating cumulative speed model on the face of cylinder
As shown in Figure 5, Q
cThe point on cylinder, Q
fThe point on the plane tangent with the face of cylinder, Q
cQ
fAt subpoint, f
c, f
fRepresent respectively Q
c, Q
fThe coating thickness of 2.In the present invention, set up coordinate system as shown in Figure 4, x
cAxle is the direction along the face of cylinder, y
cIt is the generatrix direction of cylinder.The note spray gun is to height h and the cylindrical radius R on the face of cylinder
cRatio be η=h/R
c.According to the geometrical property of cylinder and the position relationship on plane, obtain Q
fCoordinate (x
f, y
f).According to formula (2), can calculate Q
cThe coating cumulative speed is:
2) the coating cumulative speed model of circular conical surface
As shown in Figure 6, on circular conical surface, spray the spraying model foundation that model can be similar to the face of cylinder.The model of setting up and formula (3) are similar, repeat no more here.
3) the cumulative speed model of sphere
As shown in Figure 7, C
2The point on sphere, C
1The point on the plane tangent with sphere, C
2C
1At subpoint, Q
c, Q
fRepresent respectively C
2, C
1Coating thickness.The present invention has set up coordinate system as shown in Figure 7, and the z axle is the opposite direction of lance ejection direction, and y is the spray gun working direction.The note spray gun is that h and spherical radius are R to the height of spherical surface
c, according to the geometrical property of sphere and the position relationship on plane, obtain Q
fCoordinate (x
f, y
f, z
f).According to formula (2), derive and obtain 1 C on sphere
1Coating cumulative speed model be
Wherein
3, the Optimization Solution of standard workpiece spray parameters
According to above-mentioned one-way trip coating Accumulation Model, set up corresponding multiple-pass stack coating cumulative speed model.The present invention, according to general spraying production status, only considers the situation of two spraying strokes stack.After for the spraying model inference, obtaining the coating cumulative speed distributed model of multiple-pass spraying, take spraying coating process such as expectation thickness and coating uniformities, require to set up as optimization aim the spraying profile Optimized model of each standard workpiece inside, and adopt the be optimized key parameter of track of the Numerical Methods Solve such as Fibonacci method, mainly comprise spray gun travel rate v and stroke spacing d etc.
(1) derivation of multiple-pass coating cumulative speed model on plane
Multiple-pass spraying process on plane as shown in figure 12.Owing to being coated with layer model, in spraying process, be constant, the speed of spraying is also constant simultaneously, therefore on any one cross section between stroke, its coating distribution situation is also identical.Therefore can only to single cross section, discuss, the impact of x namely only is discussed.The coating thickness of arbitrfary point s between stroke, its computing formula is as follows:
Wherein,
T wherein
1, t
2Represent respectively half of spray time that two strokes are ordered at s; r
1, r
2Expression s point is to the distance in spray gun incident point.
(2) Optimization Modeling of travel parameters and solving
The coating thickness of arbitrfary point s is except outside the Pass having with model itself, and is only relevant with stroke spacing d with the movement speed v of spray gun, so just can set up the optimization problem of v and d.When considering spraying effect, consider that mainly the expectation thickness of coating and coating uniformity are the optimization index, set up the optimization aim function as follows:
Wherein
For average thickness; q
sFor the cumulative speed of any point on coating distributes, and position x, stroke speed v, tri-relating to parameters of stroke spacing d.The related constraint condition is as follows:
v≤v
max,0≤d≤2R,q
avg=q
d (8)
Q wherein
dFor expectation thickness.After having set up optimization problem, adopt golden cut algorithm to carry out optimizing to d and v, wherein for each standardization workpiece q
sShould calculate by the corresponding coating cumulative speed of substitution formula, solve thus the spray parameters v and the d that obtain for dissimilar standardization workpiece.Concrete steps following (process flow diagram is as shown in figure 13):
The first step: initial value d is set
1=0, d
2=2R, wherein R is the spraying radius;
Second step: according to expectation coating thickness q
dCalculate v
1, v
2, and by d
1, d
2, v
1, v
2Calculation optimization target function value E
1, E
2
The 3rd step: use golden section to calculate d
3, d
4, make d
3=d
2-(d
2-d
1) * 0.618, d
4=d
1+ (d
2-d
1) * 0.618;
The 4th step: by the new d that obtains
3, d
4With the expectation coating thickness, calculate v
3, v
4, and by d
3, d
4, v
3, v
4Calculation optimization objective function E
3, E
4
The 5th step: compare E
3, E
4Size, if E
3>=E
4, make d
1=d
3, E
1=E
3Otherwise make d
2=d
4, E
2=E
4.
The 6th step: if | d
1-d
2|≤0.5, algorithm finishes, otherwise turns the 3rd step.
4, the spraying path in standard beggar workpiece generates
The crucial spray parameters v of the stroke for various criterion chemical industry spare that obtains according to optimizing and d, employing face cut-and-project method (as plane, the face of cylinder, circular conical surface, sphere) in each standard beggar sheet generates spraying profile, this algorithm is to utilize the geometric parameter of each standardization curved surface to form a series of planes to have cut trajectory planning, thereby form fast spraying process programming template, in actual use can be by input standard workpiece model to generate fast the spraying path, to guarantee coating quality, improve spraying production efficiency.
(1) plane spraying profile planning
The geometric parameter on plane has long a and wide b(a > b) as shown in figure 14.Spray gun, in the process of spraying, when needs turn round, needs acceleration-deceleration usually, this can cause the waste of energy and the decline of efficiency, and simultaneously, the coating uniformity of its spraying also will be affected when spray gun turns round, so in whole spraying process, the number of times that spray gun turns round is more few better.In order to meet this requirement, the track on plane is to carry out along length a.Concrete steps are as follows:
The first step: extract length line a and the wide line b on plane, construct first plane, do to be parallel to and through long edge and perpendicular to the plane P on plane
1
Second step: choose P
1For reference surface, set up cluster distance and be d(stroke spacing) parallel plane;
The 3rd step: utilize the bundle of planes and the curve surface of workpiece that generate to ask for intersection, by sampling obtains a series of sprayed surfaces path sampled point to intersection;
The 4th step: each sprayed surface sampled point can be obtained to actual spraying point position and the direction of spray gun along the normal vector direction translation h of surface of the work;
The 5th step: between each stroke, carrying out the migration path connection, thus the spraying profile of complete.
(2) face of cylinder spraying profile planning
The geometric parameter on the face of cylinder has the fan-shaped angle ψ of face of cylinder radius R, face of cylinder height h and top and bottom, as shown in figure 15.On the Zhong, face of cylinder, space, by the moving straight line that is parallel to boning out, around boning out, rotated and obtain, this boning out is axis.Foundation is around a series of planes of axis, and makes these plane cutting faces of cylinder can obtain face of cylinder track.Concrete steps are as follows:
The first step: extract the geometric properties on the face of cylinder, obtain face of cylinder radius R, face of cylinder height h and fan-shaped angle ψ, and extract straight line h, made the plane P of axis and straight line h
1
Second step: choose P
1For reference surface, setting up the cluster angle is the Plane of rotation of θ (θ=d/R, d are the stroke spacing), as cutting planes;
The 3rd step the~the five step is identical with (1) midplane spraying step, by cutting planes, generates the spraying path.
(3) spraying profile of circular conical surface planning
The geometric parameter of circular conical surface has bottom surface arc radius R, the fan-shaped angle ψ in bottom surface and cone height h, as shown in figure 16.With a series of spheres of plane cutting perpendicular to the circular conical surface axis.Step is as follows:
The first step: make the plane P perpendicular to axis and mistake bottom surface
1It is main cutting planes;
Second step: in definite first plane P
1On basis, determine plane P
2, P
2Establishment be by calculating spacing d and by P
1Translation d obtains;
The 3rd step: set up by that analogy P
3, P
4P
i, until P
I+1With circular conical surface, there is no intersection.Note differently with the face of cylinder here, the spacing d that obtains in different circular cones position is different, need to be optimized respectively calculating, and it is not equidistant causing cutting planes.
Following step is identical with the front algorithm.
(4) spraying profile of sphere planning
The geometric parameter of sphere only has spherical radius R, and spraying method is that the parallel along sphere carries out path planning, as shown in figure 17.Step is as follows:
The first step: determine equatorial line and the axis of sphere according to spherical radius R, made the plane P of equatorial line and vertical axis
1
Second step~the 5th step is identical with the spraying method of front, generates cutting planes bunch, and calculates the spraying path by the overlapping relation of plane and sprayed surface.But selected formation spacing d(is the cutting planes spacing, notices that d is not equivalence for spheroid, and namely cutting planes is non-isometric) different with stroke speed v.
It should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.In the present embodiment not clear and definite each ingredient all available prior art realized.