PS Constant
R2026bGenerate constant physical signal
PS Constant block

To add a block to a model, double-click the canvas and start typing the block name. Then, select the block from the list.
Libraries:
Simscape /
Foundation Library /
Physical Signals /
Sources
Description
The PS Constant block generates a physical signal of a constant value. You specify the value and unit of the signal as the Constant parameter.
Examples
Nonlinear Inductor
An implementation of a nonlinear inductor where inductance depends on current. A tanh function defines the nonlinear flux-current relationship. The flux saturates for large currents, which can occur, for example, in iron core inductors.
Two-Phase Fluid Refrigeration
Models a vapor-compression refrigeration cycle using two-phase fluid components. The compressor drives the R-134a refrigerant through a condenser, an expansion valve, and an evaporator. The hot gas leaving the compressor condenses in the condenser via heat transfer to the environment. The pressure drops as the refrigerant passes through the expansion valve. The drop in pressure lowers the saturation temperature of the refrigerant. This enables it to boil in the evaporator as it absorbs heat from the refrigerator compartment. The refrigerant then returns to the compressor to repeat the cycle. The controller turns the compressor on and off to maintain the refrigerator compartment temperature within a band around the desired temperature.
Ports
Output
Output physical signal. The signal value and unit are determined by the value and unit of the Constant parameter.
The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.
Programmatic Use
Port:
O
Parameters
The value and unit of the output signal at port O. The first edit box represents the signal value. You can specify both positive and negative values.
The second combo box represents the unit of the output signal. By default, the unit
is 1 (unitless). You can select a unit from the drop-down list or
type the desired unit name, such as rpm, or a valid expression, such
as rad/s. For more information and a list of unit abbreviations, see
How to Specify Units in Block Dialogs
and Unit Definitions.
Programmatic Use
Parameter:
constant
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2007bStarting in R2026a, the block icon displays the Constant parameter value.
Prior to R2019a, this block did not propagate physical units.
If your model contains legacy blocks without unit propagation, use the Upgrade Advisor to upgrade your blocks to the latest version. For more information, see Upgrading Models with Legacy Physical Signal Blocks.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)

