Simulink Model Discretization Instability

7 次查看(过去 30 天)
Hi,
I developped a continuous model of a synchronous generator. In a particular simulation, I have initially no speed and no load on the generator. Then, I inject mechanical power to the generator in order to reach nominal speed and finally synchronize the generator on an electrical grid that is modelled by a RL load.
In the continuous domain, it works well if I use the correct solver which is ode-45 in my case. I discretized my model manually by replacing all the integrator by discrete integrators (follow yellow blocks in the joined models). The sampling time is 50 us which should be more then sufficient. As long as the generator is not coupled to the RL load, the discrete model looks exactly the same as the continuous model but as soon as I couple it, everything falls in instability (Nan). If I run my continuous model with different solver, I have the same instability.
I'm pretty sure that my discrete model instability has something to do with the 1/z blocks I had to put to break algebraic loops.
Intuitively, I would have put a "Memory" block in my continuous model so the RL load feedbacks is delayed before being read by the my generator but the simulation do not require it to run. Even worse, if I put the "Memory" block, I get the same instability that I have in my discrete model. In this discrete model, I have no choice but to put a 1/z so I'm in some kind of catch-22.
I tried to find the source of the error by opening feedback loops in the model but couldn't figure out the origin of the problem. Is there any good practice I could perform on my discrete problem to troubleshoot?
Please find my two models and their shared initialization in joined piece.
Thank you!

回答(1 个)

Alexandre
Alexandre 2020-10-14
I figured it out looking at other community answer. By putting a lowpass filter on the feedback looping from the RL load to the generator with a time constant twice the sampling time of my discrete model, the instability problem is completely fixed!
I would appreciate some theoritical explanation though.
Thank you.

类别

Help CenterFile Exchange 中查找有关 General Applications 的更多信息

产品


版本

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by