The result of AC current output is abnormal in electric circuit simulation using Simulink
4 次查看(过去 30 天)
显示 更早的评论
I simulated a simple AC circuit containg an AC Voltage Source and a Resistor from Simsacpe library, and using a Current Sensor and a Scope to show the current. The circuit model is as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1254602/image.png)
When I set the Stop Time to be 5 seconds, the result shown in Scope is right which is shown below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1254607/image.png)
However, when I set the Stop Time to be 10 seconds, the result shown in Scope is abnormal which is shown as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1254612/image.png)
How to solve this problem? Thanks very much!
采纳的回答
Sabin
2023-1-26
This appears to be related to how the solver computes the step size. By explicitly setting the ‘Max step size’ in the Configuration Parameters (for example 0.1) would fix the issue.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1274990/image.png)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Simscape Electrical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!