Simscape Electrical基础
快捷键
- Ctrl+L 快速定位模块在库中位置;
- Ctrl+R 模块右转
- Ctrl+Shift+R 模块左转
- 空白处双击,搜索模块名/添加Annotation
Specialized Power Systems
Build and Simulate a Simple Circuit
Build a simple circuit using Simscape Electrical Specialized Power Systems blocks and connect it to other Simulink blocks.
- 一般需要
powergui block或solver configuration; - 使用
sum block叠加多个信号,如给输入加特定频率谐波; - use the Controlled Voltage Source block to inject a voltage in an electrical circuit;
- 电压源和电容不能直接串联,应串入小电阻;电流源和电感不能直接并联,并入大电阻。
Analyze a Simple Circuit
Use the Powergui block to analyze static and frequency-domain response.
- measure the impedance versus frequency
- 命令画伯德图如何控制对数坐标还是普通坐标??AC Current Source注入小信号幅值为什么是0?这个文档写的很差。
freq=0:5000;
w=2*pi*freq;
bode(sys1(1,2),w);
Specify Initial Conditions
Specify initial conditions for state variables using the Simscape Electrical Specialized Power Systems powergui block.
-
powergui中可以设置仿真变量初值,为0、稳态或任意给定值。
About Electrical Modeling and Simulation
-
Simscape Electrical Block Libraries
Use the Simscape Electrical block libraries to model and analyze electronics, mechatronics, and electrical power systems.You can connect Specialized Power Systems blocks to Simulink blocks either:
1. Directly, through Simulink signal input and output ports;
2. Through measurement blocks from the Measurements sublibrary of the Fundamental Blocks library. 如ssc_new_elec中包含的controlled voltage source和voltage sensor;
3. use blocks from theSimscape > Electrical > Specialized Power Systems > Fundamental Blocks > Interface Elements libraryto interface between them;
4. 如ssc_new中展示的,使用PS-Simulink Converter和Simulink-PS Converter进行信号转换。
————————————————————
命令访问simscape模块库
-simscapepowersystems_ST
-ee_lib
————————————————————
-
Modeling Analog Circuit Architectures, Mechatronic Systems, and Electrical Power Systems Using Simscape Electrical
Model mechatronic systems, analog circuit architectures, and single and multi-phase electrical power systems that you can connect to networks in other Simscape domains. -
Per-Unit System of Units
Use the per-unit (pu) system to simplify electrical power system simulation calculations and analysis.
-
Simulating an Electronic, Mechatronic, or Electrical Power System
-
solver
de23t and ode15s, are recommended for most applications because they run faster and work better for systems with a range of both fast and slow dynamics. Theode23tsolver is closest to the solver that SPICE traditionally uses;
To use Simulink® Coder™ software to generate standalone C or C++ code from your model, you must use theode14xorode1besolvers. For more information about code generation, see Code Generation (Simscape). -
errors
为开关增加电阻和结电容来避免不稳定震荡。example:>> Astable Oscillator ;
Read Troubleshooting Simulation Errors (Simscape) to learn about general troubleshooting techniques.
注意不要丢失参考信号,如Ground,see Grounding Rules.
-
solver