Pulsating High Freq Observer
Estimate initial rotor electrical position of interior PMSM using PHF injection
- Library:
Motor Control Blockset / Sensorless Estimators
Description
The PHF Observer block estimates the initial position (in electrical radians) of a stationary interior PMSM by using pulsating-high-frequency (PHF) injection and dual-pulse (DP) techniques. In addition, the block also detects real-time position when the rotor runs using (low-speed) closed-loop control.
Ports
Input
Iab hf
— PHF current response
vector
The high-frequency (phase a and b) current feedback from motor in response to the PHF voltage injection, in Amperes or per-unit.
Data Types: single
| double
| fixed point
Enable
— Enable block
scalar
Signal to enable block. The port supports one of the following input signals:
1
— Enable block operation0
— Disable the block
Data Types: Boolean
θin
— Initial rotor position
scalar
Initial rotor position input when the block skips the stage 1 IPE operation, in radians, degrees, or per-unit.
The unit depends on the Position unit parameter.
Data Types: single
| double
| fixed point
IPEEn
— Enable stage 1 IPE operation
scalar
Signal to enable stage 1 IPE operation. The port supports one of the following input signals:
1
— Enable the block to run stage 1 IPE followed by stage 2 closed-loop PHF injection.0
— Enable the block to skip stage 1 IPE and directly run stage 2 closed-loop PHF injection.
Data Types: Boolean
Output
Vαβ hf
— PHF output
scalar
Pulsating high-frequency voltage (in αβ reference frame) output, in per-unit.
Data Types: single
| double
| fixed point
θest
— Estimated rotor position
scalar
The rotor position estimated by the block, in radians, degrees, or per-unit.
The unit depends on the Position unit parameter.
Data Types: single
| double
| fixed point
PosEn
— Status of θest port
scalar
The port provides one of the following outputs:
1
— Indicates that stage 1 IPE is successfully complete and the θest port output is accurate.0
— Indicates that stage 1 IPE is in progress (θest port output is not accurate as yet) or estimation has failed.
Data Types: single
| double
| fixed point
Info
— Bus signal
bus
The bus signal contains these block calculations.
Signal | Description | Units | |||
---|---|---|---|---|---|
Sin θest and cos θest | Sine and cosine of estimated rotor position | - | |||
Id and Iq | Stator direct axis and quadrature axis currents | A | |||
Convergence | Difference between current and previous sample of θest output. A value closer to zero indicates saturation of θest. | rad | |||
Status | 0 | Block is not enabled (Enable input port is 0) | - | ||
1 | Block is finding the best possible initial estimate (Stage 1 Part A) | - | |||
2 | Block is running the PHF method (Stage 1 Part B) | - | |||
3 | Block is running Dual-Pulse (DP) Method (Stage 1 Part C) | - | |||
4 | Block has successfully completed stage 1 and has started stage 2 closed-loop PHF injection | - | |||
5 | Stage 1 Part B failed due to a large error in the estimated rotor position | - |
Parameters
Discrete step size (s)
— Sample time after which block executes again
50e-6
(default) | scalar
The time between two consecutive instances of block execution.
Position unit
— Unit of position input and output
Radians
(default) | Degrees
| Per-unit
Units for the θin input and θest output.
Datatype
— Input and output data type
single
(default) | double
| fixdt(1,16)
| fixdt(1,16,0)
| fixdt(1,16,2^0,0)
| <data type expression>
Data type of the block inputs and outputs.
PHF Parameters
PHF peak voltage (PU)
— Peak voltage of PHF
0.2
(default) | scalar
Peak amplitude of the PHF voltage applied by the block, in Volts.
PHF frequency (Hz)
— PHF voltage frequency
2000
(default) | scalar
Frequency of the PHF voltage applied by the block, in Hz.
Proportional gain
— Proportional gain for PI controller of PHF
3000
(default) | scalar
Proportional PI controller gain Kp for the PHF applied by the block.
Integral gain
— Integral gain for PI controller of PHF
4000
(default) | scalar
Integral PI controller gain Ki for the PHF applied by the block.
Cutoff frequency (Hz)
— Cutoff frequency for lowpass filter of PHF
500
(default) | scalar
Cutoff frequency of the lowpass filter for the PHF applied by the block, in Hz.
Open loop duration (s)
— Duration of open-loop PHF injection during stage 1 part A
5e-3
(default) | scalar
Duration of the open-loop PHF injection during stage 1 part A, in seconds.
Close loop duration (s)
— Duration of closed-loop PHF injection during stage 1 part B
0.2
(default) | scalar
Duration of the closed-loop PHF injection during stage 1 part B, in seconds.
Idle time (s)
— Duration between algorithm steps
5e-3
(default) | scalar
Duration (in seconds) between steps in the algorithm related to stage 1 part A and stage 1 part B that allow for fading of transient dynamics. For example, this block stops operating for this duration between each PHF injection (open-loop or closed-loop).
DP Parameters
Pulse voltage (s)
— Amplitude of injected pulses
0.4
(default) | scalar
Voltage amplitude of the injected pulses, in Volts.
Pulse duration (s)
— Duration of injected pulses
750e-6
(default) | scalar
Duration of the injected pulses, in seconds.
Idle time (s)
— Duration between two pulses during dual-pulse injection
5e-3
(default) | scalar
Duration (in seconds) between two pulses during dual-pulse injection (stage 1 part C).
Model Examples
Algorithms
The block determines the best possible initial estimation for the rotor position using open-loop PHF injection, which it uses to run closed-loop PHF.
The block executes closed-loop PHF by injecting a high-frequency signal into the estimated rotor position to determine the actual rotor position without spinning the motor. This technique works when the motor saliency ratio (Lq/Ld) is greater than 1. Due to a limitation in the PHF method, the estimated position can show ambiguity equal to the value of π (pi). The dual-pulse (DP) method uses polarity detection to resolve the ambiguity of π and applies a compensation of π if there is an error. The estimated rotor position ranges from 0 to 2π electrical radians.
The block can run in these 2 stages:
Stage 1 – Initial position estimation (IPE), which includes three parts.
Stage 2 – Closed-loop pulsating-high-frequency (PHF) injection.
Stage 1 focuses on determining the initial position of the rotor when it is stationary. This stage includes the following three parts:
Part A: Find Best Possible Initial Estimation
The block uses the PHF injection technique. PHF injection needs initial estimation to start the algorithm.
If you use only one initial estimation, θi_est, (for PHF) for all possible actual rotor positions, the block algorithm might not work accurately for certain actual rotor positions when the motor has low saliency. These ambiguous positions are when:
θactual lies in the range
θactual lies in the range
θactual lies in the range
To make PHF work for motors with low saliency, the block picks different initial estimation for different actual rotor positions.
When executing this part, the block picks the best possible initial estimation from these three alternatives:
θi_est =
0
θi_est =
2π/3
θi_est =
-2π/3
Therefore, the block injects three high-frequency voltage signals (approximately 2000 KHz) across the preceding three θest values and measures the resulting iq currents. For each iq:
Therefore,
where:
θi_est — Initial estimation of rotor position
(which can be either 0
, 2π/3
, or
-2π/3
) (in degrees, per-unit, or radians)
θactual — Actual rotor position (in degrees, per-unit, or radians)
θerr = θactual-θi_est (in degrees, per-unit, or radians)
The block uses these definitions:
iq1 = iq for θi_est = 0
iq2 =
iq for
θi_est = 2π/3
iq3 =
iq for
θi_est = -2π/3
For θi_est = 0, when varying θactual from 0 to 2π, is the maximum among the preceding three iq currents when the rotor lies in the following four highlighted regions.
If θi_est = 0 is used for all
θactual = 0
to
2π
, the algorithm fails for the following ambiguous regions (when motor
saliency is low):
θactual lies in the range
θactual lies in the range
θactual lies in the range
Because these ambiguous regions are not present in the preceding four regions, you eliminate the regions where the algorithm might fail.
For θi_est = (2π/3)
, when
varying θactual from 0
to
2π
, is the maximum among the three
iq currents when the rotor lies in the following
four highlighted regions.
If θi_est = (2π/3)
is used
for all θactual = 0
to
2π
, the algorithm fails for following ambiguous regions (when motor
saliency is low):
θactual lies in the range
θactual lies in the range
θactual lies in the range
Because these ambiguous regions are not present in the preceding four regions, you eliminate the regions where the algorithm might fail.
For θi_est = -(2π/3)
, when
varying θactual from 0
to
2π
, is the maximum among the three
iq currents when the rotor lies in the following
four highlighted regions.
If θi_est = -(2π/3)
is used
for all θactual = 0
to
2π
, the algorithm fails for following ambiguous regions (when motor
saliency is low):
θactual lies in the range
θactual lies in the range
θactual lies in the range
Because these ambiguous regions are not present in the preceding four regions, you eliminate the regions where the algorithm might fail.
Therefore, using this approach you have three sets of regions corresponding to three different initial estimates. These three sets or regions cover all the motor sectors where the rotor can lie:
In part A, the block picks the θi_est corresponding to the maximum Iq current value between iq1, iq2, and iq3 for Part B.
Part B: Pulsating High-Frequency (PHF) Method
After determining the best possible initial estimate θi_est, the block injects a sinusoidal high-frequency voltage along the finalized (θest | t = 0) = θi_est (resulting in an unbalanced three-phase voltage in the motor) and reads the current response from the motor. The block then performs numerical analysis of the resulting stator current response to compute the initial position of the stationary rotor (in electrical radians) by making corrections to θest.
The block performs iterative tests on the motor. Therefore, when the block executes, the estimated position is initially θi_est, but rises steadily to saturate at the actual rotor angle (with respect to a-axis).
The PHF method has a limitation due to which it might compute the rotor position with an ambiguity of π. If the rotor lies in the range electrical radians (region 1), the estimated position is accurate (π compensation is not required).
If the rotor lies in the range electrical radians (region 2), the estimated position shows an ambiguity of π (π compensation is required).
Therefore, the block uses the dual-pulse method to determine if the estimated position
needs π
compensation.
Part C: Dual-Pulse (DP) Method
The block injects two very short duration voltage pulses (with the same width and magnitude) in the following positions:
Pulse 1 at the rotor position estimated in Part B
Pulse 2 at the rotor position estimated in Part B +
π
Because pulse width is very short, the motor does not run, and the rotor remains stationary after pulse injection.
The interaction between the resulting stator magnetic flux and the rotor permanent magnets results in two current impulses along the d-axis of the rotor that rise and fall quickly.
Because the stator core is saturated, it shows nonlinear behaviour. A small Ld results in higher current Id, and a high Ld results in smaller current Id. Therefore, the Id current impulses generated by Pulse 1 and Pulse 2 show different peak values.
Note
The pulse duration of the injected voltage pulses is large enough to obtain a measurable difference between the peak current values. At the same time, the duration is not too high, that is, when the pulse duration exceeds a certain limit, the rotor can start spinning.
The block computes the difference between the peak values of the two current impulses ΔId to determine if the position estimated in Part A needs π compensation.
ΔId = |Id1| - |Id2|
PHF injection benefits use cases that require the rotor to remain stationary or that require position estimation without starting the motor. The PHF injection technique also benefits use cases where you need to avoid open-loop runs to estimate position (before transitioning to closed-loop speed control) or where you require the motor to start directly in the closed-loop mode. The block algorithm in stage 1 addresses these use cases by estimating the position while keeping the rotor stationary and avoiding an open-loop run.
After the block completes stage 1, you can continue to run the block in stage 2 where it computes the rotor position while the motor runs using closed-loop control (for example, field-oriented control). Using the Stage 2 algorithm (closed-loop PHF injection), the block can continue to inject pulsating high-frequency signal (as described in Part B) and performs numerical analysis of the resulting stator-current response to compute and track the rotor position during closed-loop operation.
Version History
Introduced in R2022b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)