DOC PREVIEW
UCSD BENG 221 - Lecture

This preview shows page 1-2-20-21 out of 21 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

OverviewExample: Ring Oscillator DynamicsAnalytic ODE SolutionNumerical VerificationNumerical SimulationFurther ReadingBENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.1BENG 221Mathematical Methods in BioengineeringLecture 2TutorialAnalytic and Numerical Methods in ODEsGert CauwenberghsDepartment of BioengineeringUC San DiegoBENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.2SummaryWe will review analytic and numerical techniques for solvingODEs, using pencil and paper, and implemented in Matlab.These simple techniques lay the foundations for solving morecomplex systems of PDEs in the coming weeks.By way of example we study the dynamics of a ring oscillator, acircular chain of three inverters with identical capacitive loading.BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.3Today’s Coverage:Example: Ring Oscillator DynamicsAnalytic ODE SolutionNumerical VerificationNumerical SimulationBENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.4Some circuit elementsFigure: An invertingtransconductor (inverter)converts and input voltage to anoutput current, with gain −G.Figure: A capacitor convertscharge, or integrated current, tovoltage with gain 1/C.iout= g(vin) ≈ −Gvin(1)v =QC=1CZt−∞i dt (2)BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.5Ring OscillatorFigure: A 3-inverter ring oscillator with capacitive loading.Cdv1dt= g(v3) ≈ −G v3Cdv2dt= g(v1) ≈ −G v1(3)Cdv3dt= g(v2) ≈ −G v2v1(0) = v10v2(0) = v20(4)v3(0) = v30BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.6EigenvaluesRing oscillator ODE dynamics in matrix notation:dvdt= Av v(0) = v0(5)withv =v1v2v3A =0 0 −1−1 0 00 −1 0v(0) =v10v20v30(6)where G/C ≡ 1 with no loss of generality.Eigenvectors xiand corresponding eigenvalues λiof A satisfyA xi= λixi, or det(A − λixi) = 0, which reduces to λi3+ 1 = 0,with three solutions:λi= (−1)13=−1e+jπ/3=12+ j√32e−jπ/3=12− j√32(7)BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.7EigenvectorsThe corresponding eigenvectors are:λ1= −1 : x1=1√3111λ2= e+jπ/3=12+ j√32: x2=1√31e+j2π/3e−j2π/3λ3= e−jπ/3=12− j√32: x3=1√31e−j2π/3e+j2π/3(8)The eigenvectors form a complex orthonormal basis:xi∗xj= δij, i, j = 1, . . . 3 (9)where xi∗is the complex conjugate transpose of xi.BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.8EigenmodesThe general solution is the superposition of eigenmodes (seeLecture 1):v =3Xi=1cixieλit= c1e−t1√3111+ (10)c2e12tej√32t1√31e+j2π/3e−j2π/3+c3e12tej√32t1√31e−j2π/3e+j2π/3v(t) is real, and so c2and c3must be complex conjugate.Therefore, the second and third eigenmodes are oscillatory withan exponentially rising carrier. The first eigenmode is a decayingexponential common-mode transient.BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.9First Eigenmode– Common-mode Decaying Exponential0 1 2 3 4 5 6 7 8 9 1000.20.40.60.811.2tIC: (1 1 1) v1v2v3Figure: Ring oscillator ODE solution for v(0) = (1, 1, 1)T.BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.10Second/third Eigenmode– Exponentially Rising Three-phaseOscillations0 1 2 3 4 5 6 7 8 9 10−150−100−50050100150tIC: (1 −0.5 −0.5) v1v2v3Figure: Ring oscillator ODE solution for v(0) = (1, −12, −12)T.BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.11Initial ConditionsThe IC constrained solution is obtained by virtue of theorthonormality of the eigenvectors (see also Lecture 1):v =nXi=1x∗iv(0) xieλit(11)which, using the identity e+jα+ e−jα= 2 cos(α), leads to:v1=e−t3(v10+ v20+ v30) + (12)2 et/23(v10cos(√32t) +v10cos(√32t +2π3) + v10cos(√32t −2π3))and identical expressions for v2and v3under orderedpermutation of the indices (consistent with the ring symmetry).BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.12Matlab ImplementationUsing the eigenvector-eigenvalue decomposition of A in matrixform:A X = X s (13)where X = (x1, x2, x3) and s = diag(λ1, λ2, λ3), the solution (11)can be expressed in matrix form:v = X diag(X∗v(0))ediag(s)t(14)for efficient matlab implementation:[X, s] = eig(A);V = X*diag(X’*V0)*exp(diag(s)*t);BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.13Initial Conditions0 1 2 3 4 5 6 7 8 9 10−80−60−40−20020406080100tIC: (1 0 0) v1v2v3Figure: Ring oscillator ODE solution for v(0) = (1, 0, 0)T.BENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.14Euler IntegrationEuler numerical integration produces approximate solutions to:dxdt= f(x(t), t) (15)at discrete time intervals t = n∆t, by finite differenceapproximation of the derivative:dxdt(t) =1∆t(x(t + ∆t) − x(t)) + O(∆t2) (16)leading to the recursion:x(t + ∆t) ≈ x(t) + ∆t f(x(t), t). (17)Matlab Euler example (ring oscillator):Ve = V0; % Euler approximation, initialize to ICVs = V0; % Euler state variable, initializefor te = tstep:tstep:trangeVs = Vs + A*Vs*tstep;Ve = [Ve, Vs];endBENG 221Lecture 2TutorialOverviewExample: RingOscillatorDynamicsAnalytic ODESolutionNumericalVerificationNumericalSimulationFurther Reading2.15Euler Integration0 1 2 3 4 5 6 7 8 9 10−100−50050100150tIC: (1 0 0) v1v2v3Figure: Ring


View Full Document
Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?