Unit Manager

09.03.2021

The value of a (measurement) quantity is expressed as a product of a number and unit. FlexPro features a Unit Manager that handles direct import, analysis and presentation of these types of quantities. The customizable Unit Manager in FlexPro is based on the SI unit system and includes the following features:

Compatibility check and automatic adjustment when calculating quantities of different units.

Percentage calculation with % and ppm units.

Ability to select output unit separately for display of quantities in diagrams and tables.

Support for additional popular unit systems (Gaussian unit system, US unit system).

Open system architecture in relation to unknown units.

Manual and automated unit correction during import.

Ability to define and use custom units.

Support for the ISO 80000 standard International System of Quantities (ISQ).

The SI Unit System

The International System of Units, "Système International d'Unités" (SI) was introduced in 1960 and is the most widely used unit system for physical quantities. It is managed and internationally standardized by the International Bureau of Weights and Measures, "Bureau International des Poids et Mesures" (BIPM).

The unit system defines seven base units through physical measuring methods:

Base unit

Symbol

Base quantity

Symbol

Dimension symbol

Meter

m

Length

l, x, r, etc.

L

Kilogram

kg

Mass

m

M

Second

s

Time

t

T

Ampere

A

Electric current

I, i

I

Kelvin

K

Temperature

T

Θ

Mole

mol

Amount of substance

n

N

Candela

cd

Luminous intensity

Iv

J

 

Additional coherent SI units are derived exclusively from these base units. The coherent SI unit of electrical resistance, the ohm with the unit symbol Ω, is, for instance, uniquely defined by the relation Ω = m2 kg s-3 A-2, which follows directly from the definition of the physical quantity. Coherent in this context means that no factors other than one occur in the product of powers.

For some of these derived units, special names and symbols, such as Pascal (Pa), are in turn used; others are assembled from the existing names and symbols, such as the Newton meter (N m). The notation of the symbols is case sensitive. Symbols derived from a proper name start with a capital letter, such as Newton (N) or Pascal (P). Symbols where this is not the case are written in lower-case, e.g. second (s).

Some measurement quantities span several orders of magnitude. To avoid extra large or small numeric values when displayed, you can place an SI prefix in front of the unit symbol. A unit defined this way, however, is no longer coherent, since the prefix introduces a factor that is not equal to one. Each SI prefix corresponds to a particular power of 10, so for instance the millimeter (mm) is equal to 10-3 m, or the kilovolt (kV) is equal to 10+3 V.

The appearance of a unit as a product of powers of the base units defines the SI dimension of the respective quantity. This SI dimension is important when checking units for compatibility. Compatible, i.e. interconvertible units, such as km/h and m/s, always have the same SI dimension, as in the example M1 T-1. The reverse is unfortunately not the case, i.e. units of different kind can have the same SI dimension. A familiar example of this are the units Newton meter (N m) for rotational speed and joule (J) for energy. Both have the dimension L1 M1 T-2.

Some derived quantities, in particular quantities defined as ratios of quantities of the same kind, have an SI dimension in which all exponents are equal to zero. The product of powers is thus equal to one, and therefore these quantities are denoted as from the dimension one or as dimensionless.

The exponents of the base units usually are whole numbers in the range from ±4. In certain cases, however, fractions may also appear as exponents. Therefore, this results in rational exponents, for instance, when some Gaussian unit system units are displayed in SI base units.

Calculating and Converting Quantities

When making calculations with quantities, you need to account for more than just their numeric values. Thus, for instance, 1 N + 400 mN neither results in 401 N nor in 401 mN, but instead results in 1.4 N. Even the statement 1 N > 400 mN would provide an incorrect result if purely accounting for the numeric values. Other operations are physically useless and should therefore be recognized as such, e.g. 1 V + 1 A. On the other hand, for other calculations a new unit appears for the result, e.g. 6 m / 2 s = 3 m/s or 5 m ^ 2 = 25 m². The unit in which the data is output should also be independent of the unit in which it was acquired, e.g. a speed may be measured in m/s, but output in km/h. The FlexPro Unit Manager covers all of these scenarios. All FPScript mathematical operators as well as all built-in analysis functions not only account for the values of quantities, but also their unit, consisting of the SI dimension, factor, offset and unit symbol. FlexPro is able to compare units prior to calculation, determine the correct unit for the result of a calculation, recognize nonsensical operations, i.e. incompatible units, and transform units for output.

Unit Types

FlexPro makes a distinction between units with known and unknown SI dimensions. Units with an unknown SI dimension cannot be transformed, which means in particular that when using addition and subtraction as well as comparable operations, the units of both operands must match exactly. Multiplication, division and exponentiation, however, can be used without this limitation, and the symbol of the resulting unit is also formed correctly. The FPScript Debugger displays units with an unknown SI dimension in quotation marks, e.g. "people/h".

Expandable Unit Collections

FlexPro supports a basic set of units from which you can derive new units through multiplication, division and exponentiation. In addition, you can also use unit collections for the US unit system, the Gaussian unit system and a set of other popular non-SI units, which you can enable as another option.

You can expand on this set of units by registering your own custom units and specifying their SI dimensions. FlexPro manages a unit table in the current project database, in the personal template database, in the global template database and in a number of shared template databases, the locations of which you can specify on the Unit Tables tab of the FlexPro Organizer dialog box. You and your colleagues can store units that you want to share in shared template databases. The unit tables contained within are read by FlexPro when the program is launched.

You can also add units with unknown SI dimensions to the unit tables. This will ensure that FlexPro does not convert the unit or calculate it with other units.

When translating a unit, FlexPro first searches through the unit tables in the order mentioned above and attempts to find an exact match. If no entry is found, the unit is being decomposed into its element. For elements that are not recognized as SI unit symbols, FlexPro searches through the tables again.

Example: FlexPro first searches through the unit tables for the entire unit "Vrms A". If this cannot be found, it will be decomposed into the elements "A" and "Vrms". "A" is the known SI unit Ampere and is accepted as such. "Vrms" is not known to FlexPro, which is why FlexPro searches through the tables again to find it. If an entry is found, the symbol is accepted. The SI dimension specified in the entry is then multiplied with the SI dimension of "A". Otherwise, the entire unit "Vrms A" is viewed as an unknown unit.

Unit Monitoring Modes

You can configure one of the following unit monitoring modes for each project database:

None
FPScript ignores all units and performs calculations with numeric values only. Some analysis objects determine the unit of the result using the units entered in the header data of the arguments. In this mode, FPScript is compatible with the previous versions of FlexPro up to version 8.

Tolerant (preset for new project databases)
FPScript performs calculations with quantities, i.e. values with a unit, adjusts units to each other during processing, and checks units for compatibility before processing. When output to diagrams, curves of an axis are set to the same unit before being displayed. This mode also permits units whose SI dimension is unknown to FlexPro. These types of units must match exactly when processing two data sets. In addition, in this mode, compound units without spaces or multiplication signs between the element units are permitted, such as "Nm" instead of correctly as "N m" or "N·m".

Moderate
Specifies the Tolerant setting with the limitation that compound units without spaces or multiplication signs between the element units are not permitted.

Strict
Specifies the Moderate setting with the additional limitation that units whose SI dimension is unknown to FlexPro are not permitted.

Note: The default setting for newly created project databases is set on the Unit Manager tab of the FlexPro Options dialog box. You can configure the setting for the open project database on the tab of the same name in the project database Properties dialog box.

Physical Quantities

The ISO 80000 series of standards define a large number of physical quantities and their SI units from different domains. FlexPro provides you with assistance when entering a unit and physical quantity for a data set. When you specify a unit, only the physical quantities compatible with this unit are displayed in the physical quantity list box. Conversely, when you choose a physical quantity, only the units compatible with this physical quantity are displayed in the unit list box.

Note: You can specify which domains FlexPro should include on the Unit Manager tab of the FlexPro Options dialog box.

Unit Correction during Data Import

Many measurement systems either do not store the physical unit in the data files at all or they store it in an incorrect notation. A typical mistake, for instance, is to use the symbol S instead of the correct symbol s for the Second unit. In the SI unit system, "S" stands for the unit "Siemens", which is used for conductance. Other examples include RPM instead of 1/min, grdC instead of °C, sec instead of s, and so on. Often, they do not even distinguish between the unit name and symbol, as in the case of VOLT or Volts instead of V, for instance.

This is why FlexPro can provide you with a list of all units found in the data as you start importing it so that you can review and correct them as necessary. During this process, you can add your corrections to a correction table so that FlexPro can make these corrections automatically during subsequent imports.

FlexPro manages a unit table in the current project database, in the personal template database, in the global template database and in a number of shared template databases, the locations of which you can specify on the Unit Tables tab of the FlexPro Organizer dialog box. You and your colleagues can store units that you want to share in shared template databases. The unit tables contained within are read by FlexPro when the program is launched. For automatic unit correction, FlexPro uses the correction tables in the order mentioned above.

Internal Representation of Units

To calculate quantities accurately and convert them into other units, FlexPro stores the following additional quantity attributes in addition to the numeric value(s).

The unit symbol as a string,

The denominator and numerator of the exponents of the seven SI base units,

A factor, which comprises all prefixes used in the symbol or represents the factor between the existing unit and SI base unit (e.g. 1 min = 60 s), and

An offset, which represents a distance between the unit within the quantity and the respective SI base unit (e.g. 1 °C = (1 + 273,15) K).

FlexPro can use this data to convert a quantity from the existing unit into a compatible SI unit:

with

The inverse operation can be used to convert a quantity in the SI unit to another unit with a known SI dimension. Both steps together result in the following formula for converting a quantity from one unit to another:

In addition, FlexPro can check units for compatibility prior to calculation. Units are considered compatible if their SI dimensions match. This check is not 100% foolproof (the Newton meter and joule units, for instance, have the same SI dimension), but it catches the majority of errors.

You can obtain the two vectors with the denominators and numerators of the seven exponents as well as the factor and offset of a unit in FlexPro using the SIUnits function. The expression SIUnits(1 km/h) provides, for instance, a list with the following four elements:

Scale = 0.277777777777778

Offset = 0

ExpNum = {1, 0, -1, 0, 0, 0, 0 }

ExpDenom = {1, 0, 1, 0, 0, 0, 0 }

The 1 km/h expressed in SI base units is 1000 m / 3600 s = 0.277777777777778 m1/1 s-1/1.

For non-existing base units, the exponential numerator is equal to zero. The upshot is that for a dimensionless unit, all exponential numerators are always equal to zero. In this case, the exponential denominator is interpreted by FlexPro in a special format in order to distinguish between dimensionless units of varying types. The unit of the solid angle, the steradian (sr), for instance, has the following exponents:

ExpNum = {0, 0, 0, 0, 0, 0, 0 }

ExpDenom = {2, 0, 0, 0, 0, 0, 0 }

These are interpreted as m²/m². Similarly, the unit of the angle, the radian (rad), provides the following exponents, which are interpreted as m/m:

ExpNum = {0, 0, 0, 0, 0, 0, 0 }

ExpDenom = {1, 0, 0, 0, 0, 0, 0 }

Since FlexPro compares the denominator and numerator for compatibility when comparing two units, it recognizes that the operation 1 rad + 1 sr is not permitted, even though both have the same SI dimension.

References

Bureau International des Poids et Mesures (2008). The International System of Units, 8th Edition. http://www.bipm.org/en/si/si_brochure/

ISO 80000 standards 1 through 13.

See Also

Supported Units

Unit Prefixes

Quantities in FPScript

Template Databases

Working with the Unit Manager

Setting Up the Unit Manager

Changing Data Object Units

Checking Imported Units

Registering Custom Units

Organizing Units

Share article or send as email:

You might be interested in these articles