AutomationShield
AutomationShield copied to clipboard
Identified SS model current offset
Hi, I'm facing a problem, where identified State space model of MotoShield fits only to Detrended data. As soon as I compare model to Raw data, the angular velocity fits, but measured current doesn't. See below
Detrended data comparison-->
Raw data Comparison-->
Kalman Filter Result-->
Note: when the initial condition value of current ifltr(1) is subtracted from filtered current, result is spot on-->
- I have tried changing the initial conditions for Identification algorithm without success.
- Tried adding zero input/output the beginning and at the end of a data.
- Tried to identify data without detrend - The identified model match is far worse/lesser.
The only solution I see is to simply compensate offset by subtracting the filtered value. Thx.
PS: here is a script and a dataset. identification_data.zip
Data-model comparison solution: When output offset is compensated by following:
compopt=compareOptions('OutputOffset',[0; -ifltr(1)]); compare(trenddata,model,compopt)
OUTPUT -->
I think that I found out what the problem is...
The A matrix after identification contains zero values, so the initial conditions in kalman filter become irrelevant.
This occurs because system has super fast dynamics (response).
I'm going to try identification with lower sampling period (3 ms).