Gekko ARX models where data needs cutting

Viewed 23

I am used to using commercial packages for linear model identification. In these packages, a section of the step test data can be marked as bad (e.g. when the unit tripped or was operating abnormally). I have been using the Gekko ARX routine to give training in MPC methods, and now would like to use it to develop models for a project. What should I do to cut the data I do not want the identifier to use?

1 Answers

I suggest jupyter notebook or jupyter lab when working with data. These options may help:

1- Using pandas DataFrame:

Sample Data

import pandas as pd

df = pd.read_csv('signal_df.csv')
df

DataFrame

df[['y1', 'y2']].plot()

sample plot

df[['y1', 'y2']].drop(df.index[290:521]).dropna().plot()

mod data

2- Using SysID App (Based on Gekko):

pip install seeq-sysid

Download the sysid_notebook.ipynb notebook from:

https://github.com/BYU-PRISM/Seeq/tree/main/SysID%20Addon

Run the notebook using Jupyter notebook (AppMode), Jupyter Lab or VSCode.

User Guide

Now you can import the results as a gekko model:

import to gekko

Read more:

https://byu-prism.github.io/Seeq/

Related