Adaptive induction-motor estimator overview, induction motor simulation, adaptive speed estimation, MATLAB Simulink

Sensorless Speed Estimation of Induction Motor in MATLAB

2.5K Views
40
700
60
25
60
PCBWay

Hello friends! Today we will study sensorless speed estimation of an induction motor in MATLAB and Simulink. We will follow the original project's adaptive-estimation approach, beginning with the motor equations and then connecting those equations to the illustrated simulation blocks.

The aim is to estimate rotor speed from electrical quantities rather than feed a measured shaft-speed signal into the estimator. In simulation, the motor model still provides a true speed for comparison. Keeping that reference separate from the estimator inputs is essential: otherwise, a model can appear sensorless while quietly using the answer it is supposed to estimate.

The original project was developed in the MATLAB 2010 era and described as used with later 2012 and 2013 releases. The diagrams below document that historical implementation; they are not a new compatibility or performance test. We will preserve them while clarifying units, transformation conventions, assumptions, and the limits of the plotted results.

Adaptive induction-motor estimator overview, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Adaptive induction-motor estimator overview.

What Does Sensorless Speed Estimation Mean?

In this context, sensorless means that a shaft-speed sensor is not required by the estimation algorithm. It does not mean that the controller needs no measurements. Stator currents and information about applied stator voltages provide the electrical evidence from which the estimator reconstructs internal behaviour and adjusts its speed estimate.

Speed estimation and speed control are separate tasks. An estimator produces an estimated speed. A closed-loop controller would compare that estimate with a speed reference and command an inverter or other actuator. Changing the simulated supply frequency and plotting estimated speed demonstrates an estimation experiment, but does not by itself establish a complete closed-loop drive.

The original project listing is retained for readers interested in that implementation. This article explains its structure and equations; it does not include a newly attached executable model or claim that the archived project has been rerun.

Define the Motor Variables and Units

We will use a stationary two-axis representation, with axes labelled a and b in the original equations and α and β in the transformation discussion. In this article, those two-axis labels refer to the same stationary coordinate system. Do not confuse them with the three physical phase labels a, b, and c used before the transformation.

Principal quantities in the model
SymbolMeaningUnit
ωRotor mechanical angular speedrad/s
npNumber of pole pairsDimensionless
iSa, iSbStationary-axis stator currentsA
ψRa, ψRbRotor flux-linkage componentsWb
uSa, uSbStator voltage componentsV
RS, RRStator and rotor resistance parametersΩ
LS, LR, MStator, rotor, and mutual inductance parametersH
J, τLCombined inertia and opposing load torquekg m², N m

Mechanical speed and electrical rotor speed differ by the pole-pair factor: ωelectrical = npω. Conversion from mechanical rad/s to revolutions per minute is rpm = 60ω/(2π). For example, 25 rad/s is approximately 238.7 rpm, and 50 rad/s is approximately 477.5 rpm.

This distinction matters when reading an unlabeled scope. A curve near 50 is not automatically 50 rpm. MathWorks' induction motor documentation explicitly distinguishes mechanical speed, electrical speed, and pole pairs. Use consistent units when connecting a modern motor block to an older custom estimator.

The Stationary-Frame Motor Equations

The original mathematical model is shown below. Its states include mechanical speed, two rotor flux-linkage components, and two stator-current components. Define the leakage factor as σ = 1 - M²/(LRLS) and the inverse rotor time constant as η = RR/LR.

Stationary-frame induction-motor equations, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Stationary-frame induction-motor equations.

The rotor flux equations can be written explicitly as follows. Here, a dot or the operator d/dt means a time derivative.

dψRa/dt = -ηψRa - npωψRb + ηM iSa
dψRb/dt = -ηψRb + npωψRa + ηM iSb

The cross-coupling terms contain electrical rotor speed, npω. Their signs depend on the chosen axis and rotation convention. Preserve that convention through the motor, transformation, and estimator; changing a sign in only one subsystem can make a stable-looking implementation estimate the wrong direction.

Rearrange the voltage equations to obtain derivatives that feed the stator-current integrators:

diSa/dt = [uSa - RS iSa - (M/LR)dψRa/dt] / (σLS)
diSb/dt = [uSb - RS iSb - (M/LR)dψRb/dt] / (σLS)

For the convention used in the original model, the mechanical equation is dω/dt = [np(M/LR)(iSbψRa - iSaψRb) - τL]/J. This simplified equation omits an explicit viscous-friction term. Add such a term only as a defined model extension with a justified parameter.

Torque coefficients depend on coordinate scaling. The original transformation shown later uses a power-invariant normalization. Do not copy a torque equation containing a 3/2 factor from an amplitude-invariant formulation without reconciling the conventions first.

Form the Electrical Signals Used by the Estimator

The original derivation defines two quantities vma and vmb from the stator voltage balance. These are scaled rotor-flux derivatives, not the rotor fluxes themselves. Their units are volts because a flux linkage differentiated with respect to time has voltage units.

Derived electrical reference signals, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Derived electrical reference signals.
vma = uSa - RS iSa - σLS diSa/dt = (M/LR)dψRa/dt
vmb = uSb - RS iSb - σLS diSb/dt = (M/LR)dψRb/dt

This gives a useful dimensional check. The term RSi is a voltage, and L di/dt is also a voltage. Subtracting those terms from the applied voltage is consistent. Calling the resulting signal a measured rotor flux would obscure both its units and the differentiation required to obtain it.

If mechanical speed is treated as locally constant while differentiating the flux equations, the derived dynamics become:

Reference-signal dynamics at locally constant speed, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Reference-signal dynamics at locally constant speed.
dvma/dt = -ηvma - npωvmb + (ηM²/LR)diSa/dt
dvmb/dt = -ηvmb + npωvma + (ηM²/LR)diSb/dt

Use the explicit coefficient ηM²/LR when reconstructing these equations from the definitions above. The original raster notation should be checked against the algebra and units rather than transcribed by appearance alone. The assumption dω/dt approximately equal to zero is local to this estimator derivation; the motor's mechanical model must still be allowed to accelerate.

During acceleration, additional terms involving dω/dt appear when differentiating the coupled flux equations. Neglecting them helps explain why an estimator designed around slowly varying speed can show larger transient errors during a rapid change or reversal.

Build an Adjustable Model and Define Its Error

The adjustable model repeats the electrical dynamics using an estimated speed, written ωhat, and estimated signals vhatma and vhatmb. Current derivatives remain inputs. The purpose is to adjust ωhat so that the adjustable model agrees with the electrical reference signals.

Adjustable electrical model using estimated speed, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Adjustable electrical model using estimated speed.

Define ema = vma - vhatma and emb = vmb - vhatmb. These are electrical model errors. They are not the same quantity as mechanical speed error, which would be ω - ωhat.

Electrical model-error dynamics, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Electrical model-error dynamics.

The original error equation contains damping terms proportional to η and a coupling term involving the difference between estimated and actual speed. This relationship is the basis for constructing an adaptation rule, but merely subtracting two signals does not specify how the estimated speed should be updated.

What the Lyapunov Expression Establishes

A candidate electrical error function is V = (ema² + emb²)/2. It is nonnegative and zero when both electrical errors are zero. Its derivative in the original development is shown below.

Derivative of the electrical error function, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Derivative of the electrical error function.

The first term is dissipative, but the term containing speed-estimation error is not automatically negative. A complete stability argument needs an adaptation law and the relevant assumptions. The next historical equation restates the error function; it should not be read as a standalone proof that estimated speed must always converge.

Original electrical error-function expression, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Original electrical error-function expression.

For illustration, define q = emavhatmb - embvhatma and speed error ωtilde = ωhat - ω. Under the constant-speed and exact-parameter assumptions, augment the function to W = V + ωtilde²/(2γ), with positive adaptation gain γ. The illustrative rule dωhat/dt = -γnpq cancels the cross term and gives dW/dt = -η(ema² + emb²).

This is an explanatory derivation from the stated error convention, not a claim that the archived project uses that exact law or gain. Boundedness and decreasing electrical error alone do not guarantee identification of the true speed under every operating condition. The available electrical excitation and the assumptions behind the model still matter.

Follow the Four Main Simulink Subsystems

The full historical model is organized into a three-phase source, a stationary-frame conversion, the motor plant, and the speed estimator. This separation is useful because you can inspect each subsystem before combining them.

Complete induction-motor Simulink model, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Complete induction-motor Simulink model.

Three-Phase Voltage Source

The source creates phase voltages with 120-degree separation. One sequence uses phases 0, -2π/3, and -4π/3. Exchanging the last two phases reverses the sequence and therefore the direction of the rotating field under the selected convention. The rotor then responds through its mechanical dynamics; it does not reverse instantaneously.

Historical three-phase source parameter mask, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Historical source settings; confirm frequency units and amplitude definitions in the underlying subsystem.

The original mask shows amplitude 2300, entries named Frequency1 and Frequency2, and a sample-time expression 1/(50 × 150). That expression evaluates to approximately 133.3 µs. A mask label alone does not tell us whether a frequency value is interpreted as hertz or rad/s; inspect the underlying source equations.

For a source written as sin(ωst + φ), ωs is in rad/s. For sin(2πft + φ), f is in hertz. Thus 50 rad/s corresponds to approximately 7.96 Hz, not 50 Hz. Likewise, verify whether amplitude is a phase peak, an RMS value, or a normalized quantity before assigning physical meaning to 2300.

Clarke Transformation

The conversion subsystem maps three-phase voltages into stationary orthogonal components. Its position in the original model is shown first, followed by the transformation matrix used in the project.

Stationary-frame voltage conversion subsystem, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Stationary-frame voltage conversion subsystem.
Power-invariant Clarke transformation matrix, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Power-invariant Clarke transformation matrix.

The displayed matrix uses a square-root-of-two-thirds scale factor and orders the outputs as zero sequence, α, and β. Its zero-sequence component vanishes when the three inputs sum to zero. That condition holds for the balanced source used here; it is not a universal property of arbitrary three-phase signals.

The MathWorks Clarke Transform documentation distinguishes amplitude-invariant and power-invariant operation. Its documented block is a modern reference, not a block we assume existed in the original 2010 project. Match normalization explicitly when replacing the historical Gain and Sum implementation.

Clarke transformation block implementation, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Clarke transformation block implementation.

The following scope illustrates the two stationary voltage components. Check their relationship against your source and transformation definitions. A plausible pair of waveforms does not by itself establish that every downstream current or torque coefficient uses the same normalization.

Stationary-axis voltage diagnostic plot, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Stationary-axis voltage diagnostic plot.

Induction Motor Plant

The motor subsystem receives the stationary voltage components and the applied load. It integrates the electrical and mechanical equations to obtain the plant states. Its speed output supplies the reference used for evaluating the estimator.

Induction-motor plant subsystem, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Induction-motor plant subsystem.

The historical equation image and internal block diagram are retained below so that you can compare the mathematics with the implementation.

Original plant equations repeated for reference, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Original plant equations repeated for reference.
Internal induction-motor plant blocks, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Internal induction-motor plant blocks.

The next two diagrams implement the rotor-flux derivative channels. Follow the resistance, current, and speed-coupling terms individually rather than treating each large block as an unexplained formula.

Rotor alpha-axis flux derivative implementation, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Rotor alpha-axis flux derivative implementation.
Rotor beta-axis flux derivative implementation, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Rotor beta-axis flux derivative implementation.

The mechanical channel combines electromagnetic torque and load torque before the speed integrator. Confirm its inertia parameter and the mechanical-speed units.

Mechanical speed dynamics implementation, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Mechanical speed dynamics implementation.

The stator channels implement the voltage-balance relationships needed to obtain current dynamics. Keep track of whether a wire carries a state or its derivative; swapping them introduces an integration-order error even when the signal names look similar.

First stator voltage-balance channel, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: First stator voltage-balance channel.
Second stator voltage-balance channel, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Second stator voltage-balance channel.

The four original diagnostic plots below belong to these electrical channels. Preserve their relationship to the actual scope inputs when reconstructing the model. Without the scope configuration and units, the image alone should not be used to claim a current rating or flux magnitude.

First original electrical diagnostic plot, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: First original electrical diagnostic plot.
Second original electrical diagnostic plot, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Second original electrical diagnostic plot.
Third original electrical diagnostic plot, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Third original electrical diagnostic plot.
Fourth original electrical diagnostic plot, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Fourth original electrical diagnostic plot.

Speed Estimation Subsystem

The estimator takes electrical inputs and constructs the reference and adjustable model signals. The original subsystem boundary and its internal arrangement are shown below. Audit these connections carefully: the plant's true mechanical speed belongs in the comparison path, not as an input secretly driving the estimator.

Electrical inputs to the speed estimator, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Electrical inputs to the speed estimator.
Internal adaptive-estimator arrangement, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Internal adaptive-estimator arrangement.

The repeated reference and adjustable-model equations help identify the corresponding blocks. Their outputs are the electrical quantities defined earlier, not four independent measurements of mechanical speed.

Reference electrical-model equations, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Reference electrical-model equations.
Adjustable electrical-model equations, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Adjustable electrical-model equations.

The next four diagrams show the original implementations of the two reference channels and two adjustable channels. Check signs, parameter values, derivative inputs, and initial conditions consistently across all four.

First reference electrical channel, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: First reference electrical channel.
Second reference electrical channel, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Second reference electrical channel.
First adjustable electrical channel, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: First adjustable electrical channel.
Second adjustable electrical channel, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Second adjustable electrical channel.

The error expression and final adaptation arrangement are retained below. To reproduce the project, inspect the actual update law, gains, integrator limits, and signal scaling in this subsystem. A scalar error metric is not itself a complete speed estimator.

Error expression used in the estimator discussion, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Error expression used in the estimator discussion.
Original final adaptation arrangement, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Original final adaptation arrangement.

Interpret the Speed and Error Plots Carefully

The original comparison plot shows relatively settled regions separated by pronounced transients near changes in operating condition. Around the reversal, the traces cross into negative values. The sign indicates direction according to the chosen convention.

Original actual and estimated speed comparison, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Historical speed comparison showing settled intervals and large transients; the screenshot alone does not establish rpm units.

The large spikes make it especially important to distinguish steady-state agreement from transient performance. The screenshot does not label the vertical axis with a confirmed speed unit, so we should not repeat the earlier claim that the levels necessarily represent 25 and 50 rpm. Trace the signal definition and any conversion gain first.

The original error plot also shows peaks around operating changes and values close to zero during settled intervals. An apparently flat line at this scale does not prove mathematically zero error. Zoom into the settled intervals or analyze the logged numerical signals.

Original estimation-error plot, induction motor simulation, adaptive speed estimation, MATLAB Simulink
Figure: Historical error trace with transient peaks; inspect logged data and signal definitions before quantifying accuracy.

For logged mechanical speed, define eω[k] = ω[k] - ωhat[k]. Useful measures include maximum absolute error and RMSE = sqrt(sum(eω[k]²)/N). Report the interval used: a whole-run RMSE and a steady-state-only RMSE answer different questions. Keep electrical model error separate from speed error in plot names and units.

Reconstruct and Evaluate the Model Systematically

  1. Enter the motor parameters with units and document the coordinate normalization.
  2. Check the three-phase source and Clarke transformation independently.
  3. Run the plant with the estimator disconnected and inspect its currents, torque, and speed.
  4. Construct the electrical reference signals and confirm their dimensions.
  5. Add the adjustable model and a fully specified adaptation law.
  6. Compare estimated speed with plant speed without feeding the latter into the estimator.
  7. Repeat the experiment with changed load, initial estimate, and plausible parameter mismatch.

Current differentiation deserves particular attention. An ideal derivative of a clean simulation state can look excellent, while differentiation of measured current amplifies noise. A practical estimator needs an appropriate filtering or observer strategy, and that strategy adds dynamics that should be represented in the evaluation.

Choose solver tolerances or a discrete sample time deliberately. Reduce the numerical step and compare results to see whether a spike or oscillation is sensitive to discretization. A sharp source change, a differentiation block, and a large adaptation gain can interact in ways that are hidden by a single scope screenshot.

Rotor resistance can change with temperature, and the estimator's rotor time constant depends on it. Test parameter mismatch rather than evaluating only the case where the plant and estimator share identical constants. Include low-speed operation, where electrical information available to a model-based estimator can become less informative and offsets or parameter errors can dominate.

Review and Frequently Asked Questions

The original project provides a useful visual path from induction-motor equations to an adaptive estimator. Its strongest teaching feature is the separation of source, transformation, plant, and estimation. The revised explanation makes the signal units and assumptions explicit so that the diagrams can be studied without mistaking an idealized result for universal performance.

Does sensorless mean there are no sensors?

No. It means the estimator does not require a shaft-speed sensor in this arrangement. Electrical measurements and an appropriate motor model are still required.

Why is actual speed available in a sensorless simulation?

The plant model calculates its own mechanical state. We use that value as evaluation truth while keeping it outside the estimator's information path.

Are vma and vmb rotor fluxes?

No. Here they are scaled derivatives of rotor flux linkage, formed from the stator voltage balance. They have voltage units.

Why does error increase during reversal?

The operating point changes rapidly, challenging the slowly varying speed assumption and the estimator dynamics. Source discontinuities, derivative processing, gains, and solver choices can also contribute.

Does a decreasing Lyapunov error prove correct speed at every operating point?

No. A complete argument must include the adaptation law and identification conditions. Small electrical model error does not automatically establish unique speed identification under all excitation conditions.

Can I run the historical project in any MATLAB release?

Do not assume so. Inspect the supplied model format, required toolboxes, initialization files, and block compatibility. The historical screenshots document the original implementation rather than certifying compatibility with a current installation.


Comments

1

Join the conversation

Reply1

Hello! How can i get this induction motor model? There is written that i need to click button on the right side. I can't see any button. Should i subscribe that page?