Filter löschen
Filter löschen

FOC of a PMSM

31 Ansichten (letzte 30 Tage)
Kai
Kai am 19 Sep. 2023
Bearbeitet: Darshan Pandit am 21 Sep. 2023
Hello,
I got a specific motor that I want to use in a Simulink Model for a FOC drive. I started with the model from this example, just replaced the Motor(parameters), changed the DC voltage to 24 V and the load to 3 times of the rotor's interita. But obviously I did something wrong, the Motor does not reach it's rated speed of 9000 rpm.
  1. No matter what I do the max. speed is approx. 7000 rpm. From the datasheet I would expect at least 9000 rpm
  2. The torque demand is most of the time at the upper or lower saturation limit and the achieved torque is much smaller
  3. the phase currents doesn't have a sinusoidal shape at all
Here's what I found out in the meantime:
Regarding 3. it is a problem of the PWM frquency. The example uses a high power motor that can be driven with a low PWM frequency of 2 kHz. For this motor, I increased it to 25 kHz, which extends the simulation time indefinitely, while maintaining current waveforms close to sinusoidal.
I think 1. and 2. can have the same root cause, but the only Idea I have at the moment are wrong Parameters in Simulink. The magnetic flux is not provided in the datasheet. I used the formula in the end of this page flux = Kt/N = 16.6 mNm/4 = 4.14 mWb (with Kt = torque constant and N = no of pole pairs). Here a factor of 2/3 is used to estimate the flux?!
Also the maximum torque of 91 mNm or the maximum power of 41 W from the corresponding figure in the datasheet might be wrong?
Does anybody have an idea what I missed? The RPX22-042V24 datasheet can be found here and the simulation is attached and should work without variables in the workspace.
Many thanks in advance!
Results with a flux of 4.15 mWb and 25 kHz PWM freq:
  1 Kommentar
Mohamad Nazir
Mohamad Nazir am 20 Sep. 2023
To identify the root cause, the best approach is to verify each block or sub-systel unitarily. So you have to seperate the motor from the controller and check the motor's output when driven with 100% duty cycle. If the desired speed is reached/exceeded, your motor model is probably fine and it is the controller that has to be tuned.
You might also want to check the magnetic flux, for that you can put your parameters in the https://www.mathworks.com/help/sps/powersys/ref/permanentmagnetsynchronousmachine.html block and it will calculate the magnetic flux.
Hope this helps.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Darshan Pandit
Darshan Pandit am 20 Sep. 2023
Bearbeitet: Darshan Pandit am 21 Sep. 2023
Hi Kai,
I've tried to answer some of your queries below:
Magnetic Flux:
The terms Ke & Kt were used for BLDC motors and are based on manufacturer's way of specifying the units (e.g. line-line rms voltage/kRPM) that need to be understood from datasheet and converted correctly. Likewise for the formula Kt/N, which is applicable for BLDC and does not give much information for PMSM. The one mentioned by you in this link is more detailed & appropriate. The factor 2/3 comes from the default amplitude invariant clarke transformations and comes from rearranging the electromagnetic torque from following equation:
;
where, p = pole pairs & = permanent magnet flux linkage
Why the model is slow:
The model you're looking at implements switching dynamics and hence it will be slow in order to ensure integrity of results. To speed up, what I recommend, is to use Average-Value Inverter model to ensure things everything else except is good prior to analyzing PWM switching dynamics. This would also improve simulation speed by upto 10x~100x.
Why the speed is not reached & currents are non sinusoidal:
As you're trying to modify the example, you'd get incorrect results until you get all the details right to implement FOC of PMSM simulation. Some of these are:
  1. Identifying and entering correct motor parameters (Rs, Ld, FluxPM, etc)
  2. Updating correct inverter parameters (fsw, Rds, etc)
  3. Updating different sample times used in the model. (Ts, Ts_control, Ts_inverter, etc)
  4. tuning controller gains for the new system (PMSM + Inverter)
  5. simulate a number of times until you get things right.
FOC of PMSM:
Since doing all of above can be a time consuming process, there is a better way to implement FOC of PMSM using Simulink that simplifies all of these. I recommend getting started from Motor Control Blockset examples would help you get to your goal much faster. Depending upon level of depth needed to explore the solution, one can use both Simulink based models as well as the Simscape based model with PWM switching dynamics.
You can still continue to work with the example mentioned by you, but it'd take time. In the meanwhile, if you'd like to try this approach, here is a nice video FOC of PMSM made easy to learn more.
PMSM parameters:
It is best to run set of tests to estimate parameters on a real motor, as datasheet parameters differ alot from real motors. Anyway, with this background, one can still use the datasheet parameters with care to convert these parameters into model. e.g. Resistance, Inductances & Voltages mentioned in the datasheet are usually line to line values that need to be converted into phase.
Below is the set of parameters I'd recommend you to use from given datasheet:
pmsm.model = 'RPX22-042V24'; % // Manufacturer Model Number
pmsm.sn = '001'; % // Manufacturer Model Number
pmsm.p = 4; % // Pole Pairs for the motor
pmsm.Rs = 2.4/2; %Ohm // Stator Resistor
pmsm.Ld = 0.9e-3/2; %H // D-axis inductance value
pmsm.Lq = 0.9e-3/2; %H // Q-axis inductance value
pmsm.J = 1.2e-7; %Kg-m2 // Inertia in SI units
pmsm.B = pmsm.J/1.23; %Kg-m2/s // Friction Co-efficient
pmsm.Ke = 1.6*sqrt(2); %Bemf Const // Vpk_LL/krpm
pmsm.Kt = 16.6e-3 ; %Nm/A // Torque constant
pmsm.I_rated = 2.5; %A // Rated current (phase-peak)
% pmsm.I_rated = 5.5; %A // Max current (phase-peak)
pmsm.N_max = 15000; %rpm // Max speed
pmsm.PositionOffset = 0.2016/4; %PU position// Position Offset
pmsm.QEPSlits = 2048; % // QEP Encoder Slits
pmsm.FluxPM = (pmsm.Ke)/(sqrt(3)*2*pi*1000*pmsm.p/60); %PM flux computed from Ke
pmsm.T_rated = (3/2)*pmsm.p*pmsm.I_rated*pmsm.FluxPM;
you may run the above in MATLAB command window, and If you have Motor Control Blockset, you can also find base speed of the motor alongwith characteristics using following commands:
inverter.V_dc = 24;
pmsm.N_base = mcb_getBaseSpeed(pmsm,inverter); %rpm // Base speed of motor at given Vdc
mcb_getCharacteristics(pmsm,inverter);
few observations:
  1. the plots are different than datasheet. this is because manufacturers tend to run tests on BLDC six step control, and what we're looking at is targetted for FOC for PMSM.
  2. base speed for given operating conditions (24Vdc, 2.5A max current) is about 7817rpm. to achieve higher speed one needs to either increase voltage or do field weakening.
  3. maximum torque of 91 mNm correspond to current of 5.5A, inplace of rated current 2.5A, and this would lead to a smaller base speed as evident in the datasheet. you can uncomment that line above the observe differences in the characteristics.
  4. The mentioned max torque, max power in the datasheet are correct, but they correspond to manufacturer's test setup (e.g. six step BLDC control tests) and hence may have differences when you what to go for FOC.
Get started:
now that we've got the parameters, you can get started, take an example and get going. Of'course the example mentioned by you would also work given some efforts, but it'll likely take more time.
Hope this helped.
Contact us:
If you wish us to have a detailed look at the model, please contact us and we have a team who would be glad to help you out.
Have a good day.
--
Darshan Pandit

Weitere Antworten (0)

Communitys

Weitere Antworten in  Power Electronics Control

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by