# KGHM CuValley Hack — 1st Place, Now in Production

> Source: https://jakubczak.dev/projects/kghm-copper-smelter/ · Author: Mateusz Jakubczak

*ML-driven real-time optimisation engine for KGHM's flash smelting furnace — from hackathon prototype to continuous production use.*

- Published: 2021-06-01
- Tags: production, control-systems, machine-learning, hackathon
- External link: https://magazynprzemyslowy.pl/artykuly/kghm-sztuczna-inteligencja-wspiera-wytop-miedzi

**1st place at KGHM CuValley Hack** (KGHM Polska Miedź S.A., June 2021), out of 100 teams and nearly 300 participants, including PhD teams.

We won the **flash furnace stabilisation** category with the Data Drivers team: a machine learning model of the
furnace's heat losses plus a simple-to-implement optimisation algorithm (the jury's words), with simulation and
visualisation on top — the highest accuracy and prediction horizon in the competition.

## From prototype to production

After the hackathon we spent about a year turning the prototype into a production system with KGHM's engineers:

- a simulation model that predicts the process, and a stabiliser that recommends setpoints, tuned against a cost
  function that penalises deviation, oscillation and abrupt changes;
- drift monitoring and automatically generated stabilisation reports;
- versioned releases running against live plant data.

KGHM completed the deployment at the Głogów copper smelter in late 2022. It now automates the heating regulation of a
~$675M flash furnace — one of fewer than five such installations in the world — and remains in continuous operation.

## Tech

Python, FastAPI, PostgreSQL, TypeScript, React, Docker.

More: [KGHM — the winners](https://media.kghm.com/en/news-and-press-releases/copper-hackathon-concluded-meet-the-winners-of-the-programming-marathon-on-the-occasion-of-the-60th-anniversary-of-kghm-polska-miedz-s-a) ·
[KGHM on the deployment](https://media.kghm.com/en/news-and-press-releases/virtual-hackathon-vs-real-world-challenges-kghm-polska-miedz-s-a-extends-an-invitation-to-participate-in-the-3rd-edition-of-the-cuvalley-hack-2023) ·
[CuValley — Data Drivers](https://cuvalley.com/data-drivers/) · [datadrivers.pl](https://www.datadrivers.pl/#cuvalley-hack-1st-edition---1st-place)
