I recently purchase HVP-KV46F150M demo kit and also found code for sensorless vector control of PMSM motor. But, it does not have MCAT file associated with it. Means i only can see the freemaster file. Please attach the MCAT tool file for tuning the contr

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

I recently purchase HVP-KV46F150M demo kit and also found code for sensorless vector control of PMSM motor. But, it does not have MCAT file associated with it. Means i only can see the freemaster file. Please attach the MCAT tool file for tuning the contr

8,380 Views
sandeepn
Contributor II

I recently purchase HVP-KV46F150M demo kit and also found code for sensorless vector control of PMSM motor. But, it does not have MCAT file associated with it. Means i only can see the freemaster file. Please attach the MCAT tool file for tuning the controller for PMSM motor using field oriented control structure.

Labels (1)
29 Replies

4,906 Views
sandeepn
Contributor II

Hello,

It got connected by following your instructions. But MCAT tool is showing this error. please reply me soon as I have spent lot of time on this. if I don't get any output from this. I may be lost of all my time which I spent on this development.

pastedImage_0.png

0 Kudos
Reply

4,906 Views
joseftkadlec
NXP Employee
NXP Employee

Check the following variables in FreeMASTER:

pastedImage_0.png

pastedImage_1.png

Board ID = hvp-kv46f

Motor Type = pmsm

sAppIdFM.cAppVer = 1.1.1

MCAT recognizes the type of application from these variables. If these variables are incorrect, double check the Symbol file (posted above, 1.6.2016 4:49).

BR,

Josef

0 Kudos
Reply

4,906 Views
sandeepn
Contributor II

I changed the device setting to KV46F150M. program compiled without errors. Then downloaded the program. but when I open MCAT file, it is  showing no symbol found.  Version of IAR is 7.40.3.8938.

pastedImage_1.png

0 Kudos
Reply

4,906 Views
joseftkadlec
NXP Employee
NXP Employee

Double check build configurations. If you build/download the debug configuration in IAR, you must select the "debug" path for symbol file in FreeMASTER. The same applies for the release configuration:

pastedImage_3.png

pastedImage_4.png

If I didn't answer your question or it doesn't help, make a screenshot of the error, please.

BR,

Josef

4,906 Views
sandeepn
Contributor II

These are some of the errors which I got when I ran the program (pmsm_ref_sol).

Building configuration: pmsm_ref_sol - debug

Updating build tree...

4  file(s) deleted.

Updating build tree...

startup_MKV46F16.s

Error[438]: This instruction is not available in the selected cpu/core C:\Freescale\MCRSP_PMSM_V1.1.1\src\common\sdk\devices\MKV46F16\startup\iar\startup_MKV46F16.s 355

Error[438]: This instruction is not available in the selected cpu/core C:\Freescale\MCRSP_PMSM_V1.1.1\src\common\sdk\devices\MKV46F16\startup\iar\startup_MKV46F16.s 357

Error[438]: This instruction is not available in the selected cpu/core C:\Freescale\MCRSP_PMSM_V1.1.1\src\common\sdk\devices\MKV46F16\startup\iar\startup_MKV46F16.s 359

Error[438]: This instruction is not available in the selected cpu/core C:\Freescale\MCRSP_PMSM_V1.1.1\src\common\sdk\devices\MKV46F16\startup\iar\startup_MKV46F16.s 360

Error while running Assembler

freemaster_appcmd.c

Error[Ta097]: Cannot call intrinsic function "__nounwind __DSB" from Thumb mode in this architecture C:\Freescale\MCRSP_PMSM_V1.1.1\src\common\sdk\cmsis\Include\core_cm4.h 1723

Error[Ta097]: Cannot call intrinsic function "__nounwind __DSB" from Thumb mode in this architecture C:\Freescale\MCRSP_PMSM_V1.1.1\src\common\sdk\cmsis\Include\core_cm4.h 1728

Error while running C/C++ Compiler

app_init.c

Please reply soon.

0 Kudos
Reply

4,906 Views
joseftkadlec
NXP Employee
NXP Employee

Check Project -> Options if a correct device is selected (MKV46F256xxx16):

pastedImage_0.png

And write me which version of IAR you are using. The IAR Project Options are sometimes confused among different versions.

BR,

Josef

0 Kudos
Reply

4,906 Views
sandeepn
Contributor II

Hello,

while compiling the program itself, it is giving me an error of about 82. It is throwing an error randomly.

Regards,

Sandeep

0 Kudos
Reply

4,906 Views
joseftkadlec
NXP Employee
NXP Employee

Share some of the errors. You might be using a different IAR version. See release notes.

BR,

Josef

0 Kudos
Reply

4,906 Views
sandeepn
Contributor II

Ya. HVP-KV46F150m Quick Start Package. Just now, I downloaded MCSRP_PMSM software package.  Even this MCAT tool file is also giving the same problem.

0 Kudos
Reply

4,903 Views
joseftkadlec
NXP Employee
NXP Employee

Still the same problem with the symbol file and nonsense variables? There are 2 configurations (Debug = no optimization, Release = optimized for speed). If you compile/download debug configuration, there must be the debug in the symbol file path at FreeMASTER. The same applies for the Release configuration:

pastedImage_0.png

pastedImage_2.png

Let me know your comments,

Josef

0 Kudos
Reply

4,903 Views
sandeepn
Contributor II

U r absolutely right. Every time I open the MCAT tool, It gives me a pop-up saying that no symbol found. I click on continue to further use of MCAT tool.

I am tuning PMSM motor using HVP-KV46F150M board which has not got the dedicated MCAT file on NXP website. I only can see freemaster file. But I am using MCAT tool file which is given for HVP-KV46F256M. May be this is actually giving me a problem. Please attach the MCAT TOOL file for HVP-KV46F150M board. It would be a great help for me.

Otherwise, tell me where do I get those symbol file ??, Reply soon

pastedImage_0.png

Regards,

Sandeep

0 Kudos
Reply

4,903 Views
joseftkadlec
NXP Employee
NXP Employee

If you have just started and have not written a lot of your own code to the original application, the best would be to download the newest MCRSP-PMSM (Motor Control Reference Solution Package for PMSM) here:

3-Phase PMSM Motor Control Reference Design|NXP

You can find there the project files, FreeMASTER file and MCAT for all supported platforms (KV46 too). At first try it as it is (just check Release/Debug configurations, see Release notes chapter 8.1).

If you don't want to try the MCRSP-PMSM and keep working with your application you can try to copy the FreeMASTER + MCAT from the package manually, but it won't work correctly because of development.

Where did you get the code you have? Is it the HVP-KV46 Quick Start Package? My advice is to download the MCRSP-PMSM package. The Quick Start Package is not maintained and no bugs are fixed there:

pastedImage_2.png

BR,

Josef

0 Kudos
Reply

4,903 Views
sandeepn
Contributor II

Hello,

I am tuning PMSM motor as per application note 4912 for FOC algorithm. To tune the motor, we will start by entering the motor parameters into the MCAT tool. once i generate the appconfig file from it. Application note says choose the V/F control. Every time i pressed the application switch, (scalar control is enabling, but application is not going to RUN state even i click on application switch) It always go to the fault mode while tuning in V/f mode to get the pure sinusoidal currents as motor currents. Please reply as i am half way through this procedure to get exact results.

pastedImage_0.pngThese are the error i am getting from the MCAT tool. Please give me valuable suggestion to get rid of these errors. For the sake of example, i have attached screenshot while clicking on FOC control structure. Even this error comes with scalar control and other control structure also. pastedImage_1.png

0 Kudos
Reply

4,906 Views
joseftkadlec
NXP Employee
NXP Employee

Hi sandeep,

From the screenshots you shared, I can see that FreeMASTER is reading nonsense (see the Variable Watch window, e.g. unknown, ?, etc.). Most probably, the symbol file that your FreeMASTER is using doesn't correspond to code in your target. The symbol file says where the variables are placed in target memory so if it is incorrect or outdated, then FreeMASTER reads/writes wrong addresses. Symbol file selection (for IAR it is *.out):

pastedImage_0.png

Also when you rebuild your application, the symbol file is re-generated. FreeMASTER recognizes it and asks if you want to reload it. Always click yes:

pastedImage_2.png

If you get "Missing Symbol Definitions" pop-up, it means that the symbol file is missing or the listed variables (that FreeMASTER is trying to read) has no record in the symbol file:

pastedImage_1.png

Because MCAT interacts with FreeMASTER watched variables it is crucial to have the above fixed.

BR,

Josef

4,906 Views
ozgungunay
Contributor II

In its factsheet, it is written that;

Input voltage is 85–240 V AC, with output power of the motor stage up to 1 KW, with the ability to drive a 1.2 Hp motor, and 800 watts when using the PFC stage with the motor stage.

Besides, the freemaster allows the low voltages to create header file.

I could not find any information about min nominal motor voltage for HVP platform. if you have, please send me the link which defines the HVP platform min nominal motor voltage!

We have 24V/500W, 70V/300W, 70V/600W, 120V/800W motors.

Meanwhile I tested the board with 70V/300W motor and getting the same fault in HVP platform.

The TWR platform is a low power platform. It can not drive our motors.

Besides I do not think buying any more nxp products. I have enough trouble with HVP platform!

0 Kudos
Reply

4,906 Views
sandeepn
Contributor II

Hello,

I am working on sensor-less speed control of IPMSM motor using vector control technique. I designed controllers for my motor parameters. But, I understood the code which is supplied by freescale (nxp) for sensor-less control. Now, i want to replace the controller gains present in the code with my designed controller values to control my motor. Please help me in putting those controller gains into the existing code.

Designed controller gains are discretized by taking sampling time for current and speed control according to the theory of cascaded control structure. since electrical time constant is much smaller than the mechanical time constant. so sampling frequency for current control is around 10KHz and 1KHz for speed control. But, only thing i am left now is, i have to enter Kp and Ki values to the code. But they have given something like integer gain shift, proportional gain shift, upper limit, lower limit and all. How do i need to enter my controller gains.

Please help me in this regard as soon as possible.

0 Kudos
Reply

4,906 Views
ivadorazinova
NXP Employee
NXP Employee

Hi sandeep,

I stay in touch with Application Team and please refer to their response:

Controllers’ parameters are real numbers e.g. 1.8. We cannot express such a number with just fractional type because fractional range is <-1:1). Therefore, we established shifts to be able to describe such numbers, e.g. 1.2 = 0.6 << 1. In general controller’s parameters consists of FracValue << Shift. For more information have a look in documentation of your version of FSLESL. Anyway, there is a newer version (4.2) of FSLESL here:

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/v-s...

This version uses accumulator type to represent controllers’ parameter (lower 15bits = decimal part + upper 16bit = integer part + sign). Upper/lower limits are limitations of controllers output (e.g. voltage at current controllers or current at speed controller) scaled in fractional.

Please, download our latest PMSM package here:

http://www.nxp.com/products/software-and-tools/reference-designs-and-development-kits/nxp-designs/3-...

There is a PMSM package with projects for all MCUs/platforms with all MCAT files attached.

I hope this helps.

Best Regards,

Iva

0 Kudos
Reply

4,906 Views
ozgungunay
Contributor II

Hi Iva,

You can see the parameters tab screenshot above. What else parameters I can send?

The maxon motor, which I try to drive;

pastedImage_0.png

I'm not selecting any parameter form current tab. Each time I pressed, it gives error and calculates again. But I think it can not write/store these values.

0 Kudos
Reply

4,906 Views
ivadorazinova
NXP Employee
NXP Employee

Hi ozgun.

If you have 24V BLDC motor, use our LV3PH compatible with TWR system. Please see Low-Voltage, 3-Phase Motor Control Tower System Mod|NXP

The LV3PH is scaled to DCbus voltage 36.3V (phase voltage scale = 21V) by default. Current scale is 8A as at HVP. There arise several problems when you use low voltage motor on HVP:

  • HVP functionality at low voltage – HVP is designed for input voltage min. 85VAC or 110
  • If you use low input voltage anyway:
    • Minimal dead-time is still 1.5us (FNB41560)
    • Phase voltage scale is high -> voltage accuracy at all calculations is low -> worse observer, worse identification, etc.
    • current controllers’ constants are dependent on Imax and Umax. Current controllers’ constants are inversely proportional to U max so the constants will be low (cca 10x lower than with LV3PH). Therefore MCAT increases minimal bandwidth to increase the constants.
  • The pop-up window saying the “Entered value of Natural frequency cannot be lower than: 1041Hz” could also mean:
    • The motor you have has short motor electrical constant (L/R)
    • Then it is a good idea to go higher with PWM (and also FOC calculation) frequency 10kHz to 20kHz.

At first try to use our LV3PH power stage designed for TWR system. You will find related SW in the package you downloaded.

I hope this helps.

In case of any issue, please let me know.

Best Regards,

Iva

0 Kudos
Reply

4,906 Views
sandeepn
Contributor II

Please attach KV46F150M series kinetis controller MCAT file for tuning PMSM motor for sensorless vector control technique. I have searched a lot in the freescale website (nxp). Many MCAT files for different boards like tower and others are present. But I did not find MCAT file for particularly KV46F150M. Please I sincerely request you to attach the MCAT file for KV46F150M high voltage platform board. Waiting for valuable reply.

0 Kudos
Reply