This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new 0745a4cf add docs for envelope function (#191)
0745a4cf is described below

commit 0745a4cf07576aa6b7e00942fb34fc6f589b7f1a
Author: Zhijia Cao <[email protected]>
AuthorDate: Fri Nov 8 17:09:40 2024 +0800

    add docs for envelope function (#191)
---
 src/UserGuide/Master/SQL-Manual/SQL-Manual.md      |  3 +
 .../stage/Operators-Functions/Frequency-Domain.md  | 69 ++++++++++++++++++++-
 src/UserGuide/latest/SQL-Manual/SQL-Manual.md      |  3 +
 .../stage/Operators-Functions/Frequency-Domain.md  | 68 ++++++++++++++++++++-
 src/zh/UserGuide/Master/Reference/UDF-Libraries.md | 66 ++++++++++++++++++++
 src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md   |  3 +
 .../stage/Operators-Functions/Frequency-Domain.md  | 71 +++++++++++++++++++++-
 src/zh/UserGuide/latest/Reference/UDF-Libraries.md | 66 ++++++++++++++++++++
 src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md   |  3 +
 .../stage/Operators-Functions/Frequency-Domain.md  | 68 ++++++++++++++++++++-
 10 files changed, 416 insertions(+), 4 deletions(-)

diff --git a/src/UserGuide/Master/SQL-Manual/SQL-Manual.md 
b/src/UserGuide/Master/SQL-Manual/SQL-Manual.md
index f66a4b94..e7d53ea2 100644
--- a/src/UserGuide/Master/SQL-Manual/SQL-Manual.md
+++ b/src/UserGuide/Master/SQL-Manual/SQL-Manual.md
@@ -1263,6 +1263,9 @@ select ifft(re, im, 'interval'='1m', 'start'='2021-01-01 
00:00:00') from root.te
 
 # LowPass
 select lowpass(s1,'wpass'='0.45') from root.test.d1
+
+# Envelope
+select envelope(s1) from root.test.d1
 ```
 
 ### Data Matching
diff --git a/src/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md 
b/src/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md
index fd801e56..e198c856 100644
--- a/src/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md
+++ b/src/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md
@@ -602,4 +602,71 @@ Output series:
 +-----------------------------+----------------------------------------+
 ```
 
-Note: The input is $y=sin(2\pi t/4)+2sin(2\pi t/5)$ with a length of 20. Thus, 
the output is $y=2sin(2\pi t/5)$ after low-pass filtering.
\ No newline at end of file
+Note: The input is $y=sin(2\pi t/4)+2sin(2\pi t/5)$ with a length of 20. Thus, 
the output is $y=2sin(2\pi t/5)$ after low-pass filtering.
+
+
+## Envelope
+
+### Usage
+
+This function can demodulate the signal and extract the envelope by inputting 
the one-dimensional floating-point number set and the modulation frequency 
specified by the user. The goal of demodulation is to extract parts of interest 
from complex signals and make them easier to understand. For example, 
demodulation can find the envelope of the signal, that is, the trend of 
amplitude change.
+
+**Name:** Envelope
+
+**Input:** Only a single input sequence is supported. The type is INT32 / 
INT64 / FLOAT / DOUBLE
+
+**Parameters:**
+
++ `frequency`:Modulation frequency (optional, positive). Without this 
parameter, the system will infer the frequency based on the time interval of 
the corresponding time of the sequence.
++ `amplification`: Amplification multiple (optional, a positive integer. The 
result of the output Time column is a collection of positive integers, with no 
decimals. When the frequency is less than 1, the frequency can be amplified by 
this parameter to show normal results).
+
+**Output:**
++ `Time`: The value returned in this column means frequency, not time. If the 
output format is time (for example, 1970-01-01T08:00:19.000+08:00), convert it 
to a timestamp value.
+
++ `Envelope(Path, 'frequency'='{frequency}')`:Output a single sequence of type 
DOUBLE, which is the result of envelope analysis.
+
+**Note:** When the values of the demodulated original sequence are not 
continuous, this function is treated as continuous, and it is recommended that 
the analyzed time series be a complete time series. Specify the start time and 
end time.
+
+### Examples
+
+Input series:
+
+```
++-----------------------------+---------------+
+|                         Time|root.test.d1.s1|
++-----------------------------+---------------+
+|1970-01-01T08:00:01.000+08:00|       1.0     |
+|1970-01-01T08:00:02.000+08:00|       2.0     |
+|1970-01-01T08:00:03.000+08:00|       3.0     |
+|1970-01-01T08:00:04.000+08:00|       4.0     |
+|1970-01-01T08:00:05.000+08:00|       5.0     |
+|1970-01-01T08:00:06.000+08:00|       6.0     |
+|1970-01-01T08:00:07.000+08:00|       7.0     |
+|1970-01-01T08:00:08.000+08:00|       8.0     |
+|1970-01-01T08:00:09.000+08:00|       9.0     |
+|1970-01-01T08:00:10.000+08:00|       10.0    |
++-----------------------------+---------------+
+```
+
+SQL for query:
+```sql
+set time_display_type=long;
+select 
envelope(s1),envelope(s1,'frequency'='1000'),envelope(s1,'amplification'='10') 
from root.test.d1;
+```
+Output series:
+
+```
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|Time|envelope(root.test.d1.s1)|envelope(root.test.d1.s1, 
"frequency"="1000")|envelope(root.test.d1.s1, "amplification"="10")|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|   0|        6.284350808484124|                            6.284350808484124| 
                             6.284350808484124|
+| 100|       1.5581923657404393|                           1.5581923657404393| 
                                          null|
+| 200|       0.8503211038340728|                           0.8503211038340728| 
                                          null|
+| 300|        0.512808785945551|                            0.512808785945551| 
                                          null|
+| 400|      0.26361156774506744|                          0.26361156774506744| 
                                          null|
+|1000|                     null|                                         null| 
                            1.5581923657404393|
+|2000|                     null|                                         null| 
                            0.8503211038340728|
+|3000|                     null|                                         null| 
                             0.512808785945551|
+|4000|                     null|                                         null| 
                           0.26361156774506744|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+```
\ No newline at end of file
diff --git a/src/UserGuide/latest/SQL-Manual/SQL-Manual.md 
b/src/UserGuide/latest/SQL-Manual/SQL-Manual.md
index 714ac898..6f07e9b3 100644
--- a/src/UserGuide/latest/SQL-Manual/SQL-Manual.md
+++ b/src/UserGuide/latest/SQL-Manual/SQL-Manual.md
@@ -1261,6 +1261,9 @@ select ifft(re, im, 'interval'='1m', 'start'='2021-01-01 
00:00:00') from root.te
 
 # LowPass
 select lowpass(s1,'wpass'='0.45') from root.test.d1
+
+# Envelope
+select envelope(s1) from root.test.d1
 ```
 
 ### Data Matching
diff --git a/src/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md 
b/src/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md
index fd801e56..118e703f 100644
--- a/src/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md
+++ b/src/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md
@@ -602,4 +602,70 @@ Output series:
 +-----------------------------+----------------------------------------+
 ```
 
-Note: The input is $y=sin(2\pi t/4)+2sin(2\pi t/5)$ with a length of 20. Thus, 
the output is $y=2sin(2\pi t/5)$ after low-pass filtering.
\ No newline at end of file
+Note: The input is $y=sin(2\pi t/4)+2sin(2\pi t/5)$ with a length of 20. Thus, 
the output is $y=2sin(2\pi t/5)$ after low-pass filtering.
+
+## Envelope
+
+### Usage
+
+This function can demodulate the signal and extract the envelope by inputting 
the one-dimensional floating-point number set and the modulation frequency 
specified by the user. The goal of demodulation is to extract parts of interest 
from complex signals and make them easier to understand. For example, 
demodulation can find the envelope of the signal, that is, the trend of 
amplitude change.
+
+**Name:** Envelope
+
+**Input:** Only a single input sequence is supported. The type is INT32 / 
INT64 / FLOAT / DOUBLE
+
+**Parameters:**
+
++ `frequency`:Modulation frequency (optional, positive). Without this 
parameter, the system will infer the frequency based on the time interval of 
the corresponding time of the sequence.
++ `amplification`: Amplification multiple (optional, a positive integer. The 
result of the output Time column is a collection of positive integers, with no 
decimals. When the frequency is less than 1, the frequency can be amplified by 
this parameter to show normal results).
+
+
+**Output:**
++ `Time`: The value returned in this column means frequency, not time. If the 
output format is time (for example, 1970-01-01T08:00:19.000+08:00), convert it 
to a timestamp value.
++ `Envelope(Path, 'frequency'='{frequency}')`:Output a single sequence of type 
DOUBLE, which is the result of envelope analysis.
+
+**Note:** When the values of the demodulated original sequence are not 
continuous, this function is treated as continuous, and it is recommended that 
the analyzed time series be a complete time series. Specify the start time and 
end time.
+
+### Examples
+
+Input series:
+
+```
++-----------------------------+---------------+
+|                         Time|root.test.d1.s1|
++-----------------------------+---------------+
+|1970-01-01T08:00:01.000+08:00|       1.0     |
+|1970-01-01T08:00:02.000+08:00|       2.0     |
+|1970-01-01T08:00:03.000+08:00|       3.0     |
+|1970-01-01T08:00:04.000+08:00|       4.0     |
+|1970-01-01T08:00:05.000+08:00|       5.0     |
+|1970-01-01T08:00:06.000+08:00|       6.0     |
+|1970-01-01T08:00:07.000+08:00|       7.0     |
+|1970-01-01T08:00:08.000+08:00|       8.0     |
+|1970-01-01T08:00:09.000+08:00|       9.0     |
+|1970-01-01T08:00:10.000+08:00|       10.0    |
++-----------------------------+---------------+
+```
+
+SQL for query:
+```sql
+set time_display_type=long;
+select 
envelope(s1),envelope(s1,'frequency'='1000'),envelope(s1,'amplification'='10') 
from root.test.d1;
+```
+Output series:
+
+```
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|Time|envelope(root.test.d1.s1)|envelope(root.test.d1.s1, 
"frequency"="1000")|envelope(root.test.d1.s1, "amplification"="10")|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|   0|        6.284350808484124|                            6.284350808484124| 
                             6.284350808484124|
+| 100|       1.5581923657404393|                           1.5581923657404393| 
                                          null|
+| 200|       0.8503211038340728|                           0.8503211038340728| 
                                          null|
+| 300|        0.512808785945551|                            0.512808785945551| 
                                          null|
+| 400|      0.26361156774506744|                          0.26361156774506744| 
                                          null|
+|1000|                     null|                                         null| 
                            1.5581923657404393|
+|2000|                     null|                                         null| 
                            0.8503211038340728|
+|3000|                     null|                                         null| 
                             0.512808785945551|
+|4000|                     null|                                         null| 
                           0.26361156774506744|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+```
\ No newline at end of file
diff --git a/src/zh/UserGuide/Master/Reference/UDF-Libraries.md 
b/src/zh/UserGuide/Master/Reference/UDF-Libraries.md
index a1aadaa4..226c853c 100644
--- a/src/zh/UserGuide/Master/Reference/UDF-Libraries.md
+++ b/src/zh/UserGuide/Master/Reference/UDF-Libraries.md
@@ -3980,6 +3980,72 @@ select lowpass(s1,'wpass'='0.45') from root.test.d1
 |1970-01-01T08:00:18.000+08:00|                     -1.9021130073323924|
 |1970-01-01T08:00:19.000+08:00|                  -2.664535259100376E-16|
 +-----------------------------+----------------------------------------+
+```
+## Envelope
+
+### 函数简介
+
+本函数通过输入一维浮点数数组和用户指定的调制频率,实现对信号的解调和包络提取。解调的目标是从复杂的信号中提取感兴趣的部分,使其更易理解。比如通过解调可以找到信号的包络,即振幅的变化趋势。
+
+**函数名:** Envelope
+
+**输入序列:** 仅支持单个输入序列,类型为 INT32 / INT64 / FLOAT / DOUBLE
+
+**参数:**
+
++ `frequency`:频率(选填,正数。不填此参数,系统会基于序列对应时间的时间间隔来推断频率)。
++ `amplification`: 
扩增倍数(选填,正整数。输出Time列的结果为正整数的集合,不会输出小数。当频率小1时,可通过此参数对频率进行扩增以展示正常的结果)。
+
+**输出序列:**
++ `Time`: 
该列返回的值的含义是频率而并非时间,如果输出的格式为时间格式(如:1970-01-01T08:00:19.000+08:00),请将其转为时间戳值。
+
++ `Envelope(Path, 'frequency'='{frequency}')`:输出单个序列,类型为DOUBLE,它是包络分析之后的结果。
+
+**提示:** 当解调的原始序列的值不连续时,本函数会视为连续处理,建议被分析的时间序列是一段值完整的时间序列。同时建议指定开始时间与结束时间。
+
+### 使用示例
+
+输入序列:
+
+```
++-----------------------------+---------------+
+|                         Time|root.test.d1.s1|
++-----------------------------+---------------+
+|1970-01-01T08:00:01.000+08:00|       1.0     |
+|1970-01-01T08:00:02.000+08:00|       2.0     |
+|1970-01-01T08:00:03.000+08:00|       3.0     |
+|1970-01-01T08:00:04.000+08:00|       4.0     |
+|1970-01-01T08:00:05.000+08:00|       5.0     |
+|1970-01-01T08:00:06.000+08:00|       6.0     |
+|1970-01-01T08:00:07.000+08:00|       7.0     |
+|1970-01-01T08:00:08.000+08:00|       8.0     |
+|1970-01-01T08:00:09.000+08:00|       9.0     |
+|1970-01-01T08:00:10.000+08:00|       10.0    |
++-----------------------------+---------------+
+```
+
+用于查询的SQL语句:
+```sql
+set time_display_type=long;
+select 
envelope(s1),envelope(s1,'frequency'='1000'),envelope(s1,'amplification'='10') 
from root.test.d1;
+```
+输出序列:
+
+```
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|Time|envelope(root.test.d1.s1)|envelope(root.test.d1.s1, 
"frequency"="1000")|envelope(root.test.d1.s1, "amplification"="10")|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|   0|        6.284350808484124|                            6.284350808484124| 
                             6.284350808484124|
+| 100|       1.5581923657404393|                           1.5581923657404393| 
                                          null|
+| 200|       0.8503211038340728|                           0.8503211038340728| 
                                          null|
+| 300|        0.512808785945551|                            0.512808785945551| 
                                          null|
+| 400|      0.26361156774506744|                          0.26361156774506744| 
                                          null|
+|1000|                     null|                                         null| 
                            1.5581923657404393|
+|2000|                     null|                                         null| 
                            0.8503211038340728|
+|3000|                     null|                                         null| 
                             0.512808785945551|
+|4000|                     null|                                         null| 
                           0.26361156774506744|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+
 ```
 
 注:输入序列服从$y=sin(2\pi t/4)+2sin(2\pi t/5)$,长度为20,因此低通滤波之后的输出序列服从$y=2sin(2\pi 
t/5)$。
diff --git a/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md 
b/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md
index 435daad2..0f5bffef 100644
--- a/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md
+++ b/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md
@@ -1385,6 +1385,9 @@ select ifft(re, im, 'interval'='1m', 'start'='2021-01-01 
00:00:00') from root.te
 
 # LowPass
 select lowpass(s1,'wpass'='0.45') from root.test.d1
+
+# Envelope
+select envelope(s1) from root.test.d1
 ```
 
 ### 数据匹配
diff --git 
a/src/zh/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md 
b/src/zh/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md
index 50091a0c..b9b5ecfd 100644
--- a/src/zh/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md
+++ b/src/zh/UserGuide/Master/stage/Operators-Functions/Frequency-Domain.md
@@ -595,4 +595,73 @@ select lowpass(s1,'wpass'='0.45') from root.test.d1
 +-----------------------------+----------------------------------------+
 ```
 
-注:输入序列服从$y=sin(2\pi t/4)+2sin(2\pi t/5)$,长度为20,因此低通滤波之后的输出序列服从$y=2sin(2\pi 
t/5)$。
\ No newline at end of file
+注:输入序列服从$y=sin(2\pi t/4)+2sin(2\pi t/5)$,长度为20,因此低通滤波之后的输出序列服从$y=2sin(2\pi 
t/5)$。
+
+
+
+## Envelope
+
+### 函数简介
+
+本函数通过输入一维浮点数数组和用户指定的调制频率,实现对信号的解调和包络提取。解调的目标是从复杂的信号中提取感兴趣的部分,使其更易理解。比如通过解调可以找到信号的包络,即振幅的变化趋势。
+
+**函数名:** Envelope
+
+**输入序列:** 仅支持单个输入序列,类型为 INT32 / INT64 / FLOAT / DOUBLE
+
+**参数:**
+
++ `frequency`:频率(选填,正数。不填此参数,系统会基于序列对应时间的时间间隔来推断频率)。
++ `amplification`: 
扩增倍数(选填,正整数。输出Time列的结果为正整数的集合,不会输出小数。当频率小1时,可通过此参数对频率进行扩增以展示正常的结果)。
+
+**输出序列:** 
++ `Time`: 
该列返回的值的含义是频率而并非时间,如果输出的格式为时间格式(如:1970-01-01T08:00:19.000+08:00),请将其转为时间戳值。
+
++ `Envelope(Path, 'frequency'='{frequency}')`:输出单个序列,类型为DOUBLE,它是包络分析之后的结果。
+
+**提示:** 当解调的原始序列的值不连续时,本函数会视为连续处理,建议被分析的时间序列是一段值完整的时间序列。同时建议指定开始时间与结束时间。
+
+### 使用示例
+
+输入序列:
+
+```
++-----------------------------+---------------+
+|                         Time|root.test.d1.s1|
++-----------------------------+---------------+
+|1970-01-01T08:00:01.000+08:00|       1.0     |
+|1970-01-01T08:00:02.000+08:00|       2.0     |
+|1970-01-01T08:00:03.000+08:00|       3.0     |
+|1970-01-01T08:00:04.000+08:00|       4.0     |
+|1970-01-01T08:00:05.000+08:00|       5.0     |
+|1970-01-01T08:00:06.000+08:00|       6.0     |
+|1970-01-01T08:00:07.000+08:00|       7.0     |
+|1970-01-01T08:00:08.000+08:00|       8.0     |
+|1970-01-01T08:00:09.000+08:00|       9.0     |
+|1970-01-01T08:00:10.000+08:00|       10.0    |
++-----------------------------+---------------+
+```
+
+用于查询的SQL语句:
+```sql
+set time_display_type=long;
+select 
envelope(s1),envelope(s1,'frequency'='1000'),envelope(s1,'amplification'='10') 
from root.test.d1;
+```
+输出序列:
+
+```
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|Time|envelope(root.test.d1.s1)|envelope(root.test.d1.s1, 
"frequency"="1000")|envelope(root.test.d1.s1, "amplification"="10")|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|   0|        6.284350808484124|                            6.284350808484124| 
                             6.284350808484124|
+| 100|       1.5581923657404393|                           1.5581923657404393| 
                                          null|
+| 200|       0.8503211038340728|                           0.8503211038340728| 
                                          null|
+| 300|        0.512808785945551|                            0.512808785945551| 
                                          null|
+| 400|      0.26361156774506744|                          0.26361156774506744| 
                                          null|
+|1000|                     null|                                         null| 
                            1.5581923657404393|
+|2000|                     null|                                         null| 
                            0.8503211038340728|
+|3000|                     null|                                         null| 
                             0.512808785945551|
+|4000|                     null|                                         null| 
                           0.26361156774506744|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+```
+
diff --git a/src/zh/UserGuide/latest/Reference/UDF-Libraries.md 
b/src/zh/UserGuide/latest/Reference/UDF-Libraries.md
index bbc15ce9..6d0bab5d 100644
--- a/src/zh/UserGuide/latest/Reference/UDF-Libraries.md
+++ b/src/zh/UserGuide/latest/Reference/UDF-Libraries.md
@@ -3932,6 +3932,72 @@ select lowpass(s1,'wpass'='0.45') from root.test.d1
 
 注:输入序列服从$y=sin(2\pi t/4)+2sin(2\pi t/5)$,长度为20,因此低通滤波之后的输出序列服从$y=2sin(2\pi 
t/5)$。
 
+## Envelope
+
+### 函数简介
+
+本函数通过输入一维浮点数数组和用户指定的调制频率,实现对信号的解调和包络提取。解调的目标是从复杂的信号中提取感兴趣的部分,使其更易理解。比如通过解调可以找到信号的包络,即振幅的变化趋势。
+
+**函数名:** Envelope
+
+**输入序列:** 仅支持单个输入序列,类型为 INT32 / INT64 / FLOAT / DOUBLE
+
+**参数:**
+
++ `frequency`:频率(选填,正数。不填此参数,系统会基于序列对应时间的时间间隔来推断频率)。
++ `amplification`: 
扩增倍数(选填,正整数。输出Time列的结果为正整数的集合,不会输出小数。当频率小1时,可通过此参数对频率进行扩增以展示正常的结果)。
+
+**输出序列:**
++ `Time`: 
该列返回的值的含义是频率而并非时间,如果输出的格式为时间格式(如:1970-01-01T08:00:19.000+08:00),请将其转为时间戳值。
+
++ `Envelope(Path, 'frequency'='{frequency}')`:输出单个序列,类型为DOUBLE,它是包络分析之后的结果。
+
+**提示:** 当解调的原始序列的值不连续时,本函数会视为连续处理,建议被分析的时间序列是一段值完整的时间序列。同时建议指定开始时间与结束时间。
+
+### 使用示例
+
+输入序列:
+
+```
++-----------------------------+---------------+
+|                         Time|root.test.d1.s1|
++-----------------------------+---------------+
+|1970-01-01T08:00:01.000+08:00|       1.0     |
+|1970-01-01T08:00:02.000+08:00|       2.0     |
+|1970-01-01T08:00:03.000+08:00|       3.0     |
+|1970-01-01T08:00:04.000+08:00|       4.0     |
+|1970-01-01T08:00:05.000+08:00|       5.0     |
+|1970-01-01T08:00:06.000+08:00|       6.0     |
+|1970-01-01T08:00:07.000+08:00|       7.0     |
+|1970-01-01T08:00:08.000+08:00|       8.0     |
+|1970-01-01T08:00:09.000+08:00|       9.0     |
+|1970-01-01T08:00:10.000+08:00|       10.0    |
++-----------------------------+---------------+
+```
+
+用于查询的SQL语句:
+```sql
+set time_display_type=long;
+select 
envelope(s1),envelope(s1,'frequency'='1000'),envelope(s1,'amplification'='10') 
from root.test.d1;
+```
+输出序列:
+
+```
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|Time|envelope(root.test.d1.s1)|envelope(root.test.d1.s1, 
"frequency"="1000")|envelope(root.test.d1.s1, "amplification"="10")|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|   0|        6.284350808484124|                            6.284350808484124| 
                             6.284350808484124|
+| 100|       1.5581923657404393|                           1.5581923657404393| 
                                          null|
+| 200|       0.8503211038340728|                           0.8503211038340728| 
                                          null|
+| 300|        0.512808785945551|                            0.512808785945551| 
                                          null|
+| 400|      0.26361156774506744|                          0.26361156774506744| 
                                          null|
+|1000|                     null|                                         null| 
                            1.5581923657404393|
+|2000|                     null|                                         null| 
                            0.8503211038340728|
+|3000|                     null|                                         null| 
                             0.512808785945551|
+|4000|                     null|                                         null| 
                           0.26361156774506744|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+```
+
 <!--
 
     Licensed to the Apache Software Foundation (ASF) under one
diff --git a/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md 
b/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md
index 435daad2..0f5bffef 100644
--- a/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md
+++ b/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md
@@ -1385,6 +1385,9 @@ select ifft(re, im, 'interval'='1m', 'start'='2021-01-01 
00:00:00') from root.te
 
 # LowPass
 select lowpass(s1,'wpass'='0.45') from root.test.d1
+
+# Envelope
+select envelope(s1) from root.test.d1
 ```
 
 ### 数据匹配
diff --git 
a/src/zh/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md 
b/src/zh/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md
index 50091a0c..c9d468ad 100644
--- a/src/zh/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md
+++ b/src/zh/UserGuide/latest/stage/Operators-Functions/Frequency-Domain.md
@@ -595,4 +595,70 @@ select lowpass(s1,'wpass'='0.45') from root.test.d1
 +-----------------------------+----------------------------------------+
 ```
 
-注:输入序列服从$y=sin(2\pi t/4)+2sin(2\pi t/5)$,长度为20,因此低通滤波之后的输出序列服从$y=2sin(2\pi 
t/5)$。
\ No newline at end of file
+注:输入序列服从$y=sin(2\pi t/4)+2sin(2\pi t/5)$,长度为20,因此低通滤波之后的输出序列服从$y=2sin(2\pi 
t/5)$。
+
+## Envelope
+
+### 函数简介
+
+本函数通过输入一维浮点数数组和用户指定的调制频率,实现对信号的解调和包络提取。解调的目标是从复杂的信号中提取感兴趣的部分,使其更易理解。比如通过解调可以找到信号的包络,即振幅的变化趋势。
+
+**函数名:** Envelope
+
+**输入序列:** 仅支持单个输入序列,类型为 INT32 / INT64 / FLOAT / DOUBLE
+
+**参数:**
+
++ `frequency`:频率(选填,正数。不填此参数,系统会基于序列对应时间的时间间隔来推断频率)。
++ `amplification`: 
扩增倍数(选填,正整数。输出Time列的结果为正整数的集合,不会输出小数。当频率小1时,可通过此参数对频率进行扩增以展示正常的结果)。
+
+**输出序列:**
++ `Time`: 
该列返回的值的含义是频率而并非时间,如果输出的格式为时间格式(如:1970-01-01T08:00:19.000+08:00),请将其转为时间戳值。
+
++ `Envelope(Path, 'frequency'='{frequency}')`:输出单个序列,类型为DOUBLE,它是包络分析之后的结果。
+
+**提示:** 当解调的原始序列的值不连续时,本函数会视为连续处理,建议被分析的时间序列是一段值完整的时间序列。同时建议指定开始时间与结束时间。
+
+### 使用示例
+
+输入序列:
+
+```
++-----------------------------+---------------+
+|                         Time|root.test.d1.s1|
++-----------------------------+---------------+
+|1970-01-01T08:00:01.000+08:00|       1.0     |
+|1970-01-01T08:00:02.000+08:00|       2.0     |
+|1970-01-01T08:00:03.000+08:00|       3.0     |
+|1970-01-01T08:00:04.000+08:00|       4.0     |
+|1970-01-01T08:00:05.000+08:00|       5.0     |
+|1970-01-01T08:00:06.000+08:00|       6.0     |
+|1970-01-01T08:00:07.000+08:00|       7.0     |
+|1970-01-01T08:00:08.000+08:00|       8.0     |
+|1970-01-01T08:00:09.000+08:00|       9.0     |
+|1970-01-01T08:00:10.000+08:00|       10.0    |
++-----------------------------+---------------+
+```
+
+用于查询的SQL语句:
+```sql
+set time_display_type=long;
+select 
envelope(s1),envelope(s1,'frequency'='1000'),envelope(s1,'amplification'='10') 
from root.test.d1;
+```
+输出序列:
+
+```
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|Time|envelope(root.test.d1.s1)|envelope(root.test.d1.s1, 
"frequency"="1000")|envelope(root.test.d1.s1, "amplification"="10")|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+|   0|        6.284350808484124|                            6.284350808484124| 
                             6.284350808484124|
+| 100|       1.5581923657404393|                           1.5581923657404393| 
                                          null|
+| 200|       0.8503211038340728|                           0.8503211038340728| 
                                          null|
+| 300|        0.512808785945551|                            0.512808785945551| 
                                          null|
+| 400|      0.26361156774506744|                          0.26361156774506744| 
                                          null|
+|1000|                     null|                                         null| 
                            1.5581923657404393|
+|2000|                     null|                                         null| 
                            0.8503211038340728|
+|3000|                     null|                                         null| 
                             0.512808785945551|
+|4000|                     null|                                         null| 
                           0.26361156774506744|
++----+-------------------------+---------------------------------------------+-----------------------------------------------+
+```
\ No newline at end of file

Reply via email to