- Posts: 13
- Thank you received: 0
How to troubleshoot model convergence
2 years 2 months ago #526
by gdierick
How to troubleshoot model convergence was created by gdierick
Hi,
I'm working on a model for wastewater flows in a textile factory.
It has measurement data for flows, COD, non biodegradable COD and total nitrogen (TN).
I find it hard to troubleshoot convergence issues with the model.
Please see the attachment:
When only calculating individual layers (e.g. flow and COD) convergence is OK.
If I turn on all 4 layers for calculation, it won't converge (exceeds 100 steps).
The Trace Output does not give me any clues on where it is struggling to converge. Only saying: "calculation canceled after 100 iterations". The more detailed text messages are very cryptic and I can't see any warning or error there.
If I change the convergence tolerance in Calculation dialog to a large value like 5, the model does converge, fairly rapidly so.
On first inspection, most of the reconciled values are pretty good.
The Trace output however, now throws a large number of gross errors. Looking at those, most don't look to be gross errors. They have k-factors well below one.
My questions:
- how do the calculation settings influence convergence? (convergence tolerance, tolerance zero values and observable tolerance)
- is there extra info under the hood that can help in troubleshooting non convergence (pointing towards likely causes)?
- why are results with low k-factors flagged as gross errors?
Best regards,
Geert
I'm working on a model for wastewater flows in a textile factory.
It has measurement data for flows, COD, non biodegradable COD and total nitrogen (TN).
I find it hard to troubleshoot convergence issues with the model.
Please see the attachment:
When only calculating individual layers (e.g. flow and COD) convergence is OK.
If I turn on all 4 layers for calculation, it won't converge (exceeds 100 steps).
The Trace Output does not give me any clues on where it is struggling to converge. Only saying: "calculation canceled after 100 iterations". The more detailed text messages are very cryptic and I can't see any warning or error there.
If I change the convergence tolerance in Calculation dialog to a large value like 5, the model does converge, fairly rapidly so.
On first inspection, most of the reconciled values are pretty good.
The Trace output however, now throws a large number of gross errors. Looking at those, most don't look to be gross errors. They have k-factors well below one.
My questions:
- how do the calculation settings influence convergence? (convergence tolerance, tolerance zero values and observable tolerance)
- is there extra info under the hood that can help in troubleshooting non convergence (pointing towards likely causes)?
- why are results with low k-factors flagged as gross errors?
Best regards,
Geert
Please Log in or Create an account to join the conversation.
2 years 3 weeks ago #527
by adminST
Replied by adminST on topic How to troubleshoot model convergence
First of all, sorry for the late reply!
I agree with you that troubleshooting convergence issues is a tricky task. My advantage is that I have also the commercial computation algorithm IAL-IMPL2013 installed on my computer which is much more robust than Cencic2012 and thus converges more often.
Find attached the results of this computation. I am pretty sure it will help you to find some possible data issues. Unfortunately, in IAL-IMPL2013 no gross error detection routine is implemented. So, you have to check how much the reconciled values deviate from the input data on your own (by using e.g. the data button).
To tackle convergence problems, I recommend running computations with the layer of goods and one additionally selected substance layer only and see if any gross errors are detected (as is the case in your model). If you resolve the cause of the gross errors for each of these substance layers separately, it is much more likely that the computation of the complete model is also successful.
I agree with you that troubleshooting convergence issues is a tricky task. My advantage is that I have also the commercial computation algorithm IAL-IMPL2013 installed on my computer which is much more robust than Cencic2012 and thus converges more often.
Find attached the results of this computation. I am pretty sure it will help you to find some possible data issues. Unfortunately, in IAL-IMPL2013 no gross error detection routine is implemented. So, you have to check how much the reconciled values deviate from the input data on your own (by using e.g. the data button).
To tackle convergence problems, I recommend running computations with the layer of goods and one additionally selected substance layer only and see if any gross errors are detected (as is the case in your model). If you resolve the cause of the gross errors for each of these substance layers separately, it is much more likely that the computation of the complete model is also successful.
Please Log in or Create an account to join the conversation.
2 years 3 weeks ago #528
by gdierick
Replied by gdierick on topic How to troubleshoot model convergence
Hi adminST,
Thank you for reaching out.
I understand that the commercial Cencic2012 engine is more powerful.
Does it also come with more features and settings to pinpoint gross errors?
Regarding the standard engine:
- how do its calculation settings influence convergence (convergence tolerance, tolerance zero values and observable tolerance) ?;
- why are results with low k-factors flagged as gross errors?
Best regards,
Geert
Thank you for reaching out.
I understand that the commercial Cencic2012 engine is more powerful.
Does it also come with more features and settings to pinpoint gross errors?
Regarding the standard engine:
- how do its calculation settings influence convergence (convergence tolerance, tolerance zero values and observable tolerance) ?;
- why are results with low k-factors flagged as gross errors?
Best regards,
Geert
Please Log in or Create an account to join the conversation.
2 years 3 weeks ago #529
by adminST
Replied by adminST on topic How to troubleshoot model convergence
The commercial version is IAL-IMPL2013 (it is sold by Industrial Algorithms)! Unfortunately, it has less gross error detection features than Cencic 2012, but it is much faster and more computational robust.
To influence convergence, it is only necessary to change the convergence tolerance. The other 2 options were included for testing reasons only.
Which k-factors are you referring to?
Not always the flows that are adjusted the most are the reason for gross errors. See the example in our video tutorial "Handling Errors (2)", starting at 15:00:
tube1.it.tuwien.ac.at/w/ciehSS1UTnwQJBtDmLb9qt?start=15m
To influence convergence, it is only necessary to change the convergence tolerance. The other 2 options were included for testing reasons only.
Which k-factors are you referring to?
Not always the flows that are adjusted the most are the reason for gross errors. See the example in our video tutorial "Handling Errors (2)", starting at 15:00:
tube1.it.tuwien.ac.at/w/ciehSS1UTnwQJBtDmLb9qt?start=15m
Please Log in or Create an account to join the conversation.
2 years 3 weeks ago #530
by gdierick
Replied by gdierick on topic How to troubleshoot model convergence
Sorry for the mistake about the commercial engine.
Concerning the gross errors flagged with small k-factors:
Attached again the model with wastewater flows from textile factory, .
Calculation settings (as is):
- layers: goods (debiet) and COD;
- engine: Cencic 2012;
- convergence tolerances: standard (10e-5)
If I calculate the model, Stan flags 8 gross errors, all in the COD layer.
Attached the manually calculated k-factors for these flagged erros, .
k-factor formula used: abs(input value - calculated value) / input tolerance.
Only two flows with fairly large k-factors: 0,99 and 1,5.
All other flows have rather small k-factors, with several < 0,1.
Why are these flagged to 'likely to contain gross errors' ?
Regards,
Geert
Concerning the gross errors flagged with small k-factors:
Attached again the model with wastewater flows from textile factory, .
Calculation settings (as is):
- layers: goods (debiet) and COD;
- engine: Cencic 2012;
- convergence tolerances: standard (10e-5)
If I calculate the model, Stan flags 8 gross errors, all in the COD layer.
Attached the manually calculated k-factors for these flagged erros, .
k-factor formula used: abs(input value - calculated value) / input tolerance.
Only two flows with fairly large k-factors: 0,99 and 1,5.
All other flows have rather small k-factors, with several < 0,1.
Why are these flagged to 'likely to contain gross errors' ?
Regards,
Geert
Please Log in or Create an account to join the conversation.
2 years 3 weeks ago - 2 years 3 weeks ago #531
by adminST
Replied by adminST on topic How to troubleshoot model convergence
As already mentioned in the last message, not always the flows that are adjusted the most are the reason for gross errors. In the video tutorial example the k-value for Flow 5 would be 0.0168 and still it is the flow that causes the problems.
Last edit: 2 years 3 weeks ago by adminST.
Please Log in or Create an account to join the conversation.
Time to create page: 0.228 seconds