The result of AC current output is abnormal in electric circuit simulation using Simulink

12 次查看(过去 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:
When I set the Stop Time to be 5 seconds, the result shown in Scope is right which is shown below:
However, when I set the Stop Time to be 10 seconds, the result shown in Scope is abnormal which is shown as follows:
How to solve this problem? Thanks very much!
  3 个评论
zhaoyun wu
zhaoyun wu 2023-1-12
I use another model which was attached to demonstrate the problem I met. The electric circuit is as follows:
This composed of an AC voltage source and a capacitor. Besides, the current and voltage of the capacitor is simulated and shown by the scope. The parameters of the voltage source and capacitor is listed below:
the parameter of the voltage source
the parameter of the capacitor
When the stop time was set to be 0.2, 1, 3, 5, 11 seconds, the outputs of scope is right which are shown below.
But when the stop time was set to be 2, 4, 10 seconds, the outputs of the scope were wrong, which are as follows:
This problem is very weird, I don't know how to solve it.
The version of mathlab I am using is R2021b (academic version).

请先登录,再进行评论。

采纳的回答

Sabin
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Switches and Breakers 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by