mag2db
将幅值转换为分贝 (dB)
说明
示例
以分贝为单位显示增益裕度
对于此示例,假设有以下 SISO 反馈回路,其中系统包含多个增益穿越或相位穿越频率,从而导致多个增益或相位裕度值:
创建传递函数。
G = tf(20,[1 7]) * tf([1 3.2 7.2],[1 -1.2 0.8]) * tf([1 -8 400],[1 33 700]);
使用 allmargin
命令计算所有稳定裕度。
m = allmargin(G)
m = struct with fields:
GainMargin: [0.3408 3.3920]
GMFrequency: [1.9421 16.4807]
PhaseMargin: 68.1140
PMFrequency: 7.0776
DelayMargin: 0.1680
DMFrequency: 7.0776
Stable: 1
请注意,增益裕度以增益比表示,而不是以分贝 (dB) 表示。使用 mag2db
将值转换为 dB。
GainMargins_dB = mag2db(m.GainMargin)
GainMargins_dB = 1×2
-9.3510 10.6091
输入参数
y
— 输入数组
标量 | 向量 | 矩阵 | 数组
输入数组,指定为标量、向量、矩阵或数组。当 y
为非标量时,mag2db
采用按元素运算。
数据类型: single
| double
复数支持: 是
版本历史记录
在 R2008a 中推出
另请参阅
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)