3

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 Answers2

3

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/

Mohd.Reza
  • 31
  • 4
1

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.

Seeq_dataeditor

Below is an example

enter image description here