Exporting data file from DC Sweep Analysis

Discussion on both general simulation and Proteus VSM microcontroller simulation.
Post Reply
agentdynamo
Professional User
Posts: 55
Joined: Tue 2008-01-08 4:48

Exporting data file from DC Sweep Analysis

Post by agentdynamo »

I am having an issue with exported data files from the Advanced Simulation DC Sweep Analysis. Both X and Y scales show as linear in the chart, yet when I export it seems to be converting to some sort of logarithmic sweep. The step size between values is not linear.

I also do not get the correct number of steps in the data file. It is about, but not exactly, half the number of steps selected in the DC Sweep Graph parameters.

Is there something I am missing here?

Running on Proteus 8.13.

DC_Sweep_Analysis_Chart.png
DC_Sweep_Analysis_Chart.png (112.45 KiB) Viewed 3042 times
Edit_DC_Sweep_Graph.png
Edit_DC_Sweep_Graph.png (139.64 KiB) Viewed 3042 times
Partial data imported to Excel, X and IN should be linear steps.
Imported_Data.png
Imported_Data.png (826.83 KiB) Viewed 3042 times
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Exporting data file from DC Sweep Analysis

Post by Ettore »

With no simulation file to see is tricky to advise, however if IN trace is directly related to sweep variable X I would say that law is rather linear but time-steps are not advanced uniformly. This could be the effect of SPICE algorithm that minimizes simulation time. Try to increase the value in No. Steps.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Exporting data file from DC Sweep Analysis

Post by Ettore »

You might also try to decrease the value of Relative error tolerance in SPICE Options, Tolerances tab. The default RELTOL value is 0.001 but you may decrease that value to 1e-05 or even 1e-06. With much less tolerances SPICE will be forced to compute more steps even if many of them are simply redundant. Be aware that decreasing RELTOL might, in same cases, make your simulation not converging.
Kind regards,
Ettore Arena - Labcenter Electronics.
agentdynamo
Professional User
Posts: 55
Joined: Tue 2008-01-08 4:48

Re: Exporting data file from DC Sweep Analysis

Post by agentdynamo »

Ettore,

X=IN which is a linear sweep. I cannot find any way to change the sweep type for DC analysis. Is there a way to do that?

I increased the number of steps to 1000. It improved the export data situation especially at the low values but there is still some variation in the sequential linear values.

Changing RELTOL to 1e-06 had no apparent effect.

I changed steps to 10,000. The results are similar to 1000 steps, just more linear values.

The simulation is a diode breakpoint generator that I am trying to match to ideal values calculated in Excel. I need steady increments in the sweep step size to transfer useful data.

I can send the file privately if that would help with the diagnosis.
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Exporting data file from DC Sweep Analysis

Post by Ettore »

No, you cannot change the sweep type, the sweep analysis is a standard features of Spice engine which Proteus just links to.

In order to reduce the data quantity size the algorithm distributes the steps based on the Tolerances values, which are set in the Spice Options. A number of steps can be skipped if more contiguous results are within the tolerance. For this reason you have to restrict them. I have tested RELTOL=1e-06 with a test file of mine and it seemed to work.

Yes, it wouldn't be a bad idea if I can have a look at your file.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Exporting data file from DC Sweep Analysis

Post by Ettore »

I had a quick look at the Berkeley SPICE code and saw that the property OUTTOL can be overwritten. Usually such a property is assigned by SPICE automatically based on RELTOL tolerance. I have added OUTTOL=1e-18 in the user defined properties area and got 100 points equally spaced as you need. I have sent your file updated by PM.
Kind regards,
Ettore Arena - Labcenter Electronics.
agentdynamo
Professional User
Posts: 55
Joined: Tue 2008-01-08 4:48

Re: Exporting data file from DC Sweep Analysis

Post by agentdynamo »

Ettore,

Yes thanks. That worked to get 100 equal steps in the export DAT file.
Post Reply