Module 2: PMSM and FOC Theory

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

Module 2: PMSM and FOC Theory

39,851 Views
Daniel_Popa
NXP Employee
NXP Employee

INTRODUCTION

In this module of the 3-Phase PMSM Control Workshop with NXP's Model-Based Design Toolbox, the focus is on the theory of the Permanent Magnet Synchronous Motor (PMSM) operation and Field Oriented Control (FOC) used to control the speed and position of PMSM's rotor.

 

From the beginning we need to point out that we will not go thru all the details of construction or mathematical models of the PMSM. If you look for specific details then the advice is to look for specific engineering handbooks. 

 

The main goal of this article is to highlight only the specific details that represents the basics of PMSM motor control since we will use these aspects throughout the workshop. You can think about this as crash course that explains the key aspects of the theory behind PMSM and FOC.

 

Video training: How Permanent Magnet Synchronous Motors are built and what is Field Oriented Control 
   
 

 

   Please watch this video before going further. The rest of the article is a summary of the video.

 

 

PMSM MAIN COMPONENTS

A typical PMSM construction consists in a stator (Fig. 1) that supports three windings/coils connected in star or delta configuration which are energized with AC power. These windings/coils are placed around magnetic pole shoes that force the magnetic flux produced by the AC current passing the coil to take a specific path in order to maximize the motor efficiency. 

pastedImage_6.png
Fig. 1: The stator of the motor we are going to use for experiments in this workshop

 

The PMSM's rotor (Fig. 2) is usually made of permanent magnets mounted on the surface (SPM) or inside the rotor (IPM) and a steel shaft that transit the torque to various devices.

pastedImage_1.png
Fig. 2: The rotor with surface mounted permanent magnets

The motor we are going to use thin this workshop was chosen to facilitate the development of the sensorless motor control. It has two pole pairs which are built in so called salient pole rotor type. This means that the stator flux path lengths varies in respect with the rotor position. This is a fancy way to say that the magnetic reactance is different between the motor flux and torque axes. This will helps us to build a magnetic salient tracking observer to estimate the rotor position and to eliminate the need for having a position sensor mounted on the motor shaft.

 

 

 

ROTATING MAGNETIC FIELDS

The key to rotate the motor's rotor is to be able to produce a rotating magnetic field in the stator like the one in Fig. 3. The most common way to produce a rotating magnetic field is to energized the coils with AC currents. If a three phase balanced current system is passed thru a system made of three windings/coils that are spatially distributed at 120 degrees apart, then the resulting magnetic field will rotate with the same frequency as the 3-phase AC current. The "guy" that figured this out was Mr. Tesla

 

pastedImage_3.png
Fig. 3: Producing a rotating magnetic field in the stator

 

If we oversimplify the physical processes that happens inside the stator coils and yoke, and instead of a continuous AC current waveforms we conveniently choose only 6 strategic interest points then you can easily see how the resulting magnetic flux vector is shifting its direction in sync with the AC current systems.

 

Controlling the position and strength of the magnetic field produced in the stator is the first step towards the Field Oriented Control. 

 

 

 

FIELD ORIENTED CONTROL SECRETS

The ESSENCE of Field Oriented Control is to align the stator current vector (Is) that produces the rotating magnetic field (red dotted line arrow in Fig. 4.) with the rotor torque-axis. To have the motor to perform at its peek efficiency the magnetic flux produced by the stator windings must be at 90 electrical degrees compared to the magnetic flux produced by the rotor.

pastedImage_11.png
Fig. 4: Field Oriented Control Goals

To align the stator flux vector with the rotor torque axis a the key aspect of Field Oriented Control technique is to know the position of the rotor at any moment (the angle between the rotor flux axis and the stator phase A magnetic axis). Without this critical piece of information the whole mechanism will fail to perform.

 

The Field Oriented Control gives us a the possibility to simplify the entire control structure of the synchronous machines using a series of mathematical transformations that allows us to think and act as in a linear domain rather that in a complex one where quantities varies in time and space. In other words, by using the FOC and the concepts derived from it we can transforms a 3-phase AC motor into a simple 1-phase DC motor where magnetic field and motor torque can be controlled separately and this mechanism is described in Fig. 5.

 

pastedImage_19.png
Fig. 5: Clarke and Park transformation used for Field Oriented Control

 

Starting from a 3-phase PMSM standard mathematical model that is described by 3 differential equations in a fixed reference system, we can perform a simple Clark transformation to reduce the number of equations and then have them translated using Park transformation from a time domain into a Laplace domain where the model can be described by 2 simple linear algebraic equations as shown in Fig. 6. 

 

pastedImage_1.png
Fig. 6: PMSM mathematical model simplified with Clarke and Park transformations

 

That's the beauty of Field Oriented Control.

We hope you find this information useful. Feel free to LIKE this article and comment below.

13 Replies

29,595 Views
AGREY
Contributor I

Hello Dimitru

Thank you so much, this workshop is amazing!. Unfortunately, some videos don't work.
Could you tell me how could I watch them?.

Best regards.

Agustin.

0 Kudos
Reply

29,594 Views
richard_orengo
Contributor I

Hi,

Do we have to modify FOC algorithm when we drive a star connected motor and we want to drive a delta connected motor ? Do the windings pattern have impact on FOC ?

Best regards,

Richard 

0 Kudos
Reply

29,595 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi richard.orengo@free.fr‌,

FOC does not care if the motor is wye or delta. It will drive the motor with the same voltage patterns in both cases.

Anyhow, you need to pay attention how you set the current and voltage limits&protections for wye vs. delta since in both case you work with line values.

Hope this helps!

Daniel

29,595 Views
jihan
Contributor I

Fig.4  , A winding Align the magnetic Axis  of Phase A, right? I think there is something wrong in the picture.

0 Kudos
Reply

29,595 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi jihan‌,

In Fig.4 the A winding is denoted as A-A'. In A the current flows in (.) while in A' the current flows out :smileyx:. 

If you consider that as a round coil, then the magnetic flux will be perpendicular to the A-A' plane. That is why the Magnetic axis of phase A is shown in horizontal position.

Hope this clarify the issue. Let me know if this is ok with you. Anyhow, how would you draw it ? I know there are different way to represent motors abc/alphabeta/dq reference frames. Each university might have its own preferences. I would be interested to know your view.

Best regards,

Daniel

0 Kudos
Reply

29,595 Views
jdavey
Contributor I

Hi Dimitru,

I too am confused about figure 4. 

In figure 3 we see the (X) and (.) rotating such that there is always 3 (X) followed by 3 (.), yet in Figure 4 they are alternating (X) (.) (X) (.) (X) (.)

I think what you are trying to show is the magnetic axis of each coil when the current is in a positive direction (Yellow, Green and Cyan arrows).  However you would not energise the coils in this manner simultaneously as the magnetic fields would cancel each other out. is that a correct understanding?

So I was confused as to which of the 6 positions shown in figure 3 is Figure 4 most closely aligned to.

Can you clarify?

John

0 Kudos
Reply

29,594 Views
adriantudor
NXP Employee
NXP Employee

Hi John,

In figure 4, as you can see, there is an alternating (X) (.) (X) (.) (X) (.), where (.) represent start of the coil and (X) represent end of the coil. So if you connect ( (.) to positive potential and (X) to negative potential) each of the coils to a power source, then for each of those coils there will appear an magnetic flux corresponding to current sense which flow through coil. Those three coils are connected together at one side (let say each end of those coils --> star connection). This common side of coils is not connected to any side of power source. Then if you want to energize the motor you will have to connect (through an switch/transistor) at least one coil to positive potential and at least one to negative (ground) side. The current entering the motor must also go out :smileyhappy: . Due to that it is not possible to have at the same time magnetic field like in figure 4. 

Best regards,

Adrian

29,594 Views
hongjinzeng
Contributor IV

Thank you dumitru-daniel.popa

can you give me a YOUKU URL?

Because Chinese have a great wall,I can't watch the video.

The Chinese people live in dire straits,I need your help.

Thank you.

0 Kudos
Reply

29,594 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi hongjinzeng‌,

For the moment i do not have the YOUKU links. I need to upload them first. I'll try to make this ASAP.

Thank you!

Daniel

0 Kudos
Reply

29,595 Views
haoxue1027
Contributor V

Hi,Daniel

Have you finished the update in YOUKU.

May I have the links ?

Right now, i still can not watch the viedos here.

thank you very much

best regards

hao

0 Kudos
Reply

29,596 Views
wangxuan
Contributor III

Hi,Daniel

I do not quite understand your reply to Leon Thürnau, and I would like to ask if NXP toolboxes can work with the motor and rotor provided by SimPowerSystems Toolbox to simulate it. If  can, can you provide me an example of what you did, thank you very much.

best regards.

wangxuan

0 Kudos
Reply

29,596 Views
lethuer
Contributor V

Thank you dumitru-daniel.popa

this was very helpful to understand the abstract theory !

I'm really excited to see the implementation in detail soon...

I want to realize your workshop with the high voltage platform.

For me it would also be interesting to model the plant and to see some influences. 

So first I want to design a controller and simulate it's behavior with the pmsm from simscape.

what I have to account here ?

After that it would be possible to create an own plant model from the pmsm in simulink.

Also the Controller could be tuned to get more robust for a range of the parameters, e.g. R,L...

0 Kudos
Reply

29,595 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi lethuer‌,

Thank you for your appreciation. 

In respect with your question - Unfortunately,  i never worked with Simscape but i presume all you need to pay attention is the scaling between:

- PWM commands and the actual motor voltage commands in Simscape;

- Current feedback scaling - or ADC implementation in Simscape;

I've made some similar things in the past - but i used the motors and interters provided by SimPowerSystems Toolbox and that worked just fine.

Also, if you prefer a more traditional approach - you could search on Mathworks File Exchange for Simulink models of the motor you wish to control. In that case - you simply need to update the parameters.

Anyhow, keep in mind that for controller tunning you could use the Simulink Simulation - but you can't do External Mode with our toolbox. If you wish to tune the controllers in simulation environment with hardware in the loop - that is not yet possible with NXP toolboxes. You will need to generate the code, run it on the actual target and connect with FreeMASTER to change the values of the controller gains.

Nonetheless - if you manage to build an accurate Simulink model of your plant - then you could run the simulation, use ControlSystemDesign Toolbox to tune the parameters in the simulation and once you are satisfied with the results you could generate the final code and test it on the target.

Hope is helps! and i look forward to see your results.

Thank you!

Daniel

0 Kudos
Reply