Jump to content
Mr Alfabet

What modeling formalism to use (TDF/LSF/ELN)

Recommended Posts

I'm new to SystemC and AMS, so please forgive me for any stupid questions.

 

I'm trying to get started in SystemC AMS by modeling a heat flow example i came up with. From what I've learned so far by reading the manual is that it's best to use LSF for this purpose. Am I correct in thinking this?

Reason why I think LSF is most suitable:

I want to use ODE to calculate the temperature of objects: dT/dt = c*P - k*(T - Toutside), where c is a constant, P is added heat [Watt], T is temperature of the object and Toutside is the outside temperature. P and Toutside would be signals coming into the module.

Apart from the question of "Is LSF best"; would it be possible to model something like this (with integrators and the like) in TDF? I haven't been able to find any functions in the TDF set that would be able to model this, but I might be wrong.

 

Kind regards,

 

Marijn

 

Share this post


Link to post
Share on other sites

Well, it depends on the context in which you want to use this thermal model, i.e., what kind of other components shall connect to it. Heat flow can be modeled in ELN, LSF, and TDF MoCs:

 

Using ELN, you can build an equivalent electrical network, where the electric potential is equivalent to the temperature and the current to the heat flow (attention: this gives a system where the product of the effort and flow quantities is not the power, as the heat flow is already of dimension power). Resistors model then heat dissipation and capacitors heat storage.

 

Using LSF, you can build the equivalent state space equation describing the heat flow using the provided block diagram primitives as a structural model.

 

Using TDF, you can directly create the state space equation system using an instance of the sca_tdf::sca_ss class as a solver, which is parameterized by matrices of type sca_util::sca_matrix, which provide the coefficients of the ODE and a stimuli vector and state vector of type sca_util::sca_vector.

 

If you already have the ODE and don't require energy conserving interconnections of your thermal model, TDF may be the most straightforward implementation road. However, if you need to interconnect thermal models through heat links to more complex thermal networks, then you should think about doing it with ELN by encapsulating sub-networks of the ELN primitives into SC_MODULEs, which represent your individual elements of your heat flow network. In the latter case, TDF will still play an important role to provide the stimuli to the thermal network.

 

Personally, I would not use the LSF MoC for your application: The expressiveness of the LSF primitives is limited and leads to a relatively cumbersome usage, e.g., requiring you to cascade adders if you want to add up more than two quantities.

 

For more details of using TDF, ELN, and LSF, please confer to the SystemC AMS User's Guide. For specific questions, you can use the forum.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...