Method for automatically calculating airplane profile waviness in MATLAB environment
By automatically calculating the waviness of aircraft shape in the MATLAB environment, and leveraging the advantages of reverse point cloud data and MATLAB's mathematical modeling capabilities, efficient and accurate waviness detection is achieved. This solves the problems of complex operation and low efficiency in traditional methods, and is suitable for aircraft inspection and assembly quality control.
Patent Information
- Application Number
- CN202510832306.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-10-31
AI Technical Summary
Existing methods for detecting aircraft shape waviness are difficult to combine ease of operation, high detection accuracy, and detection efficiency. Traditional 3D CAD software suffers from complex calculation logic, slow graphical interaction processing, and long calculation cycles.
In the MATLAB environment, the aircraft shape waviness is automatically calculated by reverse point cloud data processing, including planar classification of point data, three-dimensional coordinate system transformation, two-dimensional peak and valley point calculation and waviness calculation. By leveraging MATLAB's matrix calculation and mathematical modeling advantages, efficient automatic batch calculation and standardized report output are achieved.
It achieves high-precision, fast, efficient and automatic calculation of aircraft shape waviness, solving the problems of complex programming logic and long calculation cycle in traditional methods. It is suitable for aircraft inspection and assembly quality control, and provides a new approach for rapid inspection and data processing.
Smart Images

Figure CN120874223A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to, but is not limited to, the field of aircraft digital manufacturing technology, and relates to an automatic calculation method for aircraft shape waviness in a MATLAB environment. Background Technology
[0002] Aircraft shape waviness refers to unexpected undulations near the theoretical shape of an aircraft's surface. It is an important parameter of aircraft shape and is usually expressed as the ratio of amplitude to wavelength. During the development of new aircraft, aircraft shape waviness is of significant research importance for optimizing aerodynamic performance, wing lift, reducing air resistance, shortening takeoff distance, ensuring smoother airflow over the aircraft surface, reducing airflow separation and turbulence, and improving fuel efficiency. Furthermore, for new aircraft with low detectability requirements, precise control of waviness results in a smoother, more streamlined surface, effectively reducing scattering cross-section, minimizing electromagnetic leakage and interference, and improving the aircraft's low detectability performance.
[0003] Existing methods for inspecting aircraft body waviness mainly include visual inspection, template inspection, dial indicator inspection, and reverse measurement. However, these methods are difficult to combine ease of operation, high inspection accuracy, and high inspection efficiency. Summary of the Invention
[0004] The purpose of this invention is to provide an automatic calculation method for aircraft shape waviness in a MATLAB environment, so as to solve the problem that existing detection methods for aircraft shape waviness are difficult to achieve in terms of convenient operation, detection accuracy and detection efficiency.
[0005] The technical solution of this invention is as follows: This invention provides an automatic calculation method for aircraft shape waviness in a MATLAB environment, comprising: Step 1: Based on the reverse point cloud data of the aircraft shape, obtain the planar cross-sectional point data of the aircraft shape waviness. Step 2: Automatically calculate the aircraft's external waviness in the MATLAB environment. This includes: using a program in the MATLAB environment to perform planar classification of the point data of the planar cross section obtained in Step 1, three-dimensional coordinate system transformation, two-dimensional peak and valley point calculation, reverse transformation of the peak and valley point coordinate system, waviness calculation, and form report output to complete the automatic calculation of the aircraft's external waviness.
[0006] Optionally, in the above-described method for automatically calculating aircraft shape waviness in a MATLAB environment, step 1 includes: using 3D CAD software to denoise the aircraft shape point cloud data obtained by reverse measurement, establishing a planar cross section of the aircraft shape waviness, and exporting the planar cross section point data.
[0007] Optionally, in the above-described automatic calculation method for aircraft shape waviness in a MATLAB environment, step 1 includes the following steps: Step 11: Open the reverse-measured aircraft shape point cloud data in 3D CAD software and use a noise reduction tool to denoise the point cloud data. Step 12: In the 3D CAD software, establish a set of parallel planes for analyzing the aircraft's shape waviness. Intersect with the denoised point cloud data to form a point cloud cross section, which serves as the established plane cross section for the aircraft's shape waviness. Step 13: In the 3D CAD software, output the point data of the planar cross-section of the aircraft's external waviness.
[0008] Optionally, in the above-described automatic calculation method for aircraft shape waviness in a MATLAB environment, Step 2 includes: Step 21: Read the planar cross-section point data obtained in Step 1 in MATLAB software, and classify the point data according to the plane where the point is located, and establish classified point data fdata. Step 22: Read the k-th group of data fdata{k} from the classification point data in MATLAB software. By establishing the plane coordinate system axis(k) where the point is located and the system coordinate system axisS, perform three-dimensional coordinate transformation on fdata{k} from the plane coordinate system axis(k) where the point is located to the system coordinate system axisS, and establish the transformed point data tdata(k). Step 23: In MATLAB software, the converted point data tdata(k) is converted into two-dimensional point data x-axis tdatax(k) and z-axis tdatay(k) terms. The findpeaks function is used to calculate the peak data ptpeak and trough data ptvalley of the two-dimensional point data. Step 24: In MATLAB software, the peak data ptpeak and valley data ptvalley of the two-dimensional point data are transformed into three-dimensional peak data p3peak and three-dimensional valley data p3valle, and the coordinate system axisS is transformed into the plane coordinate system axis(k) where the point is located, and the transformed peak point bp3peak and valley point bp3valle are established. Step 25: In MATLAB software, use the converted peak point bp3peak and trough point bp3valle to calculate the wavelength wavel, amplitude wrange, and waviness of the aircraft shape. Step 26: In MATLAB software, repeat steps 22 to 25 to calculate the aircraft shape waviness for all classified sections, and output the results in report form.
[0009] Optionally, in the above-described automatic calculation method for aircraft shape waviness in a MATLAB environment, step 21 includes the following steps: Step 21-1: In MATLAB software, read the planar cross-section point data output in Step 1 as input data data, and use the size function to obtain the number of input data data [mn]. Step 21-2: In MATLAB software, establish a plane using the first three points p1, p2, p3 of the input data data, and calculate the plane normal vectors ana, anb, anc and the plane distance parameter and of the plane equation. p1=data(1,1:end); p2=data(2,1:end); p3=data(3,1:end); anpq = p2 - p1; anpr = p3 - p1; annor = cross(anpq, anpr); ana = annor(1); anb=annor(2); anc=annor(3); and = -dot(annor, p1); Step 21-3: In MATLAB software, iteratively calculate the distance disi between the input point pi and the plane established in step 2-1-2, where i is a positive integer with a value range of (1, m), the initial value of i is 1, and the step size is 1; pi=data(i,1:end); disi=(abs(ana* ptn(1)+ anb* ptn(2)+ anc* ptn(3)+ and)) / (sqrt(ana*ana+anb*anb+anc*anc)); Step 21-4: In MATLAB software, use the unique function to classify the input data data based on disi and establish the classification point data fdata.
[0010] Optionally, in the above-described method for automatically calculating aircraft shape waviness in a MATLAB environment, step 22 includes the following steps: Step 22-1: In MATLAB software, read the k-th group of data fdata{k} from the classification point data fdata, where k takes values in the range (1, udata), the initial value of k is 1, the step size is 1, and udata is the total number of classifications established in step 21-4; Step 22-2: In MATLAB software, take the first, last, and second points of the k-th data set fdata{k} to form points tp1, tp2, and tp3 respectively. tp1 = fdata{k} (1, 1: 3); tp2 = fdata{k} (end, 1:3); tp3 = fdata{k} (2, 1: 3); Step 22-3: In MATLAB software, establish the plane coordinate system axis(k) with tp1 as the origin, the line connecting tp1 and tp2 as the x-axis, and the plane established by tp1, tp2, and tp3 as the y-axis. AB = tp2 - tp1; AC = tp3 - tp1; N = cross(AB, AC); len_AB = norm(AB); eX = AB / len_AB; len_N = norm(N); eY = N / len_N; eZ = cross(eX, eY); axis(k) = [tp1, eX, eY, eZ]; Where tp1 is the origin of the coordinate system of axis(k) in the plane coordinate system where the point is located; eX is the x-axis vector of the plane coordinate system axis(k) where the point is located; eY is the y-axis vector of the plane coordinate system axis(k) where the point is located; eZ is the z-axis vector of the plane coordinate system axis(k) where the point is located; Step 22-4: In MATLAB software, establish the system coordinate system axisS with the system origin as the origin of the system coordinate system, the system x-axis as the system coordinate system x-axis, and the system xz plane as the system coordinate system y-axis. axisS=[0 0 0 1 0 0 0 1 0 0 0 1], Where [0 0 0] is the origin of the system coordinate system axisS. [1 0 0] is the x-axis vector of the system coordinate system axisS; [0 1 0] is the y-axis vector of the system coordinate system axisS; [0 0 1] is the z-axis vector of the system coordinate system axisS; Step 22-5: In MATLAB software, perform coordinate transformation on fdata{k} from the plane coordinate system axis(k) where the point is located to the system coordinate system axisS, and establish the transformed point data tdata(k); OA = tp1'; OB=[ 0 0 0 ] '; RA = [eX', eY', eZ']; RB = [1 0 0 ;0 1 0;0 0 1]; R = RB * RA'; t = OB - R * OA; T=[R,t;0,0,0,1]; Phb=[ fdata{k}';ones(1,size(fdata{k},1))]; PB = T * Phb; tdata(k) =PB(1:3,:)'.
[0011] Optionally, in the automatic calculation method for aircraft shape waviness in a MATLAB environment as described above, step 23 includes the following steps: Step 23-1: In MATLAB software, remove the y-axis data from the transformed classification point data tdata(k) and establish the transformed two-dimensional classification point data x-axis tdatax(k) and z-axis tdatay(k) data. tdatax(k) = tdata(k)(:,1); tdatay(k) = tdata(k)(:,3); Step 23-2: In MATLAB software, use the x-axis tdatax(k) data and z-axis tdatay(k) data of the two-dimensional point data to call the function findpeaks to calculate the peak data ptpeak of the two-dimensional point data; findpeaks(tdatay(k), tdatax(k)); [pks,locs]=findpeaks(tdatay(k), tdatax(k)); ptpeak = [locs, pks]; Step 23-3: In MATLAB software, use the x-axis tdatax(k) data and z-axis tdatay(k) data of the two-dimensional point data to call the function findpeaks to calculate the valley data ptvalley of the two-dimensional point data; findpeaks(-tdatay(k), tdatax(k)); [vals,locval]=findpeaks(-tdatay(k), tdatax(k)); ptvalley = [locval, vals].
[0012] Optionally, in the above-described automatic calculation method for aircraft shape waviness in a MATLAB environment, step 24 includes the following steps: Step 24-1: In MATLAB software, the peak data ptpeak and valley data ptvalley of the two-dimensional point data are transformed into three-dimensional peak data p3peak and three-dimensional valley data p3valley by adding y-axis data 0. p3peak=[ ptpeak (:,1),zeros(size(ptpeak,1),1), ptpeak (:,2)]; p3valle=[ptvalley (:,1),zeros(size(ptvalley,1),1), ptvalley (:,2)]; Step 24-2: In MATLAB software, perform a three-dimensional coordinate transformation on the three-dimensional peak data p3peak and the three-dimensional valley data p3valle from the system coordinate system axisS to the plane coordinate system axis(k) where the point is located, and establish the transformed peak point bp3peak and valley point bp3valle. bOA = [ 0 0 0 ] '; bOB = tp1'; bRA = [1 0 0 ;0 1 0;0 0 1]; bRB = [eX'eY'eZ']; bR = bRB * bRA'; bt = bOB - bR * bOA; bT=[bR,bt;0,0,0,1]; Phbp=[p3peak ';ones(1,size(p3peak,1))]; Phbv=[p3valle';ones(1,size(p3valle,1))]; PBp = T * Phbp; PBv = T * Phbv; bp3peak = PBp(1:3,:)'; bp3valle = PBv(1:3,:)'.
[0013] Optionally, in the automatic calculation method for aircraft shape waviness in a MATLAB environment as described above, step 25 includes the following steps: Step 25-1: In MATLAB, create a loop variable r, where the value of r ranges from (1, (size(bp3valle, 1)-1); the initial value of r is 1, and the step size is 1. Step 25-2: In MATLAB software, use the r-th set of point data bp3valle(r) and the (r+1)-th set of point data bp3valle in the transformed trough point bp3valle to call the norm function to calculate the distance between the two points and obtain the aircraft's outer wavelength wavel. wavel=norm(bp3valle(r,:)- bp3valle(r+1),:); Step 25-3: In MATLAB software, calculate the distance from the r-th set of point data bp3peak(r) in the transformed peak point bp3peak to the straight line formed by bp3valle(r) and bp3valle(r+1) to obtain the aircraft shape amplitude wrange; Crossw=cross(bp3peak(r,:)-bp3valle(r+1,:), bp3valle(r,:) -bp3valle(r+1,:)); wrange = norm(Crossw) / wavel; Step 25-4: In MATLAB software, the aircraft's waviness is obtained by using the calculated ratio of amplitude wrange to wavelength wavel. waviness = wrange / wavel; Step 25-5: In MATLAB software, repeat steps 2-5-1 to 2-5-4 to complete the calculation of all waviness of the aircraft shape of the k-th cross section.
[0014] The beneficial effects of this invention are as follows: This invention provides an automatic calculation method for aircraft shape waviness in a MATLAB environment. This method establishes planar cross-sectional point data based on inverse point cloud data of the aircraft shape, and utilizes MATLAB to achieve automatic planar classification of the point data, three-dimensional coordinate system transformation, two-dimensional peak and trough point calculation, inverse coordinate system transformation of peak and trough points, and waviness calculation. Finally, through automatic generation of program forms, it achieves high-precision, fast, efficient, automatic batch calculation of aircraft shape waviness and standardized report output. The technical solution provided by this invention has the following beneficial effects: (1) The automatic calculation method for aircraft shape waviness in the MATLAB environment provided by the present invention fully leverages the unique advantages of MATLAB in matrix calculation, vector operation and mathematical modeling, solves the shortcomings and deficiencies of complex programming logic, slow graphic interaction processing and long calculation cycle in traditional three-dimensional CAD software for aircraft shape waviness calculation, and realizes efficient processing of aircraft shape waviness in high sampling environment. (2) The automatic calculation method for aircraft shape waviness in the MATLAB environment provided by the present invention has a clear idea, simple and clear logic, and strong applicability. It provides a new solution for aircraft shape inspection, aircraft assembly quality control, rapid product quality inspection, and rapid acquisition and processing of assembly process data. Attached Figure Description
[0015] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of the present invention and do not constitute a limitation on the technical solutions of the present invention.
[0016] Figure 1 This is a schematic diagram of point cloud data in an embodiment of the present invention; Figure 2 This is a schematic diagram of the planar cross-section model in an embodiment of the present invention; Figure 3 This is a schematic diagram of the waviness model in an embodiment of the present invention.
[0017] Explanation of reference numerals in the attached figures: 1-Point cloud data, 2-Parallel plane, 3-Planar section, 4-Crest point, 5-Trough point, 6-Wavelength, 7-Amplitude. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
[0019] As explained in the background section, aircraft waviness is an important parameter of aircraft shape, and it is of significant research importance during the new aircraft development stage. However, existing methods for detecting aircraft waviness are difficult to simultaneously achieve ease of operation, high detection accuracy, and high detection efficiency.
[0020] Specifically, existing methods for detecting aircraft surface waviness include visual inspection, template inspection, dial indicator inspection, and reverse measurement. Visual inspection and template inspection are simple to operate and can quickly identify obvious waviness problems, but their measurement accuracy is low, making it difficult to accurately detect fine waviness. Dial indicator inspection involves fixing the dial indicator to a bracket, with the indicator head in contact with the aircraft; it offers high measurement accuracy but low efficiency. Reverse measurement uses lasers, photographs, or other equipment to collect data from the aircraft surface, processes the point cloud data obtained through reverse acquisition, compares it with theoretical data, iteratively extracts the waviness curve, and calculates relevant parameters; it offers high calculation accuracy but the data processing is complex, typically handled in 3D CAD software. However, the complex interactive logic and limited algorithm execution efficiency of 3D CAD software, especially when dealing with massive amounts of point cloud data, significantly increases the software's response speed and processing cycle with the data volume, greatly restricting work efficiency.
[0021] To address the aforementioned issues, this invention provides an automatic calculation method for aircraft shape waviness in a MATLAB environment. It fully leverages MATLAB's unique advantages in matrix calculation, vector operation, and mathematical modeling, achieving rapid and efficient processing of aircraft shape waviness data through pure mathematical logic calculation. This method overcomes the shortcomings and deficiencies of traditional 3D CAD software in calculating aircraft shape waviness, such as complex programming logic, slow graphical interaction processing, and long calculation cycles, thus achieving efficient processing of aircraft shape waviness under high sampling environments.
[0022] The present invention provides the following specific embodiments, which can be combined with each other. For the same or similar concepts or processes, they may not be described again in some embodiments.
[0023] Reference Figures 1 to 3 As shown, this invention provides an automatic calculation method for aircraft shape waviness in a MATLAB environment, mainly comprising two parts: outputting plane section point data after denoising the reverse point cloud data of the aircraft shape and calculating the aircraft shape waviness in a MATLAB environment; establishing plane section point data based on the reverse point cloud data of the aircraft shape, and using MATLAB programming to perform automatic plane classification of the point data, three-dimensional coordinate system transformation, two-dimensional peak and valley point calculation, reverse transformation of the peak and valley point coordinate system, and waviness calculation; finally, the program automatically generates the aircraft shape waviness form.
[0024] The automatic calculation method for aircraft shape waviness in a MATLAB environment provided in this invention includes the following steps: Step 1: Based on the reverse point cloud data of the aircraft shape, obtain the planar cross-sectional point data of the aircraft shape waviness. Step 2: Automatically calculate the aircraft's external waviness in the MATLAB environment. This includes: using a program in the MATLAB environment to perform planar classification of the point data of the planar cross section obtained in Step 1, three-dimensional coordinate system transformation, two-dimensional peak and valley point calculation, reverse transformation of the peak and valley point coordinate system, waviness calculation, and form report output to complete the automatic calculation of the aircraft's external waviness.
[0025] In one implementation of this invention, step 1 is carried out as follows: using 3D CAD software to denoise the aircraft shape point cloud data obtained by reverse measurement, establishing a planar cross section of the aircraft shape waviness, and exporting the planar cross section point data.
[0026] In this implementation, the output of plane section point data after denoising the reverse point cloud data of the aircraft shape includes: denoising the aircraft shape point cloud data, modeling the plane section model of the aircraft shape waviness, and exporting the section point data; specifically, it includes the following steps: Step 1-1: Open the reverse-measured aircraft shape point cloud data 1 in the 3D CAD software and use a noise reduction tool to denoise the point cloud data 1. Steps 1-2: In the 3D CAD software, a set of parallel planes 2 are established for analyzing the waviness of the aircraft shape. These planes intersect with the denoised point cloud data to form a point cloud cross section, which serves as the established plane cross section 3 for the aircraft shape waviness. Steps 1-3 involve outputting the point data of the planar cross-section of the aircraft's external waviness in 3D CAD software. In one embodiment of the invention, the point data is shown in Table 1 below: Table 1 Location Data
[0027] The automatic calculation method for aircraft shape waviness in the MATLAB environment provided by this invention involves performing planar classification of the point data of the planar cross section obtained in steps 1-3, three-dimensional coordinate system transformation, two-dimensional peak and valley point calculation, reverse transformation of the peak and valley point coordinate system, waviness calculation, and form report output to complete the automatic calculation of aircraft shape waviness.
[0028] In one implementation of this invention, step 2 may include: Step 21: In MATLAB software, read the planar cross-sectional point data obtained in steps 1-3, and classify the point data according to the plane where the points are located, thus establishing classified point data fdata. A specific implementation plan for step 21 may include the following steps: Step 21-1: In MATLAB software, read the planar cross-section point data output in Step 1-3 (in this embodiment, read the data in Table 1 above) as input data for calculating the aircraft shape waviness, and use the size function to obtain the number of input data data [m,n]=[28,3].
[0029] Step 21-2: In MATLAB software, establish a plane using the first three points p1, p2, p3 of the input data data, and calculate the plane normal vectors ana, anb, anc and the plane distance parameter and, respectively: p1=data(1,1:end)=[8.004251.659123.1647]; p2=data(2,1:end)=[2.810257.931223.3410]; p3=data(3,1:end)=[-3.210063.075525.2458]; anpq=p2-p1=[-5.19396.27210.1763]; anpr=p3-p1=[-11.214211.41642.0811]; annor=cross(anpq, anpr)=[11.04058.832411.0405]; ana = annor(1) = 11.0405; anb=annor(2)= 8.8324; anc = annor(3) = 11.0405; and=-dot(annor,p1)=-800.3945.
[0030] Step 21-3: In MATLAB software, iteratively calculate the distance between the input point pi and the plane distance disi established in step 21-2 (as shown in Table 2 below), where the value of i ranges from (1,m) to (1,28), the initial value of i is 1, and the step size is 1. pi=data(i,1:end); disi=(abs(ana* ptn(1)+ anb* ptn(2)+ anc* ptn(3)+ and)) / (sqrt(ana*ana+anb*anb+anc*anc)).
[0031] Table 2. Distance Table for Planar Classification of Points
[0032] Step 21-4: In MATLAB software, use the unique function to classify the input data data based on disi, and establish the classification point data fdata, as shown in Table 3 below: Table 3 Classification Point Data Table
[0033] Step 22: In MATLAB software, read the k-th group of data fdata{k} from the classification point data. By establishing the plane coordinate system axis(k) and the system coordinate system axisS, perform a three-dimensional coordinate transformation on fdata{k} from the plane coordinate system axis(k) to the system coordinate system axisS, and establish the transformed point data tdata(k). The specific implementation process of step 22 may include the following steps: Step 22-1: In MATLAB software, read the k-th group of data fdata{k} from the classification point data fdata, where k takes values in the range (1, udata), the initial value of k is 1, the step size is 1, and udata is the total number of classifications established in step 21-4. In this embodiment, for example, k=2 and udata=2.
[0034] Step 22-2: In MATLAB software, take the first, last, and second points of the k-th data set fdata{k} to form points tp1, tp2, and tp3 respectively. tp1= fdata{2} (1,1:3)=[ 81.1553-18.227738.4191]; tp2= fdata{2} (end,1:3)=[ -2.427475.513147.0092]; tp3= fdata{2} (2,1:3)=[76.4713-18.708643.4880]; Step 22-3: In MATLAB software, establish the plane coordinate system axis(k) with tp1 as the origin, the line connecting tp1 and tp2 as the x-axis, and the plane established by tp1, tp2, and tp3 as the y-axis. AB = tp2 - tp1; AC = tp3 - tp1; N = cross(AB, AC); len_AB = norm(AB); eX = AB / len_AB; len_N = norm(N); eY = N / len_N; eZ = cross(eX, eY); axis(k) = [tp1, eX, eY, eZ].
[0035] In this embodiment, the above parameters are shown in the following example: AB = tp2- tp1=[-83.582793.74088.5901]; AC = tp3 - tp1=[-4.6840-0.48105.0688]; N = cross(AB, AC)=[479.2864383.4292479.2864]; len_AB = norm(AB) = 125.8856; eX = AB / len_AB=[-0.66400.74470.0682]; len_N = norm(N) = 778.7483; eY = N / len_N =[0.61550.49240.6155]; eZ = cross(eX, eY)=[0.42470.4506-0.7852]; axis(k)=[tp1,eX,eY,eZ]=[81.1553-18.227738.4191-0.66400.74470.06820.61550.49240.61550.42470.4506-0.7852]; Where tp1 is the origin of the coordinate system of axis(k) in the plane coordinate system where the point is located; eX is the x-axis vector of the plane coordinate system axis(k) where the point is located; eY is the y-axis vector of the plane coordinate system axis(k) where the point is located; eZ is the z-axis vector of the plane coordinate system axis(k) where the point is located; Step 22-4: In MATLAB software, establish the system coordinate system axisS with the system origin as the origin of the system coordinate system, the system x-axis as the system coordinate system x-axis, and the system xz plane as the system coordinate system y-axis. In this embodiment, axisS = [0 0 0 1 0 0 0 1 0 0 0 1]; Where [0 0 0] is the origin of the system coordinate system axisS, [1 0 0] is the x-axis vector of the system coordinate system axisS; [0 1 0] is the y-axis vector of the system coordinate system axisS; [0 0 1] is the z-axis vector of the system coordinate system axisS; Step 22-5: In MATLAB software, perform coordinate transformation on fdata{k} from the plane coordinate system axis(k) where the point is located to the system coordinate system axisS, and establish the transformed point data tdata(k); The conversion method is as follows: OA = tp1'; OB=[ 0 0 0 ] '; RA = [eX', eY', eZ']; RB = [1 0 0 ;0 1 0;0 0 1]; R = RB * RA'; t = OB - R * OA; T=[R,t;0,0,0,1]; Phb=[ fdata{k}';ones(1,size(fdata{k},1))]; PB = T * Phb; tdata(k) =PB(1:3,:)'.
[0036] In this embodiment, the following data conversion is used as an example: OA= tp1'=[81.1553-18.227738.4191]'; OB=[ 0 0 0 ]'; RA = [eX', eY' eZ']=[-0.66400.61550.4247 0.7447 0.4924 0.4506 [0.06820.6155-0.7852]; RB = [1 0 0 ;0 1 0;0 0 1]; R = RB * RA'=[ -0.66400.74470.0682 0.61550.49240.6155 0.42470.4506-0.7852]; t = OB - R * OA=[64.8411 -64.6227 3.9134]; T=[R,t;0,0,0,1]=[-0.66400.74470.068264.8411 0.61550.49240.6155-64.6227 0.42470.4506-0.78523.9134 0001.0000]; Phb=[ fdata{2}';ones(1,size(fdata{2},1))]; PB = T * Phb ; tdata(2) =PB(1:3,:)'=[0.00000.0000-0.0000 3.09780.0000-6.1861 7.82860.0000-11.1227 14.30870.0000-10.0498 19.41470.0000-5.3863 24.40060.0000-0.5853 30.49700.00002.5144 37.22680.00001.2650 43.48120.0000-1.7052 49.91540.0000-4.2325 56.73520.0000-4.0590 62.77090.0000-0.7103 68.37630.00003.3559 74.63040.00006.1764 81.07140.00004.0652 86.71710.00000.0566 93.21320.0000-1.7981 99.37990.00001.2226 104.82470.00005.5009 110.54730.00009.3799 117.23110.000010.3098 122.53230.00006.0367 125.89360.0000-0.0030].
[0037] Step 23 involves converting the transformed point data tdata(k) into two-dimensional point data: x-axis tdatax(k) and z-axis tdatay(k). The findpeaks function is then used to calculate the peak data ptpeak and trough data ptvalley of the two-dimensional point data. The specific implementation of step 23 includes the following steps: Step 23-1: In MATLAB software, remove the y-axis data from the transformed classification point data tdata(k) to create the transformed two-dimensional classification point data tdatax(k) in the x-axis and tdatay(k) in the z-axis; the calculation method is as follows: tdatax(2)=tdata(2)(:,1); tdatay(2)=tdata(2)(:,3); Step 23-2: In MATLAB software, using the x-axis tdatax(k) and z-axis tdatay(k) data points of the two-dimensional point data, call the findpeaks function to calculate the peak data ptpeak of the two-dimensional point data; the calculation method is as follows: findpeaks(tdatay(k), tdatax(k)); [pks,locs]=findpeaks(tdatay(k), tdatax(k)); ptpeak = [locs, pks].
[0038] The calculation data in this embodiment is illustrated below: findpeaks(tdatay(2), tdatax(2)); [pks,locs]=findpeaks(tdatay(2), tdatax(2)); ptpeak= [locs, pks]=[30.49702.5144 74.63046.1764 117.231110.3098].
[0039] Step 23-3: In MATLAB software, using the x-axis tdatax(k) and z-axis tdatay(k) data of the two-dimensional point data, call the function findpeaks to calculate the trough data ptvalley of the two-dimensional point data; the calculation method is as follows: findpeaks(-tdatay(k), tdatax(k)); [vals,locval]=findpeaks(-tdatay(k), tdatax(k)); ptvalley = [locval, vals].
[0040] The calculation data in this embodiment is illustrated below: findpeaks(-tdatay(2), tdatax(2)); [vals,locval]=findpeaks(-tdatay(2), tdatax(2)); ptvalley= [locval, vals]=[7.8286-11.1227 49.9154-4.2325 93.2132-1.7981 125.8936-0.0030].
[0041] Step 24: In MATLAB software, the peak data ptpeak and trough data ptvalley of the two-dimensional point data are transformed into three-dimensional peak data p3peak and three-dimensional trough data p3valle, and then transformed from the system coordinate system axisS to the plane coordinate system axis(k) where the point is located, establishing the transformed peak point 4 (bp3peak) and trough point 5 (bp3valle). The specific implementation process of step 23 includes the following steps: Step 24-1: In MATLAB software, the peak data (ptpeak) and trough data (ptvalley) of the two-dimensional point data are transformed into three-dimensional peak data (p3peak) and trough data (p3valley) by adding y-axis data (0). The calculation method is as follows: p3peak=[ ptpeak (:,1),zeros(size(ptpeak,1),1), ptpeak (:,2)]; p3valle=[ptvalley (:,1),zeros(size(ptvalley,1),1), ptvalley (:,2)]; The calculation data in this embodiment is illustrated below: p3peak=[ptpeak (:,1),zeros(size(ptpeak,1),1), ptpeak (:,2)] p3peak=[30.497002.5144 74.630406.1764 117.2311010.3098]; p3valle=[ptvalley (:,1),zeros(size(ptvalley,1),1), ptvalley (:,2)] p3valle = [7.82860-11.1227] 49.91540-4.2325 93.21320-1.7981 125.89360-0.0030].
[0042] Step 24-2. In MATLAB software, perform a three-dimensional coordinate transformation on the three-dimensional peak data p3peak and the three-dimensional valley data p3valle from the system coordinate system axisS to the plane coordinate system axis(k) where the points are located, and establish the transformed peak point bp3peak and valley point bp3valle; the calculation method is as follows: bOA = [ 0 0 0 ] '; bOB = tp1'; bRA = [1 0 0 ;0 1 0;0 0 1]; bRB = [eX'eY'eZ']; bR = bRB * bRA'; bt = bOB - bR * bOA; bT=[bR,bt;0,0,0,1]; Phbp=[p3peak ';ones(1,size(p3peak,1))]; Phbv=[p3valle';ones(1,size(p3valle,1))]; PBp = T * Phbp; PBv = T * Phbv; bp3peak = PBp(1:3,:)'; bp3valle = PBv(1:3,:)'.
[0043] The calculation data in this embodiment is illustrated below: bOA = [ 0 0 0 ] '; bOB= tp1'=[81.1553-18.227738.4191]'; bRA = [1 0 0 ;0 1 0;0 0 1]; bRB = [eX' eY' eZ']; bR = bRB * bRA'=[-0.66400.61550.4247 0.7447 0.4924 0.4506 [0.06820.6155-0.7852]; bt = bOB - bR * bOA = [ 81.1553 -18.2277 38.4191]; bT=[bR,bt;0,0,0,1]=[-0.66400.61550.424781.1553 0.7447 0.4924 0.4506 -18.2277 0.06820.6155-0.785238.4191 0001.0000]; Phbp=[ p3peak ';ones(1,size(p3peak,1))] =[30.497074.6304117.2311 000 2.51446.176410.3098 1.00001.00001.0000] Phbv =[ p3valle ';ones(1,size(p3valle,1))] =[7.828649.915493.2132125.8936 0000 -11.1227 -4.2325 -1.7981 -0.0030 1.00001.00001.00001.0000]; PBp = bT * Phbp ; PBv = bT * Phbv; bp3peak= PBp(1:3,:)'=[61.97325.616438.5247 34.223840.132638.6592 7.692473.719938.3190]; bp3valle = PBv(1:3,:)'=[71.2333-17.409647.6866 46.213917.037145.1467 18.498150.377946.1881 -2.439375.523947.0074).
[0044] Step 25: In MATLAB software, using the transformed peak point bp3peak and trough point bp3valle, calculate the wavelength (wavel), amplitude (wrange), and waviness of the aircraft shape. The specific implementation of step 25 may include the following steps: Step 25-1: In MATLAB software, create a loop variable r, where the value range of r is (1, (size(bp3valle,1)-1); In this embodiment, the value of r is in the range of (1,3), the initial value of r is 1, and the step size is 1.
[0045] Step 25-2: In MATLAB software, using the r-th set of point data bp3valle(r) and the (r+1)-th set of point data bp3valle in the transformed trough point bp3valle, the norm function is called to calculate the distance between the two points, obtaining the aircraft's outer wavelength 6, represented by the array wavel; the calculated value of the aircraft's outer wavelength 6 in this embodiment is illustrated below: wavel=norm(bp3valle(r,:)- bp3valle(r+1),:)=[42.649743.368932.7317].
[0046] Step 25-3: In MATLAB software, the aircraft shape amplitude 7 is obtained by calculating the distance from the r-th point data bp3peak(r) in the transformed peak point bp3peak to the straight line formed by bp3valle(r) and bp3valle(r+1), using the data wrange. In this embodiment, the calculated value of the aircraft shape amplitude 7 is illustrated below: Crossw=cross(bp3peak(r,:)-bp3valle(r+1,:), bp3valle(r,:) -bp3valle(r+1,:)); wrange = norm(Crossw) / wavel=[9.79539.004910.7721].
[0047] Step 25-4: In MATLAB software, a program is written to calculate the waviness using the calculated ratio of the r-th group of amplitude wrange to wavelength wavel. The calculated waviness value in this embodiment is illustrated below: waviness= wrange / wavel=[0.22970.20760.3291]; Step 25-5: In MATLAB software, a program is written to iterate through steps 25-1 to 25-4 to complete the calculation of all the waviness of the aircraft shape of the k-th cross section.
[0048] Step 26: In MATLAB software, repeat steps 22 to 25 to calculate the aircraft shape waviness for all classified sections, and output the results in report form, as shown in Table 4 below: Table 4. Ripple Output Form
[0049] This invention provides an automatic calculation method for aircraft shape waviness in a MATLAB environment. The method establishes planar cross-sectional point data based on inverse point cloud data of the aircraft shape. MATLAB is used to automatically classify the point data in planar mode, perform three-dimensional coordinate system transformation, calculate two-dimensional peak and trough points, reverse transform the coordinate system of peak and trough points, and calculate waviness. Finally, a program automatically generates a form, achieving high-precision, fast, efficient, and automated batch calculation of aircraft shape waviness and standardized report output. The technical solution provided by this invention has the following beneficial effects: (1) The automatic calculation method for aircraft shape waviness in the MATLAB environment provided by the present invention fully leverages the unique advantages of MATLAB in matrix calculation, vector operation and mathematical modeling, solves the shortcomings and deficiencies of complex programming logic, slow graphic interaction processing and long calculation cycle in traditional three-dimensional CAD software for aircraft shape waviness calculation, and realizes efficient processing of aircraft shape waviness in high sampling environment. (2) The automatic calculation method for aircraft shape waviness in the MATLAB environment provided by the present invention has a clear idea, simple and clear logic, and strong applicability. It provides a new solution for aircraft shape inspection, aircraft assembly quality control, rapid product quality inspection, and rapid acquisition and processing of assembly process data.
[0050] While the embodiments disclosed in this invention are as described above, they are merely illustrative of the embodiments to facilitate understanding of the invention and are not intended to limit the invention. Any person skilled in the art to which this invention pertains may make any modifications and variations in the form and details of the implementation without departing from the spirit and scope disclosed herein; however, the scope of patent protection for this invention shall still be determined by the scope defined in the appended claims.
Claims
1. An automatic calculation method for aircraft shape waviness in a MATLAB environment, characterized in that, Step 1: Based on the reverse point cloud data of the aircraft shape, obtain the planar cross-sectional point data of the aircraft shape waviness. Step 2: Automatically calculate the aircraft's external waviness in the MATLAB environment. This includes: using a program in the MATLAB environment to perform planar classification of the point data of the planar cross section obtained in Step 1, three-dimensional coordinate system transformation, two-dimensional peak and valley point calculation, reverse transformation of the peak and valley point coordinate system, waviness calculation, and form report output to complete the automatic calculation of the aircraft's external waviness.
2. The automatic calculation method for aircraft shape waviness in MATLAB environment according to claim 1, characterized in that, Step 1 includes: using 3D CAD software to denoise the point cloud data of the aircraft shape obtained by reverse measurement, establishing a planar cross section of the aircraft shape waviness, and exporting the point data of the planar cross section.
3. The automatic calculation method for aircraft shape waviness in the MATLAB environment according to claim 2, characterized in that, Step 1 includes the following steps: Step 11: Open the reverse-measured aircraft shape point cloud data in the 3D CAD software and use a noise reduction tool to denoise the point cloud data. Step 12: In the 3D CAD software, establish a set of parallel planes for analyzing the aircraft's shape waviness. Intersect with the denoised point cloud data to form a point cloud cross section, which serves as the established plane cross section for the aircraft's shape waviness. Step 13: In the 3D CAD software, output the point data of the planar cross-section of the aircraft's external waviness.
4. The automatic calculation method for aircraft shape waviness in the MATLAB environment according to claim 1, characterized in that, Step 2 includes: Step 21: Read the planar cross-section point data obtained in Step 1 in MATLAB software, and classify the point data according to the plane where the point is located, and establish classified point data fdata. Step 22: Read the k-th group of data fdata{k} from the classification point data in MATLAB software. By establishing the plane coordinate system axis(k) where the point is located and the system coordinate system axisS, perform three-dimensional coordinate transformation on fdata{k} from the plane coordinate system axis(k) where the point is located to the system coordinate system axisS, and establish the transformed point data tdata(k). Step 23: In MATLAB software, the converted point data tdata(k) is converted into two-dimensional point data x-axis tdatax(k) and z-axis tdatay(k) terms. The findpeaks function is used to calculate the peak data ptpeak and trough data ptvalley of the two-dimensional point data. Step 24: In MATLAB software, the peak data ptpeak and valley data ptvalley of the two-dimensional point data are transformed into three-dimensional peak data p3peak and three-dimensional valley data p3valle, and the coordinate system axisS is transformed into the plane coordinate system axis(k) where the point is located, and the transformed peak point bp3peak and valley point bp3valle are established. Step 25: In MATLAB software, use the converted peak point bp3peak and trough point bp3valle to calculate the wavelength wavel, amplitude wrange, and waviness of the aircraft shape. Step 26: In MATLAB software, repeat steps 22 to 25 to calculate the aircraft shape waviness for all classified sections, and output the results in report form.
5. The automatic calculation of aircraft shape waviness in the MATLAB environment according to claim 4, characterized in that, Step 21 includes the following steps: Step 21-1: In MATLAB software, read the planar cross-section point data output in step 13 as input data. Step 21-2: In MATLAB software, establish a plane based on the first three points of the input data. Step 21-3: In MATLAB software, iteratively calculate the distance disi between the input point pi and the plane established in step 21-2, where i is a positive integer with a value range of (1, size(data, 1)), the initial value of i is 1, and the step size is 1. Step 21-4: In MATLAB software, use the unique function to classify the input data data based on disi and establish the classification point data fdata.
6. The automatic calculation of aircraft shape waviness in the MATLAB environment according to claim 4, characterized in that, Step 22 includes the following steps: Step 22-1: In MATLAB software, read the k-th group of data fdata{k} from the classification point data fdata, where the value of k is in the range of (1, udata), the initial value of k is 1, the step size is 1, and udata is the total number of classifications established in step 21-4. Step 22-2: In MATLAB software, take the first, last, and second points of the k-th data set fdata{k} to form points tp1, tp2, and tp3 respectively. Step 22-3: In MATLAB software, establish the plane coordinate system axis(k) with tp1 as the origin, the line connecting tp1 and tp2 as the x-axis, and the plane established by tp1, tp2, and tp3 as the y-axis. Step 22-4: In MATLAB software, establish the system coordinate system axisS with the system origin as the origin of the system coordinate system, the system x-axis as the system coordinate system x-axis, and the system xz plane as the system coordinate system y-axis. Step 22-5: In MATLAB software, perform coordinate transformation on fdata{k} from the plane coordinate system axis(k) where the point is located to the system coordinate system axisS, and establish the transformed point data tdata(k).
7. The automatic calculation of aircraft shape waviness in the MATLAB environment according to claim 4, characterized in that, Step 23 includes the following steps: Step 23-1: In MATLAB software, remove the y-axis data from the transformed classification point data tdata(k) and establish the transformed two-dimensional classification point data x-axis tdatax(k) and z-axis tdatay(k) data. Step 23-2: In MATLAB software, use the x-axis tdatax(k) data and z-axis tdatay(k) data of the two-dimensional point data to call the function findpeaks to calculate the peak data ptpeak of the two-dimensional point data; Step 23-3: In MATLAB software, use the x-axis tdatax(k) data and z-axis tdatay(k) data of the two-dimensional point data to call the function findpeaks to calculate the valley data ptvalley of the two-dimensional point data.
8. The automatic calculation of aircraft shape waviness in the MATLAB environment according to claim 4, characterized in that, Step 24 includes the following steps: Step 24-1: In MATLAB software, the peak data ptpeak and valley data ptvalley of the two-dimensional point data are transformed into three-dimensional peak data p3peak and three-dimensional valley data p3valley by adding y-axis data 0. Step 24-2: In MATLAB software, perform a three-dimensional coordinate transformation on the three-dimensional peak data p3peak and the three-dimensional valley data p3valle from the system coordinate system axisS to the plane coordinate system axis(k) where the point is located, and establish the transformed peak point bp3peak and valley point bp3valle.
9. The automatic calculation of aircraft shape waviness in the MATLAB environment according to claim 4, characterized in that, Step 25 includes the following steps: Step 25-1: In MATLAB software, create a loop variable r, where the value range of r is (1, (size(bp3valle,1)-1); the initial value of r is 1, and the step size is 1. Step 25-2: In MATLAB software, use the r-th set of point data bp3valle(r) and the (r+1)-th set of point data bp3valle in the transformed trough point bp3valle to call the norm function to calculate the distance between the two points and obtain the aircraft's outer wavelength wavel. Step 25-3: In MATLAB software, calculate the distance from the r-th set of point data bp3peak(r) in the transformed peak point bp3peak to the straight line formed by bp3valle(r) and bp3valle(r+1), and obtain the aircraft shape amplitude wrange; Step 25-4: In MATLAB software, the aircraft's waviness is obtained by using the calculated ratio of amplitude wrange to wavelength wavel. Step 25-5: In MATLAB software, repeat steps 25-1 to 25-4 to complete the calculation of all waviness of the aircraft shape for the k-th cross section.
Citation Information
Cited By
Special method for measuring waviness of airplane RVSM key area
CN122009523A
A method for measuring the waviness of a critical area of an aircraft in RVSM
CN122009523B