Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104918628
dspBlocks.sty
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Mar 13, 08:55
Size
3 KB
Mime Type
text/x-tex
Expires
Sat, Mar 15, 08:55 (2 d)
Engine
blob
Format
Raw Data
Handle
24878777
Attached To
R2653 epfl
dspBlocks.sty
View Options
\typeout{ }
\typeout{by Paolo Prandoni, 2012 }
\typeout{contact: paolo.prandoni@epfl.ch}
\typeout{ }
% required packages:
\usepackage{calc}
\usepackage{fp}
\usepackage{pst-xkey}
\usepackage{fmtcount}
\usepackage{ifthen}
% turn off FP messages
\FPmessagesfalse
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% Set up BLOCK DIAGRAM plot
%
% \begin{psdrawBDmatrix}[OPTIONS]{X_SPACING}{Y_SPACING}
%
% X_SPACING
% Y_SPACING vertical and horizontal spacing
%
% Once in Block diagram mode the following commands are available
% (they all create nodes)
%
% \BDadd adder
% \BDmul multiplier
% \BDdelay z^{-1} delay block
% \BDdelayN{N} z^{-N} delay block
% \BDfilter{text} filter box
% \BDfilterMulti{text} multiline filter box
% \BDsplit splitting point (dot)
% \BDupsmp{K} upsampler by K
% \BDdwsmp{K} downsampler by K
%
\def\BDwidth{1.2pt}
\psset{xunit=1mm,yunit=1mm,linewidth=\BDwidth}
\def\BDadd{[mnode=circle] +}%
\def\BDsub{[mnode=circle] -}%
\def\BDmul{[mnode=circle] $\times$}%
\def\BDdelay{\psframebox[framesep=.3]{$z^{-1}$}}%
\def\BDdelayN#1{\psframebox[framesep=.3]{$z^{-#1}$}}%
\def\BDfilter#1{\psframebox[framesep=.3]{#1}}%
\def\BDfilterMulti#1{\psframebox%
{\begin{tabular}{c} #1 \end{tabular}}}%
\def\BDsplit{[mnode=dot,linewidth=1.5pt]}%
\def\BDupsmp#1{[mnode=circle] $#1 \uparrow$}%
\def\BDdwsmp#1{[mnode=circle] $#1 \downarrow$}%
\def\BDsampler{\raisebox{-16.2pt}{
\psset{xunit=1em,yunit=1em,linewidth=1.2pt}%
\pspicture(-2.6,-1.8)(1,1.8)%
\psline(-3,0)(-1.6,0)(0.7,1.2)
\psline(0.8,0)(1,0)
\psarc[linewidth=1pt]{<-}(-1.2,0){1.4em}{-10}{55}
\endpspicture}}
\newcommand{\BDsamplerFramed}[1][1em]{%BDsamplerFramed{\raisebox{-1.4em}{\psframebox[linewidth=1.5pt]{%
\newskip\tmpLen \tmpLen=#1%
\raisebox{-1.5\tmpLen}{%
\psframebox[linewidth=1.2pt]{%
\psset{unit=#1,linearc=0}%
\pspicture(-3.1,-2)(3,2)%
\psline(-2.8,-0.2)(-1.6,-0.2)(1.2,1.4)%
\psline(1.1,-0.2)(1.8,-0.2)%
\psarc[linewidth=1pt]{<-}(-1.6,0){2}{-10}{55}%
\endpspicture}}}
\newcommand{\BDlowpass}[1][1em]{%
\newskip\tmpLen \tmpLen=#1%
\raisebox{-1.5\tmpLen}{%
\psframebox[linewidth=1.2pt]{%
\psset{unit=#1,linearc=0}%
\pspicture(-3.1,-2)(3,2)%
\psline{->}(-2.8,-1)(2.8,-1)%
\psline{->}(0,-1.8)(0,2)%
\psline[linewidth=1.5pt](-1,-1)(-1,0.8)(1,0.8)(1,-1)%
\endpspicture}}}
\newcommand{\BDsinc}[1][1em]{%
\newskip\tmpLen \tmpLen=#1%
\raisebox{-1.5\tmpLen}{%
\psframebox[linewidth=1.2pt]{%
\psset{unit=#1,linearc=0}%
\pspicture(-3.1,-2)(3,2)%
\psline{->}(-2.8,-.5)(2.8,-.5)%
\psline{->}(0,-1.8)(0,2)%
\psplot[linewidth=1pt, plotpoints=500,linejoin=1]{-2.5}{2.5}{x \dspSinc{0}{0.5} 1.5 mul .5 sub}%
\endpspicture}}}
\newenvironment{dspBlocks}[2]{%
\begin{psmatrix}[colsep=#1,rowsep=#2,emnode=R] }{%
\end{psmatrix}
}
\newcommand{\BDConnH}[5][]{\ncline[#1]{->}{#2,#3}{#2,#4}\taput{#5}}
\newcommand{\BDConnHNext}[2]{\FPupn\n{#2 1 add 0 trunc}\ncline{->}{#1,#2}{#1,\n}}
\newcommand{\BDConnV}[5][]{\ncline[#1]{->}{#2,#3}{#4,#3}\tlput{#5}}
\makeatother
Event Timeline
Log In to Comment