Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simulink: How to optimise simulation model for annual simulation?

Status
Not open for further replies.

Regensteiner

Mechanical
Sep 2, 2013
9
0
0
DE
Hi,

I am working with simple energy model composed of a PV, loads and battery.
The model is fed by measured data (sample rate one minute).
The battery model (input AC power set-point, output AC power) was tested separately and it includes a power control algorithm (PI) and max. voltage control. The test of this sub-model was done with a sample rate of one second and it looks OK.
The complete model (all three models) is working fine if the simulation time is not long. If I carry out a annual simulation it took hours.
I have to mention that I have used a discrete solver, with variable steps size.
If I fix the sample time to one minute, and also adjust the sample rate of the two PI controller, the controllers go mad.

Can somebody give some advise?

Cheers,

RS
 
Replies continue below

Recommended for you

Here's one simple approach

I'd keep your clock to 1 hz, then try running it for one 1 2 4 and 8 months, and plotting solve time.


If the solution time is linear with simulation time then you need to make your model faster (you knew that) whereas if it suddnely slows down then you may have a data management problem.

Alternatively have a look at the step size it is using during a run, and see if you can identify the event that is forcing it to go to a tiny step size.

It may be worth adding a big-ass capacitor to smooth loads, since pV systems are integrators the short term behvaior is of little interest. The exception is if you have real load histories ,and lead acids, where peukelt's law imposes a very significant penalty for high current draw.

Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
Status
Not open for further replies.
Back
Top