Simscape Electrical基础
快捷键
Ctrl+L 快速定位模块在库中位置;
Ctrl+R 模块右转
Ctrl+Shift+R 模块左转
空白处双击,搜索模块名/添加Annotation
Specialized Power Systems
一般需要powergui block或solver configuration;
使用sum block叠加多个信号,如给输入加特定频率谐波;
use the Controlled Voltage Source block to inject a voltage in an electrical circuit;
电压源和电容不能直接串联,应串入小电阻;电流源和电感不能直接并联,并入大电阻。
measure the impedance versus frequency
命令画伯德图如何控制对数坐标还是普通坐标??AC Current Source注入小信号幅值为什么是0?这个文档写的很差。
freq=0:5000;
w=2*pi*freq;
bode(sys1(1,2),w);
powergui中可以设置仿真变量初值,为0、稳态或任意给定值。
About Electrical Modeling and Simulation
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 the Simscape > Electrical > Specialized Power Systems > Fundamental Blocks > Interface Elements library to interface between them;
4. 如ssc_new中展示的,使用PS-Simulink Converter和Simulink-PS Converter进行信号转换。
————————————————————
命令访问simscape模块库
- simscapepowersystems_ST
- ee_lib
————————————————————
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. The ode23t solver 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 the ode14x or ode1be solvers. 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.
电力电子例子