Second order Loop Filter for PLL type 2 block
This block realizes a continuous second order loop filter defined by the following electrical circuit :
Figure : Passive second order loop filter
Because this circuit can be explicitly expressed with ordinary differential equations, it is able to be described with tranfert function representation.
The transfer function of this filter is given by :
where the zero
and the poles
are computed in accord to the dialogue parameters with the calcul_3eme_ordre scilab function.
The interfacing function of this block also allows to draw the different Bode diagrams of the linear model of a third order type 2 PLL.
This is useful when trying to calibrate the attenuation at cut-off frequency of the closed-loop transfert function.
- Natural loop frequency (Hz) :
Type 'vec' of size 1. The cut-off frequency of the closed-loop transfert function.
- Phase Margin (rad) :
Type 'vec' of size 1. The phase margin at the cut-off frequency.
- Linear VCO gain (Hz/V) :
Type 'vec' of size 1. The local sensitivity of the VCO when loop is in lock.
- Charge pump current (A) :
Type 'vec' of size 1. The maximal output current of the charge pump.
- Nominal divider value (integer) :
Type 'vec' of size 1. The value of the feed-back frequency divider of the loop.
- Plot open loop transfert function (0=No) ? :
Type 'vec' of size 1. Draw Bode diagram of open loop transfert function in a scilab window.
- Plot closed loop transfert function (0=No) ? :
Type 'vec' of size 1. Draw Bode diagram of closed loop transfert function in a scilab window.
- Plot fm response transfert function (0=No) ? :
Type 'vec' of size 1. Draw Bode diagram of the frequency modulation response transfert function view as the input of the VCO in a scilab window.
- always active: yes
- direct-feedthrough: no
- zero-crossing: no
- mode: no
- number/sizes of inputs: 1 / 1
- number/sizes of outputs: 1 / 1
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: yes
- discrete-time state: no
- name of computational function: csslti
SOLOOPFILTER_f.sci
subroutine csslti(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,
& rpar,nrpar,ipar,nipar,u,nu,y,ny)
c Copyright INRIA
c Scicos block simulator
c continuous state space linear system simulator
c rpar(1:nx*nx)=A
c rpar(nx*nx+1:nx*nx+nx*nu)=B
c rpar(nx*nx+nx*nu+1:nx*nx+nx*nu+nx*ny)=C
c rpar(nx*nx+nx*nu+nx*ny+1:nx*nx+nx*nu+nx*ny+ny*nu)=D
c
double precision t,xd(*),x(*),z(*),tvec(*),rpar(*),u(*),y(*)
integer flag,nevprt,nx,nz,ntvec,nrpar,ipar(*)
integer nipar,nu,ny
c
la=1
lb=nx*nx+la
lc=lb+nx*nu
if(flag.eq.1.or.flag.eq.6) then
c y=c*x+d*u
ld=lc+nx*ny
call dmmul(rpar(lc),ny,x,nx,y,ny,ny,nx,1)
call dmmul1(rpar(ld),ny,u,nu,y,ny,ny,nu,1)
c if(t.gt.64.0) write(6,'(e15.8,10(e10.3,x))') t,x(1),x(2),
c $ u(1),y(1)
elseif(flag.eq.0) then
c xd=a*x+b*u
call dmmul(rpar(la),nx,x,nx,xd,nx,nx,nx,1)
call dmmul1(rpar(lb),nx,u,nu,xd,nx,nx,nu,1)
c if(t.gt.64.0) write(6,'(e15.8,10(e10.3,x))') t,x(1),x(2),
c $ xd(1),xd(2),u(1)
endif
return
end
IRCOM Group
Alan Layec