Simulation of nonlinear simulation oscillating to infinity

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

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.
A few things to clarify:
  1. the controller is what prevents the system from becoming unstable. If I increase the gain it stabilizes the system.
  2. I am trying to implement a feedforward control that does not require feedback. According to the theory I have (feedforward control based on the property of differential flatness): the system should be stable for the above trajectory.
  3. I have tried less agressive trajectories for the state variables and the system is stable under the feedforward control so I know it is not a problem with the theory
Here are the relevant files. You will need to run the script file before you run the simulink file. You will note that I also implemented a solver in the script file which will show a similar issue to the simulink file.
I tried changing the zero-crossing algorithm but it did not make a difference. I have tried all the available solvers (ode45, ode23, ode113, ode15s, ode23s, ode23t, ode23tb, odeN) and they all have the same problem. I use ode15s because it is the one that will run the longest before the instability occurs.
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?

Sign in to comment.

Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products

Release

R2023b

Asked:

on 9 Sep 2024

Commented:

on 11 Sep 2024

Community Treasure Hunt

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

Start Hunting!