Search code examples
matlabstate-space

State Space Grey Box parameter estimation


I'm trying to understand how to perform grey box parameter estimation in matlab. I have working but somewhat rusty knowledge of control theory (undergraduate control theory, many years ago). I'm doing post graduate research and have access to most if not all the matlab toolboxes.

I know the form of my A,B,C and D matrices from the system I'm modelling, i.e. a simple R1C1 circuit has the continuous representation

A = [-R*C];
B = [R*C C];
C = [1];
D = [0 0];

I have observations of y(kT) and u(kT), so I beleive I would need to convert the above matrices into 'backward difference' form given the sample rate of the observations in order to estimate R and C?

i.e.

Ad = (1-AT)^-1
Bd = (I-AT)BT
Cd = C(I-AT)^-1
Dd = {D+C(1-AT)^-1BT}

I've experimented with the idgrey and greyest functions. In these cases you implement a callback which returns [A B C D] given R,C and Ts. It's not clear to me how this works though for discrete systems - are you expected to do the transforms above?


Solution

  • With help from https://math.stackexchange.com/questions/2428269/transform-discrete-state-space-into-discrete-transfer-function I worked out that I do need to convert discretise - although I used ZoH rather than the difference form.