Repository navigation
nonlinear_pem: pass the sample interval of the data to the UKF - #210
Merged
Merged
Conversation
The UKF of nonlinear_pem was constructed without Ts, so dynamics and measurement functions that depend on time received t = k instead of t = k*d.Ts. predict passed the sample index as the time to the measurement function; it now passes (k-1)*d.Ts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nonlinear_pemconstructed itsUnscentedKalmanFilterwithoutTs, so the filter used the defaultTs = 1. Dynamics or measurement functions that depend on time therefore receivedt = kinstead oft = k*d.Ts, and the estimate was wrong wheneverd.Ts ≠ 1. The UKF now receivesTs = d.Ts.predict(model, d)also passed the sample index1:length(d)as the time argument of the measurement function. It now passesrange(0, step = d.Ts, length = length(d)).Test
A new testset in
test/test_nonlinear_pem.jluses a first-order model with a known forcingsin(t),Ts = 0.1and noise-free data.model.ukf.Tsp = [0.8, 1.5][0.277, 1.399]rtol = 1e-3atol = 1e-2The measurement function of the test does not depend on time, so the
predictchange is not exercised by it. The existing testsets were not run.Host: demeter2, Claude Code session fb40ab3f-b528-4d68-8420-c82305c52757, working directory scratchpad clone of ControlSystemIdentification.jl
🤖 Generated with Claude Code