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

Not applicable

Anyone played with the resolver example : "Resolver_FOC_Motor_Example1.zip"
With encoder and hall sensor is working well, but not with resolver.

I have the right board now XMC4500 CPU_45A-V3 board and MOT_GPDLV-V2 board. 835.attach

I want to readjust the parameters to run with a different motor and resolver

when i start the motor is sniping slowly (i think for auto tuning the angle). But after it`s starts to oscillate and potentiometer is not doing anything.
I tried different motor parameters but the same. I have Nanotec DB42S3 motor with 4 pole pairs.

They not specified anything about the resolver parameters like no of lobes. some are with 3 others with 4. so where i do adjust this?

I have default IQSTARTUP 2F and i do not know what is meaning.


Also the i do not know how thy calculate this value" Volt_DC 2915U "

Any help would be good.

4 Replies
Hallo Luilan,

Volt_DC is used as init value this is regarding to the ADC scaling. 2915U = 24V
IQSTARTUP is the startup value for the integration part of the Torque PI controller.

refered to Readme:
in the Example the Maxon motor 118894 EC40 with Resolver TS2610N171E64 is in use.
If you are using a different Motor you can change the PI parameters in PI_config.h
The Parameters in hardware.h are only for open loop startup.

The Example expects a Resolver with one Sine per mechanical rotation.

Have you already try to connect with xSPY?
[URL] www.infineon.com/xSPY [/URL]

Here you can see the feedback from the Resolver. If the Angle calculation is correct.

Until now we don't provide a FOC Resolver App.
This would help to configure the PI Controller according to the motor.

Maybe it is easier to start with the DSDRV App alone.
Check if the Angle calculation is correct.

After this you can add a PMSMFOCIE02 App for motor configuration.
And instead of calling POSIFIE01_GetRotorAngle(HandlePtr->PosifAppPtr,&(HandlePtr->H_Ptr->RotorAngle));
You can call DSDRV001_GetAngle(&DSDRV001_Handle0,&Angle);
(Please keep in mind you still have to add an offset)

Please keep also in mind that all files in the "Dave" folder are refreshed after "Generate Code".
But you can build your own app by changing the template.

Not applicable
First, thank you for response.

My resolver has 4 sine (4 lobes) per mechanical revolution, where do i change to 4 mechanical SINE per revolution instead of one?
I was able tu run the xSPY. and to view the sin and cos trace,

I do not know to what to compare the xSPY value to se if is ok or not.

But how to compare to see if angle calculation is correct. I compare offset position from xSPI control page to what?

I also tried with DSDRV example for XMX4500 and i do not know to what to compare the offset or what to do ?

tell me if i`m not wrong?, I think that at the beginning, the code is auto tuning for the resolver angle. and after should run well.

There is a offset value in the motor.c file like in the attachment. I added the value from the xSPI reading but is still not running ok.

I also tried to migrate the resolver project to the highest app version with success but when i built the project i have a strange error


So else can i try?

Thank you
Hallo iulian,

The xSpy is looking good.
We can see a sine and a cosine with no glitches and also the Angle looks like a saw tooth, what is good.
So we can guess resolver is connected probably and the analysis is working.
(In your case the motor was turning or?)

You can try to set the pole pair to 1.

So when Motor has pole pair 4 and resolver has pole pair 4 you can set both to 1.
Only the speed calculation is now 4 times more than displayed.

Still the second solution is:
work with a PMSMFOCIE app. and integrate DSDRV app.
You could compare the DSDRV app against the POSIFIE App to see if everything is ok.
Maybe this step is unnecessary but it helps for understanding.

As your Motor has also an Encoder you can really start with PMSMFOCIE App.
Include the DSDRV and run it in parallel. with xSPY you can have a look if both angles are the same.
Still you have the problem that motor has 4p, resolver 4p, encoder 1p. So you have decide what is your reference system.
After both systems are similar you can try to switch.

The question what your target is.
Is the target to get this one motor to run, or do you want to switch later to another motor?

Not applicable
Thank you.

I was able to run the motor with 1 pair of poles settings.

It was exactly like you said, because the controller code is expecting 1 sine per revolution but my resolver has 4 lobes. I tested also with number multiple of 4 and is still working and the speed of the motor is the same indifferent of the pole count settings, so internally the board calculates the speed correctly.

I have another motor much bigger, with 6 pair of poles and resolver with 3 Lobes and i`m not sure if i will be able to run that motor. because with 3 lobes and 6 pair of poles i`m not sure that i can still full the code to think the same.

I will need to modify the programming code, but i`m not good at programming.
I tried to add the DSDRV001 app to the resolver example, manually connect signals and resource assignment and delete DSDIF003 app but i had errors on build command.


What i want is to make drive with the resolver input to test production motors. I can make my own IGBT driver and IGBT power stage. i`m not at the first controller now, but were 100% analogical.

Can you tell me if i`m wrong with the start up sequence?
First the board is driving the motor based on back-EMF method, measure and save the offset angle between the rotor angle and resolver. (auto tuning)
Second is running only by the resolver sequence in the close loop.

I can take the signals from the Gate of each of the 6 mosfets and drive a led input on my optical galvanic insulated drivers to go to hi power IGBT module.
But i will need also to read the back emf when the motor first starts to calibrate the resolver. if this is the right sequence.(is not do diffiicult to adapt 600v to couple of mv for the board to read there are some avago IC with galvanic insulation that i can use)

Maybe the Infineon will release a version with DSDRV001 app and allow you to modify the parameters of the resolver and the motor.

But some times the motor is moving a little bit so i don`t like this.

In the current example the pot should be in the middle position to have 0 speed, turning it in one direction will make the motor to go left or right.
I want to modify the code to have 0 speed of the motor at 0 % position of the pottentiometer, can you tell me where i need to modify this?