Configuring Cross Triggering Unit (CTU) using Motor Control Development Toolbox

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring Cross Triggering Unit (CTU) using Motor Control Development Toolbox

3,845 Views
leon23
Contributor II

Hi,

 

My aim is to demonstrate me and my colleagues simulated controller algorithms for a PMSM motor, using field oriented- and direct torque control. The hardware used consists of an existing PMSM with 8 pole pairs, and using the development board ( MTRCKTSBN5643L Product Summary Page ) for MCU and drive stage.

I've been able to get the motor running open loop, and am now trying to get the implementation successfull doing steps by steps.

 

Now, in order for both the algorithms to work, the current needs to be measured accurately and in the right instant. The evaluation board has three commonly used shunt resistors for phase current measurments, and should be sampled in the middle of the pulse width of the bottom transistor pairs, according to this guide: http://www.freescale.com/files/32bit/doc/brochure/BB3PHCRMSRART.pdf .

 

Again, since the ADC conversion needs to take place exactly at half the pulse width of the bottom transistor pairs, the ADC conversion and the PWM generation needs to be synchronized, as explained in the brochure. I'm not familiar with existing techniques to do this, but if I'm not wrong, this is where the Cross Triggering Unit needs to be configured properly, so that the ADC conversion is triggered by the CTU.

 

I've read and understand the theory behind the operation, but can't find the right configuration of the CTU module in the Simulink environment. I've of course tried to follow the MCD Toolbox manual, but can't really follow the explination written there. Is someone here familiar with CTU configuring in the Simulink Environment? I would very much appreciate some help and if possible printscreens for the configuration.

 

Regards,
/Oscar

Labels (1)
3 Replies

1,973 Views
leon23
Contributor II

Worked around the problem, found some other examples which I could use.
Thanks for your support!
/Oscar

0 Kudos
Reply

1,973 Views
romanmuradov
NXP Employee
NXP Employee

Hi Oscar,

It looks like the flexpwm_ctu_adc_center sample doing the same thing as you want.

The line from the description “The model tests for both ADC convertors triggered by CTU at midpoint of PWM”.

Regards,

Roman.

1,973 Views
leon23
Contributor II

Roman,

You are correct. During the implementation process I forgot about the examples included in the MCD Toolbox. I followed the example, and now the ADC conversion is triggered in the midpoint of PWM as intended.

We do still got some problems however.

The aim is to use a PWM frequency of 20 kHz, now this would trigger the ADC conversion to have the same frequency. It seems that this process takes up quite a bit of the available computational power. Is it possible to have the ADC triggered, for lets say every forth time? I tried to solve this by implementing logic, but the compilation process encounters problems, please see attached photo.

LogicSampling.png
Regards,

/Oscar

0 Kudos
Reply