Scicos Block
fr - eng

##
Electrical current sensor

### Contents

- Electrical current sensor
  - Description
  - Default properties
  - Interfacing function
  - Modelica model

### Description

This block is inserted in series in an electrical circuit to measure the current passing through the coponent. The measure is given to the explicit part of the model via an explicit pout. Conventionally, current flowing into the black port is consiered positive. The ohmic resistance of this block is zero.

### Default properties

- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- number/sizes of inputs: 1 / 1
- number/sizes of outputs: 2 / 1 1
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: no
- name of modelica function: CurrentSensor

### Interfacing function

`CurrentSensor.sci`

### Modelica model

     class CurrentSensor
      Pin p;
      Pin n;
      Real i;
     equation
        p.v = n.v;
        p.i = i;
        n.i = -i;
     end CurrentSensor;