Custom Regressor in Nonlinear Model created from Data

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

回答 (2 件)

Rajiv Singh
Rajiv Singh 2019 年 8 月 5 日

0 投票

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.
Nils B
Nils B 2019 年 8 月 5 日
編集済み: Nils B 2019 年 8 月 5 日

0 投票

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?

製品

リリース

R2018a

質問済み:

2019 年 8 月 1 日

編集済み:

2019 年 8 月 5 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by