Current measurement

The CSR block of the imperix Power library models a current measurement in Simulink and PLECS. It reproduces the measurement bandwidth of the selected imperix sensor, so that a simulated control loop sees the same measurement dynamics as the hardware.

The block supports the CSR-40-HBW high-bandwidth current sensor and the CSR-25-LNO low-noise current sensor (formerly CSR-25-HBW). It also supports the previous-generation DIN50A.

Measurement chain and modeled effects

On real hardware, a current measurement passes through three stages. The sensor converts the measured current into a low-voltage signal. An RJ45 cable carries the analog signal to the controller input, where it is sampled. In the control model, the ADC block converts the sampled value back into amperes using the selected sensor’s sensitivity.

In simulation, the current measurement block represents the first stage. It is inserted in series in the branch whose current is measured and outputs that current, filtered by the measurement bandwidth of the selected sensor. Sampling and quantization are modeled by the ADC block.

The current measurement block does not model noise, offset, sensitivity error, saturation beyond the measurement range, or rejection of switching-node voltage transients.

Measurement bandwidth and modeling levels

The current measurement block represents a sensor either as an ideal measurement or as an ideal measurement followed by a first-order low-pass filter (LPF). The time constant of the LPF follows from the measurement bandwidth:

$$(1) \quad \quad \tau = \frac{1}{2\pi f_{BW}}, \qquad H(s) = \frac{1}{1 + s\tau}$$

where \(f_{BW}\) is the bandwidth in Hz and \(\tau\) the time constant in s.

Ideal models of a current measurement device
Ideal model
First-order LPF models of a current measurement device
1st-order LPF model

As for all imperix products, two modeling levels are available: (A) Simple and (B) Detailed. However, for current sensors, all products are modeled as ideal devices anyway, because their bandwidth exceeds the limits of both the Simple and Detailed modeling levels (4kHz and 100kHz, respectively).

SensorBandwidth setting(A) Simple(B) Detailed
CSR-40-HBW3 MHzIdealIdeal
CSR-40-HBW300 kHzIdealIdeal
CSR-25-LNO1.5 MHzIdealIdeal
CSR-25-LNO150 kHzIdealIdeal
DIN50A200 kHzIdealIdeal
Modeling of the current measurement devices.

Simulink block

Port specification

  • The two electrical ports connect the block in series with the branch whose current is measured.
  • The output i is the measured current through the two electrical ports, in amperes.
CSR Simulink block (SPS
CSR Simulink block (SE)

Parameters

  • Use global configurations: when ticked, the block takes its modeling level from the CONFIG block, so that one setting applies to all blocks of the model. Untick it to give this block its own modeling level, for instance, the Detailed level for one slow measurement only.
  • Modeling level: for now, irrelevant: Both Simple and Detailed levels model every sensor as ideal.
  • Current sensor: selects the modeled sensor. Select the sensor installed on the hardware.
Configuration of a current measurement block in Simulink

PLECS block

Port specification

  • The two electrical ports connect the block in series with the branch whose current is measured.
  • The output i is the measured current through the two electrical ports, in amperes.
DIN50A PLECS block

Parameters

  • Modeling level: for now, irrelevant: Both Simple and Detailed levels model every sensor as ideal.
  • Current sensor: selects the modeled sensor. Select the sensor installed on the hardware.
Configuration of a current measurement block in PLECS

Probe signals

The following signals can be monitored by a Probe block in PLECS.

  • True value [A]: the actual current through the two electrical ports, in amperes.
  • Sensor output [V]: the voltage delivered by the modeled sensor, in volts.
CSR PLECS probe