- Ajuda Scilab
- CACSD
- Plot and display
- Format representations and conversions
- pol2des
- routh_t
- ssprint
- abinv
- arhnk
- arl2
- arma
- arma2p
- arma2ss
- armac
- armax
- armax1
- arsimul
- augment
- balreal
- bilin
- bstap
- cainv
- calfrq
- canon
- ccontrg
- cls2dls
- colinout
- colregul
- cont_mat
- contr
- contrss
- copfac
- csim
- ctr_gram
- damp
- dcf
- ddp
- dhinf
- dhnorm
- dscr
- dsimul
- dt_ility
- dtsi
- equil
- equil1
- feedback
- findABCD
- findAC
- findBD
- findBDK
- findR
- findx0BD
- flts
- fourplan
- freq
- freson
- fspecg
- fstabst
- g_margin
- gamitg
- gcare
- gfare
- gfrancis
- gtild
- h2norm
- h_cl
- h_inf
- h_inf_st
- h_norm
- hankelsv
- hinf
- imrep2ss
- inistate
- invsyslin
- kpure
- krac2
- lcf
- leqr
- lft
- lin
- linf
- linfn
- linmeq
- lqe
- lqg
- lqg2stan
- lqg_ltr
- lqr
- ltitr
- macglov
- minreal
- minss
- mucomp
- narsimul
- nehari
- noisegen
- nyquistfrequencybounds
- obs_gram
- obscont
- observer
- obsv_mat
- obsvss
- p_margin
- parrot
- pfss
- phasemag
- ppol
- prbs_a
- projsl
- reglin
- repfreq
- ric_desc
- ricc
- riccati
- rowinout
- rowregul
- rtitr
- sensi
- sident
- sorder
- specfact
- st_ility
- stabil
- sysfact
- syssize
- time_id
- trzeros
- ui_observer
- unobs
- zeropen
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
repfreq
frequency response
Calling Sequence
[ [frq,] repf]=repfreq(sys,fmin,fmax [,step]) [ [frq,] repf]=repfreq(sys [,frq]) [ frq,repf,splitf]=repfreq(sys,fmin,fmax [,step]) [ frq,repf,splitf]=repfreq(sys [,frq])
Arguments
- sys
syslin
list : SIMO linear system- fmin,fmax
two real numbers (lower and upper frequency bounds)
- frq
real vector of frequencies (Hz)
- step
logarithmic discretization step
- splitf
vector of indexes of critical frequencies.
- repf
vector of the complex frequency response
Description
repfreq
returns the frequency response calculation of a linear
system. If sys(s)
is the transfer function of Sys
, repf(k)
equals sys(s)
evaluated at s= %i*frq(k)*2*%pi
for continuous time systems and
at exp(2*%i*%pi*dt*frq(k))
for discrete time systems (dt
is the sampling period).
db(k)
is the magnitude of repf(k)
expressed in dB i.e.
db(k)=20*log10(abs(repf(k)))
and phi(k)
is the phase
of repf(k)
expressed in degrees.
If fmin,fmax,step
are input parameters, the response is calculated
for the vector of frequencies frq
given by:
frq=[10.^((log10(fmin)):step:(log10(fmax))) fmax];
If step
is not given, the output parameter frq
is calculated by frq=calfrq(sys,fmin,fmax)
.
Vector frq
is split into regular parts with the split
vector.
frq(splitf(k):splitf(k+1)-1)
has no critical frequency.
sys
has a pole in the range [frq(splitf(k)),frq(splitf(k)+1)]
and
no poles outside.
Examples
A=diag([-1,-2]);B=[1;1];C=[1,1]; Sys=syslin('c',A,B,C); frq=0:0.02:5;w=frq*2*%pi; //frq=frequencies in Hz ;w=frequencies in rad/sec; [frq1,rep] =repfreq(Sys,frq); [db,phi]=dbphi(rep); Systf=ss2tf(Sys) //Transfer function of Sys x=horner(Systf,w(2)*sqrt(-1)) // x is Systf(s) evaluated at s = i w(2) rep=20*log(abs(x))/log(10) //magnitude of x in dB db(2) // same as rep ang=atan(imag(x),real(x)); //in rad. ang=ang*180/%pi //in degrees phi(2) repf=repfreq(Sys,frq); repf(2)-x
See Also
Report an issue | ||
<< reglin | CACSD | ric_desc >> |