Create Custom Components and Libraries
Learn how to create custom Simscape™ Electrical™ blocks.
Featured Examples
Custom Inductor (B-H Curve)
A comparison in behavior of a linear and nonlinear inductor. Starting with fundamental parameter values, the parameters for linear and nonlinear representations are derived. These parameters are then used in a Simscape™ model and the simulation outputs compared.
Custom Transformer (B-H Curve)
Calculation and confirmation of a nonlinear transformer core magnetization characteristic. Starting with fundamental parameter values, the core characteristic is derived. This is then used in a Simscape™ model of an example test circuit which can be used to plot the core magnetization characteristic on an oscilloscope. Model outputs are then compared to the known values.
Digital Potentiometer Parameterized from Datasheet
How to model a digital potentiometer such as is used to control audio amplifiers from a digital circuit or microprocessor-controlled system. The model also shows how you can create your own custom blocks in order to extend the Simscape™ Electrical™ library.
Electrical Transformer with Hysteresis
Model a custom transformer that exhibits hysteresis by using the Non Linear Reluctance block in a magnetic circuit. The transformer is rated for a 50W load and steps down from 120V to 12V rms. The magnetizing resistance Rm is modeled in the magnetic domain using an Eddy Loss block.
Frequency-Dependent Transmission Line
A custom frequency-dependent transmission line model. The characteristic admittance and propagation function are first derived from the frequency-dependent resistance, reactance, and susceptance. The derived values are fitted using RF Toolbox. The Universal Line Model (ULM) [1] is then implemented in Simscape based on the fitted parameters. The results from the frequency-dependent transmission line model and the classic pi-section transmission line model are compared.
Three-Phase Custom PMSM
A custom Simscape™ implementation of a Permanent Magnet Synchronous Machine (PMSM). To view the PMSM source code, double-click on the motor block and then click on the hyperlink 'Source code'. This test circuit shows the PMSM being used as a generator, the rectifier block converting the induced AC back EMFs to a DC voltage which is in turn applied to a resistive load.
Three-Phase Custom Simplified Synchronous Machine
How simplify the custom Simscape™ synchronous machine model.
Three-Phase Custom Synchronous Machine
A custom Simscape™ implementation of a Synchronous Machine (SM). To view the SM source code, double-click on the Synchronous Machine block and then click on the hyperlink 'Source code'.
Three-Phase Custom Zigzag Transformer
Two different ways to create a custom transformer component. The first uses built-in library blocks to lay out the magnetic circuit as a masked Simulink® subsystem. The second builds a custom Simscape™ component using the Simscape language.
Velocity Control of Four-Phase PMSM with Open-End Winding
Control the rotor angular velocity in an electrical-traction drive that uses a four-phase permanent magnet synchronous machine (PMSM) with an open-end winding. To view the source code of the Open-End PMSM (Four-Phase) block, double-click the block and then click the 'Source code' hyperlink in the Description tab. A DC voltage source feeds the PMSM through two controlled four-phase converters. The PMSM operates in both motoring and generating modes according to the load. An ideal torque source provides the load. The Scopes subsystem contains scopes that allow you to see the simulation results. The Control subsystem includes a PI-based cascade control structure that has an outer angular-velocity-control loop and four inner current-control loops. During the one second simulation, the angular velocity demand is 0 rpm, 500 rpm, 2000 rpm, and then 3000 rpm.
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)