-
Notifications
You must be signed in to change notification settings - Fork 11
Utility Functions
In addition to the Simulink library, the Campus Energy Modeling project includes several utility functions, summarized in this wiki page. To access detailed documentation for a utility function, execute the command
doc myFunctionat the MATLAB command prompt, where myFunction is the name of the function.
Utility functions source code may be found within several subdirectories of the Library directory of the Campus Energy Modeling project.
The utility subdirectory contains a set of general utility functions for a variety of purposes. Most of these functions are intended for model initialization and automated testing.
| Function | Description |
|---|---|
convertTMY3 |
Convert TMY3 data to useable MATLAB time series objects |
fitLossModel |
Fit a quadratic loss model for a power electronic converter |
fprintf_echo |
Write to file via fprint() and echo to standard out |
freqToTime |
Convert frequency domain spectrum to time domain waveform (Inverse FFT) |
runTestScript |
Run a MATLAB script, capture errors, and log the result |
timeToFreq |
Convert time domain waveform to frequency domain spectrum (FFT) |
toStruct |
Convert a name-value argument list into a MATLAB structure |
The ssc2matlab subdirectory contains functions which extend the MATLAB interface of SSC.
| Function | Description |
|---|---|
importSSC |
Import SSC input variables from text |
runSSC |
Run SSC Module |
The databus2matlab subdirectory contains functions which provide a MATLAB interface to DataBus.
| Function | Description |
|---|---|
importDataBus |
Import time series data from DataBus database |
batchDataBus |
Batch import time series data from DataBus database |
Note: the DataBus database is no longer actively developed within NREL and may not be supported in the future. Therefore, these functions are now deprecated.