Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

24
Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method Honghuang Lin, Peng Li Dept. of ECE, Texas A&M University {linhh, pli} @neo.tamu.edu

description

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method. Honghuang Lin, Peng Li Dept. of ECE, Texas A&M University { linhh , pli } @neo.tamu.edu. Motivation. Digital logic. Mixed-signal systems Analog + Digital Nonlinearity + Digital effects - PowerPoint PPT Presentation

Transcript of Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Page 1: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Honghuang Lin, Peng LiDept. of ECE, Texas A&M University

{linhh, pli} @neo.tamu.edu

Page 2: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

2

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Motivation Mixed-signal systems

– Analog + Digital– Nonlinearity + Digital effects

Reachability Analysis– Formal method for AMS verification– Capable for PLL lock time checking

DCO

Digitallogic

TDC

Digitally-Intensive PLL[G. Yu et al JLPE’10]

Page 3: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

3

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Motivation Challenges

– Digital effects increase the complexity of the reachability analysis

– Reachability analysis is expensive for nonlinear systems

Questions– Q1: How to model the two types of signals (especially digital)

efficiently for verification?– Q2: How to accelerate reachability analysis?

Page 4: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

4

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Q1: Model Linearization

– TDC resolution effect– Complex transition– Digital Linear analog– Staircase Linear transition

TDC

Page 5: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

5

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Q1: Model Variable Reduction

– IIR finite word length– Need state variables for internal nodes– Digital Linear analog– Reduce # state variables by 8

Second order IIR

Multiplication:round-off error

Addition:overflow

Page 6: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

6

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Q2: Reachability Analysis Acceleration Support function based method

– [A. Girard et al IFAC2008]– Initial space to reachable space– Support function representation– Efficient for linear systems

– Unable to solve nonlinear systems Reachablespace

Supportfunction

Page 7: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

7

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Q2: Reachability Analysis Acceleration Simulation-assisted SMT based method

– [L.Yin et al ICCAD2012] – Generic method for nonlinear systems– Discretize Simulation Approximation SAT Conservative– Suffers from resolution and dimension explosion

Our goal: accelerate this generic method by leveraging support function

Page 8: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

8

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Proposed Method

AMSDigital Analog Pure analog

model

Linear subsystem

Nonlinear subsystem

Support function based

method

SMT-based

method

Reachability analysis

Reachable space of the full system

Page 9: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

9

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Outline Motivation Overview

Pure Analog Model with KRR

Hybrid Reachability Analysis

Experimental Results

Summary

Page 10: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

10

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Conservative ModelA

MS

Syst

em

Xa

Xd

Fa

Fd

Pure

ana

log

mod

el

X

F

Eu

El

Reg

ress

ion

Conservative?

Upper boundEu

Lower boundEl

Xa: Analog variablesXd: Digital variablesFa: Analog transitionFd: Digital transition

X: Analog variablesF: Pure analog transition functionEu: Upper bound of errors between F and Fa/d

El: Lower bound of errors between F and Fa/d

Page 11: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

11

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Error Estimation with KRR Kernel Ridge Regression (KRR)

– [C. Saunders et al 1998; J.A.K. Suykens et al 2002]

– Subject to– A.k.a Least Squares Support Vector Regression– Plenty of training data accurate prediction– Confidence interval computation– [K. De Brabanter et al 2011]– Error – Smoother bias and variance

Min. structural risk

Page 12: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

12

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Error Estimation with KRR Error Estimation of the Model

Next: Hybrid Reachability Analysis

X(t)

AMS system

Pure analog model

Ei(t+1)

Error on the i-th state

variable

KRRPrediction + Confidence Intervals

Features Targets

Page 13: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

13

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Partition the Pure Analog Model

– Linear:

– Nonlinear:– Variables on the boundary:

Linearized

Page 14: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

14

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Hybrid Method

Support function method

NL-SMT with support function

Reachable space with state variables

,,

Reachable space with state variables

,,

Combine the two reachable spaces with

different dimension

Page 15: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

15

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Support Function Based Method Support function

– Definition:– Intersection of half spaces:

Tight polyhedral over approximation of a reachable space

– A list of vector li

– Corresponding support function values ρ(li)– E.g. represent oval with pentagon

Page 16: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

16

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Support Function Based Method Reachability analysis in linear subsystems

– [A. Girard et al IFAC2008]– For the linear subsystem:

– A useful property of support function:

– The reachable space AU can be easily computed by the initial space U

U AU

Polyhedral over approximation

AAU+err

U AU

ρ𝑈 ( 𝑙) ρ𝐴𝑈 ( 𝐴𝑇 𝑙)

Page 17: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

17

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

SMT Based Method Nonlinear Satisfiability Modulo Theory(SMT)

based method– [L.Yin et al ICCAD2012]– Convert verification problems to satisfiability problems

composed of boolean combinations of multiple arithmetic constraints(can be nonlinear)

– E.g. can be converted to SAT solver

– iSAT [http://isat.gforge.avacs.org/]– Davis-Putnam-Logemann-Loveland (DPLL) Algorithm– Produces an existing solution that satisfies all the constraints or

“unsatisfiable”

Page 18: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

18

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

NL-SMT with Support Function

– Another Property of support functions:

U

V

ρ𝑈 ( 𝑙)ρ𝑉 (𝑙)

Page 19: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

19

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Intersection of Reachable Subspaces– XY: Reachable space of linear subsystem– XZ: Nonlinear subsystem

X

X

X

X

X

Y Y

Y

YZ

Z

Z

Z

Linear

Nonlinear

Page 20: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

20

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Error interval of modeling– KRR tool: Dlib-ml [Davis E. King, 2009]– Error intervals of phase difference and the output of loop filter

for different word length– Reflects the error between digital implementation and ideal

analog characteristic

Experiment Results

Page 21: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

21

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Speed up of the hybrid method

– Compare single SAT solver running

– Overhead in linear subsystem: 21.163 sec– At least 76X speedup

Experiment Results

# var. at # var. at # var. in SATAMS system >20 >20 >40

Pure analog model 5 5 10

Partitioned nonlinear subsystem

2 3 5

# SAT constraints Runtime(sec)Without partition 64420 1942.9

With partition 532 4.1868

Page 22: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

22

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Hybrid Reachability Analysis of PLL Lock time < 0.25 us

– Resolution determined by the error interval prediction

Page 23: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

23

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Conclusions Model with KRR

– AMS Pure Analog– KRR

Hybrid Reachability Analysis– Model partition– Respective reachability analysis in the linear and nonlinear

subsystems– Reachable subspaces intersections

Experiment Results– Model error– Speedup– DI-PLL lock time verification

Page 24: Reachability  Analysis for AMS Verification using Hybrid Support Function and  SMT-based  Method

24

FAC 2013

Reachability Analysis for AMS Verification using Hybrid Support Function and SMT-based Method

Thanks

Questions?