150
A STUDY OF CFAR IMPLEMENTATION COST AND PERFORMANCE TRADEOFFS IN HETEROGENEOUS ENVIRONMENTS A Thesis Presented to the Faculty of California State Polytechnic University, Pomona In Partial Fulfillment Of the Requirements for the Degree Master of Science In Electrical and Computer Engineering By James J. Jen 2011

CFAR Thesis - James Jen - PDF

Embed Size (px)

DESCRIPTION

My Cal Poly Pomona Master's Thesis

Citation preview

Page 1: CFAR Thesis - James Jen - PDF

  

A STUDY OF CFAR IMPLEMENTATION COST AND PERFORMANCE

TRADEOFFS IN HETEROGENEOUS ENVIRONMENTS

A Thesis

Presented to the

Faculty of

California State Polytechnic University, Pomona

In Partial Fulfillment

Of the Requirements for the Degree

Master of Science

In

Electrical and Computer Engineering

By

James J. Jen

2011

Page 2: CFAR Thesis - James Jen - PDF

SIGNATURE PAGE     THESIS:       A STUDY OF CFAR IMPLEMENTATION COST AND         PERFORMATIVE TRADEOFFS IN HETEROGENEOUS         ENVIRONMENTS    AUTHOR:      James J. Jen   DATE SUBMITTED:    Spring 2011           Electrical and Computer Engineering    Dr. Zekeriya Aliyazicioglu               _________________________________________ Thesis Committee Chair Electrical and Computer Engineering College of Engineering    Dr. H.K Hwang                               _________________________________________ Electrical and Computer Engineering College of Engineering    Dr. James Kang                               _________________________________________ Electrical and Computer Engineering College of Engineering 

ii 

Page 3: CFAR Thesis - James Jen - PDF

ACKNOWLEDGEMENTS 

   I recall clearly last year when, at the end of a Signal Processing lecture, Profes‐

sor Hwang asked for interest in graduate research. My time at Cal Poly Pomona, up un‐

til that point, had been rocky and undistinguished. Tentative, I almost didn’t approach 

the professor that. I’m glad I did. The last year of graduate research with Professors 

Hwang and Zeki had meaningfully colored  and enriched my graduate studies. 

  Much  thanks to Professor H.K. Hwang and Zekeriya Aliyazicioglu: firstly, for the 

opportunity for research and their many Friday mornings spent on us students, and 

secondly, for their invaluable guidance and encouragement throughout. 

  Appreciation  too to Thales‐Raytheon for supporting the research, and particu‐

larly to Tom Nichols Walker Birrell for their expertise and input. 

  Thanks too to Nellie Qian, who, for most of the past year, had been my partner 

in crime in MATLAB ventures from Minimax beamforming, to antenna array interfer‐

ence suppression, and finally to this CFAR thing that had become our thesis.  

  And thanks, most sincerely, to my mom and dad— Emily and Chin‐Ping Jen— 

for their support, encouragement, and patience.  

iii 

Page 4: CFAR Thesis - James Jen - PDF

ABSTRACT 

  CFAR— Constant False Alarm Rate— is a critical component in RADAR detec‐

tion. Through the judicial setting of detection threshold, CFAR algorithms allow RADAR 

systems to set detection thresholds and reliably differentiate between targets of inter‐

est and interfering noise or clutter. 

  In many operating conditions, noise and clutter distributions may be highly het‐

erogeneous— with sudden jumps in clutter power or with the presence of multiple tar‐

gets in close proximity. A good CFAR algorithm must reliably operate in these condi‐

tions but without prohibitively high implementation costs. 

  In this thesis, we investigate a number of CFAR algorithms— new and old— all 

the while assessing their operational flexibility and cost of operation.  

  As balance of performance and implementation cost, two algorithms stood out 

as desirable: Variability Index (VI) CFAR— a procedure that allowed for dynamically se‐

lection between the leading, lagging, or whole of the reference windows— and Switch‐

ing (S) CFAR— a test cell technique that allowed for the selection of representative 

subsets of the reference cell as compared to the cell under test. We conclude with de‐

veloping a new algorithm: Switching Variability‐Index (SVI) CFAR that combines the ad‐

vantages of both VI and S CFAR. 

iv 

Page 5: CFAR Thesis - James Jen - PDF

TABLE OF CONTENTS 

Signature Page ………………………………………………………………………………………………………… 

Acknowledgements ………………………………………………………………………………………………... 

Abstract ………………………………………………………………………………………………………………….. 

Table of Contents ……………………………………………………………………………………………………. 

List of Tables …………………………………………………………………………………………………………... 

List of Figures ………………………………………………………………………………………………………….. 

1  Introduction ……………………………………………………………………………………………….. 

  1.1  Background …………………………………………………………………………………………… 

  1.2  Objective ………………………………………………………………………………………………. 

  1.3  Investigation Tool …………………………………………………………………………………. 

2  Background …………………………………………………………………………………………………. 

  2.1  Introduction ………………………………………………………………………………………….. 

  2.2  The Radar System …………………………………………………………………………………. 

  2.3  Doppler Processing ……………………………………………………………………………….. 

  2.4  Radar Signals…………………………………………………………………………………………. 

    2.4.1  Target ……………………………………………………………….……………………. 

    2.4.2  Clutter ……………………………………………………………………………………. 

    2.4.3  Noise ……………………………………………………………………………………… 

    2.4.4  Square Law Detector …………………………………………………..…………. 

  2.5  Radar Signal Environment …………………………………………………………………….. 

    2.5.1 Homogeneous …………………………………………………………………………. 

 

ii 

iii 

iv 

ix 

12 

12 

Page 6: CFAR Thesis - James Jen - PDF

    2.5.2 Multiple Targets ……………………………………………………………………… 

    2.5.3 Clutter Wall …………………………………………………………………………….. 

  2.6  About CFAR …………………………………………………………………………………………... 

    2.6.1 Probability of False Alarm ………………………………………………………..

    2.6.2 The CFAR Window …………………………………………………………………… 

    2.6.3 Probability of Detection ………………………………………………………….. 

    2.6.4 CFAR Loss ………………………………………………………………………………… 

  2.7  Monte Carlo Simulations ………………………………………………………………………. 

3  Cell Averaging CFAR …………………………………………………………………………………. 

  3.1  Implementation ……………………………………………………………………………………. 

  3.2  Homogeneous Environment………………………………………………………………….. 

    3.2.1 Probability of False Alarm………………………………………………………… 

    3.2.2 Detection…………………………………………………………………………………. 

  3.3 Multiple Targets……………………………………………………………………………………… 

  3.4 Clutter Wall…………………………………………………………………………………………… 

    3.4.1 Clutter Wall False Alarm…………………………………………………………… 

    3.4.2 Clutter Wall Detection……………………………………………………………… 

  3.5 Summary: CA‐CFAR Advantages and Disadvantages……………………………….. 

  3.6  A Combat for Multiple Targets: Smallest‐Of Cell Averaging CFAR…...…….. 

  3.7  A Remedy for Clutter Walls: Greatest‐Of Cell Averaging CFAR ……………… 

4  Variability‐Index  CFAR …………………………………………………………………………… 

  4.1  Implementation ……………………………………………………………………………………. 

13 

14 

15 

15 

17 

18 

19 

20 

22 

22 

24 

24 

25 

27 

29 

29 

31 

31 

32 

37 

42 

42 

vi 

Page 7: CFAR Thesis - James Jen - PDF

  4.2 VI‐CFAR Decision Logic…………………………………………………………………………… 

  4.3 Homogeneous Environment…………………………………………………………………… 

    4.3.1 Probability of False Alarm………………………………………………………… 

    4.3.2 Probability of Detection…………………………………………………………… 

  4.4 Masking Targets……………………………………………………………………………………… 

  4.5 Clutter Wall…………………………………………………………………………………………….. 

    4.5.1 Probability of False Alarm………………………………………………………… 

    4.5.2 Probability of Detection…………………………………………………………… 

5  Ordered Statistics CFAR ……………………………………………………………………………. 

  5.1  Implementation ……………………………………………………………………………………. 

  5.2  Homogeneous ………………………………………………………………………………………. 

    5.2.1  Probability of False Alarm ………………………………………………………. 

    5.2.2  Detection………………………………………………………………………………… 

  5.3 Multiple Targets……………………………………………………………………………………… 

  5.5  Clutter Wall ………………………………………………………………………………………….. 

6  Ordered Statistics Greatest‐Of CFAR ………………………………………………………… 

  6.1  Implementation ……………………………………………………………………………………. 

  6.2  Homogeneous ………………………………………………………………………………………. 

    6.2.1  Probability of False Alarm ………………………………………………………. 

    6.2.2  Detection………………………………………………………………………………… 

  6.3 Multiple Targets……………………………………………………………………………………… 

  6.5  Clutter Wall ………………………………………………………………………………………….. 

45 

50 

50 

51 

53 

58 

58 

59 

61 

61 

63 

63 

63 

66 

71 

74 

74 

75 

76 

77 

79 

83 

vii 

Page 8: CFAR Thesis - James Jen - PDF

7  Conclusions and Final Assessment………………………………………………………………. 

References ……………………………………………………………………………………………………………… 

Appendix A  MATLAB Functions ………………………………………………………………………….. 

  A.1  Radar Return Generation  …………………………………………………………………….. 

  A.2  Monte Carlo Simulations  ……………………………………………………………………… 

  A.3  Neyman Pearson Detection  …………………………………………………………………. 

  A.4  Cell Averaging CFAR ……………………………………………………………………………… 

  A.5  Greatest‐Of Cell Averaging CFAR ………………………………………………………….. 

  A.6  Smallest‐Of Cell Averaging CFAR …………………………………………………………… 

  A.7 Variability‐Index CFAR …………………………………………………………………………… 

  A.8  Ordered Statistics CFAR ………………………………………………………………………... 

  A.9  Ordered Statistics Greatest‐Of CFAR …………………………………………………….. 

  A.10 Switching CFAR ……………………………………………………………………………………. 

  A.11 Switching Variability‐Index CFAR …………………………………………………………. 

Appendix B  MATLAB Scripts ……………………………………………………………………………….. 

  B.1  Probability of False Alarm in Homogeneous Environment……………………… 

  B.2  Probability of False Alarm in Clutter Wall Environment…………………………. 

  B.3 Probability of Detection in Homogeneous/ Multiple Target Environment. 

  B.4 Probability of Detection in Clutter Wall Environment…………………………….. 

   

 

 

86 

89 

90 

90 

92 

93 

94 

97 

100 

103 

107 

110 

113 

116 

120 

120 

125 

129 

134 

 

viii 

Page 9: CFAR Thesis - James Jen - PDF

 

44 

86 

LIST OF TABLES 

Table 2.1 Swerling Targets ………………………………………………………………………………………. 

Table 2.2 Clutter Types …………………………………………………………………………………………… 

Table 4.1 VI‐CFAR Decision Logic……………………………………………………………………………… 

Table 7.1 CFAR Comparison……………………………………………………………………………………… 

 

ix 

Page 10: CFAR Thesis - James Jen - PDF

 

11

11 

12 

13 

14 

16 

17 

18 

19 

20 

21 

22 

23 

24 

25 

25 

26 

28 

LIST OF FIGURES 

Figure 2.1. Radar Block Diagram.…………………………………………………………………………….. 

Figure 2.2. Doppler Processing………………………………………………………………………………… 

Figure 2.3. Scattering for Different Swerling Targets……………………………………………….. 

Figure 2.4. Diode Conductance Characteristic.…………………………………………………………. 

Figure 2.5. Radar Return Statistics Before and After Square Law Detector ……………… 

Figure 2.6. Homogeneous Environment…………………………………………………………………… 

Figure 2.7. Multiple Targets. …………………………………………………………………………………… 

Figure 2.8. Clutter Edge…………………………………………………………………………………………… 

Figure 2.9. Exponential Distribution and Thresholding.……………………………………………. 

Figure 2.10. CFAR Window………………………………………………………………………………………. 

Figure 2.11. The Threshold. …………………………………………………………………………………….. 

Figure 2.12. A Typical Probability of Detection Curve illustrating CFAR Loss…………….. 

Figure 2.13. Monte Carlo with Exponential Distribution.…………………………………………. 

Figure 2.14. Monte Carlo Weight Function for Exponential Distribution………………….. 

Figure 3.1. Cell Averaging CFAR Block Diagram.…………………..…………………………………… 

Figure 3.2. CA‐CFAR Threshold in Homogeneous Environment………………………………… 

Figure 3.3. CA‐CFAR Theoretical v. Experimental PFA.……………………………………………… 

Figure 3.4. CA CFAR Homogeneous Probability of Detection.…………………………………… 

Figure 3.5. CA CFAR Homogeneous CFAR loss………………………………………………………….. 

Figure 3.6. CA‐CFAR Threshold with 1 Masking Target…………………………………………….. 

Figure 3.7. CA‐CFAR Probability of Detection with 1 to 3 masking targets……………….. 

Page 11: CFAR Thesis - James Jen - PDF

28 

29 

30 

31 

32 

33 

34 

34 

35 

35 

36 

37 

38 

39 

39 

40 

40 

41 

42 

45 

46 

47 

Figure 3.8. CA‐CFAR CFAR Loss  with 1 to 3 masking targets……………………………………. 

Figure 3.9. CA‐CFAR Threshold in Clutter Wall Transition………………………………………… 

Figure 3.10. CA‐CFAR Clutter Wall Probability of False Alarm.…………………………………. 

Figure 3.11. CA‐CFAR Clutter Wall Probability of Detection……………………………………… 

Figure 3.12. SOCA‐CFAR Block Diagram……………………………………………………………………. 

Figure 3.13. SOCA‐CFAR Experimental v. Theoretical PFA………………………………………… 

Figure 3.14. SOCA‐CFAR Homogeneous PD.……………………………………………….…………….. 

Figure 3.15. SOCA‐CFAR Homogeneous CFAR Loss ………………………………………………….. 

Figure 3.16. SOCA‐CFAR 1 Masking Target Probability of Detection………………………… 

Figure 3.17. SOCA‐CFAR 1 Masking Target CFAR Loss………………………………………………. 

Figure 3.18. SOCA‐CFAR Clutter Wall Probability of False Alarm……………………………… 

Figure 3.19. GOCA‐CFAR Block Diagram…………………………………………………………………… 

Figure 3.20. GOCA‐CFAR Homogeneous  Probability of False Alarm………………………… 

Figure 3.21. GOCA‐CFAR Homogeneous Probability of Detection……………………………. 

Figure 3.22. GOCA‐CFAR Homogeneous CFAR Loss………………………………………………….. 

Figure 3.23. GOCA‐CFAR Probability of Detection with 1 Masking Target………………… 

Figure 3.24. GOCA‐CFAR CFAR Loss with 1 Masking Target……………………………………… 

Figure 3.35. GOCA‐CFAR Clutter Wall PFA...………………………………………………………………. 

Figure 4.1. VI‐CFAR Block Diagram…………………………………………………………………………… 

Figure 4.2. VI‐CFAR ‐ Case I……………………………………………………………………………………… 

Figure 4.3. VI‐CFAR ‐ Case II……………………………………………………………………………………… 

Figure 4.4. VI‐CFAR ‐ Case III……………………………………………………………………………………. 

xi 

Page 12: CFAR Thesis - James Jen - PDF

Figure 4.5. VI‐CFAR ‐ Case IV……………………………………………………………………………………. 

Figure 4.6. VI‐CFAR ‐ Case V…………………………………………………………………………………….. 

Figure 4.7. VI‐CFAR Threshold in Homogeneous Environment…………………………………. 

Figure 4.8. VI‐CFAR Theoretical v. Experimental Homogeneous PFA ………………………… 

Figure 4.9. VI‐CFAR Probability of Detection Curve …………………………………………………. 

Figure 4.10. VI‐CFAR CFAR Loss in Homogeneous Environment……………………………….. 

Figure 4.11. VI‐CFAR Threshold 1 Masking Target……………………………………………………. 

Figure 4.12. VI‐CFAR Probability of Detection with 1 Masking Target………………………. 

Figure 4.13. VI‐CFAR PD Curve with varying Numbers of Masking Target…………………. 

Figure 4.14. VI‐CFAR CFAR Loss Curve with varying Numbers of Masking Target……… 

Figure 4.15. Three Targets……………………………………………………………………………………….. 

Figure 4.16. VI‐CFAR Probability of Detection with Three Masking Targets……………… 

Figure 4.17. VI‐CFAR Threshold in Clutter Wall Transition……………………………………… 

Figure 4.18. VI‐CFAR Clutter Wall Probability of False Alarm..………………………………….. 

Figure 4.19. VI‐CFAR Clutter Wall Probability of Detection..…………………………………….. 

Figure 5.1. OS‐CFAR Block Diagram……………………………………..…………………………………… 

Figure 5.2. OS‐CFAR Homogeneous PFA.…………………………………..………………………………. 

Figure 5.3. OS‐CFAR Threshold in Homogeneous Environment.………………………………. 

Figure 5.4. OS‐CFAR Homogeneous Probability of Detection…………………………………… 

Figure 5.5. OS‐CFAR Homogeneous CFAR Loss ………………………………………………………… 

Figure 5.6. OS‐CFAR Resistance to  Multiple Targets …..…………………………………………… 

Figure 5.7. OS‐CFAR Threshold with 1 Masking Target.……………………………………………. 

48 

49 

50 

51 

52 

52 

53 

54 

55 

55 

56 

57 

58 

59 

60 

61 

63 

64 

65 

65

66 

67 

xii 

Page 13: CFAR Thesis - James Jen - PDF

68 

69 

69 

70 

71 

72 

73 

74 

75 

76 

77 

78 

79 

79 

80 

81 

82 

82 

83 

84 

85 

88 

Figure 5.8. OS‐CFAR Probability of Detection with 1 Masking Target.………………………. 

Figure 5.9. OS‐CFAR CFAR Loss with 1 Masking Target ……………………………………………. 

Figure 5.10. OS‐CFAR Probability of Detection with 3 Masking Target.…………………… 

Figure 5.11. OS‐CFAR CFAR Loss with 3 Masking Target ………………………………………… 

Figure 5.12. OS‐CFAR in Clutter Wall Threshold.………………………………………………………. 

Figure 5.13. OS‐CFAR Clutter Wall Probability of False Alarm…………………………………… 

Figure 5.14. OS‐CFAR Clutter Wall Probability of Detection…………………………………….. 

Figure 6.1. OSGO‐CFAR Block Diagram.……………………………………………………………………. 

Figure 6.2. OSGO‐CFAR Threshold in Homogeneous Environment…………………………… 

Figure 6.3. OSGO‐CFAR Homogeneous PFA.……………………………………………………………… 

Figure 6.4. OSGO‐CFAR Homogeneous PD………………………………………………………………... 

Figure 6.5. OSGO‐CFAR Homogeneous CFAR Loss……………………………………………………. 

Figure 6.6. OSGO‐CFAR Resistance to Multiple Targets 

Figure 6.7. OSGO‐CFAR Threshold with 1 Masking Target………………………………………… 

Figure 6.8. OSGO‐CFAR PD with 1 Masking Target…………………………………………………… 

Figure 6.9. OSGO‐CFAR CFAR loss with 1 Masking Target………………………………………… 

Figure 6.10. OSGO‐CFAR PD with 3 Masking Target………………………………………………… 

Figure 6.11. OSGO‐CFAR CFAR loss with 3 Masking Target……………………………………… 

Figure 6.12. OSGO‐CFAR Threshold in Clutter Wall Transition…………………………………. 

Figure 6.13. OSGO‐CFAR Clutter Wall PFA…………………………………………………………………. 

Figure 6.16. OSGO‐CFAR Clutter Wall PD………………………………………………………………….. 

Figure 7.1 CFAR Obstacle Course……………………………………..………………………………………. 

xiii 

Page 14: CFAR Thesis - James Jen - PDF

CHAPTER 1 

Introduction 

1.1  Background 

  Radar return is often a mix of noise; clutter; and, if present, targets. A key com‐

ponent in RADAR processing is the setting of detection thresholds. These thresholds 

differentiate between targets of interest and unwanted radar returns. As operating en‐

vironments and conditions change, the amount and nature of noise and clutter also 

change. For accurate and reliable detection, the threshold must self‐adjust dynamically 

and intelligently. 

  CFAR, constant false alarm rate, represents a key technique in adaptively set‐

ting target detection threshold [1]. Employing a moving window, across range bins of 

data, CFAR algorithms look at neighborhoods of power returns in the estimate of the 

noise or clutter mean. By scaling the estimated mean with a pre‐calculated multiplier, 

the threshold is set as to limit false alarms to a desired rate. 

  CFAR algorithms are assessed for their abilities to maintain desired probabilities 

of detections (PD) and their probabilities of false alarm (PFA). The probability of detec‐

tion describes the chances of successfully declaring a target, when a target is actually 

present. The probability of false alarm describes the odds of incorrectly declaring a tar‐

get, when the signal is, in actuality, noise or clutter. 

  Developed CFAR algorithms must be able to operate in a variety of canonical 

environments: homogeneous, multiple targets, and clutter wall. In the homogeneous 

environment, a single target exists in a sea of clutter or noise of uniform noise. In the 

Page 15: CFAR Thesis - James Jen - PDF

multiple target exists, several targets exist in close proximity to one another. In the 

clutter wall environment, noise and/or clutter power experiences sudden, discontinu‐

ous increases or decreases. 

 

1.2   Objective 

  The goal of this study is to investigate and assess the variety of existing CFAR 

algorithms and judging  their performance in homogeneous, multiple target, and clut‐

ter wall environments. Towards this, the Ordered Statistics Greatest‐Of CFAR (OSGO‐

CFAR), Variability Index CFAR (VI‐CFAR), and Switching CFAR (S‐CFAR) are studied. 

While Cell Averaging CFAR (CA‐CFAR) and Ordered Statistics CFAR (OS‐CFAR) are also 

looked at, they are used primarily as basis of comparisons for the algorithms of inter‐

est. We end with development of our own CFAR technique, Switching Variability Index 

CFAR (SVI‐CFAR) that represents a hybrid approach between VI‐CFAR and S‐CFAR. 

 

1.3  Investigation Tool 

  Radar signals and CFAR algorithms are assessed through Monte Carlo, numeri‐

cal experiments. MATLAB was chosen as the investigation tool (Version 7.10.0, 

R2010a).  

Page 16: CFAR Thesis - James Jen - PDF

CHAPTER 2 

Background 

2.1  Introduction 

  Since their development during World War II, radar had grown to occupy criti‐

cal civilian and military roles. An introductory  understanding of radar processing and 

signals is necessary before getting into the analysis and assessment of CFAR algo‐

rithms.  

 

2.2   The Radar System 

  Originally acronymic as RADAR— for RAdio Detection And Ranging, common 

usage had established the word in its own right, as radar— a free‐standing noun. The 

original word, though, helps remind of the technology’s dual purpose: To detect tar‐

gets of interests and to ascertain their distance. 

Figure 2.1. Radar Block Diagram.  

Page 17: CFAR Thesis - James Jen - PDF

  Figure 2.1 shows a basic block diagram of a RADAR system. The particular sys‐

tem is monostatic— where a single antenna is multiplexed for both transmission and 

reception [2]. 

  The waveform generator forms a timing pulse to trigger the transmitter to send 

an electromagnetic pulse at a designed frequency. As this pulse is sent it, it will en‐

counter different objects at varying distances, and these objects will scatter back some 

of these pulses back to the antenna. 

  The timing and frequency of the return pulse corresponds to the relatives 

speeds and distance of the reflected target. The subsequent processing blocks— the 

A/D converter, the pulse compression, and the Doppler processor all helps extract the 

relevant information. 

  Pulse repetition interval (PRI) refers to the period of time before the successive 

radar pulses. Pulse repetition frequency (PRF) is simply the inverse of the PRI. During 

the period between successive pulses, during a given pulse repetition interval, the ra‐

dar system waits for back‐echoed pulses. Detected echoes are detected, binned and 

stored. 

  The amount of time a sent pulse is reflected back to the radar antenna is di‐

rectly proportional to the distance of the reflector: 

 

 

 

 

 

0

0

2: range (distance)

c : speed of light

: time

c tR

R

t

Page 18: CFAR Thesis - James Jen - PDF

2.3  Doppler Processing 

  With doppler processing, a radar system can not only detect target range and 

location, but also the radial velocity, the range rate. 

  A single target may be looked at several times over several pulse intervals . The 

change in power over a given range bin, or distance, across many pulse intervals may 

give a sense of the doppler shift, and hence, the speed of the target (Figure 2.2). 

  When discrete Fourier transform (DFT), through fast fourier transform (FFT), is 

performed on each range sample over its many range intervals, the pulse intervals are 

converted to doppler intervals (also called doppler bins). 

Figure 2.2. Doppler Processing.  

Page 19: CFAR Thesis - James Jen - PDF

2.4  Radar Signals 

  Radar signals are often composed of unwanted noise, undesired clutter returns, 

and a target of interest. Over a short period of time, each signal elements possesses its 

own stochastic distribution with a given power. Statistical characteristics of the signals 

change as they pass through a square law detector. 

 

2.4.1 Target 

  The power of a radar return depends on the distance and the effective radar 

cross section (RCS) of the target. Over distance r, the power of the signal diminishes by 

a factor r4. Many factors of the radar, the target, and the operating environment come 

together to determine the target’s RCS: the illumination angle, the frequency, the po‐

larization of the transmitted wave, target motion, vibration, and kinematics of the ra‐

dar itself. Rather than hopelessly describing a target’s RCS deterministically, they’re 

characterizing stochastically. 

  Building upon Marcum’s pioneering studies, Peter Swerling developed four ca‐

nonical stochastic models: Swerling I, II, III, and IV. With these Swerling models, the re‐

Table 2.1. Swerling Targets 

Model  Distribution     Notes 

Swerling I  Rayleigh    Scan‐to‐scan  Characterizes well targets like planes, with many independent reflectors Swerling II  Pulse‐to‐Pulse 

Swerling III  Chi‐Squared (Four degrees of freedom) 

  Scan‐to‐scan 

Swerling IV  Pulse‐to‐Pulse 

Swerling V  Non‐fluctuating   Also called Swerling 0 or Marcum’s Model 

Characterizes well targets like frigates, with one strong reflector and many smaller, weaker inde‐pendent reflectors 

1av

x

av

p x e

2

2

4av

x

av

xp x e

Page 20: CFAR Thesis - James Jen - PDF

turn power of a target will fluctuate— randomly increase and decrease— with a char‐

acteristic probability density function (PDF) with either quickly or slowly (Table 2.1).  

  The Swerling I and II models both characterized  with a  Rayleigh distribution 

and assumed to be  composed of many independent small reflectors; and with none 

dominating, they each return radar signals of about the same power. Swerling I models 

fluctuate slowly— from scan‐to‐scan (Figure 2.3a). Each pulse return is highly corre‐

lated. Swerling II models, meanwhile, fluctuate quickly— varying from pulse‐to‐pulse. It 

is claimed that observed data on airborne aircraft targets agree with Swerling Models I 

and II. 

  Swerling III and IV models are described by the Chi‐squared distribution with 

four degrees of freedom. They are conceptualized as many independent reflectors of 

roughly equal amplitude with one dominating reflector (Figure 2.3b). The Swerling III 

model varies slowly— from scan to scan while the Swerling IV model fluctuates 

(a) 

(b) 

Figure 2.3. Scattering for Different Swerling Targets.  The Swerling models assumes each tar‐get composed of a large number of independent scatters.  (a)  Swerling I/II. For Swerling  targets I and II, none of the independent scattering elements dominates: 

their reflected powers is comparable to one another. (b)  Swerling III/IV. For Swerling  targets III and IV, there is a single dominant non‐fluctuating scatter 

together with other smaller scatters. 

: Many scatter elements; each of approximately equal amplitudes. 

: One scattering element producing an amplitude much larger than other elements. 

Page 21: CFAR Thesis - James Jen - PDF

quickly— from pulse to pulse. The Swerling III/IV model is said to well‐characterize a 

frigate or corvette with one large target but with complex superstructures. 

 

2.4.2 Clutter 

  Clutter is unwanted radar returns. They may be a echoes from the environ‐

ment— as from ground, mountain, sea— or objects of no importance— as a flock of 

geese. Designation of clutter changes with the aims and designs of the radar system. A 

doppler weather system, for instance, may regard radar returns from a storm cloud 

with prime importance while the same cloud may only be interference to a civilian air 

traffic control radar. The stochastic characteristic of clutter varies with the operating 

parameters of the radar as well as the nature of the clutter source (Table 2.2). 

  Older radar systems had longer pulse repetition intervals and larger range bins. 

It was observed that ground clutter was well characterized with a Gaussian distribu‐

tion. However, as technology improved, and shorter pulse repetition intervals gave 

greater range resolution, large spikes in amplitude were observed in radar data. The 

Table 2.2. Clutter Types 

Model  Application  Equation 

Gaussian  Clouds   

Weibull Clutter  Land Clutter   

K‐distribution  Sea Clutter   

1

1

42

vv

v

hp x x K hx

v

1

expc c

c x xp x

b b b

2

22

1exp

22

xp x

Page 22: CFAR Thesis - James Jen - PDF

Gaussian distribution no longer fitted. 

  Studies during the late 70’s and early 80’s found that ground clutter were more 

accurately characterized with a Weibull distribution. Unlike the Gaussian distribution, 

the Weibull is characterized by two variables: a shaping coefficient and a mean coeffi‐

cient. 

  In contrast with ground clutter, sea clutter is highly correlated. The two‐

parameter k‐distribution well‐characterizes this. 

 

2.4.3 Noise 

  Gaussian white noise results from random thermal motion in electronic sys‐

tems. Unlike target and clutter returns, noise is always present.  As implied by its 

name, Gaussian noise is characterized by the bell‐shaped Gaussian distribution. 

 

2.4.4 Square Law Detector 

  The stochastic characteristic of received radar signals may change at the diode 

detector. The diode conductance characteristic is shown figure 2.4. Depending on the 

strength of the received signal, the detector may either operate in the conductance 

square or in the linear region. Each offers its advantages. Marcum showed that if the 

signal is low, lying below the conductance knee, the square law detector gave the best 

results. Linear detectors, meanwhile,  offers the greatest dynamic range and is best for 

high signals. Mathematically, in analysis, the square law detector offers additional ad‐

vantages.  

Page 23: CFAR Thesis - James Jen - PDF

  Both Rayleigh and Gaussian PDF’s, passing through the square law detector, 

become exponential distributions (Figure 2.5). Given the relative simplicity of integra‐

tion of the exponential function, this fact comes in handy in analytical treatments of 

target detection and false alarm rates. 

10 

Page 24: CFAR Thesis - James Jen - PDF

(a) 

(b) 

Figure 2.5. Radar Return Statistics Before and After Square Law Detector .  The square law detector changes stochastic PDF of the signal..  (a)  Gaussian Distribution. For Swerling  targets I and II, none of the independent scattering elements 

dominates: their reflected powers is comparable to one another. (b)  Exponential Distribution. For Swerling  targets III and IV, there is a single dominant non‐fluctuating 

scatter together with other smaller scatters. 

0 1 2 3 4 5 6 7 80

5

10

15

20

25

30

v

i

Square Law

Linear Law

Figure 2.4. Diode Conductance Characteristic.  Radar detection can either occur in the linear or the square region of the diode. 

11 

Page 25: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

35

40

45

50

Range Gates

Mag

nitu

de

Target 1

Clutter

0 10 20 30 40 50 60 70 80 90 1000

10

20

30

40

50

60

70

80

90

100

Range Gates

Mag

nitu

de

2.5 Radar Signal Environment 

  A number of different simplified RADAR environments have been used to assess 

and judge the efficacy and applicability of the various CFAR algorithm.  Although no 

one model captures the full complexity and nuance of actual operating conditions, they 

each test important qualities of the CFAR algorithm: The homogeneous environment, 

the multiple target environment, and the clutter edge environment. 

 

2.5.1 Homogeneous 

  The homogeneous environment is the most straight‐forward: It assumes a sin‐

gle target against an independent and identically distributed (iid) noise or clutter 

(Figure 2.6). 

  A homogeneous environment may arise when, for instance, the radar antenna 

makes no detection, and noise of a uniform power dominates the range bins; or when 

(a)  (b) 

Figure 2.6. Homogeneous Environment (a) There is just one target of power 25dB at range gate 37. The noise power is uniform at 5dB. (b) MATLAB simulation of homogeneous environment. 

12 

Page 26: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

35

40

45

50

Range Gates

Mag

nitu

de

Target 1

Target 2

Clutter

(a)  (b) 

0 10 20 30 40 50 60 70 80 90 1000

10

20

30

40

50

60

70

80

90

100

Range Gates

Mag

nitu

de

the clutter return over a great stretch of distance is of a constant environment (say, a 

forest, mountain, or ocean). 

  The homogeneous model assesses the ability of various CFAR algorithms as the 

simplest test for properly assessing its ability to estimate the noise/clutter mean in set‐

ting the threshold of detection.  

 

2.5.2 Multiple Targets 

  Targets of interest, however, don’t always exist in isolation along the range 

gates of a given doppler bin. By chance or design, targets may be within close proximity 

of one another (Figure 2.6). 

  Some CFAR algorithms suffer serious performative decline in multiple target 

cases. When the targets are within half a window length of one another, their high 

powers, improperly elevates the estimated mean of the background noise/clutter. 

Figure 2.7. Multiple Targets.  (a) At range gates 37 and 42, there are targets of power 25dB. (b) MATLAB simulation of multiple targets with exponential distribution. 

13 

Page 27: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

35

40

45

50

Range Gates

Mag

nitu

de

Clutter

0 10 20 30 40 50 60 70 80 90 1000

10

20

30

40

50

60

70

80

90

100

Range Gates

Mag

nitu

de

(a)  (b) 

When the resulting thresholds are set, they are higher than they lead to be, and result 

in losses in probability of detection (PD). 

 

2.5.3 Clutter Wall 

  In addition to one‐target assumption, the iid assumption of the background 

noise/clutter may also be violated. Radar environments often undergo abrupt changes 

in power— such as transitioning from clear land to a forest, or from clouds to the clear 

sky. These sudden jumps in mean power may throw off the CFAR algorithm, and intol‐

erably increase the probability of false alarm following the upward clutter wall transi‐

tion or decrease the probability of detection right before the clutter wall (Figure 2.8).  

Figure 2.8. Clutter Edge.  (a) At range gate 41, there is a sudden jump in clutter power; from 5dB to 10dB. (b) MATLAB simulation of a clutter edge with exponential distribution. 

14 

Page 28: CFAR Thesis - James Jen - PDF

2.6 About CFAR 

  The goal of CFAR— constant false alarm rate— algorithms is to set thresholds 

high enough to limit false alarms to a tolerable rate, but low enough to allow target 

detection. In the past, this differentiation between target and background noise and 

clutter were done by human radar operators upon a radar display screen. However, 

with the advent of computer technology, detection thresholding was able to be auto‐

mated, and thus bypassing much of the cost, inefficiencies, and limitations of a human 

operator. 

 

2.6.1 Probability of False Alarm 

  The probability of false alarm, PFA, is the chance that spikes in noise or clutter is 

mistaken by the CFAR algorithm as a target. As noise and clutter distributions are con‐

tinuous, extending from amplitudes very close to zero to amplitudes extending infi‐

nitely outwards. No matter how high thresholds are set, there will always be a finite 

chance of random noise or clutter exceeding that threshold. So rather than eliminating 

false alarms all together (this would be impossible), the goal of CFAR algorithms is to 

reliably estimate the mean noise, and scaling the estimated mean by a multiplier to 

obtain the threshold set high enough to limit false alarm rate to a tolerably small rate. 

  In many operating environments, the shape of the noise/clutter is known a 

prior. From off‐line computation or from the experience of the engineering, the prob‐

ability density function (PDF) of the noise can be known ahead of time. For instance, 

land clutter is often‐characterized by the Weibull distribution and Clouds by the Gaus‐

15 

Page 29: CFAR Thesis - James Jen - PDF

sian distribution. 

  Knowing the distribution, then, a measurement of the mean may be properly 

scaled with a threshold multiplier for a threshold that yields the desired probability of 

false alarm (Figure 2.9) 

  So the question becomes: How to estimate the mean noise or clutter over sev‐

eral range bins? The answer: The CFAR window 

  

 

x

Threshold Multiplier

Threshold

Noise Mean

(a) 

(b) 

Threshold Mean 

Figure 2.9. Exponential Distribution and Thresholding.  (a) Exponential PDF. (b) To get the threshold, the mean is scaled by a threshold multiplier. 

Noise Power 

Probab

ility Distrib

utio

Probability of False Alarm 

16 

Page 30: CFAR Thesis - James Jen - PDF

2.6.2 The CFAR Window 

  To estimate the mean noise/clutter present in a specific range bin, other local 

bins are used. Towards this end, most CFAR algorithms utilizes a moving window. 

There are several components to the CFAR window (Figure 2.10). 

  The cell under test (CUT)— also called the test cell— is the range bin with which 

the mean noise/clutter is estimated and with which the threshold is set. 

  To estimate the mean, references cells— cells local to the CUT— are used. Dif‐

ferent CFAR algorithms utilize different mathematical assessments and different deci‐

sions logical towards this end. Cell averaging CFAR, for instance, takes the mean of the 

reference cells while Ordered Statistics CFAR orders the reference cells from smallest 

to largest to take the kth largest as representative of the average noise. 

  Guard cells are optional and may be variable in length. A target, if present in 

the CUT, may straddle consecutive; and this would lead to inaccurate estimates of the 

noise. Guard cells then, would guarantee then, guard against this. Typically, one guard 

cell is used to either side of the CUT. 

Leading Window Lagging Window

Cell Under Test

Guard Cells

Figure 2.10. CFAR Window 

17 

Page 31: CFAR Thesis - James Jen - PDF

2.6.3 Probability of Detection 

  The CFAR reference window is used to set the threshold (Figure 2.11). The 

threshold helps differentiate between target a noise. If the signal power, for a given 

range cell, lies underneath the threshold, a target is deemed absent. If the same signal 

power exceeds the height of the threshold, then a target is declared present. 

  Since target powers are typically stochastic— with a  Swerling I/II or Swerlign 

III/IV distribution— the probability of detection is also stochastic. Around a mean 

value, the received target power would fluctuate to larger than the mean or smaller 

than the mean according to its characteristic PDF. Sometimes, it would flucturate as 

low as to miss the mean. So regardless to how well the threshold is set for a given 

probability of false alarm, there will always be the chance of missing a target, if it’s pre‐

sent. The probability of detection helps characterize the odds of detection over many 

trial runs or over many looks. 

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

Range Gates

Mag

nitu

de (

dB)

Threshold

Recieved Waveform

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

Range Gates

Mag

nitu

de (

dB)

Threshold

Recieved Waveform

Missed Detection 

Detection! 

(a)  (b) 

Figure 2.11. The Threshold.  (a) Missed detection. The target power falls underneath the threshold. (b) Successful detection. Target power greater than threshold. 

18 

Page 32: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Probability of Detection - Homogeneous Environment

Neyman-Pearson

CA-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Probability of Detection - Homogeneous Environment

CFAR Loss 

Figure 2.12. A Typical Probability of Detection Curve illustrating CFAR Loss 

2.6.4 CFAR Loss 

  Although the PD is a good measure of CFAR performance, it is relative to operat‐

ing conditions like the signal to noise ratio (SNR). So rather than PD, CFAR loss is the 

usual ruler used to judge CFAR performance. 

  Figure 12.12 shows a typical probability of detection curve. As the SNR in‐

creases, the probability of detection also increases. The Neyman‐Pearson detector 

represents the theoretical best detection— if perfect knowledge of the mean noise is 

known a priori. It is against the Neyman‐Pearson detector that the CFAR loss is calcu‐

lated. 

  CFAR loss is the SNR difference, for a given PD between the Neyman‐Pearson 

detector and the CFAR algorithm in interest. For instance, in Figure 12.12, for a prob‐

ability of detection of 0.4, the CFAR loss is close to 1dB of SNR. 

19 

Page 33: CFAR Thesis - James Jen - PDF

2.7 Monte Carlo Simulations 

  Frequently, desired probability of false alarms are very small— on the order of 

10‐5 or 10‐6. Then, in MATLAB, during a CFAR numerical experiment, a great number of 

trial runs— on the order of 108 or 109— are necessary before a reliable experimental 

probability of false alarm can be ascertained. This often intolerably  increases MATLAB 

run‐time or computer memory demands. Monte Carlo Importance Sampling repre‐

sents a class of numerical techniques used to reliably simulate very rare events [3].  

  Rather than using the original distribution to simulate events, with Monte Carlo 

Importance Sampling, a similar function but with a different mean is used, but with the 

same threshold (Figure 2.13). Any successful hits, then, with the new similar function, 

rather than having a weight of one, is fractionally weight with a pre‐derived equation 

(Figure 2.14). 

Th 

2 2

1exp

xf x

2 2

1expm

m m

xf x

610 10FA

Th

Q f x dx P

Figure 2.13. Monte Carlo with Exponential Distribution. 

20 

Page 34: CFAR Thesis - James Jen - PDF

2

2 2 2

2

2

1 1exp

: The weighing function for successful Monte Carlo "hits"

: Random varaible with uniform distribution

: Variance of the estimated exponential distribution

: V

m

m

m

w x x

w x

x

ariance of the Monte Carlo exponential distribution

 

Figure 2.14. Monte Carlo Weight Function for Exponential Distribution. 

21 

Page 35: CFAR Thesis - James Jen - PDF

Chapter 3 

Cell Averaging CFAR 

  Cell Averaging CFAR (CA‐CFAR) was developed early on, in 1947, by Howard 

Finn [1]. Of all the CFAR algorithms, CA‐CFAR works best in a homogeneous environ‐

ment. With increasing window size, the probability of detection for CA‐CFAR ap‐

proaches that  of the optimal Neyman‐Pearson detector. 

  However, when the homogeneous assumptions are violated, the performance 

of CA‐CFAR rapidly deteriorates [4].  As a  starting point in algorithmic development 

and as a basis of comparison, the algorithm is studied here. 

 

3.1 Implementation 

  In Cell Averaging CFAR, every reference cell is added together and multiplied to 

the threshold multiplier (Figure 3.1). For Gaussian noise and a square law detector, the 

Figure 3.1. Cell Averaging CFAR Block Diagram. 

Σ Σ

Σ

x

Threshold Multiplier

Threshold

1

1NFAP

22 

Page 36: CFAR Thesis - James Jen - PDF

threshold multiplier is given by: 

 

Variable α is the threshold‐multiplier, N is the total number of reference cells, and PFA 

is the desired probability of false alarm. 

  Typically, PFA is designed to be very low, on the order of 10‐5 or 10‐6. The refer‐

ence window length, N, must be selected by the designer as a balance of performance 

in homogeneous and heterogeneous environments.  

  A cell averaging threshold with PFA = 10‐4 and N = 32 is simulated for a single‐

target in a homogeneous environment (Figure 3.2). A single target Swerling I/II target is 

in range bin 37 in homogeneous noise. SNR is set to 15dB. We see that the threshold, 

1

1NFAP

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

Recieved Waveform

Figure 3.2. CA‐CFAR Threshold in Homogeneous Environment.   

23 

Page 37: CFAR Thesis - James Jen - PDF

across the noise‐only range bin, makes good clearance from the noise. There is a suc‐

cessful detection at the target. To either sides of the target in range bin 37 are elevated 

threshold plateau— these are artifacts from target presence. This is a characteristic of 

CA‐CFAR. Although it poses no problems in the single‐target homogeneous environ‐

ment case, with multiple targets, it negatively effects PD. 

 

3.2 Homogeneous Environment 

3.2.1 Probability of False Alarm 

  The primary function of any CFAR is to set the threshold to maintain the desired 

probability of false alarm.  To confirm the workability of the algorithm in a homogene‐

ous environment, we performed 10,000 trials for various designed PFA  (Figure 3.2). The 

experimental PFA closely matched the expected theoretical results. 

2 4 6 8 10 12 14 16 18 20 2210

-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Threshold Multiplier

Pro

babi

lity

of F

alse

Ala

rm

Theoretical PFA

Experimental PFA

Figure 3.3. CA‐CFAR Theoretical v. Experimental PFA.   

24 

Page 38: CFAR Thesis - James Jen - PDF

3.2.2 Detection 

  Cell Averaging CFAR successfully sets thresholds to keep to desired false alarm 

rates, but does this same threshold allow for good probability of detection? We first 

look at CA‐CFAR in a homogeneous environment— with a single target in a background 

of noise or clutter with uniform mean . The threshold was set for a single trial run in 

figure 3.1. In figure 3.4, we see the probability of detection profile over a range of SNR. 

For this data set, the CA‐CFAR window size was set to 32,  and a million trial per SNR 

was performed. The CA‐CFAR PD curve closely matches to the contours of the Neyman‐

Pearson detector. In figure 3.5, we see that the CFAR loss is much less than 1dB. 

 

 

25 

Page 39: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Neyman-Pearson

CA-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

5 10 15 200

0.5

1

1.5

SNR (dB)

CF

AR

Los

s (d

B)

CA-CFAR

5 10 15 200

0.5

1

1.5

SNR (dB)

CF

AR

Los

s (d

B)

Figure 3.4. CA‐CFAR Homogeneous Probability of Detection. 

Figure 3.5. CA‐CFAR Homogeneous CFAR loss 

26 

Page 40: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

Recieved Waveform

Figure 3.6. CA‐CFAR Threshold with 1 Masking Target 

3.2.2 Multiple Targets 

  Typical to CA‐CFAR, as seen in figure 3.1, to either side of a detected targets are 

elevated threshold plateaus. When another target falls within half a window length of 

it, each target’s probability of detection significantly decreases (Figure 3.6). This phe‐

nomena is referred to as “target masking.” 

  Detection performance diminishes drastically with numbers of interfering tar‐

gets (Figure 3.7). For CA‐CFAR with N=32, at SNR=20dB, the PD for a single target is 0.9. 

With one masking target, the PD drops to 0.7, and with three masking targets PD sinks 

to 0.4. The masking effect of multiple targets worsens with increasing signal to noise 

ratio (Figure 3.8). Whereas the CFAR loss for one interfering target is less than 2dB at 

27 

Page 41: CFAR Thesis - James Jen - PDF

5 10 15 200

5

10

15

CF

AR

Los

s (d

B)

SNR (dB)

5 10 15 20

0

5

10

15

CF

AR

Los

s (d

B)

SNR (dB)

homogeneous

one masking targettwo masking targets

three masking targets

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Pro

babi

lity

of D

etec

tion

Signal to Noise Ratio (dB)

0 5 10 15 20 25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Pro

babi

lity

of D

etec

tion

Signal to Noise Ratio (dB)

Neyman Pearson

homogeneous

one masking targettwo masking targets

three masking targets

Figure 3.7. CA‐CFAR Probability of Detection with 1 to 3 masking targets 

Figure 3.8. CA‐CFAR CFAR Loss  with 1 to 3 masking targets 

28 

Page 42: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

Recieved Waveform

Figure 3.9. CA‐CFAR Threshold in Clutter Wall Transition. 

SNR=10dB, at SNR=20dB, the CFAR loss increases to 6B. 

 

3.4 Clutter Wall  

  The clutter wall poses two different, but complementary challenges for CA‐

CFAR. Target masking occurs at the base of the clutter edge, and probability of false 

alarm rates increase drastically following a clutter wall edge.  

 

3.4.1 Clutter Wall False Alarm 

  Figure 3.10 summarizes the false alarm rates for various distances before and 

after the clutter wall.  The pink dash line at 10‐4 indicates the designed false alarm rate. 

29 

Page 43: CFAR Thesis - James Jen - PDF

0 5 10 15 20 25 3010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Number of Reference Cells in Clutter

Pro

babi

lity

of F

alse

Ala

rm

CA-CFAR

Figure 3.10. CA‐CFAR Clutter Wall Probability of False Alarm.  

Simulated for N=32, the blue line at 16 demarcates when half the reference cells are 

immersed in clutter. 

  PFA decreases drastically in the cells before the clutter wall. Having a false alarm 

rate smaller than the designed rate, at these regions, isn’t a concern. The problem oc‐

curs following the clutter wall, at reference cells 16 and outwards in Figure 3.10. At ref‐

erence cell 16, PFA reaches 10‐2; a false alarm rate nearly 100 times greater than the 

desired PFA at 10‐4! This degree of deviance from desired PFA is usually intolerable for a 

radar system’s designs; and other CFAR techniques were designed, in part, to remedy 

this deficiency. 

30 

Page 44: CFAR Thesis - James Jen - PDF

0 5 10 15 20 25 300

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Reference Cells in Clutter

Pro

babi

lity

of D

etec

tion

CA-CFAR

N/2 cells in clutter

Figure 3.11. CA‐CFAR Clutter Wall Probability of Detection 

3.4.2 Clutter Wall Detection 

  The detection at clutter walls is complementary to its false alarm effects. With 

CA‐CFAR, there is a gradual decrease of PD from before the wall to after it (Figure 3.11).   

Before the wall, from reference cells 1 to 16, the diminishment in PD can be attributed 

to a masking effect by the clutter region. The decrease in PD after the clutter wall can 

be accounted by the clutter to noise ratio (CNR) being smaller than the SNR. 

 

3.5 Summary: CA‐CFAR Advantages and Disadvantages 

  Although CA‐CFAR performs very well in homogeneous environments, its detec‐

tion performances suffers drastically with closely spaced multiple targets. At the clutter 

wall, false alarm probabilities increase by as much as an order of 102. This renders the 

algorithm all but useless in clutter wall environments. 

31 

Page 45: CFAR Thesis - James Jen - PDF

3.6 A combat for Multiple Targets: Smallest‐Of Cell Averaging CFAR 

  Smallest‐Of Cell Averaging (SOCA) CFAR was developed to remedy Cell‐

Averaging CFAR’s deficiencies in multiple target situations. If a secondary target intol‐

erably increases the average power of the leading or lagging window, then SO‐CFAR 

simply takes the smaller of the two.  [5]. SOCA‐CFAR works by selecting the smaller of 

the sum of the leading and lagging windows (figure 3.12). This procedure requires a 

threshold multiplier different from CA‐CFAR: 

 

 

As there is no analytical solution for αSO, it is to be solved analytically from the above 

equation. 

  In the homogeneous case, the algorithm can successfully hold for the designed 

probability of false alarm (Figure 3.13). Its Probability of Detection and CFAR loss is 

only slightly worse than CA‐CFAR (Figures 3.14, 3.15). The difference can be accounted 

Σ Σ

x

Threshold Multiplier

Threshold

Min

Figure 3.12. SOCA‐CFAR Block Diagram 

1/2 2

0

112 22

2 / 2 / 2

NN k

SO SOFA

k

Nk

PN N

k

32 

Page 46: CFAR Thesis - James Jen - PDF

0 5 10 15 20 25 3010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Threshold Multiplier

Pro

babi

lity

of F

alse

Ala

rm

p FA

Theoretical PFA

Experimental PFA

by SOCA‐CFAR using only half its reference windows (the smaller of the lead and lag) to 

estimate the noise or clutter mean. 

  In probability of detection, for the multiple‐target case, SOCA‐CFAR out‐

performs CA‐CFAR (Figure 3.16). SOCA‐CFAR follows the shape of the Neyman‐Pearson 

detector. Improvement over CA‐CFAR begins past SNR = 10dB for SOCA‐CFAR. In both 

PD and CFAR loss, SOCA‐CFAR is similar to Ordered Statistics CFAR (OS‐CFAR) in its ad‐

vantages over CA‐CFAR (Figure 3.17). 

Figure 3.13. SOCA‐CFAR Experimental v. Theoretical PFA 

33 

Page 47: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Neyman-Pearson

CA-CFAROS-CFAR

SOCA-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFARSOCA-CFAR

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

Figure 3.14. SOCA‐CFAR Homogeneous PD.   

Figure 3.15. SOCA‐CFAR Homogeneous CFAR Loss  

34 

Page 48: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Neyman-Pearson

CA-CFAROS-CFAR

SOCA-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

5 10 15 200

1

2

3

4

5

6

7

8

9

10

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFARSOCA-CFAR

5 10 15 200

1

2

3

4

5

6

7

8

9

10

CF

AR

Los

s (d

B)

SNR (dB)

Figure 3.16. SOCA‐CFAR 1 Masking Target Probability of Detection  

Figure 3.17. SOCA‐CFAR 1 Masking Target CFAR Loss  

35 

Page 49: CFAR Thesis - James Jen - PDF

  Whereas SOCA‐CFAR showed resistance to target masking, it is especially vul‐

nerable to the clutter wall environment (Figure 3.18). Near the clutter edge transition, 

the probability of false alarm is elevated by over 103 times over that of the design 

point! This is over 10 times worse than CA‐CFAR. 

  In practice, this clutter wall weakness of SOCA‐CFAR renders it unpractical. 

However, as we will see in the next chapter, the philosophy of SOCA‐CFAR may be use‐

ful if utilized in a environment‐specific fashion.  

0 5 10 15 20 25 3010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Number of Reference Cells in Clutter

Pro

babi

lity

of F

alse

Ala

rm

CA-CFAR

OS-CFARSOCA-CFAR

Figure 3.18. SOCA‐CFAR Clutter Wall Probability of False Alarm  

36 

Page 50: CFAR Thesis - James Jen - PDF

3.7  A Remedy for Clutter Walls: Greatest‐Of Cell Averaging CFAR  

  Greatest‐Of Cell Averaging (GOCA) CFAR was a method designed to avoid the 

elevated false alarm problem of clutter walls [6]. The algorithm works by summing 

each of the leading and lagging window and taking the larger of the two to be used 

with the threshold multiplier (Figure 3.19). 

  The threshold multiplier can be solved from this equation: 

 

 

Since an analytical equation doesn’t exist for αGO, it must be solved numerically. 

  In a homogeneous environment, the threshold multiplier was shown to be suc‐

cessfully maintaining the desired false alarm rate (Figure 3.20). 

  The probability of detection profile for GOCA‐CFAR in the homogeneous envi‐

ronment closely matches CA‐CFAR (Figure 3.21). The small additional CFAR loss of 

Σ Σ

x

Threshold Multiplier

Threshold

Max

Figure 3.19. GOCA‐CFAR Block Diagram 

1/2 /2 2

0

11 11 2 22

2 / 2 2 / 2 / 2

NN N k

GO GO GOFA

k

Nk

PN N N

k

37 

Page 51: CFAR Thesis - James Jen - PDF

2 4 6 8 10 12 14 16 18 2010

-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Threshold Multiplier

Pro

babi

lity

of F

alse

Ala

rm

FA

Theoretical PFA

Experimental PFA

Figure 3.20. GOCA‐CFAR Homogeneous  Probability of False Alarm 

GOCA‐CFAR can be accounted for by the fact that the CFAR only averages from half the 

available reference windows (the leading or lagging) as opposed to CA‐CFAR that 

makes use of the full set of reference windows. 

  In the masking target case, GOCA‐CFAR performs worse than CA‐CFAR (Figure 

3.23). The algorithm suffers as much as a 2dB CFAR loss over CA‐CFAR (Figure 3.24). If a 

masking target exists, it will either elevate the average of the leading or lagging win‐

dow. Since GOCA‐CFAR takes the larger of the two windows, it will always take the win‐

dow artificially elevated by the masking target.  

  It is in the clutter wall environment that GOCA‐CFAR vast outperforms that of 

CA‐CFAR (Figure 3.25). At the clutter wall, GOCA‐CFAR only suffers around a 10‐fold 

increase in PFA while CA‐CFAR suffers a 100‐fold increase. Over CA‐CFAR, this translates 

38 

Page 52: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Neyman-Pearson

CA-CFAROS-CFAR

GOCA-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

g

CA-CFAR

OS-CFARGOCA-CFAR

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

g

Figure 3.21 GOCA‐CFAR Homogeneous Probability of Detection 

Figure 3.22 GOCA‐CFAR Homogeneous CFAR Loss 

39 

Page 53: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Neyman-Pearson

CA-CFAROS-CFAR

GOCA-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

5 10 15 200

2

4

6

8

10

12

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFARGOCA-CFAR

5 10 15 200

2

4

6

8

10

12

CF

AR

Los

s (d

B)

SNR (dB)

Figure 3.23. GOCA‐CFAR Probability of Detection with 1 Masking Target  

Figure 3.24. GOCA‐CFAR CFAR Loss with 1 Masking Target  

40 

Page 54: CFAR Thesis - James Jen - PDF

0 5 10 15 20 25 3010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Number of Reference Cells in Clutter

Pro

babi

lity

of F

alse

Ala

rm

CA-CFAR

OS-CFARGOCA-CFAR

Figure 3.25. GOCA‐CFAR Clutter Wall PFA  

to roughly a 10‐fold improvement for GOCA‐CFAR. 

  GOCA‐CFAR is, in many ways, the complement to SOCA‐CFAR. Whereas SOCA‐

CFAR improves over CA‐CFAR in multiple targets but suffers in clutter wall, GOCA‐CFAR 

suffers in multiple targets but improves in clutter wall. 

41 

Page 55: CFAR Thesis - James Jen - PDF

Chapter 4 

 Variability‐Index CFAR 

  Variability‐Index CFAR (VI‐CFAR) dynamically switches between CA‐CFAR, SOCA‐

CFAR , and GOCA‐CFAR depending on the mean and the distribution of cells in the lead‐

ing and the lagging windows [7].  This approach captures particular advantages of each 

of the three CFAR approaches while avoiding their respective weaknesses.  

 

4.1 Implementation 

  For each of the leading window and the lagging window, the mean and the vari‐

ability index is computed. 

  The variability index (VI) is a second‐order statistics that is closely related to an 

estimate of the shape parameter. The greater the variability index, the greater the vari‐

ability in relatives magnitudes of the reference cells.  When, for instance, a leading 

window contains the high powers of targets, the variability would differentially weigh 

Figure 4.1. VI‐CFAR Block Diagram 

Σ Σ

x

Threshold Multiplier

Threshold

Σ(·)2

Logic

Σ(·)2

42 

Page 56: CFAR Thesis - James Jen - PDF

the target power over that of the lower powers of the noise and magnitude, resulting 

in a larger variability index. 

  The variability index may be calculated by this equation: 

 

 

 

Here, Xi is the power of reference cell i. The summation is taken over all cells Xi of ei‐

ther the leading or the lagging window. 

  Once the VI is computed, the algorithm then makes a determination of whether 

the leading and/or the lagging windows are variable.  If the variability index is smaller 

than variability index constant KVI, then the window is declared not variable. If the vari‐

ability index is larger than KVI, then the window is declared variable: 

 

 

  The Mean Ratio (MR) is a measure of how different the leading and lagging win‐

dow means are. It is computed as a ratio of the summations of the reference cells of 

each window: 

 

 

If the MR falls within bounds defined by the mean ratio constant, KMR, then the leading 

and lagging window means are declared the same: 

 

ii AA

B ii B

XX

MRX X

2

12

1

n

ii

n

ii

XVI n

X

Not Variable

VariableVI

VI

VI K

VI K

1 Same MeanMR MRK MR K

43 

Page 57: CFAR Thesis - James Jen - PDF

Leading Window Variable? 

Lagging Window Variable? 

Different Mean? 

VI‐CFAR Adaptive Threshold 

Equivalent CFAR Method 

No  No  No  αN ∙ ΣAB  CA CFAR 

No  No  Yes  αN ∙ max(ΣA,ΣB)  GOCA CFAR 

Yes  No  —  αN ∙ ΣB  CA CFAR 

No  Yes  —  αN ∙ ΣA  CA CFAR 

Yes  Yes  —  αN ∙ min(ΣA,ΣB)  SOCA CFAR 

Table 4.1. VI‐CFAR Decision Logic 

Illustrative Figure 

Figure 4.2 Case I 

Figure 4.3 Case II 

Figure 4.4 Case III 

Figure 4.5 Case IV 

Figure 4.6 Case V 

 

If not, then they are declared as different means: 

 

  Once the variability and mean determinations had been made, then, according 

to the logic of Table 4.1, CFAR is performed with either both the leading and lagging 

windows, one of them, the smaller of the two, or the larger of the two. 

  If only a half‐window is chosen— either only the leading or lagging window— 

then the threshold multiplier becomes 

 

 

If both leading and lagging windows are chosen, as in case I, then the threshold multi‐

plier becomes: 

 

 

A little more can be explained of the different cases of Table. 4.1 

1 or Different MeanMR MRMR K MR K

1

/2/2 1N

N FAP

1

1NN FAP

44 

Page 58: CFAR Thesis - James Jen - PDF

Figure 4.2. VI‐CFAR ‐ Case I 

0 10 20 30 40 50 60 70 80 90 1000

10

20

30

40

50

60

70

80

90

100

Range Gates

Pow

er (

linea

r)

Target 1

ClutterCell Under Test

0 10 20 30 40 50 60 70 80 90 1000

10

20

30

40

50

60

70

80

90

100

Range GatesP

ower

(lin

ear)

Signal

Cell Under Test

Lagging Window: ‐ Not Variable ‐ Mean similar to Lagging 

Leading Window: ‐ Not Variable ‐ Mean similar to Leading 

CFAR to use: 

Cell Averaging CFAR with all reference cells 

Situation: 

Homogeneous Environment 

4.2 VI‐CFAR Decision Logic 

Case I: Same means, both nonvaraible 

  When both the leading and lagging windows are nonvaraible, they aren’t likely 

to contain targets; and when both windows have similar means, then the reference 

window probably doesn’t straddle a clutter edge. The cell under test, then, is most 

likely in a homogeneous environment. VI‐CFAR, thus, uses CA‐CFAR.  

  The threshold is set by  summing all reference cells and using the CA‐CFAR 

threshold multiplier for length N: 

1

1NN FAP

45 

Page 59: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

160

180

200

Range GatesP

ower

(lin

ear)

Signal

Cell Under Test

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

Range Gates

Pow

er (

linea

r)

Target 1

Target 2Target 3

Cell Under Test

Lagging Window: ‐ Not Variable ‐ Mean similar to Leading 

Leading Window: ‐ Variable ‐ Mean similar to Lagging 

CFAR to use: 

Cell Averaging CFAR with leading window only 

Example Situation: 

Interfering targets in the leading window. 

Case II: Leading Window Variable, Lagging Window not Variable 

  A variable leading window is indicative of high spikes of power, and with a rea‐

sonable signal to noise ratio, these spikes are most likely the result of targets. The av‐

erage power, then, of the leading window wouldn’t be indicative of the noise/clutter 

contained. In this case, VI‐CFAR switches to using CA‐CFAR with the lagging window 

alone. 

  As the lagging window is nonvaraible, it is likely to contain noise/clutter only. To 

set the threshold, all cells in the lagging window is summed and multiplied to the 

threshold multiplier for window length N/2: 

Figure 4.3. VI‐CFAR ‐ Case II 

1

/2/2 1N

N FAP

46 

Page 60: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

160

180

200

Range Gates

Pow

er (

linea

r)

Signal

Cell Under Test

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

Range Gates

Pow

er (

linea

r)

Target 1

Target 2Target 3

Cell Under Test

Lagging Window: ‐ Not Variable ‐ Mean similar to Leading 

Leading Window: ‐ Variable ‐ Mean similar to Lagging 

CFAR to use: 

Cell Averaging CFAR with lagging window only 

Example Situation: 

Interfering targets in the lagging window. 

Case III: Lagging Window Variable, Leading Variable Nonvariable 

  This is the converse situation of Case II. When only the lagging window is vari‐

able and not the leading, the lagging window is likely to contain targets and the leading 

noise/clutter only. 

  In this case, the threshold is set by summing only the reference cells of the 

leading window and multiplied to a CA‐CFAR threshold multiplier for window length 

N/2: 

Figure 4.4. VI‐CFAR ‐ Case III 

1

/2/2 1N

N FAP

47 

Page 61: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

160

180

200

Range GatesP

ower

(lin

ear)

Signal

Cell Under Test

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

Range Gates

Pow

er (

linea

r)

Target 1

Target 2Target 3

Cell Under Test

Lagging Window: ‐ Variable ‐ Mean similar to Leading 

Leading Window: ‐ Variable ‐ Mean similar to Lagging 

CFAR to use: 

Smallest of Cell Averaging 

Example Situation: 

Interfering targets in both leading and lagging window 

Case IV: Both Windows Variable 

  When both the leading and lagging windows are variable, then both windows 

very likely contains targets. Whichever window used is likely to result in target mask‐

ing. VI‐CFAR, then, seeks to minimize the masking by taking the smaller of the sums of 

the leading and the lagging windows. The threshold is set by multiplying this smaller 

sum to a CA‐CFAR threshold multiplier for window length N/2:  

Figure 4.5. VI‐CFAR ‐ Case IV 

1

/2/2 1N

N FAP

48 

Page 62: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

200

250

Range GatesP

ower

(lin

ear)

Noise/Clutter

Cell Under test

0 10 20 30 40 50 60 70 80 90 1000

10

20

30

40

50

60

70

80

Range Gates

Pow

er (

linea

r)

Noise/Clutter

Cell Under test

Leading Window: ‐ Not Variable ‐ Mean different from leading 

Leading Window: ‐ Not Variable ‐ Mean different from lagging 

Use: 

Greatest of Cell Averaging 

Example Situation: 

Near clutter wall. Can be on either edge of the clutter edge. 

Case V: Not Variable but Different Mean 

  When both the leading and lagging variables are nonvariable but different in 

mean, then the cell under test is very likely near a clutter wall. The goal for VI‐CFAR , in 

this case, is to set the threshold by the higher edge of the clutter wall. 

  The threshold is set by taking the larger of the sums of the leading and lagging 

window and multiplied to the CA‐CFAR threshold multiplier for window length of N/2: 

Figure 4.6. VI‐CFAR ‐ Case  

1

/2/2 1N

N FAP

49 

Page 63: CFAR Thesis - James Jen - PDF

4.3 Homogeneous Environment 

4.3.1 Probability of False Alarm 

  In a homogeneous environment, VI‐CFAR largely reverts to CA‐CFAR and uses 

the CA‐CFAR threshold multiplier (Figure 4.8). In the threshold plot, we see that the 

threshold of VI‐CFAR almost entirely overlaps with that of CA‐CFAR. The discrepancy 

near and around the target— with CA‐CFAR displaying its distinctive elevated threshold 

plateaus near the target and VI‐CFAR with no such display— can be accounted for by 

the decision logic of VI‐CFAR. The CUTs N/2 cells in front of and N/2 cells behind the 

target will interpret the target as a masking target, and switch to using only the lagging 

and the leading windows respectively in the computation of CA‐CFAR. 

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFARVI-CFAR

Recieved Waveform

Figure 4.8. VI‐CFAR Threshold in Homogeneous Environment.  

50 

Page 64: CFAR Thesis - James Jen - PDF

2 4 6 8 10 12 14 16 18 20 2210

-7

10-6

10-5

10-4

10-3

10-2

10-1

Threshold Multiplier

Pro

babi

lity

of F

alse

Ala

rm

FA

Theoretical PFA

Experimental PFA

Figure 4.9. VI‐CFAR Theoretical v. Experimental PFA in Homogeneous Environment 

  Not surprisingly, in the homogeneous environment, VI‐CFAR successfully holds 

the probability of false alarm like CA‐CFAR (Figure 4.9). 

 

4.3.2 Probability of Detection 

  Across various signal to noise ratios, we see that in the homogeneous environ‐

ment, CA‐CFAR consistently slightly outperforms VI‐CFAR (Figure 4.10). This slight dis‐

crepancy is to be expected since, due to the random distribution of the noise/clutter, 

VI‐CFAR may very rarely misinterpret the homogeneous environment as a Type II, III, 

IV, or V environment. In these cases, VI‐CFAR switches to using only its leading or lag‐

ging windows in the estimation of the noise. 

  In CFAR loss, this translates to about a 0.25 dB loss across all SNR’s. 

51 

Page 65: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Neyman-Pearson

CA-CFAROS-CFAR

VI-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFARVI-CFAR

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

Figure 4.9. VI‐CFAR Probability of Detection Curve  

Figure 4.10. VI‐CFAR CFAR Loss in Homogeneous Environment 

52 

Page 66: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFARVI-CFAR

Recieved Waveform

Figure 4.11. VI‐CFAR Threshold 1 Masking Target.  

4.4 Masking Targets 

  With the variability index, VI‐CFAR may reliably predict the presence of masking 

targets in the leading window, the lagging window, or both windows and appropriately 

adjust to use of the lagging window or the leading window.  

  The VI‐CFAR threshold was simulated for a two‐target environment (Figure 

4.11). It successfully detects both targets. In the graph, OS‐CFAR also allowed for de‐

tection of both targets. CA‐CFAR, in contrast, detects only the bin 42 target; setting the 

threshold too high for the bin 37 target. 

  VI‐CFAR’s resistance to target masking in two‐target environments is clear in its 

probability of detection curve (Figure 4.12). For most signal to ratio values, the prob‐

ability of detection for VI‐CFAR is only slightly lower than that of OS‐CFAR. CA‐CFAR, 

53 

Page 67: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Neyman-Pearson

CA-CFAROS-CFAR

VI-CFAR

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Signal to Noise Ratio (dB)

Pro

babi

lity

of D

etec

tion

Figure 4.12. VI‐CFAR Probability of Detection with 1 Masking Target 

meanwhile, shows it usual loss in probability of detection wit target masking. 

  VI‐CFAR itself, however, begins to suffer masking effects when there are more  

than one interfering target (Figure 4.13). Whereas the CFAR loss of either homogenous 

and one‐interfering VI‐CFAR is less than 1dB, the CFAR loss for two and three interfer‐

ing targets increase to as much as 10dB (Figure 4.14). How can we account for such dis‐

parate results? 

  When two masking targets are randomly placed around a CUT, part of the time, 

there will be one in the leading window and one in the lagging window. In this case, no 

matter which window is selected, there will be a masking effect for the CUT (Figure 

4.15). In this case, VI‐CFAR only mollifies the effect by switching to SOCA‐CFAR. 

  On the other hand, when both interfering targets are together, either in the 

54 

Page 68: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Pro

babi

lity

of D

etec

tion

Signal to Noise Ratio (dB)

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Pro

babi

lity

of D

etec

tion

Signal to Noise Ratio (dB)

Neyman Pearson

homogeneous

one masking targettwo masking targets

three masking targets

5 10 15 200

2

4

6

8

10

12

CF

AR

Los

s (d

B)

SNR (dB)

5 10 15 20

0

2

4

6

8

10

12

CF

AR

Los

s (d

B)

SNR (dB)

homogeneous

one masking targettwo masking targets

three masking targets

Figure 4.13. VI‐CFAR Probability of Detection Curve with varying Numbers of Masking Target 

Figure 4.14. VI‐CFAR CFAR Loss Curve with varying Numbers of Masking Target 

55 

Page 69: CFAR Thesis - James Jen - PDF

leading or the lagging window, VI‐CFAR can entirely avoid their masking effects by se‐

lecting the other window. The differences can be profound. In Figure 4.16, the prob‐

ability of detection is computed for different distributions of two masking targets. 

56 

Page 70: CFAR Thesis - James Jen - PDF

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Pro

babi

lity

of D

etec

tion

Signal to Noise Ratio (dB)

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Pro

babi

lity

of D

etec

tion

Signal to Noise Ratio (dB)

Neyman-Pearson

Mean PD

Targets 1,3

Target 2

Figure 4.16. VI‐CFAR Probability of Detection with Three Masking Targets 

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

Range Gates

Pow

er (

linea

r)

Target 3: When the CUT reaches here, VI‐CFAR takes only the leading win‐dow for CA‐CFAR 

Target 1: When the CUT reaches here, VI‐CFAR takes only the lagging  window for CA‐CFAR 

Target 2: When the CUT reaches here, VI‐CFAR uses SOCA‐CFAR. 

Figure 4.15. Three Targets 

57 

Page 71: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFARVI-CFAR

Recieved Waveform

Figure 4.17. VI‐CFAR Threshold in Clutter Wall Transition.  

4.5 Clutter Wall 

4.5.1 Probability of False Alarm 

  When VI‐CFAR detects a clutter wall— a type V case— it switches to using  to 

GOCA‐CFAR. The algorithm uses the greater of the sum of the leading and lagging win‐

dow in its cell averaging CFAR computation. 

  In setting the threshold this way there are two consequences: Leading into the 

clutter wall, the VI‐CFAR threshold slopes upwards earlier and more steeply than CA‐

CFAR, and after the clutter wall, the VI‐CFAR has already stopped sloping and achieved 

a sufficiently high threshold (Figure 4.17). 

  This effects translates to good maintenance  of the probability of false alarm 

(Figure 4.18). We see that VI‐CFAR suffers less than a 10‐fold increase in PFA.‐‐ from 10‐4 

Greater threshold clearance for VI‐CFAR VI‐CFAR threshold increases 

earlier and more steeply than CA‐CFAR or OS‐CFAR 

58 

Page 72: CFAR Thesis - James Jen - PDF

0 5 10 15 20 25 3010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Number of Reference Cells in Clutter

Pro

babi

lity

of F

alse

Ala

rm

CA-CFAR

OS-CFARVI-CFAR

Figure 4.18. VI‐CFAR Clutter Wall Probability of False Alarm.  

to less than 10‐3. Cell averaging and Ordered Statistics CFAR, in contrast, suffers a 100‐

fold increase in PFA.  

 

4.5.2 Probability of Detection 

  The drawback of VI‐CFAR’s clutter wall strategy is a greater drop probability of 

detection than CA‐CFAR or OS‐CFAR (Figure 4.19). We see that for all cells under clut‐

ter, the probability of detection for VI‐CFAR is less than that of CA‐CFAR and OS‐CFAR. 

This is a result of two separate effects: threshold set too high before the clutter wall, 

and threshold set correctly after the clutter wall. 

  Due to VI‐CFAR’s GOCA‐CFAR clutter wall strategy, the threshold set before the 

clutter wall is set by the greater of the leading and lagging window sums. This means 

59 

Page 73: CFAR Thesis - James Jen - PDF

0 5 10 15 20 25 300

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Reference Cells in Clutter

Pro

babi

lity

of D

etec

tion

CA-CFAR

OS-CFAR

VI-CFAR

N/2 cells in clutter

Figure 4.19. VI‐CFAR Clutter Wall Probability of Detection.  

that the set threshold will be based, in part, on the larger powers of the clutter region. 

This elevates the threshold much higher than the level necessary to maintain the de‐

sired PFA of 10‐4. 

  After the clutter wall, when more than 16 cells are under clutter, all three 

CFARs experience a low probability of detection. This is to be expected. In these re‐

gions of the clutter wall, instead of noise, the target is in a clutter background. Since 

the clutter to noise ratio (CNR) is much smaller than the signal to noise ratio (SNR), the 

probability of detection for any CFAR would be lower. 

  The detection of CA‐CFAR and OS‐CFAR is higher than VI‐CFAR after the clutter 

wall because their thresholds were set too low— so low that the PFA is much greater 

than the designed 10‐4 point.  

60 

Page 74: CFAR Thesis - James Jen - PDF

1 2 3 k Nx x x x x

ˆ

OS kT a x

CHAPTER 5 

ORDERED STATISTICS CFAR 

  Cell‐averaging CFAR was the first of the CFAR methods. Assuming homogene‐

ous Gaussian white noise, through a sliding window, CA‐CFAR estimates the noise level 

of the cell under test, CUT, through an arithmetic sum of N adjacent cells . In heteroge‐

neous environments, however, CA‐CFAR performance rapidly degrades. 

  Ordered Statistics CFAR, OS‐CFAR, had been developed to compensate for 

much of CA‐CFAR’s pitfalls. Rather than taking the arithmetic mean of adjacent cells, 

OS‐CFAR ranks the N adjacent cells from smallest to largest and multiplies the kth larg‐

est cell to the appropriate threshold multiplier to set the threshold level. 

 

5.1 Implementation 

  Each reference cell is sorted from smallest to biggest: 

 

The kth‐largest cell is multiplied with the corresponding threshold multiplier to get the 

desired threshold: 

 

The kth‐ranked cell could be the median ranked value or even the largest value. As 

simulations will show, the larger x(k), the smaller the CFAR‐loss in homogeneous envi‐

ronment but the less the resistance to target masking and clutter‐edge transition. 

61 

Page 75: CFAR Thesis - James Jen - PDF

Sort

1

2

k

N

x

x

x

x

x

Threshold Multiplier

Threshold

Figure 5.1. OS‐CFAR Block Diagram 

!

! !

N N

k k N k

/2

/2

!

! !

COS

FA COS

N kNP

k N k M

1D OSOS

  Through a square‐law detector and in a background with Gaussian White Noise, 

the threshold‐multiplier αOS may be found from this equation: 

 

 

With the binomial given by: 

 

 

Here, N is the total number of reference cells; k is the rank of the representative cell 

used, PFA is the desired probability of false alarm, αOS is the threshold multiplier and Γ(∙) 

is the Gamma function. 

  The theoretical probability of detection is given by: 

 

 

62 

Page 76: CFAR Thesis - James Jen - PDF

5.2 Homogeneous 

5.2.1 Probability of False Alarm 

  Using a window size of 32 and a kth rank of 22 (k chosen for 0.7∙N), thresholds 

multipliers were used to set and simulated for probability of false alarms between 10‐1 

and 10‐7 (Figure 4.2). The experimental probability of false alarm conformed with theo‐

retical expectation (Figure 5.2). 

 

5.2.2 Detection 

  The ordered statistics threshold, in general, is higher than the cell averaging 

threshold for the same designed probability of false‐alarm (Figure 5.2). This higher 

2 4 6 8 10 12 14 16 18 20 2210

-7

10-6

10-5

10-4

10-3

10-2

10-1

Threshold Multiplier

Pro

babi

lity

of F

alse

Ala

rm

FA

Theoretical PFA

Experimental PFA

Figure 5.2. OS‐CFAR Homogeneous PFA.   

63 

Page 77: CFAR Thesis - James Jen - PDF

threshold results from slightly smaller reliability of an ordered statistics estimations as 

versus a mean estimation of the average noise (Figure 5.3). In the probability of detec‐

tion curve, this translates to a slightly smaller PD (Figure 5.4). 

  Amongst ordered statistics curves of the same window length, In the CFAR loss 

curve, the kth ranked cell chosen for the threshold multiplier also affects performance. 

In a homogeneous environment, in general, the higher the kth value used, the slightly 

better the probability of detection and the smaller the CFAR loss. 

  In the probability of detection curve, for a window size of 32, k=0.9N (or k=29) 

gave a lower CFAR loss about half a dB lower than that of k=0.5N (Figure 5.5). The re‐

sults for 0.9N was also about 0.1 dB better than that of 0.7N. All results, however, had 

at least half a dB of CFAR loss as much as the cell averaging CFAR of the same window 

length. 

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFARRecieved Waveform

Figure 5.3. OS‐CFAR Threshold in Homogeneous Environment.   

64 

Page 78: CFAR Thesis - James Jen - PDF

Figure 5.4. OS‐CFAR Homogeneous Probability of Detection 

Figure 5.5. OS‐CFAR Homogeneous CFAR Loss  

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFAR k=0.5 NOS-CFAR k=0.7 N

OS-CFAR k=0.9 N

5 10 15 200

0.5

1

1.5

CF

AR

Los

s (d

B)

SNR (dB)

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Neyman-Pearson

CA-CFAR

OS-CFAR k=0.5 NOS-CFAR k=0.7 N

OS-CFAR k=0.9 N

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

65 

Page 79: CFAR Thesis - James Jen - PDF

kth cell 

N‐k‐1 buffer cells 

smallest  largest 

N reference cells 

Figure 5.6. OS‐CFAR Resistance to Multiple Targets 

5.3 Multiple Targets 

  Ordered statistics CFAR offers natural resistance to target masking. With cell 

averaging CFAR, any target within the reference cell gets added to be multiplied with 

the threshold multiplier.  If the signal to noise ratio is 10dB, the estimated noise may 

be as much as 50% greater. 

  With ordered statistics, since only the ranked kth value is selected, interfering 

targets don't’ directly affect the threshold multiplier. Since target powers are typically 

much greater than noise or clutter power, when ranked, they find themselves below 

the k‐value. The cells larger than the kth cell, in the reference then, act as a kind of 

buffer against target masking. If the number of buffer cells exceed the number of inter‐

fering targets, then OS‐CFAR can escape directly influence of masking targets. Also, 

even when there are less targets than buffer cells, the less targets there are less indi‐

rect influence the kth cell will feel from the target. 

  Figure 5.7 shows an example of a OS‐CFAR threshold in the multiple target case. 

As is evident, OS‐CFAR draws a threshold low enough to detect both targets. CA‐CFAR, 

66 

Page 80: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFARRecieved Waveform

Figure 5.7 OS‐CFAR Threshold with 1 Masking Target.  

on the other hand, misses detection of one target. 

  With one masking target, the probability of detection curve of OS‐CFAR follows 

the contour of the Neyman‐Pearson detector (Figure 5.8). The cell averaging detection 

begins to suffer major detection degradation beyond an SNR of about 10 dB. The selec‐

tion of different k values, 0.5N, 0.7N, or 0.9N (or k of 16, 22, and 29 respectively for a 

window size of N=32) led to no major differences in detection probability. The CFAR 

losses for each k value selection were no more than 0.5dB different from one another 

(Figure 5.9). 

  In contrast to the homogeneous case, k=0.7N produced better detection and 

CFAR loss values than k=0.9N. The reason, most likely is that the buffer cells allowed by 

k=0.7N were more adequately insulating than that of k=0.9N. 

67 

Page 81: CFAR Thesis - James Jen - PDF

Figure 5.8. OS‐CFAR Probability of Detection with 1 Masking Target  

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Probability of Detection

CF

AR

Los

s (d

B)

Neyman-Pearson

CA-CFAR

OS-CFAR k=0.5 NOS-CFAR k=0.7 N

OS-CFAR k=0.9 N

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Figure 5.9. OS‐CFAR CFAR Loss with 1 Masking Target  

5 10 15 200

0.5

1

1.5

2

2.5

3

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFAR k=0.5 N

OS-CFAR k=0.7 N

OS-CFAR k=0.9 N

5 10 15 200

0.5

1

1.5

2

2.5

3

CF

AR

Los

s (d

B)

SNR (dB)

68 

Page 82: CFAR Thesis - James Jen - PDF

  With three masking targets, the  probability of detection  for k=0.9N became 

noticeably  worse than that of k=0.9N while k=0.5N continued to give only a very 

slightly less detection curve than k=0.9N (Figure 5.10). In CFAR loss, k=0.9N got to as 

much as nearly 2dB worse for SNR of 25dB than k=0.7N. The CFAR loss difference be‐

tween 0.7N and 0.5N was about 0.25dB throughout the range of SNRs simulated. 

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Probability of Detection

CF

AR

Los

s (d

B)

Neyman-Pearson

CA-CFAR

OS-CFAR k=0.5 NOS-CFAR k=0.7 N

OS-CFAR k=0.9 N

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Figure 5.10 OS‐CFAR Probability of Detection with 3 Masking Target  

69 

Page 83: CFAR Thesis - James Jen - PDF

5 10 15 200

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFAR k=0.5 N

OS-CFAR k=0.7 N

OS-CFAR k=0.9 N

5 10 15 200

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

CF

AR

Los

s (d

B)

SNR (dB)

Figure 5.11. OS‐CFAR CFAR Loss with 3 Masking Target  

70 

Page 84: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFARRecieved Waveform

Figure 5.12. OS‐CFAR in Clutter Wall Threshold.  

5.5 Clutter Wall 

  Ordered Statistics CFAR performs similarly to cell averaging CFAR at the clutter 

wall. Both algorithms only gradually slope upwards their thresholds approaching the 

clutter wall, and past the clutter edge, the thresholds of both algorithms get as low as 

to frequently allow false alarms (Figure 5.12). 

  OS‐CFAR algorithms selected for different ranked kth values perform differently 

at the clutter wall. In general, the greater the k, the less the probability of false alarm 

will increase at the clutter edge. Cell averaging CFAR for window length 32, at the clut‐

ter wall, suffers roughly a 100‐fold increase in false alarm rate: from the designed 10‐4 

to nearly 10‐2 (Figure 5.13). Ordered Statistics CFAR for k=0.5*N (k=16) and k=0.7*N 

71 

Page 85: CFAR Thesis - James Jen - PDF

Figure 5.13. OS‐CFAR Clutter Wall Probability of False Alarm  

(k=22) actually perform worse than CA‐CFAR— suffering a false alarm rate that’s nearly  

a thousand times more than what was desired! OS‐CFAR for k=0.9*N, in contrast, im‐

proved upon CA‐CFAR, with a false alarm rate that’s only between 10 times and 100 

times the designed rate of 10‐4. 

  Probability of detection performance at the clutter wall for the various k value 

is reversed from that for probability of false alarm. The smaller the k value, the less the 

target masking effect before the clutter wall. K=0.5N gave better detection results than 

k=0.7N, and k=0.9N.  

0 5 10 15 20 25 3010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Number of Reference Cells in Clutter

Pro

babi

lity

of F

alse

Ala

rm

CA-CFAR

OS-CFAR k=0.5*NOS-CFAR k=0.7*N

OS-CFAR k=0.9*N

72 

Page 86: CFAR Thesis - James Jen - PDF

Figure 5.14. OS‐CFAR Clutter Wall Probability of Detection 

 

0 5 10 15 20 25 300

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Reference Cells in Clutter

Pro

babi

lity

of D

etec

tion

CA-CFAR

OS-CFAR k=0.5*N

OS-CFAR k=0.7*N

OS-CFAR k=0.9*N

73 

Page 87: CFAR Thesis - James Jen - PDF

Chapter 6 

 Ordered Statistics Greatest‐Of CFAR 

  Although OS‐CFAR works well in avoiding the drawbacks of target masking, it 

costs more than CA‐CFAR to implement and it suffers more false alarms than CA‐CFAR 

at the clutter wall. Ordered Statistics Greatest‐Of CFAR (OSGO‐CFAR) represents an at‐

tempt to kill both problems with one stone. 

 

6.1 Implementation 

  OSGO‐CFAR operates similarly to OS‐CFAR in its sorting of reference cells. The 

difference, though, is that in OSGO CFAR, the N reference cells of the leading window 

and the lagging window are sorted independently, into two N/2 sublists (Figure 6.1). 

The kth largest cells of the two sublists are compared, and the larger of the two are 

Rank Order

x

Threshold Multiplier

Threshold

Rank Order

1

2

/2

k

N

y

y

y

y

1

2

/2

k

N

x

x

x

x

Max

Figure 6.1. OSGO‐CFAR Block Diagram  

  

Page 88: CFAR Thesis - James Jen - PDF

22

2 22

0 0

1 12 2 2 2

12

N Nk k N k j i

OSGOFA

j i

N N NN j ik k

P kN N j iik j i

used with the  threshold multiplier to set the threshold. 

  The threshold multiplier is given by this equation: 

 

 

As no analytical expression for threshold multiplier α exists, it must be solved numeri‐

cally. 

Figure 6.2. OSGO‐CFAR Threshold in Homogeneous Environment. 

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFAROSGO-CFAR

Recieved Waveform

6.2 Homogeneous 

  In the homogeneous environment, OSGO‐CFAR sets its threshold very similarly 

to OS‐CFAR. Neither method gives the elevated threshold plateaus around targets. 

75 

Page 89: CFAR Thesis - James Jen - PDF

0 5 10 15 20 2510

-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Threshold Multiplier

Pro

babi

lity

of F

alse

Ala

rm

p FA

Theoretical PFA

Experimental PFA

Figure 6.3. OSGO‐CFAR Homogeneous PFA.   

6.2.1 Probability of False Alarm 

  To verify that the OSGO CFAR works in limiting noise/clutter to the desired 

probability of false alarm, the algorithm was simulated to a number of desired PFA— 

from 10‐1 to about 10‐7. The measured probability of false alarm conformed well with 

expected results. 

 

6.2.2 Detection 

  In probability of detections, OSGO‐CFAR performs comparatively with OS‐CFAR 

(Figure 6.4). Like OS‐CFAR, OSGO‐CFAR gives a CFAR loss greater than that of OS‐CFAR. 

For CFAR algorithms of equal window length, OSGO‐CFAR always gave higher CFAR loss 

76 

Page 90: CFAR Thesis - James Jen - PDF

Figure 6.4. OSGO‐CFAR Homogeneous PD  

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Probability of Detection

CF

AR

Los

s (d

B)

Neyman-PearsonCA-CFAR

OS-CFAR k=0.7*N

OSGO-CFAR k=0.5*N/2

OSGO-CFAR k=0.7*N/2OSGO-CFAR k=0.9*N/2

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

than OS‐CFAR.  Also like OS‐CFAR, the greater the ranked kth value taken for the thresh‐

old multiplier, the less the CFAR loss (Figure 6.5). The CFAR loss for OSGO‐CFAR 

k=0.7*N/2 and k=0.9*N/2 were within 0.2 dB of the CFAR loss for k=0.7*N of OS‐CFAR. 

77 

Page 91: CFAR Thesis - James Jen - PDF

Figure 6.5. OSGO‐CFAR Homogeneous CFAR Loss 

5 10 15 200

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5C

FA

R L

oss

(dB

)

SNR (dB)

CA-CFAR

OS-CFAR k=0.7*N

OSGO-CFAR k=0.5*N/2OSGO-CFAR k=0.7*N/2

OSGO-CFAR k=0.9*N/2

5 10 15 200

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5C

FA

R L

oss

(dB

)

SNR (dB)

78 

Page 92: CFAR Thesis - James Jen - PDF

kth cell 

N/2‐k‐1 buffer cells 

smallest  largest 

N/2 reference cells 

Figure 6.6. OSGO‐CFAR Resistance to Multiple Targets 

6.3 Multiple Targets 

  Using ordered statistics, OSGO‐CFAR, like OS‐CFAR, offers strong resistance 

against target masking. However, due to the kth cell being taken from the larger of the 

sorted leading or lagging window, the amount of multiple target resistance is dimin‐

ished (Figure 6.6). Since OSGO‐CFAR only takes k from half a full window, there is only 

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFAROSGO-CFAR

Recieved Waveform

Figure 6.7. OSGO‐CFAR Threshold with 1 Masking Target. 

79 

Page 93: CFAR Thesis - James Jen - PDF

Figure 6.8. OSGO‐CFAR PD with 1 Masking Target 

N/2‐k‐1 buffer cells— as opposed to N‐k‐1 for OS‐CFAR. 

  The threshold set for OSGO‐CFAR looks a bit like that of OS‐CFAR (Figure 6.7). 

Like OS‐CFAR, OSGO‐CFAR avoids much of the masking problem of CA‐CFAR. 

  The probability of detection across SNR=2 and 24 shows little difference be‐

tween OS‐CFAR and the test OSGO‐CFAR algorithms. In terms of CFAR loss, we see that 

the OS‐CFAR and OSGO‐CFAR algorithms, in the single interfering target environment, 

performs within 0.5dB of one another. 

  One thing to note, though, is that OSGO‐CFAR for k=0.9*N/2 begins to suffer 

greater CFAR loss than OSGO‐CFAR for k=0.7*N/2 beyond an SNR of about 5dB. It is 

clear that for a window size of 32, the number of buffer cells offered by k=N/2*0.9 only 

offers enough masking resistance for one interfering target. 

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Probability of Detection

CF

AR

Los

s (d

B)

Neyman-PearsonCA-CFAR

OS-CFAR k=0.7*N

OSGO-CFAR k=0.5*N/2

OSGO-CFAR k=0.7*N/2OSGO-CFAR k=0.9*N/2

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Probability of Detection

CF

AR

Los

s (d

B)

80 

Page 94: CFAR Thesis - James Jen - PDF

Figure 6.9. OSGO‐CFAR CFAR loss with 1 Masking Target 

5 10 15 200

0.5

1

1.5

2

2.5C

FA

R L

oss

(dB

)

SNR (dB)

CA-CFAR

OS-CFAR k=0.7*N

OSGO-CFAR k=0.5*N/2OSGO-CFAR k=0.7*N/2

OSGO-CFAR k=0.9*N/2

5 10 15 200

0.5

1

1.5

2

2.5C

FA

R L

oss

(dB

)

SNR (dB)

  At three masking targets, we see that the probability of detection for OSGO‐

CFAR of k=0.9*N/2 decreases precipitously (Figure 6.10). Though slightly lower than 

the OS‐CFAR curve, the detection curve for both OSGO k=0.7*N/2 and k=0.5*N/2 both 

followed the contour of the Neyman‐Pearson detector. The CFAR loss for these two 

curves were about 2 dB— about half a dB more than OS‐CFAR. (Figure 6.11). 

81 

Page 95: CFAR Thesis - James Jen - PDF

Figure 6.10. OSGO‐CFAR PD with 3 Masking Target 

Figure 6.11. OSGO‐CFAR CFAR loss with 3 Masking Target 

5 10 15 200

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

CF

AR

Los

s (d

B)

SNR (dB)

CA-CFAR

OS-CFAR k=0.7*N

OSGO-CFAR k=0.5*N/2OSGO-CFAR k=0.7*N/2

OSGO-CFAR k=0.9*N/2

5 10 15 200

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

CF

AR

Los

s (d

B)

SNR (dB)

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Probability of Detection

CF

AR

Los

s (d

B)

Neyman-PearsonCA-CFAR

OS-CFAR k=0.7*N

OSGO-CFAR k=0.5*N/2

OSGO-CFAR k=0.7*N/2OSGO-CFAR k=0.9*N/2

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Probability of Detection

CF

AR

Los

s (d

B)

82 

Page 96: CFAR Thesis - James Jen - PDF

0 10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

Range Gates

Mag

nitu

de (

dB)

CA-CFAR

OS-CFAROSGO-CFAR

Recieved Waveform

Figure 6.12. OSGO‐CFAR Threshold in Clutter Wall Transition.   

6.5 Clutter Wall 

  In previous chapters, we’ve seen how cell averaging CFAR and ordered statistics 

CFAR both suffer from elevated false alarm rates near the clutter wall. Their PFA be‐

come elevated by as much as 100 times the set PFA. Can OSGO‐CFAR do better? 

  Figure 6.12 shows the OSGO‐CFAR threshold at a clutter wall. compared to CA‐

CFAR and OS‐CFAR, OSGO‐CFAR has a much better clearance at the clutter edge. This 

translates to significant improvements for keeping desired false alarm rates (Figure 

6.12). 

  The probability of false alarm were generated over a million trials for OSGO‐

CFAR of window length N=32 and kth rank of N/2*0.5, N/2*0.7, and N/2*0.9. At worst, 

83 

Page 97: CFAR Thesis - James Jen - PDF

Figure 6.12. OSGO‐CFAR Clutter Wall PFA  

0 5 10 15 20 25 3010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Number of Reference Cells in Clutter

Pro

babi

lity

of F

alse

Ala

rm

CA-CFAROS-CFAR k=0.5*N

OS-CFAR k=0.7*N

OSGO-CFAR k=0.5*N/2

OSGO-CFAR k=0.7*N/2OSGO-CFAR k=0.9*N/2

OSGO‐CFAR only suffers a ten‐fold increase form the designed PFA of 10‐4. This is a ten‐

fold improve over cell‐averaging CFAR. These results are also comparable to those of 

the clutter wall false alarm performances of VI‐CFAR (chapter 4). 

   The clutter wall probability of detection performance for OSGO‐CFAR can be 

found in figure 6.13. 

84 

Page 98: CFAR Thesis - James Jen - PDF

Figure 6.13. OSGO‐CFAR Clutter Wall PD 

0 5 10 15 20 25 300

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Reference Cells in Clutter

Pro

babi

lity

of D

etec

tion

CA-CFAR

OS-CFAR k=0.5*N

OS-CFAR k=0.7*NOSGO-CFAR k=0.5*N/2

OSGO-CFAR k=0.7*N/2

OSGO-CFAR k=0.9*N/2

85 

Page 99: CFAR Thesis - James Jen - PDF

Chapter 7 

Conclusions and Final Assessment 

  In the course of our research, we’ve studied a number of CFAR algorithms— 

each approaching the same problem of noise/clutter mean estimation and threshold 

setting through different techniques. Cell Averaging CFAR (CA‐CFAR) though optimal in 

the homogeneous environment, suffers major performative drop‐off in the heteroge‐

neous environments: with multiple targets and the clutter wall environment. 

  Although Ordered Statistics CFAR (OS‐CFAR), Smallest‐Of Cell Averaging CFAR 

(SO‐CFAR), and Greatest‐Of Cell Averaging CFAR (GOCA‐CFAR) each remedy one of the 

two heterogeneous conditions, they fail to fully remedy the other. 

  Two algorithms, Ordered Statistics Greatest‐Of CFAR (OSGO‐CFAR) and Variabil‐

ity Index CFAR (VI‐CFAR), balance performance in each environment— homogeneous, 

multiple targets, and clutter wall— to be practically feasible.  

  Figure 7.1 illustrates a practical CFAR environment. From it, we can see that 

only OSGO‐CFAR and VI‐CFAR detect the homogeneous target, the multiple target, and 

make the clutter wall without a false alarm. 

86 

Page 100: CFAR Thesis - James Jen - PDF

87 

Page 101: CFAR Thesis - James Jen - PDF

88 

5010

015

020

025

030

00510152025

Cel

l Ave

ragi

ng

Ord

ered

Sta

tistic

s

Var

abili

ty In

dex

Ord

ered

Sta

tistic

s G

reat

est O

f

Figure 7.1. C

FAR Obstacle Course 

Page 102: CFAR Thesis - James Jen - PDF

REFERENCES 

 

[1]  Finn, H.M., and Johnson, R.S.: ‘Adaptive detection mode with threshold control as a 

function of spatially sampled clutter estimates’, RCA Rev., 1968, vol.29, no.3, pp. 

414–464 

[2] Richards, M.A. Fundamentals of Radar Signal Processing. New York; McGraw‐Hill. 

2005   

[3] Kang, K.E. Radar System: Analysis, Design, and Simulation. Chapter 9: Monte Carlo 

Method and Function Integration. Pages 247‐260. Artech House 2008 

[4] Gandhi, P.P.; Kassam, S.A.; , "Analysis of CFAR processors in homogeneous back‐

ground," Aerospace and Electronic Systems, IEEE Transactions on , vol.24, no.4, 

pp.427‐445, Jul 1988 

[5]  Trunk, G.V.; , "Range Resolution of Targets Using Automatic Detectors," Aerospace 

and Electronic Systems, IEEE Transactions on , vol.AES‐14, no.5, pp.750‐755, Sept. 

1978 

[6] Hansen, V.G.; Sawyers, J.H.; , "Detectability Loss Due to "Greatest Of" Selection in a 

Cell‐Averaging CFAR," Aerospace and Electronic Systems, IEEE Transactions on , 

vol.AES‐16, no.1, pp.115‐118, Jan. 1980 

[7]  Smith, M.E.; Varshney, P.K.; , "Intelligent CFAR processor based on data variability," 

Aerospace and Electronic Systems, IEEE Transactions on , vol.36, no.3, pp.837‐847, 

Jul 2000 

[8] Rohling, H.; , "Radar CFAR Thresholding in Clutter and Multiple Target Situations," 

Aerospace and Electronic Systems, IEEE Transactions on , vol.AES‐19, no.4, pp.608‐

621, July 1983 

[9]  Elias‐Fuste, A.R.; de Mercado, M.G.G.; de los Reyes Davo, E.; , "Analysis of some 

modified ordered statistic CFAR: OSGO and OSSO CFAR," Aerospace and Electronic 

Systems, IEEE Transactions on , vol.26, no.1, pp.197 

[10]Cao, T.‐T.V.; , "Constant false‐alarm rate algorithm based on test cell information," 

Radar, Sonar & Navigation, IET , vol.2, no.3, pp.200‐213, June 2008 

89 

Page 103: CFAR Thesis - James Jen - PDF

Appendix A 

MATLAB Functions 

A.1 Radar Return Generation 

function [P]=simRangeData(N,iN,S,iS) % [P]=simRangeData(N,iN,S,iS) produces a vector P that corresponds to % the power over range gates with complex gaussian white noise and % Swerling I/II targets. % %Vector N determines the power of the complex gaussian white noise across % Range Cells controlled by indices iN. % % Vector S determines the power of a Swerling I/II target in Range Cells % dictated by vector iS pwrSig=10.^(S/10); %Converting signal power from dB to linear pwrNoise=10.^(N/10); %Converinting noise power from dB to linear nRangeGate=iN(end); %The total number of range gates %%GENERATING NOISE voltNoise_I=zeros(nRangeGate,1); %Pre-allocating for speed voltNoise_Q=zeros(nRangeGate,1); %Pre-allocating for speed I=length(iN); %Number of range gate segments with different noise power iLead=1; %This loop produces the voltage waveform for the gaussian white noise. %Every range gate segment between iLead and iLag will have its own power of %N(i) for i=1:I iLag=iN(i); voltNoise_I(iLead:iLag)=sqrt(pwrNoise(i)/2)*randn(iLag-iLead+1,1); %voltNoise_I Channel voltNoise_Q(iLead:iLag)=sqrt(pwrNoise(i)/2)*randn(iLag-iLead+1,1); %voltNoise_Q Channel iLead=iLag; end noise=voltNoise_I+j*voltNoise_Q; %Voltage waveform of the noise %%GENERATING TARGET RETURN signal=zeros(size(noise)); %Pre-allocating for speed I=length(iS); %The total number of signal returns for i=1:I %Power of the signal follows an exponential distribution pwrSwerling=exprnd(pwrSig(i),1,1); %Voltage waveform fo the signal signal(iS(i))=sqrt(pwrSwerling/2)+j*sqrt(pwrSwerling/2); end

90 

Page 104: CFAR Thesis - James Jen - PDF

%%GENERATING OVERALL SIGNAL data=signal+noise; %Overall voltage waveform P=abs(data).^2; %Power of the overall return

91 

Page 105: CFAR Thesis - James Jen - PDF

A.2 Monte Carlo Simulations 

function [expPfa]= monteCarloFalseAlarm(T,noisePwr) % This function performs a Monte Carlo Importance Sampling to determine % experimental probabilities of false alarm % % INPUTS % T - This is the threshold % % noisePwr - the noise power in linear scales % % OUTPUTS % expPfa: The experimental probability of false alram % % ASSUMPTIONS % Exponential distribution of noise/clutter % % AUTHORSHIP % James Jen % Cal Poly Pomona % % UPDATE HISTORY % May 28th, 2011 - created % nCFAR=size(T,2); nRangeGate=length(T); %The number of range gates monteCarloPwr=noisePwr*20; %Monte Carlo mean 20 times greater iCFARwin=1:nRangeGate; iCFARwin=iCFARwin(T(:,1)~=0); %indicies for non-zero thresholds nTrial=length(iCFARwin); %Exponential distribution with the Monte carlo power pwrMonteCarlo=exprnd(monteCarloPwr,nRangeGate,nCFAR); %The Monte carlo weight weight=monteCarloPwr/noisePwr*exp(-(1/noisePwr-1/monteCarloPwr)*pwrMonteCarlo); %with iCFAR win, we avoid the zero thresholsd at the ends of the range gate weight=weight(iCFARwin,:); T=T(iCFARwin,:); pwrMonteCarlo=pwrMonteCarlo(iCFARwin,:); %Logical indicies for when Monte Carlo power greater than threshold iFalseAlarm=T<pwrMonteCarlo; %When monte carlo weight greater, we use the corresponding weights to %determine false alarm. falseAlarm=zeros(size(weight)); falseAlarm(iFalseAlarm)=weight(iFalseAlarm); %The overall probability of false alarm expPfa=sum(falseAlarm)/nTrial;

92 

Page 106: CFAR Thesis - James Jen - PDF

function [Pd]=Pd_inf(Pfa,SNRdB) SNR=10.^(SNRdB./10); Pd=Pfa.^(1./(1+SNR));

A.3 Neyman Pearson Detector 

93 

Page 107: CFAR Thesis - James Jen - PDF

A.1 Cell Averaging CFAR 

function [T,iCFARwin]=CA_CFAR1(varargin) % [T,iCFARwin]=CA_CFAR(Pfa,N,nGuardCell, signal) produces a vector T, % that is the threshold produced by the Cell-Averaging CFAR (CA-CFAR) % method from the vector, signal, that is a one-dimension of range % power. % % % [T,iCFARwin]=CA_CFAR(Pfa,N,signal) produces a vector T, that is the % threshold produced by the Cell-Averaging CFAR (CA-CFAR) method from the % vector, signal, that is a one-dimension of range power. nGuard-Cell % defaults to one % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % nGuardCell- the number of guard cells to either side of the test cell % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detec-tor, will % have an exponential distribution % % SOURCE: % Threshold Multiplier equation taken from Chapter 7 of M.A. Rich-ard's % "Fundamentals of Radar Signal Processing" %

94 

Page 108: CFAR Thesis - James Jen - PDF

% AUTHORSHIP: % James Jen % Cal Poly Pomona % % UPDATE HISTORY: % May 28th, 2011 - Code Comment % May 30th, 2011 - Vectorize operations switch nargin case 3 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; nGuardCell=1; case 4 Pfa=varargin{1}; N=varargin{2}; nGuardCell=varargin{3}; signal=varargin{4}; otherwise error('Unexpected Number of Inputs') end %CFAR Computations and Parameters a=N*(Pfa^(-1/N)-1); %Threshold multiplier %Number of Range Gates L=length(signal); %If range gate inputs is a vector, then perform CFAR along entire range %gate: if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iRefWin=index; i=N/2+(1:2*nGuardCell+1); iRefWin(:,i)=[]; %Lienar index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i);

95 

Page 109: CFAR Thesis - James Jen - PDF

%Summing the content of each reference window B=sum(signal(iRefWin),2)/N; %Outuptted thershold T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=a*B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experi-mental % trial with one test cell else %Row index for the Cell Under Test (CUT) iCUT=N/2+nGuardCell+1; %Rwo index cor the Reference Cells iRefCell=1:N+2*nGuardCell+1; notRefCell=N/2+(1:1+2*nGuardCell); iRefCell(notRefCell)=[]; %Calculating the threshold B=sum(signal(:,iRefCell),2)/N; %sum of each cell in refer-ence win T=a*B; %Multiplying, a, the thresh-old mult end %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

96 

Page 110: CFAR Thesis - James Jen - PDF

function[T,iCFARwin]=GOCA_CFAR1(varargin) % [T,iCFARwin]=GOCA_CFAR(Pfa,N,k,signal) produces a vector T, that is the % threshold produced by the Greatest-Of Cell-Averaging CFAR (GOCA-CFAR) % method from the vector, signal, that is a one-dimension of range power. % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detector, will % have an exponential distribution % % SOURCE: % Threshold Multiplier equation taken from Chapter 7 of M.A. Richard's % "Fundamentals of Radar Signal Processing" % % AUTHORSHIP: % James Jen % Cal Poly Pomona % % UPDATE HISTORY: % May 28th, 2011 - Code Comment % switch nargin case 3 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; nGuardCell=1; case 4 Pfa=varargin{1}; N=varargin{2}; nGuardCell=varargin{3}; signal=varargin{4}; otherwise error('Unexpected Number of Inputs') end L=length(signal); %Total number of range bins %There is no analytical function to directly calculate the

A.5 Greatest‐Of Cell Averaging CFAR 

97 

Page 111: CFAR Thesis - James Jen - PDF

%thershold-multiplier, a. Instead, we will compute a look-up table and %interpolate the value. a_set=0.1:0.05:50; P=zeros(length(a_set),1); for i=1:length(a_set) a=a_set(i); sum_term=zeros(N/2,1); for k=0:N/2-1 sum_term(k+1,1)=nchoosek(N/2-1+k,k)*(2+a/(N/2))^-k; end sum_term=sum(sum_term); P(i,1)=2*((1+a/(N/2))^(-N/2)-(2+a/(N/2))^(-N/2)*sum_term); end %Threshold Multiplier: a=interp1(P,a_set,Pfa); %If range gate inputs is a vector, then perform CFAR along entire range %gate: if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iLead=index(:,1:N/2); iLag=index(:,N/2+2*nGuardCell+2:end); %Lienar index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i); %Performaing SO-CFAR leadWin=signal(iLead); sumLead=sum(leadWin,2); lagWin=signal(iLag); sumLag=sum(lagWin,2); B=max(sumLead,sumLag)/(N/2); %Outuptted thershold T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=a*B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experimental % trial with one test cell else %Rwo index cor the Reference Cells

98 

Page 112: CFAR Thesis - James Jen - PDF

leadWin=signal(:,1:N/2); sumLead=sum(leadWin,2); lagWin=signal(:,N/2+2*nGuardCell+2:end); sumLag=sum(lagWin,2); B=max(sumLead,sumLag)/(N/2); %Calculating the threshold T=a*B; %Multiplying, a, the threshold mult end %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

99 

Page 113: CFAR Thesis - James Jen - PDF

function[T,iCFARwin]=SOCA_CFAR1(varargin) % [T,iCFARwin]=SOCA_CFAR(Pfa,N,nGuardCell, signal) produces a vector T, % that is the threshold produced by the Smalelst-Of Cell-Averaging CFAR % (SOCA-CFAR) method from the vector, signal, that is a one-dimension of % range power. % % % [T,iCFARwin]=SOCA_CFAR(Pfa,N,signal) produces a vector T, that is the % threshold produced by the Smallest-Of Cell-Averaging CFAR (SOCA-CFAR % method from the vector, signal, that is a one-dimension of range power. % nGuardCell defaults to one % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % nGuardCell- the number of guard cells to either side of the test cell % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detector, will % have an exponential distribution % % SOURCE: % Threshold Multiplier equation taken from Chapter 7 of M.A. Richard's % "Fundamentals of Radar Signal Processing" % % AUTHORSHIP: % James Jen % Cal Poly Pomona % % UPDATE HISTORY: % May 28th, 2011 - Code Comment % May 30th, 2011 - Vectorize operations switch nargin case 3 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; nGuardCell=1; case 4 Pfa=varargin{1}; N=varargin{2};

A.6 Smallest‐Of Cell Averaging CFAR 

100 

Page 114: CFAR Thesis - James Jen - PDF

nGuardCell=varargin{3}; signal=varargin{4}; otherwise error('Unexpected Number of Inputs') end %Number of Range Gates L=length(signal); %Finding the threshold multiplier numerically a_set=0.1:0.1:150; P=zeros(length(a_set),1); for i=1:length(a_set) a=a_set(i); sum_term=zeros(N/2,1); for k=0:N/2-1 sum_term(k+1,1)=nchoosek(N/2-1+k,k)*(2+a/(N/2))^-k; end sum_term=sum(sum_term); P(i,1)=2*(2+a/(N/2))^(-N/2)*sum_term; end a=interp1(P,a_set,Pfa); %If range gate inputs is a vector, then perform CFAR along entire range %gate: if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iLead=index(:,1:N/2); iLag=index(:,N/2+2*nGuardCell+2:end); %Lienar index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i); %Performaing SO-CFAR leadWin=signal(iLead); sumLead=sum(leadWin,2); lagWin=signal(iLag); sumLag=sum(lagWin,2); B=min(sumLead,sumLag)/(N/2); %Outuptted thershold

101 

Page 115: CFAR Thesis - James Jen - PDF

T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=a*B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experimental % trial with one test cell else %Rwo index cor the Reference Cells leadWin=signal(:,1:N/2); sumLead=sum(leadWin,2); lagWin=signal(:,N/2+2*nGuardCell+2:end); sumLag=sum(lagWin,2); B=min(sumLead,sumLag)/(N/2); %Calculating the threshold T=a*B; %Multiplying, a, the threshold mult end %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

102 

Page 116: CFAR Thesis - James Jen - PDF

function[T,iCFARwin,selection,selectionName]=VI_CFAR1(varargin) % [T,iCFARwin]=VI_CFAR(Pfa,N,signal,K_VI,K_MR) produces a vector T, that % is the threshold produced by the Varaibility Index CFAR (CA-CFAR) method % from the vector, signal, that is a one-dimension of range power. % % [T,iCFARwin]=VI_CFAR(Pfa,N,signal) defaults to pre-determiend K_VI and % K_MR values % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % K_VI - Variability Index Constant % % K_MR - Mean Ratio Constant % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detector, will % have an exponential distribution % % SOURCE: % Based on "Intelligent CFAR Process Based on Data Variability" by M.E. % Smith and P.K. Varshney published in IEEE Transactions on Aerospace and % Electronic Systems Vol. 36 No. 30 July 2000 % % AUTHORSHIP: % James Jen % Cal Poly Pomona % % Updated: % May 23rd, 2011 - Fixed code mistakes % May 28th, 2011 - Code Comment % May 30th, 2011 - Vectorization, Speedup % switch nargin %User may use pre-defined varaibilty index and mean ratio constants case 3 Pfa=varargin{1}; %desired probability of false alarm N=varargin{2}; %total number of reference windows signal=varargin{3}; %vector of range bin to be thresholded K_VI=4.76; %default variaiblity index constant K_MR=1.806; %default mean ration constant nGuardCell=1;

A.7 Variability‐Index CFAR 

103 

Page 117: CFAR Thesis - James Jen - PDF

%User may use pre-defined varaibilty index and mean ratio constants case 4 Pfa=varargin{1}; %desired probability of false alarm N=varargin{2}; %total number of reference windows nGuardCell=varargin{3}; signal=varargin{4}; %vector of range bin to be thresholded K_VI=4.76; %default variaiblity index constant K_MR=1.806; %default mean ration constant %User may enter varaibility index and mean ratio constants case 5 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; K_VI=varargin{4}; %user-entered K_MR=varargin{5}; %user-entered nGuardCell=1; case 6 Pfa=varargin{1}; N=varargin{2}; nGuardCell=varargin{3}; signal=varargin{4}; K_VI=varargin{5}; %user-entered K_MR=varargin{6}; %user-entered otherwise error('Unexpected Number of Inputs'); end %Number of Range Gates L=length(signal); %Finding the threshold multiplier numerically a_N=(Pfa^(-1/N)-1); %Threshold multiplier a_N2=(Pfa^(-1/(N/2))-1); %If range gate inputs is a vector, then perform CFAR along entire range %gate: if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iLead=index(:,1:N/2); iLag=index(:,N/2+2*nGuardCell+2:end); %Linear index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i); %Summing and Squaring leadWin=signal(iLead); sumLead=sum(leadWin,2); sumSquareLead=sum(leadWin.^2,2);

104 

Page 118: CFAR Thesis - James Jen - PDF

lagWin=signal(iLag); sumLag=sum(lagWin,2); sumSquareLag=sum(lagWin.^2,2); %VARIABILITY INDEX leadVI=N/2*sumSquareLead./(sumLead.^2); lagVI=N/2*sumSquareLag./(sumLag.^2); leadVariable=leadVI>K_VI; lagVariable=lagVI>K_VI; %MEAN RATIO meanRatio=sumLead./sumLag; diffMean=(K_MR^-1>meanRatio)|(meanRatio>K_MR); oneVariable=xor(leadVariable,lagVariable); bothVariable=leadVariable & lagVariable; noneVariable=(~leadVariable) & (~lagVariable); B=zeros(nCUT,1); %LEAD WINDOW iLead=oneVariable & lagVariable; B(iLead)=sumLead(iLead)*a_N2; %LAG WINDOW iLag=oneVariable & leadVariable; B(iLag)=sumLag(iLag)*a_N2; %SO-CFAR iSO=bothVariable; B(iSO)=min(sumLead(iSO),sumLag(iSO))*a_N2; %GO-CFAR iGO=diffMean & noneVariable; B(iGO)=max(sumLead(iGO),sumLag(iGO))*a_N2; %CA-CFAR iCA=~diffMean & noneVariable; B(iCA)=(sumLead(iCA)+sumLag(iCA))*a_N; %Outuptted thershold T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experimental % trial with one test cell else nTrial=length(signal); iLead=1:N/2; iLag=N/2+2+2*nGuardCell:N+1+2*nGuardCell; %Summing and Squaring leadWin=signal(:,iLead); sumLead=sum(leadWin,2); sumSquareLead=sum(leadWin.^2,2);

105 

Page 119: CFAR Thesis - James Jen - PDF

lagWin=signal(:,iLag); sumLag=sum(lagWin,2); sumSquareLag=sum(lagWin.^2,2); %VARIABILITY INDEX leadVI=N/2*sumSquareLead./(sumLead.^2); lagVI=N/2*sumSquareLag./(sumLag.^2); leadVariable=leadVI>K_VI; lagVariable=lagVI>K_VI; %MEAN RATIO meanRatio=sumLead./sumLag; diffMean=(K_MR^-1>meanRatio)|(meanRatio>K_MR); oneVariable=xor(leadVariable,lagVariable); bothVariable=leadVariable & lagVariable; noneVariable=(~leadVariable) & (~lagVariable); T=zeros(nTrial,1); %LEAD WINDOW iLead=oneVariable & lagVariable; T(iLead)=sumLead(iLead)*a_N2; %LAG WINDOW iLag=oneVariable & leadVariable; T(iLag)=sumLag(iLag)*a_N2; %SO-CFAR iSO=bothVariable; T(iSO)=min(sumLead(iSO),sumLag(iSO))*a_N2; %GO-CFAR iGO=diffMean & noneVariable; T(iGO)=max(sumLead(iGO),sumLag(iGO))*a_N2; %CA-CFAR iCA=~diffMean & noneVariable; T(iCA)=(sumLead(iCA)+sumLag(iCA))*a_N; end selectionName{1}='CA'; selectionName{2}='GO'; selectionName{3}='SO'; selectionName{4}='lead'; selectionName{5}='lag'; selection=zeros(L,1); selection(iCA)=1; selection(iGO)=2; selection(iSO)=3; selection(iLead)=4; selection(iLag)=5; %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

106 

Page 120: CFAR Thesis - James Jen - PDF

function[T,iCFARwin]=OS_CFAR1(varargin) % [T,iCFARwin]=OS_CFAR(Pfa,N,k,nGuardCell signal) produces a threshold T, % from signal to limit to probability of false larm Pfa using Ordered % Statistics CFAR (OS-CFAR). N is the number of reference cells in the % CFAR window and k is the cell rank used to generate the threshold % multiplier. nGuardCell is the number of guard cells to either side of % CUT % % % [T,iCFARwin]=OS_CFAR(Pfa,N,k,nGuardCell signal) produces a threshold T, % from signal to limit to probability of false larm Pfa using Ordered % Statistics CFAR (OS-CFAR). N is the number of reference cells in the % CFAR window and k is the cell rank used to generate the threshold % multiplier. nGuardCell, the number of guard cells to either side of CUT % defaults to 1. % % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % k - the index used in computation of the threshold multiplier used in % computing the threshold, T. % % nGuardCell - the number of guard cells to either side of CUT % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detector, will % have an exponential distribution % % SOURCE: % Threshold Multiplier equation taken from Chapter 7 of M.A. Richard's % "Fundamentals of Radar Signal Processing" % % AUTHORSHIP: % James Jen % Cal Poly Pomona % % UPDATE HISTORY: % May 28th, 2011 - Code Comment % switch nargin %If "k" is omitted as an input, it defaults to round(0.7*N)

A.8 Ordered Statistics CFAR 

107 

Page 121: CFAR Thesis - James Jen - PDF

case 4 Pfa=varargin{1}; N=varargin{2}; k=varargin{3}; signal=varargin{4}; nGuardCell=1; %If "k" is entered as an input: case 5 Pfa=varargin{1}; N=varargin{2}; k=varargin{3}; nGuardCell=varargin{4}; signal=varargin{5}; otherwise error('Unexpected Number of Inputs'); end nLead=N/2; %size of lead window nLag=N/2; %size of lag window %Number of Range Gates L=length(signal); %The proper threshold multiplier is determined numerically: a_set=0.1:0.05:100; P=zeros(length(a_set),1); for i=1:length(a_set) a=a_set(i); P(i)=k*nchoosek(N,k)*gamma(a+N-k+1)*gamma(k)/gamma(a+N+1); end a=interp1(P,a_set,Pfa); %If range gate inputs is a vector, then perform CFAR along entire range %gate: if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iRefWin=index; i=N/2+(1:2*nGuardCell+1); iRefWin(:,i)=[]; %Lienar index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i); %sorting and taking the kth value sortedPwrSignal=sort(signal(iRefWin),2); B=sortedPwrSignal(:,k);

108 

Page 122: CFAR Thesis - James Jen - PDF

%Outuptted thershold T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=a*B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experimental % trial with one test cell else %Matrix index for the Cell Under Test (CUT) iCUT=N/2+nGuardCell+1; %Rwo index cor the Reference Cells iRefCell=1:N+2*nGuardCell+1; notRefCell=N/2+(1:1+2*nGuardCell); iRefCell(notRefCell)=[]; %sorting and taking the kth value sortedPwrSignal=sort(signal(:,iRefCell),2); B=sortedPwrSignal(:,k); T=a*B; %Multiplying, a, the threshold mult end %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

109 

Page 123: CFAR Thesis - James Jen - PDF

function[T,iCFARwin]=OSGO_CFAR1(varargin) % [T,iCFARwin]=OSGO_CFAR(Pfa,N,k,signal) produces a vector T, that is the % threshold produced by the Order Statistics Greatest-OF CFAR (OSGO-CFAR) % method from the vector, signal, based on the k-th ranked index. % % [T,iCFARwin]=OSGO_CFAR(Pfa,N,k,signal) produces a vector T, that is the % threshold produced by the Order Statistics Greatest-OF CFAR (OSGO-CFAR) % method from the vector, signal. "k" is defaulted to round(0.6*N/2) % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % k - the index used in computation of the threshold multiplier used in % computing the threshold, T. % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detector, will % have an exponential distribution % % SOURCE: % Elias-Fuste, A.R.; de Mercado, M.G.G.; de los Reyes Davo, E.; , % "Analysis of some modified ordered statistic CFAR: OSGO and OSSO CFAR," % Aerospace and Electronic Systems, IEEE Transactions on , vol.26, no.1, % pp.197-202, Jan 1990 % % AUTHORSHIP: % James Jen % Cal Poly Pomona % % UPDATE HISTORY: % May 28th, 2011 - Code Comment % May 30th, 2011 - Vectorized switch nargin %If "k" is omitted as an input, it defaults to round(0.7*N) case 4 Pfa=varargin{1}; N=varargin{2}; k=varargin{3}; signal=varargin{4}; nGuardCell=1; %If "k" is entered as an input: case 5

A.9 Greatest‐Of Ordered Statistics CFAR 

110 

Page 124: CFAR Thesis - James Jen - PDF

Pfa=varargin{1}; N=varargin{2}; k=varargin{3}; nGuardCell=varargin{4}; signal=varargin{5}; otherwise error('Unexpected Number of Inputs'); end %Number of Range Gates L=length(signal); %Numerically determining the threshold multiplier, a: a_set=1:0.05:100; Pfa_set=ones(size(a_set)); i=(0:N/2-k)'; j=(0:N/2-k)'; I=i*ones(1,length(i)); J=ones(length(j),1)*j'; for ia=1:length(a_set) a=a_set(ia); A=2*k^2*nchoosek(N/2,k)^2; B=factorial((N/2-k)*ones(length(j)))./factorial(J)./factorial(N/2-k-J); C=factorial((N/2-k)*ones(length(j)))./factorial(I)./factorial(N/2-k-I); D=(-1).^(N-2*k-J-I)./(N/2-I); E=gamma(N-J-I).*gamma(a+1)./gamma(N-J-I+a+1); Pfa_set(ia)=A*sum(sum(B.*C.*D.*E)); end a=interp1(Pfa_set,a_set,Pfa); %If range gate inputs is a vector, then perform CFAR along entire range %gate: if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iRefWin=index; i=N/2+(1:2*nGuardCell+1); iRefWin(:,i)=[]; iLead=iRefWin(:,1:N/2); iLag=iRefWin(:,N/2+1:N); %Lienar index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i); %sorting and taking the kth value

111 

Page 125: CFAR Thesis - James Jen - PDF

sortedLead=sort(signal(iLead),2); sortedLag=sort(signal(iLag),2); B=max(sortedLead(:,k),sortedLag(:,k)); %Outuptted thershold T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=a*B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experimental % trial with one test cell else %Matrix index for the Cell Under Test (CUT) iCUT=N/2+nGuardCell+1; %Rwo index cor the Reference Cells iLead=1:N/2; iLag=N/2+2*nGuardCell+2:N+1+2*nGuardCell; sortedLead=sort(signal(:,iLead),2); sortedLag=sort(signal(:,iLag),2); B=max(sortedLead(:,k),sortedLag(:,k)); T=a*B; %Multiplying, a, the threshold mult end %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

112 

Page 126: CFAR Thesis - James Jen - PDF

function[T,iCFARwin,A,B]=S_CFAR(varargin) % [T,iCFARwin]=S_CFAR(Pfa,N,signal,N_T,a,B_CA,B_0,B_1) produces a vector % T, that is the threshold produced by the Switching CFAR (S-CFAR) method % from the vector, signal, that is a one-dimension of range power. % % [T,iCFARwin]=S_CFAR(Pfa,N,signal,N_T,a) defaults to CA-CFAR threshold % multiplier for window size N for B_CA, B_0, and B_1 % % [T,iCFARwin]=S_CFAR(Pfa,N,signal) defaults to CA-CFAR threshold % multiplier for window size N for B_CA, B_0, and B_1; and to N_T of N/2 % and a=0.5 % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % N_T - S0 Threshold. When the number of members of set S0 exceed N_T, the % members of S0 are used in cell averaging. % % a - Test cell multiplier used in comparison and sorting between set S0 % and set S1 % % B_CA - Threshold multiplier used when switched to Cell Averaging % % B_0 - Threshold multiplier used for set S0 % % B_1 - Threshold multiplier used for set S1 % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detector, will % have an exponential distribution % % SOURCE: % Cao, T.-T.V.; , "Constant false-alarm rate algorithm based on test cell % information," Radar, Sonar & Navigation, IET , vol.2, no.3, pp.200-213, % June 2008 % % AUTHORSHIP: % James Jen % Cal Poly Pomona % % UPDATE HISTORY: % May 28th, 2011 - Code Comment %

A.10 Switching CFAR 

113 

Page 127: CFAR Thesis - James Jen - PDF

switch nargin case 3 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; N_T=N/2; a=0.5; aCA=N*(Pfa^(-1/N)-1); a0=aCA; a1=aCA; case 5 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; N_T=varargin{4}; a=varargin{5}; aCA=N*(Pfa^(-1/N)-1); a0=aCA; a1=aCA; case 7 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; N_T=varargin{4}; aCA=varargin{5}; a0=varargin{6}; a1=varargin{7}; aCA=a0; otherwise error('Unexpected Number of Inputs'); end nGuardCell=1; %size of the guard cell L=length(signal); T=zeros(size(signal)); if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iRefWin=index; i=N/2+(1:2*nGuardCell+1); iRefWin(:,i)=[]; %Lienar index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i); cCUT=signal(iCUT); %Summing the content of each reference window mRefWin=signal(iRefWin);

114 

Page 128: CFAR Thesis - James Jen - PDF

sumRefWin=sum(mRefWin,2)/N; %Subset iS0=a*repmat(cCUT,1,N)>mRefWin; S0=zeros(nCUT,N); S0(iS0)=mRefWin(iS0); nS0=sum(iS0,2); sumS0=sum(S0,2)./nS0; cBigNT=nS0>=N_T; cSmallNT=~cBigNT; B=zeros(nCUT,1); B(cSmallNT)=sumRefWin(cSmallNT); B(cBigNT)=sumS0(cBigNT); %Outuptted thershold T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=aCA*B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experimental % trial with one test cell else %Row index for the Cell Under Test (CUT) iCUT=N/2+nGuardCell+1; %Rwo index cor the Reference Cells iRefCell=1:N+2*nGuardCell+1; notRefCell=N/2+(1:1+2*nGuardCell); iRefCell(notRefCell)=[]; %Calculating the threshold mRefCell=signal(:,iRefCell); sumRefCell=sum(signal(:,iRefCell),2)/N; %sum of each cell in refer-ence win nTrial=length(signal); cCUT=signal(:,iCUT); iS0=a*repmat(cCUT,1,N)>mRefCell; S0=zeros(nTrial,N); S0(iS0)=mRefCell(iS0); nS0=sum(iS0,2); sumS0=sum(S0,2)./nS0; iBigNT=nS0>=N_T; iSmallNT=~iBigNT; B(iBigNT)=sumS0(iBigNT); B(iSmallNT)=sumRefCell(iSmallNT); T=aCA*B; %Multiplying, a, the threshold mult end %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

115 

Page 129: CFAR Thesis - James Jen - PDF

function[T,iCFARwin,selection,selectionName]=VI_CFAR1(varargin) % [T,iCFARwin]=VI_CFAR(Pfa,N,signal,K_VI,K_MR) produces a vector T, that % is the threshold produced by the Varaibility Index CFAR (CA-CFAR) method % from the vector, signal, that is a one-dimension of range power. % % [T,iCFARwin]=VI_CFAR(Pfa,N,signal) defaults to pre-determiend K_VI and % K_MR values % % INPUT: % Pfa - the desired probability of False Alarm % % N - the total number of CFAR windows-- with N/2 in the leading window % and N/2 in the lagging window. % % Signal - the power of the recieved waveform after having passed through % a square law detector. It is upon this that the threshold is set. % % K_VI - Variability Index Constant % % K_MR - Mean Ratio Constant % % OUTPUT: % T is the threshold set according to the functional inputs. % % iCFARwin are the indicies corresponding to the range gates where a CFAR % threshold is produced. When the first few and last few range bins are % used as test cells, they don't allow enough room for the entire CFAR % reference window. Subsequently, they are ignored and scipped. % % ASSUMPTION: % signal noise/clutter, after passing through a square law detector, will % have an exponential distribution % % SOURCE: % Based on "Intelligent CFAR Process Based on Data Variability" by M.E. % Smith and P.K. Varshney published in IEEE Transactions on Aerospace and % Electronic Systems Vol. 36 No. 30 July 2000 % % AUTHORSHIP: % James Jen % Cal Poly Pomona % % Updated: % May 23rd, 2011 - Fixed code mistakes % May 28th, 2011 - Code Comment % May 30th, 2011 - Vectorization, Speedup % switch nargin %User may use pre-defined varaibilty index and mean ratio constants case 3 Pfa=varargin{1}; %desired probability of false alarm N=varargin{2}; %total number of reference windows signal=varargin{3}; %vector of range bin to be thresholded K_VI=4.76; %default variaiblity index constant K_MR=1.806; %default mean ration constant nGuardCell=1;

A.11 Switching Variability‐Index CFAR 

116 

Page 130: CFAR Thesis - James Jen - PDF

%User may use pre-defined varaibilty index and mean ratio constants case 4 Pfa=varargin{1}; %desired probability of false alarm N=varargin{2}; %total number of reference windows nGuardCell=varargin{3}; signal=varargin{4}; %vector of range bin to be thresholded K_VI=4.76; %default variaiblity index constant K_MR=1.806; %default mean ration constant %User may enter varaibility index and mean ratio constants case 5 Pfa=varargin{1}; N=varargin{2}; signal=varargin{3}; K_VI=varargin{4}; %user-entered K_MR=varargin{5}; %user-entered nGuardCell=1; case 6 Pfa=varargin{1}; N=varargin{2}; nGuardCell=varargin{3}; signal=varargin{4}; K_VI=varargin{5}; %user-entered K_MR=varargin{6}; %user-entered otherwise error('Unexpected Number of Inputs'); end %Number of Range Gates L=length(signal); %Finding the threshold multiplier numerically a_N=(Pfa^(-1/N)-1); %Threshold multiplier a_N2=(Pfa^(-1/(N/2))-1); %If range gate inputs is a vector, then perform CFAR along entire range %gate: if min(size(signal))==1 %Organizing linear index into a matrix iWindow=1:N+1+2*nGuardCell; nCUT=L-N-2*nGuardCell; shiftCFAR=(0:nCUT-1).'; index=repmat(iWindow,nCUT,1)+repmat(shiftCFAR,1,N+1+2*nGuardCell); %Linear Index for the reference window iLead=index(:,1:N/2); iLag=index(:,N/2+2*nGuardCell+2:end); %Linear index for the CUT i=N/2+nGuardCell+1; iCUT=index(:,i); %Summing and Squaring leadWin=signal(iLead); sumLead=sum(leadWin,2); sumSquareLead=sum(leadWin.^2,2);

117 

Page 131: CFAR Thesis - James Jen - PDF

lagWin=signal(iLag); sumLag=sum(lagWin,2); sumSquareLag=sum(lagWin.^2,2); %VARIABILITY INDEX leadVI=N/2*sumSquareLead./(sumLead.^2); lagVI=N/2*sumSquareLag./(sumLag.^2); leadVariable=leadVI>K_VI; lagVariable=lagVI>K_VI; %MEAN RATIO meanRatio=sumLead./sumLag; diffMean=(K_MR^-1>meanRatio)|(meanRatio>K_MR); oneVariable=xor(leadVariable,lagVariable); bothVariable=leadVariable & lagVariable; noneVariable=(~leadVariable) & (~lagVariable); B=zeros(nCUT,1); %LEAD WINDOW iLead=oneVariable & lagVariable; B(iLead)=sumLead(iLead)*a_N2; %LAG WINDOW iLag=oneVariable & leadVariable; B(iLag)=sumLag(iLag)*a_N2; %SO-CFAR iSO=bothVariable; B(iSO)=min(sumLead(iSO),sumLag(iSO))*a_N2; %GO-CFAR iGO=diffMean & noneVariable; B(iGO)=max(sumLead(iGO),sumLag(iGO))*a_N2; %CA-CFAR iCA=~diffMean & noneVariable; B(iCA)=(sumLead(iCA)+sumLag(iCA))*a_N; %Outuptted thershold T=zeros(L,1); %For CUT too small or too big for complete %reference window, we set T to zero T(iCUT)=B; %Multiplying threshold multiplier %If range gate input is a matrix, then treat each row as one experimental % trial with one test cell else nTrial=length(signal); iLead=1:N/2; iLag=N/2+2+2*nGuardCell:N+1+2*nGuardCell; %Summing and Squaring leadWin=signal(:,iLead); sumLead=sum(leadWin,2); sumSquareLead=sum(leadWin.^2,2);

118 

Page 132: CFAR Thesis - James Jen - PDF

lagWin=signal(:,iLag); sumLag=sum(lagWin,2); sumSquareLag=sum(lagWin.^2,2); %VARIABILITY INDEX leadVI=N/2*sumSquareLead./(sumLead.^2); lagVI=N/2*sumSquareLag./(sumLag.^2); leadVariable=leadVI>K_VI; lagVariable=lagVI>K_VI; %MEAN RATIO meanRatio=sumLead./sumLag; diffMean=(K_MR^-1>meanRatio)|(meanRatio>K_MR); oneVariable=xor(leadVariable,lagVariable); bothVariable=leadVariable & lagVariable; noneVariable=(~leadVariable) & (~lagVariable); T=zeros(nTrial,1); %LEAD WINDOW iLead=oneVariable & lagVariable; T(iLead)=sumLead(iLead)*a_N2; %LAG WINDOW iLag=oneVariable & leadVariable; T(iLag)=sumLag(iLag)*a_N2; %SO-CFAR iSO=bothVariable; T(iSO)=min(sumLead(iSO),sumLag(iSO))*a_N2; %GO-CFAR iGO=diffMean & noneVariable; T(iGO)=max(sumLead(iGO),sumLag(iGO))*a_N2; %CA-CFAR iCA=~diffMean & noneVariable; T(iCA)=(sumLead(iCA)+sumLag(iCA))*a_N; end selectionName{1}='CA'; selectionName{2}='GO'; selectionName{3}='SO'; selectionName{4}='lead'; selectionName{5}='lag'; selection=zeros(L,1); selection(iCA)=1; selection(iGO)=2; selection(iSO)=3; selection(iLead)=4; selection(iLag)=5; %Range Cells where Thrsholds are set: iCFARwin=1:L; iCFARwin(T==0)=[];

119 

Page 133: CFAR Thesis - James Jen - PDF

Appendix B 

MATLAB Scripts 

B.1 Probability of False Alarm in Homogeneous Environment 

% % =============================================== % Probability of False Alarm - Homogeneous % =============================================== % % Computes the Probability of False Alarm for different CFAR % algorithms in the homogeneous conditiosn with various "desired" % Probability of false alrms % % ASSUMPTION % Swerling I/II Target % Exponential Noise/Clutter % % AUTHORSHIP % James Jen % Cal Poly Pomona % [email protected] % % %UPDATES % May 28th, 2011 Created % May 31st, 2011 Updated for faster CFAR functions % clear all close all clc % ######################### % % Simulation Parameters % % ######################### % %CFAR numbering CA=1; OS=2; GOCA=3; SOCA=4; OSGO=5; VI=6; S=7; SVI=8; CFARselection=VI; Pfa_set=10.^-(1:0.25:7); %Desired probability of false alarm nPfa=length(Pfa_set); nRangeGate=10^5; %Number of trials to run N=32;

120 

Page 134: CFAR Thesis - James Jen - PDF

nGuardCell=1; %number of Guard Cells noisePwr=1; % ################### % % CFAR Parameters % % ################### % %CFAR window size k_OS=round(N*0.7); %OS-CFAR k-rank k_OSGO=round(0.6*N/2); %k_OSGO k_rank % ############################## % % CFAR selection and setting % % ############################## % %Legend name CFARtype{CA}='CA-CFAR'; CFARtype{OS}='OS-CFAR'; CFARtype{GOCA}='GOCA-CFAR'; CFARtype{SOCA}='SOCA-CFAR'; CFARtype{OSGO}='OSGO-CFAR'; CFARtype{S}='S-CFAR'; CFARtype{VI}='VI-CFAR'; %CFAR plot color % #################################### % % Theoretical Threshold Multiplier % % #################################### % pwrSignal=exprnd(noisePwr,nRangeGate,1); a=zeros(size(Pfa_set)); switch CFARselection case CA clr =[0 0 0 ]/255; %black a=N*(Pfa_set.^(-1/N)-1); case OS k=k_OS; clr=[255 0 0 ]/255; %red a_set=0.1:0.05:100; P=zeros(length(a_set),1); for i=1:length(a_set) a=a_set(i); P(i)=k*nchoosek(N,k)*gamma(a+N-k+1)*gamma(k)/gamma(a+N+1); end for i=1:length(Pfa_set) Pfa=Pfa_set(i); a(i)=interp1(P,a_set,Pfa); end

121 

Page 135: CFAR Thesis - James Jen - PDF

case SOCA clr=[0 153 204]/255; %light blue a_set=0.1:0.1:150; P=zeros(length(a_set),1); for i=1:length(a_set) a=a_set(i); sum_term=zeros(N/2,1); for k=0:N/2-1 sum_term(k+1,1)=nchoosek(N/2-1+k,k)*(2+a/(N/2))^-k; end sum_term=sum(sum_term); P(i,1)=2*(2+a/(N/2))^(-N/2)*sum_term; end for i=1:length(Pfa_set) Pfa=Pfa_set(i); a(i)=interp1(P,a_set,Pfa); end case GOCA k=k_OSGO clr=[153 153 0 ]/255; %brown a_set=0.1:0.05:50; P=zeros(length(a_set),1); for i=1:length(a_set) a=a_set(i); sum_term=zeros(N/2,1); for k=0:N/2-1 sum_term(k+1,1)=nchoosek(N/2-1+k,k)*(2+a/(N/2))^-k; end sum_term=sum(sum_term); P(i,1)=2*((1+a/(N/2))^(-N/2)-(2+a/(N/2))^(-N/2)*sum_term); end for i=1:length(Pfa_set) Pfa=Pfa_set(i); a(i)=interp1(P,a_set,Pfa); end case OSGO clr=[0 204 51 ]/255; %orange k=k_OSGO; %Numerically determining the threshold multiplier, a: a_set=1:0.05:100; P=zeros(size(a_set)); i=(0:N/2-k)'; j=(0:N/2-k)'; I=i*ones(1,length(i)); J=ones(length(j),1)*j'; for ia=1:length(a_set) a=a_set(ia);

122 

Page 136: CFAR Thesis - James Jen - PDF

A=2*k^2*nchoosek(N/2,k)^2; B=factorial((N/2-k)*ones(length(j)))./factorial(J)./factorial(N/2-k-J); C=factorial((N/2-k)*ones(length(j)))./factorial(I)./factorial(N/2-k-I); D=(-1).^(N-2*k-J-I)./(N/2-I); E=gamma(N-J-I).*gamma(a+1)./gamma(N-J-I+a+1); P(ia)=A*sum(sum(B.*C.*D.*E)); end for i=1:length(Pfa_set) Pfa=Pfa_set(i); a(i)=interp1(P,a_set,Pfa); end case VI clr=[204 0 204]/255; %purple a=N*(Pfa_set.^(-1/N)-1); case S clr=[255 153 0 ]/255; %green case SVI end %for CFARselection % ##################### % % CFAR Thresholding % % ##################### % threshold=zeros(nRangeGate,nPfa); for i=1:nPfa stopBar= progressbar(i/nPfa,0); if(stopBar) break; end Pfa=Pfa_set(i); switch CFARselection case CA [threshold(:,i) iCFAR]=CA_CFAR1(Pfa,N,pwrSignal); case SOCA [threshold(:,i) iCFAR]=SOCA_CFAR1(Pfa,N,pwrSignal); case GOCA [threshold(:,i) iCFAR]=GOCA_CFAR1(Pfa,N,pwrSignal); case OS [threshold(:,i) iCFAR]=OS_CFAR1(Pfa,N,k,pwrSignal); case OSGO [threshold(:,i) iCFAR]=OSGO_CFAR1(Pfa,N,k_OSGO,pwrSignal); case VI [threshold(:,i) iCFAR]=VI_CFAR1(Pfa,N,pwrSignal); case SVI [threshold(:,i) iCFAR]=SVI_CFAR1(Pfa,N,pwrSignal); case S [threshold(:,i) iCFAR]=S_CFAR1(Pfa,N,pwrSignal); end %switch CFARselection end %for i=1:length(Pfa_set) close expPfa=monteCarloFalseAlarm(threshold(iCFAR,:),noisePwr);

123 

Page 137: CFAR Thesis - James Jen - PDF

% ############ % % Plotting % % ############ % figure semilogy(a,Pfa_set,'k-*','linewidth',2); hold on semilogy(a,expPfa,'color',clr,'linestyle','-','linewidth',2); legend('Theoretical P_F_A','Experimental P_F_A','location','SouthWest') title(['\fontsize{11}Theoretical v. Experimental P_F_A - \color{magenta}' CFARtype{CFARselection}]); xlabel('Threshold Multiplier'); ylabel('Probability of False Alarm')

124 

Page 138: CFAR Thesis - James Jen - PDF

% % =============================================== % Probability of False Alarm - Clutter Wall % =============================================== % % Computes the Probability of False Alarm with varying clutter edge % interference for various CFAR % % ASSUMPTION % Swerling I/II Target % Exponential Noise/Clutter % % AUTHORSHIP % James Jen % Cal Poly Pomona % [email protected] % % %UPDATES % May 28th, 2011 Created % May 31st, 2011 Updated for faster CFAR functions % clear all close all clc % ######################### % % Simulation Parameters % % ######################### % CNR_dB=10; Pfa=10^-4; %Desired probability of false alarm nTrial=1.5*10^6; %Number of trials to run N=32; nGuardCell=1; %number of Guard Cells % ################### % % CFAR Parameters % % ################### % %CFAR window size k_OS=round(N*0.7); %OS-CFAR k-rank k_OSGO=round(0.6*N/2); %k_OSGO k_rank % ############################## % % CFAR selection and setting % % ############################## % %CFAR numbering

B.2 Probability of False Alarm in Clutter Wall Environment 

125 

Page 139: CFAR Thesis - James Jen - PDF

CA=1; OS=2; GOCA=3; SOCA=4; OSGO=5; VI=6; S=7; SVI=8; %Total number of CFAR's nCFAR=6; %Legend name CFARtype{CA}='CA-CFAR'; CFARtype{OS}='OS-CFAR'; CFARtype{GOCA}='GOCA-CFAR'; CFARtype{SOCA}='SOCA-CFAR'; CFARtype{OSGO}='OSGO-CFAR'; CFARtype{S}='S-CFAR'; CFARtype{VI}='VI-CFAR'; %CFAR plot color clr=zeros(nCFAR,3); clr(CA,:) =[0 0 0 ]/255; %black clr(OS,:) =[255 0 0 ]/255; %red clr(GOCA,:)=[153 153 0 ]/255; %brown clr(SOCA,:)=[0 153 204]/255; %light blue clr(OSGO,:)=[0 204 51 ]/255; %orange clr(S,:) =[255 153 0 ]/255; %green clr(VI,:) =[204 0 204]/255; %purple % ############################### % % CFAR Environment Generation % % ############################### % CNR=10^(CNR_dB/10); noisePwr=1; %Noise Power clutterPwr=noisePwr*CNR; nWindow=N+2*nGuardCell+1; pwrNoise=exprnd(noisePwr,nTrial,nWindow); pwrClutter=exprnd(clutterPwr,nTrial,nWindow); iCUT=N/2+nGuardCell+1; iLead=1:N/2; iTest=N/2+nGuardCell+1; iLag=N/2+2*nGuardCell+2:nWindow; iClutterWall=[0 iLead iTest iLag]; nClutterWall=length(iClutterWall); % ############## % % Simulation % % ############## % threshold=zeros(nTrial,nCFAR); expPfa=zeros(nClutterWall,nCFAR);

126 

Page 140: CFAR Thesis - James Jen - PDF

for i=1:nClutterWall clutterWall=iClutterWall(i); stopBar= progressbar(i/nClutterWall,0); if(stopBar) break; end if clutterWall==0 pwrSignal=pwrNoise; pwrCUT=noisePwr; elseif clutterWall==nWindow pwrSignal=pwrClutter; pwrCUT=clutterPwr; else iClutter=1:clutterWall; iNoise=clutterWall+1:nWindow; pwrSignal(:,iNoise)=pwrNoise(:,iNoise); pwrSignal(:,iClutter)=pwrClutter(:,iClutter); if clutterWall>=iCUT pwrCUT=clutterPwr; else pwrCUT=noisePwr; end end threshold(:,CA)=CA_CFAR1(Pfa,N,pwrSignal); threshold(:,OS)=OS_CFAR1(Pfa,N,k_OS,pwrSignal); threshold(:,SOCA)=SOCA_CFAR1(Pfa,N,pwrSignal); threshold(:,GOCA)=GOCA_CFAR1(Pfa,N,pwrSignal); threshold(:,OSGO)=OSGO_CFAR1(Pfa,N,k_OSGO,pwrSignal); threshold(:,VI)=VI_CFAR1(Pfa,N,pwrSignal); expPfa(i,:)=monteCarloFalseAlarm(threshold,pwrCUT); end close %close progress bar % ############ % % Plotting % % ############ % cellLead=1:N/2+1; iLead=0:N/2; cellLag=N/2+2:N+2; iLag=N/2:N; xMin=0; xMax=N; yMin=10^-8; yMax=10^-0; %PROBABILITY OF DETECTION CURVE for iCFAR=1:nCFAR figure if iCFAR==CA semilogy(iLead,expPfa(cellLead,CA),'color',clr

127 

Page 141: CFAR Thesis - James Jen - PDF

(CA,:),'linewidth',1.5) hold on elseif iCFAR==OS semilogy(iLead,expPfa(cellLead,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--') hold on semilogy(iLead,expPfa(cellLead,OS),'color',clr(OS,:),'linewidth',1.5) else semilogy(iLead,expPfa(cellLead,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--'); hold on semilogy(iLead,expPfa(cellLead,OS),'color',clr(OS,:),'linewidth',1.5,'linestyle','--') semilogy(iLead,expPfa(cellLead,iCFAR),'color',clr(iCFAR,:),'linewidth',1.5) end %Line marking the designed Probability of False Alarm line([xMin xMax], [Pfa Pfa],'color','m','linestyle',':','linewidth',1.5); %Line marking where the half-window point is line([N/2 N/2], [yMin yMax],'color','b','linestyle',':','linewidth',1.5); if iCFAR==CA legend([CFARtype([CA])],'location','SouthEast'); semilogy(iLag,expPfa(cellLag,CA),'color',clr(CA,:),'linewidth',1.5) elseif iCFAR==OS legend([CFARtype([CA OS])],'location','SouthEast'); semilogy(iLag,expPfa(cellLag,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--') semilogy(iLag,expPfa(cellLag,OS),'color',clr(OS,:),'linewidth',1.5) else legend([CFARtype([CA OS iCFAR])],'location','SouthEast'); semilogy(iLag,expPfa(cellLag,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--'); semilogy(iLag,expPfa(cellLag,OS),'color',clr(OS,:),'linewidth',1.5,'linestyle','--') semilogy(iLag,expPfa(cellLag,iCFAR),'color',clr(iCFAR,:),'linewidth',1.5) end ylabel('Probability of False Alarm'); xlabel('Number of Reference Cells in Clutter'); axis([xMin xMax yMin yMax]); % grid on % set(gca,'Xcolor',[0.5 0.5 0.5]); % set(gca,'Ycolor',[0.5 0.5 0.5]); % Caxes = copyobj(gca,gcf); % set(Caxes, 'color', 'none', 'xcolor', 'k', 'xgrid', 'off', 'ycolor','k', 'ygrid','off'); end

128 

Page 142: CFAR Thesis - James Jen - PDF

% % ============================================================ % Probability of Detection - Homogeneous/ Multiple Targets % ============================================================ % % This script plots the SNR v. Probabilty of Detection % and SNR v. CFAR loss for various CFAR algorithms % % ASSUMPTION % Swerling I/II Target % Exponential Noise/Clutter % % AUTHORSHIP % James Jen % Cal Poly Pomona % % %UPDATES % May 28th, 2011 Created % May 31st, 2011 Updated for faster CFAR functions % clear all close all clc % ######################### % % Simulation Parameters % % ######################### % iMasking=[5]; %location of masking targets Pfa=10^-4; %Desired probability of false alarm nTrial=10^6; %Number of trials to run SNRdB_set=2:2.5:26; %SNR's to be simulted and plotted % ################### % % CFAR Parameters % % ################### % N=32; %CFAR window size k_OS=round(N*0.7); %OS-CFAR k-rank k_OSGO=round(0.6*N/2); %k_OSGO k_rank nGuardCell=1; %number of Guard Cells % ############################## % % CFAR selection and setting % % ############################## % %CFAR numbering CA=1; OS=2;

B.3 Probability of Detection in Homogeneous/ Multiple Target Environment 

129 

Page 143: CFAR Thesis - James Jen - PDF

GOCA=3; SOCA=4; OSGO=5; VI=6; S=7; SVI=8; %Total number of CFAR's nCFAR=6; %Legend name CFARtype{CA}='CA-CFAR'; CFARtype{OS}='OS-CFAR'; CFARtype{GOCA}='GOCA-CFAR'; CFARtype{SOCA}='SOCA-CFAR'; CFARtype{OSGO}='OSGO-CFAR'; CFARtype{S}='S-CFAR'; CFARtype{VI}='VI-CFAR'; %CFAR plot color clr=zeros(nCFAR,3); clr(CA,:) =[0 0 0 ]/255; %black clr(OS,:) =[255 0 0 ]/255; %red clr(GOCA,:)=[153 153 0 ]/255; %brown clr(SOCA,:)=[0 153 204]/255; %light blue clr(OSGO,:)=[0 204 51 ]/255; %orange clr(S,:) =[255 153 0 ]/255; %green clr(VI,:) =[204 0 204]/255; %purple % ############################### % % CFAR Environment Generation % % ############################### % SNR_set=10.^(SNRdB_set/10); nSNR=length(SNRdB_set); noisePwr=1; %Noise Power nWindow=N+2*nGuardCell+1; iCUT=N/2+nGuardCell+1; nMasking=length(iMasking); iTarget=[iMasking iCUT]; nTarget=length(iTarget); pwrSignal=exprnd(noisePwr,nTrial,nWindow); % ############## % % Simulation % % ############## % threshold=zeros(nTrial,nCFAR); Pd=zeros(nSNR,nCFAR); for iSNR=1:nSNR SNR=SNR_set(iSNR); targetPwr=noisePwr*SNR;

130 

Page 144: CFAR Thesis - James Jen - PDF

pwrSignal(:,iTarget)=exprnd(targetPwr+noisePwr,nTrial,nTarget); stopBar= progressbar(iSNR/nSNR,0); if(stopBar) break; end threshold(:,CA)=CA_CFAR1(Pfa,N,pwrSignal); threshold(:,OS)=OS_CFAR1(Pfa,N,k_OS,pwrSignal); threshold(:,SOCA)=SOCA_CFAR1(Pfa,N,pwrSignal); threshold(:,GOCA)=GOCA_CFAR1(Pfa,N,pwrSignal); threshold(:,OSGO)=OSGO_CFAR1(Pfa,N,k_OSGO,pwrSignal); threshold(:,VI)=VI_CFAR1(Pfa,N,pwrSignal); nDetection=sum(repmat(pwrSignal(:,iCUT),1,nCFAR)>threshold); Pd(iSNR,:)=nDetection/nTrial; end close %close progress bar % ############ % % Plotting % % ############ % SNRdB_set=SNRdB_set(:); %PROBABILITY OF DETECTION CURVE for iCFAR=1:nCFAR figure hold on %Neyman-Pearson plot(SNRdB_set,Pd_inf(Pfa,SNRdB_set),'k--'); if iCFAR==CA plot(SNRdB_set,Pd(:,CA),'color',clr(CA,:),'linewidth',1.5) legend(['Neyman-Pearson' CFARtype([CA])],'location','SouthEast'); elseif iCFAR==OS plot(SNRdB_set,Pd(:,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle',':') plot(SNRdB_set,Pd(:,OS),'color',clr(OS,:),'linewidth',1.5) legend(['Neyman-Pearson' CFARtype([CA OS])],'location','SouthEast'); else plot(SNRdB_set,Pd(:,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle',':'); plot(SNRdB_set,Pd(:,OS),'color',clr(OS,:),'linewidth',1.5,'linestyle',':') plot(SNRdB_set,Pd(:,iCFAR),'color',clr(iCFAR,:),'linewidth',1.5) legend(['Neyman-Pearson' CFARtype([CA OS iCFAR])],'location','SouthEast'); end ylabel('Probability of Detection'); xlabel('Signal to Noise Ratio (dB)'); %Simulation Title if nMasking==0 title('\fontsize{11}Probability of Detection - \color{blue}Homogeneous Environment'); else

131 

Page 145: CFAR Thesis - James Jen - PDF

title(['\fontsize{11}Probability of Detection - \color{blue}' num2str(nMasking) ' Masking Target']); end grid on; set(gca,'Xcolor',[0.5 0.5 0.5]); set(gca,'Ycolor',[0.5 0.5 0.5]); Caxes = copyobj(gca,gcf); set(Caxes, 'color', 'none', 'xcolor', 'k', 'xgrid', 'off', 'ycolor','k', 'ygrid','off'); end %CFAR LOSS CURVE SNRdB_set=SNRdB_set(:); CFARloss=zeros(nSNR,3); for iCFAR=1:nCFAR figure hold on if iCFAR==CA iPd=Pd(:,CA); SNRoptimal=OptSNR(iPd,Pfa); CFARloss(:,CA)=SNRdB_set-SNRoptimal; plot(SNRdB_set,CFARloss(:,CA),'color',clr(CA,:),'linewidth',1.5) legend([CFARtype([CA])],'location','NorthWest'); elseif iCFAR==OS iPd=Pd(:,CA); SNRoptimal=OptSNR(iPd,Pfa); CFARloss(:,CA)=SNRdB_set-SNRoptimal; plot(SNRdB_set,CFARloss(:,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--') iPd=Pd(:,OS); SNRoptimal=OptSNR(iPd,Pfa); CFARloss(:,OS)=SNRdB_set-SNRoptimal; plot(SNRdB_set,CFARloss(:,OS),'color',clr(OS,:),'linewidth',1.5) legend([CFARtype([CA OS])],'location','NorthWest'); else iPd=Pd(:,CA); SNRoptimal=OptSNR(iPd,Pfa); CFARloss(:,CA)=SNRdB_set-SNRoptimal; plot(SNRdB_set,CFARloss(:,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--') iPd=Pd(:,OS); SNRoptimal=OptSNR(iPd,Pfa); CFARloss(:,OS)=SNRdB_set-SNRoptimal; plot(SNRdB_set,CFARloss(:,OS),'color',clr(OS,:),'linewidth',1.5,'linestyle','--') iPd=Pd(:,iCFAR); SNRoptimal=OptSNR(iPd,Pfa); CFARloss(:,3)=SNRdB_set-SNRoptimal; plot(SNRdB_set,CFARloss(:,3),'color',clr(iCFAR,:),'linewidth',1.5) legend([CFARtype([CA OS iCFAR])],'location','NorthWest'); end

132 

Page 146: CFAR Thesis - James Jen - PDF

ylabel('CFAR Loss (dB)'); xlabel('SNR (dB)'); title('CFAR Loss'); xMin=min(SNRdB_set); xMax=max(SNRdB_set); yMin=0; yMax=ceil(2*max(max(CFARloss)))/2; axis([xMin xMax yMin yMax]); if nMasking==0 title('\fontsize{11}CFAR Loss - \color{blue}Homogeneous Environ-ment'); else title(['\fontsize{11}CFAR Loss - \color{blue}' num2str(nMasking) ' Masking Target']); end grid on; set(gca,'Xcolor',[0.5 0.5 0.5]); set(gca,'Ycolor',[0.5 0.5 0.5]); Caxes = copyobj(gca,gcf); set(Caxes, 'color', 'none', 'xcolor', 'k', 'xgrid', 'off', 'ycolor','k', 'ygrid','off'); end

133 

Page 147: CFAR Thesis - James Jen - PDF

B.4 Probability of Detection in Clutter Wall Environment 

% % =============================================== % Probability of False Alarm - Clutter Wall % =============================================== % % Computes the Probability of False Alarm with varying clutter edge % interference for various CFAR % % ASSUMPTION % Swerling I/II Target % Exponential Noise/Clutter % % AUTHORSHIP % James Jen % Cal Poly Pomona % [email protected] % % %UPDATES % May 28th, 2011 Created % May 31st, 2011 Updated for faster CFAR functions % clear all close all clc % ######################### % % Simulation Parameters % % ######################### % CNR_dB=10; SNR_dB=15; Pfa=10^-4; %Desired probability of false alarm nTrial=1.5*10^6; %Number of trials to run N=32; nGuardCell=1; %number of Guard Cells % ################### % % CFAR Parameters % % ################### % %CFAR window size k_OS=round(N*0.7); %OS-CFAR k-rank k_OSGO=round(0.6*N/2); %k_OSGO k_rank % ############################## % % CFAR selection and setting % % ############################## %

134 

Page 148: CFAR Thesis - James Jen - PDF

%CFAR numbering CA=1; OS=2; GOCA=3; SOCA=4; OSGO=5; VI=6; S=7; SVI=8; %Total number of CFAR's nCFAR=6; %Legend name CFARtype{CA}='CA-CFAR'; CFARtype{OS}='OS-CFAR'; CFARtype{GOCA}='GOCA-CFAR'; CFARtype{SOCA}='SOCA-CFAR'; CFARtype{OSGO}='OSGO-CFAR'; CFARtype{S}='S-CFAR'; CFARtype{VI}='VI-CFAR'; CFARtype{nCFAR+1}='N/2 cells in clutter'; %CFAR plot color clr=zeros(nCFAR,3); clr(CA,:) =[0 0 0 ]/255; %black clr(OS,:) =[255 0 0 ]/255; %red clr(GOCA,:)=[153 153 0 ]/255; %brown clr(SOCA,:)=[0 153 204]/255; %light blue clr(OSGO,:)=[0 204 51 ]/255; %orange clr(S,:) =[255 153 0 ]/255; %green clr(VI,:) =[204 0 204]/255; %purple % ############################### % % CFAR Environment Generation % % ############################### % SNR=10^(SNR_dB/10); CNR=10^(CNR_dB/10); noisePwr=1; %Noise Power clutterPwr=noisePwr*CNR; targetPwr=noisePwr*SNR; nWindow=N+2*nGuardCell+1; pwrNoise=exprnd(noisePwr,nTrial,nWindow); pwrClutter=exprnd(clutterPwr,nTrial,nWindow); iCUT=N/2+nGuardCell+1; iLead=1:N/2; iTest=N/2+nGuardCell+1; iLag=N/2+2*nGuardCell+2:nWindow; iClutterWall=[0 iLead iTest iLag]; nClutterWall=length(iClutterWall); % ############## % % Simulation % % ############## %

135 

Page 149: CFAR Thesis - James Jen - PDF

threshold=zeros(nTrial,nCFAR); expPd=zeros(nClutterWall,nCFAR); for i=1:nClutterWall clutterWall=iClutterWall(i); stopBar= progressbar(i/nClutterWall,0); if(stopBar) break; end if clutterWall==0 pwrSignal=pwrNoise; pwrCUT=noisePwr; elseif clutterWall==nWindow pwrSignal=pwrClutter; pwrCUT=clutterPwr; else iClutter=1:clutterWall; iNoise=clutterWall+1:nWindow; pwrSignal(:,iNoise)=pwrNoise(:,iNoise); pwrSignal(:,iClutter)=pwrClutter(:,iClutter); if clutterWall>=iCUT pwrCUT=clutterPwr; else pwrCUT=noisePwr; end end threshold(:,CA)=CA_CFAR1(Pfa,N,pwrSignal); threshold(:,OS)=OS_CFAR1(Pfa,N,k_OS,pwrSignal); threshold(:,SOCA)=SOCA_CFAR1(Pfa,N,pwrSignal); threshold(:,GOCA)=GOCA_CFAR1(Pfa,N,pwrSignal); threshold(:,OSGO)=OSGO_CFAR1(Pfa,N,k_OSGO,pwrSignal); threshold(:,VI)=VI_CFAR1(Pfa,N,pwrSignal); if i<=(nClutterWall/2) pwrTarget=exprnd(noisePwr+targetPwr,nTrial,nCFAR); else pwrTarget=exprnd(clutterPwr+targetPwr,nTrial,nCFAR); end iDetection=pwrTarget>threshold; nDetection=sum(iDetection,1); expPd(i,:)=nDetection/nTrial; end close %close progress bar % ############ % % Plotting % % ############ % cellLead=1:N/2+1; iLead=0:N/2; cellLag=N/2+2:N+2;

136 

Page 150: CFAR Thesis - James Jen - PDF

iLag=N/2:N; xMin=0; xMax=N; yMin=0; yMax=1; %PROBABILITY OF DETECTION CURVE for iCFAR=1:nCFAR figure if iCFAR==CA plot(iLead,expPd(cellLead,CA),'color',clr(CA,:),'linewidth',1.5) hold on elseif iCFAR==OS plot(iLead,expPd(cellLead,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--') hold on plot(iLead,expPd(cellLead,OS),'color',clr(OS,:),'linewidth',1.5) else plot(iLead,expPd(cellLead,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--'); hold on plot(iLead,expPd(cellLead,OS),'color',clr(OS,:),'linewidth',1.5,'linestyle','--') plot(iLead,expPd(cellLead,iCFAR),'color',clr(iCFAR,:),'linewidth',1.5) end %Line marking where the half-window point is line([N/2 N/2], [yMin yMax],'color','m','linestyle',':','linewidth',1.5); if iCFAR==CA legend(CFARtype([CA end]),'location','NorthEast'); plot(iLag,expPd(cellLag,CA),'color',clr(CA,:),'linewidth',1.5) elseif iCFAR==OS legend([CFARtype([CA OS end])],'location','NorthEast'); plot(iLag,expPd(cellLag,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--') plot(iLag,expPd(cellLag,OS),'color',clr(OS,:),'linewidth',1.5) else legend([CFARtype([CA OS iCFAR end])],'location','NorthEast'); plot(iLag,expPd(cellLag,CA),'color',clr(CA,:),'linewidth',1.5,'linestyle','--'); plot(iLag,expPd(cellLag,OS),'color',clr(OS,:),'linewidth',1.5,'linestyle','--') plot(iLag,expPd(cellLag,iCFAR),'color',clr(iCFAR,:),'linewidth',1.5) end ylabel('Probability of Detection'); xlabel('Number of Reference Cells in Clutter'); axis([xMin xMax yMin yMax]); % grid on % set(gca,'Xcolor',[0.5 0.5 0.5]); % set(gca,'Ycolor',[0.5 0.5 0.5]); % Caxes = copyobj(gca,gcf); % set(Caxes, 'color', 'none', 'xcolor', 'k', 'xgrid', 'off', 'ycolor','k', 'ygrid','off'); end

137