Gain Block
Multiplies input signal by a constant gain factor
Open Gain in BlockWerk →# Gain Block
Description
The Gain block multiplies its input signal by a constant gain factor (K). This is one of the most fundamental and commonly used blocks in signal processing and control systems. It provides simple scaling of signals without changing their fundamental characteristics.
The block has one input port and one output port, making it straightforward to integrate into signal chains. Common applications include proportional gain in controllers, signal amplification, and unit conversion.
Mathematical Model
The Gain block implements a simple multiplication operation:
output(t) = K × input(t)
Where:
output(t)is the output signal at time tKis the gain factor (configurable parameter)input(t)is the input signal at time t
Parameters
gain
The multiplication factor applied to the input signal.
Examples
Signal Inversion
Invert a sine wave signal:
SignalGenerator → Gain (gain: -1) → Scope
Signal Amplification
Double the output of a sensor:
Sensor → Gain (gain: 2) → NumericDisplay
Remarks
- No Internal State: Pure function with no memory - output depends only on current input.
- Linear Operation: Does not introduce distortion or harmonics.
- Computation Cost: Minimal - single multiplication operation per simulation step.
- WASM Powered: Near-native execution speed in the browser.
See Also
- Sum: Add multiple signals together
- Constant: Provide fixed values for gain scaling
- NumericDisplay: View the result in real-time