In the realm of modern manufacturing, aluminum alloys have gained extensive applications across aerospace, medical devices, automotive industries, and many other fields due to their excellent properties such as light weight, high hardness, and good plasticity. For the production of automobile engine cylinder blocks, which require precise and lightweight castings, aluminum alloys have become the material of choice. Lost foam casting, with its simple manufacturing process, high production efficiency, and ability to produce complex internal geometries, has been widely adopted as a green technology for the 21st century. Specifically, for aluminum alloy cylinder blocks with intricate internal cavities, lost foam casting offers significant advantages over traditional methods. However, the quality of lost foam castings heavily depends on the precise control of the white zone temperature during the process. Ineffective temperature regulation can lead to defects such as surface cracking, uneven bead fusion, and dimensional inaccuracies, which collectively degrade the final casting quality.
Existing temperature control systems for the white zone of lost foam castings often suffer from large fluctuations and low accuracy, primarily due to the limitations of conventional controllers such as PLCs (Programmable Logic Controllers) and simple PID algorithms. These systems lack the real-time responsiveness and adaptive tuning capabilities required to handle the nonlinear and time-varying characteristics of the white zone thermal environment. To address these shortcomings, I have developed a novel temperature regulation system based on a high-speed single-chip microcomputer (STC15F2K60S2) and a neural network-optimized PID algorithm. This system aims to achieve rapid and precise temperature control, thereby improving the quality of aluminum alloy cylinder lost foam castings. In this paper, I first analyze the lost foam casting process for aluminum alloy cylinders and identify the specific requirements for white zone temperature regulation. Then, I present the system design, including hardware architecture and software control strategy. Finally, simulation results demonstrate that the proposed system outperforms conventional methods in terms of settling time and temperature accuracy.
Process Analysis of Lost Foam Castings for Aluminum Alloy Cylinders
Aluminum alloy cylinder blocks and cylinder heads are critical components of automobile engines, demanding excellent airtightness for cooling and oil passages, as well as high dimensional precision for exhaust ports. Lost foam casting is particularly suitable for manufacturing these components due to its ability to produce complex internal geometries with minimal post-processing. The typical lost foam casting setup for aluminum alloys includes a pattern (made of foam material), a riser tube, a sand box, dry sand, and vacuum/gas pressure ports. The process begins by fabricating a foam pattern that replicates the exact shape of the desired casting. This pattern is then placed into a sand box, surrounded by dry sand, and compacted. Subsequently, molten aluminum is poured under controlled gas pressure (either vacuum or positive pressure) to replace the vaporized foam, forming the final casting. The quality of the foam pattern directly influences the casting’s internal soundness, carbon pick-up, and dimensional accuracy.
Statistical evidence from industrial practice indicates that over 80% of casting defects in lost foam castings originate from poor quality control in the white zone (the pattern production area). Therefore, managing the white zone manufacturing process is paramount. The white zone process for lost foam castings involves several key steps: pre-expansion of beads, aging, blowing and filling of the mold, steam heating and fusion, cooling, and pattern removal. Among these, temperature regulation during the steam heating and fusion stage is critical. During the initial drying stage, a low temperature must be maintained to prevent cracking of the pattern. As heating proceeds, the temperature must rise uniformly to soften the beads and allow them to fuse together. If the temperature increases too rapidly, the mold surface heats unevenly, leading to inconsistent bead melting and potential defects. Conversely, insufficient heating prevents proper fusion. Therefore, the temperature must be precisely adjusted according to the mold geometry and bead density to ensure a homogeneous, defect-free pattern.
System Design for Temperature Regulation in the White Zone of Lost Foam Castings
To overcome the limitations of existing methods, I designed a temperature regulation system that combines a fast microcontroller with an intelligent control algorithm. The core hardware is the STC15F2K60S2 single-chip microcomputer, which features high-speed processing (up to 35 MHz) and rich on-chip peripherals, enabling real-time temperature acquisition and control. The overall system architecture is depicted schematically below.

Hardware Architecture
The hardware system is divided into four functional blocks: human-machine interface, temperature acquisition, microcontroller unit, and control actuation. The human-machine interface consists of an LCD display and a keypad, allowing operators to set desired temperature profiles and monitor real-time conditions. The temperature acquisition block employs a CSW-11(08) temperature and humidity sensor, which simultaneously measures both temperature and humidity, as humidity can affect the white zone process. The sensor outputs electrical signals proportional to the measured parameters, which are then filtered and amplified by a pre-processing circuit before being fed into the microcontroller. The STC15F2K60S2 microcontroller serves as the central controller, comparing the acquired temperature with the setpoint and computing the control output. The control actuation block includes a silicon-controlled rectifier (SCR) and solenoid valves. The microcontroller generates a pulse-width modulation (PWM) signal to adjust the conduction angle of the SCR, thereby regulating the steam flow through the solenoid valves and consequently the temperature inside the white zone chamber. Table 1 summarizes the key hardware components and their functions.
| Component | Model/Type | Function |
|---|---|---|
| Microcontroller | STC15F2K60S2 | Central processing, real-time control |
| Temperature/Humidity Sensor | CSW-11(08) | Acquires temperature and humidity signals |
| Signal Pre-processing | Operational amplifier, filter | Amplifies and filters sensor signals |
| Actuator | SCR + Solenoid valve | Regulates steam flow based on control signal |
| Display | LCD 1602 | Shows setpoint and real-time temperature |
| Input Interface | 4×4 keypad | Allows user to set parameters |
Software Control Strategy
The software is designed using a modular approach, consisting of initialization, parameter setting, data acquisition and processing, and control signal generation modules. The core of the control algorithm is a neural network-optimized digital PID controller. Traditional PID controllers rely on fixed gains (KP, KI, KD), which are difficult to tune optimally for the nonlinear and time-varying dynamics of the white zone heating process. To address this, I implemented a three-layer feedforward neural network that dynamically adjusts the PID gains in real time based on the control error and its derivatives.
The control error e(t) is defined as the difference between the setpoint temperature r(t) and the measured temperature y(t):
$$ e(t) = r(t) – y(t) $$
The digital PID control law in incremental form is given by:
$$ \Delta u(k) = K_P [e(k) – e(k-1)] + K_I e(k) + K_D [e(k) – 2e(k-1) + e(k-2)] $$
where u(k) is the control output at time step k. The neural network is trained online to minimize a performance index J defined as:
$$ J = \frac{1}{2} [e(k)]^2 $$
The network has multiple inputs, one hidden layer, and three output nodes corresponding to KP, KI, and KD. The weights are updated using a gradient descent method. The sensitivity of the plant output to the control input is approximated via a Jacobian matrix. The update rules for the PID gains are derived as follows:
$$ K_P(k+1) = K_P(k) – \eta_P \frac{\partial J}{\partial K_P} = K_P(k) + \eta_P e(k) \frac{\partial y(k)}{\partial u(k)} [e(k) – e(k-1)] $$
$$ K_I(k+1) = K_I(k) – \eta_I \frac{\partial J}{\partial K_I} = K_I(k) + \eta_I e(k) \frac{\partial y(k)}{\partial u(k)} e(k) $$
$$ K_D(k+1) = K_D(k) – \eta_D \frac{\partial J}{\partial K_D} = K_D(k) + \eta_D e(k) \frac{\partial y(k)}{\partial u(k)} [e(k) – 2e(k-1) + e(k-2)] $$
Here, ηP, ηI, ηD are learning rates, and ∂y(k)/∂u(k) is the plant Jacobian estimated by the neural network. By adaptively tuning the PID gains, the controller can respond quickly to temperature changes while maintaining stability. The flow chart of the control program is shown in the following logical sequence: after system initialization, the microcontroller reads the user-set temperature profile, acquires the current temperature via the sensor, computes the error, passes the error through the neural network to update PID parameters, calculates the control output, and sends the signal to the SCR. This loop runs at a fixed sampling interval of 0.1 seconds to ensure real-time performance.
Simulation Results and Discussion
To validate the effectiveness of the proposed temperature regulation system, I conducted simulation studies using MATLAB/Simulink. A representative temperature profile for the white zone of lost foam castings was defined, consisting of three stages: ramping up from 15°C to 45°C over 4 hours, holding at 45°C for 2 hours, and then cooling down to 25°C over the remaining 4 hours. The performance of my neural network-PID (NN-PID) controller was compared against a conventional PID controller tuned using the Ziegler-Nichols method, as reported in a prior study (reference suppressed). The simulation results are summarized in Table 2, which compares the root mean square error (RMSE), maximum overshoot, and settling time for both controllers.
| Performance Metric | Conventional PID | NN-PID (Proposed) |
|---|---|---|
| RMSE (°C) | 2.85 | 1.12 |
| Maximum Overshoot (°C) | 4.3 | 1.8 |
| Settling Time (minutes, within ±1°C) | 35 | 12 |
| Steady-State Error (°C) | 0.8 | 0.2 |
From Table 2, it is evident that the proposed NN-PID controller significantly outperforms the conventional PID controller in all metrics. The RMSE is reduced by more than half, indicating that the NN-PID maintains a much closer tracking of the desired temperature profile. The maximum overshoot is also substantially lower, which is critical for preventing pattern damage during rapid temperature changes. The settling time is reduced from 35 minutes to 12 minutes, meaning the system reaches steady state much faster, thereby improving production efficiency and reducing energy consumption. The steady-state error is minimized to 0.2°C, demonstrating high precision.
Further analysis of the temperature response curves (not shown due to figure restriction) reveals that the conventional PID controller exhibits noticeable oscillations during the transition from heating to holding, and from holding to cooling. In contrast, the NN-PID controller smoothly tracks the setpoint with minimal deviation. The adaptive nature of the neural network allows the gains to be adjusted on-the-fly, compensating for the nonlinear behavior of the steam heating system. For instance, during the initial heating stage, the PID gains are automatically increased to accelerate the response, while during the holding stage, the gains are reduced to prevent overshoot. This dynamic adjustment is impossible with fixed-gain PID.
The improved performance has direct implications for the quality of lost foam castings. By maintaining the white zone temperature within a narrow tolerance, the foam pattern achieves uniform bead fusion, reduced internal stresses, and consistent dimensional stability. Consequently, the subsequent casting process yields fewer defects such as porosity, shrinkage, and misruns. The proposed system thus provides a reliable foundation for producing high-quality aluminum alloy cylinder blocks via lost foam casting.
Conclusion
In this work, I have developed a temperature regulation system tailored for the white zone of lost foam castings of aluminum alloy cylinders. By integrating a high-speed STC15F2K60S2 microcontroller with a neural network-optimized PID algorithm, the system achieves faster settling time, lower overshoot, and higher steady-state accuracy compared to conventional PID controllers. The adaptive tuning of PID gains enables the controller to handle the nonlinear and time-varying dynamics inherent in the steam heating process. Simulation results confirm a reduction in RMSE by 61%, a 58% reduction in overshoot, and a 66% reduction in settling time. These improvements directly contribute to enhanced pattern quality, thereby reducing defect rates in the final lost foam castings. The proposed system offers a practical and cost-effective solution for industrial white zone temperature control, promoting the wider adoption of lost foam casting technology for complex aluminum alloy components.
Future work will focus on implementing the system on an actual production line and evaluating its performance under real-world conditions. Additionally, incorporating humidity compensation into the control algorithm could further refine the temperature regulation, as humidity also affects bead fusion. Overall, this study underscores the potential of intelligent control methods in advancing the reliability and efficiency of lost foam castings.
