Initialization of Three phase field effect transistor (33937A) using MBD for MPC5744P

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

Initialization of Three phase field effect transistor (33937A) using MBD for MPC5744P

Jump to solution
2,083 Views
ext-rafael_barb
Contributor III

Hello All

 

I am trying to initialize the Three phase field effect transistor (33937A) using MBD for MPC5744

I am using the Example provided as : PMSM_ClosedLoop_mpc5744P (Snapshot 2)

 

For the steps 6a – 6f (snapshot 3)

 

Going in t2_init block (Snapshot 1) -> It says that Highside Off and Lowside ON -> but when I see in scope, both the sides are OFF.

Why is this happening?

Could you please explain how to achieve 6a – 6f (with PWMA inveted), because when I keep PWM value as 0, both sides are low and when I keep PWM value as 1, both sides are high.

 

Snapshot 1

pastedImage_2.png

Snapshot 2

 pastedImage_3.png

Snapshot 3

 pastedImage_4.png

Kind Regards

1 Solution
1,911 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi ext-rafael.barbosa@chassisbrakes.com

You can't mix 2 different configuration blocks for the same PMW module. The entire initialization is done only once in the Simulink Initialize Function and then the entire logic will move into Simulink Step Function. So, even if you have 2 different initialization for the same PWM only the last one will be used.

In your case you can use the independent from the beginning. Indeed there is no dead-time control when using the independent mode (it defeat the purpose of being independent) but you can still protect your transistors by enabling the DeadTime command in the pre-driver chip via SPI command (100x xxx1). 

Best regards,
Daniel

View solution in original post

7 Replies
1,911 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi ext-rafael.barbosa@chassisbrakes.com‌,

Please keep in mind that the high commands that goes into the mosfet pre-driver needs to be inverted. So for the high side transistors to command those to go into conduction you need to send a logic 0 signal which then will be automatically inverted by the pre-driver.

Then, you also need to consider how these signal are controller at the PWM logic, where you have another way of controlling the signal generated by the MCU that are sent to the PRE-DRIVER. 

Hence it is important if you have the change to test it with an oscilloscope on the actual MCU pins and then on the outputs of the MOSFET pre-driver.

Perhaps the descriptions might not be so clear (apologize for than) but to understand better the functionality you also need to check the PWM configuration.

Hope this helps!

Daniel

0 Kudos
Reply
1,911 Views
ext-rafael_barb
Contributor III

Dear dumitru-daniel.popa

So for the high side transistors to command those to go into conduction you need to send a logic 0 signal which then will be automatically inverted by the pre-driver.

The polarity in configured as inverted for High Side

cap.PNG

Hence it is important if you have the change to test it with an oscilloscope on the actual MCU pins

I checked it on the MCU pins using oscilloscope -> High and Low

If I feed 0 value in PWM complementary -> Both High Side and Low sides are 0 V

If I feed 1 value in PWM complementary -> Both High Side and Low sides are 3.3 V

190614_204218.png

So my question now is

How do I get step 6b (section 7.3.3 in https://www.nxp.com/docs/en/data-sheet/MC33937.pdf) in IC initialization, where

High Side is Off

Low side is ON

Regards

Rafael

0 Kudos
Reply
1,911 Views
Daniel_Popa
NXP Employee
NXP Employee

I think the simplest approach is to use independent PWM to get full control over the PWM signal generation.

pastedImage_1.png

0 Kudos
Reply
1,911 Views
ext-rafael_barb
Contributor III

Dear dumitru-daniel.popa

This is where the issue is coming as in independent mode, there is no possibility of dead time configuration.

So for the state of Initialization I use Independent mode.

For Normal Operation I use complementary mode.

Attached is an example.

If I try to initialize PWM in two different places using states (One for Initialization and other for normal operation).

I get Error

FlexPWM error: block 'PWMTest/PWM1/PWMA'. There should be only one FlexPWM Config block for each FlexPWM Submodule
Component:NXP MBD Toolbox | Category:Block error
FlexPWM error: block 'PWMTest/PWM1/PWMC'. There should be only one FlexPWM Config block for each FlexPWM Submodule
0 Kudos
Reply
1,912 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi ext-rafael.barbosa@chassisbrakes.com

You can't mix 2 different configuration blocks for the same PMW module. The entire initialization is done only once in the Simulink Initialize Function and then the entire logic will move into Simulink Step Function. So, even if you have 2 different initialization for the same PWM only the last one will be used.

In your case you can use the independent from the beginning. Indeed there is no dead-time control when using the independent mode (it defeat the purpose of being independent) but you can still protect your transistors by enabling the DeadTime command in the pre-driver chip via SPI command (100x xxx1). 

Best regards,
Daniel

1,910 Views
ext-rafael_barb
Contributor III

Dear dumitru-daniel.popa

dadadad.PNG

We use AMMCLib, and we get PWM values for complimentary PWM out.

If we use independent PWM.

How will be get the same output.

Example

I the output for PWMA =  x,

I need to convert x into xHS(highside) and xLS (lowside) (center aligned)

I tried using

xHS = x;

xLS = 1 - x;

What I would like to observe in oscilloscope that it has same signals as in complementary mode(off course except the dead time)

This work perfectly for values where x =0 or x=1;

But for any other values it does not work (model attached for x = 0.2)

    

Could you provide an input?

Regards

Rafael

0 Kudos
Reply
1,910 Views
ext-rafael_barb
Contributor III

Hello dumitru-daniel.popa

I found a solution for this by inverting the PWMB too. This works specifically for me.

For me PWMA was inverted and I wanted to use GMCLIB_SVMStd_FLT block but for independent PWM (as you suggested).

So I inverted PWMB too and I can directly use the output of  GMCLIB_SVMStd_FLT. (model attached)

asada.PNG

Thank you for the hint.

Best

Rafael.