In ecap module how does capture event selection works?

53 次查看(过去 30 天)
I want to mesure position of Bldc motor using hall sensor for FOC.As a refrence model I am using mcb_pmsm_foc_hall_f280049c.slx.How does capture event selection works? Below are the image of event slection block of 3 hall sensor.

回答(1 个)

Shivam Gothi
Shivam Gothi 2024-9-17,5:42
Three Hall sensors (A, B, C) are utilized to determine the rotor's position. Throughout one complete rotation of the rotor, the state of each Hall sensor transitions from (0 to 1) or (1 to 0). Consequently, there are six possible combinations of Hall states during a full rotation, which follow the sequence ABC: (001, 010, 011, 100, 101, 110), as illustrated in the accompanying figure.
With this foundational understanding, it becomes easier to comprehend the functionality of the blocks mentioned in the attached screenshot:
1) Code Generation Block:
The “eCAP module is employed to capture the "ON" and "OFF" durations for each Hall sensor. Here, "ON" time signifies the period during which the Hall sensor reads "1," while "OFF" time indicates when it reads "0." For instance, for Hall sensor A, the eCAP module should access the eCAP1 register and record the two time intervals (T1 and T2) corresponding to the changes in Hall value during a 360-degree electrical rotation cycle.
Similarly, eCAP2 and eCAP3 registers should read the Hall values and record the time intervals for Hall sensors 2 and 3 respectively.
Please refer to the below documentation for detailed explanation.
In summary, the block named "Code generation" will return the ON and OFF times for each Hall sensor, as depicted in the image below:
2) Capture Event Selection Block:
A selector switch is employed in the model shared in the screenshot. When the selector switch receives an input value of "1" at its second input, it will pass the first signal (T1 in this case). Conversely, when it receives an input value of "0" at its second input, it will pass the third signal (T2 in this case). The "Capture event block for eCAP1" outputs "1" if the Hall state is "3" (i.e., 011) or "5" (i.e., 101). In all other cases, it outputs "0."
3) Hall validity block:
The Hall validity block is evaluated only when there is a change in the Hall state. It performs checks to ensure that the outputs from the Hall sensors are valid and that no sensors are malfunctioning. This block requires information about T1 and T2 to determine the time elapsed between the Hall state change and block execution.
For more information on the "Hall validity block, please refer to the documentation below:
I hope this helps!
  1 个评论
Harshil Dodia
Harshil Dodia 2024-9-25,19:05
Thank you for your concise response. In the screenshot I attached for the capture event, it only instructs to capture events 1, 3, 5, and 6, but there is no mention of events 2 and 4. Why is that?

请先登录,再进行评论。

产品


版本

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by