
2.1 便携式单自由度机械臂的数学建模原理
2.1 The Principle of Model-ing in POFR-Arm
根据自动控制理论对控制系统的定义,一个闭环控制系统需要包括被控对象、控制器、执行机构、反馈装置这几个部分,这样才能构成一个完整的闭环系统回路。单自由度便携式机械臂的控制系统是一个电动机控制系统,属于运动控制类,其实物如图2.1所示,系统的框图模型如图2.2所示。
According to the definition of control system theory,a closed loop control system will be organized of plant,controller,adjustor,feedback equipment. The POFR-Arm is a motor control system,belongs to the type of motion control,and is shown as Figure 2.1. Its block diagram is shown in Figure 2.2.
机械臂的位置是我们的控制变量,也就是图中的θ(t),其中θr是参考位置(目标位置),而θ(t)是机械臂的当前位置(实际位置)。
The position of “arm”is the control variable,that will be represented as θ(t),and the θris reference position(goal position),θ(t)is the current position of robot arm(true position).

Figure 2.1 Diagram of Principle and Equipment for POFR-arm
图2.1 单自由度便携式机械臂实物与原理图

Figure 2.2 Diagram of Closed Loop System Block for POFR-Arm
图2.2 单自由度便携式机械臂闭环控制系统模型
我们首先要对直流电动机进行数学建模,最初的系统建立不包含控制器,可以假定Gc(s)=1。控制器是控制系统的控制算法,它的作用就是校正系统的数学模型,调节系统的静、动态特性,是我们实验系统真正研究的内容,这一部分的设计在后续的章节中介绍。
We will set up the mathematical model for DC motor firstly. As for there are no controller design,so we will assume the Gc(s)=1 . Controller could be a kind of control algorithm,which is used as a compensator for whole system and will adjust the performance of dynamic and steady error,so how to design a controller is the most important experiment content,it will be discussed at next chapters.
直流电动机的基本方程基于麦克斯韦电磁理论,电动机产生的力矩正比于磁通量φ和电枢电流ia的乘积:

The basic formula of DC motor comes from the theory of electromagnetic field which presented by Maxwell,the moment of DC motor is proportional to the product of magnetic flux φ and armature current ia:

其中k1为常数,M为驱动电动机转动的力矩。
Where k1 is constant,M is the moment of DC motor.
在电动机转动的同时,由于电枢绕组和磁场的相对运动,在电枢绕组中产生正比于磁通量φ和角速度ω乘积的电压eb,得到式(2.2):

When the Motor in rotating,due to the relative motion of the armature winding and the magnetic field,the voltage ebis generated in the armature winding,which is proportional to magnetic fluxφand angular velocity ω,shown in the formula(2.2):

k2为常数,电压eb和电枢绕组的外加电压ea相位差180°,即eb的方向和使ia流动的电压方向相反,因此称eb为反电动势。若激磁电流 if保持不变,用改变电枢电压ea来控制直流电动机。
k2 is constant. The voltage eband the armature winding voltage eahas 180°phase angle difference,namely the direction of eb is against the direction of voltage which makes the iaflow,so ebis called the counter electromotive force. If the excitation current ifremains unchanged,changing the armature voltage eawill control the DC motor.
假定电枢和负载的总转动惯量为J,粘性摩擦系数为c,电枢电路的电感和电阻为La和Ra,作用在电机轴上的负载力矩为Md,则依据电压平衡和力矩平衡原理有:

Assume that the total moment of inertia of the armature and the load of J,viscous friction coefficient is c,the armature circuit inductance and resistance for Laand Ra,the load torque on the motor shaft is Md,then on the basis of the voltage balance and moment balance principle,we have:

在式(2.1)中磁通量φ是激磁电流if的函数,在没有饱和的情况下呈线性关系。

The magnetic flux φ is a function of the excitation current ifin(2.1),and they keep in linear relationship when it is not in the saturation zone.

k3为常数,于是由式(2.1),式(2.2)以及式(2.5),可以得到下式:

k3 is constant,so by the formula(2.1),(2.2)and(2.5),the following formulae can be obtained:

定义电气时间常数为T1=La/Ra,机械时间常数为T2=J/c,将式(2.6)、式(2.7)式代入式(2.3)和式(2.4)式,则可以得到下式:

Define the electrical time constant T1=La/Ra,the mechanical time constant of T2=J/c,integrate the(2.6)and(2.7)into(2.3)and(2.4),we can obtain the following equation:

因为=ω,将式(2.6)至式(2.9)式用系统框图连接,如图2.3所示。
Because=ω,connect equation(2.6)to(2.9)with a system block diagram,shown in Figure 2.3:
对于永磁式的直流电动机而言,没有激磁绕组,由永久磁铁产生固定的磁通φ=常量。令Md=0,并消去中间变量ia和Ma,可得输入电压ea(Ea(s))和输出转速ω(Ω(s))之间的传递函数为:

For permanent magnet DC motor,there is no excitation winding,the permanent magnet produces a fixed magnetic flux φ=constant. Let Md=0,and eliminate intermediate variables iaand Ma,we could have transfer function from input voltage eaEa(s)and output angle speed ω(Ω(s)):

Figure 2.3 Block diagram of DC motor controlled by armature
图2.3 电枢控制的直流电动机框图

如果令ea=0,可以求出负载力矩Md和输出转速ω之间的传递函数为:

If let ea= 0,the transfer function should be determined by the load torque Md with the output angle speed ω as following:

(1)把参数带进式(2.11),计算出二阶系统传递函数,得出关于ω的二阶系统。如果针对位置控制,则变成3阶系统。
(1)Put the parameters into(2.11),the second-order system transfer function about ω is obtained. For position control,it becomes the third-order systems.
(2)如果T1≪T2,则可以忽略T1的影响,只保留T2,系统传递函数变成如下式所示的形式:

(2)If T1≪T2,ignore the impact of T1,only T2 is considered,the system transfer function will be written as follows:

由于Ω(s)=sΘ(s),故可以求出输入电压与输出转角之间的传递函数。

Because Ω(s)=sΘ(s),we could get the transfer function between input voltage and output rotation angle .

由式(2.12)、式(2.13)以及式(2.14)可以看出,输入电压与输出转速之间可以近似为一阶系统,而输入电压与输出转角之间的传递函数则可以看作是二阶系统。
It can be seen from equation(2.12),(2.13)and(2.14),that the relationship between the input voltage and the output rotation speed can be approximated as a first order system,and the transfer function of input voltage and output angle will be considered as the second order system.
直流电动机是系统的执行机构,它控制机械臂转动,实现机械臂的位置精确控制。直流电动机的自身特性在出厂之后即可视为固定不变,因此直流电动机的数学模型由自身的电气特性与机械特性决定。反馈装置由光电编码器实现,它可以检测到机械臂的实际位置,并将这一信号返回给控制器。
DC motor is the actuator of system,which controls the robotic arm rotation,torealize precise control of the robot arm’s position. DC motor’s parameters should be confirmed after it is produced and out of factory,so the mathematical model of the DC motor is determined by its electrical and mechanical characteristics properties. Feedback device is adopted of the optical encoder,which can detect the actual position of the robot arm,and will send the signal back to the controller.
以上的分析与式(2.1)~式(2.14),均是基于电机原理获得的,假定单自由度系统的参考输入为θr,是给定角位移(系统的输入量)。单自由度机械臂的指针是被控对象,指针的角位移θc是被控变量(系统的输出量),测量电路是由桥式电位器来实现的,它实现系统输入量和输出量的跟踪偏差(θr-θc)并转换成电压信号ea,该信号经放大装置放大后驱动电动机,电动机则是整个系统的执行机构。
All the formulae from(2.1)to(2.14),are obtained according to the principle of DC motor. Assume that θris a reference input which is given angular displacement(system input),the pointer is a plant of the control system,and pointer angular displacement θc is the controlled variables(system output),the measurement circuit is realized by a bridge potentiometer,it implements the tracking error(θr-θc)of input and output of the system and converted into a voltage signal ea,the signal of eais amplified and then to drive the DC motor . The motor will be saying as the actuator of the system.
根据各个环节结构可得整个系统的简化结构图如图2.4所示。
According to each component part structure,the system diagram can be obtained as figure 2.4.

Figure 2.4 Simplified Block Diagram of POFR-Arm
图2.4 单自由度机械臂简化框图
根据各个环节结构可得整个系统的结构图如图2.5所示。其中:ks为桥式电位器的传递系数,ka为放大增益;T, kd均为系统机械特性常数,可以认为是固定值。
According to each component in POFR-Arm system,the structure diagram of the entire system can be obtained as show in figure 2.5. the parameters are:ksis the parameters of bridge potentiometer,kais the gain of amplifier,T and kdare constant of mechanical characteristics.
因此整个闭环系统可以近似简化为典型的二阶系统,如图2.6所示。其中:

So the closed feedback control system will be simplified as a classical second-order system,shown as figure 2.6. Where:

为方便建模,把桥式电位器的传递系数和放大增益都可看成电动机模型中的常数系数。为了计算参数,假设系统在阶跃响应中,转速稳定时的速度为Ω(∞),当系统转速达到0.632 ×Ω(∞)时对应的时间就是T。根据电动机位置控制的阶跃响应曲线,可以近似计算出参数K。
To facilitate the modeling,the transfer coefficient and amplifier gain of bridge potentiometer can be seen as a constant factor in the model of motor. Assume in the step response,the system stable speed is Ω(∞),when the system rotation speed is 0.632 ×Ω(∞),it will cost T seconds. According to the step response curve of motor position control,we can calculate the parameter K approximately.

Figure 2.5 Block Diagram of DC Motor
图2.5 电机控制框图

Figure 2.6 Simplified Block Diagram of DC Motor
图2.6 电机控制框图的简化图
通过多次实验修正计算,最后得出系统T和K两个参数分别为0.054和4.587。因此,直流电机输入电压与输出转角之间的传递函数是:

After several corrections and calculations,we will get the parameters of T and K as 0.054 and 4.587. Thus,the transfer function of motor input voltage and the output angle in DC motor can be obtained:

以上传递函数的G(s)确立,是在多次实验的基础上获得的。可以用本章附录的最小二乘参数辨识MATLAB程序,给学生展示电机数学模型的建过程。
The transfer function established G(s)above is based on experiment with many times. Teachers can use the MATLAB program “least- squares parameter identification”at the end of the chapter to demon-strate the process of modeling for DC motor to students.