6
Automating Electron Beam Free Form Fabrication with MATLAB By Bill Seufzer Ph.D., NASA Langley Research Center On the International Space Station and other long-term space missions, the ability to replace a broken part on a critical system can turn a potential mission failure into a success. But how can astronauts fabricate parts or tools in microgravity, and hundreds of miles above the earth’s surface? Electron Beam Free Form Fabrication (EBF 3 ) technology offers a possible solution. Invented at NASA Langley Research Center, EBF 3 is a layer additive manufacturing process for metals that uses an electron beam energy source and wire feed stock to build 3D objects by adding material (primarily aluminum and titanium alloys) layer by layer. NASA Langley’s current system is based on a Sciaky electron beam welder that has been used in industrial plants for years (Figures 1a and 1b). Electron beam welders are well-suited to space applications because they must be operated in a vacuum and function well in microgravity. Figure 1a. The electron beam welder at the NASA Langley Research Center. Figure 1b. Electron beam freeform welding. See more articles and subscribe at mathworks.com/newsletters. 1

Automating Electron Beam Free Form Fabrication with MATLAB

Embed Size (px)

Citation preview

Page 1: Automating Electron Beam Free Form Fabrication with MATLAB

Automating Electron Beam Free Form Fabrication with MATLABBy Bill Seufzer Ph.D., NASA Langley Research Center

On the International Space Station and other long-term space missions, the ability to replace a broken part on a critical system can turn a potentialmission failure into a success. But how can astronauts fabricate parts or tools in microgravity, and hundreds of miles above the earth’s surface?

Electron Beam Free Form Fabrication (EBF3) technology offers a possible solution. Invented at NASA Langley Research Center, EBF3 is a layeradditive manufacturing process for metals that uses an electron beam energy source and wire feed stock to build 3D objects by adding material(primarily aluminum and titanium alloys) layer by layer. NASA Langley’s current system is based on a Sciaky electron beam welder that has beenused in industrial plants for years (Figures 1a and 1b). Electron beam welders are well-suited to space applications because they must be operated in avacuum and function well in microgravity.

Figure 1a. The electron beam welder at the NASA Langley Research Center.

Figure 1b. Electron beam freeform welding.

See more articles and subscribe at mathworks.com/newsletters.

1

Page 2: Automating Electron Beam Free Form Fabrication with MATLAB

Until recently, however, fabricating even relatively simple shapes using the electron beam welder was a labor-intensive manual process that requiredclose supervision by a skilled operator. At NASA Langley, we’ve developed a control system in MATLAB® that fully automates the process and iscapable of producing complex titanium and aluminum components from a 3D representation created in CAD software.

The interactive environment and object-oriented programming features of MATLAB simplified each stage in the control development process:developing robotic controls, adding support for reading shape data from Standard Tessellation Language (STL) files, and incorporating measurementand image acquisition capabilities.

Generating Control Code with MATLAB

In the manual EBF3 process, an engineer wrote instructions in G-code, a computer numerical control programming language. These instructionswould, for example, turn on the electron beam and set its intensity, start feeding the wire to initiate a molten pool of metal, and move the roboticwelder to create a bead of metal. Because the precise thickness of the bead cannot be predetermined, the engineer had to estimate where the next layershould begin. If the estimate was off, the engineer had to manually readjust the height of the welding platform during deposition. Even withspecialized skills and knowledge, it was a challenge to write the G-code and shepherd the process to completion for any part more complicated than abasic 3D shape.

Our first priority in automating this process was to simplify the creation of G-code for more complex shapes, such as the orthogrid geometries used toreinforce cryogenic tanks (Figure 2). The G-code for such structures was difficult to write by hand, particularly the code needed to prevent excessiveamounts of material from being deposited at the intersections.

Figure 2. A rough orthogrid structure, created with G-code generated by MATLAB.

Our solution was to develop a MATLAB script that could automatically generate G-code for creating a complex object from a description of theobject’s points of interest. Given a description of the grid shown in Figure 2, for example, the MATLAB script generates commented G-code to turnthe beam on, set the appropriate power settings, move the robotic welder through the points needed to fabricate the grid, and then turn the beam off.

Fabricating Parts from CAD Files

Some of the shapes we fabricate are designed using CAD software packages, which can export designs as STL files. Our next automation step was toread these STL files directly using MATLAB and then generate the G-code needed to fabricate the shapes they defined.

We wrote MATLAB code that parses STL files to obtain a 3D representation of a shape (Figure 3). The code then slices the shape into layers that areapproximately the thickness of the metal bead deposited by the welder.

2

Page 3: Automating Electron Beam Free Form Fabrication with MATLAB

Figure 3. MATLAB visualization of the part as defined in the STL file.

For example, given a target height of 1 inch and a thickness of 0.025 inches, the MATLAB code applies geometric calculations to identify the points atwhich the shape and a plane 1 inch above its base would intersect (Figure 4).

Figure 4. Three layers of the 3D shape, each consisting of a set of unordered points.

The MATLAB code orders those points into a logical welder tool path (Figure 5) and generates G-code for that layer. As we developed this code, weused MATLAB to visualize the 3D shapes, the individual layers, and the resultant tool paths for those layers.

Figure 5. A set of points describing the welder tool path for a single layer.

3

Page 4: Automating Electron Beam Free Form Fabrication with MATLAB

Incorporating Instrumentation

Having automated the process of producing G-code to create an arbitrary 3D shape, we turned our attention to the welding process. Because it isimpossible to precisely control the height of the metal bead produced by the welder, the thickness of each deposited layer may vary. Although layerthickness typically varies from what was expected by less than 0.002 inches, when several hundred layers are required to form a part, repeating even asmall error on each layer can cause a noticeable discrepancy between the part’s height as designed and its height as fabricated. The operator cannotmanually adjust the height of the welder to correct for this error.

Our solution is a laser measuring system called Sequential Horizontal Automated Z-Axis Measurement, or SHAZAM. Controlled via InstrumentControl Toolbox™, this system directs a laser beam onto the part being fabricated to determine its current height. The MATLAB code uses this valueto select the location of the next slice to fabricate. This basic feedback control enables us to reproduce the original design much more accurately andwith less manual intervention from the welder operator (Figure 6).

Figure 6. The part shown in Figure 5, partially fabricated after multiple layers have been deposited.

Our next process refinement focused on tightening control of the bead. Specifically, we wanted to automatically adjust the power of the electron beambased on the size of the molten pool of metal at the weld point. To deposit a uniform bead, we needed to reduce power when the molten pool becametoo large and increase power when the pool became too small. Again, this task is typically handled manually by the operator, and requires substantialexperience.

To automate this part of the process, we set up an 8-bit black-and-white camera to photograph the welding. We used Image Acquisition Toolbox™ toimport images from the camera, and Image Processing Toolbox™ and Fuzzy Logic Toolbox™ to programmatically determine when the size of themolten pool required adjustment. It’s easier to express the empirical observations of a machine operator in fuzzy logic than to describe them in anequation. We can simply tune the fuzzy logic until we get the results we want. Based on the fuzzy interference system we created, the MATLAB codeadjusts the beam current via Instrument Control Toolbox and an RS-232 link to the welder’s computer.

Assembling the Complete Control System

The complete control system consists of a console PC and an instrumentation PC running MATLAB code, and Sciaky’s embedded computer, whichcontrols the robotics. On the instrumentation PC, a MATLAB application known as the choreographer generates the G-code from the STL file. Itsends this code to the console PC, where the code is compiled and uploaded to the welder’s embedded computer. The choreographer then signals thewelder to begin welding.

As the layer is being deposited, the MATLAB closed-loop controller monitors the molten pool and adjusts the beam current as needed. When thelayer is complete, the choreographer instructs the welder to move SHAZAM into place and measure the height of the part. It then takes the next slicefrom the STL file based on the current height, and the process repeats until the part is complete. A key benefit of MATLAB in this domain is its abilityto integrate and coordinate disparate technologies, including the G-code generating software, the welder, the camera, and the laser measurementsystem.

Development and maintenance of the more than 12,000 lines of MATLAB code that the system comprises have been simplified by applyingobject-oriented programming techniques. The SHAZAM device, for example, is represented as an object that is accessed via well-defined methods

4

Page 5: Automating Electron Beam Free Form Fabrication with MATLAB

such as s.open() and s.measure. The object-oriented code is almost self-documenting, and is much easier to debug than a set of scatteredsubroutines (Figure 7).

classdef shazam < handle

propertieslmu % Laser measurement unit (Acuity® AR 700)zab % interface to the Zaber® vacuum rated actuatorw2kOffset % [x y z] vector offset of probe to the welderpoints % a set of points to measure [x y z t]results % the result of measurementsportLmu = ’com2’;portZab = ’com3’;

end

methods

% not a complete set of methods

function open(sha)% function to simplify typing for manual operations% open the shield doorsha.zab.open;

end

function measure(sha,w2k)% at each point make a Z axis measurementfor x=1:size(sha.points,1)

% move the probe above the pointw2k.goto(sha.points(x,:)+sha.w2kOffset);% get the X and Y coordinatescurPos = sha.points(x,:);% get measurement (Z)curPos(3) = sha.height;% record the locationsha.results(x,:)= curPos;

endend

end

end

Figure 7. SHAZAM classdef object. This object encapsulates two serial interfaces, one to the Acuity laser, and the other to a Zaber actuator that opensand closes a door that protects the laser.

Using MATLAB we can interactively inspect any object at any time. The object-oriented approach also makes adding new capabilities to the systemeasier. We are currently testing a system that uses the camera to detect problems with the wire feeder and thermocouples to monitor the temperatureof the base plate that holds the part during fabrication.

We have already field-tested a miniature version of our EBF3 welding system aboard NASA’s reduced-gravity aircraft. We have also used thetechnology in a number of practical applications. For example, an aerospace company that we work with asked us to produce a 4-pound part todemonstrate the potential materials and labor-saving benefit of the EBF3 process. The shape of the part would have required them to start with a400-pound titanium billet, which would lead to a great deal of waste and would have required weeks to machine. Using our system, I produced arough version of the part weighing just 23 pounds in one day. Starting with this part instead of the 400-pound block eliminated two weeks ofmachining and reduced the amount of titanium needed by more than 80%.

5

Page 6: Automating Electron Beam Free Form Fabrication with MATLAB

Products Used

▪ MATLAB

▪ Fuzzy Logic Toolbox

▪ Image Acquisition Toolbox

▪ Image Processing Toolbox

▪ Instrument Control Toolbox

Learn More

▪ Video: Electron Freeform Fabrication Process 4:16

▪ From Nothing, Something: One Layer at a Time

▪ MATLAB and Simulink for Process Automation and Industrial Control

See more articles and subscribe at mathworks.com/newsletters.

Published 201292009v00

mathworks.com© 2012 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarksfor a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

6