Skip to main content

Control-Loop Qualification Report

A two-page engineering qualification record from the fictional Helix Control Systems, in graphite with one signal-orange accent, its figures, IDs and measured values set in a monospace face. It pulls together the capabilities that are hardest to fake in a generated document — a real technical diagram and real math, sealed and traceable.

  • A technical block diagram, drawn on the fly. The unity-feedback servo loop — summing junction Σ → PID controller C(s) → servo plant G(s), with encoder feedback H(s) — is built entirely from SVG primitives: boxes, straight connectors, arrowheads and signal labels. No image, no external diagram tool.
  • The governing equations, inline. Via [latex]: the closed-loop transfer function [latex]H(s) = frac{C(s) G(s)}{1 + C(s) G(s) H(s)}[/latex], the PID compensator [latex]C(s) = K_p + frac{K_i}{s} + K_d s[/latex], natural frequency, damping ratio, bandwidth and loop gain — selectable text, not pictures of equations.
  • AES-256 encryption. The report is issued as an encrypted PDF (owner-password): printing is permitted; modification and content extraction are restricted.
  • Traceability barcodes. The unit serial as Code 128 on a framed unit-under-test data plate in the masthead, and a Data Matrix verification code, each with a label and its value printed beneath.
  • Plus a gridded measured-vs-specification results table with right-aligned values and bordered PASS chips, a single diagonal watermark, a running footer with page numbers, ruled section heads, and full data binding from a companion *.data.json.

Everything — diagram geometry, equations, barcodes, encryption — is declared in one plain-JSON source file.

Features used: watermarks, columns, tables, rules, SVG, barcodes (code128, datamatrix), encryption (aes256), math, data binding, headers and footers, Greek text

How it's built​

The block diagram​

The loop is one svg with a 480 × 128 viewBox (SVG). Each block is a rect with two text lines at the same x and width: the transfer function and its caption. The connectors are straight paths, and each arrowhead is a triangle inside a g translated to the end of its line and rotated, 90 to point right and 270 to point left. The summing junction is a circle with Σ inside and + and − beside it.

{ "svg": { "viewBox": [480, 128], "children": [
{ "rect": { "x": 152, "y": 33, "width": 84, "height": 26, "rx": 3, "ry": 3, "style": "block" } },
{ "text": { "x": 152, "y": 41, "width": 84, "text": "C(s)", "style": "blockLabel" } },
{ "text": { "x": 152, "y": 63, "width": 84, "text": "PID Controller", "style": "blockCap" } },
{ "path": { "d": "M 107 46 L 150 46", "style": "link" } },
{ "g": { "translate": [149.5, 46], "rotate": 90, "style": "arrow", "children": [
{ "triangle": { "x": -3.5, "y": -4, "width": 7, "height": 8 } }
] } }
] } }

Equations and units​

[latex] takes LaTeX written without backslashes. A paragraph that holds nothing but the shortcode is set in display style; inside a sentence, as for the PID compensator, the equation is set inline (Math).

{ "p": "[latex]H(s) = frac{C(s) G(s)}{1 + C(s) G(s) H(s)}[/latex]", "style": "formula" }

In the results table, a measured value with its unit is pu{…}, as in [latex]pu{62.4 rad/s}[/latex], and each PASS chip is a [span, chip] around an icon from the fa face that document.fonts declares.

Barcodes and encryption​

Both codes are barcode shapes inside an svg, so the payload can be a $data path (Barcodes). The unit plate encodes $data.unit.serial as Code 128; the verification block encodes $data.report.verifyUrl as Data Matrix the same way.

{ "svg": { "viewBox": [164, 24], "title": "Unit serial $data.unit.serial as Code 128", "children": [
{ "barcode": { "x": 0, "y": 0, "width": 164, "height": 24, "spec": { "type": "code128", "code": "$data.unit.serial" } } }
] }, "style": "plateCode" }

The encryption block sets aes256 with an empty userPassword and an ownerPassword, so the report opens without a password while its permissions hold: print and fillForm are true, and modify, copy, annotate and assemble are false (Encryption).