Speed Measurement
库:
Motor Control Blockset /
Sensor Decoders
Motor Control Blockset HDL Support /
Sensor Decoders
描述
Speed Measurement 模块通过计算角位置相对于时间的变化,根据转子的角位置计算角速度。
示例
端口
输入
θ — 转子的角位置
标量
以弧度、度或标幺指定的转子角位置。
数据类型: single
| double
| fixed point
输出
⍵ — 转子角速度
标量
模块根据角位置输入计算的角速度。
数据类型: single
| double
| fixed point
参数
Position unit — 角位置的单位
Radians (默认) | Degrees | Per unit
角位置 θ
的单位。
Position scaling datatype — 映射输入位置的范围
uint32 (默认) | uint16 | uint64
用于在内部映射输入位置以适应无符号整数数据类型的范围。例如,对于 uint32 数据类型,该模块在 (0 - 2π)
到 (0 - (232-1))
的范围内缩放输入。
Speed calculation criteria — 转速计算的方法
Maximum application speed (默认) | Speed resolution | Time interval for speed calculation
模块中使用的转速计算方法。所选方法用于确定该模块可以测量的转子转速范围。
这些参数根据 Speed calculation criteria 参数更改值:
参数名称 | 最大应用转速 | 转速分辨率 | 转速计算的时间间隔 |
---|---|---|---|
Delays for speed calculation (number of samples) |
| 28 | 28 |
Maximum measurable speed (RPM) |
| 10344.8276 | 10713.2857 |
Measurable speed resolution (RPM) |
| 4.9892e-06 | 4.9892e-06 |
Discrete step size (s) — 采样时间,在此采样时间过后模块将再次执行
100e-6
(默认) | 标量
每两个连续的模块执行实例之间的固定时间间隔(以秒为单位)。
这些参数根据 Discrete step size (s) 参数值更改值:
Delays for speed calculation (number of samples)
Maximum measurable speed (RPM)
Measurable speed resolution (RPM)
Maximum application speed (RPM) — 最大可测量转子转速
1000
(默认) | 标量
该模块可以测量的最大转子转速(以转数/分钟为单位)。
以下参数根据 Maximum application speed (RPM) 参数值更改值:
Delays for speed calculation (number of samples)
Maximum measurable speed (RPM)
Measurable speed resolution (RPM)
依存关系
要启用此参数,请将 Speed calculation criteria 设置为 Maximum application speed。
Speed Resolution (RPM) — 最小可探测转速
5e-6
(默认) | 标量
在该模块可以检测到的单位时间内 θ
输入变化的最小值。
这些参数根据 Speed Resolution (RPM) 参数值更改值:
Delays for speed calculation (number of samples)
Maximum measurable speed (RPM)
Measurable speed resolution (RPM)
依存关系
要启用此参数,请将 Speed calculation criteria 设置为 Speed resolution。
Delays for speed calculation (number of samples) — 测量的角位置采样数
299
或 28
(默认) | 标量
模块测量的角位置输入的采样数,用于计算平均位置值。
以下参数根据 Delays for speed calculation (number of samples) 参数值更改值:
Maximum measurable speed (RPM)
Measurable speed resolution (RPM)
依存关系
要启用此参数,请将 Speed calculation criteria 设置为 Time interval for speed calculation。
Maximum measurable speed (RPM) — 最大可测量转速
1000
或 10344.8276
或 10713.2857
(默认) | 标量
该模块可以测量的绝对最大转速。
此参数不可配置,它使用的值是使用其他参数内部计算获得的。
Measurable speed resolution (RPM) — 用于转速计算的最小转速分辨率
4.6566e-07
或 4.9892e-06
(默认) | 标量
模块用于转速计算的最小转速分辨率。它始终小于或等于 Speed Resolution (RPM)。
此参数不可配置,它使用的值是使用其他参数内部计算获得的。
Speed unit — 角速度输出的单位
RPM (默认) | Degrees/Sec | Radians/Sec | Per unit based on maximum measurable speed | Per unit based on dialog
角速度输出的单位。
Per unit speed (RPM) — 以标幺为单位计算的转速 (RPM)
1000
(默认)
指定以标幺为单位计算的转速 (RPM)。
依存关系
仅当为 Speed unit 选择 Per unit based on dialog 时,此参数才会出现。
Speed data type — 角速度输出的数据类型
single (默认) | double | fixed point
角速度输出 ⍵
的数据类型。
注意
Speed Measurement 模块可能偶尔会显示警告消息 'Wrap on overflow detected
'
。
扩展功能
C/C++ 代码生成
使用 Simulink® Coder™ 生成 C 代码和 C++ 代码。
HDL 代码生成
使用 HDL Coder™ 为 FPGA 和 ASIC 设计生成 VHDL、Verilog 和 SystemVerilog 代码。
HDL Coder™ 提供了影响 HDL 实现和综合逻辑的额外配置选项。
此模块具有单一默认 HDL 架构。
ConstrainedOutputPipeline | 要通过移动设计中的现有延迟来放置在输出端的寄存器的数量。分布式流水线不会重新分布这些寄存器。默认值为 |
InputPipeline | 要在生成的代码中插入的输入流水线阶段数。分布式流水线和受限输出流水线可以移动这些寄存器。默认值为 |
OutputPipeline | 要在生成的代码中插入的输出流水线阶段数。分布式流水线和受限输出流水线可以移动这些寄存器。默认值为 |
SharingFactor | 要映射到单个共享资源的功能等效的资源数量。默认值为 0。另请参阅Resource Sharing (HDL Coder)。 |
定点转换
使用 Fixed-Point Designer™ 设计和仿真定点系统。
版本历史记录
在 R2020a 中推出
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)