首页 > 其他 > 详细

电机死区常数τ=RC计算

时间:2017-07-04 00:28:28      阅读:516      评论:0      收藏:0      [点我收藏+]

技术分享

#include "dialog.h"
#include "ui_dialog.h"
#include <qmath.h>

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
    ui->lablePic->setScaledContents(true);
    QPixmap pix(":/pic/pic.png");
    ui->lablePic->setPixmap(pix);
    ui->lablePic->resize(pix.size());
    
    setMaximumSize(size());
    setMinimumSize(size());
    
    setWindowTitle("电机死区常数τ=RC计算 by:郭树人 QQ:1085081059");
}

Dialog::~Dialog()
{
    delete ui;
}

void Dialog::on_btnRC_clicked()
{
    double V1 = ui->lnV1->text().toDouble();
    double V2 = ui->lnV2->text().toDouble();
    double V3 = ui->lnV3->text().toDouble();
    double t = ui->lnT->text().toDouble();
    double rc = ui->lnRC->text().toDouble();
    
    //初始电容电压 V1
    //死区阈值电压 V2
    //电源电压    V3
    
    //V2 = V1 + (V3 – V1) * [1 – exp( -t/RC)] 
    double temp = 0 ;
    temp = (V2 - V1)/(V3 - V1);
    temp = 1- temp ;
    rc = (-t)/qLn(temp);
    
    ui->lnRC->setText(QString::number(rc));
}

 

http://pan.baidu.com/s/1jIxadka

技术分享

电机死区常数τ=RC计算

原文:http://www.cnblogs.com/JJLQ/p/7113559.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!