建模直流电动机
SIMSCAPE™ is used to model a DC motor. The model is created by assembling a physical network of Simscape components, including electrical resistors, shaft inertias, and friction. The simulation results are evaluated in the Simscape Results Explorer. The physical connections used in the model make it easy to understand, modify, and maintain, and make it possible to quickly build up models spanning multiple physical domains.
Recorded: 25 May 2016
在此演示中,我们将看到如何使用SIMSCAPE建模直流电动机。我们希望建模的系统看起来像这样 - 一个具有两个电气连接和两个机械连接的直流电动机,包括一个可以沿轴转换的连接。
We wish to model this system with electrical and mechanical effects. We will use Simscape to model it. The model we build will look like this. And when we run the simulation, we will see how the motor reacts as it acts against a spring.
We'll use the MATLAB command ssc_new to open up a new Simulink model. Using the command ssc_new opens up a Simulink model with the settings recommended for Simscape models. It also adds a few of the blocks commonly used in Simscape.
为了建模我们的直流电动机,我们需要的第一件事是直流电压源。我将在图中单击并输入“ DC电压源”,然后从列表中选择组件。我将电压设置为5伏。
接下来我们需要的是电阻。我将单击并拖动以创建电气连接,然后输入“电阻器”,然后选择电阻组件。
We then need a block that will convert between electrical and mechanical energy. I'll type in "electro" and then select the rotational electromechanical converter. I'll then connect this to our resistor.
我们的电路还需要一个电感器,然后将其连接到转换器的另一侧。我们还需要一个地面块。因此,我将输入“电气参考”并在此处连接。
SimScape使用求解器技术超出了普通Simulink中可用的功能。万博1manbetx要访问其中一些设置,我们将连接求解器配置块。
接下来,我们要做的就是我们模型的机械部分。这两个端口代表我们电动机的机械连接。我们将把电动机的外壳连接到固定在太空中的点。我们将插入机械旋转参考块。
该连接代表轴。我将单击并拖动以创建机械连接,然后插入惯性以表示轴的惯性。
我们想在电动机的轴承中建模粘性摩擦。我将右键单击并拖动以创建一个分支,然后插入一个阻尼器块。我们将阻尼器连接到电动机的外壳。
We want to convert the rotational motion of the shaft to translational motion. We'll do that using a wheel and axle block.
We want the motor to act against the spring. So we'll insert a spring. And the spring will be connected to a point fixed in space.
With this, our model is complete. We can run the simulation. I'll right-click on the block and select Simscape, View Simulation Data, Simlog.
Here we can see the Simscape Results Explorer. We can explore the results of our simulation through this tree browser. Here I can see the speed of the shaft as it settles out to 0 radians per second.
And I can look at electrical quantities, such as the current through the resistor. We can see how much the spring was compressed by selecting the x variable in the translational spring. And we can see that it compressed to about 0.01 meters, or 1 centimeter.
I can increase the distance that the motor shaft moves by resetting the stiffness of the spring. Here, I can change it to a new numerical value, or I could assign a MATLAB variable. I can also adjust the units. And I can configure this parameter to be a runtime parameter, meaning that I can change this value without regenerating C code.
我将重新启动模拟,重新加载模拟结果,我们将看到今年春天再次压缩2厘米 - 因为我们已经将弹簧的刚度减半了。
If I want to view the results of this simulation on a Simulink scope, I can use sensor blocks. I'll right-click and add a motion sensor. And we'll measure the motion of the shaft with respect to the housing.
The sensor block produces a physical signal. This physical signal can be used to implement simultaneous physical equations. We need to convert this physical signal to a Simulink signal in order to view it on the scope.
在该转换中,我们将分配单位。因此,我们将其分配学位。现在,当我们运行仿真时,我们可以看到轴在simulink范围上打开了多少。万博1manbetx我们可以看到它在大约22和1/2度下定居。
在此演示中,我们已经看到了如何使用SIMSCAPE中的基础库组件对直流电动机进行建模,并分析Simscape Results Explorer中的结果。
Featured Product
SIMSCAPE
选择一个网站
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
您还可以从以下列表中选择一个网站:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
美洲
- AméricaLatina(Español)
- 加拿大(英语)
- 美国(英语)