{"id":284344,"date":"2017-04-03T12:55:17","date_gmt":"2017-04-03T08:55:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=284344"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=284344","title":{"rendered":"\u0421\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0437\u0432\u0435\u043d\u044c\u0435\u0432 \u0410\u0421\u0423 \u043d\u0430 Python"},"content":{"rendered":"<h3>\u0426\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>  \u0412 \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 [1] \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u0442\u043e\u0434 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c, \u0442.\u0435. \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435, \u043a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u043a\u0438 [2]. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<a name=\"habracut\"><\/a><\/p>\n<h3>\u041c\u0435\u0442\u043e\u0434 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p>  \u041f\u0443\u0441\u0442\u044c \u043d\u0430 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0447\u0438\u0441\u0442\u044b\u0439 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b. \u041c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u044f\u0434 \u0424\u0443\u0440\u044c\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0435\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440.<\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python #coding=utf8 from numpy import array, arange, abs as np_abs from numpy.fft import rfft, rfftfreq from math import sin, pi import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams['font.family'] = 'fantasy' mpl.rcParams['font.fantasy'] = 'Comic Sans MS, Arial' FD = 250000#\u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043e\u0442\u0441\u0447\u0451\u0442\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 N = 2500#\u0434\u043b\u0438\u043d\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, N\/FD \u0441\u0435\u043a\u0443\u043d\u0434  F=250.0#\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 w=(2.*pi*F\/FD)#\u043e\u0442\u0441\u0447\u0451\u0442 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b  A=3.0#\u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 B=0.5#\u043f\u043e\u0440\u043e\u0433 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f #\u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0447\u0438\u0441\u0442\u044b\u0439 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 F \u0434\u043b\u0438\u043d\u043e\u0439 N sin_sig = array([A*sin(w*t) for t in range(N)])#\u0433\u0440\u0430\u0444\u0438\u043a \u0441\u0438\u0433\u043d\u0430\u043b\u0430 plt.plot(arange(N)\/float(FD), sin_sig, 'r') plt.xlabel('\u0412\u0440\u0435\u043c\u044f, \u0441\u0435\u043a.') plt.ylabel('\u0410\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430  \u0441\u0438\u0433\u043d\u0430\u043b\u0430') plt.title('\u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b\u0430') plt.grid(True) plt.show() spectr_sin = rfft(sin_sig )#\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 rfft  \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 plt.plot(rfftfreq(N, 1.\/FD), np_abs(spectr_sin)\/N) #\u0433\u0440\u0430\u0444\u0438\u043a \u0441\u043f\u0435\u043a\u0442\u0440\u0430 plt.xlabel('\u0427\u0430\u0441\u0442\u043e\u0442\u0430, \u0413\u0446') plt.ylabel('\u0410\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430  \u0441\u0438\u0433\u043d\u0430\u043b\u0430') plt.title('\u0421\u043f\u0435\u043a\u0442\u0440 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430') plt.grid(True) plt.show() <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u0438 \u0441\u043f\u0435\u043a\u0442\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0441 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u00ab\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u0438\u0435\u043c\u00bb.<\/p>\n<pre><code class=\"python\"># \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u0438 c \u00ab\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u0438\u0435\u043c\u00bb \u0438\u0437 A*sin(w*t) \u043f\u0440\u0438 abs(\u0410)&gt;abs(B) sinp_sig =array([A*sin(w*t) if abs(A*sin(w*t))&lt;B else A*sin(w*t)*B\/abs(A*sin(w*t)) for t in range(N)]) plt.plot(arange(N)\/float(FD), sinp_sig, 'r')#\u0433\u0440\u0430\u0444\u0438\u043a \u0441\u0438\u0433\u043d\u0430\u043b\u0430 plt.xlabel('\u0412\u0440\u0435\u043c\u044f, \u0441\u0435\u043a.') plt.ylabel('\u0410\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430  \u0441\u0438\u0433\u043d\u0430\u043b\u0430') plt.title('\u0424\u043e\u0440\u043c\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 c  \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u0438\u0435\u043c') plt.grid(True) plt.show() spectr_sinp = rfft(sinp_sig ) plt.plot(rfftfreq(N, 1.\/FD), np_abs(spectr_sinp)\/N)#\u0433\u0440\u0430\u0444\u0438\u043a \u0441\u043f\u0435\u043a\u0442\u0440\u0430 plt.xlabel('\u0427\u0430\u0441\u0442\u043e\u0442\u0430, \u0413\u0446') plt.ylabel('\u0410\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430') plt.title('\u0421\u043f\u0435\u043a\u0442\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0441 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u0438\u0435\u043c') plt.grid(True) plt.show() <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0443\u0447\u0451\u0442\u0430 \u0437\u043d\u0430\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f B \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u2014 A*sin(w*t)*B\/abs(A*sin(w*t).<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u0438\u0434 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0438 \u0441\u043f\u0435\u043a\u0442\u0440 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u043c \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u0432 \u043d\u043e\u043b\u044c.<\/p>\n<pre><code class=\"python\"># \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u0438 \u00abc\u043e \u0441\u043f\u0430\u0434\u043e\u043c \u0434\u043e \u043d\u0443\u043b\u044f\u00bb  \u0438\u0437 A*sin(w*t) \u043f\u0440\u0438 abs(\u0410)=abs(B) sinn_sig = array([A*sin(w*t) if abs(A*sin(w*t))&lt;B else 0 for t in range(N)]) plt.plot(arange(N)\/float(FD), sinn_sig, 'r') plt.xlabel('\u0412\u0440\u0435\u043c\u044f, \u0441\u0435\u043a.') plt.ylabel('\u0410\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430  \u0441\u0438\u0433\u043d\u0430\u043b\u0430') plt.title('\u0424\u043e\u0440\u043c\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 c\u043e \u0441\u043f\u0430\u0434\u043e\u043c') plt.grid(True) plt.show() spectr_sinn = rfft(sinn_sig ) plt.plot(rfftfreq(N, 1.\/FD), np_abs(spectr_sinn)\/N)#\u0433\u0440\u0430\u0444\u0438\u043a \u0441\u043f\u0435\u043a\u0442\u0440\u0430 plt.xlabel('\u0427\u0430\u0441\u0442\u043e\u0442\u0430, \u0413\u0446') plt.ylabel('\u0410\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0441\u043e \u0441\u043f\u0430\u0434\u043e\u043c ') plt.title('\u0421\u043f\u0435\u043a\u0442\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0441\u043e \u0441\u043f\u0430\u0434\u043e\u043c') plt.grid(True) plt.show() <\/code><\/pre>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h3>\n<p>  \u0421\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/97a\/402\/4e7\/97a4024e78a34f4096d324affd0ee049.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2ae\/4c3\/203\/2ae4c32037fb4797a9881471b4e18c0e.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/107\/c54\/1bb\/107c541bb6fe4c2aadb2fd5e0ea9b36e.png\"\/><\/p>\n<p>  \u0421\u043f\u0435\u043a\u0442\u0440\u044b \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fdd\/5dc\/dcd\/fdd5dcdcd0a644f4a4a5d8d7e142aa0f.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ee1\/5bb\/e66\/ee15bbe663504833b2cd5afd4d590529.png\"\/><\/p>\n<p>  \u041d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043e \u0441\u043f\u0430\u0434\u043e\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u043a. \u0414\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u041d\u0427 \u0444\u0438\u043b\u044c\u0442\u0440, \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 [3]. \u0414\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b [3], \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">A=1.0 B=0.4 test_n = 2560 # \u041a\u043e\u043b-\u0432\u043e \u043e\u0442\u0441\u0447\u0451\u0442\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 test_f = 200 # \u041d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043e\u0442 \u043d\u0443\u043b\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 test_period_count = 10.0 # \u041a\u043e\u043b-\u0432\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 test_t = numpy.linspace(0.0, test_period_count\/test_f, test_n) # \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b sin(wt), \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c test_base_signal = array([A*sin(2*pi*test_f* i) for i in test_t ]) test_signal =array([A*sin(2*pi*test_f* i) if abs(sin(2*pi*test_f* i))&lt;B else 0 for i in test_t ]) #test_signal=array([A*sin(2*pi*test_f* i) if abs(A*sin(2*pi*test_f* i))&lt;B else A*sin(2*pi*test_f* i)*B\/abs(A*sin(2*pi*test_f* i)) for i in test_t ]) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/178\/f38\/a4a\/178f38a4ac144616b00d799daf7bdfd3.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/952\/a03\/18d\/952a0318d0fe43ce88533b4f7b127b5f.png\"\/><\/p>\n<p>  \u0421\u043f\u0435\u043a\u0442\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e6b\/2be\/d70\/e6b2bed70ad94ffca959fe8b508f67a2.png\"\/><\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>  \u0420\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0426\u0410\u041f \u0438 \u0410\u0426\u041f.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p>  1. \u041c\u0435\u0442\u043e\u0434 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Python <a href=\"https:\/\/habrahabr.ru\/post\/324158\/\">habrahabr.ru\/post\/324158<\/a><br \/>  2. \u041c\u0435\u0442\u043e\u0434 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"http:\/\/www.studfiles.ru\/preview\/998484\/page\">www.studfiles.ru\/preview\/998484\/page<\/a>:16\/.<br \/>  3. \u0426\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 <a href=\"https:\/\/github.com\/redneckz\/cable-8km\/blob\/master\/digital_filter.py\">github.com\/redneckz\/cable-8km\/blob\/master\/digital_filter.py<\/a><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/325502\/\"> https:\/\/habrahabr.ru\/post\/325502\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<h3>\u0426\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>  \u0412 \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 [1] \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u0442\u043e\u0434 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c, \u0442.\u0435. \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435, \u043a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u043a\u0438 [2]. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-284344","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=284344"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284344\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=284344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=284344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=284344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}