.BLDC.Utilities.EncoderPulseCount

Information

Evaluates the input signals from an IncrementalEncoder:

and determines mechanical angular velocity w and mechanical angle phi:

During the samplePeriod all rising and falling edges of A-track and B-track are counted. The direction of rotation has to be detected by a logic from the values of A-track and B-track. From that count, the angular velocity can be calculated: w=count*2*pi(4*pRev)/samplePeriod. The accuracy of the result depends on the number of pulses per revolution and the samplePeriod. Note that the output is discrete w.r.t. to time, it is not differentiable. The algorithm depends on interrupts (which appear in Modelica as when-clauses).


Generated at 2024-04-24T18:15:52Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos