How to change rpm of 'Permanent Magnet Synchronous Motor Field-Oriented Control'

I am using c28035pmsmfoc_ert.slx to drive the attached motor of DRV8312-C2-kit.
How do I change the rpm for this model? I want to change from the default 1200 rpm to 3000 rpm.
I changed Speed_per_unit_scaler to 3000 rpm and set the variable in Desired Speed ​​subsystem to +1.0, but the rpm is only 1500 or more.

6 Kommentare

Hello,
we have bought a DRV8312-C2-KIT but we have not found c28035pmsmfoc_ert.slx example in our downloaded and installed TI C2000 Piccolo Support from Embedded Coder (we are using MatLab 2019a and CCS 6.1).
Please, could you show us where did find exatly (the link) the package which contains it?
Which are the versions of MatLab, CCS, etc. that ou are using?
Thank you very much!
Patxi
Hi Patxi
I use Matlab 2019a and CCS9.0.1
Here is Link. You can find 'c28035pmsmfoc_ert' below.
if you install Embedded coder. you just need enter 'c28035pmsmfoc_ert' at matlab command window.
Also this is a local direction of sample.
C:\ProgramData\MATLAB\SupportPackages\R2020a\toolbox\target\supportpackages\tic2000\tic2000examples
Ryo
Hi Ryo,
thank you very much for your info. I have MatLab 2019a and CCS 6.2.0, and after load c28035pmsmfoc_ert it is compiled properly doing build (Build, load in eprom and run). The problem is in the last part, when the PC is connecting with the board and the debbuger/emulator can not do it, giving an error.
I have tried to use 28035 and XDS 100 v1 and v2 with Target Configuration in CCS but I can not get any result. Did you get any similar error initially?
Thank you very much!
Patxi
Hi patxi
The c2000 has a switch on the board for communication with the PC.
There is the following description on p3 of the attached PDF file. How about setting it this way?
5) Make sure that the following switches are set as described below on the F28035 controlCARD to enable
boot from flash and connection to the SCI
a. SW3: OFF (UP) position
b. SW2: Position 1 = ON (UP), Position 2 = ON (UP)
If I get an error when building and loading in Simulink, I also test with Target Configuration in CCS.
If you show me the error comment, I might know if there's anything else wrong.
Ryo
Hi Ryo,
the problem was SW3, which is necessary to put in ON (DOWN) position. Now, I can program the Kit by using CCS, MATLAB/SIMULINK and UniFlash.
Thank you very much!
Patxi
tkry
tkry am 12 Jan. 2021
Bearbeitet: tkry am 12 Jan. 2021
Patixi
You are welcome
Please contact me if you have any problems
Ryo

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Darshan Pandit
Darshan Pandit am 7 Jun. 2019
Bearbeitet: Darshan Pandit am 7 Jun. 2019
Hi friend,
You are doing the right thing by changing the Speed_per_unit_scaler variable to desired rpm.
Apart from this, there are few more changes that are required. These affect the operation of motor at higher speeds. These are mentioned below:
1) Change Speed_per_unit_scaler
  • (You may skip this step, if already completed)
  • Type "edit c28035pmsmfoc_data" at your matlab command prompt.
  • Update Speed_per_unit_scaler = 3000; (Or desired speed, supported by the motor being used)
  • Run the script before generating code.
2) Change position sensing to Hall sensors
  • The SMO has limited accuracy at higher speeds to estimate position of the rotor.
  • The position sensors, e.g. Halls, QEP, perform better at higher speeds.
  • This does not mean that you can't use the SMO, it's just that you may not be able to spin the motor at maximum possible speeds, if you're using the SMO.
3) Update saturation values of Current_PI controllers (both Id & Iq):
  • These values limit the maximum voltage fed to motor via inverter.
  • Here, sqrt(Vd^2 + Vq^2) = Vdc/sqrt(3) = 1pu.
  • Since, the controller cannot provide voltages > 1pu, I'd suggest to limit this to +0.707.
  • This is because (0.707^2 + 0.707^2) = 1.
4) Update saturation values of Speed_PI controller
  • This limits the maximum allowable current into the motor.
  • Here, 1pu = 8.9A. And depending upon the motor's rated current, you may limit this value.
  • If you have 1pu as the limits, the hardware may trip at starting transients.
  • If you do not know the motor's rated current I'd suggest to limit this to +0.5pu.
5) Take safety precautions
  • As soon as the generated code downloads, the motor is going to spin at desired speeds.
  • Be careful about sudden speed changes as the fast spinning shafts has hazards.
Hope this helps!

2 Kommentare

Thank you for answering in detail.
Since I want to use only sensorless, I could not raise it to 3000 rpm. But thanks to your advice up to 1800rpm was possible.
In addition, how can I change the rpm in cycles?
For example, change from 1000 to 14000 rpm with 30% duty ratio in 1 second cycle.
May be possible if change Per_unit_speed_demand to pulse, but I do not know how to set it.
pulse.png
Hey friend,
You are correct. You need to generate the required signal by modifying Per_unit_speed_demand as per your requirements.
There are multiple ways you can achieve this.
All you need to do is: Generate the signal using Simulink blocks.
For example (and this is not the best way), I can quickly use a pulse generator to modify the Per_unit_speed_demand from 0.5 to 0.8 pu for 30% duty in 1sec cycle.
However, as I mentioned, this is not be best implementation. Simulink offers multiple ways to do this. I'd prefer to create the required pulse using either sample based pulse generator, or using counters or a custom logic gates. You might come up with even better approach! Doing so, requires additional time & efforts, however this would make the generated code more efficient.
Hope this helps!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Gefragt:

am 5 Jun. 2019

Bearbeitet:

am 12 Jan. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by