zoukankan      html  css  js  c++  java
  • 第三周作业二

    快速地达到并且电流不大于三倍,所以尝试用三倍电流进行计算

    model motor1 "An DC Motor Model"

    type Voltage=Real(unit="V");

    type Current=Real(unit="A");

    type Resistance=Real(unit="Ohm");

    type Speed=Real(unit="r/min");

    type Torque=Real(unit="N.m");

    type Inertia=Real(unit="kg.m^2");

    Torque Tm"Torque of the Motor";

    Speed n"Speed of the Motor";

    Current i"Armature Current";

    Voltage u"Voltage Source";

    Resistance R_ad"External Resistance";

    Resistance R1"Start-up Resistance";

    Resistance R2"Start-up Resistance";

    Resistance R3"Start-up Resistance";

    Resistance R4"Start-up Resistance";

    parameter Real J = 1"Total Inertia";

    parameter Real R = 0.6"Armature Resistance";

    parameter Real Kt = 1.8"Torque Constant";

    parameter Real Ke = 0.189"EMF Constant";

    parameter Real Tl = 29.2"Load Torque";

    parameter Real i1=48.6"Maximum Current";

    parameter Real i2=17.8"Minimum Current";

    equation

    Tm-Tl = J * der(n) * 6.28 / 60;

    Tm= Kt * i;

    u= i * (R+R_ad+R1+R2+R3+R4) + Ke * n;

    if time <= 0.1 then

    u = 0;

    R_ad = 0;

    else

    u = 240;

    R_ad = 0;

    end if;

    if time <= 1.7 then

    R1=2.123;

    else

    R1=0;

    end if;

    if time <= 2.55 then

    R2=1.194;

    else

    R2=0;

    end if;

    if time <= 3.05 then

    R3=0.705;

    else

    R3=0;

    end if;

    if time <= 3.35 then

    R4=0.416;

    else

    R4=0;

    end if;

    end motor1;

     

    达到稳定时间为4S左右

  • 相关阅读:
    uniapp数据循环带参数拼接方法
    UniApp页面跳转
    layui表单提交时关闭默认刷新页面
    js计时器
    Jquery 鼠标移入移出事件
    jquery常用ajax请求
    易宝网上支付接口的实现
    不使用缓存和不同缓存下程序的效率测试
    Mysql常见指令--常用的命令
    PHP冒泡与快速排序法
  • 原文地址:https://www.cnblogs.com/caishixu/p/5281565.html
Copyright © 2011-2022 走看看