Emre
Junior Member
Offline
Posts: 10
|
Thank you both for your suggestions.
Giving tolerance didn't help, but Ken's suggestion on defining Freq as a node was a very clever solution and it solved the main problem. I didn't get any more complains about dynmic quantities' access to output by giving freq directly to the output. At same time, I used freq internally for the rest of calculations and I could use any function, as Freq is a node.
For clipping, I used the style that Geoffrey suggested and it works the best. The only problem is initial value of I(out) is always Imin, because result of ddt() is 0 in the begining. But this time, my feedback loop can recover.
If there is any other way to get rid of that initial zero, which is not the "real" value, it's always welcome. I didn't understand, how transition function can be used for that purpose effectively.
Using electrical also solved the other problem, but this time when I connected a capacitor in series with the resistor, to realize the filter, the simulator had problems in finding the dc operating point, as there is no dc path to the ground. I connected a resistance to ground to solve the problem, but I didn't like this solution, because it alters the voltage at that node and additon to the filter. If there is a more sophisticated solution that you can come up, I would like to hear it.
Emre
|