Current sensor

Measures branch current with zero series voltage drop; positive from + to −.

  • signal
  • electrical
  • Modelica Standard Library
  • 3 ports
BlockCurrent sensorKindcurrentSensorLibraryElectrical

Description

Measures the current in a branch and outputs it as a signal. Place it in series; it has no voltage drop.

Example

RC and RL transients A 10 V step charges a capacitor through a resistor, and another builds current in an inductor through a conductor.

Step 10 VR 1 kΩC 100 µFCapacitor voltageGroundStep 10 V (RL)G 0.1 SInductor currentL 1 HGround (RL)
In Gradara, select a Current sensor block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:GroundResistorCapacitorInductorConductorStep voltageVoltage sensor

Ports

Outputs 1

  • iy

    Measured current, in amperes. Positive when current flows from p to n through the sensor.

Conserving terminals 2

  • +p

    Pin where the measured current enters.

  • −n

    Pin where the measured current leaves.

Equations

Modelica
y = p.i
p.v = n.v
p.i + n.i = 0

Implementation

Modelica Standard Library 4.1.0Modelica.Electrical.Analog.Sensors.CurrentSensor
MSL documentation

Assumptions and limitations

  • Ideal: zero resistance, no bandwidth limit or noise.

Tips

  • If the reading has the wrong sign, swap p and n.

Used in

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

  • Buck converter · Ideal switches
  • Motor speed control
  • EV drivetrain
  • 480 VAC → 24 VDC flyback
  • Servo position control

See also

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