A pig run looks routine until it is not: the pig that stalls behind a wax plug, the receiver door that weeps after its two-hundredth cycle, the inspection tool that comes back with its sensors riding on paraffin. Most pipelines still launch cleaning pigs on a fixed number of days, service the traps when something leaks, and learn how clean the line is only when an inspection vendor reports lost data. iFactory's AI Optimization Engine treats pigging as a maintenance programme with three measurable parts — the interval, the launcher and receiver, and the cleaning result — and times each run from the pressure, flow and temperature history you already keep. To go through the method against your own line, book a pigging review.
Predictive Maintenance for Pipeline Pigging: the Right Interval, Healthy Traps, a Line Ready for Inspection
iFactory forecasts wax and debris build-up from your own operating data, tracks launcher and receiver condition between runs, and scores every cleaning run — so the inline inspection tool has the best chance of succeeding first time.
- Run intervals that follow the deposition rate, season by season
- Trap condition tracked by cycle count, leak tests and valve travel
- Cleaning evidence built run by run before the inspection tool is booked
A Pig Run Has Three Ways to Disappoint, and the Calendar Sees None of Them
Pigging is usually managed as a schedule: a pig every so many days, a line in the maintenance plan, a box ticked when the pig arrives. That schedule says nothing about how much wax the pig was pushing, whether the receiver door seal is near the end of its life, or whether last month's run left the line any cleaner than the one before. Each of those is a separate question with its own data, and each has a cost when it is answered late. The first is paid in wasted runs or in a stalled pig, the second in an unplanned trap job or a leak at the door, and the third in an inspection that has to be repeated. Predictive maintenance for pigging means measuring all three between runs rather than discovering them during one. If you would like to check which of the three is costing most on your system, our support team can go through your run history with you.
The interval is a guess
A fixed number of days is sized for the worst season and then left alone. In winter it may be too long; in summer the pig arrives almost clean, and each of those runs still carries crew time, wear and a trap opening.
The trap is run to failure
Closure seals, kicker valves, signallers and vent lines wear with every cycle. They are rarely trended, so the first sign of trouble is a weep at the door or a barrel that will not hold zero on the day the pig is due.
The result is not measured
What came back in the receiver, how long the pig took and what its discs looked like are noted on paper, if at all. Without a run-to-run record nobody can say whether the line is getting cleaner — until an inspection vendor says it is not.
Why a Fixed Number of Days Is Wrong in One of Two Directions
Wax leaves a crude when the pipe wall is colder than the oil's wax appearance temperature, so the deposition rate follows ground temperature, flow rate and the crude slate. It is not constant through the year. A paper presented to the Pigging Products and Services Association from North Sea operating experience recommends that no more than about 2 mm of wax be allowed to build before a line is pigged, and reports pigging frequencies in service that range from every two or three days to every three or four months. A thin layer is a large volume: 2 mm over just 10 km of a 16-inch line is roughly 24 cubic metres of wax waiting to be pushed ahead of the pig. The same layer narrows the bore enough to raise frictional pressure loss by about 5% at the same flow from the diameter change alone, before the rougher surface is counted.
The grid below takes one illustrative line — 120 km, 16-inch, waxy crude, an operating trigger of 1.5 mm held below the 2 mm guideline — and three seasons with different deposition rates. It then compares two calendar intervals with a condition-based plan that launches when the trigger is reached. To run the same comparison with your own deposition history, book a working session.
Illustrative figures. Deposition rates are assumptions chosen to make the arithmetic easy to follow; real rates come from your own returns and pressure history.
Read across the two calendar columns and both failures appear. A five-day interval protects the winter but launches 73 pigs a year, 27 more than the line needs; 15 of the surplus runs fall in the warm season, where the pig arrives carrying well under half a millimetre, and 12 in the shoulder months. A seven-day interval looks economical at 52 runs, only six more than the condition-based plan, yet every one of the roughly 21 winter runs pushes into a line holding 2.1 mm — beyond the guideline, and the condition in which pigs stall.
The same paper notes that several pigs have become stuck because of the amount of wax building ahead of them, and advises starting with frequent pigging and extending from experience because wax deposition models are uncertain. That is the approach the engine follows: it begins at your current frequency and lengthens the interval only as the evidence from each run supports it.
Launcher and Receiver Reliability: the Equipment Every Run Depends On
A launcher or receiver is a pressure vessel that is opened to atmosphere by hand, sometimes several times a week. Its safety rests on a short list of components working every time: the closure and its seal, the valves that isolate the barrel, the vent and drain that empty it, and the instruments that prove it is empty. All of them degrade with use, and most leave a trace in data the site already has — valve travel times, barrel pressure after venting, the minutes a depressurisation takes, the number of cycles since a seal was changed. iFactory trends those traces between runs so that trap work is planned into a run window instead of being found at the door. To see which of these signals your control system already records, ask our integration engineers.
Under 49 CFR 195.426, an operator of a hazardous liquid pipeline may not use a launcher or receiver unless it has a relief device able to relieve barrel pressure safely before a pig goes in or comes out. The operator must also have either a device that shows the pressure has been relieved, or a means of preventing a pig being put in or taken out while pressure remains. A 1997 US offshore safety alert describes what the rule is there to prevent: two operators were fatally injured opening a launcher that held gas at 1,020 psi, on a barrel with no relief valve and no pressure gauge.
Monitoring does not replace the relief device, the interlock or the opening procedure. It gives early notice that the equipment those safeguards rely on is wearing.
One launch, six time-stamped steps
The sequence is a generic outline; your own procedure governs. iFactory records how long each step takes, because a step that is getting slower is usually a component that is wearing.
What the Three Parts Are Worth on One 120 km Line
An illustrative year, built from the example above. The largest line is the plainest: pig runs that the deposition rate never asked for. The other two are smaller and are stated as expected values, not promises. Replace each figure with your own contract rates before you rely on it.
Cleaning Outcomes: Treat Every Run as a Measurement
A cleaning pig is also the cheapest instrument that ever travels the full length of the line. It reports four things on every trip, and together they say more about the inside of the pipe than any single sensor on the outside. The discipline is to record them in the same way each time, so that one run can be compared with the last. iFactory holds them as a structured run record tied to the operating data for the hours the pig was in the line; the engine then uses the pattern across runs to judge whether a cleaning programme is working, and which kind of pig the next run calls for. If your run sheets are still on paper, we can show you a sample record to start from.
Transit time
Predicted against actual, section by section. A pig that slows in the same place on successive runs is pushing a growing load or meeting a restriction.
Pressure signature
The differential across the pig while it travels. A steady climb means wax is piling up ahead of it; spikes mark hard deposits or fittings.
Returns
The weight or volume of wax, scale and solids taken out of the receiver, with a photograph and a note of whether the wax was soft or hard.
Pig condition
Disc and cup wear, gauge plate deflection, missing or bent brushes. Uneven wear points to a valve that is not fully open or a bend the pig dislikes.
Two published cases show why the record matters. In the North Sea paper cited above, a pig run without bypass ports built up about three cubic metres of wax ahead of it, and one run into a host platform returned several tonnes of wax to the pig trap; bypass ports that let a little flow through the pig keep the removed wax dispersed instead of packed. In a pre-inspection case study from a pigging supplier, a 7.7 km gas line that had not been pigged for twenty years returned only 19 litres of debris on a gauge pig run with no deflections — which looked like a clean line. It then took twelve runs in all, eight of them chemical batching runs, before the inspection tool could be sent. A gauge pig measures bore, not cleanliness.
A light first pass through a line of unknown condition. Low risk of sticking; removes loose liquids and soft deposits.
The routine workhorse. Seals well, scrapes soft wax, and carries a gauge plate when bore needs checking.
For hard wax, scale and corrosion product. Used progressively, from mild to aggressive, as returns fall.
Ports let flow through the body to jet removed wax forward. The port area is a setting worth recording on every run.
Two pigs with a slug of solvent, dispersant or inhibitor between them; on product lines, a separator between grades.
Picks up ferrous debris that would otherwise settle in the lower part of the pipe and mask metal-loss signals.
Inline Inspection: the Expensive Run You Do Not Want to Repeat
For US hazardous liquid pipelines that could affect a high consequence area, 49 CFR 195.452 requires the operator to keep assessing line pipe integrity at five-year intervals, not to exceed 68 months, and inline inspection is the method most operators use. Section 195.591 requires those inspections to follow API Std 1163, ASNT ILI-PQ and NACE SP0102. After an assessment, the operator must obtain enough information to decide whether a condition is a threat promptly, and no later than 180 days. That clock makes a failed first run costly well beyond the vendor's invoice: a re-run means more cleaning, another mobilisation and another flow window, with the assessment deadline still running.
The common causes of lost data are well documented by inspection vendors. Paraffin can sit at any clock position and lift magnetic flux leakage sensors away from the wall. Fine ferrous debris settles between roughly the four and eight o'clock positions and masks metal loss. A tool travelling too fast does not magnetise the wall fully, and the recorded signal weakens. Each of these is something the cleaning record and the operating data can forecast before the tool is booked. Vendor guidance is that the decision to send the tool should rest on returned debris, pig condition and evidence that conditions are improving — not on having completed a set number of runs. To see how a readiness score would be built from your records, speak to our pipeline specialists.
Where iFactory helps, and where it stops
- Readiness evidence. The trend in returns, gauge plate results and pig wear across the cleaning campaign, in one view your vendor can read.
- Speed forecast. Expected tool speed along the line from the planned flow rate and elevation profile, set against the window your vendor specifies.
- Flow window. The hours in which pump schedules and nominations can hold the flow rate the tool needs.
- Trap readiness. Launcher and receiver health checked before a tool worth far more than a cleaning pig goes into the barrel.
- Smart pig results. The vendor's feature listing can be loaded beside the cleaning and operating history, so deposits and anomalies are seen on one map of the line.
- Not in scope. iFactory does not analyse raw inspection signals, size defects or make integrity decisions. Those stay with your qualified vendor and integrity engineers.
The services market around these runs is large and growing. One analyst estimate puts intelligent pigging services at USD 2.68 billion in 2025 and USD 2.86 billion in 2026, rising to USD 5.11 billion by 2035, with magnetic flux leakage the leading technology and North America holding about 32% of the market. The inspection vendors in that market measure the pipe wall. iFactory's role sits before and around the run: the operating side of the programme, where the line is made ready and the run is given the conditions it needs.
What the AI Optimization Engine Computes — and What It Leaves to Your Engineers
The engine works from measurements, not from a wax chemistry model alone. It learns the clean-line relationship between flow, temperature and differential pressure for each section straight after a pig run, then tracks how far the line has moved from that baseline since. That gap, corrected for flow and viscosity, is an estimate of effective wax thickness; its slope is the deposition rate; and the slope projected forward gives a date for the trigger. Each run's returns are then used to check the estimate, so the forecast tightens as the record grows. Every recommendation carries a confidence band, and none is acted on by software: the engine proposes a run window, and your controller and pigging supervisor decide. Ask for a live demonstration to see the forecast on sample data.
- Inputs. Flow, inlet and outlet temperature, ground temperature, differential pressure by section, crude wax content and wax appearance temperature, pig run records, trap valve and instrument signals.
- Outputs. Effective wax thickness, days to trigger, a recommended run window and pig type, trap health scores and a readiness score ahead of an inspection.
- Guardrails. Intervals start at your current frequency and extend in steps. A ceiling fixed by your integrity engineer cannot be exceeded, whatever the forecast says.
- Left to people. Pig design, the opening procedure, the launch itself, defect assessment and every integrity decision.
Turnkey AI: Delivered, Connected and Live in 6–12 Weeks
iFactory arrives as a pre-configured NVIDIA AI server, racked and ready, with the software pre-loaded. Rack it, plug in power and Ethernet, and the AI is live on your network. Our team handles the rest — cabling, network setup, PLC and SCADA integration, operator training and 24×7 remote monitoring — so your pipeline controllers and technicians are not asked to become data engineers. The server sits inside your own network, and your operating data stays on it. For a scope and price matched to your line, request a turnkey quote.
Ship, network and data
Server shipped and racked. Read-only connection to SCADA and the historian; twelve months of pressure, flow and temperature history loaded; pig run sheets and trap records entered.
Model training and pilot
Clean-line baselines learned for each section. The engine runs in shadow beside your existing schedule on one line, and its forecasts are checked against what each pig brings back.
Go-live and training
Run windows, trap health and readiness scores go live for controllers and pigging crews. Training by role, alert thresholds agreed, and 24×7 remote monitoring begins.
Frequently Asked Questions
How often should a crude pipeline be pigged for wax?
There is no single answer. Published operating experience reports frequencies from every two or three days to every three or four months, depending on wax content, flowing temperature, ground temperature and flow rate. The same source suggests keeping the deposit below about 2 mm and starting with frequent runs, then lengthening the interval as experience builds. The right figure for your line also changes through the year, which is the case for timing runs on condition.
Can AI predict wax deposition well enough to set the interval?
Not from chemistry alone, and we do not claim that. Deposition models are uncertain. The engine relies on what the line itself reports — how far differential pressure has moved from the clean baseline at a given flow — and corrects that estimate with the returns from each run. It begins at your present frequency and extends in steps under a ceiling your engineers fix.
What does 49 CFR 195.426 require of a launcher or receiver?
A relief device able to relieve barrel pressure safely before a pig is put in or taken out, and either a device that shows pressure has been relieved or a means of preventing the pig being handled while pressure remains. The rule applies to hazardous liquid pipelines; gas pipelines have their own provisions, and site procedures usually go further than either.
How clean does a line need to be before an inline inspection?
Clean enough for the sensors to stay on the wall and the tool to hold its speed, which no single number captures. Vendors advise judging it from the trend in returned debris, pig condition and gauge results across successive runs. A gauge pig on its own is not a cleanliness test; in one published case a line that passed a gauge run still needed eleven further runs.
Does iFactory replace our inspection vendor?
No. iFactory does not process raw magnetic flux leakage or ultrasonic signals, and it does not size or grade defects. It prepares the line and the run, and it can hold the vendor's reported features beside your cleaning and operating history so the two are read together.
Does this apply to gas and refined product lines too?
Yes, with a different trigger. On gas lines the concern is liquid hold-up and black powder, seen as a loss of flow efficiency; on product lines it is batch separation and interface length. The worked example on this page is a waxy crude line because that is where interval timing has the largest effect.
How long does deployment take, and what do you need from us?
Six to twelve weeks from delivery. We need a rack position with power and Ethernet, a read-only connection to SCADA or the historian, about twelve months of pressure, flow and temperature history, and whatever pig run and trap maintenance records exist — paper is fine. A pilot normally covers one line. To check your data against that list before committing, contact our team.
Bring One Line and Twelve Months of Run History
In a thirty-minute session we look at how your interval was set, what your returns say about it, and where your traps and your next inspection stand. You leave with a view of which of the three parts is worth acting on first — whether or not you go further with iFactory.
- 1Pressure, flow and temperature history for the line
- 2Pig run log: dates, pig type, returns, transit times
- 3Launcher and receiver maintenance records
- 4Crude assay: wax content and wax appearance temperature
- 5The date of your next inline inspection







