blockCatchStart

Check if motor is rotating and get position

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Information

This block "catches" a rotating BLDC motor measuring its electrical angle to which is required as initial value to start the sensorless commutation algorithm. The result is corresponds to a hall sensor measurement. Furthermore the voltage constant KV of the (one pole pair equivalent) motor is determined.

The algorithm looks for zero crossings of the difference of the three terminal voltages. When a zero crossing occurs, the electrical angle is known. To determine the direction of rotation, dir, two consequtive zero crossings are required.

There are serveral methods to determine the voltage constant of the motor. The easiest method is measuring the maximum difference voltage of one the phases between two zero crossings. Method 2 by measuring the voltages at a zero crossing applying the following equation:

V_max = max(all phases) - min(all phases) / (2*cos(pi/6)).

Then the voltage constant KV can be calculated using the duration between the two zero crossings.

KV = V_max * 6 * (time-time_zc1).

Note that this is the equivalent KV for a 1 pole pair delta connected motor.

The method 3 integrates the voltage of a phase after a zero crossing. This how it is measured using the back emf integration method.

Parameters

TypeNameDefaultDescription
RealCatchMinVoltage0.5Minimum EMF for catch start
RealCatchWaitTime0.0001Wait time to prevent jitter
IntegerKV_Method3Selection of KV measurement method (now 2 or 3)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInput[3]vVoltage at motor terminals
Modelica.Blocks.Interfaces.BooleanOutputrunningMotor is running and position is actual
Modelica.Blocks.Interfaces.RealOutputyelectrical angle
Modelica.Blocks.Interfaces.RealOutputdirDirection of rotation
Modelica.Blocks.Interfaces.BooleanInputtryToCatch
Modelica.Blocks.Interfaces.RealOutputKVMeasured motor KV assuming one pole pair

Components

TypeNameDefaultDescription
RealhalltempTemporary angle for direction detection
Realtime_zc1Time when first zero crossing occured
RealKVint
IntegerKV_id
Boolean[3]hBool
PhaseDiffVoltagephaseDiffVoltage
HallDecodehallDecode
Modelica.Blocks.Math.Feedbackfeedback
Modelica.Blocks.Math.MinMaxminMaxVoltage
Modelica.Blocks.Math.IntegerChangeintegerChange
Modelica.Blocks.Math.RealToBoolean[3]hallBoolEmulate hall sensor
Modelica.Blocks.Math.BooleanToReal[3]hallRealReal value of hall sensor
Modelica.Blocks.Math.RealToIntegerrealToInteger
Modelica.Blocks.Logical.Andand1
Modelica.Blocks.Logical.GreaterThresholdgreaterThreshold
Modelica.Blocks.Continuous.FirstOrderfirstOrder
Modelica.StateGraph.StateGraphRootstateGraphRoot
Modelica.StateGraph.InitialStepinitialStep
Modelica.StateGraph.TransitionWithSignaltransitionStart
Modelica.StateGraph.StepcatchStep1Wait for the first transition
Modelica.StateGraph.TransitionWithSignaltransition1
Modelica.StateGraph.StepcatchStep2Wait for the 2nd transition
Modelica.StateGraph.TransitionWithSignaltransition2
Modelica.StateGraph.StepWithSignalstepWithSignal
Modelica.StateGraph.TransitiontransitionDone
Modelica.StateGraph.Transitiontransition
Modelica.StateGraph.Stepwait1
Modelica.StateGraph.Stepwait2
Modelica.StateGraph.Transitiontransition3
Modelica.Blocks.Math.Product[3]product
Modelica.Blocks.Math.RealToBoolean[3]realToBoolean1Emulate hall sensor
Modelica.Blocks.Math.BooleanToReal[3]hallReal1Real value of hall sensor
HallDecodehallDecode1