Documentation

First and Second Generation Libraries

Second-generation technologies introduces blocks that rely on the Simscape physical modeling language. The second-generation libraries contain a matching block for nearly every first-generation block, with few exceptions. To facilitate the transition from first- to second-generation technology, SimDriveline™ provides a transitional block library.

First and Second Generation Block Compatibility

The following considerations distinguish first- and second-generation blocks:

  • First-generation blocks rely on Simscape™ software, but not on the Simscape library. Instead, the blocks exist in an independent library that relies on the Simulink language.

  • Second-generation blocks rely on both Simscape software and library. The blocks exist in a library that reuses Simscape blocks.

  • Second-generation blocks integrate fully with transitional library blocks. You can connect the blocks directly without restriction.

  • First- and second-generation blocks can connect in a model or user-defined library through a Simscape converter block. Two converter blocks exist in the Simscape Utilities library:

    • PS-Simulink Converter—Convert a Simscape signal with physical units to a dimensionless Simulink signal.

    • Simulink-PS Converter—Convert a dimensionless Simulink signal to a Simscape signal with physical units.

  • First- and second-generation blocks can also connect through the first-generationRotational Coupling block. Use the block to connect a first-generation connection line to a mechanical rotational connection line.

  • You cannot automatically convert second-generation models or user-defined libraries to the first-generation format.

First Generation Library

The first-generation block library provides the basis for first-generation models and user-defined libraries. You can continue to access the first-generation library:

  • At the MATLAB command line, enter drivelib or driveline.

For more information on first-generation blocks, see First Generation Block Libraries.

First Generation Block Library

Second Generation Library

The second-generation block library provides the basis for second-generation models and user-defined libraries. The library contains blocks that replicate the functionality of first-generation blocks. New blocks add functionality not present in the first-generation library.

You can access the second-generation product library:

  • At the MATLAB command line, enter sdl_lib.

Second Generation Block Library

Transitional Library

SimDriveline provides a transitional block library. The library provides blocks that are functionally equivalent to first-generation blocks but compatible with second-generation blocks. Transitional library blocks are built on the blocks from the Simscape Foundation and SimDriveline Second Generation libraries.

You can access the transitional library:

Transitional Library

The blocks of the transitional library are built with the Simscape language and their ports are mechanical conserving ports. This library is the bridge between the first- and second-generation products. The conversion function uses the transitional library to generate the second-generation equivalent of a first-generation model. See How the SimDriveline Update Function Works and About Automatically Converted Models.

Correspondence of First and Second Generation Blocks

Equivalent Blocks

The transitional library provides second-generation blocks that are functionally equivalent to first-generation blocks.

Blocks in the first-generation Gears library have exact equivalents in the second-generation Gears library. The Variable Ratio Gear is an exception. This block has no second-generation equivalent or replacement. Second-generation block Variable Ratio Transmission provides similar functionality to

The Rotational Coupling block in the first-generation Interface Elements library behaves as a Simscape physical connection line between two second-generation driveline ports.

Replacement Blocks

    Tip   All transitional blocks can be replaced with functional equivalents using SimDriveline Second Generation and Simscape blocks. For natural and consistent Simscape implementation, MathWorks recommends manual block replacement and model reconstruction where appropriate, after automatic conversion. See Modification and Troubleshooting of Automatically Converted Models.

The following tables provide the relationship between first- and second-generation blocks.

First-Generation BlockSecond-Generation Replacement
Controllable Friction ClutchDisk Friction Clutch
Fundamental Friction ClutchFundamental Friction Clutch
Torque ConverterTorque Converter
Torsional Spring-DamperTorsional Spring-Damper
Diesel EngineGeneric Engine configured to diesel ignition
Gasoline EngineGeneric Engine configured to spark ignition
TireTire (Magic Formula) + related Simscape foundation components

First-Generation BlockSimscape Foundation Replacement
Driveline EnvironmentSolver Configuration
HousingMechanical Rotational Reference
Hard StopRotational Hard Stop
InertiaInertia
Torque SensorIdeal Torque Sensor
Torque ActuatorIdeal Torque Source + Mechanical Rotational Reference
Motion ActuatorIdeal Angular Velocity Source + Mechanical Rotational Reference
Motion SensorIdeal Rotational Motion Sensor + Mechanical Rotational Reference

First Generation BlockSimulink® Replacement
Longitudinal Vehicle DynamicsPure Simulink masked subsystem

Missing Block Parameters

First-generation blocks accept input parameters that have no counterpart in transitional or second-generation blocks. Parameters without counterpart are lost during the conversion. The following table outlines the block parameters that do not carry over from first-generation blocks.

Missing block dialog field or check boxMissing block parameter
Fundamental Friction Clutch Block
Use automatic clutch velocity tolerance for variable-step solversUseAutomaticVelocityTolerance
Use default clutch velocity tolerance from the Driveline Environment blockUseDefaultVelocityTolerance
Driveline Environment Block
Default clutch velocity toleranceDefaultClutchVelocityTolerance
Use automatic clutch velocity tolerance for variable-step solversDefaultUseAutoClutchVelocityTolerance
Fundamental Friction Clutch Block
Use automatic clutch velocity tolerance for variable-step solversUseAutomaticVelocityTolerance
Use default clutch velocity tolerance from the Driveline Environment blockUseDefaultVelocityTolerance
Tire Block
Relaxation length at rated loadsigma_k
Variable Ratio Gear Block
Include Coriolis accelerationCoriolis

Special Transitional Library Blocks

Some first-generation blocks have no functional equivalent in SimDriveline Second Generation or Simscape Foundation libraries. Blocks without the functional equivalents appear in the transitional library as special blocks. Two special blocks exist in the transitional library: Shared Environment and Initial Condition. The two blocks integrate fully with SimDriveline Second Generation and Simscape Foundation blocks. However, unlike the remainder of the transitional library, the blocks but are built directly from neither library. The following table outlines the special blocks present in the transitional library.

First Generation BlockTransitional Library BlockComments
Shared EnvironmentShared Environment
Initial ConditionInitial ConditionThe block parameter is equivalent to the Initial Velocity parameters of the Inertia block in the Simscape Foundation library

Transmission Templates Blocks

The first-generation Transmission Templates library has no functional equivalent in the transitional or second-generation libraries. The library contains masked subsystems built from first-generation blocks that include inertia, gear and clutch elements. If you have a first-generation model with a Transmission Templates block, you can convert the model to a second-generation model. Conversion reproduces the model with the second-generation counterparts of first-generation blocks.

Was this topic helpful?