Processing outputs and inputs for "eQEP" and "QEP Speed Calculator" blocks respectively

Altair Forum User
Altair Forum User
Altair Employee
edited November 2020 in Community Q&A

Submitted by murthyakella on Fri, 05/04/2012 - 16:58 


Hi,

I am not getting correct results using 'eQEP' and 'QEP Speed Calculator' blocks.

Firstly, I am not to able to obtain the 'QE (electrical angle theta)' viz. the input of 'QEP Speed Calculator' from 'QPosCnt' output of the 'eQEP' block. To do, I tried using the example block 'encoder to electrical angle' from the example 'pmsm32sim.vsm' which is located under 'Embedded-->Examples-->Digital Motor Control--> PMSM'. However, during the simulation, I get conversion error/warnings. And during the debug mode, I get 'theta' value always as zero.
Could anyone tell me where I am making the mistake? I am including the encoder diagram along with its implementation in a motor control. Note that QPSCNT does work. Also change in QPoscnt of my encoder for one revolution is 256.

Finally, I have a quick question about low pass cut-off frequency uses for 'QEP Speed Calculator' block. What are the guidelines in chosing this value (or is it just by trail-and-error)? How do I define this parameter such that I get correct values for all posible speeds?

I appreciate any help with this. Thanks in advance.

Regards, Murthy

Unable to find an attachment - read this blog

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Submitted by Anders89 on Sat, 05/05/2012 - 00:16.

    1) We tried your QEP Speed example with the mech to elec angle translation and it worked fine for us. Example is attached. Note that we did briefly have a problem with QEP on the F28335 when we added support for Concerto QEP with different base addresses. As of our ECD version it all works fine.
    2) Like all things, choice of low pass filter cutoff is a tradeoff between smoothness of response and speed of response. The lower the cutoff,the smoother the speed value but the slower the response to a change in speed. You will have to experiment to see what works best with your application.

    Unable to find an attachment - read this blog

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by murthyakella on Mon, 05/14/2012 - 14:14.

    Hi Anders,

    You are right that this 'mech to elec' block works. I later figured out the reason why I was getting zero outputs. It is becuase of using wrong convert blocks (32.32)instead of using the appropriate convert blocks (say 1.16 for duty_cycles, 8.16 for currents and speeds) for 'monitor buffer write'. Once again thanks for your help.

    Regards, Murthy

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by mohankumarks on Mon, 05/21/2012 - 09:27.

    Hello, 1)am using 'DRV8312EVM-PMSM-28035' with eQEP encoder block. my Encoder is of 2000 counts/revolution. am not getting the QPOSCNT value from QPOSCNT1 (getting 0 always) in VISSIM. i took the eQEP block from Embedded --> Piccolo --> eQEP. eQEP properties --> (count mode = Qudrature), (position count reset on - index event), (maximum position = 2000(0x7D0)), (inc/dec count on index event - checked) may i know is there any other setting need to be made OR any other configuration.

    2) in 'EncodertoElecAngle' block 1/(Encoder tick count) means 1/(4*256) ? am i correct? and i should multiply this by (number of poles/2) OR (number of poles)

    3) may i know how to align my QEP index with Rotor flux using thetaoffset?