Main Content

sweeptone

指数扫式正弦

描述

excitation= sweeptone()returns an excitation signal generated using the exponential swept sine (ESS) technique. By default, the signal has a 6-second duration, followed by 4 seconds of silence, for a sample rate of 44100 Hz.

excitation= sweeptone(Swdurspecifies the duration of the exponential swept sine signal.

excitation= sweeptone(Swdur,,,,silDur指定指数扫描正弦信号之后的静音持续时间。

例子

excitation= sweeptone(Swdur,,,,silDur,,,,FS指定扫描的样本速率为FS赫兹。

例子

excitation= sweeptone(___,,,,名称,价值使用一个或多个指定选项名称,价值对以前的语法中的输入参数外,对参数。

例子

全部收缩

Create a sweep tone excitation signal by using thesweeptone功能。

激发= sweptone(2,1,44100); plot(excitation) title('励磁'

图包含一个轴对象。带有标题激发的轴对象包含类型线的对象。

通过无限脉冲响应(IIR)滤波器将激发信号传递,并添加噪声以建模现实世界记录(系统响应)。

[B,A] = butter(10,[.1 .7]); rec = filter(B,A,excitation); nrec = rec + 0.12*randn(size(rec)); plot(nrec) title(“系统响应”

图包含一个轴对象。带有标题系统响应的轴对象包含类型行的对象。

传递激发信号和系统响应对最重要的功能以估计脉冲响应。将估计值截断为100点。利用impz确定系统的真正冲动响应。绘制真正的脉冲响应和估计的脉冲响应以进行比较。

irEstimate = impzest(excitation,nrec); irEstimate = irEstimate(1:101); irTrue = impz(B,A,101); plot(0:100,irEstimate,...0:100,irtrue,'ro') 传奇(“真正的冲动响应”,,,,“估计冲动响应”

图包含一个轴对象。The axes object contains 2 objects of type line. These objects represent True impulse response, Estimated impulse response.

用3秒的扫描从20 Hz到20 kHz产生指数式的正弦(ESS)信号,并以2秒的静音结束。将样本率指定为48 kHz。

FS= 48e3; excitation = sweeptone(3,2,fs,'SweepFrequencyRange',[20 20E3]);

在时间和时间上可视化激发。

t =(0:numel(兴奋)-1)/fs;情节(t,激发)xlabel('Time (s)'

图包含一个轴对象。轴对象包含一个类型行的对象。

频谱图(激发,512,0,1024,FS,,,'yaxis'

图包含一个轴对象。轴对象包含类型图像的对象。

输入参数

全部收缩

指数扫描正弦信号的持续时间在几秒钟内,指定为标量[0.5,15]。

激发信号的总持续时间必须小于或等于15秒:Swdur+silDur≤15。

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64

指数扫式正弦后的静音持续时间,在范围内指定为标量(0,14.5)。

激发信号的总持续时间必须小于或等于15秒:Swdur+silDur≤15。

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64

Hz的采样率,指定为正标量。

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64

名称值参数

Specify optional pairs of arguments asname1 = value1,...,namen = valuen, 在哪里姓名是参数名称和Value是相应的值。名称值参数必须在其他参数之后出现,但是对的顺序并不重要。

在R2021a之前,请使用逗号分隔每个名称和值,并附上姓名用引号。

例子:“激发级”,-5

在DB中生成的激发信号的级别,该范围内指定为标量[-42,0]

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64

Range of sweep frequency in Hz, specified as a two-element row vector. The sweep frequency range can be specified low to high or high to low. That is,[10 22000]and[22000 10]are both valid inputs. The largest value of the sweep frequency range must be less than or equal toFS/2。

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64

输出参数

全部收缩

使用ESS技术生成的激发信号,作为列向量返回。列向量的长度大约Swdur+silDur)*FS样品。

数据类型:双倍的

References

[1]法琳娜,安吉洛。“通过正弦扫描进行冲动响应测量的进步。”呈现在音频工程协会第122惯例,,,,Vienna, Austria, 2007.

扩展功能

C/C ++代码生成
Generate C and C++ code using MATLAB® Coder™.

版本历史记录

在R2018B中引入