Malcolm's Talking Points: CD Mapping & Control Presentation
Use this document as a script. Each section matches one slide in mappingmodel.pptx. Read the bullet points out loud, and use the analogies when the audience looks confused.
Slide 1: CD Mapping & Control
- Open with the big picture: we help paper machines make paper that is the same thickness and quality all the way across the sheet.
- CD stands for Cross Direction — meaning the width of the paper, from one edge to the other.
- We use PRBS identification (a smart testing method), adaptive shrinkage modeling, and MPC control to do this automatically.
- Think of it like a self-tuning equalizer for a sound system, but for paper quality.
- This is Stec Corporation's solution for paper mills that want better quality and less waste.
Slide 2: System Architecture
- This slide shows the two main pieces of software that talk to each other.
- automap4.py is the brain. It sits in the office or control room and makes decisions.
- modeldriver.py is the practice machine. It pretends to be the real paper machine so we can test safely in the lab.
- The key idea: automap4 figures everything out by watching what happens. It does not cheat by reading the simulator's hidden settings.
- This matters because in a real mill, the machine does not tell us its secrets. Our software learns them anyway.
- The message system is called ZeroMQ REQ/REP — just think of it as a secure two-way radio between the programs.
Slide 3: Mapping Matrix G[i,j]
- Imagine a spreadsheet with one row for each actuator and one column for each measurement point across the paper.
- Each row shows how much one actuator affects each part of the paper width.
- We say the row sums to 1.0 because we are describing the shape of the effect, not the size.
- The real strength of the effect is figured out separately using the formula: gain = square root of 2π times sigma.
- For dilution actuators, the effect is negative: opening the valve thins the paper, like adding water to soup.
- Before we learn the real shape, we start with a best guess based on an S-curve.
Slide 4: PRBS Identification
- PRBS stands for Pseudo-Random Binary Sequence. It is basically a carefully designed random test pattern.
- Each actuator gets its own random pattern of small moves: down, hold still, or up.
- The values are -1, 0, or +1, with most of them being 0 so the machine is not moving all the time.
- Why do this? Because all 96 zones are tested at the same time instead of one by one. That saves days of testing.
- The moves are small — only 3% of full stroke by default — so the paper quality stays mostly normal during the test.
- Formula on the slide: u(t) = clamp(50 + A × PRBS(t), 0, 100). Translation: take the middle position, add a small random nudge, and keep it between 0 and 100%.
Slide 5: Cross-Correlation & Response Extraction
- After we move the actuators, we wait. The effect does not show up instantly because the paper has to travel to the scanner.
- The transport delay D is the number of scans we wait. It starts at 2 and the system learns the real number.
- We compare the profile change to the PRBS signal using cross-correlation. Think of it as matching a fingerprint.
- The response window is the small area around where we expect to see the effect — about ±35 databoxes in this older slide.
- We use a Gaussian filter to smooth out noise, like blurring a photo to remove grain.
- The window is placed using a hardcoded S-curve, not the learned model. This prevents the software from chasing its own tail and getting confused.
Slide 6: EWMA Update Rules
- EWMA stands for Exponential Weighted Moving Average. It is a fancy way of saying: blend the new measurement with the old estimate.
- Formula: new_estimate = (1 - α) × old_estimate + α × new_measurement.
- During PRBS testing, α is 0.05, so the system learns slowly and carefully.
- During normal control, α is 0.20, so the system adapts faster to real changes.
- After each update, the row is re-normalized so it still sums to 1.
- Quality metric: count how many good observations we have. Progress combines learned quality plus a bonus for unlearned zones that we can predict from nearby learned zones.
Slide 7: Shrinkage Model (S-Curve)
- When paper is made, the edges do not behave the same as the center. The sheet shrinks more near the edges.
- We model this with a third-order polynomial: s(x) = C₃x³ + C₁x.
- The starting guess uses C₃ = -0.4 and C₁ = 0.95.
- x is the normalized actuator position, from -0.5 on the left to +0.5 on the right.
- Expected center position = 250 + s(x) × 460 for a 500-databox sheet.
- As the system learns, it fits a better polynomial from real response centers. But for placing the learning window, it still uses the fallback S-curve to stay stable.
Slide 8: Transport Delay Auto-Estimation
- Transport delay is the time between moving a valve and seeing the result at the scanner.
- It is like turning on a garden hose and waiting for the water to reach the end of a long hose.
- The system estimates this delay automatically by comparing actuator movements to profile changes.
- It uses actual actuator positions, not the PRBS signs, because real positions include clipping and real behavior.
- For each actuator with enough bumps, it extracts the profile time series at the center and finds the lag with the highest correlation.
- The delay is updated during PRBS testing so the learning stays aligned.
Slide 9: Coordinate System & Normalisation
- The paper sheet can wander left and right. If we measured in absolute scanner coordinates, the same actuator would seem to affect different places every scan.
- So we normalize the profile to the sheet itself, using the left and right edges as anchors.
- Think of it like stretching or shrinking a photo so the edges always line up.
- Raw profiles use coordinates 0 to 499 for a 500-databox sheet.
- The normalized index formula converts any raw position into the sheet-relative position.
- This fix is important because without it, edge actuators could be mislearned by 40 or more databoxes.
Slide 10: MPC Supervisory Control
- MPC stands for Model Predictive Control. It is the optimizer that decides how to move the actuators.
- We use an algorithm called SLSQP, which is a standard math solver.
- The objective function has three parts: track the target, do not move too fast, and keep adjacent actuators similar to each other.
- Q, R, and S are tuning weights. In this older slide they are fixed values; in the current software they auto-tune.
- Constraints keep moves small and prevent adjacent actuators from being too different.
- Process gain is recovered using √(2π) × σ, converting the learned shape back into real-world effect size.
Slide 11: Wander Detection & Feed-Forward
- Wander means the paper sheet is moving sideways while it runs through the machine.
- We track the left and right edges with a slow smoothing filter so we see the real movement, not random noise.
- Wander is calculated as the average of the two edges minus the center point.
- We run an FFT — Fast Fourier Transform — on the last 200 scans to find the dominant frequency of the wandering.
- Confidence tells us how sure we are. If the peak is much taller than the background, we trust it.
- Feed-forward means we predict where the sheet will be next scan and compensate the actuators ahead of time.
Slide 12: Stale Scan Protection
- Sometimes the scanner stops scanning for calibration or because of a communication problem.
- The system watches the time between scans. If the gap is bigger than 40 seconds, it pauses.
- While paused, it holds the last setpoints and does not learn or control.
- When fresh scans come back, it resumes automatically.
- This protects the learned model from being corrupted by bad or missing data.
- It can be tested by triggering a scanner standardization cycle in the simulator.
Slide 13: Setpoint Ownership & Bumpless Transfer
- automap4 owns the setpoints. That means it is the only one deciding where the actuators should be.
- When it first connects, it reads the actual actuator positions and uses those as the starting setpoints.
- This is called bumpless transfer — the machine does not jerk when our software takes over.
- Priority order: stale scan holds, PRBS test moves, control moves, idle echoes positions, manual bump overrides selected zones.
- Manual bumps are ignored during PRBS so the test can move all actuators.
- The cached last setpoints are used for mid-scan polls so the machine always has a current command.
Slide 14: CSV Tuning Log
- The Record button starts a detailed log of every scan.
- Each row includes scan number, timestamp, mode, and progress.
- It also records wander data, frequency, confidence, and edge mode.
- Controller tuning values like horizon, R, S, Q, and max move are logged.
- In simulation mode, truth diagnostics show how close the estimates are to the real hidden values.
- This data can be exported to an HTML report for offline analysis and tuning review.
Slide 15: Key Parameter Relationships
- Process gain tells us how strong the actuator effect is. We get it from the learned width: √(2π) × σ.
- Transport delay is found by cross-correlation peak lag, or set manually.
- Control interval is the delay plus zero or one extra scan for stability.
- MPC horizon is at least 3 scans or delay plus one.
- Progress is the average quality across zones, plus credit for predictable unlearned zones.
- Wander confidence comes from how much the FFT peak stands above the background noise.
Slide 16: PaperMachineSimulator Constants
- This slide lists the hidden settings inside the simulator. These are the machine's secrets.
- Defaults are 96 actuators and 500 databoxes.
- The true footprint width is 4.5 databoxes — that is how wide each actuator's effect really is.
- The S-curve uses C₃ = -0.4 and C₁ = 0.95.
- Wander amplitude is 6 databoxes, and machine speed plus path length determine the real transport delay.
- Important: automap4 does not know these numbers. It has to learn them from data, just like it would at a real mill.
Slide 17: Field Report Example
- This slide shows an example of the automatic PDF report the software generates.
- The report is created during or after the PRBS phase, while the system is learning the mapping.
- It includes charts like the mapping heatmap, quality distribution, 2-sigma trend, and wander trend.
- It also shows machine configuration, process estimates, controller tuning, and recommendations.
- This gives the mill engineer a professional document they can save, email, or review in a meeting.
- Bottom line: the customer gets visible proof that the system is learning and working.
General Presentation Tips for Malcolm
- Start every slide by saying what the audience is looking at.
- Use analogies: garden hoses for delay, equalizers for control, fingerprints for correlation.
- Do not read every formula. Say what it means in business terms: faster setup, less waste, better quality.
- When you get a technical question, say you will have the engineer follow up. Do not guess.
- Emphasize the two main customer benefits: the software learns automatically, and it works the same way in simulation and on the real machine.