(Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek,...

39
(Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology, Czech Republic [email protected] http://user.unob.cz/biolek 1 Typical problems 2 (Semi)symbolic versus numerical analysis 3 Needs versus reality 4 Needs 5 SNAP 6 Switched linear systems – generalized s-z transfer functions 7 Instead of Conclusion

Transcript of (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek,...

Page 1: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

(Semi) symbolic computer analysis of continuous-time and switched linear

systemsDalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology, Czech [email protected] http://user.unob.cz/biolek

1 Typical problems 2 (Semi)symbolic versus numerical analysis 3 Needs versus reality 4 Needs 5 SNAP 6 Switched linear systems – generalized s-z transfer functions7 Instead of Conclusion

Page 2: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

to solve in the area of linear analogue systems

Finding DC voltages and currents Harmonic steady state responsesVoltage gain of loaded dividerBalance condition of DC or AC bridgeComputing two-port parametersFinding gain formula of transistor amplifier Finding oscillation condition in the circuitCompute step response of resonant circuit…

Verifying formulas of transfer functions of filters and amplifiers, containing OpAmps, current conveyors, etc.Verifying impedance and admittance formulas of synthetic elements…

Verification of circuit principle

Simple computations

Studying how real properties of active andpassive elements affect circuit behavior and finding the ways how to compensate them …

Influence of real properties

Necessity to work with behavioral models of new circuit elements like CDBA, various types of current and voltage conveyors, CDTAs etc. which still are not commerciallyavailable…

Working with new circuit elements

Necessity to model special dependencies among circuit parameters by means of manipulating data in computer memory …

Special effects

Page 3: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

Result: Result:

R2*RzR2*RzKv = ------------------------------Kv = ------------------------------ R1*Rz +R2*Rz +R2*R1R1*Rz +R2*Rz +R2*R1

Simple computations

Loaded voltage divider – compute voltage transfer function

Page 4: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

ResultResultss: :

Rx R = R1 R2Rx R = R1 R2

Lx = R1 R2 CLx = R1 R2 C

Simple computations

Maxwell-Wien bridge – compute balance condition

Page 5: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples Simple computations

Compute all two-port parameters including wave impedances

Results:Results:

2/1

1.0/1

12/

1.11

3222

321

3212112

3111

RRa

sRa

RRRRRa

RRa

Page 6: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples Simple computations

Transistor amplifier – verify results mentioned below

Page 7: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

ResultResultss::

h21e=C2/C1=100, then h21e=C2/C1=100, then wosc=sqrt[(1+h21)/(L*C2)],wosc=sqrt[(1+h21)/(L*C2)],fosc=wosc/(2*pi)=715 kHz.fosc=wosc/(2*pi)=715 kHz.

Simple computations

Colpitts oscillator – derive oscillation condition

Page 8: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples Simple computations

Resonant circuit – find step response

Result:Result:

0.1596*exp(-50000*t)*sin( 626703*t)0.1596*exp(-50000*t)*sin( 626703*t)

Page 9: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

FDNR in series with resistance

Result:Result:

Zin=R1/2+1/(D*s^2)Zin=R1/2+1/(D*s^2)D=2*R3*C1^2D=2*R3*C1^2

Verification of circuit principle

Page 10: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

DC precise LP filter. Frequency response looks good, but...

Result:Result:

filter poles:-971695 + j484850-971695 - j484850-321953 195172 + j461620 195172 - j461620

FILTER IS UNSTABLE!

Verification of circuit principle

Page 11: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

10MHz bandpass filter containing CDBA elements-find zeros and poles of current transfer function and frequency response

Working with new circuit elements

R1 = 1344, R2 = 123, R3 = 672, R4 = 116, R5 = 685, R6 = 94, R7 = R8 = 1k,

C1 = 110pF, C2 = 25pF, C3 = 113pF, C4 = 24pF, C5 = 156pF, C6 = 16.5pF, C7 = 15pF,

C8 = 12pF, C9 = 8pF

frequency response

Results:Results:_______________zeros_________________________________zeros__________________5 x 05 x 0_______________poles_________________________________poles__________________

-3.04559956366840E6 -3.04559956366840E6 ±± j 6.27631020418348E7 j 6.27631020418348E7-1.76830262858284E6 -1.76830262858284E6 ±± j 6.70757952287423E7 j 6.70757952287423E7-1.33796432873573E6 -1.33796432873573E6 ±± j 5.93101288578915E7 j 5.93101288578915E7

Page 12: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

Impedance converter/inverter with two CTTA elements with parameters b1,gm1, b2, gm2.Derive input impedance.

Working with new circuit elements

Result:Result: Z2Z2Zin= ---------------Zin= --------------- gm1 b1 Z1gm1 b1 Z1

Page 13: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

1 Typical problems

examples

1MHz bandpass filter – find how CCII nonidealities a 1, b2 1 affect the transfer function

Influence of real properties

Result:Result:

s*( C2*R1*a*b2 )s*( C2*R1*a*b2 )Kv = Kv = -------------------------------------------------------------------------------------------------------------------------- a*b2^(2) + s*( R1*C4 ) + s^(2)*( R3*C2*R1*C4 )a*b2^(2) + s*( R1*C4 ) + s^(2)*( R3*C2*R1*C4 )

b2=0.95..1.05

Page 14: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Sallen-Key LP filter- influence of OpAmp properties to frequency response

1 Typical problems

examples Influence of real properties

2

1

0

11

1

R

R

r

R

from symbolic analysis:

frequency responses

ideal

1-pole model

2-pole model

Page 15: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Model of HF transformer with coupled circuits

1 Typical problems

examples Special effects

Page 16: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Forms of the analysis outputs

2 (Semi)symbolic versus numerical analysis

SYMBOLIC: math. formula which includes symbols of circuit parameters

SEMISYMBOLIC: numerical values are instead of some symbols, the complex frequency s or z (freq. domain) or the time variable t or k (time domain) is also present in the formula

NUMERICAL: numerical results (poles and zeros, waveform points,..)

Page 17: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Example – RC cell

2 (Semi)symbolic versus numerical analysis

symbolic and semisymbolic

111

1

CsRKV

symbolic analysis

semisymbolic analysis

sKV

100000

1100000

fraction line

1k

10n

Page 18: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Example – RC cell

2 (Semi)symbolic versus numerical analysis

symbolic and semisymbolic1k

10n

_______________zeros__________________

none

_______________poles__________________

-1.00000000000000E+0005

___________step response______________

1.00000000000000E+0000

-1.00000000000000E+0000*exp(-1.00000000000000E+0005*t)

___________pulse response_____________

1.00000000000000E+0005*exp(-1.00000000000000E+0005*t)

response to Heaviside step

no zeros

pole -100000

response to Dirac impulse

te 100000100000

te 1000001

Page 19: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Example – RC cell

2 (Semi)symbolic versus numerical analysis

numerical

Page 20: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Limitations of typical commercial circuit simulators

3 Needs versus reality

Only numerical analysis, not symbolic and semisymbolic no formulas

Zeros and poles are not available

Too complicated models, it is hard to study influence of partial component parameters

Too primitive sensitivity analysis when it is available

Too expensive…

Page 21: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Wanted: new software tool for analysis of large linear systems

3 Needs versus reality

Symbolic and semisymbolic analysis, numerical analyses in frequency/time domains

Zeros and poles, waveform equations, symbolic-based sensitivity analysis

Special effects (Dependences editor), export of equations into Matlab, MathCad etc.

User-modified behavioral models based on MNA

Free of charge…

Page 22: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Why (semi)symbolic computation?

3 Needs versus reality

Equations = more information than those from numerical results (they include them)

Equations = important connections between the system and its behavior

Equations = important data for verification of system principle

Equations = important data for system optimization

pro – and – con

Page 23: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

Why NOT (semi)symbolic computation?

3 Needs versus reality

CPU time- and memory-expensive algorithms

Serious numerical problems must be overcome in some cases

Complexity and non-transparency of symbolic results while analyzing large systems

pro – and – con

Simplification of symbolic resultsSAG, SBG, SDG

Page 24: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

4 Needs

Symbolic, Semisymbolic and Numerical links

system equations

symbolic semisymbolic numerical

1

2 3

4 5

symbolic formulaeoperator (s, z)

NOT in time domain

semisymb. formulaeoperator (s, z)

semisymb. formulaetime domain

system eigenvaluespoles and zerosfrequency responses

unity step and other responses

Page 25: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

4 Needs

Computing system eigenvalues

system equations

symbolic semisymbolic numerical

1

2 3

4 5

symbolic formulaeoperator (s, z)

semisymb. formulaeoperator (s, z) system eigenvalues

secondary root polishing

Numerical way (5): large circuits, problematic precision; QR, QZ,.., “optional precision”

Semisymbolic way (4,3): moderate-size to large-size systems, problematic precision; FFT, Faddeyev algorithm (4), Laguer, method of accompanying matrix, “optional precision” (3)

Symbolic way (1,2,3): small-size to moderate-size systems, excellent precision; ? (1), utilization of “optional precision” (2,3)

Page 26: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

system equations

symbolic semisymbolic numerical

1

2 3

4 5

semisymb. formulaeoperator (s, z) system eigenvalues

4 Needs

Computing time responses

Numerical way (5): large circuits, good precision; classical integration formulas

Semisymbolic way (4,3): moderate-size to large-size systems, precision depends on computing eigenvalues; partial fraction expansion, “optional precision” (3)

Page 27: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

5 SNAPSymbolic and Numerical Analysis Program

Symbolic and semisymbolic analysis, numerical analyses in frequency/time domains

Zeros and poles, waveform equations, symbolic-based sensitivity analysis

Special effects (Dependences editor), export of equations into Matlab, MathCad etc.

User-modified behavioral models based on MNA

Free on http://snap.webpark.cz

Page 28: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

5 SNAPSymbolic and Numerical Analysis Program

Program conception

EDIT .snn

.cir

PSched .net

.sch

netlist

.m, .mpl,

.mcd, .txt

outputs for the

SNAP

SNAP.LIB

SNAP.CDL

following processing

Page 29: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

5 SNAPSymbolic and Numerical Analysis Program

Page 30: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

5 SNAPSymbolic and Numerical Analysis Program

Page 31: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

6 Switched linear systems…How to analyze in the frequency domain…

Linear systems with periodically varying parameters

Switched Capacitor and Switched Current circuits

Sample-Hold circuits

Switched DC-CD converters…

……….

Classical harmonic steady-state does not exist in these circuits.

AC analysis, frequency responses, … are based on harmonic steady state.

?

Page 32: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

6 Switched linear systems…What is the GTF

kT

kT+ T

kT+T

kT+T+ T

kT-T

kT-T+ T

wv

ve

t

. . .

. . .

T T

Generalized Transfer Function of circuits with periodically varying parameters

output input

equivalent signal

period of parameter alternation

Equivalent signal:

- interpolates samples v(kT+T)

- its spectral components fall to the spectral area of w(t).

There is infinite number of equivalent signals for <0,1)

GTF is the ratio of Fourier/Laplace transformations of equivalent output signal and input signal.

Depending on , various GTFs can represent network behaviour

Page 33: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

6 Switched linear systems…What is the GTF

Generalized Transfer Function of circuits with periodically varying parameters

w(t) v(t)C RH

Sample-Hold

v(t)

w(t)

kT

kT+ T

kT+T

p

t

t

ve (t)

Evaluation of the dynamic errorof sampling process by GTF:

tw

tv

tw

tvzsKesK

e

e

esT

LL

LL

),(),( Tjezjs , frequency responses

Page 34: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

6 Switched linear systems…What is the GTF

Mixed S-Z description of circuits with periodically varying parameters

kT

kT+ T

kT+T

kT+T+ T

kT-T

kT-T+ T

wv

ve

t

. . .

. . .

T T

output input )()()()()()( twttt

dt

dtt DvCvG

Modified nodal analysis:

Solving for

TkTTTkTt ,(

t

TTkT

dwtTTkTTTkTtt

)(),()(),()( * gvgv

:,..1,0,1.., kTkTt

initial condition response

impulse response

T

x dTkTwTTTkTTTTTkT0

* )(),()(),()( gvgv

Page 35: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

kT

kT+ T

kT+T

kT+T+ T

kT-T

kT-T+ T

wv

ve

t

. . .

. . .

T T

6 Switched linear systems…What is the GTF

Mixed S-Z description of circuits with periodically varying parameters

T

x dTkTwTTTkTTTTTkT0

* )(),()(),()( gvgv

kT T t

T

xee dtwTTtTTTt

0

* )(),()(),()( gvgv

…recurrent formula of linear periodically varying system

…formula for equivalent signal

sWez

zszssT

e

,),( KV

K E g G ( , ) ( , ) ( )*s z T T T z s 1 1

T

sx deTs

0

),()( gG

GTF

modeling „discrete-time“ behaviourmodeling „continuous-time“ behaviour

Laplace transform and arrangement

Page 36: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

6 Switched linear systems…What is the GTF

Generalized Transfer Function of circuits with periodically varying parameters

w(t) v(t)C RH

Sample-Hold

v(t)

w(t)

kT

kT+ T

kT+T

p

t

t

ve (t)

Hs

s CRR

RR

1 HRC2

jIm{s}

Re{s}0

-106

jIm{z}

Re{z}0

1

1,7.10-9

0,11

jIm{s}

Re{s}0

-5.105

jIm{z}

Re{z}0 1

3,7.10-5

0,3

jIm{s}

Re{s}0

-2.105

jIm{z}

Re{z}0 1

1,5.10-2

0,55

1 2 3

1

1

211 1

1

1

1,

s

zg

ggzRR

RzsK

s

Ron

1/Te 2/TTe

Page 37: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

kT

kT+ T

kT+T

kT+T+ T

kT-T

kT-T+ T

wv

ve

t

. . .

. . .

T T

6 Switched linear systems…Computing the GTF

Mixed S-Z description of circuits with periodically varying parameters

sWez

zszssT

e

,),( KV

K E g G ( , ) ( , ) ( )*s z T T T z s 1 1

T

sx deTs

0

),()( gG

GTF

modeling „discrete-time“ behaviourmodeling „continuous-time“ behaviour

Algorithmic GTF computation:

..by numerical integration

..solving eigenvalue problem

..by a special procedure

1 Finding g*, gx

2 Finding z-domain zeros and poles

3 Finding s-domain zeros and poles

Page 38: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

10-2

10-1

100

101

10-4

10-3

10-2

10-1

100

f/fs [-]

gain [-]

zero resistances

nonzero resistances

6 Switched linear systems…Computing the GTF

LiSN program (Linear Switched Network) Demonstration of semisymbolic analysis

R

C C

1 2

V V1 2

1 2

zsG

zKz

zzsK

,

1.919090909090,01

090909090909,0,

1

1

1

zsG

s

z

zz

zzsK

,

10.5,51

294028903215,01

10.657289536014,6249457249375,01

730909075725,0,

1

6

21

261

1

1

21

2

1

21

1

1

z

CC

Cz

CC

CzK

Page 39: (Semi) symbolic computer analysis of continuous-time and switched linear systems Dalibor Biolek, Dept. of Microelectronics, FEEC Brno University of Technology,

6 Instead of Conclusion

? The rational arithmetic (RA)

Contemporary problems ….

? The “optional precision” and “infinite precision” arithmetic (OPA, IPA)

? Solving the eigenvalue problem by means of RA, OPA, and IPA

? Topological methods of matrix deflation

? Solving the polynomial roots from symbolic results by means of OPA

? Special methods (SBE) of approximate symbolic analysis

… how to improve SNAP

http://snap.webpark.cz

…and other programs