Gain

Multiply an input by an adjustable gain.

  • signal
  • Gradara equations
  • 2 ports
  • 1 parameter
BlockGainKindgainLibraryMath

Description

Multiplies its input by a constant. Use it for fixed scaling, unit conversion, and proportional control.

The block has no state and passes changes straight through.

Example

Math functions Gain, absolute value, square root, sign, negation, and power of a sine; sine and cosine of time.

u = 2 sin(πt/2)Gain 0.5|u|√|u|sign(u)−uu²Timesin(t)cos(t)
In Gradara, select a Gain block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:Sine waveClockAbsSignSqrtSinCosUnary minusPower

Ports

Inputs 1

  • inu

    Input signal.

Outputs 1

  • outy

    Output signal, k · u.

Parameters

  • Gaink1

    The constant factor. Any real number; a negative gain inverts the signal.

Equations

Modelica
y = k · u

Implementation

The block’s Modelica model
y = k*u;

Assumptions and limitations

  • The gain is fixed during a run. For a gain that changes, multiply by a signal with Product.

Used in

These larger examples use it too. Open them from Examples in the app.

  • Data center cooling control
  • 480 VAC → 24 VDC flyback
  • PMSM · Field-oriented control

See also

Select a block in Gradara and press F1 to open its page offline.