호가 있는 함수

호가 있는 함수

이 그래픽을 재현하려고 합니다.

여기에 이미지 설명을 입력하세요

나는 내 방법이 구식이고 다소 잘못되었다는 것을 알고 있습니다. function현재 curve through points.

설명:

이 함수는 공식으로 정의되지 않지만 신호의 진폭과 아날로그-디지털 변환기 출력의 잡음 플로어(상수 진폭이 있는 잡음) 사이의 거리를 나타냅니다. 신호의 진폭이 증가함에 따라 선형적으로 잡음으로부터 멀어집니다. 따라서 함수의 첫 번째 부분입니다. 그러나 선형적 성장이 멈추고 아날로그-디지털 변환기가 포화되고 신호 진폭과 노이즈 플로어 사이의 거리가 갑자기 감소하면서 최고점에 도달합니다.

이 MWE에 대한 나의 시도는 다음과 같습니다.

\documentclass{memoir}
\usepackage{tikz,pgfplots}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes,snakes}
\usetikzlibrary{patterns,hobby}

\begin{document}
\begin{figure}[htbp]
    \centering
    \begin{tikzpicture}
        \draw[-{Latex[length=2.5mm, width=1.5mm]}] (0,0)--(6,0) node[anchor=north]{};
        \draw[-{Latex[length=2.5mm, width=1.5mm]}] (0,0)--(0,6) node[anchor=east]{};
        \node[anchor=south, rotate=90] at (-0.5,3) {$SNR,~SNDR~[dB]$};
        \node[anchor=north] at (3,-0.5) {$Input~Signal~Amplitude~[dBv]$};
        \node[anchor=north east] at (0,0) {0};

        \draw (0,0) -- (4,4);
        \draw (4,4) to [curve through ={(4.2,4) . . (4.5,3.6)}] (5,2);% curve
    \end{tikzpicture}
    \caption{Performance metrics.}
\end{figure}
\end{document}

결과:

여기에 이미지 설명을 입력하세요

답변1

함수를 플롯하면 됩니다. 이 플롯의 출처를 좀 더 알려주시면 더 나은 기능을 찾아보겠습니다. 제가 여기서 하는 일은 타원형 호를 그리는 것입니다. 나는 이를 위해 함수를 사용하고 있지만 arcTi에서 제공하는 구문을 똑같이 사용할 수도 있습니다.케이Z. 타원형 호의 이유는 함수가 x_max/2에서 수직이 되는 것처럼 보이기 때문입니다. 그리고 함수를 그리는 이유는 여러분이 이러한 플롯 뒤에 이론이 있고 궁극적으로 플롯에 실제 함수를 제공할 것이라고 생각하기 때문입니다. (그리고 추가적인 특징을 그리는데 어려움은 없으실 거라 생각합니다.)

\documentclass{memoir}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,calc,intersections}

\begin{document}
I guess that has now become more a mathematics problem. Let's assume you really
want a function that starts off at $(x_1,y_1)$ somewhere with slope 1 and then
has slope $-\infty$ at some other place. This defines an elliptical arc, which
can be parametrized by
\[ \gamma(\varphi)~=~\left(\begin{array}{c}
 x_0+a\,\cos(\varphi)\\ b\,\sin(\varphi)
\end{array}\right)\;.\]
Here, we have set a possible shift in $y$ direction to 0 since we want the slope
to become infinite when the curve hits the $x$--axis.
What is the angle at which the slope is 1? The slope is given by the ratio of
the derivatives of the coordinates, such that
\[ -\frac{b\,\cos(\varphi_1)}{a\,\sin(\varphi_1)}~\stackrel{!}{=}~1
\quad\curvearrowright\quad \varphi_1~=~-\arctan\left(\frac{b}{a}\right)\;.
\]
Now we want at the same time that
\[ \gamma(\varphi)~=~\left(\begin{array}{c}
 x_0+a\,\cos(\varphi_1)\\ b\,\sin(\varphi_1)
\end{array}\right)~=~
\left(\begin{array}{c}
x_0-\frac{1}{\sqrt{1+b^2/a^2}}\\
\frac{b/a}{\sqrt{1+b^2/a^2}}
\end{array}\right)
~\stackrel{!}{=}~
\left(\begin{array}{c}x_1\\ y_1\end{array}\right)\;.\]
This means that we can only adjust one parameter, say $b$, and the other
parameters are then fixed by
\[
 a^2~=~\frac{b}{y_1}\,\sqrt{b^2-y_1^2}\quad\text{and}\quad
 x_0~=~x_1-y_1+\frac{b^2}{y_1}\;.
\]
\begin{figure}[htbp]
    \centering
    \begin{tikzpicture}
        \draw[-{Latex[length=2.5mm, width=1.5mm]}] (0,0)--(6,0) node[anchor=north]{};
        \draw[-{Latex[length=2.5mm, width=1.5mm]}] (0,0)--(0,6) node[anchor=east]{};
        \node[anchor=south, rotate=90] at (-0.5,3) {SNR,~SNDR~[dB]};
        \node[anchor=north] at (3,-0.5) {Input~Signal~Amplitude~[dBv]};
        \node[anchor=north east] at (0,0) {0};

        \draw (0,0) -- (4,4);
        % in these examples I have set x_1 = y_1 = 4
        \def\xOne{4}
        \def\b{4.15}
        \pgfmathsetmacro{\a}{\b*sqrt((\b^2-\xOne^2))/4}
        \draw[name path=upper plot] plot[variable=\x,domain=180-atan(\b/\a):0,samples=50] 
        ({\xOne-(\xOne-\b^2/\xOne)+\a*cos(\x)},{\b*sin(\x)});
        \coordinate (max1) at({\xOne-(\xOne-\b^2/\xOne)+\a*cos(90)},{\b*sin(90)});
        \def\b{3.9}
        \def\xOne{3.7}
        \pgfmathsetmacro{\a}{\b*sqrt((\b^2-\xOne^2))/\xOne}
        \draw[dashed,name path=lower plot] plot[variable=\x,domain=180-atan(\b/\a):0,samples=50] 
        ({\xOne-(\xOne-\b^2/\xOne)+\a*cos(\x)},{\b*sin(\x)});
        \coordinate (max2) at
        ({\xOne-(\xOne-\b^2/\xOne)+\a*cos(90)},{\b*sin(90)});
        \coordinate (O) at (0,0);
        \draw[dotted] (O|-max1) -- (max1) node[above,pos=0.7]{SNR$_\mathrm{peak}$} --(O-|max1);
        \path [name path=horizontal 2] (max2) -- ++(2cm,0);
        \draw [dotted,name intersections={of=upper plot and horizontal 2, by={a0}}]
         (a0) -- ++(-2cm,0) node[left]{SNDR$_\mathrm{peak}$};
    \end{tikzpicture}
    \caption{Performance metrics.}
\end{figure}
\end{document}

여기에 이미지 설명을 입력하세요 호를 제어하기 위해 하나의 매개변수 \b를 조정할 수 있습니다. 그리고 최대값 등을 읽는 것은 간단하며 Ti를 사용할 수 있습니다.케이Z를 사용하면 그림과 같이 모든 종류의 작업을 수행할 수 있습니다.

관련 정보