Optocoupler
Behavioral model of optocoupler as LED, current sensor, and controlled current source
Libraries:
Simscape /
Electrical /
Semiconductors & Converters
Description
This block represents an optocoupler using a model that consists of the following components:
An exponential light-emitting diode in series with a current sensor on the input side
A controlled current source on the output side
The output-side current flows from the collector junction to the emitter junction. It has a value of CTR·Id, where CTR is the Current transfer ratio parameter value and Id is the diode current.
Use the Optocoupler block to interface two electrical circuits without making a direct electrical connection. A common reason for doing this is that the two circuits work at very different voltage levels.
Note
Each electrical circuit must have its own Electrical Reference block.
If the output circuit is a phototransistor, typical values for the Current transfer ratio parameter are 0.1 to 0.5. If the output stage consists of a Darlington pair, the parameter value can be much higher than this. The Current transfer ratio value also varies with the light-emitting diode current, but this effect is not modeled by the Photodiode block.
Some manufacturers provide a maximum data rate for optocouplers. In practice, the maximum data rate depends on the following factors:
The capacitance of the photodiode and the type of the driving circuit
The construction of the phototransistor and its associated capacitance
The Optocoupler block only lets you define the capacitance on the light-emitting diode. You can use the Junction capacitance parameter to add your own capacitance across the collector and emitter connections.
The Optocoupler block lets you model temperature dependence of the underlying diode. For details, see the Diode reference page.
Thermal Port
You can expose the thermal port to model the effects of generated heat and device temperature. To expose the thermal port, set the Modeling option parameter to either:
No thermal port
— The block does not contain a thermal port and does not simulate heat generation in the device.Show thermal port
— The block contains a thermal port that allows you to model the heat that conduction losses generate. For numerical efficiency, the thermal state does not affect the electrical behavior of the block.
For more information on using thermal ports and on the Thermal Port parameters, see Simulating Thermal Effects in Semiconductors.
Variables
To set the priority and initial target values for the block variables before simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.
Use nominal values to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. Nominal values can come from different sources. One of these sources is the Nominal Values section in the block dialog box or Property Inspector. For more information, see System Scaling by Nominal Values.
Examples
Assumptions and Limitations
The output side is modeled as a controlled current source. As such, it only correctly approximates a bipolar transistor operating in its normal active region. To create a more detailed model, connect the Optocoupler output directly to the base of an NPN Bipolar Transistor block, and set the parameters to maintain a correct overall value for the current transfer ratio. If you need to connect optocouplers in series, use this approach to avoid the invalid topology of two current sources in series.
The temperature dependence of the forward current transfer ratio is not modeled. Typically the temperature dependence of this parameter is much less than that of the optical diode I-V characteristic.
You may need to use nonzero ohmic resistance and junction capacitance values to prevent numerical simulation issues, but the simulation may run faster with these values set to zero.
Ports
Conserving
Parameters
References
[1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling with SPICE. 2nd Edition, McGraw-Hill, 1993.
[2] H. Ahmed and P.J. Spreadbury. Analogue and digital electronics for engineers. 2nd Edition, Cambridge University Press, 1984.
Extended Capabilities
Version History
Introduced in R2008a