Behavioral model of generic pressure transducer that turns pressure measurement into voltage
Simscape / Electrical / Sensors & Transducers
The Pressure Transducer block models a generic pressure transducer that turns a pressure measurement into a voltage. The block lets you measure pressure in a variety of domains. Specify the domain type using the Fluid port type parameter.
The output voltage is linearly proportional to the pressure, and the block outputs zero volts if the pressure is less than zero. An input pressure equal to the Pressure range parameter value results in an output voltage equal to the Full-scale deflection parameter value. For higher pressures, the output voltage remains at this Full-scale deflection value.
You have three choices of operation mode, which let you select between vacuum, atmospheric pressure, or sealed-gauge reference pressure as the reference point for the pressure measurement.
Optionally, if you set the Dynamics parameter to
Model transducer bandwidth, then the dynamics of the
sensor are approximated by a first-order lag. The lag is determined by the
Bandwidth parameter. If you select this option, you must also
specify an initial condition for the lag by using the Measured
pressure variable target.
If running your simulation with a fixed-step solver, or generating code for
hardware-in-the-loop testing, MathWorks recommends that you set the
Dynamics parameter to
No dynamics —
Suitable for HIL, because this avoids the need for a small simulation
time step if the sensor bandwidth is high.
Use the Variables section of the block interface to set the priority and initial target values for the block variables prior to simulation. For more information, see Set Priority and Initial Target for Block Variables.
The Measured pressure variable target specifies the initial output for the sensor.
A— Fluid port
Conserving fluid port for pressure measurement. The port type is defined by the Fluid port type parameter value.
+— Positive terminal
Electrical conserving port associated with the positive terminal.
-— Negative terminal
Electrical conserving port associated with the negative terminal.
Fluid port type— Type of fluid port
Select the fluid port type for pressure measurement:
Pressure range— Maximum pressure
Maximum pressure that the sensor can measure, in Pa.
Operation mode— Reference point for pressure measurement
Select one of the following options to define the reference point for the pressure measurement:
Absolute — The pressure
measurement is with respect to zero absolute pressure, that is,
vacuum. This is the default option.
Gauge — The pressure
measurement is with respect to atmospheric pressure. Atmospheric
pressure is defined by the Gas
Properties block in the Simscape™ Foundation library.
Sealed-Gauge — The pressure
measurement is referenced to an internal sealed chamber. If you
select this option, use the Reference
pressure parameter to specify the reference point
for pressure measurement.
Reference pressure— Reference pressure
Reference pressure in the internal sealed chamber.
This parameter is visible only when you select
Sealed-Gauge for the Operation
Full-scale deflection— Full-scale deflection
Output voltage when the measured pressure is equal to, or greater than, the Pressure range parameter value.
Output resistance— Transducer output resistance
Output resistance of the transducer.
Dynamics— Sensor dynamics option
No dynamics — Suitable for HIL(default) |
Model transducer bandwidth
Select one of the following options for modeling sensor dynamics:
No dynamics — Suitable for
HIL — Do not model sensor dynamics. Use
this option when running your simulation fixed step or
generating code for hardware-in-the-loop testing, because this
avoids the need for a small simulation time step if the sensor
bandwidth is high. This is the default option.
Model transducer bandwidth —
Model sensor dynamics with a first-order lag approximation,
based on the Bandwidth parameter value. You
can control the initial condition for the lag by specifying the
Measured pressure variable target.
Determines the value of the sensor lag.
This parameter is visible only when you select
transducer bandwidth for the
Behavior changed in R2019a
Prior to R2019a, the Pressure Transducer block had a pneumatic measurement port. Pneumatic blocks are no longer part of the Foundation library, but they are included in the Simscape product installation as an example custom library. The legacy Pressure Transducer block, with a pneumatic port, is now part of this custom library.
From R2019a forward, use the Gas library for modeling pneumatic systems, and use the latest version of the Pressure Transducer block with a gas port.