Simulation of nonlinear simulation oscillating to infinity
Show older comments
I am simulating a wind turbine with a flexible drivetrain in simulink. I am using a two mass model to model the oscillations on the drivetrain.

Whenever I run a simulation with a smooth change in the power output of the turbine it ends up oscillating and the simulation quits with the error message:
"Solver encountered an error while simulating model 'WecsNoConverter' at time 47.9683593447728 and cannot continue. Please check the model for errors.
Nonlinear iteration is not converging with step size reduced to hmin (1.70418E-13) at time 47.9684. Try reducing the minimum step size and/or relax the relative error tolerance."

I am using ode15s as the solver. I have tried relaxing the relative error tolerance but it appears to make no difference. Enabling shape preservation makes no difference. Decreasing the max order increases the lenght of time before the system oscillates to infinity. The results above are with a max order of 1. Any max order of 2-4 makes results in the above behaviour happening sooner. I have tried other solvers but ode15s gives me the best results
One thing which fixes the simulation is to increase the damping term on the two mass model. Which results in the smooth output as shown below. However, this means the model is not accurate to the original turbine, so this is not an option.

Are there any other options I can try to get the simulation to run the full length of time?
4 Comments
Shivam Gothi
on 10 Sep 2024
I can see that your model has a controller, which might be the cause for unstability of the system. Can you please share your simulink model so that I can reproduce the issue and suggest some possible work-around?
Alternatively, you can also try below given approaches:
- Open "model configuration". Change the solver type and choose a variable step and non-stiff solver. Use "zero-crossing" algorithm as "Adaptive" instead of "Nonadaptive".
- Retune your controller. Try to reduce the gains so that it is stable irrespective of the value of "damping factor" of the plant.
Brendan Calef
on 10 Sep 2024
Edited: Brendan Calef
on 10 Sep 2024
Brendan Calef
on 10 Sep 2024
Shivam Gothi
on 11 Sep 2024
I tried to run the "rotor_sim.m" file. But it is throwing an error saying: "Cp is not defined". Therefore, some variables in the simulink model are also not defined, causing the compilation error in simulation.
can you please verify the "rotor_sim.m" file and share the corrected once?
Answers (0)
Categories
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!