Simscape is used to optimize system-level performance and to create plant models for control design. The models you create support your entire development process, including hardware-in-the-loop simulations.
With Simscape, you build a model of a system just as you would assemble a physical system. Simscape employs a physical network approach, also referred to as acausal modeling, to model building: Components (blocks) corresponding to physical elements, such as pumps, motors, and op-amps, are joined by lines corresponding to the physical connections that transmit power. This approach lets you describe the physical structure of a system rather than the underlying mathematics. From your model, which closely resembles a schematic, Simscape automatically constructs the differential algebraic equations (DAEs) that characterize the system’s behavior. These equations are integrated with the rest of the Simulink model, and the DAEs are solved directly. The variables for the components in the different physical domains are solved simultaneously, avoiding problems with algebraic loops.
Simscape lets you create models of custom components by using the basic elements contained in its foundation libraries.
Simscape provides mechanical building blocks for representing one-dimensional translational and rotational motion. In addition to basic elements like mass, spring, and damper, nonlinear effects such as backlash and friction are also included. Interface blocks provided with SimMechanics™ and SimDriveline™ enable you to connect Simscape models to models built using those tools.
Simscape provides electrical building blocks for representing electrical components and circuits. In addition to basic elements like resistors, capacitors, and inductors, more complex elements such as op-amps and transformers are also included. More elaborate electronic and electromechanical components are available in SimElectronics™.
Simscape provides hydraulic building blocks that model fundamental hydraulic effects and can be combined to create more complex hydraulic components. These blocks define the pressure/flow relationship for basic physical effects, such as fluid compressibility, fluid inertia, mechanical friction, energy transduction, and flow through basic fixed and variable orifices. You can define a fluid by entering its fluid properties. More elaborate hydraulic components are available in SimHydraulics®.
Simscape provides thermal building blocks for modeling and simulating thermal effects in your system. You can model conductive, convective, and radiative heat transfer as well as the thermal mass of elements. Using thermal source blocks, you can specify the temperature or heat transfer; using thermal sensor blocks, you can measure the amount of heat transfer or temperature change.
With Simscape your models can include physical signals that have units associated with them. You specify the units and parameter values in the block dialog boxes, and Simscape performs the necessary unit-conversion operations when solving a physical network. The Physical Signals block library lets you perform math operations on physical signals and graphically enter equations inside the physical network. Physical signal ports are used in Simscape block diagrams to better integrate physical signals into your physical system, which increases computational speed.
Using the elements contained in these foundation libraries, you can create more complex components that span different physical domains. As with Simulink, you can then group this assembly of blocks into a subsystem and parameterize it to reuse and share these components.
You can use the sensor blocks in Simscape to measure values for different physical quantities such as mechanical (force/torque, velocity), hydraulic (pressure, flow rate), or electrical (voltage, current) variables, and then pass these signals into standard Simulink blocks. Source blocks enable Simulink signals to assign values to any of these variables. Sensor and source blocks let you connect a control algorithm developed in Simulink to a Simscape network.
The Simscape language enables you to add new physical domains and to create your own physical modeling components and libraries. It is based on the MATLAB programming language, well-known by engineers. Using this object-oriented modeling language, you can define custom components, complete with parameterization, physical connections, and equations represented as acausal implicit DAEs. You can also use MATLAB to analyze the parameter values, perform preliminary computations, and initialize system variables. The Simulink block and dialog box for the component are automatically created from the Simscape file.
The components you create can reuse the physical domain definitions provided with Simscape to ensure that your components are compatible with the standard Simscape components. You can also add your own physical domains. You can automatically build and manage Simulink libraries of your Simscape components and domains, enabling you to share these models across your organization. You can also generate C code from Simulink models that contain your custom components.
Using the Simscape language, you can control exactly which effects are captured in the models of your physical components. This approach enables you to balance the tradeoff between model fidelity and simulation speed.
The Simscape Editing Modes let you perform physical modeling and simulation using Simscape and its add-on products: SimDriveline, SimElectronics, SimHydraulics, SimMechanics, and SimPowerSystems. You can open, simulate, tune parameters for, and save models that contain blocks from add-on products with only a Simscape license, as long as the add-on products are installed on your machine. You can share your models across your organization without purchasing additional licenses.
Learn more about working in Restricted mode in Simscape.
Sharing Models Using Simscape Editing Mode Share models without requiring licenses for Simscape™ add-on libraries. Open models in Restricted Mode and perform tasks such as simulation, parameter tests, and code generation.
With Simscape you can convert your models into C code, enabling you to use the accelerator modes of Simulink to reduce simulation time. You can also convert Simscape models into C code using Simulink Coder™, which lets you:
Configuring your models to run in real time enables you to use hardware-in-the-loop testing instead of expensive prototypes to test your system. You can find mistakes earlier in the development process, reducing costs and shortening the design cycle.
Simscape provides expanded capabilities for modeling physical systems. You can create your physical plant model using physical connections and connect it directly to your control model built using signal flows in Simulink. Simscape models can also be connected directly to other MathWorks application- and domain-specific physical modeling tools, enabling you to model complex interactions in multidomain physical systems.
You can use MATLAB to parameterize your model, automate simulation tests, analyze output data, and optimize system performance. As a result, you can test your entire system (multidomain physical plant and controller) within the MATLAB and Simulink environment.