In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highli... more In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highlighting the unique advantages of this form for deploying test-hardened code verbatim in harsh, mission-critical environments. In that paper, all examples folded over arrays in memory for convenience and repeatability. That is an example of developing filters in a friendly environment. Here, we prototype a couple of less friendly environments and demonstrate exactly the same Kalman accumulator function at work. These less friendly environments are - lazy streams, where new observations are computed on demand but never fully realized in memory, thus not available for inspection in a debugger - asynchronous observables, where new observations are delivered at arbitrary times from an external source, thus not available for replay once consumed by the filter
Kalman filtering is commonplace in engineering, but less familiar to software developers. It is t... more Kalman filtering is commonplace in engineering, but less familiar to software developers. It is the central tool for estimating states of a model, one observation at a time. It runs fast in constant memory. It is the mainstay of tracking and navigation, but it is equally applicable to econometrics, recommendations, control: any application where we update models over time. By writing a Kalman filter as a functional fold, we can test code in friendly environments and then deploy identical code with confidence in unfriendly environments. In friendly environments, data are deterministic, static, and present in memory. In unfriendly, real-world environments, data are unpredictable, dynamic, and arrive asynchronously. The flexibility to deploy exactly the code that was tested is especially important for numerical code like filters. Detecting, diagnosing and correcting numerical issues without repeatable data sequences is impractical. Once code is hardened, it can be critical to deploy ex...
In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highli... more In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highlighting the unique advantages of this form for deploying test-hardened code verbatim in harsh, mission-critical environments. The examples in that paper are all static, meaning that the states of the model do not depend on the independent variable, often physical time. Here, we present mathematical derivations of the basic, static filter. These are semi-formal sketches that leave many details to the reader, but highlight all important points that must be rigorously proved. These derivations have several novel arguments and we strive for much higher clarity and simplicity than is found in most treatments of the topic.
In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highli... more In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highlighting the unique advantages of this form for deploying test-hardened code verbatim in harsh, mission-critical environments. The examples in that paper are all static, meaning that the states of the model do not depend on the independent variable, often physical time. Here, we present a dynamic Kalman filter in the same, functional form. This filter can handle many dynamic, time-evolving applications including some tracking and navigation problems, and is easilly extended to nonlinear and non-Gaussian forms, the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) respectively. Those are subjects of other papers in this Kalman-folding series. Here, we reproduce a tracking example from a well known reference, but in functional form, highlighting the advantages of that form.
Encyclopedia of Software Components (ESC) is information-retrieval system of computer hardware an... more Encyclopedia of Software Components (ESC) is information-retrieval system of computer hardware and software providing access to generic reusable software tools and parts. Core of ESC is central tool base, which is repository of reusable software. It receives queries and submissions from user through local browser subsystem and receives authorized updates from maintenance subsystem. Sends retrievals to local browser subsystem and user's submissions to maintenance subsystem. Future versions will provide for advanced media, including voice and video, and will link system to database-management system. Programmers will not only retrieve software, but also modify, execute, and cross-link with other software.
Kalman Folding 5 presents an Extended Kalman Filter in Mathematica. Python is much more accessibl... more Kalman Folding 5 presents an Extended Kalman Filter in Mathematica. Python is much more accessible to average practitioners. In this follow-up article, we write a very general, foldable EKF in Python, verify it against Mathematica using sympy, Python's package for symbolic mathematics. We apply it to a spinning dashpot and demonstrate both state estimation and system identification from observing only one angle over time. It is remarkable that a complete dynamical description of eight states and parameters can be recovered from measurements of a single, scalar value.
This paper fills in some blanks left between part 1 of this series, Kalman Folding (http://vixra.... more This paper fills in some blanks left between part 1 of this series, Kalman Folding (http://vixra.org/abs/1606.0328), and the rest of the papers in the series. In part 1, we present basic Kalman filtering as a functional fold, highlighting the advantages of this form for hardening code in a test environment. In that paper, we motivated the Kalman filter as a natural extension of the running average and variance, writing both as functional folds computed in constant memory. We expressed the running statistics as recurrence relations, where the new statistic is the old statistic plus a correction. We write the correction as a gain factor times some transform of a residual. The residual is the difference between the current (old) statistic and the incoming (new) observation. In both expressions, for brevity, we left derivations to the reader. Here, we present those derivations in full “school-level” detail, along with some basic explanation of the programming language that mechanizes th...
This paper describes the concept of virtual time and its implementation in the Time Warp Operatin... more This paper describes the concept of virtual time and its implementation in the Time Warp Operating System at the Jet Propulsion Laboratory. Virtual time is a distributed synchronization paradigm that is appropriate for distributed simulation, database concurrency control, real time systems, and coordination of replicated processes. The Time Warp Operating System is targeted toward the distributed simulation application and runs on a 32-node JPL Mark II Hypercube.
Program compilation is a complicated process. A compiler is a software program that translates a ... more Program compilation is a complicated process. A compiler is a software program that translates a high-level source language program into a form ready to execute on a computer. Early in the evolution of compilers, designers introduced IRs (intermediate representations, also commonly called intermediate languages) to manage the complexity of the compilation process. The use of an IR as the compiler's internal representation of the program enables the compiler to be broken up into multiple phases and components, thus benefiting from modularity.
We exhibit a foldable Extended Kalman Filter that internally integrates non-linear equations of m... more We exhibit a foldable Extended Kalman Filter that internally integrates non-linear equations of motion with a nested fold of generic integrators over lazy streams in constant memory. Functional form allows us to switch integrators easily and to diagnose filter divergence accurately, achieving orders of magnitude better speed than the source example from the literature. As with all Kalman folds, we can move the vetted code verbatim, without even recompilation, from the lab to the field.
In Kalman Folding 5: Non-Linear Models and the EKF, we present an Extended Kalman Filter as a fol... more In Kalman Folding 5: Non-Linear Models and the EKF, we present an Extended Kalman Filter as a fold over a lazy stream of observations that uses a nested fold over a lazy stream of states to integrate non-linear equations of motion. In Kalman Folding 4: Streams and Observables, we present a handful of stream operators, just enough to demonstrate Kalman folding over observables. In this paper, we enrich the collection of operators, adding takeUntil, last, and map. We then show how to use them to integrate differential equations in state-space form in two different ways and to generate test cases for the non-linear EKF from paper 5.
In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highli... more In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highlighting the unique advantages of this form for deploying test-hardened code verbatim in harsh, mission-critical environments. In that paper, all examples folded over arrays in memory for convenience and repeatability. That is an example of developing filters in a friendly environment. Here, we prototype a couple of less friendly environments and demonstrate exactly the same Kalman accumulator function at work. These less friendly environments are - lazy streams, where new observations are computed on demand but never fully realized in memory, thus not available for inspection in a debugger - asynchronous observables, where new observations are delivered at arbitrary times from an external source, thus not available for replay once consumed by the filter
Kalman filtering is commonplace in engineering, but less familiar to software developers. It is t... more Kalman filtering is commonplace in engineering, but less familiar to software developers. It is the central tool for estimating states of a model, one observation at a time. It runs fast in constant memory. It is the mainstay of tracking and navigation, but it is equally applicable to econometrics, recommendations, control: any application where we update models over time. By writing a Kalman filter as a functional fold, we can test code in friendly environments and then deploy identical code with confidence in unfriendly environments. In friendly environments, data are deterministic, static, and present in memory. In unfriendly, real-world environments, data are unpredictable, dynamic, and arrive asynchronously. The flexibility to deploy exactly the code that was tested is especially important for numerical code like filters. Detecting, diagnosing and correcting numerical issues without repeatable data sequences is impractical. Once code is hardened, it can be critical to deploy ex...
In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highli... more In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highlighting the unique advantages of this form for deploying test-hardened code verbatim in harsh, mission-critical environments. The examples in that paper are all static, meaning that the states of the model do not depend on the independent variable, often physical time. Here, we present mathematical derivations of the basic, static filter. These are semi-formal sketches that leave many details to the reader, but highlight all important points that must be rigorously proved. These derivations have several novel arguments and we strive for much higher clarity and simplicity than is found in most treatments of the topic.
In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highli... more In Kalman Folding, Part 1, we present basic, static Kalman filtering as a functional fold, highlighting the unique advantages of this form for deploying test-hardened code verbatim in harsh, mission-critical environments. The examples in that paper are all static, meaning that the states of the model do not depend on the independent variable, often physical time. Here, we present a dynamic Kalman filter in the same, functional form. This filter can handle many dynamic, time-evolving applications including some tracking and navigation problems, and is easilly extended to nonlinear and non-Gaussian forms, the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) respectively. Those are subjects of other papers in this Kalman-folding series. Here, we reproduce a tracking example from a well known reference, but in functional form, highlighting the advantages of that form.
Encyclopedia of Software Components (ESC) is information-retrieval system of computer hardware an... more Encyclopedia of Software Components (ESC) is information-retrieval system of computer hardware and software providing access to generic reusable software tools and parts. Core of ESC is central tool base, which is repository of reusable software. It receives queries and submissions from user through local browser subsystem and receives authorized updates from maintenance subsystem. Sends retrievals to local browser subsystem and user's submissions to maintenance subsystem. Future versions will provide for advanced media, including voice and video, and will link system to database-management system. Programmers will not only retrieve software, but also modify, execute, and cross-link with other software.
Kalman Folding 5 presents an Extended Kalman Filter in Mathematica. Python is much more accessibl... more Kalman Folding 5 presents an Extended Kalman Filter in Mathematica. Python is much more accessible to average practitioners. In this follow-up article, we write a very general, foldable EKF in Python, verify it against Mathematica using sympy, Python's package for symbolic mathematics. We apply it to a spinning dashpot and demonstrate both state estimation and system identification from observing only one angle over time. It is remarkable that a complete dynamical description of eight states and parameters can be recovered from measurements of a single, scalar value.
This paper fills in some blanks left between part 1 of this series, Kalman Folding (http://vixra.... more This paper fills in some blanks left between part 1 of this series, Kalman Folding (http://vixra.org/abs/1606.0328), and the rest of the papers in the series. In part 1, we present basic Kalman filtering as a functional fold, highlighting the advantages of this form for hardening code in a test environment. In that paper, we motivated the Kalman filter as a natural extension of the running average and variance, writing both as functional folds computed in constant memory. We expressed the running statistics as recurrence relations, where the new statistic is the old statistic plus a correction. We write the correction as a gain factor times some transform of a residual. The residual is the difference between the current (old) statistic and the incoming (new) observation. In both expressions, for brevity, we left derivations to the reader. Here, we present those derivations in full “school-level” detail, along with some basic explanation of the programming language that mechanizes th...
This paper describes the concept of virtual time and its implementation in the Time Warp Operatin... more This paper describes the concept of virtual time and its implementation in the Time Warp Operating System at the Jet Propulsion Laboratory. Virtual time is a distributed synchronization paradigm that is appropriate for distributed simulation, database concurrency control, real time systems, and coordination of replicated processes. The Time Warp Operating System is targeted toward the distributed simulation application and runs on a 32-node JPL Mark II Hypercube.
Program compilation is a complicated process. A compiler is a software program that translates a ... more Program compilation is a complicated process. A compiler is a software program that translates a high-level source language program into a form ready to execute on a computer. Early in the evolution of compilers, designers introduced IRs (intermediate representations, also commonly called intermediate languages) to manage the complexity of the compilation process. The use of an IR as the compiler's internal representation of the program enables the compiler to be broken up into multiple phases and components, thus benefiting from modularity.
We exhibit a foldable Extended Kalman Filter that internally integrates non-linear equations of m... more We exhibit a foldable Extended Kalman Filter that internally integrates non-linear equations of motion with a nested fold of generic integrators over lazy streams in constant memory. Functional form allows us to switch integrators easily and to diagnose filter divergence accurately, achieving orders of magnitude better speed than the source example from the literature. As with all Kalman folds, we can move the vetted code verbatim, without even recompilation, from the lab to the field.
In Kalman Folding 5: Non-Linear Models and the EKF, we present an Extended Kalman Filter as a fol... more In Kalman Folding 5: Non-Linear Models and the EKF, we present an Extended Kalman Filter as a fold over a lazy stream of observations that uses a nested fold over a lazy stream of states to integrate non-linear equations of motion. In Kalman Folding 4: Streams and Observables, we present a handful of stream operators, just enough to demonstrate Kalman folding over observables. In this paper, we enrich the collection of operators, adding takeUntil, last, and map. We then show how to use them to integrate differential equations in state-space form in two different ways and to generate test cases for the non-linear EKF from paper 5.
Uploads
Papers by Brian Beckman