| Simscape™ | ![]() |
Utilities
The Simulink-PS Converter block converts the input Simulink signal into a physical signal. Use this block to connect Simulink sources or other Simulink blocks to the inputs of a Physical Network diagram.
You specify the desired units as the Input signal unit parameter. If you leave the block unitless, with the Input signal unit parameter set to 1, then the physical signal units are inferred from the destination block. The default destination block units are meter-kilogram-second or MKS (SI). If you specify different units, commensurate with the expected default units of the destination block input, then the unit manager attaches these units to the input Simulink signal value and performs the necessary unit conversion when providing the signal to the destination block.
In the diagram below, the Ideal Torque Source block expects a torque signal, in N*m, on its S port. The Constant source block provides the value for this input signal. If you left the Simulink-PS Converter block unitless, the Ideal Torque Source block would generate torque of 1000 N*m. The parameters of other blocks in this example are chosen so that the output value of the Ideal Torque Sensor block is equal to the torque generated by the Ideal Torque Source block, and therefore the Display block would show the value of 1000. If you change the Input signal unit parameter value in the Simulink-PS Converter block to N*cm, the unit manager performs the conversion and the Ideal Torque Source block generates torque of 10 N*m; the torque value in the Display block changes to 10, as shown in the diagram.

Note Currently, physical units are not propagated through the blocks in the Physical Signals library, such as PS Add, PS Gain, and so on. If your diagram contains a Physical Signals block after a Simulink-PS Converter block, the unit specification in the Simulink-PS Converter block does not propagate to the rest of the network. |
In the following example, the PS Gain block is installed after the Simulink-PS Converter block. It stops the unit propagation to the rest of the physical network, and the Ideal Torque Source block will generate torque of 1000 N*m regardless of the Input signal unit parameter setting in the Simulink-PS Converter block.

When the input signal is related to thermodynamic variables and contains units of temperature, you must decide whether affine conversion needs to be applied. For more information, see When to Apply Affine Conversion. Usually, if the input signal represents a relative temperature, that is, a change in temperature, you need to apply linear conversion, ΔTnew = L * ΔTold (the default method). However, if the input signal represents an absolute temperature, you need to apply affine conversion, Tnew = L * Told + O.
For example, in the Simulink-PS Converter block shown in the following diagram, if you type C in the Input signal unit field and select the Apply affine conversion check box, the temperature generated by the Ideal Temperature Source block is equal to 293.15 K. However, if you leave the Apply affine conversion check box clear, the output of the Ideal Temperature Source block is 20 K.

The block dialog box contains two tabs:

Units to be assigned to the physical signal. These units must be commensurate with the expected default units of the destination block input. 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 Working with Physical Units. The default value is 1, which means that the units of the physical signal at the block output match the expected default units of the destination block input.
This check box is applicable only for units that can be converted either with or without an affine offset, such as thermal units. For more information, see Thermal Unit Conversions.

This parameter is applicable only when you use an explicit solver for your model. You can select between two ways of providing time derivatives of the input signals:
No user-input provided derivatives — Provide input derivatives by filtering the input through a low-pass filter. The derivative of the filtered input is then computed by the simulation engine. This is the default method. If you use it, set the appropriate Input filtering time constant parameter value, as described below.
Because input filtering can appreciably change the input signal and drastically affect simulation results if the time constant is too large, a warning is issued when input filtering is used. The warning indicates which Simulink-PS Converter blocks have their input signals filtered. This warning can be turned off (or changed to an error) by changing the preferences on the Simscape pane of the Configuration Parameters dialog box.
First derivative of input user-provided — Provide first derivative of the input signal as an additional input signal to the Simulink-PS Converter block. If you select this option, input filtering is turned off and an additional Simulink input port appears on the Simulink-PS Converter block, to let you connect the signal providing input derivatives.
This parameter is applicable only if the Input derivatives parameter is set to No user-input provided derivatives. It specifies the filter time constant, which controls the filtering of the input signal. The filtered input follows the true input but is smoothed, with a lag on the order of the time constant chosen. You should set the time constant to a value no larger than the smallest time interval of interest in the system. The trade-off in choosing a very small time constant is that the filtered input signal will be closer to the true input signal, at the cost of increasing the stiffness of the system and slowing down the simulation. The default value is .001 s.
The block has one or two Simulink input ports, depending on the Input derivatives parameter value, located on its left side, and a physical signal output port, located on its right side (in the block default orientation).
![]() | Rotational Spring | Solver Configuration | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |