From the series:Field-Oriented Control of PMSMs with Simulink
Melda Ulusoy, MathWorks
该视频演示了如何通过在电机控制BlockSet™中使用预构建的仪器测试来识别PMSM电机的定子电阻,D轴和Q轴电感,反向EMF恒定,惯性和摩擦恒定参数。
您可以从Simulink启动和控制参数估计金宝app®模型在主机上。你也可以保存estimated values to parameterize motor models and to compute controller gains.
In this video, we will see how to use Motor Control Blockset to run instrumented tests on a brushless PMSM motor to quickly estimate motor parameters that we can use to design controller gains and run closed-loop simulation. Often times motor parameters are either not available from data sheet or the motor behavior that we observe is different than what’s described by the data sheet. In that case, Motor Control Blockset and its parameter estimation capabilities can come handy to provide an accurate parameterization of the motor.
为了估算电机参数,我们将使用电机控制块集的这两种型号。这些模型已被配置为运行我们在此处使用的微控制器和变频器的特定组合的参数估计,Texas Instruments LaunchPad F28379D和DRV8305逆变器。这些模型可用作适应您自己的应用程序的起点。
This particular model contains the algorithm that run instrumented tests on motor hardware. As instructed here, we first click this link to open up the host model and click CTRL+D to update the workspace with the inputs provided by this model. Then we go back to the target model. We now navigate to the hardware tab and click this button to generate code from the model and upload the generated code to the launchpad processor. Once the code is compiled and uploaded to the hardware, we switch to the host model which runs on a host computer, in this case my laptop.
This model controls the operation of parameter estimation task. Here, we define the nominal values for our motor such as the nominal voltage, current, speed, the number of pole pairs, and the input DC voltage for our power supply. And here, we can specify the offset for the hall sensor that we compute using other capabilities of Motor Control Blockset. Once we have provided these values, we can start the instrumented tests on the motor control hardware. To run the tests, we press this button that runs the host model. We see that the stator resistance is estimated first followed by estimation of Ld and Lq, back-EMF, motor inertia and friction constant.
要查看此测试期间电机发生了什么,我们可以从我们想要查看的目标中选择信号。我们可以查看VD,VQ,ID,IQ等信号。在这种情况下,我们将使用提供的范围查看速度信号。我们可以在此处看到测试包括将电机卷起来并将其旋转下来以计算电机惯性。
Now that the parameters have been estimated, there are two things we can do. One is we can save the estimated parameters into a MATLAB file. We can then use this MATLAB file to compute controller gains or to populate the parameters of the motor model for closed-loop simulation. To do that, we click the “Save” button and specify the name of the file. Now, we go to the MATLAB command line, clear the workspace, and load the file we just saved. This creates a structure called “motorParam”. And the structure has parameters that we just estimated. We can also press this “Open model” button. This creates a new Simulink model that contains the block for modeling the motor dynamics. If we open the block dialog, we see that this block has been parameterized with the estimated values of our motor parameters. We can now use this block for accurate closed-loop simulation of motor dynamics. Note that parameter estimation runs for the motor for no load. If we add load to the motor, we might need to adjust our controller design and model the load dynamics in the simulation. But these initial set of parameters that we obtained here is a useful start for computing motor parameters and setting up closed-loop simulation of our motor control algorithm. This completes the demo.
您还可以从以下列表中选择一个网站:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.