forked from WilliamCooper/KalmanFilter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
KalmanFilterTechNote.tex
3101 lines (2756 loc) · 190 KB
/
KalmanFilterTechNote.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\batchmode
\makeatletter
\def\input@path{{/home/cooperw/RStudio/KalmanFilter/}}
\makeatother
\documentclass[12pt,twoside,english,12pt,twoside,english]{article}\usepackage[]{graphicx}\usepackage[]{color}
%% maxwidth is the original width if it is less than linewidth
%% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\makeatletter
\def\maxwidth{ %
\ifdim\Gin@nat@width>\linewidth
\linewidth
\else
\Gin@nat@width
\fi
}
\makeatother
\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}
\newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}%
\newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}%
\newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}%
\newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%
\newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}%
\newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}%
\newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}%
\newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}%
\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}%
\let\hlipl\hlkwb
\usepackage{framed}
\makeatletter
\newenvironment{kframe}{%
\def\at@end@of@kframe{}%
\ifinner\ifhmode%
\def\at@end@of@kframe{\end{minipage}}%
\begin{minipage}{\columnwidth}%
\fi\fi%
\def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
\colorbox{shadecolor}{##1}\hskip-\fboxsep
% There is no \\@totalrightmargin, so:
\hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
\MakeFramed {\advance\hsize-\width
\@totalleftmargin\z@ \linewidth\hsize
\@setminipage}}%
{\par\unskip\endMakeFramed%
\at@end@of@kframe}
\makeatother
\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX
\usepackage{alltt}
\usepackage{mathptmx}
\usepackage{helvet}
\renewcommand{\ttdefault}{lmtt}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1.2in,rmargin=1in}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{tocdepth}{2}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{color}
\definecolor{page_backgroundcolor}{rgb}{1, 1, 1}
\pagecolor{page_backgroundcolor}
\usepackage{babel}
\usepackage{calc}
\usepackage{url}
\usepackage{amsmath}
\usepackage{splitidx}
\makeindex
\usepackage{graphicx}
\usepackage{esint}
\usepackage[authoryear]{natbib}
\newindex[Index]{idx}
\newindex[Variable Names and Acronyms]{var}
\newindex[List of Symbols]{lis}
\usepackage[unicode=true,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=true,pdfborder={0 0 0},pdfborderstyle={},colorlinks=true]
{hyperref}
\hypersetup{pdftitle={Technical Note: Kalman Filter},
pdfauthor={William A. Cooper},
pdfsubject={improvement of wind measurements, GV},
pdfkeywords={Kalman, wind,uncertainty, NCAR Research Aviation Facility, research aircraft, NCAR/EOL/RAF},
linkcolor=blue, citecolor={blue}}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newenvironment{lyxlist}[1]
{\begin{list}{}
{\settowidth{\labelwidth}{#1}
\setlength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\renewcommand{\makelabel}[1]{##1\hfil}}}
{\end{list}}
\newenvironment{lyxcode}
{\par\begin{list}{}{
\setlength{\rightmargin}{\leftmargin}
\setlength{\listparindent}{0pt}% needed for AMS classes
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
\item[]}
{\end{list}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}\definecolor{messagecolor}{rgb}{0, 0, 0}\definecolor{warningcolor}{rgb}{1, 0, 1}\definecolor{errorcolor}{rgb}{1, 0, 0}\setlength{\headheight}{14.5pt}\usepackage{babel}
\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}\definecolor{messagecolor}{rgb}{0, 0, 0}\definecolor{warningcolor}{rgb}{1, 0, 1}\definecolor{errorcolor}{rgb}{1, 0, 0}\usepackage{babel}
% macro for italic page numbers in the index
\newcommand{\IndexDef}[1]{\textit{#1}}
\newcommand{\IndexPrimary}[1]{\textbf{#1}}
% force a page break at the start of sections
\let\stdsection\section
\renewcommand{\section}{\newpage\stdsection}
% workaround for a makeindex bug,
% see sec. "Index Entry Order"
% only uncomment this when you are using makindex
%\let\OrgIndex\index
%\renewcommand*{\index}[1]{\OrgIndex{#1}}
%\usepackage{splitidx}
% workaround for a makeindex bug,
% see sec. "Index Entry Order"
% only uncomment this when you are using makindex
\let\OrgIndex\index
\renewcommand*{\index}[1]{\OrgIndex{#1}}
\usepackage{splitidx}
%\indexsetup{noclearpage}
\AtBeginDocument{
\def\labelitemii{\(\circ\)}
\def\labelitemiii{\(\triangleright\)}
}
\usepackage[font={normal,sl}]{caption}% set captions slanted
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\newenvironment{lylist}[1]{\begin{list}{}
{\settowidth{\labelwidth}{#1}
\setlength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\renewcommand{\makelabel}[1]{##1\hfil}}}{\end{list}}
\newcommand{\datetoday}{\number\day\space
\ifcase\month\or January\or February\or March\or April\or May\or
June\or July\or August\or September\or October\or November\or
December\fi
\space\number\year}
\newcommand{\EOLmemo}{\null \vskip-1.5truein
{\raggedright \textsf{\textsc{\large \textcolor{blue}{Earth Observing Laboratory}}}}\par
{\raggedright \textsf{\textsl{\textcolor{blue}{Memorandum:}}}} \par \vskip6pt
{\color{blue}{\hrule}}\par
\vskip0.3truein \leftline{\hskip \longindent \datetoday} \vskip0.2truein
\thispagestyle{empty}}
\newcommand{\attachm}[1]{\begin{lylist}{Attachments:00}
\item [Attachments:] {#1}
\end{lylist}}
\newcommand{\cc}[1]{\begin{lylist}{Attachments:00}
\item [cc:] {#1}
\end{lylist}}
\newcommand{\attach}[1]{\begin{lylist}{Attachments:00}
\item [Attachment:] {#1}
\end{lylist}}
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\pagenumbering{gobble}
\makeatother
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\begin{document}
\title{A Kalman Filter\\
to Improve Measurements of Wind\\
from NSF/NCAR Research Aircraft}
\author{William A. Cooper}
\date{\textcolor{red}{DRAFT} 6/30/2017\\
(title page to be replaced by NCAR library template)}
\maketitle
National Center for Atmospheric Research\\
Earth Observing Laboratory\\
Research Aviation Facility
\vfill{}
\cleardoublepage{} \pagenumbering{roman}\tableofcontents{} \vfill{}
\eject
%% LyX 2.2.2 created this file. For more info, see http://www.lyx.org/.
%\phantomsection \addcontentsline{toc}{section}{List of Figures}
\listoffigures
\clearpage %\phantomsection \addcontentsline{toc}{section}{List of Tables}
\listoftables
\clearpage{}
\renewcommand{\abstractname}{Prefix and Abstract}\thispagestyle{plain}\begin{abstract}
To improve the measurements of wind made from NSF/NCAR aircraft, a
Kalman filter is developed and applied to archived data files from
research projects. The filter is an error-state Kalman filter, and
the emphasis is on improving the measurements of pitch and heading
because they are usually the dominating source of uncertainty in measured
wind. The NSF/NCAR Gulfstream V research aircraft is emphasized in
the development, but the filter as developed can be applied to data
from other present and past NCAR aircraft as well. So that the resulting
filter can be applied in cases where the primary measurements from
the inertial reference system were not recorded in the data file,
a method is developed for retrieving those measurements by differentiating
the recorded variables representing attitude angles and aircraft-velocity
components. In addition, some new algorithms are introduced for estimating
the rate of climb of the aircraft from the measured accelerations
and for estimating the angle of attack from pressures measured at
ports on the radome. In addition, simplified methods for estimating
the errors in pitch and heading without the full complexity and processing
requirements of the Kalman filter are documented. The result is that
standard uncertainties in pitch and heading are reduced to about 0.01$^{\circ}$,
so that they no longer dominate the uncertainty in the wind measurements.
Some examples illustrate the effects of the Kalman filter on measured
wind and on variance spectra. The processing technique is incorporated
into an R script that can add the improved variables to a standard
netCDF data archive so that they can be made available for community
use. Documents that are accessible via links in this technical document
provide information on the workflow that generated the document, the
details of the processing algorithms, and instructions for use and
modification of the processing script.
\end{abstract}
\clearpage{}
\section*{Acknowledgments}
\label{sec:acknowledgements}
The research aircraft discussed in this technical note, the NSF/NCAR
\index{aircraft!NSF/NCAR GV}Gulfstream V often called \textquotedbl{}HIAPER\textquotedbl{},
was the result of an extensive effort both within and outside of NCAR
and at the National Science Foundation. Chris Webster's development
and maintenance of the software used for data processing was a very
important contribution to this effort. The technical staff of the
NCAR Earth Observing Laboratory were involved in all stages of the
development and operation of this research platform, and the project
management staff, operations staff, and computing and data management
groups of that Laboratory conducted the projects that produced the
data used in this document. Without all these contributions, the measurements
characterized in this document would not have been available to the
community. NCAR is sponsored by the National Science Foundation (NSF),
and the NSF also supported the experiments that collected the data
used in this technical note.
Two reviewers, Donald Lenschow and Matthew Hayman, made many suggestions
that improved this document. In many other ways, Don Lenschow established
the basis for this work and, over many years, provided the author
with valued guidance regarding the measurement of wind. The suggestions
of Matt Hayman were particularly helpful in regard to the mathematical
equations and associated descriptions.
The data used in the examples presented are from the \sindex[var]{DEEPWAVE=Deep Propagating Gravity Wave Experiment}DEEPWAVE\index{DEEPWAVE research project}
project (Deep Propagating Gravity Wave Experiment over New Zealand),
described at \href{https://www.eol.ucar.edu/field_projects/deepwave}{this URL}.
Measurements (\citealp{EOL_DEEPWAVE-_2015}) were collected by the
DEEPWAVE experiment team, and flight operations and data acquisition
and processing were performed by the Research Aviation Facility, Earth
Observing Laboratory, National Center for Atmospheric Research (NCAR).
The analyses reported here were mostly performed using R (\citet{Rlanguage}),
with \index{RStudio}RStudio (\citet{RStudio2012}) and \index{knitr}knitr
(\citet{Xie2014a,Xie2014b}). Data files in netCDF format have been
read and written using the R \index{R language!package!ncdf4}package
``ncdf4''; cf.~\citet{ncdf4}. Substantial use also was made of
the \index{ggplot2}\index{R language!package!ggplot2}ggplot2 package
(\citet{wickham2009}) for R. The code used for the Kalman filter
relies on the Jacobian function\index{function!Jacobian} in the R
\index{R language!package!numDeriv}package ``numDeriv'' \index{Jacobian!numerical evaluation}version
2016.8-1; cf.~\citet{numDeriv}.
\thispagestyle{plain}\clearpage{}
\thispagestyle{empty}
\cleardoublepage{}
\pagenumbering{arabic}
\section{Introduction}
\subsection{Overview}
\index{overview!this document}A recent technical note (\citet{Cooper2016ncartn})
discussed the uncertainty\index{uncertainty!wind} associated with
\index{wind!measurement}measurements of wind from the NSF/NCAR Gulfstream
V\index{aircraft!NSF/NCAR GV}\sindex[var]{GV=NSF/NCAR Gulfstream V}
research aircraft, hereafter called the GV.\index{GV|see {aircraft!NSF/NCAR GV}}\index{NSF/NCAF GV|see {aircraft!NSF/NCAR GV}}
The aircraft is owned by the \sindex[var]{NSF=National Science Foundation}National
Science Foundation (NSF) and operated by the Research Aviation Facility\sindex[var]{RAF=Research Aviation Facility}
(RAF), Earth Observing Laboratory (EOL), National Center for Atmospheric
Research\sindex[var]{NCAR=National Center for Atmospheric Research}
(NCAR). \index{aircraft!NSF/NCAR GV} The components and algorithms\index{algorithm!wind}
that comprise the \index{wind!{*}{*}}wind-measuring system on the
GV\index{uncertainty!wind!technical note} were documented in that
reference, so that information will not be repeated here. The central
content of that technical note was a detailed analysis of uncertainty\index{uncertainty!analysis for wind}
for the wind measurements. The \index{uncertainty!standard}standard
uncertainty was estimated to be about 0.1~m\,s$^{-1}$ for vertical
wind\index{wind!vertical!{*}{*}}\index{wind!vertical!uncertainty}
and 0.4~m\,s$^{-1}$ for each component of the horizontal \index{wind!horizontal!uncertainty}wind.
These estimates\index{uncertainty!wind!estimate} were based on the
analyzed performance of the inertial navigation \index{navigation system!inertial}system,
and are lower than would be expected from direct specifications for
that system. The largest contributions to uncertainty\index{uncertainty!wind!largest sources}
were associated with the measurements\index{pitch} of pitch and \index{heading}heading,
for respectively the vertical and horizontal wind components. Improvement
in the measurements of these \index{angle, attitude|see {attitude angle}}\index{attitude angle}attitude
angles therefore is the indicated step toward improved measurements
of wind.
Two approaches are taken in the present technical note to improve
the \index{pitch}\index{heading}key measurements. The first uses
a simplified analysis of the strong coupling\index{coupling!strong}
represented by the Schuler oscillation\index{Schuler oscillation}
to evaluate errors in pitch\index{error!pitch}\index{error!heading}
and combines this with a related analysis to find the correction in
heading. The second implements a full error-state Kalman filter\index{Kalman filter!error-state}
to produce adjusted measurements of the attitude angles\index{attitude angle}
and also the ground-speed\index{ground speed} components\index{velocity}
and rate-of-climb of the aircraft. The agreement between these two
methods then supports the validity of each, while the first provides
a much simpler method for determining the corrections.
This introduction will discuss the steps involved in using an error-state
Kalman filter to update \index{measurement!from INS}measurements
from the inertial systems\index{navigation system!inertial}\index{INS|see {navigation system, inertial}}
on the aircraft\index{aircraft!instrumentation!INS} (which do not
have internal Kalman filters) using reference \index{measurement!from GPS}measurements
from a \index{GPS|see {navigation sysem, GPS}}\index{navigation system!GPS}Global
Positioning System\index{aircraft!instrumentation!GPS} (GPS) \sindex[var]{GPS=global positioning system}receiver.
The measurements from the GPS receiver have low uncertainty for aircraft
position and velocity, so the Kalman filter adds little to these measurements.
The primary value of the \index{Kalman filter!primary value}Kalman
filter presented here is that it improves the measurements of \index{pitch}pitch
and \index{heading}heading.\index{global positioning system|see {navigation system, GPS}}
Section~2 next will develop expressions for the derivatives\index{state vector!derivative}\index{derivative!state vector|see {state vector, derivative}}
of a nine-component ``state vector'' of \index{measurement!from INS}measurements\sindex[var]{INS=inertial navigation system}
from the inertial navigation \index{navigation system!inertial}system
(INS), representing aircraft position, velocity, and attitude, and
will show that these derivatives provide a reasonable basis for mechanization,\index{mechanization!definition}
i.e., calculating the history of the state vector\index{attitude angle}
of the aircraft from the basic \index{measurement!from IRU}measurements
provided by the inertial reference \sindex[var]{IRU=inertial reference unit}unit\index{inertial reference unit}\index{IRU|see {inertial reference unit}}
(IRU).\index{body acceleration|see {acceleration}}\index{body rotation rate!see {rotation rate of aircraft}}\footnote{In this document, IRU will refer to the portion of the instrument
that produces the basic measurements\index{measurement!from IRU}
of body acceleration and body rotation rate, while INS\index{navigation system!inertial}
will refer to the full system that uses those basic \index{measurement!from INS}measurements
to propagate the position, velocity and attitude angles\index{attitude angle}
of the aircraft forward in time from an initial state determined during
alignment\index{alignment!INS} of the instrument.} Those basic measurements\index{measurement!from IRU}\index{aircraft!instrumentation!IRU}
are the vector rotation rate and vector acceleration\index{acceleration!measurement}
of the aircraft in an inertial \index{reference frame!inertial}frame,
so the test of the calculated derivatives\index{state vector!derivative}
is that the results for the sequence of state vectors\index{state vector!definition}
should be in reasonable agreement with the values provided by the
INS. The importance of this step is that the validated state-vector
derivative\index{state vector!derivative} then will be used in implementation
of the error-state Kalman \index{Kalman filter!error-state}filter.
Section~3 is a diversion from the main development of this technical
note. It discussed several ancillary topics:
\begin{enumerate}
\item[i.] a new variable representing the \index{rate of climb}rate of climb
of the aircraft that is an improvement over the \index{rate of climb}measurement
provided by the INS;
\item[ii.] a method for finding the \index{inertial reference unit}IRU-provided
\index{measurement!from IRU!surrogate for}measurements\index{inertial reference unit!surrogate for measurement}\index{IRU|see {inertial reference unit}}
of rotation and acceleration by differentiating the recorded attitude
angles;\index{attitude angle}
\item[iii.] simplified algorithms\index{algorithm!correct pitch}\index{algorithm!correct heading}
for finding the errors\index{error!pitch}\index{error!heading} in
pitch and heading; and
\item[iv.] a revised empirical representation of angle of attack\index{angle of attack!empirical representation}\index{attack|see {angle of attack}}.
\end{enumerate}
The first is useful because the \index{navigation system!inertial!rate of climb}INS
internally updates the variable representing the vertical speed of
the aircraft by comparison\index{comparison!altitude} to the pressure\index{altitude of aircraft!pressure}
altitude, while the \index{wind!measurement}measurement of wind needs
a variable representing the rate of change in geometric\index{altitude of aircraft!geometric}
altitude. The second topic is needed because, for many of the early
research projects using the \index{aircraft!NSF/NCAR GV}GV, the body
rotation rates\index{rotation rate of aircraft!measurement} and body
accelerations\index{acceleration!measurement}\index{measurement!acceleration}\index{measurement!rotation rate}
were not recorded, yet they are needed by the Kalman filter. Reconstructing
them makes it possible to process those older \index{processing from archives}projects
or to process from the standard data archives, \index{data!standard archive}which
normally do not include the body rotations\index{measurement!rotation rate}
even if they were present in the original recorded file. The third
topic provides a complementary approach to finding the same errors\index{error!attitude angle}
in attitude angles\index{attitude angle} that the Kalman filter will
produce. It will provide a useful test of the results from that filter.
Finally, Sect.~3.4 extends the discussion of \index{sensitivity coefficient|see {angle of attack, empirical representation}}sensitivity
coefficients\index{angle of attack!empirical representation}\index{angle of attack!empirical representation}
contained in \citet{Cooper2016ncartn} by presenting a new empirical
representation that has advantages over the method used previously.
Improved pitch \index{pitch}measurements lead to improved coefficients
used in this empirical representation, so that is an added benefit
of the Kalman filter. These will find important uses in the implementation
of the Kalman filter or the new calculation of \index{wind!measurement}\index{wind!{*}{*}}wind
that is based on the corrections it provides.
Section~4 then discusses the details of the \index{Kalman filter!processing script}Kalman
filter. A script based on the R programming language\index{R language}\index{R language!program}
has been developed to calculate the estimated errors\index{error!estimate from Kalman filter}
from the Kalman filter, apply the indicated corrections to the \index{measurement!corrected}measured
\index{state vector}state vector, and add those new variables to
the standard netCDF\index{netCDF!create new file} data \index{file!data}file.
This section includes discussion of the aspects of that code that
represent the \index{Kalman filter!coding}Kalman filter. The results
are shown and compared to reference results and to the alternate methods
of determining the pitch and heading corrections as discussed in Sect.~3.
Section 5 shows examples of the measurements of wind\index{wind!corrected, Kalman filter}
based on the corrected state vector. The conclusion of this section
and the closing section summarize the value of the Kalman filter.
At the end, there is also a list of netCDF variable names referred
to in the text, with definitions, and an index.
A goal of this project has been to make this work internally documented
and \index{reproducibility}reproducible, as discussed in the Appendix.
The program\index{R language!interactive processing script} that
produces this document (via \index{LaTeX}\LaTeX), named KalmanFilterTechNote.Rnw,\index{program!file}
also performs all the calculations,\index{program!for calculations}
generates the quoted results and figures (with a few exceptions),
and produces the new archive\index{data!new archive} \index{netCDF!create new file}file,
so that program file contains everything needed to reproduce this
work. Subsets of the data \index{file!data}files are also preserved
and archived. Another document called the \index{workflow document}workflow
document (KalmanFilterWorkflow.pdf) accompanies this technical note
and the generating program file. It serves several purposes, primarily
to elaborate upon the material in the present document. Some of the
derivations\index{derivations!in workflow} are justified in more
detail, and \index{instructions!R script}\index{R language!interactive processing script!instructions}instructions
are provided for running the R script to add the corrected variables
to a \index{netCDF}netCDF\sindex[var]{netCDF=network common data format}
file. Some details of how that modification of an existing file is
done are included in the workflow document, and there is also some
discussion of methods that were explored but abandoned in the course
of this work. The workflow document\index{workflow document} should
provide valuable information to anyone wanting to modify the R script
or use it to process archival\index{data!standard archive} data \index{file!data}files.
\subsection{Brief summary of the Kalman filter}
\index{overview!Kalman filter}A \index{Kalman filter!summary}Kalman
filter provides a means of updating a sequence of \index{state vector}state
vectors (consisting, in the present case, of INS-provided \index{measurement!from INS}measurements
of position, velocity, and attitude angles\index{attitude angle})
by comparison\index{comparison!INS to GPS} to an independent set
of measurements (e.g., \index{navigation system!GPS}GPS-based \index{measurement!from GPS}measurements
of position and velocity). The updated \index{state vector}state
vector obtained by this process consists of an appropriately weighted
combination of the state vector projected forward using normal mechanization\index{mechanization}
and the independent measurements from the GPS receiver. Because errors
in the state vector\index{state vector!error in}\index{error!state vector|see {state vector, error in}}
are coupled,\index{coupling!strong} the update procedure can estimate
errors in the attitude angles\index{error!attitude angle}\index{attitude angle!errors}
as well as in the components of the \index{state vector}state vector
that are measured directly by the GPS receiver. This \index{measurement!corrected}correction
to attitude angles\index{attitude angle!correction} is the primary
reason for using a Kalman filter to improve the wind measurements.
The weighting of the projected-forward state vs.~new \index{measurement!from GPS}measurements
from the \index{navigation system!GPS}GPS receiver depends on estimates
of the covariance\index{matrix!covariance} matrix\index{covariance|see {matrix, covariance}}
describing the \index{state vector}state vector as well as estimates
of the noise\index{noise} contaminating the measurements from the
GPS receiver and the accelerations and rotation rates from the IRU\@.
With proper weighting, the result should combine the good high-frequency
response of the INS\index{navigation system!inertial} with the good
long-term stability of the GPS-based measurements. The \index{matrix!covariance}covariance
matrix characterizing the state vector is updated as the \sindex[var]{KF=Kalman filter}filter
is applied, but appropriate weighting depends on reasonable estimation
of the other error terms.
The operation of the filter\index{Kalman filter!matrices} depends
on sequential use of a set of matrices, so it is useful to define
those as follows, where the variable names following the symbols are
the R variable\index{variable names!in R code} names used in the
R code:
\begin{lyxlist}{00.00.0000}
\item [{$\delta\mathbf{x}_{k}$~{[}SVE{]}}] \sindex[lis]{deltax@$\boldsymbol{\delta x}$=error-state vector}\sindex[lis]{x@$\boldsymbol{x}$=state vector}The
error-state vector\index{error-state vector}\index{state vector!error-|see {error-state vector}}
at time index $k$. In the present case, this consists of these 15
components:\index{measurement!estimated error} estimated errors in
position, aircraft velocity\index{velocity of aircraft!{*}{*}}, aircraft
attitude, \index{measurement!from IRU}\index{inertial reference unit}IRU-measured
rotation rate\index{measurement!rotation rate}, and IRU-measured
accelerations.\index{acceleration!measurement}\index{measurement!acceleration}
\item [{$\mathbf{T}_{k|k-1}$~{[}dcm{]}}] \sindex[lis]{T@$\mathbf{T}_{k,k-1}$=state transition matrix}The
15$\times$15 state transition matrix\index{state transition matrix|see {matrix, state transition}}\index{matrix!state transition}
based on the derivatives used for INS mechanization\index{mechanization}\index{navigation system!inertial!mechanization},
for the change from time $k-1$ to time $k$. Then $\delta\mathbf{x}_{k}=\mathbf{T}_{k|k-1}\delta\mathbf{x}_{k-1}$
where $\mathbf{T}$ combines the unit diagonal matrix with the time
step\index{time step} multiplied by the derivative\index{state vector!derivative}
matrix describing the state transition. As applied to the state vector,
a state transition vector would involve the derivatives used for normal
mechanization to advance the state vector and so would duplicate the
action of the internal INS data processing. As interpreted for an
error-state Kalman \index{Kalman filter!error-state}filter, the matrix
$\mathbf{T}$ is obtained by calculating the Jacobian of the \index{Jacobian!of derivative function}function\index{function!producing the derivative vector}
of the state vector\index{state vector} that produces that derivative\index{state vector!derivative}
vector, as a function of the error-state \index{error-state vector}components;
i.e., $T[i,\,j]$ is the derivative of the $i$ component of that
derivative function with respect to change in the $j$ component.
\item [{$\mathbf{V}$~{[}CV{]}}] \sindex[lis]{V@$\mathbf{V}$=covariance matrix}The
\index{matrix!covariance}15$\times$15 covariance matrix\index{matrix!covariance}
that applies to the \index{state vector}state vector $\delta\mathbf{x}$.
\item [{$\mathbf{K}$~{[}K{]}}] \sindex[lis]{K@$\mathbf{K}$=Kalman-gain matrix}The
\index{Kalman-gain matrix}Kalman-gain matrix\index{matrix!Kalman gain}
representing how the error-state vector\index{error-state vector}
is updated using the current error state and the new \index{navigation system!GPS}GPS-based
\index{measurement!from GPS}measurements.
\item [{$\delta\mathbf{z}$~{[}DZ{]}}] \sindex[lis]{deltaz@$\mathbf{\delta z}$=multicomponent vector of measured errors}The
6-component error\index{error!measured INS-GPS} vector containing
the measured differences between the \index{navigation system!inertial}INS
and GPS-based \index{navigation system!GPS}measurements\index{measurement!from GPS}\index{measurement!from INS}
of position and velocity.
\item [{$\mathbf{H}$~{[}H{]}}] \sindex[lis]{H@$\mathbf{H}$=observation matrix}The
15$\times$6-component observation \index{matrix!observation}matrix
representing how the measured differences $\delta\mathbf{z}$ correspond
to the \index{error-state vector}error-state vector.
\item [{$\mathbf{Q},\,\mathbf{R}$~{[}Q,~R{]}}] \sindex[lis]{Q@$\mathbf{Q}$=noise matrix, forward propagation}\sindex[lis]{R@$\mathbf{R}$=noise matrix, measurements}Matrices\index{matrix!noise}\index{matrix!measurement noise}
representing respectively the noise contributions (15$\times$15)
characterizing the forward propagation of the error-\index{error-state vector}state
vector and the \index{measurement!noise in}measurements from the
\index{navigation system!GPS}GPS receiver (6$\times$6).\index{noise!measurement}
\end{lyxlist}
The approach taken here will be to use the error-\index{error-state vector}state
vector that represents the difference between the best-estimate measurements
and those originally provided by the INS. The \index{measurement!from INS}INS
integration does not need to be duplicated; the reference integration
is already available. However, the Kalman filter does need the derivative
vector that leads to that forward \index{mechanization}integration,
so the first step in this analysis was to develop a function for the
derivative vector and validate it by comparing the mechanization that
uses it to the available INS\index{navigation system!inertial}-provided
variables, as described in Sect.~\ref{subsec:Mechanization}. The
Jacobian\index{Jacobian!of derivative function} of that derivative
\index{function!derivative}\index{derivative function}function,
evaluated at current values for the \index{state vector}state vector
including \index{measurement!from IRU}measurements from the \index{inertial reference unit}IRU,
then provides the \index{matrix!state transition}matrix $\mathbf{T}$
used in this filter. The implementation of the Kalman filter outlined
here then follows in Sect.~\ref{sec:The-Kalman-filter}.
\section{The derivative of the state vector}
\subsection{The procedure to be used\label{subsec:mech-procedures}}
\index{state vector!derivative} The \index{state vector}state vector
used in this section will consist of the three components of position,
three components of aircraft velocity\index{velocity of aircraft!{*}{*}}
relative to the Earth, and three attitude angles (pitch, roll and
heading).\index{attitude angle} In later sections a different vector,
the error-state \index{error-state vector}vector, will be used for
the Kalman \index{Kalman filter}filter, and in that case three components
of \index{measurement!from IRU}measured rotation rate\index{rotation rate of aircraft!measurement}
and three components of measured acceleration\index{acceleration!measurement}
will be added to the \index{state vector}state vector so that the
Kalman filter can treat the possibility of error in the latter six
components as well as the first nine. However, the purpose of this
section is to develop expressions for the derivatives of the nine-component
state vector in terms of the \index{inertial reference unit}IRU-measured
\index{measurement!rotation rate}rotation rates and accelerations
and to demonstrate that the calculated derivatives lead to a reasonable
mechanization\index{mechanization} that approximately duplicates
the original calculations from the INS. It is not necessary or expected
that this mechanization will produce an exact duplicate of the INS\index{navigation system!inertial!mechanization}
mechanization because the INS has high-rate data and timing information
not available to this new calculation. However, if the results are
reasonably close to those from the INS then that provides some evidence
that the derivatives being calculated are reasonably close to the
correct values. These derivatives will then be used in the implementation
of the Kalman filter, where the filter will adjust to compensate for
any errors remaining in these derivatives.
The \index{mechanization!outline}procedure used to produce variables
corresponding to position, velocity, and attitude angles\index{attitude angle}
for this test is as follows:
\begin{enumerate}
\item Initialize a \index{state vector}state vector $\mathbf{x}$ having
these components:
\begin{enumerate}
\item \index{latitude}latitude, \index{longitude}longitude, altitude\index{altitude of aircraft}
in the \index{reference frame!l-frame@\emph{l-}frame!definition}\index{l-frame@\emph{l-}frame|see {reference frame, \emph{l-}frame}}\emph{l-}frame,
the local-level reference frame that rotates with the Earth and has
axes pointing east, north, and upward at the location of the aircraft.
This reference frame is also called the local-level or ENU \index{reference frame!l-frame@\emph{l-}frame}reference
frame;
\item east, north, and upward velocity in the \emph{l-}frame;
\item \index{pitch!{*}{*}}pitch, \index{roll!{*}{*}}roll, heading\index{heading!{*}{*}}
in the \index{a-frame@\emph{a-}frame|see {reference frame, \emph{a-}frame}}\emph{a-}frame\index{reference frame!a-frame@\emph{a-}frame!definition}\index{reference frame!a-frame@\emph{a-}frame}\footnote{With appropriate transformations these calculations of attitude angles\index{attitude angle}
can be performed in the \emph{l-}frame instead, and there are some
advantages because the \emph{l-}frame values of errors\index{error!pitch}\index{error!roll}\index{error!l-frame@\emph{l-}frame}
in pitch and roll, respectively representing southward and westward
tilts of the virtual inertial platform, are not mixed together when
the heading changes as they are in the \emph{a-}frame. This was not
done in the calculations presented here.} (the reference frame of the aircraft; cf.~Sect.~\ref{subsec:deriv-array}
item 2).
\end{enumerate}
\item For each time increment:
\begin{enumerate}
\item Calculate the time derivative of the state vector.\index{state vector!derivative}
In the case of the attitude angles,\index{attitude angle!derivative}
this is done by calculating the derivative\index{transformation matrix!derivative}
of the \index{transformation!beween reference frames|see {reference \\
frame, transformation}}\index{reference frame!transformation}transformation \index{matrix!coordinate transformation}matrix
from the \emph{a-}frame\index{reference frame!a-frame@\emph{a-}frame}
to the \emph{l-}frame\index{reference frame!l-frame@\emph{l-}frame}
and then using the definition of components of that matrix to find
the derivative of the attitude angles.
\item Use that derivative vector\index{state vector!derivative} to increment
the state vector, compensating for possible wrap-around of the heading
at 0 and 360 deg so that values stay within that range.
\item save the nine components of the \index{state vector}state vector
in a new tabulation that represents an independent \index{mechanization}mechanization
of the IRU-provided \index{measurement!from IRU}measurements. These
new results should then be in reasonable agreement with the INS integration.
\end{enumerate}
\end{enumerate}
\subsection{Components of the derivative array\label{subsec:deriv-array}}
\index{state vector!derivative}The derivatives are calculated as
follows:
\begin{enumerate}
\item The position\index{position!derivative} derivatives are determined
from the components of the velocity, \{$v_{e},\,v_{n},\,v_{z}$\}.\index{velocity of aircraft}\sindex[lis]{vn@$v_{n}$=northward aircraft groundspeed}\sindex[lis]{ve@$v_{e}$=eastward aircraft groundspeed}
The changes in latitude\index{latitude} and longitude\index{longitude}
depend on the normal and meridional \index{radius of curvature!normal}\index{radius of curvature!meridional}radii
of curvature of the Earth\index{Earth!radius|see {radius of curvature}},
respectively denoted\sindex[lis]{Rm@$R_{m}$=meridional radius of curvature of the Earth}\sindex[lis]{Rn@$R_{n}$=normal radius of curvature of the Earth}
$R_{n}$ and $R_{m}$. \citet{noureldin2013fundamentals}, pp.~47\textendash 48,
provide definitions of these radii and a detailed derivation. The
derivatives of \index{latitude!symbol}latitude\sindex[lis]{lambda@$\lambda$=latitude}
$\lambda$ and longitude\index{longitude!symbol}\sindex[lis]{Phi@$\Phi$=longitude}\sindex[lis]{Phidot@$\dot{\Phi}$=time derivative of longitude}\sindex[lis]{lambdadot@$\dot{\lambda}$=time derivative of latitude}
$\Phi$ are then\\
\begin{eqnarray}
\dot{\lambda} & = & \frac{v_{n}}{R_{m}+z}\label{eq:dlat}\\
\dot{\Phi} & = & \frac{v_{e}}{(R_{n}+z)\cos\lambda}\label{eq:dlong}
\end{eqnarray}
where\sindex[lis]{z@$z$=altitude, aircraft} $z$ is the altitude
of the aircraft,\index{altitude of aircraft} with the derivative\sindex[lis]{zdot@$\dot{z}$=time derivative of aircraft altitude}\sindex[lis]{vz@$v_{z}$=rate of climb}\\
\begin{eqnarray}
\dot{z} & = & v_{z}\label{eq:dz}
\end{eqnarray}
where dots over quantities denote the time derivatives.\\
\item The velocity\index{velocity of aircraft!derivative} derivatives are
determined from the measured \index{measurement!acceleration}accelerations,\index{acceleration!measurement}
but the accelerations are measured in the \index{reference frame!a-frame@\emph{a-}frame!definition}\emph{a-}frame,
with axes such that the unit coordinate vectors\index{reference frame!a-frame@\emph{a-}frame!unit vectors}
are\sindex[lis]{xhat@$\hat{x}$=unit vector forward along aircraft axis}\sindex[lis]{yhat@$\hat{y}$=unit vector in the starboard direction}\sindex[lis]{zhat@$\hat{z}$=unit vector $\hat{x}\times\hat{y}$ (generally downward)}
$\hat{x}$ forward along the longitudinal axis of the aircraft,\index{aircraft!coordinate system}
$\hat{y}$ in the direction of the starboard wing, and $\hat{z}$
along the direction determined by their cross product and generally
downward. These measurements of acceleration must be \index{reference frame!transformation}transformed
to the \emph{l-}frame using the attitude angles\index{attitude angle}
for \index{pitch!{*}{*}}pitch, \index{roll!{*}{*}}roll, and \index{heading!{*}{*}}heading,
denoted\sindex[lis]{theta@$\theta$=pitch angle}\sindex[lis]{phi@$\phi$=roll angle}\sindex[lis]{psi@$\psi$=heading angle}
\{$\theta,\,\phi,\,\psi$\}, because the components of velocity are
defined in that frame. In addition, because the accelerations are
measured in an inertial \index{reference frame!inertial}frame, \label{enu:inertial-corrections}corrections
must be made for the inertial forces\index{inertial corrections}
that arise because the \emph{l-}frame is moving relative to the Earth
and so is changing orientation and because the rotation of the Earth\index{Earth!rotation rate}
introduces additional Coriolis\index{Coriolis|see {inertial corrections}}\index{acceleration!Coriolis|see {inertial corrections}}
accelerations relative to an inertial \index{reference frame!inertial}frame.\index{inertial corrections}
The coordinate\index{matrix!coordinate transformation} transformation
matrix\sindex[lis]{Rla@$\mathbf{R}_{a}^{l}$=transformation matrix, \emph{a-}frame to
\emph{l-}frame} that \index{reference frame!transformation}transforms a vector from
the \emph{a-}frame\index{reference frame!a-frame@\emph{a-}frame}
to the \emph{l-}frame\index{reference frame!l-frame@\emph{l-}frame}
will be denoted $\mathbf{R}_{a}^{l}$ and consists of four sequential
transformations, first a rotation by $\phi$ about the roll axis,
then a rotation by $\theta$ about the pitch axis, then a rotation
by $\psi$ about the resulting $\hat{z}$ axis, and finally exchange
of the $\hat{x}$ and $\hat{y}$ components and reversal of the sign
of the $\hat{z}$ component to change to the \emph{l-}frame reference\index{reference frame}
frame. The transformation was presented in detail by \citet{Bulletin23},
and is also specified and developed in the workflow document\index{workflow document}
that accompanies this technical note. The \emph{a-}frame measurements
of acceleration are \index{reference frame!transformation}transformed
to the \index{measurement!acceleration!l-frame@\emph{l-}frame}\emph{l-}frame
using this transformation \index{matrix!coordinate transformation}matrix
after the acceleration of gravity\index{gravity} is added to the
\index{acceleration!normal component}normal component because the
\index{inertial reference unit}IRU reports the \index{measurement!from IRU!normal acceleration}normal
component of gravity as that with the acceleration of gravity subtracted.
Then the transformed accelerations are corrected for apparent \index{inertial corrections}forces
generated by the inertial forces. \citet{noureldin2013fundamentals},
pp.~178\textendash 179, give the equations used, and these are repeated
in the workflow document.
\item Calculating the derivatives\index{attitude angle!derivative} of the
attitude angles\index{attitude angle!derivative} is more involved.
The attitude angles can be found if the \index{reference frame!transformation}transformation
matrix\index{matrix!coordinate transformation} $\mathbf{R}_{a}^{l}$
is known by using the definitions of the components of that matrix
in terms of the attitude angles. For example, the {[}3, 1{]} component
of that matrix is $-\sin\theta$, so $\theta=-\arcsin(R_{a}^{l}[3,1])$.
The \index{measurement!rotation rate!l-frame@\emph{l-}frame}measured
rotation rates, \index{reference frame!transformation}transformed
to the \index{reference frame!l-frame@\emph{l-}frame}\emph{l-}frame,
give the derivative of the transformation matrix,\index{matrix!coordinate transformation!derivative}
except that again corrections for inertial effects\index{inertial corrections}
arising from the Earth's \index{Earth!rotation rate}rotation and
the \index{reference frame!l-frame@\emph{l-}frame!motion of}motion
of the \emph{l-}frame are needed. \citet{noureldin2013fundamentals},
pp.~179\textendash 180, also provide the required correction for
the derivative of the transformation matrix, as documented further
in the workflow \index{workflow document}document and the code. These
corrections also are discussed in more detail in Sect.~\ref{subsec:Rotations},
equations (\ref{eq:Rla-dot})\textendash (\ref{eq:Omega2-iaa}).
\end{enumerate}
The \index{state vector!derivative!function}function ``STMFV,''
one of the R-code ``chunks'' included in the project archive, returns
these \index{state vector!derivative} derivatives given the \index{state vector}state
vector and the \index{measurement!from IRU}measurements from the
\index{inertial reference unit}IRU\@. The algorithms and code are
complicated enough that validation is important, so several tests
of the results are included in the remainder of this section.
\subsection{Tests of the derivatives}
\subsubsection{Validating the transformed accelerations\label{subsec:Checking-accelerations} }
\index{reference frame!transformation}The components of acceleration\index{acceleration!measurement}
expressed in the \emph{l-}frame\index{reference frame!l-frame@\emph{l-}frame}
can be compared to the accelerations determined by differentiating
either the INS-provided or the \index{navigation system!GPS}GPS-based
measurements of aircraft velocity.\index{velocity of aircraft} The
former is a test of the calculation; the latter is a test of the calibration\index{calibration!accelerometer}
of the accelerometers. The derivatives of the velocity\index{velocity of aircraft!derivative}
were determined by taking differences between consecutive measurements,
although it was useful to \index{smoothing}smooth the result using
a Savitzky-Golay\index{polynomial!Savitzky-Golay}\index{filter!Savitzky-Golay}
third-order polynomial spanning 11 25-Hz samples to reduce noise arising
from the limited resolution of the differences.
Relative timing among the \index{measurement!time lag}measurements
can influence these results. Many of the variables have corrections
applied for assumed time-lags during measurement, so in this test
of accelerations those lags\index{time lag} were first removed. Then
there were additional lags apparent among variables provided by the
\index{navigation system!inertial}INS, even when tagged with the
same times. To determine these lags, a pitch \index{maneuver!pitch}maneuver
(where the pilots induce rapid changes in pitch with associated climbs
and descents during straight flight) from DEEPWAVE\index{DEEPWAVE research project}\index{DEEPWAVE research project!full name}
(``Deep Propagating Gravity Wave Experiment over New Zealand'')
research flight 15, 3 July 2014, 3:16:00\textendash 3:18:00 UTC was
used. Adjusting the relative timing among measurements from the INS
was explored to see what provided the best agreement between measured
accelerations (variables \sindex[var]{BLONGA: body-longitudinal acceleration}BLONGA,
\sindex[var]{BLATA: body-lateral acceleration}BLATA, \sindex[var]{BNORMA: body-normal acceleration}BNORMA)\index{file!data!variable|see {netCDF Variable Names}}\index{variable in data files|seealso { netCDF Variable Names}}\index{variable in data files!BLONGA}\index{variable in data files!BLATA}\index{variable in data files!BNORMA}
and the accelerations determined by differentiating the INS variables
for aircraft velocity\index{velocity of aircraft} (\sindex[var]{VEW: ground speed eastward, INS}VEW,
\sindex[var]{VNS: ground speed northward, INS}VNS, \sindex[var]{VSPD: rate of climb, INS}VSPD)\index{variable in data files!VEW}\index{variable in data files!VNS}\index{variable in data files!VSPD}
and then transforming\index{reference frame!transformation} the resulting
accelerations to the \emph{a-}frame\index{reference frame!a-frame@\emph{a-}frame}
(where the \index{inertial reference unit}IRU \index{measurement!from IRU}measures
accelerations). That transformation must include correction for inertial
effects\index{inertial corrections} as discussed in Sect.~\ref{subsec:deriv-array},
item 2. The standard deviation\index{deviation, standard!acceleration}\index{standard deviation|see {deviation, standard}}
of the difference between the measured acceleration and that determined
by differentiating the measured aircraft velocity was minimized if
the measurements of acceleration were moved 50~ms earlier in time,
the measurements of pitch and roll were shifted 20~ms later in time,
and no shift was applied to the measurements of aircraft velocity.\index{measurement!time lag}\index{time lag}\index{time lag}
These shifts are all important only in relation to each other; the
same result was obtained if the accelerations were moved earlier by
70~ms, measurements of velocity moved earlier by 20~ms, and measurements
of pitch and roll left unshifted. \index{measurement!time lag}According
to the specifications for the INS, there may be lags in the times
when variables are transmitted from the unit of up to about 70~ms
for accelerations and attitude angles\index{attitude angle!lag} and
up to 110~ms for velocity components, so these shifts are within
the approximate range expected. For the purpose of comparing accelerations,
the optimal shifts were applied to the measurements for this pitch
maneuver.\footnote{There is no assurance that these shifts will be constant, and there
are cases where the apparent shifts even change during a flight Adjustments
are important for this comparison but the subsequent Kalman filter
results are relatively insensitive to all but the heading timing,
as discussed later. }
\begin{table}
\centering{}%
\fbox{\begin{minipage}[t]{1\columnwidth - 2\fboxsep - 2\fboxrule}%
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
\emph{fit} &
$c_{0}$ {[}m\,s$^{-2}${]} &
$c_{1}$ &
$\sigma$ {[}m\,s$^{-2}${]} &
$R^{2}$\tabularnewline
\hline
\hline
GPS east &
-0.0002 &
0.99914 &
0.02073 &
0.99988\tabularnewline
\hline
GPS north &
0.00025 &
0.99914 &
0.02061 &
0.99988\tabularnewline
\hline
INS east &
-0.00024 &
0.99984 &
0.01606 &
0.99993\tabularnewline
\hline
INS north &
0.00042 &
0.99983 &
0.01549 &
0.99993\tabularnewline
\hline
\end{tabular}
\par\end{center}
\caption{Results\index{navigation system!GPS}\index{navigation system!inertial}
of regression fitting the \emph{l-}frame\index{reference frame!l-frame@\emph{l-}frame}
\index{measurement!from INS}\index{measurement!from GPS}acceleration\index{acceleration!measurement}
as a function of the derivative\index{velocity of aircraft!derivative}
of the variable listed in the ``fit'' column. The coefficients\index{calibration!accelerometer!fit coefficients}
represent, for example, $\dot{v}_{e}\sim c_{0}+c_{1}a_{e}^{l}$ where
$a_{e}^{l}$ is the eastward component of acceleration after \index{reference frame!transformation}transformation
to the \emph{l-}frame. The residual standard deviation\index{deviation, standard!fit residual}
is tabulated as $\sigma,$ and the square of the correlation coefficient
is $R^{2}$.\label{tab:accel-fits}}
%
\end{minipage}}
\end{table}
\begin{table}
\centering{}%
\fbox{\begin{minipage}[t]{1\columnwidth - 2\fboxsep - 2\fboxrule}%
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
\emph{Component} &
$c_{0}$ {[}m~s$^{-2}$ {]} &
$c_{1}$\tabularnewline
\hline
\hline
BLONGA\sindex[var]{BLONGA: body-longitudinal acceleration} &
0.00079 &
1.00122\tabularnewline
\hline
BLATA\sindex[var]{BLATA: body-lateral acceleration} &
0.0028 &
1.05713\tabularnewline
\hline
\sindex[var]{BNORMA: body-normal acceleration}BNORMA &
-0.00556 &
0.99962\tabularnewline
\hline
\end{tabular}
\par\end{center}
\caption{Results like those in the preceding table but for \index{measurement!from IRU!calibration}accelerations\index{acceleration!measurement}
in the \index{reference frame!a-frame@\emph{a-}frame}\emph{a-}frame.\label{tab:a-frame-fits}}
%
\end{minipage}}
\end{table}
\sindex[lis]{c01@$c_{0,1}$=regression coefficients, acceleration}\sindex[lis]{sigma@$\sigma$=standard deviation}\sindex[lis]{R@$R$=correlation coefficient}Table
\ref{tab:accel-fits} shows the results of linear \index{fit!regression!acceleration}fits
of the measured accelerations\index{acceleration!fits} after \index{reference frame!transformation}transformation
to the \emph{l-}frame\index{reference frame!l-frame@\emph{l-}frame}
(with inertial corrections) to the derivatives\index{velocity of aircraft!derivative}\index{acceleration!from velocity derivative}
determined by differentiation. The GPS\index{navigation system!GPS}
measurements provide independent measurements of the accelerations,
so the first two fits can be considered tests of the calibrations\index{calibration!accelerometer}
of the accelerometers as well as a test of the algorithms and code.
They indicate only small offsets and near-unity slopes. The last
two fits compare only INS-provided values, so they test the validity
of the transformations and protect against any unknown calibration
adjustments that might have been applied by the INS without affecting
the reported accelerations.
A better direct estimate of accelerometer \index{measurement!from IRU!calibration}calibration
can be obtained by \index{reference frame!transformation}transforming
the \emph{l-}frame\index{reference frame!l-frame@\emph{l-}frame}
\index{acceleration!l-frame@\emph{l-}frame}accelerations determined
by differentiating the \index{navigation system!GPS}GPS-based velocity
to the \index{acceleration!a-frame@\emph{a-}frame}\index{reference frame!a-frame@\emph{a-}frame}\emph{a-}frame,
where they can be compared directly to the components of the measured
accelerations; i.e., by comparing the measurements \{BLATA, BLONGA,
BNORMA\} to $\mathbf{R}_{l}^{a}\thinspace\dot{\boldsymbol{v}}_{GPS}$
where $\boldsymbol{R}_{l}^{a}$ is the transformation from the \emph{l-}frame
to the \emph{a-}frame and $\dot{\boldsymbol{v}}_{GPS}$ is the aircraft
velocity as measured by the GPS.\sindex[lis]{vgps@$\dot{\boldsymbol{v}}_{GPS}$=GPS-based aircraft velocity vector}\index{acceleration!fits}
When this is done, the calibrations\index{calibration!accelerometer}\index{accelerometer!calibration|see {calibration, accelerometer}}
in Table~\ref{tab:a-frame-fits} result from linear fits. Lateral
accelerations\index{acceleration!lateral} are usually small, so the
second calibration is not as reliable as the other two, but all show
reasonable agreement between the calibrations in use and those indicated
by these fits. Although the small adjustments have little effect,
the calibrations indicated in this table will be applied to the measured
accelerations in the remainder of this technical note.
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{figure}
{\centering \includegraphics[width=\maxwidth]{figure/plot-acc-1}
}
\caption[Comparison of IRU-measured accelerations to the accelerations determined by differentiating the velocity components measured by the GPS receiver.]{Comparison of measured accelerations (BLONGA, BLATA, BNORMA, blue lines) to the accelerations determined by differentiating the velocity components measured by the GPS receiver and then transforming these to the a-frame (dashed red lines), from a portion of DEEPWAVE flight 15 that included a pitch maneuver, a speed run and a yaw maneuver at the times corresponding to the plot annotations.}\label{fig:plot-acc}
\end{figure}
\end{knitrout}
Figure \ref{fig:plot-acc}\index{acceleration!measurement}\index{comparison!acceleration}
shows a short flight segment comparing the measured \index{measurement!from IRU!surrogate for}accelerations
and the accelerations determined by differentiating the \index{navigation system!GPS}GPS-based
velocity and \index{reference frame!transformation}transforming to
the \index{reference frame!a-frame@\emph{a-}frame}\emph{a-}frame.
There were three \index{maneuver}maneuvers that introduced accelerations:
(i) a pitch maneuver\index{maneuver!pitch} near 3:17:00 UTC where
pilots varied the pitch rapidly, causing periodic accelerations normal
to the aircraft; (ii) a speed run\index{maneuver!speed run} centered
near 3:25:00 UTC where the airspeed\index{airspeed} was varied through
the flight envelope of the \index{aircraft!NSF/NCAR GV}GV, producing
large changes in pitch and resulting resolution of the acceleration
of \index{gravity}gravity into varying contributions to the longitudinal
and normal components of acceleration; and (iii) a yaw maneuver\index{maneuver!yaw}
near 3:34:00 UTC where lateral accelerations\index{acceleration!lateral}
were induced by rudder action. The good agreement and the near-identity
calibrations tabulated above support that the accelerations are being
treated properly in the calculations and also that the calibrations
of the accelerometers\index{calibration!accelerometer} are good.
\subsubsection{Validating the rotation rates\label{subsec:Checking-the-rotation}}
\index{measurement!rotation rate!validating}Independent measurements
of \index{measurement!from IRU}rotation rates are not available as
they are for accelerations, so similar direct tests and calibrations
are not possible. However, if the wind remains constant, a flight
maneuver consisting of a circular pattern\index{maneuver!circle}
should produce a 360$^{\circ}$change in heading, and the start and
end points can be identified from \index{navigation system!GPS}GPS-based
measurements by finding the times when the groundspeed components
return to their original values. DEEPWAVE\index{DEEPWAVE research project}
flight 15 included several circle\index{maneuver!circle} patterns
in the flight plan, including four from 3:38:00 to 3:55:00 UTC, two
counterclockwise and then two clockwise. Without inertial corrections,
which are very small integrated over the circles, the rate of change
in heading\index{heading!rate of change}\index{variable in data files!BYAWR}\sindex[var]{BYAWR: body yaw rate, inertial}
should be $\dot{\psi}$=BYAWR/$\cos\phi$ where BYAWR is the rotation
rate about the yaw axis as reported by the IRU and $\phi$ is the
roll angle, so comparing this to the change in heading tests that
the reported rotation rates are correct. The total heading change
from 3:38:50 to 3:46:40 is $-$718.2$^{\circ}$, while the sum of
BYAWR/$\cos\phi$ for the same time interval is $-720.1^{\circ}$,
so these agree to within 0.2\%. For the two clockwise turns from 3:46:40
to 3:54:30, the corresponding sums are 720.1 and 720.6, in still better
agreement. This only tests for consistency, because the INS\index{navigation system!inertial!mechanization}