Skip to content
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

Identified SS model current offset #318

Open
xboldocky opened this issue May 11, 2022 · 2 comments
Open

Identified SS model current offset #318

xboldocky opened this issue May 11, 2022 · 2 comments

Comments

@xboldocky
Copy link
Collaborator

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-->
image

Raw data Comparison-->
image

Kalman Filter Result-->
image

Note: when the initial condition value of current ifltr(1) is subtracted from filtered current, result is spot on-->
image

  • 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

@xboldocky
Copy link
Collaborator Author

Data-model comparison solution: When output offset is compensated by following:

compopt=compareOptions('OutputOffset',[0; -ifltr(1)]);
compare(trenddata,model,compopt)

OUTPUT -->

image

@xboldocky
Copy link
Collaborator Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant