heisba Posted November 27, 2013 Report Share Posted November 27, 2013 Hi everyone, I have been working with SystemC-AMS lately and having nice results, but now I'm facing some issues with the sca_eln::sca_tdf::sca_vsink module. I created some sc_modules with ELN modules inside. Quite briefly, the final electrical network (which I get from putting those sc_modules together) that I have been having problems with is: ELN: node_ref -> vsource -> node -> vsink -> node -> r -> node -> vsink -> node -> r -> node_ref SC :|-----GENERATOR-----|->|-----------PIPE-----------|->|----------PIPE------------| -> |---SINK---| If understood correctly the sca_eln::sca_tdf::sca_isink module is like a voltage source with v = 0 V, so they should not be connected in parallel. I do not know if the vsink works in a similar way, being a current source, so there should not be two connected in a row. Taking a look at the Users guide it is noted for both modules that "No equation added to the equation system", so I'm not sure if this is a conflict because of what I just mentioned. The error I'm getting is: Error: SystemC-AMS: Initialization equation system failed in sca_linear_solver_0: 1 the error is in the following net (max. 50): g1.vsource p1.vsink p1.r1 p2.vsink p2.r1The error is may be near: p1.sca_eln_node_1 and p2.sca_eln_node_0 I would like to know the reason why this is not working, if anyone happen to find any The idea of having vsink's there is because I want to send the value from the electrical network in that spot to a TDF module. I'm not sure if this is ok or is a crazy idea. I hope I explained everything clearly, otherwise, just ask and I'll try to do it better Thanks a lot! Kike Quote Link to comment Share on other sites More sharing options...
karsten Posted November 27, 2013 Report Share Posted November 27, 2013 Hello Kike, the vsink has no influence on the network - it simple takes the voltages (the difference) from the connected nodes and convert them to a tdf signal. So the vsink is an open - in opposite to the isink, which is a short cut. I'm afraid that you used the vsink like the isink - on this way your resistors will be floated (not connected / no path to a reference node). Thus the solver cannot calculate a voltage to the reference node. If I'm wrong, please send me the netlist (SystemC-AMS description) of the network. best regards Karsten maehne 1 Quote Link to comment Share on other sites More sharing options...
heisba Posted November 27, 2013 Author Report Share Posted November 27, 2013 Hi Karsten, Thanks for the answer. I may not be using the vsink in a proper way (maybe like isink). As I noted in the previous post, the sequence of my resultant electrical network is this: node_ref -> vsource -> node -> vsink -> node -> r -> node -> vsink -> node -> r -> node_ref Info: SystemC-AMS: 9 SystemC-AMS modules instantiated 2 SystemC-AMS views created 5 SystemC-AMS synchronization objects/solvers instantiatedInfo: SystemC-AMS: 1 dataflow clusters instantiated cluster 0: 5 dataflow modules/solver, contains e.g. module: sca_linear_solver_0 containing modules (max. 5 printed): g1.vsource p1.vsink p1.r1 p2.vsink p2.r1 5 elements in schedule list, 100 ms cluster period, ratio to lowest: 1 e.g. module: sca_linear_solver_0 ratio to highest: 1 sample time e.g. module: sca_linear_solver_0 0 connections to SystemC de, 0 connections from SystemC deInfo: SystemC-AMS: ELN solver instance: sca_linear_solver_0 (cluster 0) has 7 equations for 5 modules (e.g. g1.source), 2 inputs and 2 outputs to other (TDF) SystemC-AMS domains, 0 inputs and 0 outputs to SystemC de. 100 ms initial time stepError: SystemC-AMS: Initialization equation system failed in sca_linear_solver_0: 1 the error is in the following net (max. 50): g1.vsource p1.vsink p1.r1 p2.vsink p2.r1The error is may be near: p1.sca_eln_node_1 and p2.sca_eln_node_0 If I'm doing it wrong, what should be the proper way to use a vsink and a resistor? Do I have to use a Reference Node instead of a simple node? Thank you again Quote Link to comment Share on other sites More sharing options...
heisba Posted November 27, 2013 Author Report Share Posted November 27, 2013 Ok, setting the vsink's in parallell with the resistors it works when it comes to the basic ELN. But in the configuration with my sc_modules: node_ref -> vsource -> node -> r -> node -> r -> node_ref |-> vsink ->| |-> vsink ->| I have the following error: Error: SystemC-AMS: Reinitialization failed in sca_linear_solver_0: 1 during reinitialization equation system at 0 s (dt = 0.1). the error is in the following net (max. 50): g1.vsource p1.vsink p1.r1 p2.vsink p2.r1Parameters of the following modules changed for the current time step: p1.r1 changed to 0 p2.r1 changed to 0The error is may be near: p2.r1In file: /home/guest/Build/systemc-ams_1.0_patched/src/scams/impl/solver/linear/sca_linear_solver.cpp:367In process: sca_implementation_0.cluster_process_0 @ 0 sSystemC: simulation stopped by user. I'm still not sure why Quote Link to comment Share on other sites More sharing options...
heisba Posted November 27, 2013 Author Report Share Posted November 27, 2013 I found out that is some kind of loop that I am creating in my module, among the ELN's and TDF's. Setting the vsink in parallel works fine. Quote Link to comment Share on other sites More sharing options...
maehne Posted November 29, 2013 Report Share Posted November 29, 2013 Think of isinks and vsinks as current meters and voltage meters. Like in reality, you have to connect them, respectively, in series to the branch, in which you want to measure the current, in parallel to the branch, across which you want to measure the voltage. So in your case, you have to connect the vsinks in parallel to the resistors. The reinitialization of your equation system error likely stems from the fact that you chose a resistance value of zero (i.e., you short circuited two nodes) for both resistors. In consequence, the current through the voltage source cannot be determined by the solver of the ELN MoC. heisba 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.