main content
Calculate the speed from the angular position of the rotor
Starting with R2020a
expand everything on the page
library:
Engine Control Block/Sensor Decoder
Engine Control Blockset HDL Support/Sensor Decoder
describe
fromspeed measurementThe block calculates the angular velocity based on the angular position of the rotor by calculating the angular position over time.
example
open overview
open overview
open overview
open overview
luke
import
expand everything
and—angular position of the rotor
scalar
Rotor angular position specified in radians, degrees, or units.
type of data:single
|double
|fixed point
exit
expand everything
⍵—Rotor angular velocity
scalar
The angular velocity that the block calculates from the entered angular position.
type of data:single
|double
|fixed point
parameter
expand everything
job unit—angular position unit
Radial
(default) |frequency
|per unit
angular position unitand
。
Position scaling data type—Enter location map range
uint32
(default) |uint16
|uint64
Used to internally map input locations to match ranges for unsigned data types. For example, the block scales the input within a certain range（0 - 2p）
unhappy(0 - (2^{32}-1))
For data type uint32.
speed calculation standard—speed calculation method
Maximum Application Speed
(default) |speed resolution
|Time interval for speed calculation
Velocity calculation method used in the block. The selected method determines the range of rotor speeds that the module can measure.
The values of these parameters are based onspeed calculation standardscope:
parameter name | Maximum Application Speed | speed resolution | Time interval for speed calculation |
---|---|---|---|
Rate calculation latency (number of samples) |
| 28 | 28 |
Maximum Measurable Speed (RPM) |
| 10344.8276 | 10713.2857 |
Measurable Velocity Resolution (RPM) |
| 4.9892e-06 | 4.9892e-06 |
discrete stack size—Sample time before the block is executed again
100e-6
(default) | scalar
The fixed time interval, in seconds, between any two consecutive instances of block execution.
The values of these parameters are based ondiscrete stack sizeParameter value:
Rate calculation latency (number of samples)
Maximum Measurable Speed (RPM)
Measurable Velocity Resolution (RPM)
Maximum Application Speed (RPM)—Maximum measurable rotor speed
1000
(default) | scalar
The maximum rotor speed (in revolutions per minute) that this block can measure.
The values of these parameters are based onMaximum Application Speed (RPM)Parameter value:
Rate calculation latency (number of samples)
Maximum Measurable Speed (RPM)
Measurable Velocity Resolution (RPM)
addiction
To enable this parameter, set thespeed calculation standardunhappyMaximum Application Speed
。
Speed Resolution (RPM)—Minimum detectable speed
5e-6
(default) | scalar
minimum value of changeand
Input per unit of time that the module can detect.
The values of these parameters are based onSpeed Resolution (RPM)Parameter value:
Rate calculation latency (number of samples)
Maximum Measurable Speed (RPM)
Measurable Velocity Resolution (RPM)
addiction
To enable this parameter, set thespeed calculation standardunhappyspeed resolution
。
Rate calculation latency (number of samples)—Measured Angular Position Sample Number
299
from28
(default) | scalar
The number of angular position input samples that the module measures to calculate the average position value.
The values of these parameters are based onRate calculation latency (number of samples)Parameter value:
Maximum Measurable Speed (RPM)
Measurable Velocity Resolution (RPM)
addiction
To enable this parameter, set thespeed calculation standardunhappyTime interval for speed calculation
。
Maximum Measurable Speed (RPM)—measurable speed
1000
from10344.8276
from10713.2857
(default) | scalar
The absolute highest speed the block can measure.
This parameter is not configurable and uses a value calculated internally using other parameters.
Measurable Velocity Resolution (RPM)—The minimum velocity resolution used to calculate velocity
4.6566e-07
from4.9892e-06
(default) | scalar
The minimum velocity resolution that the block uses to calculate velocity. it is always less than or equal toSpeed Resolution (RPM)。
This parameter is not configurable and uses a value calculated internally using other parameters.
speed unit—output angular velocity unit
revolutions per minute
(default) |degree/second
|Radial/sec
|Each unit is based on the highest measurable speed
|dialogue based per unit
The unit of the output angular velocity.
per speed unit (RPM)—Calculated speed per unit (in RPM)
1000
(standard)
Specifies the speed calculated per unit in RPM.
addiction
This parameter only appears in the following casesdialogue based per unit
Selectedspeed unit。
Velocity data type—Angular velocity output data type
single
(default) |double
|fixed point
Angular velocity output data type⍵
。
Comment
fromspeed measurementThe block may occasionally display a warning message' wrap when overflow is detected
。'
wide range of possibilities
C/C++ code generation
Generate C and C++ code with Simulink® Coder™.
HDL code generation
Generate Verilog and VHDL code for FPGA and ASIC designs with HDL Coder™.
HDL Coder™ provides additional configuration options that affect HDL implementation and synthesis logic.
HDL Architecture
The block has a standard HDL schema.
HDL block properties
limited output pipeline | The number of registers placed on the output by moving existing delays in the design. The distributed pipeline does not reallocate these registers. The default value is |
Inlet pipe | The number of input pipeline stages to insert into the generated code. Distributed pipelines and limited-output pipelines can move these registers. The default value is |
export pipeline | The number of pipeline output stages to insert into the generated code. Distributed pipelines and limited-output pipelines can move these registers. The default value is |
fixed-point conversion
Design and simulate fixed-point systems with Fixed-Point Designer™.
version history
Introduced in R2020a
see also
square decoder|position generator|PI regulator|ACIM Feedforward Control|ACIM coupling switch|PMSM Feedforward Obedience|PMSM moment estimator
theme
- Open and Closed Loop Control
- Field Oriented Control (FOC)
MATLAB commands
You have clicked the link for this MATLAB command:
Run commands by typing in the MATLAB command window. Web browsers do not support MATLAB commands.
select site
Choose a site to get translated content (if available) and check out local events and deals. Depending on your location, we recommend the following options:。
You can also select a site from the following list:
USA
- Latin America(Spanish)
- You have(Engels)
- USA(Engels)
Europa
- Belgium(Engels)
- Danish(Engels)
- Germany(German)
- Spain(Spanish)
- Finland(Engels)
- France(France)
- Ireland(Engels)
- Italy(Italian)
- Luxembourg(Engels)
- Netherlands(Engels)
- Norway(Engels)
- Austria(German)
- Portugal(Engels)
- Sweden(Engels)
- Switzerland
- German
- Engels
- Frans
- U.K.(Engels)
Asia-Pacific
- Australia(Engels)
- you(Engels)
- new Zealand(Engels)
- depth
- Japan(Japanese)
- South Korea(Korean)
Please contact your local office