MATLAB Answers

Custom Regressor in Nonlinear Model created from Data

1 view (last 30 days)
Nils B
Nils B on 1 Aug 2019
Edited: Nils B on 5 Aug 2019
Hello I have created a non linear model idnlarx from a data set and I am trying to improve my fit
by using a custom regressor expression. Since my data comes from a temperature sensor, I know it's a function of exponential grow and decay.
However I have problems to do it right, since i have a MIMO system with 5 inputs ( 0 or 1) and 4 outputs (Temperatures).
I have created the custom regressors like this:
cr1 = @(x,y) 25+x*exp(-y); // Describes exponential decay until room temp (25) is reached
cr2 = @(x,y) 25+x*(350-exp(-y)); //describes expontial asymptotic growth up to temp (350)
C = [customreg(cr1,{'u1','y1'},[10 13]),customreg(cr2,{'u1,'y1'},[20 40])];
But when I use these custom regs for all output/input relations my results get really bad. Maybe I am doing something wrong?
Of course depending on u the output can always grow or decay so I used cr1 and cr2 on every input output like in my example.
best regards

  0 Comments

Sign in to comment.

Answers (2)

Rajiv Singh
Rajiv Singh on 5 Aug 2019
Could you describe the underlying physics here? Is the input some type of switch that turns a heat source on or off? Note that exponential growth/decay does not necessarily mean that you have to incorporate exponential regressors; see a capacitor charging equation for example.

  0 Comments

Sign in to comment.


Nils B
Nils B on 5 Aug 2019
Edited: Nils B on 5 Aug 2019
Thanks for your answer! Yes there are 5 heat sources which are turned on or off (0 or 1). The object itself is more or less a capacitor like you mentioned (at least i think so...?), because it is a a cylinder made from metal.
I tested different data sets where i turned on one heat source after another for a while before I shut them down. This is an example from four different sensors:
Thats why I though custom regressors might beneficial for my model. Maybe you can give me some advice?

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by