Menu

simulation and measurements questions

Help
2014-11-14
2014-11-21
  • Lionel Bally

    Lionel Bally - 2014-11-14

    Hello,
    I am a new user of DSSim and several questions are coming to my mind as I am testing your soft. I have tested OpenDSS before and appreciate this graphical interface.
    The first question is about the simulation. In OpenDSS, you can choose between 'duty', 'daily' or 'yearly' simulation mode : how is this defined in DSSim ? In the 'select the type of simulation' I would choose 'Time based', but then I don't know in which mode run the simulation ?

    Another question about editing part of the code directly in the .dss file. If it is more convenient to modify something directly in the .dss file, is it possible to keep the change while using again DSSim ?

    How can I create energymeter, monitor, plot or voltage profile ('plot profile') with DSSim as in OpenDSS ?

    Thank you in advance for your help,

    Lionel Bally

     
  • Davis Montenegro

    Hi,

    Thanks for your interest in DSSim-PC. This software was conceived for RT-HIL purposes at the beginning, but since one year ago we have decided to release the PC version and ofcourse, many characteristics cannot be addressed directly using the GUI. But we have included some flexible modes that can help you for configuring the OpenDSSEngine from your customized application.
    In these cases I recommend to use the "remote controlled simulation" mode, this way, you will be able to send commands directly to the OpenDSSEngine from an external app. With this mode you can get the measurements directly to your app or use the graphical reports included in DSSim-PC in the menu "Results manager".

    Please let me know about your experience with DSSim-PC, your experience is important for improving this tool and make it more suitable for your simulation needs.

    Regards

    Davis

     
  • Lionel Bally

    Lionel Bally - 2014-11-17

    Is there some information on how to use the "remote controlled simulation" mode ?
    I found some commands here, but I'd like some help to use this function.
    Regards,

    Lionel

     
  • Davis Montenegro

    Hi,

    Yes, you can find the tutorial video in the following link:

    https://sourceforge.net/projects/dssimpc/files/Tutorials/

    If you have any other question please don't hesitate to keep writing in this post.

    Regards

    Davis

     
  • Lionel Bally

    Lionel Bally - 2014-11-18

    Hello. I have tested the remote controlled simulation mode with MATLAB and it raised some questions.

    I was able to run a simulation by running a loop in MATLAB :
    for i=1:number_of_time_step
    DSSim_TCP('Step_in');
    end
    And with time-step and simulation duration defined in the DSSim-PC GUI.

    But I'd like to know if (and how) it is possible to define the time step size and the simulation duration directly in MATLAB and then to run a simulation accordingly ? Moreover, as loop are slow in MATLAB, is it possible to send a command "solve" to DSSim-PC in order it run the whole simulation with only one TCP call ?

    The idea I have is to run a code like below (but this one doesn't provide desired results).

    DSSim_TCP('Init');
    DSSim_TCP('Command','Set stepsize= 60');%in seconds
    DSSim_TCP('Command','Set number=1440');%1 day simulation

    for i=1:1440
    DSSim_TCP('Step_in'); or DSSim_TCP('Command','solve');
    end

    DSSim_TCP('End_Sim');
    DSSim_TCP('Close');

    Regards,

    Lionel

     
  • Davis Montenegro

    Hi,

    When you define the parameter number, it means that on each iteration (solve command) the simulator is going to solve the number ot times equal to the number parameter. When you start the "remote controlled simulation" mode, the simulation mode is "Time" (OpenDSS). Try the following script:

    DSSim_TCP('Init');
    DSSim_TCP('Command','Set stepsize= 60');%in seconds
    DSSim_TCP('Command','Set number=1440');%1 day simulation

    DSSim_TCP('Command','solve');

    DSSim_TCP('End_Sim');
    DSSim_TCP('Close');

    Please tell me how it works

    Regards

    Davis

     
  • Lionel Bally

    Lionel Bally - 2014-11-21

    It doesn't work. I mean if I initialize a "remote controlled simulation - Time" with default values of step time, # of iterations, final time, and # of days, 1 min for saving measurements and I then select "voltages (p.u.) in Nodes" to record, and finally run the above lines in MATLAB, here is what happens :
    after less than one second (the desired simulation is around 2-3 seconds on my machine), I get the message "Simulation finished by a remote client" in DSSim.
    And nothing has been recorded (nor simulated I assume).
    It seems that the command
    DSSim_TCP('End_Sim');
    makes the simulation stops when it just started.
    But even adding a
    pause(3)
    in between 'solve' and 'end_sim' doesn't solve the problem.
    do you have any idea ?

    Lionel

     
  • Davis Montenegro

    Hi Lionel,

    OK now I got it. Sometimes this kind of behavior is because a lack of sync between DSSim-PC and the external software. Some users normally ask for the actual time before command a new step in remotely. Try using the following steps:

    1. Start the remote controlled simulation
    2. Define the step time as 1 min and the total days in 1
    3. Set the time for saving measurements in 1 min
    4. Select the measurements that you want to save
    5. Start the simulation
    6. Run the follwoing code in MATLAB:

      DSSim_TCP('Init');
      for i=1:1440
      DSSim_TCP('Step_in');
      pause(0.02);
      end
      DSSim_TCP('End_Sim');
      DSSim_TCP('Close');

    7. Select the "Export Results" menu in DSSim-PC

    8. Export your measurements to a CSV file.

    Please let me know if that's what you need

    Regards

    Davis

     

    Last edit: Davis Montenegro 2014-11-21

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.