Menu

(301) OpenDSS: You must create a new object first:

Beginners
2018-08-02
2018-08-03
  • Vishal Verma

    Vishal Verma - 2018-08-02

    Dear all,
    I was trying to interface OpenDSS with MATLAB. I see that many users faced same error message. I tried to do what others have suggested like using '.' between new and circuit name, and making sure that file is saved in ANSI.
    Please help me with what I'm doing wrong, here's my code.
    clc;
    clear all;
    close all;
    DSSObj=actxserver('OpenDSSEngine.DSS');
    if ~DSSObj.Start(0),
    disp('Unable to start the OpenDSS Engine');
    return
    end
    DSSText=DSSObj.Text;
    DSSCircuit=DSSObj.ActiveCircuit;
    %%Above command is to interface MATLAB with OPENDSS
    DSSText.Command='Compile(C:\Users\Pathh\IEEE13Nodeckt.DSS)';
    DSSText.Command='Set mode=snap';
    DSSText.Command='solve'; % to solve
    %DSSText.Command='Show Losses';
    %DSSText.Command='Show Power';
    %DSSText.Command='Show voltages';
    And then I copied pasted IEEE13Nodeckt file( I did this because I thought that file I wrote might have some problem):
    Clear
    Set DefaultBaseFrequency=60

    !
    ! This script is based on a script developed by Tennessee Tech Univ students
    ! Tyler Patton, Jon Wood, and David Woods, April 2009
    !

    new circuit.IEEE13Nodeckt
    ~ basekv=115 pu=1.0001 phases=3 bus1=SourceBus
    ~ Angle=30 ! advance angle 30 deg so result agree with published angle
    ~ MVAsc3=20000 MVASC1=21000 ! stiffen the source to approximate inf source
    %%%%%% and continued

     

    Last edit: Vishal Verma 2018-08-03
  • Vishal Verma

    Vishal Verma - 2018-08-02

    Before that my file was:
    clear

    new circuit.IEEE_4 phase=3 BASEkV=11 bus1=SourceBus MVASC1=5000000 MVASC3=5000000
    ! Define the circuit elements
    Redirect Lines.DSS
    ! Rediercted lines file to Master file
    Redirect loads.DSS

    ! Let the openDSS estimate the voltage bases

    solve maxcontrol=100
    Set Voltagebases=[11]

    set controlmode=static

    Calcvoltagebases

     
  • Vishal Verma

    Vishal Verma - 2018-08-03

    Thanks Davis, one of the example worked 'MiscExample.m'. Let me work on why others are showing error. Thanks.

     

Log in to post a comment.

MongoDB Logo MongoDB