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?
2 Answers
I suggest jupyter notebook or jupyter lab when working with data. These options may help:
1- Using pandas DataFrame:
import pandas as pd
df = pd.read_csv('signal_df.csv')
df
df[['y1', 'y2']].plot()
df[['y1', 'y2']].drop(df.index[290:521]).dropna().plot()
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.
Now you can import the results as a gekko model:
Read more:

- 31
- 4
This functionality is built into the seeq-sysid application. See the notebook -sysid_notebook.ipynb on the github page: Jupyternotebook_example. The app can also be used even if you don't have seeq. Just set the dataframe properties of the app before running, i.e app.capsule_df, signal_df and tags_df. Then refresh the data_editor by running:
app.load_data_editor_action()
app.done_data_editor_action()
In the top left corner of the app you can do some basic data editing. Select "Data Editor" and then you can cut the dataset before fitting the model.
Below is an example

- 55
- 4