Blocks
Explore all BlockWerk simulation blocks: mathematical operations, PID controllers, transfer functions, integrators, signal sources, and displays. Free in your browser.
Free online tools: PID Tuner Bode Plot Generator Simulink Alternative Xcos Alternative
Advanced
The BatterySocEkf block implements an Extended Kalman Filter (EKF) to estimate the State of Charge (SOC) of a battery cell from terminal voltage and l
The KalmanFilter block implements a linear discrete-time Kalman filter for optimal state estimation in two-state linear dynamical systems with a singl
The LQRController block is a linear-quadratic regulator. You give it a state-space model of the plant ($\mathbf{A}$, $\mathbf{B}$) and two weights: $\
The MPCController block is a discrete-time Model Predictive Controller for linear state-space systems. At every simulation step, it solves a constrain
The Script block executes user-defined JavaScript or Python (via Pyodide) algorithms synchronously within each simulation step. It enables engineers t
Analysis
The BodePlot block performs automated frequency response analysis of linear dynamic systems. By sweeping a sinusoidal excitation signal across a speci
The `NyquistPlot` block computes and visualizes the complex-plane frequency response (Nyquist diagram) of a linear dynamical system or open-loop trans
Connectivity
The `BronkhorstMFC` block interfaces directly with physical Bronkhorst mass flow controllers (MFC) and flow meters over the browser's Web Serial API u
The `RemoteSensor` block is a hardware-in-the-loop (HIL) source that streams real-time 6-DOF inertial measurement unit (IMU) telemetry from a paired s
The `PhoneController` block turns any smartphone into a wireless 3-axis simulation joystick. When placed on the canvas, it renders a pairing QR code;
Continuous
The SecondOrderSystem block implements a standard second-order continuous-time linear dynamic system. Parameterized intuitively by natural frequency (
The DCMotor block models an electromechanical permanent-magnet direct-current motor plant. It captures the dynamic interaction between electrical arma
Computes the continuous-time rate of change (time derivative $du/dt$) of an incoming signal with integrated first-order high-frequency low-pass filter
Computes the continuous-time integral (accumulation) of an incoming signal over time. Represents the canonical $1/s$ operator in the Laplace domain an
Implements a first-order continuous dynamic lead-lag compensator. Parameterized by a lead time constant $\tau_1$ and a lag time constant $\tau_2$. Whe
The PIDController block implements an industrial-grade continuous-time Proportional-Integral-Derivative feedback controller. It combines immediate err
The StateSpace block implements general continuous-time linear time-invariant (LTI) dynamic systems formulated in matrix state-space notation. Represe
The TransferFunction block implements arbitrary linear time-invariant (LTI) continuous dynamic systems defined by numerator and denominator polynomial
The ZeroPole block implements continuous-time linear time-invariant (LTI) dynamic systems defined by their transmission zeros, system poles, and scala
Discontinuous
Models mechanical backlash (play, clearance, or lost motion) in gear trains, mechanical linkages, lead screws, and robotic joint actuators. The output
Implements a piecewise linear dead zone (deadband) nonlinearity. The output remains strictly zero while the input signal stays within the configurable
Discretizes continuous signal amplitude into discrete staircase quantization levels. Supports two operational modes: **Resolution mode**, which rounds
Restricts the first time derivative (slew rate) of an incoming signal within strict upper and lower gradient bounds. The output follows the input sign
Implements a two-state hysteresis switch (bistable relay or Schmitt trigger). When the input signal rises above `switchOnPoint`, the output transition
Clamps the input signal within specified lower and upper boundaries. While the input signal remains inside the linear band $[u_{\text{lower}}, u_{\tex
Discrete
The `DigitalFilter` block provides high-performance discrete-time filtering of simulation signals using cascaded second-order sections (biquads) or sl
Computes discrete-time numerical integration (accumulation) of a sampled input signal. Supports three classical discretization algorithms: **Forward E
Computes the discrete-time numerical derivative of an incoming signal using the backward difference (Backward Euler) approximation. Evaluates the rate
The `DiscreteStateSpace` block models linear time-invariant (LTI) systems in discrete-time state-space representation. At each discrete sample interva
The `DiscreteTransferFunction` block implements an arbitrary linear discrete-time transfer function $H(z) = \frac{B(z)}{A(z)}$ in the complex $z$-doma
The Hold block implements sample-and-hold operations for discrete-time signal processing and hybrid continuous-discrete systems. It periodically sampl
Delays the input signal by exactly one sample period ($T_s$), representing the fundamental unit delay operator ($z^{-1}$) in discrete-time signal proc
Dynamics
Introduces a continuous transport lag (dead time or propagation delay $\tau$) to an incoming signal. Implemented via an efficient circular ring buffer
The InputShaper block implements Zero Vibration (ZV) and Zero Vibration and Derivative (ZVD) feedforward input shaping algorithms to suppress residual
The SmithPredictor block implements an industrial dead-time (transport delay) compensator based on the classic Smith predictor architecture. In proces
Hydraulics
The Flow Sensor sits in a line, between A and B, and turns the volume flow through it into an ordinary signal. It adds no pressure drop.
The Fluid Reservoir is a tank or supply held at a set gauge pressure. Every hydraulic network needs at least one: it is the network's reference, and i
The Gear Pump is a positive-displacement pump between port A (suction) and port B (outlet). Each shaft revolution moves one displacement of fluid from
The Hydraulic Fluid block sets the fluid properties for a hydraulic network in exactly one place. It specifies the medium, temperature, density, dynam
The Hydraulic Pipe is a straight round pipe or hose between ports A and B. Its pressure drop follows the flow through it: proportional at low Reynolds
The Hydraulic Valve is a sharp-edged orifice whose flow area follows an opening between 0 (shut) and 1 (fully open). Wire a signal to Opening to drive
The Hydraulic Volume is a chamber of fluid that compresses slightly: pressure builds as flow goes in. Put one where a line, cylinder or hose stores oi
The Pressure Sensor turns the gauge pressure at its port into an ordinary signal, for a scope, a display or a controller. It draws no flow. > **Real-
The Relief Valve holds until the pressure drop across it reaches the cracking pressure, then passes flow so the pressure rises only slowly above it. P
Layout
The Area block provides visual grouping and structural zoning on the simulation canvas. It creates a labeled, resizable rectangular boundary with cust
The TextNote block provides frameless, rich-text on-canvas annotation for documenting block diagram models, equations, operating instructions, and sub
Logic
Evaluates a relational comparison between an incoming input signal and a configurable reference threshold. Supports standard mathematical operators ($
The `EdgeDetect` block monitors an incoming continuous or discrete signal and emits a boolean pulse ($1.0$ or $0.0$) whenever the signal crosses a spe
The IntervalTest block tests whether an incoming scalar input signal $u(t)$ lies within a defined numerical interval $[L, U]$. The boundary limits ($L
The LogicGate block implements standard combinatorial Boolean logic operations across multiple incoming signals. It supports four fundamental operatio
Routes one of two input signals (`in1` or `in2`) to the output terminal based on the evaluation of a control signal on the `selector` port against a c
Math
The LookupTable2D block maps two independent input signals ($x$ and $y$) to an output value $z$ using bilinear or bicubic spline interpolation over a
The Absolute Value block computes the mathematical magnitude (absolute value) $|u(t)|$ of the input signal. The output is always non-negative regardle
The `Divide` block performs algebraic division of two incoming signals: the numerator signal connected to the upper port (`num`) and the denominator s
Multiplies the input signal by a constant scalar gain factor $K$. Serves as the fundamental scaling element in linear dynamical systems, signal proces
The HillEquation block implements the classic sigmoidal $E_{\max}$ pharmacodynamic dose-response model. It describes the non-linear relationship betwe
The LookupTable block implements a one-dimensional lookup table with configurable linear or cubic spline interpolation and extrapolation. It maps an a
The MathFunction block applies a selectable analytical or integer-rounding mathematical operation to the incoming scalar signal $u(t)$. Supported oper
Evaluates and outputs the minimum or maximum scalar value across all connected input signals. Supports multiple simultaneous input connections on a si
Calculates the algebraic product of all connected input signals. Features a multi-wire input terminal (`multiple: true`), enabling an arbitrary number
The SquareRoot block calculates the $n$-th root of an input signal. Although commonly used to compute standard square roots ($n = 2$), the block suppo
The Subtraction block performs algebraic subtraction between two input signals: output = in1 − in2 (minuend minus subtrahend). Multiple connections to
Calculates the algebraic sum of all connected input signals. Features a multi-wire input terminal (`multiple: true`), enabling an arbitrary number of
The Trigonometric block evaluates analytical trigonometric and inverse trigonometric functions on input signals. It provides seven standard functions—
Mechanics
The Angular Velocity Sensor block measures the rotational speed difference between two conserving mechanical flanges and outputs it as a causal contin
The Angular Velocity Source block models an ideal mechanical velocity source maintaining a prescribed angular velocity difference between two conservi
The ForceSensor block measures the through transmitted mechanical force passing between its terminal flanges (`flange_a` and `flange_b`) and outputs i
The ForceSource block models an ideal mechanical force generator in 1D translational networks. It injects a prescribed through-force between its drivi
The Inertia block models a rigid rotating body storing rotational kinetic energy. It represents flywheels, motor rotors, gear wheels, and driveline lo
The Mass block models a rigid 1D body moving with linear velocity and storing kinetic energy. It represents moving carriages, vehicle bodies, elevator
The RackAndPinion block models an electromechanical and mechanical transducer converting rotational motion into linear translational motion and vice v
The Rotational Damper block models a linear viscous rotary damper dissipating rotational mechanical energy into heat. It represents bearing friction,
The Rotational Reference block establishes the absolute stationary reference frame ($\omega = 0\text{ rad/s}$) for a rotational physical network. In a
The Rotational Spring block models a linear elastic torsional spring. It represents flexible coupling elements, torsion bars, elastic shafts, and comp
The Torque Sensor block measures the transmitted mechanical torque flowing through an active rotary shaft branch and outputs it as a causal continuous
The Torque Source block models an ideal mechanical torque generator driving a rotational network. It generates a prescribed torque between two conserv
The TranslationalDamper block models a linear viscous dashpot or shock absorber operating in 1D translational mechanical networks. It dissipates mecha
The TranslationalReference block clamps the velocity of its conserving mechanical terminal (`flange`) to zero meters per second ($v = 0\text{ m/s}$).
The TranslationalSpring block models a linear elastic mechanical spring operating in 1D translational networks. It represents coil springs, suspension
The VelocitySensor block measures the relative or absolute linear velocity between two conserving mechanical flanges and outputs it as a causal contin
The VelocitySource block models an ideal mechanical velocity generator in 1D translational networks. It imposes a prescribed relative linear velocity
Physical Networks
The Capacitor block represents an ideal linear two-terminal capacitor that stores energy in an electrostatic field. The component relates the current
The CurrentSensor block measures the electrical through-current flowing along an active physical branch and converts it into a standard causal numeric
The Ground block establishes the absolute zero-volt reference potential ($0\text{ V}$) for an electrical physical network. In any acausal network solv
The Inductor block models an ideal linear two-terminal electrical inductor that stores energy in a magnetic field. The voltage drop between the positi
The Resistor block models a linear two-terminal electrical resistor governed by Ohm's Law. It provides a constant linear resistance between its positi
The VoltageSensor block measures the electrical potential difference between two conserving electrical nodes and converts it into a standard causal co
The VoltageSource block models an ideal electrical voltage source that maintains a prescribed potential difference between its positive terminal `p` a
Pneumatics
The Pneumatic Atmosphere block establishes the reference potential for the pneumatic network, fixing ambient atmospheric pressure at 101325 Pa (1.0132
The Pneumatic Cylinder is a double-acting cross-domain actuator converting compressed air energy into mechanical translational force and motion. Diffe
The Pneumatic Mass Flow Sensor measures through mass flow rate entering terminal A and exiting terminal B with zero pressure drop. > **Real-World Ana
The Pneumatic Mass Flow Source injects a specified mass flow rate m_dot into the pneumatic network, acting as a Neumann boundary condition. > **Real-
The Pneumatic Orifice models a fixed restriction, throttle nozzle, or constriction adhering strictly to ISO 6358 compressible gas dynamics. > **Real-
The Pneumatic Pipe models an airline, hose, or distribution manifold causing pressure drop and flow resistance according to geometry and fluid frictio
The Pneumatic Pressure Sensor measures differential or absolute pneumatic pressure across terminals A and B without drawing gas mass flow. > **Real-W
The Pneumatic Pressure Source represents a regulated compressor supply, pressure regulator, or air header maintaining a specified pressure difference
The Pneumatic Tank models an air receiver or pressure vessel that stores compressed gas. Mass flow entering the port raises pressure according to the
The Pneumatic Valve represents a proportional or modulating throttle valve. The effective sonic conductance scales with the control signal opening u i
Signal Routing
The `Demux` block splits an incoming vector or bus signal into separate scalar output lines, or distributes a single input signal simultaneously acros
The `From` block is a wireless signal receiver that receives data transmitted by a matching `Goto` block sharing the identical tag identifier. Using
The `Goto` block is a wireless signal transmitter that publishes its incoming signal to all matching `From` blocks sharing the identical tag identifie
The Mux (Multiplexer) block combines multiple scalar input signals into a single multi-dimensional vector signal. It is widely used in control diagram
The Selector block dynamically routes one signal from a set of multiple incoming data channels to a single output port based on a numeric control inde
Sinks
The `FFTScope` block is a real-time frequency spectrum analyzer that performs the Fast Fourier Transform (FFT) on incoming simulation signals. It func
The Gauge block provides an analog semicircular dial instrument with an animated rotating needle on the canvas. It maps the instantaneous value of an
The Histogram block accumulates incoming continuous or discrete signal samples over the course of a simulation run and renders their empirical probabi
The NumericDisplay block provides a real-time digital LCD-style numeric readout for monitoring simulation signals on the canvas. It reads incoming sca
The ScatterPlot block displays the empirical joint distribution of two continuous or discrete signals as a two-dimensional point cloud on the canvas.
The uPlotDisplay block (Scope) provides a hardware-accelerated real-time multi-channel digital oscilloscope directly on the simulation canvas. Built o
The XYPlot block displays the parametric relationship between two real-time scalar signals ($x(t)$ and $y(t)$) in a phase-plane coordinate frame. Unli
Sources
Outputs the current simulation elapsed time $t$ in physical seconds. Acts as an authoritative time source for synthesizing time-dependent waveforms, d
The Constant block is a fundamental signal source that provides a steady numerical output value throughout the entire simulation. It has no input port
The Joystick2D block provides an interactive on-canvas two-axis thumbstick control that allows simultaneous multi-variable steering during live simula
The KeyboardInput block enables real-time manual control of simulation models using standard keyboard inputs (Arrow keys or WASD keys). Clicking the b
The PulseGenerator block generates periodic or bounded square-wave pulse signals with configurable amplitude, period, duty cycle, and phase delay. It
Generates a linearly increasing or decreasing signal starting at a specified simulation time and advancing at a constant slope (rate of change). Unlik
The RandomNumber block generates pseudo-random scalar numbers drawn from either a uniform or a Gaussian (normal) statistical distribution. It is widel
The SignalGenerator block produces standard time-varying periodic waveforms for simulation excitation, dynamic frequency-response characterization, an
The Slider block provides an interactive on-canvas graphical fader control that allows users to adjust signals or project variables live during a simu
Generates a step function (Heaviside step signal) that abruptly transitions from an initial value to a final value at a designated simulation timestam
Subsystems
The `InPort` (Input Port) block establishes an input interface for a `Subsystem` container. It receives signals arriving at the subsystem's external b
The `OutPort` (Output Port) block establishes an output interface for a `Subsystem` container. It collects signals computed by internal blocks and exp
The Subsystem block provides hierarchical encapsulation on the simulation canvas, grouping complex sub-diagrams into compact, modular blocks. It allow
Thermal
The Convection block models Newton's law of cooling between a solid boundary surface and a moving fluid stream (liquid or gas). It acts as an equivale
The Heat Flow Sensor block measures the rate of thermal energy transfer (heat flow $Q$) passing through its branch from port A to port B without intro
The Heat Flow Source block is an ideal through-flow source that injects a prescribed thermal heat flux $\dot{Q}$ into the network from port B to port
The Temperature Sensor block measures the absolute temperature at its conserving thermal port without extracting any thermal energy (ideal zero heat f
The Temperature Source block sets an ideal constant or signal-modulated temperature boundary condition at its thermal port. It serves as an across-var
The Thermal Mass block models lumped thermal energy storage in a physical body. It stores internal energy as heat, governed by its mass and specific h
The Thermal Resistor block models conductive heat transfer between two thermal ports (Fourier's law of thermal conduction in lumped form). It provides