Process Integration and Design Optimization

Process Integration and Design Optimization

Maxwell & Matlab integration with Optislang in electric generator optimization

    • Wenqin Song
      Subscriber

      Hello all, 

      I am doing an electric machine optimization using both Maxwell and Optislang, I have already set up Maxwell parametric solver in Optislang. But I need to add a Matlab script into the workflow so that Matlab could calculate an output variable for me that Maxwell itself could not achieve. I am trying to let Matlab run fft from the output csv file directly from Maxwell. This is how the workflow looks like:

      Basically I want this Matlab node to read the csv file from the simulation result on Maxwell. The quantity I am trying to calculate in Matlab is the Total Harmonic Distortion (THD) of the stator voltage waveform obtained from Fourier analysis, and register it as a reponse used for further work (sensitivity analysis) . Here is the Matlab code: 

      I have a local function called "spectrum_THD" defined in the same script, and this code is able to run in Matlab with the csv file(phase_B_stator_voltage) ready in the Matlab directory. However, when I add the Matlab solver wizard into the workflow, the THD expression is not written in full by Optislang and it is in string variable type, so I could not register THD as a response in the integration panel. 

      I am guessing it has something to do with Matlab reading the csv files from Maxwell in Optislang environment. Another thing is it might has something to do with outputting Maxwell reponses to Matlab in csv format. I haven't figure out how exactly Matlab and Maxwell communicate with each other in Optislang. What I can do to fix this issue? 

       

Viewing 0 reply threads
  • You must be logged in to reply to this topic.