formal high-level model of a radar signal processing system · 2019. 10. 26. · f f f f (a) farm g...

37
Formal High-Level Model of a Radar Signal Processing System George Ungureanu 1 Anders ˚ Ahlander 2 Timmy Sundstr¨ om 3 Ingo Sander 1 Ingemar S¨ oderquist 3 1 School of EECS, KTH Royal Institute of Technology, Stockholm, Sweden 2 Business Area Surveillance, Saab AB, Gothenburg, Sweden 2 Business Area Aeronautics, Saab AB, Link¨oping, Sweden October 9, 2019

Upload: others

Post on 20-Feb-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

  • Formal High-Level Model of a Radar Signal Processing System

    George Ungureanu1 Anders Åhlander2 Timmy Sundström3 Ingo Sander1 Ingemar Söderquist3

    1School of EECS, KTH Royal Institute of Technology, Stockholm, Sweden2Business Area Surveillance, Saab AB, Gothenburg, Sweden2Business Area Aeronautics, Saab AB, Linköping, Sweden

    October 9, 2019

  • The Context of this Work

    NFFP7: CORRECTI Saab AB & KTH

    I current industrial design flows do not havea clear path from the functionalspecification to product

    I information on security, safety, behaviorare important aspects to be expressed andassessed

    I identified by the industryI emphasized by certification authorities

    I aim to decrease the need for late stagetesting and related development costs.

    1 / 26

  • Overview

    Modeling with ForSyDe

    I push orthogonalization in modeling one step further

    I harmoniously combine different DSLs capturing different aspectsLanguage 1

    Abstraction1

    Language 2

    Abstraction2

    Language 3

    Abstraction3

    α

    αS2

    αS2S3

    The AESA Case Study

    I Active Electronically Scanned Array Antenna

    I typical high-performance component in avionicsunder real-time constraints

    I extremely costly for civil applications today

    2 / 26

  • Why We Use Models?

    To a scientist, the value of a model lies in how well its properties match those of atarget (...). But to an engineer the value of an object lies in how well its propertiesmatch a model. A scientist asks, “Can I make a model for this thing?” An engineerasks, “Can I make a thing for this model?”1

    ...to understand systems v(t) = v(0) + 1m

    ∫ t0

    F (τ)dτ

    ...to design systems

    ...to create systems

    3 / 26

  • Why We Use Models?

    To a scientist, the value of a model lies in how well its properties match those of atarget (...). But to an engineer the value of an object lies in how well its propertiesmatch a model. A scientist asks, “Can I make a model for this thing?” An engineerasks, “Can I make a thing for this model?”1

    ...to understand systems v(t) = v(0) + 1m

    ∫ t0

    F (τ)dτ

    ...to design systems

    ...to create systems

    1Edward Ashford Lee. Plato and the Nerd: The Creative Partnership of Humans and Technology. MIT Press, 2017.

    3 / 26

  • Layered Languages

    Each layer consists of:

    I a set of structured types= encode properties

    I a set of functions over these types= transformations, rules

    I a set of higher order functions (HOF)= conduits between layers Lan

    guage1

    Ab

    stra

    ctio

    n1

    Language 2

    Ab

    stra

    ctio

    n2

    Language 3

    Ab

    stra

    ctio

    n3

    α

    αS2

    αS2S3

    f : α→ α

    f : S2(∗)→S2(∗)

    hof : (∗ →∗)→ S2(∗)

    → S2(∗)

    f : S3(∗)→S3(∗)

    hof : (∗ →∗)→ S3(∗)

    → S3(∗)

    4 / 26

  • A Language for Timed Behavior

    +

    SY.comb

    SY process

    4,3,2,1

    3,2,1

    SignalsI encode temporal information

    I define tag systems2

    ProcessesI act according to MoC semantics

    I created with process constructors (HOF)

    2E.A. Lee and A. Sangiovanni-Vincentelli. A framework for comparing models of computation. Dec. 1998.

    5 / 26

  • A Language for Timed Behavior

    +

    SY.comb

    SY process

    4,3,2

    3,22

    SignalsI encode temporal information

    I define tag systems2

    ProcessesI act according to MoC semantics

    I created with process constructors (HOF)

    2Lee and Sangiovanni-Vincentelli, A framework for comparing models of computation.

    5 / 26

  • A Language for Timed Behavior

    +

    SY.comb

    SY process

    4,3

    3

    4,2

    SignalsI encode temporal information

    I define tag systems2

    ProcessesI act according to MoC semantics

    I created with process constructors (HOF)

    2Lee and Sangiovanni-Vincentelli, A framework for comparing models of computation.

    5 / 26

  • A Language for Timed Behavior

    +

    SY.comb

    SY process

    46,4,2

    SignalsI encode temporal information

    I define tag systems2

    ProcessesI act according to MoC semantics

    I created with process constructors (HOF)

    2Lee and Sangiovanni-Vincentelli, A framework for comparing models of computation.

    5 / 26

  • A Language for Timed Behavior

    ×

    CT.comb

    CT process

    2 4 6 8 100

    0.5

    1

    0(t)

    1(t)

    2 4 6 8 10

    −1−0.5

    0

    0.5

    1

    sin(t) −1−0.5

    0

    0.5

    1

    SignalsI encode temporal information

    I define tag systems2

    ProcessesI act according to MoC semantics

    I created with process constructors (HOF)

    2Lee and Sangiovanni-Vincentelli, A framework for comparing models of computation.

    5 / 26

  • A Language for Timed Behavior

    ×

    CT.comb

    CT process

    6 8 100

    0.5

    1

    0(t)

    1(t)

    6 8 10

    −1−0.5

    0

    0.5

    1

    sin(t)

    2 4

    −1−0.5

    0

    0.5

    1

    (0× sin)(t)

    SignalsI encode temporal information

    I define tag systems2

    ProcessesI act according to MoC semantics

    I created with process constructors (HOF)

    2Lee and Sangiovanni-Vincentelli, A framework for comparing models of computation.

    5 / 26

  • A Language for Timed Behavior

    ×

    CT.comb

    CT process

    −1−0.5

    0

    0.5

    1

    −1−0.5

    0

    0.5

    12 4 6 8 10

    −1−0.5

    0

    0.5

    1

    (0× sin)(t)(1× sin)(t)

    SignalsI encode temporal information

    I define tag systems2

    ProcessesI act according to MoC semantics

    I created with process constructors (HOF)

    2Lee and Sangiovanni-Vincentelli, A framework for comparing models of computation.

    5 / 26

  • A Language for Structured Parallelism

    f

    f

    f

    f

    · · ·

    (a) farm

    g

    g

    g

    · · ·

    (b) reduce

    f

    f

    f

    · · ·

    (c) pipe

    f

    f

    f

    · · ·

    (d) recur

    f

    f

    f

    · · ·

    (e) prefix

    Regular Structures (e.g. Vectors)

    I encode spatial information

    I enable catamorphisms3

    Parallel PatternsI functional relations between elements

    I potential for parallel distribution

    I created with skeletons (HOF)

    3David B Skillicorn. Foundations of parallel programming. 6. Cambridge University Press, 2005.

    6 / 26

  • A Language for Testing Properties

    pre-condition⇒ statement

    Example:

    ∀a ∈ List(α) ⇒ reverse(reverse a) = a

    GeneratorsI express pre-conditions

    I abstract random data generators

    I “smartened” by algebraic properties4

    Properties & CombinatorsI test truth statements

    I systematic composition of generators

    4John Hughes. “QuickCheck testing for fun and profit”. In: International Symposium on Practical Aspects of Declarative Languages. Springer. 2007.

    7 / 26

  • The AESA Radar

    I typically thousands of antennaelements

    I hundreds of GOPS

    I when part of control loop, real-timeaspect becomes critical

    rangebins

    antennas

    pulse windowbeam

    NA

    Nb

    NFFT

    AESA

    video indata

    DBF PC

    DFB

    DFB

    CFAR

    CFAR

    INT

    corner turn

    8 / 26

  • The AESA Signal Processing Chain as a Layered Model

    DBF

    coef

    .

    SY

    SDF PC

    fir(coef )

    SDF.comb

    transpose

    SDF.comb

    transpose

    SDF.comb%

    DFB

    fDFB

    SDF.comb

    DFB

    fDFB

    SDF.comb

    CFAR

    fCFAR

    SDF.comb

    CFAR

    fCFAR

    SDF.comb

    ++

    SDF.comb

    SDF

    SY INT

    coef

    .

    CTfarm

    {⊥}(NbinNFFT /2)

    c1 p1c2

    p2

    c2

    p2

    c3

    p3

    c3

    p3

    c4

    p4

    c4

    p4

    c5

    c5

    2

    c1 = p1 = Nb; c2 = NFFT ×Nb; p2 = c4 = p4 = c5 = Nb ×NFFT ; c3 = p3 = NFFT ;

    4ForSyDe-Atom code available at https://github.com/forsyde/aesa-radar

    9 / 26

  • Digital Beamforming (DBF)

    I forms “listening directions”

    I vector-matrix multiplication

    rangebins

    antennas

    pulses

    pulse

    NA

    Nb

    NFFT

    ...

    · · ·

    b1

    ...

    · · ·

    b2

    ...

    · · ·

    bNB

    farmreduce reduce reduce

    farm

    a1fanout · · ·

    a2fanout · · ·

    aNAfanout · · ·

    beamSigs

    beamMatrix

    antennaSigs

    ×α11 ×α12 ×α1NB

    ×α21 ×α22 ×α2NB

    ×αNA1 ×αNA2 ×αNANB

    +

    +

    +

    +

    +

    +

    〈〈αij〉〉

    dbf :: Vector (SY.Signal (Complex Float)) -> Vector (SY.Signal (Complex Float))

    dbf antennaSigs = beamSigs

    where beamSigs = reduce (farm21 (comb21 (+))) beamMatrix

    beamMatrix = farm21 (\c -> comb11 (*c)) beamConsts sigMatrix

    sigMatrix = farm11 fanout antennaSigs

    10 / 26

  • Pulse Compression (PC)

    I echo is passed through amatched filter to decodeits modulation

    I basically a movingaverage/FIR filter

    rangebins

    bea

    ms

    pulse

    pulse

    NB

    Nb

    NFFT

    procPC

    mav(coefs)

    SDF.comb

    Nb NbSY

    SDF

    pcfarm

    〈bdbf1 ...bdbfNB 〉 〈bpc1 ...b

    pcNB

    11 / 26

  • Corner Turn (CT) & Doppler Filter Bank (DFB)rangebins

    bea

    ms

    pulse windows

    direction of consumption

    NA

    Nb

    NFFT

    rangebins

    bea

    ms

    pulse windows

    direction of production

    NA

    Nb

    NFFT

    bea

    ms

    rangebins

    rangebins

    pulse windows

    pulse windows

    left channel

    right channel

    NFFT /2

    NFFT

    12 / 26

  • Constant False Alarm Ratio (CFAR)

    rangebins

    bea

    ms

    Doppler windowsbeam

    NA

    Nb

    NFFT

    CFAR(aij ) = 2(5+log2 aij )−max(EMV (aij ),LMV (aij ),MD(aij ))

    EMV (aij ) =1

    N

    N−1∑k=0

    log2 1

    4

    3∑l=0

    a(i−2−4k−l)j

    LMV (aij ) =

    1

    N

    N−1∑k=0

    log2 1

    4

    3∑l=0

    a(i+2+4k+l)j

    MD(aij ) = log2

    (N

    mink=1

    (aik )

    )

    ∀i ∈ [eb, lb], j ∈ [1,N] where

    N = NFFT

    eb = NFFT + 1

    lb = Nb − NFFT − 1fCFAR :: RealFloat r => Range (Window r) -> Range (Window r)

    fCFAR rbins = V.farm41 (\ m -> V.farm31 (normCfa m)) md rbins lmv emv

    where

    md = V.farm11 (logBase 2 . V.reduce min) rbins

    emv = (V.farm11 aritMean . V.stencil nFFT) rbins

    lmv = (V.drop 2 . V.farm11 aritMean . V.stencil nFFT) rbins

    normCfa m a l e = 2 ** (5 + logBase 2 a - maximum [l,e,m])

    aritMean = V.farm11 (/n) . V.reduce (+) . V.farm11 geomMean . V.group 4

    geomMean = V.farm11 (logBase 2 . (/4)) . V.reduce (+)

    13 / 26

  • Why Have We Done This?

    ...to understand systems v(t) = v(0) + 1m

    ∫ t0

    F (τ)dτ

    ...to design systems

    ...to create systems

    14 / 26

  • ...To Understand the AESA Signal Processing System

    0 50 100150200250

    0

    200

    400

    600

    800

    1000

    antenna 0

    0 50 100150200250

    antenna 1

    0 50 100150200250

    antenna 2

    0 50 100150200250

    antenna 3

    0 50 100150200250

    antenna 4

    0 50 100150200250

    antenna 5

    0 50 100150200250

    antenna 6

    0 50 100150200250

    antenna 7

    0 50 100150200250

    antenna 8

    0 50 100150200250

    antenna 9

    0 50 100150200250

    antenna 10

    0 50 100150200250

    antenna 11

    0 50 100150200250

    antenna 12

    0 50 100150200250

    antenna 13

    0 50 100150200250

    antenna 14

    50100150200

    antenna 15

    72

    64

    56

    48

    40

    32

    24

    16

    8

    0 50 100 150 200 250

    0

    200

    400

    600

    800

    1000

    6.36.7

    60.691.064.8

    14.523.3

    17.820.7

    86.037.518.6

    beam 0

    0 50 100 150 200 250

    12.012.2

    126.7189.2135.8

    30.947.7

    38.444.8

    180.287.742.5

    beam 1

    0 50 100 150 200 250

    6.513.2

    13.4144.3215.4156.2

    35.253.1

    43.751.4

    205.3103.049.7

    beam 2

    0 50 100 150 200 250

    12.712.9

    139.9208.1152.1

    34.351.0

    42.350.0

    199.0100.748.7

    beam 3

    0 50 100 150 200 250

    12.712.9

    139.9208.1152.1

    34.351.0

    42.350.0

    199.0100.748.7

    beam 4

    0 50 100 150 200 250

    6.513.2

    13.4144.3215.4156.2

    35.253.1

    43.751.4

    205.3103.049.7

    beam 5

    0 50 100 150 200 250

    12.012.2

    126.7189.2135.8

    30.947.7

    38.444.8

    180.287.742.5

    beam 6

    0 50 100 150 200 250

    6.36.7

    60.691.064.8

    14.523.3

    17.820.7

    86.037.518.6

    beam 7

    15 / 26

  • Why Have We Done This?

    ...to understand systems X v(t) = v(0) + 1m

    ∫ t0

    F (τ)dτ

    ...to design systems

    ...to create systems

    16 / 26

  • ...To Design the AESA Signal Processing System

    I system structure

    I behavior particularities

    I tested properties

    I validated the designDBF

    coef

    .

    SY

    SDF PC

    fir(coef )

    SDF.comb

    transpose

    SDF.comb

    transpose

    SDF.comb%

    DFB

    fDFB

    SDF.comb

    DFB

    fDFB

    SDF.comb

    CFAR

    fCFAR

    SDF.comb

    CFAR

    fCFAR

    SDF.comb

    ++

    SDF.comb

    SDF

    SY INT

    coef

    .

    CTfarm

    {⊥}(NbinNFFT /2)

    c1 p1c2

    p2

    c2

    p2

    c3

    p3

    c3

    p3

    c4

    p4

    c4

    p4

    c5

    c5

    2

    c1 = p1 = Nb; c2 = NFFT ×Nb; p2 = c4 = p4 = c5 = Nb ×NFFT ; c3 = p3 = NFFT ;

    17 / 26

  • Why Have We Done This?

    ...to understand systems X v(t) = v(0) + 1m

    ∫ t0

    F (τ)dτ

    ...to design systems X

    ...to create systems

    18 / 26

  • Synthesizing the PC component to FPGA

    rangebins

    bea

    ms

    pulse

    pulse

    NB

    Nb

    NFFT

    procPC

    mav(coefs)

    SDF.comb

    Nb NbSY

    SDF

    pcfarm

    〈bdbf1 ...bdbfNB 〉 〈bpc1 ...b

    pcNB

    Given Specification

    “For each antenna the data arrives pulse by pulse, and each pulse arrives range bin by range bin. Thishappens for all antennas in parallel, and all complex samples are synchronized with the same samplingrate, e.g. of the A/D converter.(...)The goal of the pulse compression is to collect all received energy from one target into a single rangebin. The received echo of the modulated pulse is passed through a matched filter. Here, thematched filtering is done digitally. ”

    19 / 26

  • A Closer Look at the MAV Operation

    reduce( comb(+)++ ) ◦ farm( reduce′(+) ◦ farm(×) creduce′(+) ◦ farm(×) c ) ◦ recur( delay(0)tail )

    recur

    farm

    reduce

    farm(×)〈1, 2, 1〉

    reduce′(+)

    tail

    ++

    farm(×)〈1, 2, 1〉

    reduce′(+)

    tail

    ++

    farm(×)〈1, 2, 1〉

    reduce′(+)

    tail

    ++

    farm(×)〈1, 2, 1〉

    reduce′(+)

    〈0, 0, 0, 1〉

    〈0, 0, 0, 1〉 〈0, 0, 1〉 〈0, 1〉 〈1〉

    〈0, 0, 0〉 〈0, 0, 1〉 〈0, 2〉 〈1〉

    〈0〉 〈1〉 〈2〉 〈1〉〈0, 1〉 〈0, 1, 2〉 〈0, 1, 2, 1〉

    NFarm = NInput × NCoefficients

    %

    %

    recur

    farm

    reduce

    {0, 0, 0, 1}

    {0, 1, 2, 1}

    ×1

    0

    ×2

    +

    0

    ×1

    +

    NFarm = NCoefficients

    20 / 26

  • A Closer Look at the MAV Operation

    reduce( comb(+)++ ) ◦ farm( reduce′(+) ◦ farm(×) c ) ◦ recur( delay(0) )comb(+) c 7→ comb(×c) delay(0)

    recur

    farm

    reduce

    farm(×)〈1, 2, 1〉

    reduce′(+)

    tail

    ++

    farm(×)〈1, 2, 1〉

    reduce′(+)

    tail

    ++

    farm(×)〈1, 2, 1〉

    reduce′(+)

    tail

    ++

    farm(×)〈1, 2, 1〉

    reduce′(+)

    〈0, 0, 0, 1〉

    〈0, 0, 0, 1〉 〈0, 0, 1〉 〈0, 1〉 〈1〉

    〈0, 0, 0〉 〈0, 0, 1〉 〈0, 2〉 〈1〉

    〈0〉 〈1〉 〈2〉 〈1〉〈0, 1〉 〈0, 1, 2〉 〈0, 1, 2, 1〉

    NFarm = NInput × NCoefficients

    %

    %

    recur

    farm

    reduce

    {0, 0, 0, 1}

    {0, 1, 2, 1}

    ×1

    0

    ×2

    +

    0

    ×1

    +

    NFarm = NCoefficients

    20 / 26

  • Refining PC into a FIR Process Network

    Fu

    nction

    Layer

    Function

    Skeleton

    Layer

    VectorFunction

    MoC Layer

    Process v

    vvv

    vvv

    tvvv

    t

    vvv

    tvvv

    tvvv

    tvvv

    tvvv

    tvvv

    t

    procPC

    mav(coefs)

    SDF.comb

    Nb NbSY

    SDF

    pcfarm

    〈bdbf1 ...bdbfNB 〉 〈bpc1 ...b

    pcNB

    Fu

    nction

    Layer

    Function

    MoCLayer

    Process

    Skeleton Layer

    Process

    Network

    v

    vt

    vt

    vt

    vt

    %

    %

    %

    recur

    farm

    reduce

    pcfarm

    · · ·

    · · ·

    · · ·

    ×c1

    0

    ×c2

    +

    0

    ×c3

    +

    0

    ×cN

    +

    21 / 26

  • Floating Point to Fixed Point Number Representation

    Specification

    “After the DBF stage the numbers are represented withsufficient accuracy using 20 bits.”

    Fu

    nction

    Layer

    Function

    MoCLayer

    Process

    Skeleton Layer

    Process

    Network

    v

    vt

    vt

    vt

    vt

    pc :: Vector (SY.Signal (Complex Float)) -> Vector (SY.Signal (Complex Float))

    pc :: Vector (SY.Signal (Complex Fixed20)) -> Vector (SY.Signal (Complex Fixed20))

    22 / 26

  • Floating Point to Fixed Point Number Representation

    Specification

    “After the DBF stage the numbers are represented withsufficient accuracy using 20 bits.”

    Fu

    nction

    Layer

    Function

    MoCLayer

    Process

    Skeleton Layer

    Process

    Network

    v

    vt

    vt

    vt

    vt

    pc :: Vector (SY.Signal (Complex Float)) -> Vector (SY.Signal (Complex Float))

    pc :: Vector (SY.Signal (Complex Fixed20)) -> Vector (SY.Signal (Complex Fixed20))

    22 / 26

  • Load Balancing the FIR Reduction

    Function

    LayerFunction

    MoCLayer

    Process

    Skeleton Layer

    Process

    Network

    v

    vt

    vt

    vt

    vt

    %

    %

    %

    recur

    farm

    reduce

    · · ·

    · · ·

    · · ·

    . . ....

    ×c1

    0

    ×c2

    0

    ×c3

    0

    ×cN

    + + +

    +

    23 / 26

  • RTL Synthesis

    0 100 200

    0

    200

    400

    600

    800

    1000

    59.688.663.8

    16.121.4

    18.621.8

    86.139.420.2

    beam 0

    0 100 200

    8.69.8

    126.2188.5135.1

    32.745.8

    38.944.7

    181.988.743.9

    beam 1

    0 100 200

    7.49.2

    11.4144.5216.6153.6

    37.252.5

    44.050.7

    207.2104.050.9

    beam 2

    0 100 200

    7.69.0

    11.0139.6209.5148.3

    36.051.0

    42.348.9

    200.1102.449.8

    beam 3

    0 100 200

    7.69.0

    11.0139.6209.5148.3

    36.051.0

    42.348.9

    200.1102.449.8

    beam 4

    0 100 200

    7.49.2

    11.4144.5216.6153.6

    37.252.5

    44.050.7

    207.2104.050.9

    beam 5

    0 100 200

    8.69.8

    126.2188.5135.1

    32.745.8

    38.944.7

    181.988.743.9

    beam 6

    0 100 200

    59.688.663.8

    16.121.4

    18.621.8

    86.139.420.2

    beam 7

    24 / 26

  • Why Have We Done This?

    ...to understand systems X v(t) = v(0) + 1m

    ∫ t0

    F (τ)dτ

    ...to design systems X

    ...to create systems X

    25 / 26

  • Conclusions & Future work

    A Framework for Layered Languages

    I orthogonalize aspects of CPS modeling

    I isolates design problems

    Demonstration on the AESA System

    I using ForSyDe ecosystem (https://forsyde.github.io)

    I open-source (https://github.com/forsyde/aesa-radar)

    I technical report

    Future WorkI explore other modeling paradigms (e.g. contracts)

    I HW/SW transformation-based synthesis flow

    Design of Sensor SignalProcessing with ForSyDeModeling, Validation and Synthesis

    George UngureanuSchool of EECSKTH Royal Institute of [email protected]

    Timmy SundströmBusiness Area AeronauticsSaab AB

    Anders ÅhlanderBusiness Area SurveillanceSaab AB

    Ingo SanderSchool of EECSKTH Royal Institute of Technology

    Ingemar SöderquistBusiness Area AeronauticsSaab ABVersion 0.2

    26 / 26

  • Thank you!

    26 / 26