Software environment for S32K DC motor application

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

Software environment for S32K DC motor application

2,579 Views
alexisberthon
Contributor II

Hello, could you help me to define the right software environment to develop DC motor application for my customer on S32K1xx ? In fact, we understood that only Simulink and the « Model-Based Design Toolbox for S32K1xx version 4.1.0 » are needed but on the website, we see that “Matlab coder”, “Simulink coder” and “embedded coder” seem to be mandatory also (see attachment). Could you help me to know what is the right configuration ?

Thanks,

9 Replies

2,073 Views
dumitru-daniel_
NXP Employee
NXP Employee

alexisberthon‌,

To generate the code automatically with NXP MBDT the user need to have/acquire from Mathworks the following toolboxes:

In addition, we recommend the Stateflow® too since some of our examples include state machines implemented with Stateflow.

Best regards,
Daniel

2,073 Views
alexisberthon
Contributor II

Thanks Daniel !

Have a nice day

0 Kudos

2,073 Views
alexisberthon
Contributor II

Hello Brian,

thanks for your feedback. So, if my customer only wants to simulate S32K144 behavior on simulink without needed to create code to run on S32K, no need MATLAB Coder, Simulink Coder, and Embedded Coder ?

Only need Simulink and Model based Design toolbox

Am I right ?

Thanks,

Alexis

0 Kudos

2,073 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi alexisberthon‌,

If the customer wishes just to simulate the behavior of the DC motor applications, then I would suggest the following setup:

- MATLAB

- Simulink 

- Simscape Electrical (for accurate simulation of the DC chopper & DC motor)

- MBDT S32K1xx 4.1.0 (for simulations related to AMMCLIB and PWM modules) 

A/D Converters are not supported in Simulink simulation by the MBDT 4.1.0. Currents and voltage measurements must be emulated using Simulink mathematics. 

Hope this helps!

Daniel

0 Kudos

2,073 Views
alexisberthon
Contributor II

Hello Daniel,

I hope everything goes well for you ?

Did you have a look to my last message ?

Thanks in advance,

Alexis

0 Kudos

2,073 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi alexisberthon‌,

Sorry for the delay caused mainly by Easter break.

Here are my comments:

He needs to control a motor of 12V/30A and for evaluation he needs the closest configuration to evaluate S32K plateform.

I know you propose some kits with DC motor included (S32K Development Kits 3-phase PMSM and BLDC Development Kits | NXP ).

Any of the kits should be fine. The main difference between the kits consists in the default jumpers configurations, resistors placed on the S32K144 carrying MCU board and the SW flashed into the memory. All these can be updated by the final customer based on his/her setup requirements.

Now, considering the 12V/30A requirement, you should be aware that the MotorGD shield cannot deliver such power. The maximum power should not exceed 60W or 5Amps RMS.

What could be the best choice for the customer ?

The customer could start with the kit, but then he/she must design a custom inverter to deal with the power requirements for his/her own motor.

Another alternative would be this evaluation board: https://www.nxp.com/design/designs/s32k142-24-v-motor-control-reference-design:S32K142-MC24 

Customer could manage to adapt their motor on the kit after ?

It is possible to increase the range of the MotorGD inverter, but there is extensive rework that needs to be done in order to make capable of running higher currents. Transistors and the current shunts need to be changed.

Regarding SW configuration, what tools are needed in this case ? 

There are multiple offers:

You say that the ADC are not available in simulation but into the specification its look working well. Do this is link to the fact that the motor is simulated?

The ADC converters blocks supported by NXP Toolbox can't be used for Simulink Simulation. If the customer wants to use if for Simulink modeling, then he/she should implement a simple A/D conversion.

The block you have shown above ADC Interleave is a special block supported by the NXP Toolbox that allows the users to enable the ADC interleave option in the generated code. The HW has a special functionality that allows you to reroute internally some of the ADC inputs to various instances of the ADC peripherals. This way you can synchronize the current measurements easily.

Hope this helps!

Daniel

2,073 Views
alexisberthon
Contributor II

Hello Daniel,

thank you very much for your support.

Wish your easter break was pleasant :smileyhappy:

One more question : customer wishes to work with Simulink and MBDT.

So he will need "Matlab coder”, “Simulink coder” and “embedded coder” to convert Matlab or Simulink models of their motor into C code to run it on S32K ?

Thank for your confirmation

Alexis

0 Kudos

2,073 Views
alexisberthon
Contributor II

Hello Daniel,

thanks for your feedback.

In fact, the target of the customer is to use an interface shield to use their motor with an S32K eval board.

He needs to control a motor of 12V/30A and for evaluation he needs the closest configuration to evaluate S32K plateform.

I know you propose some kits with DC motor included (S32K Development Kits 3-phase PMSM and BLDC Development Kits | NXP ).

What could be the best choice for the customer ?

Customer could manage to adapt their motor on the kit after ?

Regarding SW configuration, what tools are needed in this case ? 

 

You say that the ADC are not available in simulation but into the specification its look working well. Do this is link to the fact that the motor is simulated?

ADC for simulation.png

Thanks a lot for your support, as I'm a little bit confused about how to give the best answer to my customer.

Regards,

Alexis

0 Kudos

2,076 Views
brianmckay
Contributor III

You require MATLAB Coder, Simulink Coder, and Embedded Coder. These tools convert your MATLAB and Simulink model into Embedded C code which can run on the S32K processor.

Cheers,

-Brian