-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARX model not identified #29
Comments
Dear tikull, Your use of the program seems appropriate, the model definition seems ok, Here below some observations and some questions to investigate your problem:
Please send us your example file; we will run and test and try to give you a better help. The SIPPY Team |
Dear Team SIPPY, `# -- coding: utf-8 -- @author: Giuseppe Armenise, revised by RBdC """ from past.utils import old_div Checking path to access other filestry:
import numpy as np SISO systemgenerating transfer functions in z-operator#var_list = [0.001, 0.002, 0.02] #Test Resistor and Capacitor network, subscript s stands for serial and p #RC network as a system under test, and its Laplace domain transfer num = [1/Rs, 1/(CpRpRs)] SISO transfer functions (G and H)SUT = cnt.tf(num, den) #H_sample1 = cnt.tf(H1, den, ts) timetfin = 0.02 #INPUT# Adding noise#err_inputH = np.zeros((4, npts)) #err_outputH = np.ones((3, npts)) Noise-free outputYout1, Time, Xsim = cnt.lsim(g_sample11, Usim, Time) Total output#Ytot1 = Yout1 + err_outputH1 #Ytot = Ytot1.squeeze() identification parametersna = 1 na_ord = [na] IDENTIFICATION STAGE#identification with gekko #m = GEKKO() mode = 'FIXED' if mode == 'IC': elif mode == 'FIXED': output of the identified modelYout_ARX = Id_ARX.Yid.T #Generate Fast fourier transform of the identified data object #Datf = cnt.fft(ID_ARX) import matplotlib.pyplot as plt plt.close('all') #plt.close('all') plt.show() |
Dear tikull, We managed to run your example and reproduce your results. We are now investigating the problem in depth, searching for eventual issues in our core codes. |
Dear Team SIPPY, Best |
Dear tikull, We examined your problem in details.
s + 1e06 Note that, when it is turned into discrete time domain, you should pay attention to the sampling time. after identification via SIPPY, we obtain: which can be considered a good estimate for the parameters, we have a small bug in the general codes (actually revealed only by your specific system dynamics). |
Dear CPCLAB-UNIPI team,
I have started using SIPPY as the python version of system identification for my Thesis. I am implementing it on raspberry pi. In the beginning, I implemented a small discrete-time linear system in MATLAB, and also identified (with 99.94% match) with ARX model of the order [1 2 0].
My system (g_sample11) looks as below,
(0.001 z - 0.001)/ ( z - 0.006738)
Now, I am again trying to identify the same system with SIPPY with below function,
Id_ARX = system_identification(Yout1, Usim, 'ARX', IC ='AIC', tsample = ts, na_ord = [1, 1], nb_ord = [2, 2], delays = [0, 0], ARX_mod = 'LLS')
and
Id_ARX = system_identification(Yout1, Usim, 'ARX', tsample = ts, ARX_orders = [na_ord, nb_ord, theta], ARX_mod = 'RLLS')
where, identification parameters are,
na = 1
nb = 2
th = 0
na_ord = [na]
nb_ord = [[nb]]
nc_ord = [nc]
theta = [[th]]
ts = 5e-6
tfin = 0.02
npts = int(old_div(tfin, ts)) + 1
Time = np.linspace(0, tfin, npts)
I am providing the input signal as, [Usim,,] = fset.GBN_seq(npts, 0.08, Range = [-5, 5]), and output signal as,
Yout1, Time, Xsim = cnt.lsim(g_sample11, Usim, Time). Also, I have checked the output from the actual system and the identified system for 4000 points.
Here are the resulting input and output plots, please provide the insight to solve this problem. What am I doing wrong?
The text was updated successfully, but these errors were encountered: