APP ACIM_FREQ_CTRL

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Juan71
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hello, I am using the APP "ACIM_FREQ_CTRL" for an induction motor control.

I have enabled "Enable over current detection" and "Enable voltage compensation".

The motor seems to work fine.

My problem that I have is that I can't get the ADC (for the voltage measurement) to work when it is in "MotorStop" for obvious reasons, since the PWM is also stop, so I need to change the trigger when this situation occurs but I can't find a way to change the trigger .

I have configured a "TIMER" APP to use it as a trigger in the "ADC_QUEUE" but it doesn't work.

I've looked at the register level but I can't quite understand how to configure it.

Thanks.

0 Likes
1 Solution
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Juan71 

If you call the function ACIM_FREQ_CTRL_MotorStop, the entire CCU8 is turned off. Hence the ADC trigger to be initiated with respect to PWM is also stopped.

As a general application, please make a function in which the following are implemented:

  1. Set PWM duty to zero .
  2. Set the speed and current references to zero.

Call the above function whenever you need to stop the motor (either fault or normal stopping of the motor).

Let me know if you need further help.

Regards

RupakC

View solution in original post

0 Likes
11 Replies
lock attach
Attachments are accessible only for community members.
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @Juan71 ,

    Did you follow our examples to configure your APP? And you can also refer to the "Help content" which will tell you how to configure all these APP. Hope this can help you.

https://www.infineon.com/dgdl/Infineon-Motor_Control_Application_Kit_Getting_Started-GS-v02_00-EN.pd...

Regards,

Owen_Su

0 Likes
Juan71
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Thanks for your answer.

More or less the motor control works fine, my problem is that when I do a "motorStop" the ADC stops measuring the "voltage" because when stopping the PWM not triggering, and the "voltage" is a measurement that it needs my firmware to work.

How do I manage this ADC trigger change?

What APP do you suggest to use as ADC trigger?

Thanks.

0 Likes
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @Juan71 ,

    Could you give us a more detailed description of the following points:

    1) How do you stop the motor? Exiting the debug mode or implement an interrupt? Have you finished a Power on reset to your board?

    2) Which voltage do you want to measure? As I know, it is meaningless to measure the phase voltage after the motor stops, so what you measure is DC bus voltage?

    3) As my understanding, you need the ADC works without your firmware work, is that right? Or you can describe your requirements in more details.

    And here I give you some suggestions:

    1) Check the codes and make sure that the motor stops will not stop the ADC, I think you can refer to the function: ACIM_FREQ_CTRL_MotorStop. If you find that the motor stops will stop the ADC, you can change the codes manually.

    2) Check the PWM_SVM APP, for the "trigger for current measurement", you can change to another selections and try again.

Owen_Su_0-1669986569735.png

    3) Use an interrupt to stop the motor instead of other methods, output the corresponding ADC values from you codes and check if there still have variation after the motor stops.

    We can continue after testing according to the above tips, hope this can help you.

Regards,

Owen_Su

 

0 Likes
Juan71
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hi @Owen_Su, I reply to each point:

1) I stop the motor for operating needs with "ACIM_FREQ_CTRL_MotorStop(&ACIM_FREQ_CTRL_0)", this API stops the SVM, PWM...

2-3) As you say, I need to measure the DC Bus voltage, also when the motor is stopped.

Regarding your suggestions:

1) This is exactly the key, but I don't quite understand changing this. The last thing I tried is to use the API "XMC_VADC_GROUP_QueueTriggerConversion(ACIM_FREQ_CTRL_0.adc_config_ptr->vadc_group_pointerarray[1])" which generates a software trigger event by setting GxQMR0.TREV = 1, but it doesn't work.

2) I have a single shunt, so "The trigger for current measurement = DC Link Current Measurement".

3) If I stop the motor setting "speed=0" I have DC Bus values, but this implies not stopping the motor with the API "ACIM_FREQ_CTRL_MotorStop(&ACIM_FREQ_CTRL_0)", something that happens when an error occurs, overcurrent...

Thanks.

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Juan71 

If you call the function ACIM_FREQ_CTRL_MotorStop, the entire CCU8 is turned off. Hence the ADC trigger to be initiated with respect to PWM is also stopped.

As a general application, please make a function in which the following are implemented:

  1. Set PWM duty to zero .
  2. Set the speed and current references to zero.

Call the above function whenever you need to stop the motor (either fault or normal stopping of the motor).

Let me know if you need further help.

Regards

RupakC
0 Likes
Juan71
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hi RupakC, thanks for replying.

I could do what you propose, but I don't want to excessively change the motor control APP.

The solution would be to change the trigger of the queue only when the CCU8 is stopped.

As explained above I have tried things like using "XMC_VADC_GROUP_QueueTriggerConversion(ACIM_FREQ_CTRL_0.adc_config_ptr->vadc_group_pointerarray[1])" to trigger the queue but it doesn't work. I don't know if I forgot something.

The ideal for me would be a solution of this type.

Thanks.

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Juan71 
We do not recommend changing the ADC trigger within the code. Also, if you software trigger the ADC using the API mentioned, it may lead to issues like random sampling once you run your closed loop algorithm.
Our recommendation for your specific requirement is as mentioned in my previous reply.
Regards

RupakC
0 Likes
Juan71
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hello @RupakC, sorry for the delay in responding, I've had a few days off.

 I will try what you suggest.

I have another question, as I have already commented above, I have only one shunt and the setup as "The trigger for current measurement = DC Link Current Measurement". The ADC current measurement is smaller than the measurement with the oscilloscope.

The APP code generator configures the following:

Juan71_0-1671011794972.png

As you can see, the trigger signal is the following according to the datasheet:

Juan71_1-1671012139684.png

How can this work?

Shouldn't it be the following (although I've tried it and it also works badly)?:

Juan71_2-1671012293086.png

As I commented above, the ADC does not seem to measure well. I don't know if it's a trigger problem... For detect the overcurrent of 4 amps rms I have to set the APP to 0.8 amps.

Thanks.

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Juan71 

Have you checked if you have entered the correct values in the app for the following settings? 

1. Current amplifier configuration

2. Voltage divider ratio

Can you share your project with us such I can have a better understanding of your code?

Regards

RupakC
0 Likes
Juan71
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hello @RupakC 

I have checked the current amplifier configuration and voltage divider ratio and it is correct.

How can I share the project?

Thanks.

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Juan71 

You may send the project to me on private chat. Please share your DAVE project. Additionally, we will need your board (both power and controller board) schematics. If you are using Infineon reference boards/ EVAL boards, please mention the part number only.  

Regards

RupakC
0 Likes