Goals of he course Lecure : Advanced Digial Conrol To beer undersand discree-ime sysems To beer undersand compuer-conrolled sysems u k u( ) u( ) Hold u k D-A Process Compuer y( ) A-D y ( ) Sampler y k y k Conens of he course Sampling of sysems and signals Analysis of discree-ime sysems I/O models More abou z-ransform and δ -ransform Hybrid sysems Design mehods Reference values and inegraors I/O models and connecion o sae-space models Opimal conrol, minimum variance and LQG IT ools Course informaion, available ools CCSDEMO Malab and Simulink ool for he course WWW a hp://www.conrol.lh.se/educaion/ DocoraeProgram/advanced-digial-conrol/ Figures generaed wih macros available Malab and Simulink /home/ccs/malab/ccs5/chaperx Ineracive ool ccsdemo
Sampling of CCS Example s+b s 2 +a s+a 2 for differen sampling inervals Sampling of signals and sysems Inroducion o compuer-conrolled sysems Sampling of signals Sampling of sysems Sae-space models -oupu models Discree-ime sysems Disregard inersample behavior Problems wih sampled-daa sysems dependence u A-D Compuer Clock D-A y s (b) A naive approach Conrol of he arm of a disk drive Coninuous ime conroller Discree ime conroller G(s)= k Js 2 U(s)= bk a U c(s) K s+b s+a Y(s) u( k )=K( b a u c( k ) y( k )+x( k )) x( k +h)=x( k )+h((a b)y( k ) ax( k ))
Conrol of he double inegraor Clock Algorihm Conrol of he double inegraor Shor sampling period Sampling periodh=.2/ω 5.5 y: = adin(in2) {read process value} u:=k*(a/b*uc-y+x) dou(u) {oupu conrol signal} newx:=x+h*((b-a)*y-b*x).5 5 (ω ) Conrol of he double inegraor Increased sampling period a)h=.5/ω b)h=.8/ω 5.5 (b) 5.5 Dead-bea conrolh=.4/ω Beer performance? u( k )= u c ( k )+ u c ( k ) s y( k ) s y( k ) r u( k ) Posiion Velociy 5.5.5 5.5 5 5 (ω ).5 5 5 (ω ).5 5 (ω )
Sinusoidal measuremen noise Sinusoidal measuremen noise con d Coninuous-ime Discree-ime Enlarge he scale.2.2 2.2.2 2.2.2 2 Measured oupu (b).2.2 2.2.2 2.2.2 2 Sampling creaes new frequencies! ω sampled = ω±nω s Measured oupu Measured oupu.2.2.2.2 5 5 The sampling period is oo long compared wih he noise Imporan o filer before sampling! Problems Higher-order harmonics u y s A-D Compuer D-A Sampling of sysems Look a he sysem from he poin of view of he compuer Clock Clock { } {u( k )} u() y() y( k) D-A Sysem A-D (b) (c) Sampl. oupu Con. oupu 5 5 5 Zero-order-hold sampling of a sysem Compuaional issues Soluion of he sysem equaion Inverse of sampling Sampling of a sysem wih ime delay Inersample behavior
The idea: Sampling a coninuous-ime sysem Le he inpu be piecewise consan Look a he sampling poins only Use lineariy and calculae sep responses Sysem descripion dx d =Ax()+Bu() y()=cx()+du() Sampling a coninuous-ime sysem, con d Solve he sysem equaion (Calculae he sep response, wih iniial value) x()=e A( k) x( k )+ k e A( s ) Bu(s )ds =e A( k) x( k )+ e A( s ) ds Bu( k ) k k =e A( k) x( k )+ e As dsbu( k ) = Φ(, k )x( k )+Γ(, k )u( k ) The general case Periodic sampling x( k+ )= Φ( k+, k )x( k )+ Γ( k+, k )u( k ) y( k )=Cx( k )+Du( k ) k+ k Γ( k+, k )= e As dsb Φ( k+, k )=e A( k+ k ) Assume periodic sampling, i.e. k =k h, hen x(kh+h)=φx(kh)+γu(kh) y(kh)=cx(kh)+du(kh) NOTE: -invarian linear sysem! Φ=e Ah Γ= h e As dsb I hus follows ha Properies of Φ and Γ Φ=e Ah Γ= h e As dsb dφ() =AΦ()= Φ()A d dγ() = Φ()B d Φ and Γ saisfy d Φ() Γ() Φ() Γ() = d I I A B Φ(h) and Γ(h) can be obained from he block marix } Φ(h) Γ(h) =exp{ A B h I
How o compue Φ and Γ? Numerical calculaion in Malab Series expansion of he marix exponenial. The Laplace ransform ofexp(a) is(si A). Cayley-Hamilon s heorem. Symbolic compuer algebra Inverse of sampling Problem: Is i always possible o find a coninuous-ime sysem ha corresponds o a discree-ime sysem? Exisence (Example 2.4 Firs order sysem) Non-uniqueness (Example 2.5 Harmonic oscillaor) One way is Ψ= h e As ds=ih+ Ah2 2! The marices Φ and Γ are given by + A2 h 3 3! + Φ=I+AΨ=I+Ah+ (Ah)2 2! + (Ah)3 3! + Γ=ΨB Ierae he equaions Soluion of he sysem equaion x(k+)=φx(k)+γu(k) y(k)=cx(k)+du(k) x(k)=φ k k x(k )+ Φ k k Γu(k ) + + Γu(k ) = Φ k k x(k )+ k j=k Φ k j Γu(j) k y(k)=cφ k k x(k )+ CΦ k j Γu(j)+Du(k) j=k k =CΦ k k x(k )+ h(k j)u(j) j=k Iniial value + Influence of inpu signal Sampling of sysem wih ime delay u( ) Delayed signal τ kh h kh kh + h kh + 2h dx() =Ax()+Bu( τ) d x(kh+h)=e Ah x(kh) + kh+h kh e A(kh+h s ) Bu(s τ)ds
delay con d Spli over piece-wise consan pars kh+h kh kh+τ = where kh e A(kh+h s ) Bu(s τ)ds kh+h e A(kh+h s ) Bds u(kh h)+ e A(kh+h s ) Bds u(kh) kh+τ = Γ u(kh h)+γ u(kh) x(kh+h)=φx(kh)+γ u(kh)+ Γ u(kh h) Φ=e Ah Γ = h τ τ e As dsb Γ =e A(h τ) e As dsb Sae-space model x(kh+h) = Φ Γ x(kh) u(kh) u(kh h) + Γ u(kh) I Noice:rexra sae variablesu(kh h) Longer ime delays τ=(d )h+ τ < τ h x(kh+h)=φx(kh)+γ u(kh (d )h) + Γ u(kh dh) Example Double inegraor wih delay Consider he double inegraor wih delay τ Φ=e Ah = h τ Γ =e A(h τ) e As dsb= h τ (h = τ τ ) 2 τ h τ (h τ) 2 Γ = e As dsb= 2 h τ τ 2 2 τ x(kh+h)=φx(kh)+γ u(kh h)+ Γ u(kh) Inner ime-delay u y u 2 y S e sτ S 2 Le he sysem be described by he equaions S : dx () =A x ()+B u() d y ()=C x ()+D u() S 2 : dx 2() =A 2 x 2 ()+B 2 u 2 () d u 2 ()=y ( τ) u() piecewise consan over he sampling inerval h Find a sae-space descripion of he sampled sysem
Inner ime-delay con d Sampling wih τ= and sampling periodh x (kh+h) = Φ (h) x (kh) + Γ (h) u(kh) x 2 (kh+h) Φ 2 (h) Φ 2 (h) x 2 (kh) Γ 2 (h) where Φ i ()=e A i Γ ()= e A s B ds Wienmark (985), generalized in Bernhardsson (993) where Φ i ()=e A i Φ 2 ()= Γ ()= Inner ime-delay Theorem x (kh+h)= Φ (h)x (kh)+γ (h)u(kh) x 2 (kh+h)= Φ 2x (kh h)+φ 2 (h)x 2 (kh) + Γ 2u(kh h)+γ 2 (h τ)u(kh) i=,2 e A 2s B 2 C e A ( s) ds e A s B ds Γ 2 ()= Φ 2 = Φ 2(h)Φ (h τ) e A 2s B 2 C Γ ( s)ds Γ 2 = Φ 2(h)Γ (h τ)+φ 2 (h τ)γ (τ)+φ 2 (h τ)γ 2 (τ) Sample he delay-free sysem wihh,h τ, and τ! -oupu models Solving he sysem equaion gives y(k)=cφ k k x(k )+ k Higher order difference equaion Pulse-response (weighing) funcion h(k)= CΦ k Γ j=k CΦ k j Γu(j)+Du(k) k< D k= k Summary New phenomena Sysem wih ime delay Soluion of sysem equaion -oupu models y(k)=cφ k k x(k )+ k j=k h(k j)u(j)