Skip to content

Extruder

Christian edited this page Sep 30, 2026 · 5 revisions

The QiTech single-screw extruders run four heating zones and a Mitsubishi-driven screw that is regulated either to a target speed or to a target melt pressure.

Extruder V2 Extruder V3
Machine ID 4 22
Barrel heaters (front, middle, back) 700 W each 900 W each
Nozzle heater 200 W 150 W
Motor, gearbox (motor : screw) 4-pole, 34 : 1 2-pole, 30 : 1
Default heating algorithm pid observer_pi
Schema extruder_v1.yaml extruder_v2.yaml

Both run the same code in extruder1/; only the terminal roles differ. The screw motor is driven by a Mitsubishi FR-CS80, see Mitsubishi-Inverter. Operating instructions: Extruder-Manual.

Hardware

Role (V2 / V3) Terminal Purpose
0 / 0 EK1100 Bus coupler
1 / – EL1002 Digital input, not used by the software
2 / 1 EL6021 RS-485 link to the inverter
3 / 2 EL2004 Heater relays: front, middle, back, nozzle
4 / 3 EL3021 Pressure sensor, 4–20 mA = 0–350 bar
5 / 4 EL3204 Temperature sensors: front, middle, back, nozzle

Roles are assigned in Identification.

How it works

Heating zone loop

Each of the four zones runs this loop independently.

flowchart TB
    subgraph HW["Hardware"]
        direction LR
        DO["EL2004 relay"]:::hardware
        HB["Heater band"]:::hardware
        TS["Temperature probe"]:::hardware
        TI["EL3204"]:::hardware
        DO --> HB
        HB -- "heat" --> TS
        TS --> TI
    end
    subgraph CTRL["One heating zone"]
        direction LR
        SP["Target temperature"]:::control
        PID["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control_core/src/controllers/heating/mod.rs'>PidBaseline</a><br/>pid"]:::control
        OBS["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control_core/src/controllers/heating/sensor_lag_observer.rs'>SensorLagObserver</a><br/>estimated metal temperature"]:::control
        OPI["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control_core/src/controllers/heating/observer_pi.rs'>ObserverPi</a><br/>observer_pi"]:::control
        TC["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control/src/machines/extruder1/temperature_controller.rs'>TemperatureController</a><br/>cutout 303 °C<br/>slow PWM 500 ms"]:::control
        SP --> PID
        SP --> OPI
        OBS --> OPI
        PID -- "duty" --> TC
        OPI -- "duty" --> TC
    end
    CTRL -- "relay on / off" --> HW
    HW -- "reading in °C" --> CTRL
    classDef frontend fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef control fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef framework fill:#fef3c7,stroke:#b45309,color:#78350f
    classDef lib fill:#ede9fe,stroke:#6d28d9,color:#4c1d95
    classDef hardware fill:#f1f5f9,stroke:#475569,color:#0f172a
Loading

Screw and pressure loop

flowchart TB
    subgraph DRIVE["Drive and sensor"]
        direction LR
        EL6["EL6021"]:::hardware
        CS80["FR-CS80 inverter"]:::hardware
        MOT["Motor, gearbox, screw"]:::hardware
        PS["Pressure sensor on EL3021"]:::hardware
        EL6 --> CS80
        CS80 --> MOT
        MOT -- "melt pressure" --> PS
    end
    subgraph CTRL["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control/src/machines/extruder1/screw_speed_controller.rs'>Screw controller</a>, one of two regulations"]
        direction LR
        RPM["Target rpm"]:::control
        TR["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control/src/transmission/fixed.rs'>FixedTransmission</a><br/>screw rpm to motor Hz"]:::control
        PSET["Target pressure"]:::control
        PPID["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control_core/src/controllers/clamping_timeagnostic_pid.rs'>Pressure PID</a><br/>adjusts Hz, 0 to 60 Hz"]:::control
        TUNE["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control_core/src/controllers/pid_autotuner.rs'>PidAutoTuner</a><br/>relay auto-tune"]:::control
        INV["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/qitech_control/src/machines/extruder1/mitsubishi_cs80/mod.rs'>MitsubishiCS80</a><br/>Modbus RTU"]:::control
        RPM -- "rpm" --> TR
        TR --> INV
        PSET -- "pressure" --> PPID
        PPID --> INV
        TUNE -- "gains" --> PPID
        TUNE -. "during auto-tune" .-> INV
    end
    CTRL -- "frequency, start, stop" --> DRIVE
    DRIVE -- "pressure in bar" --> CTRL
    classDef frontend fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef control fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef framework fill:#fef3c7,stroke:#b45309,color:#78350f
    classDef lib fill:#ede9fe,stroke:#6d28d9,color:#4c1d95
    classDef hardware fill:#f1f5f9,stroke:#475569,color:#0f172a
Loading

In rpm regulation the transmission converts the target screw rpm into a motor frequency (f = motor rpm × poles / 120). In pressure regulation the pressure PID adjusts the commanded frequency directly; the transmission is then only used to report the screw rpm from the inverter's output frequency.

Controllers

Heating

Zone EL2004 / EL3204 channel Heater, Extruder V2 Heater, Extruder V3 Duty clamp
Front 1 700 W 900 W 1.0
Middle 2 700 W 900 W 1.0
Back 3 700 W 900 W 1.0
Nozzle 4 200 W 150 W 0.95
  • Slow PWM: a strategy returns a duty between 0 and the zone's clamp. The relay is closed for duty × 500 ms at the start of every 500 ms window.
  • Cutouts: the relay stays open while the EL3204 reports an error (heating.<zone>.wiring_error, temperature shown as 0 °C), while the reading is above 303 °C, and while heating is not allowed (Standby). Targets can be set up to 300 °C; the 3 K gap keeps a zone held at 300 °C from cutting out.
  • Reset: leaving Heat/Extrude for Standby drops each strategy's integral and observer state, so re-enabling starts fresh.

Heating algorithm. heating.algorithm selects the control law for all four zones:

Algorithm How it works Default on
pid PidBaseline: PID on the raw reading, with anti-windup (the integral freezes while the output is at 0 or at the clamp) Extruder V2
observer_pi ObserverPi: the SensorLagObserver estimates the metal temperature from the lagging probe (reading plus probe time constant × filtered slope, correction capped at ±45 K). A feedforward supplies the steady-state duty, ff_duty_per_k × (target − 22 °C), and a PI on the estimate trims around it. Kd is not used. Extruder V3

The algorithm is a config property on both variants and can be changed at runtime. Changing it swaps the strategy on all zones and resets the zone gains (pid.temperature.<zone>.*) and their defaults to the new algorithm's defaults. In the operator UI the selector is on the Extruder V3 settings page (Show Advanced PID Settings → Heating Algorithm); the Extruder V2 page has no selector, so there it can only be changed through the API.

Parameter Unit Default Description
heating.algorithm pid / observer_pi Extruder V2: pid, Extruder V3: observer_pi Control law of all four zones
heating.<zone>.target_temperature °C 0 0 to 300
heating.nozzle.target_enabled bool true Whether the nozzle is heated: shows the nozzle target setter and includes the nozzle in the minimum extrusion temperature check. The control loop ignores it.
pid.temperature.<zone>.kp / ki / kd — pid: 0.16 / 0 / 0.008 for every zone; observer_pi: see below Gains of the zone's outer loop. A change resets the loop's integral.

observer_pi defaults per zone (only kp and ki are config properties; the rest are fixed in heating_params.rs):

Zone kp ki Filter time constant Probe time constant Feedforward duty per K
Front 0.1111 0.000537 17.1 s 90.4 s 0.00046
Middle 0.0735 0 18.3 s 128.4 s 0.00016
Back 0.1101 0.000357 19.4 s 109.7 s 0.00061
Nozzle 0.3231 0.001637 20.4 s 90.4 s 0.00244

Screw speed and pressure

Regulation What the software does
rpm (default) Converts screw.target_rpm through the gearbox and motor poles into a frequency and writes it to the inverter. It writes only when the target rpm or the regulation changes.
pressure Every cycle the pressure PID adds (kp·e + ki·∫e + kd·de/dt) × dt to the commanded frequency, with e = target − measured pressure in bar, and clamps the result to 0–60 Hz. Switching to pressure starts from the inverter's current output frequency; changing the target pressure resets the PID. The motor is stopped whenever the machine is not extruding.
  • Minimum extrusion temperature: the machine only enters Extrude when every heated zone reads at least extrusion.min_temperature (default 150 °C). The nozzle counts only while heating.nozzle.target_enabled is on. Otherwise the Extrude command is refused, and the message names the zones that are still cold. An unplugged thermocouple reads 0 °C, so a wiring error also blocks Extrude. The check runs only when entering Extrude; a zone cooling down later doesn't stop the motor.
  • Motor on/off: entering Extrude sends the run command in screw.direction; leaving Extrude sends stop. Changing the direction while the motor runs sends the new direction immediately. The gearbox inverts the rotation (details on Mitsubishi-Inverter).
  • Pressure measurement: EL3021 channel 1, 4–20 mA mapped linearly to 0–350 bar. A read error sets pressure.wiring_error and reports 0 bar.
  • Pressure limit: at or above pressure.limit (when pressure.limit_enabled), the motor is switched off and the machine drops from Extrude to Heat.
  • Screw rpm (motor.rpm) is derived from the inverter's output frequency, the motor poles and the gearbox; there is no encoder.

Pressure PID auto-tune (pressure.autotune.start, allowed only in Extrude mode with pressure regulation):

  1. The tuner switches the frequency between the current output frequency ± frequency_step (clamped to 0–60 Hz), flipping whenever the pressure crosses target_pressure ± tune_delta.
  2. After 20 pressure peaks it computes the ultimate gain Ku = 4 × frequency swing / (π × pressure amplitude) and the period Tu, and derives kp = 0.25 Ku, ki = kp / Tu, kd = kp × Tu / 8.
  3. On success the gains are written to pid.pressure.* and published in pressure.autotune.result.*. The run fails if it takes longer than 30 s or when pressure.autotune.stop is sent.
Parameter Unit Default Description
screw.regulation rpm / pressure rpm What the screw is regulated to
screw.direction forward / reverse forward Screw rotation direction
screw.target_rpm rpm 0 Minimum 0. The UI allows up to 44 rpm (Extruder V2) or 100 rpm (Extruder V3).
screw.target_pressure bar 0 Minimum 0; also the setpoint of an auto-tune run. The UI allows up to 270 bar.
extrusion.min_temperature °C 150 Temperature every heated zone must reach before Extrude is allowed. 0 up to the maximum zone target (300 °C). Set per material in the settings page, Minimum Extrusion Temperature.
pressure.limit bar 100 Motor cutoff pressure. The UI allows up to 350 bar.
pressure.limit_enabled bool true Enables the pressure limit
pid.pressure.kp / ki / kd — 0.01 / 0 / 0.02 Pressure PID gains (Hz per bar and second). Overwritten by a successful auto-tune.
pressure.autotune.tune_delta bar 0.5 Pressure band of the auto-tune relay
pressure.autotune.frequency_step Hz 5 Frequency step of the auto-tune relay

Inverter communication

The screw controller talks to the Mitsubishi FR-CS80 over Modbus RTU (slave 1, 19200 baud, 8E1) through the EL6021, using QiTech Control's own RTU framing in modbus/. Every cycle it polls the inverter status and the output frequency, current and voltage; start, stop, frequency and reset are sent by priority. Registers, required inverter parameters and wiring: Mitsubishi-Inverter.

Power and energy

Measurement Unit How it is computed
heating.<zone>.power W Current duty × rated heater power of the zone (not measured)
motor.power W Output voltage × output current reported by the inverter
power.combined W Motor power plus the four zone powers
energy.total kWh power.combined integrated over time since the machine was built

Clone this wiki locally