KMS does not detect motor parameters

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

KMS does not detect motor parameters

2,135 Views
abdullahkahrama
Contributor IV

I am using a custom board to interface FRDM-MC-LVMTR (LINIX 45ZWN24-40). Attached are the schematic of this board and PCB view.

KMS GUI detects parameters as below:

Untitled.png

Lowering identification currents increase the stator resistance up to 10 ohms.. So, I went over to Advanced Tuning, Manual Motor Setup and copied the values I saw from online training videos which use the same motor:

Untitled.png

After that, I've tested open-loop control by setting the "startup speed threshold" to a very high value such as 5000. Then, I ran the motor to a target speed using "Run & Stop Motor" in "Speed Control" menu. It seems to be working fine until about 3000 rpm. After 3000rpm, the motor stops turning very sharply. However, inside, it vibrates like it is turning at about 3000 rpm and sounds like that, too. When I command down to about 1000 rpm, it starts turning again after it slows down.

I've also tested Torque control after setting the "startup speed threshold" to 400 rpm. Regardless of the "Q-Axis Reference" value, it reports the motor speed at about 2600 rpm. I try to disturb the motor with my hand and it seems like it is doing some torque control. However, there seems to be an issue. If I measure the main supply current with a multimeter, and set the "Q-Axis Reference" to a value, let's say 0.4A, and disturb the motor, it is fine until 0.4A. When I go beyond to a value like 0.6A by forcing the motor harder, the control seems to be lost. When I set  "Q-Axis Reference" to 1A, control doesn't get lost at 0.6A, however at about 1.1A..

Closed loop mode works only sometimes with the right bandwidth value and only at about 1750 rpm to 2500 rpm. It is very unstable and I need the motor start up to about 1500 rpm using open-loop.

I have tried multiple bandwidth values under "Speed Loop Tuning" menu, that changes some behaviour, however I don't see a stable control.

How should I troubleshoot this?

Labels (1)
Tags (2)
11 Replies

1,540 Views
linestream-adam
Senior Contributor I

Abdullah,

Have you verified that the phase currents being read are correct?

Also I noticed that you are using different MOSFETs than the FRDM-LV-PMSM board, have you also modified the Rdson & Deadtime to reflect these different power devices?

The app note AN5254 goes over some of these adaptations that need to be done in order to make KMS work on a custom board.

Your board looks pretty good btw!  

1,540 Views
abdullahkahrama
Contributor IV

Hello Adam,

Thank you for your answer :smileyhappy:

I have tried adjusting the Rdson and deadtime parameters according to my setup. However, that didn't change any behaviour at all.

Do you think LMV324 as current sense amplifier could be the problem?

How do I verify that my phase currents are being read correct? Below, I put phase currents' graph when the motor is turning at 1000 RPM in open-loop mode.

PhaseCurrents-2017-05-31T10-22-32.pngPhaseCurrents-2017-05-31T10-22-06.png

0 Kudos

1,540 Views
linestream-adam
Senior Contributor I

It is possible that your opamps are the problem, they are quite a bit slower than the FAN4852.

I've found it is easier to make sure that the phase currents are reading correctly when doing the resistance identification as this will inject a known amount of current into the motor (80% * sqrt(2) * Rated Current) which should be along the A phase, while B & C phase should be half the value and negative.

The captures you posted have the current not balanced, but I would be interested to see what it looks like during resistance identification.

1,540 Views
abdullahkahrama
Contributor IV

Hello Adam,

I am very grateful of your answers. Somehow my e-mail notifications were turned off and I was waiting for an answer to come in, cluelessly. 

I have changed my opamp to MAX4354ESD+ as I suspected that could be a problem. However everything remained the same.

Here is the graph you have asked about, with the new opamp. Rated current of my motor LINIX 45ZWN24-40 seems to be 2.3A.

PhaseCurrents-ResistanceIdentification.png

Here are phase currents with the new opamp, running in open-loop at 1000 RPM:

PhaseCurrents-2017-06-17T12-56-42.png

PhaseCurrents-2017-06-17T12-56-27.png

0 Kudos

1,540 Views
linestream-adam
Senior Contributor I

No worries.  I had hoped I solved the issue :smileyhappy:

I'm concerned about the level of noise on the current feedback signal.  If I compare your graph with the one I get for the TWR evaluation kit you can see the huge difference.

PhaseCurrents-2017-06-19T11-07-14.png

Even running open loop the eval hardware is much cleaner.

PhaseCurrents-2017-06-19T11-16-36.png

The algorithms used in KMS can tolerate some amount of noise, but I think your design has too much.  I would suggest looking into ways to reduce the noise on the current sense lines.

1,540 Views
abdullahkahrama
Contributor IV

Hello Adam,

I've changed my OP-AMP to TLV274 and things seem to be much better now. There was a discussion on this site about my design.

Closed loop control is noticeably better now but still not reliable, even with the hand-corrected parameters.

Here are my new graphs, they seem much noise-free. The parameter measurement is still wrong, especially the resistance.

tlv274.png

Open loop at 1000 RPM:

tlv274-ol.png

motor_parameters.png

0 Kudos

1,540 Views
abdullahkahrama
Contributor IV

Oh, I've found the problem. It was the bootstrap capacitors for gate driver IC FAN7388. They were not enough, so I made them 2.2 uF and problem solved. The parameters are measured correctly now.

motor_parameters.png

However, my graphs are not as clean as yours

tlv274.png

tlv274-ol-2.png

Here is the pin 18 of the MKV31F512VLL12P measuring phase C current. 14kHz noise filtered, scope and probe is 200 MHz, ground lead is smaller than 1 cm:

Phase C current - open loop - 3k RPM.PNG

0 Kudos

1,540 Views
linestream-adam
Senior Contributor I

I'm glad it is now measuring the correct parameters.  

I would suspect that the TWR hardware signals would be cleaner than the FRDM (based) since it uses a more robust amplifier design.  Your signals are probably clean enough, and as you get into larger currents your signal to noise will improve.

1,540 Views
abdullahkahrama
Contributor IV

Hello Adam,

Your graphs are perfectly clear! I was worried about the noise issue, and it bit me. Oops..

That means I need to have a look at my PCB and revise to minimise noise. Thanks a lot for your help!

0 Kudos

1,540 Views
philip_drake
NXP Employee
NXP Employee

To aid you in your circuit design please take a detailed look at the document I just uploaded to the community on PCB layout design.  It should help. Also the Dan Beeker training here

Philip Drake

1,540 Views
abdullahkahrama
Contributor IV

Hello Philip,

Thank you very much for this info!

0 Kudos